/* Talon Live — веб-версия. Цвета по ролям, как ThemeToken в приложении. */

:root, [data-theme="graphite"] {
  --background: #111312; --surface: #1A1D1B; --surface-raised: #232724; --badge: #2A2F2B; --stroke: #2E332F; --divider: #262A27;
  --text: #F1F4EF; --secondary: #A7AFA6; --tertiary: #818A80;
  --accent: #C6F432; --live: #C6F432; --live-bg: #2A3310; --live-dot: #C6F432;
  --radiant: #C6F432; --radiant-text: #D8FA6B; --dire: #A99BFF;
  color-scheme: dark;
}
[data-theme="dark"] {
  --background: #120C08; --surface: #1E1610; --surface-raised: #2A1F16; --badge: #33261B; --stroke: #3D2D20; --divider: #2E2219;
  --text: #FFF4EC; --secondary: #C9B3A3; --tertiary: #94806F;
  --accent: #FF7A1A; --live: #FF9A52; --live-bg: #3D1F0C; --live-dot: #FF6A1A;
  --radiant: #FF8A2B; --radiant-text: #FFA25C; --dire: #5B8DEF;
  color-scheme: dark;
}
[data-theme="light"] {
  --background: #FFF7F0; --surface: #FFFFFF; --surface-raised: #FFF1E6; --badge: #FCE6D4; --stroke: #F1D3BC; --divider: #F3E0D0;
  --text: #2A170B; --secondary: #6E5443; --tertiary: #8C7260;
  --accent: #C2410C; --live: #B83A0A; --live-bg: #FFE4D1; --live-dot: #E8590C;
  --radiant: #E8590C; --radiant-text: #C2410C; --dire: #3B6FD8;
  color-scheme: light;
}
[data-theme="orange"] {
  --background: #6E3419; --surface: #83411F; --surface-raised: #914A26; --badge: #9C552E; --stroke: #A3603A; --divider: #7C3B1C;
  --text: #FFF1E6; --secondary: #F5D7C2; --tertiary: #DDB092;
  --accent: #FFC28F; --live: #FFD6B5; --live-bg: #4E220D; --live-dot: #FF9F66;
  --radiant: #FFAD70; --radiant-text: #FFC28F; --dire: #A9C8FF;
  color-scheme: dark;
}
[data-theme="midnight"] {
  --background: #0B1020; --surface: #141B2E; --surface-raised: #1C2540; --badge: #222C48; --stroke: #26304D; --divider: #1E2742;
  --text: #F3F5FA; --secondary: #A9B3CC; --tertiary: #7F8AA8;
  --accent: #FF7A1A; --live: #FF9A52; --live-bg: #3A1E10; --live-dot: #FF6A1A;
  --radiant: #FF8A2B; --radiant-text: #FFA25C; --dire: #5EA8FF;
  color-scheme: dark;
}
[data-theme="sand"] {
  --background: #F6F0E6; --surface: #FFFDF8; --surface-raised: #EFE6D6; --badge: #EADFCB; --stroke: #E2D5BF; --divider: #EBE1D1;
  --text: #2B2118; --secondary: #6D5D4B; --tertiary: #7A6754;
  --accent: #A84A22; --live: #9A3615; --live-bg: #F7DCCB; --live-dot: #B4532A;
  --radiant: #B4532A; --radiant-text: #A84A22; --dire: #2F6B7A;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--background); color: var(--text);
  font: 15px/1.35 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select { font: inherit; color: var(--text); }
img { display: block; }
.icon { display: inline-flex; align-items: center; justify-content: center; flex: none; }
.icon svg { display: block; }
.mono, .score-big, .tile-value, .score { font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; }

/* Каркас: шапка сверху, вкладки снизу (на широком экране — слева). */
#shell { min-height: 100vh; padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
#header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--background) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid color-mix(in srgb, var(--divider) 60%, transparent); padding-top: env(safe-area-inset-top); }
.header-inner { max-width: 760px; margin: 0 auto; height: 52px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 12px; gap: 8px; }
.header-side { display: flex; align-items: center; gap: 4px; min-width: 0; }
.header-side.end { justify-content: flex-end; }
.header-title { font-size: 17px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 52vw; text-align: center; }
.icon-button { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; color: var(--text); }
.icon-button:hover { background: var(--surface); }
.icon-button.on { color: var(--accent); }
.icon-spacer { width: 40px; }
.talon-logo { display: flex; align-items: center; gap: 8px; color: var(--text); }
.talon-logo .talon-mark { color: var(--accent); }
.talon-logo span:last-child { font-size: 17px; font-weight: 900; font-style: italic; letter-spacing: 3px; }

#tabs { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; background: color-mix(in srgb, var(--background) 94%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--divider); padding-bottom: env(safe-area-inset-bottom); }
.tabs-inner { max-width: 760px; margin: 0 auto; display: flex; }
.tabs-brand, .tabs-app { display: none; }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 2px 6px; color: var(--secondary); font-size: 10px; font-weight: 600; min-width: 0; }
.tab.on { color: var(--accent); }
.tab-icon { position: relative; }
.tab-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tab-badge { position: absolute; top: -4px; right: -10px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--live-dot); color: var(--background); font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center; padding: 0 4px; }

