/* Программа «4ill.ru в нике»: страница /tag и точки призыва. Только .tg-*, глобальные --rd-* не переопределяются.
   Источник: plans/tag/design/ux-spec.md и mockups/tag.css. */
.tg-app, .tg-inline, .tg-chip, .tg-badge, .tg-menu-item, .tg-note-line {
  --tg-accent: #22c9b7; --tg-muted: #a5aec4; --tg-text: #e8eaf2; --tg-surface: #111520; --tg-line: #252d45;
  --tg-i: #75d8ff; --tg-ii: #ab7aff; --tg-iii: #ffb020;
}
.tg-app { color: var(--tg-text); font: 14px/1.6 var(--rd-font-body, 'Inter', system-ui, sans-serif); }
.tg-app *, .tg-inline * { box-sizing: border-box; }
.tg-app a, .tg-inline a { color: var(--tg-accent); text-decoration: none; }
.tg-app a:hover, .tg-inline a:hover { text-decoration: underline; }
.tg-app :focus-visible, .tg-inline :focus-visible, .tg-chip:focus-visible, .tg-badge-link:focus-visible { outline: 2px solid var(--tg-accent); outline-offset: 4px; }
.tg-wrap { max-width: 1256px; padding: 36px 24px 72px; margin: 0 auto; }
.tg-kicker { color: var(--tg-muted); letter-spacing: .12em; text-transform: uppercase; font-size: 11px; font-weight: 700; margin: 0 0 8px; }
.tg-app h1, .tg-app h2, .tg-app h3 { font-family: var(--rd-font-head, 'Exo 2', sans-serif); line-height: 1.15; margin: 0 0 16px; color: var(--tg-text); }
.tg-app h1 { font-size: 44px; max-width: 670px; letter-spacing: -.02em; }
.tg-app h2 { font-size: 25px; }
.tg-app h3 { font-size: 18px; }
.tg-app p { margin: 0 0 14px; }
.tg-muted { color: var(--tg-muted); }
.tg-hero { min-height: 240px; max-height: 280px; display: grid; grid-template-columns: 1fr 300px; align-items: center; gap: 24px; margin-bottom: 32px; }
.tg-hero--plain { grid-template-columns: 1fr; }
.tg-hero img { width: 300px; height: 220px; object-fit: cover; border-radius: 12px; object-position: 75% center; }
.tg-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.tg-button, .tg-app summary { min-height: 44px; padding: 11px 16px; border-radius: 8px; cursor: pointer; font: 600 14px/1.5 var(--rd-font-body, 'Inter', sans-serif); }
.tg-button { background: var(--tg-accent); color: #07090e !important; border: 1px solid var(--tg-accent); display: inline-flex; align-items: center; justify-content: center; text-decoration: none !important; }
.tg-button-secondary { background: transparent; color: var(--tg-text) !important; border-color: #56617a; }
.tg-button:disabled, .tg-button[aria-disabled="true"] { opacity: .7; cursor: wait; }
.tg-card { background: var(--tg-surface); border: 1px solid var(--tg-line); border-radius: 12px; padding: 24px; margin-bottom: 20px; min-width: 0; }
.tg-status { border-top: 2px solid var(--tg-accent); }
.tg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tg-section { margin-top: 36px; }
.tg-stat { font: 600 24px var(--rd-font-head, 'Exo 2', sans-serif); }
.tg-track { height: 5px; background: #293249; border-radius: 8px; margin: 12px 0; }
.tg-track span { height: 100%; background: var(--tg-accent); display: block; border-radius: 8px; }
.tg-badge { color: var(--tg-i) !important; border: 1px solid currentColor; background: #0c0f18; padding: 4px 8px; border-radius: 6px; display: inline-flex; gap: 6px; align-items: center; font-size: 12px; font-weight: 700; }
.tg-level-ii { color: var(--tg-ii) !important; }
.tg-level-iii { color: var(--tg-iii) !important; }
.tg-badge-link { min-height: 44px; display: inline-flex; align-items: center; }
.tg-note { padding: 12px 16px; border-left: 2px solid var(--tg-accent); background: #102724; margin-bottom: 20px; }
.tg-note--warn { border-left-color: var(--tg-iii); background: #2a2210; }
.tg-note-link { color: var(--tg-accent); text-decoration: underline; }
.tg-app code { color: var(--tg-text); background: #07090e; padding: 4px 8px; border-radius: 4px; overflow-wrap: anywhere; }
.tg-app details { border-bottom: 1px solid var(--tg-line); }
.tg-app details p { padding: 0 16px 16px; color: var(--tg-muted); }
.tg-app summary { padding-left: 0; }
.tg-check-result { min-height: 24px; }
.tg-check-result .tg-name { color: var(--tg-text); font-weight: 600; overflow-wrap: anywhere; }
.tg-disabled-note { color: var(--tg-muted); }

/* Точки призыва */
.tg-inline { display: flex; align-items: center; min-height: 44px; gap: 8px; font-size: 13px; line-height: 1.4; }
.tg-inline[hidden], .tg-chip[hidden], .tg-dot[hidden] { display: none !important; }
.tg-inline a { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; min-height: 44px; }
.tg-inline--plain { color: var(--tg-muted); }
.tg-dismiss { min-width: 44px; min-height: 44px; border: 0; background: transparent; color: var(--tg-muted); font-size: 22px; line-height: 1; cursor: pointer; }
.tg-dismiss:hover { color: var(--tg-text); }
.tg-icon { width: 16px; height: 16px; vertical-align: middle; flex: none; }
.tg-chip { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border: 1px solid #24534e; border-radius: 8px; background: #102724; white-space: nowrap; font-size: 13px; color: var(--tg-text) !important; text-decoration: none; }
.tg-chip:hover { border-color: var(--tg-accent); text-decoration: none; }
/* В полосе режимов чип не должен делать её выше: видимая высота 40 px, область нажатия 44 px за счёт ::after. */
.rd-mode-strip .tg-chip { margin-left: auto; min-height: 40px; position: relative; }
.rd-mode-strip .tg-chip::after { content: ""; position: absolute; left: 0; right: 0; top: -2px; bottom: -2px; }
.tg-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--tg-accent); margin-left: 6px; }
.tg-menu-item { display: flex !important; align-items: center; gap: 8px; min-height: 44px; }
.tg-note-line { font-size: 12px; color: var(--tg-muted); margin: 0; }
/* В карточке дневных коинов у виджета flex-gap 10px: строка добавляет ровно 44px, а не 54. */
.coin-widget-card > .tg-inline { margin-top: -10px; }
/* Заголовок профиля: подпись под ником занимает свою строку. */
.tg-profile-line { margin: 4px 0 0; }

@media (max-width: 700px) {
  .tg-wrap { padding: 24px 16px 48px; }
  .tg-app h1 { font-size: 32px; }
  .tg-hero { display: block; max-height: none; min-height: 0; margin-bottom: 24px; }
  .tg-hero img { display: none; }
  .tg-grid { grid-template-columns: 1fr; }
  .tg-card { padding: 18px; }
  .tg-actions { display: grid; grid-template-columns: 1fr; }
  .tg-inline { font-size: 12px; }
  .tg-section { margin-top: 28px; }
}
@media (prefers-reduced-motion: reduce) { .tg-app * { scroll-behavior: auto !important; } }

/* T07: published proof data stays inside the viewport. */
.tg-proof { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; max-width: 100%; }
.tg-winner { display: flex; align-items: center; gap: 10px; }
.tg-winner img { border-radius: 50%; }
.tg-app details summary { cursor: pointer; min-height: 44px; padding: 10px 0; }

.tg-clan-progress { --tg-accent: #22c9b7; }

.tg-price-note { margin: 0; font-size: 12px; line-height: 20px; color: var(--rd-text-secondary, #a5aec4); }

/* C8 details share the CTA dismissal and priority visibility. */
.tg-inline:has(> .tg-inline-details) { flex-wrap: wrap; }
.tg-inline-details { flex: 0 0 100%; min-width: 0; }

/* /tag: clear action, compact setup and optional calculation details. */
.tg-hero { min-height: 0; max-height: none; grid-template-columns: minmax(0, 1fr) 240px; }
.tg-hero--plain { grid-template-columns: minmax(0, 1fr); }
.tg-app h1 { font-size: clamp(30px, 3.2vw, 42px); }
.tg-nick-preview { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 18px 0; }
.tg-nick-preview > .tg-muted { font-size: 12px; }
.tg-nick { padding: 9px 14px; background: #111520; border: 1px solid var(--tg-line); border-radius: 8px; overflow-wrap: anywhere; }
.tg-nick strong { color: var(--tg-accent); }
.tg-nick-preview { align-items: flex-start; flex-direction: column; gap: 8px; }
.tg-nick-preview > .tg-muted { font-size: 12px; }
.tg-nick-copy { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; max-width: 600px; }
.tg-nick-copy .tg-nick { flex: 1 1 180px; width: 0; min-width: 0; color: var(--tg-text); font: inherit; min-height: 44px; }
.tg-copy-status { font-size: 12px; color: var(--tg-accent); overflow-wrap: anywhere; }
.tg-copy-status:empty { display: none; }
.tg-benefit-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; padding: 0; }
.tg-benefit-chips a { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 7px 11px; border: 1px solid #24534e; border-radius: 8px; background: #102724; font-size: 12px; }
.tg-benefit-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: #102724; color: var(--tg-accent); font-size: 22px; margin-bottom: 16px; }
.tg-reward-emblem { display: grid; place-items: center; width: 180px; height: 180px; margin: 0 auto 20px; border: 1px solid #24534e; border-radius: 40px; background: radial-gradient(circle, #173e38, #111520 70%); color: var(--tg-accent); font-size: 70px; box-shadow: 0 0 36px #22c9b714; }
.tg-reward-icons { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
.tg-reward-icons span { display: grid; place-items: center; width: 32px; height: 32px; background: #102724; color: var(--tg-accent); border-radius: 8px; font-size: 18px; }
#tag-benefits, #steps { scroll-margin-top: 120px; }
.tg-reward-art { text-align: center; color: var(--tg-muted); font-size: 12px; }
.tg-hero .tg-reward-art img { display: block; width: 240px; max-width: 100%; height: 240px; margin: 0 auto 8px; object-fit: contain; border-radius: 0; }
.tg-reward-art strong { display: block; color: var(--tg-accent); font-size: 20px; }
.tg-progress-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tg-next-step { padding: 12px 16px; border-radius: 8px; background: #102724; }
.tg-status-details { margin: 8px 0 20px; }
.tg-status-details summary, .tg-install-details summary { color: var(--tg-muted); }
.tg-status-details .tg-steam-checks { padding: 12px 16px 0; }
.tg-steps { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.tg-steps li { display: flex; gap: 12px; min-width: 0; }
.tg-step-number { flex: 0 0 28px; height: 28px; display: grid; place-items: center; color: var(--tg-accent); background: #102724; border-radius: 50%; font-weight: 700; }
.tg-app .tg-steps h3 { font-size: 16px; line-height: 1.5; margin-bottom: 5px; }
.tg-app .tg-steps p { padding: 0; margin-bottom: 6px; }
.tg-install-details { padding-bottom: 12px; }
.tg-app .tg-check-result:empty { min-height: 0; }
@media (max-width: 700px) {
  .tg-hero { display: block; }
  .tg-reward-art { display: none; }
  .tg-app h1 { font-size: 30px; }
  .tg-nick-preview { align-items: flex-start; flex-direction: column; margin: 14px 0; }
  .tg-nick-copy { flex-direction: column; }
  .tg-nick-copy .tg-nick { flex: none; width: 100%; }
  .tg-nick-copy .tg-button { width: 100%; }
  .tg-progress-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tg-steps { grid-template-columns: 1fr; gap: 16px; }
  .tg-app .tg-progress-grid p { margin-bottom: 6px; }
}

/* Nickname is a compact, selectable preview with an adjacent icon action. */
.tg-nick-copy { max-width: 100%; align-items: center; flex-direction: row; gap: 8px; }
.tg-nick-caption { font-size: 12px; color: var(--tg-muted); margin-right: 6px; }
.tg-nick-copy .tg-nick { flex: 0 1 auto; width: auto; min-width: 0; max-width: 100%; user-select: text; overflow-wrap: anywhere; }
.tg-copy-icon { display: inline-grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 1px solid var(--tg-line); border-radius: 8px; background: transparent; color: var(--tg-muted); cursor: pointer; font-size: 17px; }
.tg-copy-icon:hover { color: var(--tg-accent); border-color: var(--tg-accent); background: #102724; }
@media (max-width: 700px) {
  .tg-nick-caption { flex-basis: 100%; }
  .tg-nick-copy .tg-nick { max-width: calc(100% - 52px); }
}

/* /tag: scan the benefit, copy a nickname, open detail only when needed. */
.tg-app .tg-hero { padding: 24px; border: 1px solid var(--tg-line); border-radius: 16px; background: radial-gradient(ellipse at top right, #12312c, #111520 65%); gap: 24px; }
.tg-copy-icon { color: #07090e; background: var(--tg-accent); border-color: var(--tg-accent); }
.tg-copy-icon:hover { color: #07090e; background: #52ddce; }
.tg-nick-caption { flex-basis: 100%; }
.tg-app .tg-status { padding: 20px 24px; }
.tg-app .tg-status h2 { font-size: 21px; margin-bottom: 12px; }
.tg-app .tg-status .tg-stat { font-size: 22px; margin-bottom: 0; }
.tg-status .tg-check-result > .tg-muted { font-size: 12px; }
.tg-status .tg-status-details { margin-bottom: 0; }
.tg-steps-section { margin-top: 16px; }
.tg-detail-hint { color: var(--tg-muted); font-size: 12px; font-weight: 400; margin-left: 10px; }
.tg-app .tg-benefit-card { display: grid; grid-template-columns: 36px minmax(0, 1fr); align-content: start; column-gap: 12px; padding: 18px; margin-bottom: 0; }
.tg-benefit-card .tg-benefit-icon { grid-column: 1; grid-row: 1 / 3; width: 36px; height: 36px; font-size: 19px; margin: 0; }
.tg-app .tg-benefit-card h3 { grid-column: 2; font-size: 17px; margin: 0 0 6px; line-height: 1.4; }
.tg-app .tg-benefit-card > p { grid-column: 2; color: var(--tg-muted); margin: 0; font-size: 13px; }
.tg-benefit-details { grid-column: 1 / -1; margin-top: 10px; border-bottom: 0 !important; }
.tg-app .tg-benefit-details summary { font-size: 12px; color: var(--tg-accent); }
.tg-app .tg-benefit-details p { font-size: 13px; padding: 0 0 10px; margin: 0; }
.tg-faq-details > summary { color: var(--tg-muted); }
.tg-faq-details > details { margin-left: 16px; }
@media (max-width: 700px) {
  .tg-app .tg-hero { padding: 20px 16px; }
  .tg-app h1 { font-size: 27px; }
  .tg-app .tg-status { padding: 18px; }
  .tg-app .tg-hero > div > .tg-muted { font-size: 13px; }
  .tg-app .tg-hero .tg-actions { gap: 8px; }
}

.tg-copy-icon:disabled { opacity: .45; cursor: default; background: transparent; color: var(--tg-muted); border-color: var(--tg-line); }