@media (min-width: 960px) {
  #tabs { top: 0; right: auto; width: 232px; border-top: 0; border-right: 1px solid var(--divider); padding: 20px 12px; }
  .tabs-inner { flex-direction: column; gap: 4px; height: 100%; }
  .tabs-brand { display: flex; align-items: center; gap: 8px; padding: 6px 12px 22px; color: var(--accent); }
  .tabs-brand span:nth-child(2) { color: var(--text); font-size: 20px; font-weight: 900; font-style: italic; letter-spacing: 3px; }
  .brand-live { font-size: 11px; font-weight: 900; color: var(--background); background: var(--accent); padding: 2px 6px; border-radius: 5px; letter-spacing: 1px; }
  .tab { flex: none; flex-direction: row; gap: 12px; padding: 11px 12px; border-radius: 12px; font-size: 15px; font-weight: 700; color: var(--text); }
  .tab:hover { background: var(--surface); }
  .tab.on { background: var(--surface); color: var(--accent); }
  .tab .tab-badge { position: static; margin-left: auto; }
  .tab-icon { display: flex; gap: 10px; }
  .tabs-app { display: flex; margin-top: auto; align-items: center; gap: 8px; padding: 12px; color: var(--secondary); font-size: 13px; font-weight: 600; }
  #shell { margin-left: 232px; padding-bottom: 0; }
}

.page { max-width: 760px; margin: 0 auto; padding: 12px 20px 32px; display: flex; flex-direction: column; gap: 12px; }
.page.wide-gap { gap: 18px; }
@media (max-width: 380px) { .page { padding-left: 16px; padding-right: 16px; } }

/* Базовые блоки. */
.row { display: flex; align-items: center; min-width: 0; }
.col { display: flex; flex-direction: column; min-width: 0; }
.wrap { flex-wrap: wrap; }
.gap4 { gap: 4px; } .gap6 { gap: 6px; } .gap8 { gap: 8px; } .gap10 { gap: 10px; } .gap12 { gap: 12px; } .gap14 { gap: 14px; } .gap16 { gap: 16px; } .gap18 { gap: 18px; }
.grow { flex: 1 1 auto; min-width: 0; }
.basis0 { flex-basis: 0; }
.end { justify-content: flex-end; }
.center { justify-content: center; text-align: center; }
.min0 { min-width: 0; }
.spacer { flex: 1; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta { font-size: 12px; color: var(--secondary); }
.meta-small { font-size: 12px; color: var(--secondary); gap: 8px; }
.secondary { color: var(--secondary); } .tertiary { color: var(--tertiary); } .accent { color: var(--accent); } .live-text { color: var(--live); }
.small { font-size: 12px; } .tiny { font-size: 11px; }
.bold { font-weight: 700; } .heavy { font-weight: 800; }
.note { font-size: 12px; color: var(--tertiary); }
.hidden { display: none !important; }
.link-plain { display: block; color: inherit; }
.link-plain:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 12px; }

.card { background: var(--surface); border-radius: 16px; }
.card.bordered { box-shadow: inset 0 0 0 1px var(--stroke); }
.card.pad { padding: 16px; }
.card.pad14 { padding: 14px; }
.card.r18 { border-radius: 18px; }
.card.empty { padding: 20px; font-size: 14px; color: var(--secondary); }
.card.list { overflow: hidden; }
.card.raised { background: var(--surface-raised); }
.divider { height: 1px; background: var(--divider); }
.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-height: 48px; }
.list-row.tall { padding: 12px 16px; }
a.list-row:hover, button.list-row:hover, .link-plain:hover > .card, .link-plain:hover > .list-row { background: color-mix(in srgb, var(--surface) 70%, var(--surface-raised)); }
button.list-row { width: 100%; text-align: left; }
.chevron { color: var(--tertiary); }

.section-title { display: flex; align-items: center; gap: 8px; padding-top: 6px; font-size: 13px; font-weight: 700; letter-spacing: 1px; color: var(--secondary); }
.section-title.live { color: var(--text); }
.section-title .count { font-weight: 400; letter-spacing: 0; }
.section-title .spacer { flex: 1; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live-dot); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.list-header { font-size: 13px; color: var(--secondary); padding: 6px 4px 0; text-transform: uppercase; letter-spacing: .5px; display: flex; align-items: center; gap: 8px; }
.list-footer { font-size: 12px; color: var(--tertiary); padding: 0 4px; }

.live-badge { display: inline-block; font-size: 12px; font-weight: 700; color: var(--live); background: var(--live-bg); padding: 3px 8px; border-radius: 6px; text-align: center; white-space: pre-line; font-variant-numeric: tabular-nums; flex: none; }
.fb-tag { display: inline-flex; align-items: center; gap: 2px; font-size: 9px; font-weight: 900; color: var(--background); background: var(--live); padding: 1px 4px; border-radius: 4px; flex: none; }
.fb-tag.big { font-size: 11px; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 999px; }
.pill.accent { background: var(--accent); color: var(--background); }
.pill.badge { background: var(--badge); color: var(--secondary); }

.team-logo { display: inline-flex; align-items: center; justify-content: center; background: var(--badge); flex: none; overflow: hidden; }
.team-logo img { width: 100%; height: 100%; object-fit: contain; }
.team-initials { font-weight: 900; color: var(--text); }
.team-name { font-size: 15px; font-weight: 700; min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: normal; overflow-wrap: normal; hyphens: none; line-height: 1.2; }
@media (max-width: 420px) { .team-name { font-size: 14px; } .teams-row .team-name { font-size: 13.5px; } }
.team-name.single { white-space: nowrap; text-overflow: clip; display: block; }
.team-name.right { text-align: right; }
.team-name.centered { text-align: center; }
.avatar { display: inline-flex; align-items: center; justify-content: center; background: var(--badge); border-radius: 50%; overflow: hidden; flex: none; font-weight: 900; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.hero-img { display: inline-block; border-radius: 4px; overflow: hidden; background: var(--badge); flex: none; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; }
.hero-img.dimmed { filter: grayscale(1); opacity: .55; }
.hero-slot { display: inline-block; border-radius: 4px; border: 1px dashed var(--stroke); flex: none; }
.item-img { display: inline-block; width: 34px; height: 25px; border-radius: 3px; overflow: hidden; background: var(--badge); flex: none; }
.item-img img { width: 100%; height: 100%; object-fit: cover; }
.item-img.round { border-radius: 50%; width: 25px; margin-left: 4px; }
.game-icon { color: var(--accent); }

.chips { display: flex; gap: 8px; }
.scroll-x { overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px; }
.scroll-x::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--stroke); font-size: 14px; font-weight: 700; white-space: nowrap; flex: none; color: var(--text); }
.chip.on { background: var(--text); color: var(--background); box-shadow: none; }
.chip.on .game-icon { color: var(--background); }
.chip.accent-on.on { background: var(--accent); }
.chip.small { height: 34px; padding: 0 14px; font-size: 13px; }
.chip.fill { flex: 1; justify-content: center; }

.segmented { display: flex; background: var(--surface); border-radius: 10px; padding: 2px; gap: 2px; }
.segmented button { flex: 1; min-height: 32px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text); padding: 0 6px; }
.segmented button.on { background: var(--badge); box-shadow: 0 1px 3px rgba(0,0,0,.25); font-weight: 700; }

.search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--stroke); color: var(--tertiary); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 15px; }
.search button { color: var(--tertiary); }

.text-button { color: var(--accent); font-weight: 700; font-size: 14px; }
.big-button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; border-radius: 14px; font-weight: 700; font-size: 15px; width: 100%; background: var(--surface); box-shadow: inset 0 0 0 1px var(--stroke); color: var(--text); }
.big-button.on { color: var(--accent); }
.big-button.primary { background: var(--text); color: var(--background); box-shadow: none; font-weight: 800; min-height: 52px; }
.big-button.accent { background: var(--accent); color: var(--background); box-shadow: none; font-weight: 800; }
.big-button:disabled { background: var(--surface); color: var(--secondary); box-shadow: none; cursor: default; }
.track-bell { display: inline-flex; align-items: center; justify-content: center; color: var(--secondary); box-shadow: inset 0 0 0 1px var(--stroke); flex: none; }
.track-bell.on { color: var(--accent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 60%, transparent); }

.spinner-wrap { display: flex; align-items: center; justify-content: center; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--stroke); border-top-color: var(--secondary); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-banner { display: flex; align-items: flex-start; gap: 12px; padding: 16px; font-size: 14px; }

/* Лента матчей. */
.live-card { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.teams-row { color: var(--text); }
.score-big { font-size: 26px; font-weight: 700; white-space: nowrap; }
.upcoming-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; }
.upcoming-row .title { font-size: 15px; font-weight: 700; }
.time-col { width: 64px; display: flex; flex-direction: column; align-items: center; gap: 2px; flex: none; }
.time-col .time { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 16px; font-weight: 700; }
.time-col .day-tag { font-size: 10px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.time-col .period { font-size: 10px; font-weight: 700; color: var(--secondary); }
.time-col .game-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--secondary); white-space: nowrap; }
.result-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.result-line { display: flex; justify-content: space-between; gap: 8px; font-size: 15px; font-weight: 500; color: var(--secondary); }
.result-line.won { font-weight: 800; color: var(--text); }
.result-side { width: 72px; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 11px; color: var(--secondary); flex: none; }
.show-more { display: block; width: 100%; min-height: 40px; color: var(--accent); font-size: 14px; font-weight: 600; }

/* Календарь. */
.day-strip { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 2px 20px; scroll-behavior: smooth; }
.day-strip::-webkit-scrollbar { display: none; }
.day-cell { width: 52px; height: 60px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--stroke); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; flex: none; color: var(--text); }
.day-cell.future { color: var(--secondary); }
.day-cell.on { background: var(--text); color: var(--background); box-shadow: none; }
.day-cell .wd { font-size: 10px; font-weight: 600; max-width: 48px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.day-cell .dn { font-size: 17px; font-weight: 900; }
.day-cell .dot { width: 4px; height: 4px; border-radius: 50%; }
.day-cell .dot.today { background: var(--accent); }
.day-cell.on .dot.today { background: var(--background); }
.month-head { display: flex; align-items: center; justify-content: space-between; padding-top: 4px; font-size: 15px; font-weight: 700; }
.date-input { position: relative; }
.date-input input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* Экран матча. */
.match-header { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; }
.match-header .league { font-size: 13px; font-weight: 600; color: var(--secondary); text-align: center; }
.match-teams { display: flex; align-items: flex-start; gap: 8px; }
.team-col { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; text-align: center; border-radius: 14px; padding: 4px 2px; }
a.team-col:hover { background: var(--surface); }
.team-col .side { font-size: 11px; color: var(--secondary); }
.team-col .more { font-size: 11px; font-weight: 600; color: var(--accent); }
.team-col .team-name { text-align: center; }
.score-col { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-top: 8px; flex: none; }
.score-huge { font-size: 44px; font-weight: 700; line-height: 1; white-space: nowrap; }
.kill-score { display: flex; flex-direction: column; align-items: center; background: var(--surface); border-radius: 10px; padding: 4px 12px; }
.kill-score .nums { display: flex; align-items: center; gap: 6px; font-size: 24px; font-weight: 700; font-family: ui-monospace, "SF Mono", Menlo, monospace; white-space: nowrap; }
.kill-score .label { font-size: 10px; font-weight: 600; color: var(--secondary); }
.status-text { font-size: 13px; font-weight: 600; color: var(--secondary); text-align: center; }
.map-chips { display: flex; gap: 8px; }
.map-chips.scroll { overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px; }
.map-chip { flex: 1 1 0; min-width: 104px; height: 74px; border-radius: 12px; background: var(--surface); padding: 9px 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; color: var(--text); }
.map-chip.on { background: var(--accent); color: var(--background); }
.map-chip .label { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.map-chip .st { font-size: 12px; font-weight: 700; }
.map-chip .dim { opacity: .6; font-weight: 400; }
.map-chip .dur { font-size: 12px; font-weight: 600; font-family: ui-monospace, Menlo, monospace; opacity: .7; }
.game-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; width: 100%; text-align: left; }
.game-row .pos { width: 16px; font-size: 12px; color: var(--secondary); }
.game-row .name { font-size: 15px; font-weight: 600; }
.game-status { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 12px; font-weight: 600; color: var(--secondary); text-align: right; }
.game-status .main { font-size: 13px; font-weight: 700; color: var(--text); }
.game-status .live { color: var(--live); font-size: 13px; }
.game-status .row { gap: 4px; }
.rotate { transition: transform .2s; }
.rotate.open { transform: rotate(180deg); }
.stats-panel { padding: 12px; background: var(--surface-raised); border-radius: 14px; display: flex; flex-direction: column; gap: 14px; }
.stats-team-head { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .8px; }
.color-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.stats-table { background: var(--surface); border-radius: 10px; padding: 0 10px; }
.stats-table .tr { display: flex; align-items: center; gap: 6px; padding: 8px 0; }
.stats-table .tr + .tr { border-top: 1px solid var(--divider); }
.stats-table .th { font-size: 10px; font-weight: 700; color: var(--secondary); }
.stats-table .td { font-size: 12px; font-family: ui-monospace, Menlo, monospace; text-align: right; flex: none; white-space: nowrap; }
.stats-table .td.b { font-weight: 700; }

/* Live Dota 2. */
.live-section { display: flex; flex-direction: column; gap: 18px; }
.block-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.caps { font-size: 13px; font-weight: 700; letter-spacing: 1px; color: var(--secondary); text-transform: uppercase; }
.lead-value { font-size: 26px; font-weight: 700; font-family: ui-monospace, Menlo, monospace; }
.chart { position: relative; margin-right: 0; }
.chart-plot { position: absolute; left: 0; right: 0; top: 0; bottom: 20px; }
.chart-plot svg { display: block; width: 100%; height: 100%; }
.chart-svg .grid { stroke: var(--divider); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-svg .zero { stroke: var(--tertiary); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-svg .line { stroke: var(--text); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.chart-svg .line2 { stroke: var(--tertiary); stroke-width: 1; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.chart-y span { position: absolute; right: 0; transform: translateY(-50%); font-size: 10px; font-family: ui-monospace, Menlo, monospace; color: var(--secondary); }
.chart-y { position: absolute; inset: 0 0 20px 0; }
.chart-marks { position: absolute; inset: 0; pointer-events: none; }
.chart-mark { position: absolute; transform: translateX(-50%); min-width: 16px; height: 16px; border-radius: 8px; padding: 0 3px; box-sizing: border-box;
  font: 700 10px/16px ui-monospace, Menlo, monospace; color: #111312; text-align: center; pointer-events: auto; }
.chart-x { position: absolute; left: 0; right: 0; bottom: 0; height: 18px; }
.chart-x span { position: absolute; transform: translateX(-50%); font-size: 11px; font-family: ui-monospace, Menlo, monospace; color: var(--secondary); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--secondary); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.win-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; gap: 2px; }
.win-bar span { transition: width .4s; }
.mini-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini-tile { background: var(--surface-raised); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.mini-tile .t { font-size: 11px; color: var(--secondary); }
.mini-tile .v { font-size: clamp(11px, 3.1vw, 13px); font-weight: 700; font-family: ui-monospace, Menlo, monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.draft-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ban-row { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.buildings-layout { display: flex; gap: 16px; align-items: center; }
.buildings-layout > .grow { min-width: 0; }
.minimap { width: 184px; flex: none; aspect-ratio: 1; }
.minimap-svg { width: 100%; height: 100%; display: block; }
.minimap-svg .ground { fill: var(--surface-raised); }
.minimap-svg .river { stroke: var(--badge); stroke-width: 11; fill: none; }
.minimap-svg .base-r { fill: var(--base-r); opacity: 0.10; }
.minimap-svg .base-d { fill: var(--base-d); opacity: 0.10; }
.minimap-svg .lane { stroke: var(--stroke); stroke-width: 1.4; fill: none; }
@media (max-width: 520px) { .buildings-layout { flex-direction: column; align-items: stretch; } .minimap { width: 100%; max-width: 280px; align-self: center; } }
.lane-dots { display: flex; gap: 3px; align-items: center; }
.lane-dots .t { width: 9px; height: 9px; border-radius: 50%; }
.lane-dots .b { width: 8px; height: 12px; border-radius: 2px; }
.player-table .tr { display: flex; align-items: center; gap: 8px; padding: 9px 14px; }
.player-table .tr + .tr { border-top: 1px solid var(--divider); }
.player-table .th { font-size: 11px; font-weight: 700; color: var(--secondary); padding: 10px 14px; }
.player-table .kda { width: 80px; text-align: right; font-size: 13px; font-family: ui-monospace, Menlo, monospace; flex: none; }
.player-table .nw { width: 64px; text-align: right; font-size: 13px; font-weight: 700; font-family: ui-monospace, Menlo, monospace; flex: none; }
.pl-name { font-size: 14px; font-weight: 700; }
.pl-sub { font-size: 12px; color: var(--secondary); }
.pl-sub2 { font-size: 10.5px; color: var(--tertiary); font-family: ui-monospace, Menlo, monospace; white-space: normal !important; }
.unavailable { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--tertiary); font-size: 13px; font-weight: 500; padding: 4px 0; }

.fact-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; font-size: 14px; font-weight: 600; }
.fact-icon { width: 28px; height: 28px; border-radius: 8px; background: var(--badge); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.icon-box { width: 36px; height: 36px; border-radius: 10px; background: var(--badge); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.h2h-score { display: flex; flex-direction: column; align-items: center; }
.h2h-score .nums { font-size: 22px; font-weight: 700; font-family: ui-monospace, Menlo, monospace; }
.h2h-score .label { font-size: 10px; font-weight: 600; color: var(--tertiary); }
.pick-option { flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 8px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--stroke); font-size: 14px; font-weight: 700; min-width: 0; }
.pick-option.on { background: var(--accent); color: var(--background); box-shadow: none; }
.pick-option span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Турнирная сетка. */
.bracket-scroll { overflow-x: auto; margin: 0 -20px; padding: 0 20px 4px; }
.bracket { position: relative; }
.bracket svg.lines { position: absolute; inset: 0; pointer-events: none; }
.bracket svg.lines path { stroke: var(--stroke); stroke-width: 1.5; fill: none; }
.bracket .round-title { position: absolute; top: 0; font-size: 11px; font-weight: 700; letter-spacing: 1px; color: var(--secondary); text-transform: uppercase; }
.bracket-card { position: absolute; width: 200px; height: 76px; background: var(--surface); border-radius: 12px; box-shadow: inset 0 0 0 1px var(--stroke); display: flex; flex-direction: column; overflow: visible; }
.bracket-card.hl { box-shadow: inset 0 0 0 2px var(--accent); }
.bracket-card.live { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--live) 60%, transparent); }
.bracket-card .line { flex: 1; display: flex; align-items: center; gap: 8px; padding: 0 10px; font-size: 13px; font-weight: 500; min-width: 0; }
.bracket-card .line + .line { border-top: 1px solid var(--divider); }
.bracket-card .line.win { font-weight: 700; }
.bracket-card .line.lose { color: var(--secondary); }
.bracket-card .line.mine { color: var(--accent); font-weight: 700; }
.bracket-card .live-tag { position: absolute; top: -8px; right: 6px; font-size: 9px; font-weight: 900; color: var(--live); background: var(--live-bg); padding: 2px 5px; border-radius: 999px; }
.bracket-card.static { position: relative; width: auto; }
.standing { display: flex; align-items: center; gap: 8px; padding: 10px 14px; position: relative; }
.standing.adv::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.standing.mine { background: color-mix(in srgb, var(--live-bg) 60%, transparent); }
select.menu { appearance: none; -webkit-appearance: none; background: var(--surface); box-shadow: inset 0 0 0 1px var(--stroke); border: 0; border-radius: 12px; min-height: 46px; padding: 0 40px 0 14px; font-weight: 700; width: 100%; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--secondary) 50%), linear-gradient(135deg, var(--secondary) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
select.menu.plain { max-width: 62%; text-overflow: ellipsis; overflow: hidden; box-shadow: none; background-color: transparent; min-height: 36px; padding-left: 0; font-weight: 600; color: var(--accent); text-align: right; width: auto; }

/* ProAnalytics. */
.pro-category { display: flex; flex-direction: column; gap: 12px; padding-top: 18px; }
.pro-category-head { display: flex; align-items: center; gap: 12px; }
.pro-category-head h2 { margin: 0; font-size: 20px; font-weight: 900; }
.pro-category-icon { width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: var(--background); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.pro-category-rule { height: 2px; border-radius: 1px; background: color-mix(in srgb, var(--accent) 35%, transparent); }
.block-title { font-size: 12px; font-weight: 700; letter-spacing: .8px; color: var(--secondary); }
.tiles { display: flex; gap: 8px; align-items: stretch; }
.tile { flex: 1 1 0; min-width: 0; background: var(--surface); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.tile-title { font-size: 11px; color: var(--secondary); min-height: 28px; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tile-value { font-family: inherit; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-value.accent { color: var(--accent); }
.tile-sub { font-size: 11px; color: var(--tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
@media (max-width: 420px) { .tile { padding: 10px; } .tile-value { font-size: 16px; } }
.form-strip { display: flex; gap: 4px; flex-wrap: wrap; }
.form-strip span { width: 22px; height: 22px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 900; background: var(--badge); }
.form-strip span.w { background: var(--accent); color: var(--background); }
.rank { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 900; font-family: ui-monospace, Menlo, monospace; background: var(--badge); color: var(--secondary); flex: none; }
.rank.first { background: var(--accent); color: var(--background); }
.rank.first.anti { background: var(--live); }
.value-strong { font-size: 15px; font-weight: 800; font-family: ui-monospace, Menlo, monospace; white-space: nowrap; }
.hero-scroll { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px; }
.hero-card { width: 80px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.hero-card .n { font-size: 11px; font-weight: 600; height: 28px; overflow: hidden; line-height: 1.2; }
.hero-card .s { font-size: 10px; color: var(--secondary); font-family: ui-monospace, Menlo, monospace; }
.wl { width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 900; background: var(--badge); flex: none; }
.wl.w { background: var(--accent); color: var(--background); }
.compare-row { display: flex; align-items: center; padding: 10px 14px; gap: 8px; }
.compare-row .v { width: 80px; font-size: 15px; font-family: ui-monospace, Menlo, monospace; flex: none; }
.compare-row .v.right { text-align: right; }
.compare-row .v.best1 { color: var(--radiant); font-weight: 900; }
.compare-row .v.best2 { color: var(--dire); font-weight: 900; }
.compare-row .t { flex: 1; text-align: center; font-size: 12px; color: var(--secondary); }
.game-player { padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; }
.game-player.hl { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.stat5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.stat5 .t { font-size: 9px; font-weight: 600; color: var(--tertiary); }
.stat5 .v { font-size: 12px; font-weight: 700; font-family: ui-monospace, Menlo, monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.level-badge { position: absolute; right: 0; bottom: 0; font-size: 9px; font-weight: 900; color: #fff; background: rgba(0,0,0,.7); padding: 0 3px; border-radius: 3px; }
.coming-soon { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px 0; font-size: 20px; font-weight: 700; }

/* Настройки и формы. */
.settings-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 50px; width: 100%; text-align: left; }
.settings-row .icon:first-child { color: var(--accent); width: 24px; }
.settings-row .label { flex: 1; min-width: 0; }
.settings-row .sub { font-size: 13px; color: var(--secondary); }
.settings-row .sub.accent { color: var(--accent); }
.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 16px; background: var(--badge); transition: background .2s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 27px; height: 27px; left: 2px; top: 2px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.25); transition: transform .2s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::before { transform: translateX(20px); }
.swatch { display: flex; }
.swatch i { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--stroke); margin-left: -6px; display: block; }
.swatch i:first-child { margin-left: 0; }
.text-field { width: 100%; padding: 14px; border-radius: 12px; background: var(--surface); border: 0; outline: 0; font-size: 18px; font-weight: 600; box-shadow: inset 0 0 0 1px var(--stroke); }
.text-field:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.inline-field { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 15px; }
.profile-badge { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: var(--background); display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 900; flex: none; }
.stat-cell { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stat-cell .v { font-size: 20px; font-weight: 800; font-family: ui-monospace, Menlo, monospace; }
.stat-cell .t { font-size: 12px; color: var(--secondary); }
.onboarding-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
.team-chip { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 6px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--stroke); text-align: center; font-size: 13px; font-weight: 600; }
.team-chip.on { box-shadow: inset 0 0 0 2px var(--accent); }
.team-chip .chk { position: absolute; top: 6px; right: 6px; color: var(--accent); }
.team-chip .n { min-height: 32px; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sticky-footer { position: sticky; bottom: calc(64px + env(safe-area-inset-bottom)); padding: 12px 0; background: linear-gradient(transparent, var(--background) 30%); }
@media (min-width: 960px) { .sticky-footer { bottom: 0; } }
.hero-title { font-size: 28px; font-weight: 900; margin: 0; }
.lead { font-size: 15px; color: var(--secondary); margin: 0; }
.toast { position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--text); color: var(--background); padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 700; z-index: 50; box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.swipe-delete { color: var(--tertiary); padding: 8px; border-radius: 10px; }
.swipe-delete:hover { color: var(--live); background: var(--surface-raised); }

/* Окно поверх экрана (никнейм). */
.sheet-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
.sheet { width: 100%; max-width: 520px; background: var(--background); border-radius: 20px 20px 0 0; padding: 20px 20px calc(24px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgba(0,0,0,.4); animation: rise .25s ease-out; }
@media (min-width: 600px) { .sheet-overlay { align-items: center; } .sheet { border-radius: 20px; } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(30px); opacity: 0; } }
