@font-face {
    font-family: 'FoundryGridnikW03-VCT';
    src: url('/FoundryGridnikW03-VCT.ttf?v=20261124-uk') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --surface-0: #000000;
    --surface-1: #0f0f0f;
    --surface-2: #1c1c1c;
    --border: #303030;
    --border-strong: #404040;
    --text: #ffffff;
    --muted: #a3a3a3;
    --subtle: #737373;
    --accent: #ff4757;
    --win: #2ed47a;
    --tone-open: #303030;
    --tone-qualifier: #2f4c42;
    --tone-global: #6305a0;
    --tone-champions: #c5b174;
    --radius: 8px;
    --radius-small: 4px;
    --top-height: 60px;
    --nav-height: 60px;
}

[hidden] {
    display: none !important;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    -webkit-text-size-adjust: 100%;
    touch-action: pan-x pan-y;
}

body {
    margin: 0;
    background: var(--surface-0);
    color: var(--text);
    font-family: 'FoundryGridnikW03-VCT', Arial, sans-serif;
    letter-spacing: 0.3px;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

h2, h3, p {
    margin: 0;
}

/* Шапка и нижнее меню */

.top-bar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: var(--top-height);
    padding: 8px 8px 8px 16px;
    background: var(--surface-0);
    border-bottom: 1px solid var(--border);
}

.icon-button {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: var(--radius);
    background: none;
    color: var(--text);
    cursor: pointer;
}

.icon-button[hidden] {
    display: none;
}

.icon-button:active {
    background: var(--surface-2);
}

#back-link {
    margin-left: -10px;
}

.back-icon {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

.top-bar-text {
    flex: 1;
    min-width: 0;
}

.top-bar h1 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.25;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.top-bar p {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.78rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--surface-1);
    border-top: 1px solid var(--border);
}

.bottom-nav[hidden] {
    display: none;
}

.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: var(--nav-height);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 500;
}

.bottom-nav a.active {
    color: var(--text);
}

#app {
    max-width: 680px;
    margin: 0 auto;
    padding: 16px 16px calc(var(--nav-height) + env(safe-area-inset-bottom) + 24px);
}

body.no-nav #app {
    padding-bottom: calc(env(safe-area-inset-bottom) + 24px);
}

.toast {
    position: fixed;
    left: 50%;
    bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 16px);
    z-index: 30;
    width: max-content;
    max-width: calc(100% - 32px);
    padding: 10px 14px;
    transform: translateX(-50%);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface-2);
    font-size: 0.88rem;
}

.toast[hidden] {
    display: none;
}

/* Общие элементы */

.section-heading {
    margin: 16px 0 8px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.section-heading:first-child {
    margin-top: 0;
}

.card-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding: 10px 12px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

a.card:active {
    background: var(--surface-2);
}

.card-body {
    flex: 1;
    min-width: 0;
}

.card-title {
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.card-meta {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.3;
}

.chevron {
    flex: none;
    color: var(--subtle);
}

.logo {
    flex: none;
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.logo-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-small);
    background: var(--surface-2);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
}

.badge {
    flex: none;
    padding: 4px 8px;
    border-radius: var(--radius-small);
    background: rgba(255, 255, 255, 0.1);
    color: #d4d4d4;
    font-size: 0.68rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-live {
    background: var(--accent);
    color: #fff;
}

.badge-active {
    color: var(--win);
}

.chips {
    display: flex;
    gap: 6px;
    margin: 0 -16px 12px;
    padding: 0 16px;
    overflow-x: auto;
    scrollbar-width: none;
}

.chips::-webkit-scrollbar {
    display: none;
}

.chip {
    flex: none;
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    background: var(--surface-1);
    color: var(--muted);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
}

.chip.active {
    border-color: var(--text);
    background: var(--text);
    color: #000;
}

.tabs {
    position: sticky;
    top: var(--top-height);
    z-index: 10;
    display: flex;
    gap: 6px;
    margin: 0 -16px 16px;
    padding: 0 16px;
    background: var(--surface-0);
    border-bottom: 1px solid var(--border);
}

.tabs-top {
    margin-top: -16px;
}

.tab {
    flex: 0 0 auto;
    min-height: 46px;
    padding: 0 12px;
    border: 0;
    border-bottom: 3px solid transparent;
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.tab.active {
    border-bottom-color: var(--accent);
    color: var(--text);
}

.state-message {
    padding: 40px 16px;
    color: var(--muted);
    text-align: center;
    line-height: 1.4;
}

.state-message button,
.load-more {
    display: block;
    width: 100%;
    min-height: 44px;
    margin-top: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    color: var(--text);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
}

.note {
    padding: 12px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.4;
}

.outline-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 6px 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-small);
    background: rgba(0, 0, 0, 0.5);
    font-size: 0.82rem;
    font-weight: 600;
}

/* Шапка страницы мероприятий */

.page-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 10px;
    min-height: 150px;
    margin: -16px -16px 0;
    padding: 16px;
    background: var(--surface-1) url('/images/vct27/events-header.jpg') center / cover no-repeat;
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.9));
}

.page-hero > * {
    position: relative;
}

.page-hero h2 {
    font-size: 1.7rem;
    font-weight: 700;
}

.page-hero.is-season {
    background-image: url('/images/vct27/season-stage-bg.png');
}

/* Карточка мероприятия */

.event-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 150px;
    padding: 12px;
    overflow: hidden;
    background: var(--surface-0);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    isolation: isolate;
    color: var(--text);
}

.event-card .event-background {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

.event-card .event-background::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--val-card-background, var(--accent));
    opacity: 0.75;
}

.event-card .event-background::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.84) 68%, #000 100%);
}

.event-mark {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    width: 220px;
    height: 220px;
    transform: translate(-50%, -50%);
    opacity: 0.3;
    mix-blend-mode: overlay;
}

a.event-card:active {
    border-color: var(--border-strong);
}

.tone-open { --val-card-background: var(--tone-open); }
.tone-qualifier { --val-card-background: var(--tone-qualifier); }
.tone-global { --val-card-background: var(--tone-global); }
.tone-champions { --val-card-background: var(--tone-champions); }
.tone-territorial { --val-card-background: var(--league-color, var(--accent)); }

.event-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.event-side {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.event-date {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border: 1px solid #fff;
    border-radius: 100px;
    background: rgba(0, 0, 0, 0.75);
    font-size: 0.72rem;
    font-weight: 600;
}

.event-date svg {
    width: 12px;
    height: 12px;
}

.event-go {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 100px;
    background: #000;
    color: #fff;
}

a.event-card:active .event-go {
    background: #fff;
    color: #000;
}

.event-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
}

.event-title-row .logo,
.event-title-row .logo-fallback {
    width: 60px;
    height: 60px;
}

.event-title {
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.event-sub {
    margin-top: 4px;
    color: #d4d4d4;
    font-size: 0.8rem;
    line-height: 1.3;
}

.event-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.event-tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 8px;
    border-radius: var(--radius-small);
    background: rgba(255, 255, 255, 0.1);
    color: #a3a3a3;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    backdrop-filter: blur(3px);
}

.event-tag.is-solid {
    background: rgba(255, 255, 255, 0.4);
    color: #000;
    text-transform: none;
}

.event-tag svg {
    width: 14px;
    height: 14px;
}

.registration-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    align-self: flex-start;
    margin-top: 8px;
    padding: 3px 9px;
    border: 1px solid var(--border-strong);
    border-radius: 100px;
    background: rgba(0, 0, 0, 0.6);
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
}

.registration-pill svg {
    width: 12px;
    height: 12px;
}

.registration-pill.is-open {
    border-color: #fff;
    background: #fff;
    color: #000;
}

.tournament-hero {
    margin-bottom: 16px;
    min-height: 170px;
}

/* Аккордеон территории */

.territory {
    background: var(--surface-1);
    border-radius: var(--radius);
}

.territory-head {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 56px;
    padding: 12px 14px;
    border: 0;
    background: none;
    color: var(--text);
    font: inherit;
    font-size: 0.98rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.territory-head .logo,
.territory-head .logo-fallback {
    width: 30px;
    height: 30px;
}

.territory-head span {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

.territory-head svg {
    flex: none;
    transition: transform 0.2s ease;
}

.territory.is-open .territory-head svg {
    transform: rotate(180deg);
}

.territory-body {
    display: none;
    flex-direction: column;
    gap: 12px;
    padding: 0 12px 12px;
}

.territory.is-open .territory-body {
    display: flex;
}

/* Схема пути */

.path {
    margin-bottom: 16px;
    padding: 14px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.path-eyebrow {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
}

.path-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    font-size: 1.05rem;
    font-weight: 700;
}

.path-title .logo,
.path-title .logo-fallback {
    width: 26px;
    height: 26px;
    font-size: 0.5rem;
}

.path-level {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.path-node {
    display: block;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    background: var(--surface-0);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
}

.path-node.tone-qualifier {
    background: linear-gradient(120deg, rgba(47, 76, 66, 0.3), rgba(47, 76, 66, 0.6));
}

.path-node.tone-territorial {
    background: linear-gradient(120deg,
        color-mix(in srgb, var(--league-color, #dc3030) 24%, transparent),
        color-mix(in srgb, var(--league-color, #dc3030) 48%, transparent));
}

.path-node small {
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 0.65rem;
    text-transform: uppercase;
}

.path-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 0;
    color: var(--muted);
    font-size: 0.68rem;
}

.path-arrow b {
    padding: 2px 8px;
    border-radius: 100px;
    background: #fff;
    color: #000;
    font-weight: 700;
    text-transform: uppercase;
}

/* Матчи */

.match-card {
    display: block;
    padding: 10px 12px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.match-card:active {
    background: var(--surface-2);
}

.match-card.is-live {
    border-color: var(--accent);
}

.match-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 34px;
}

.match-row .logo,
.match-row .logo-fallback {
    width: 26px;
    height: 26px;
    font-size: 0.55rem;
}

.match-team-name {
    flex: 1;
    min-width: 0;
    font-size: 0.93rem;
    font-weight: 500;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.match-score {
    flex: none;
    min-width: 18px;
    font-size: 1rem;
    font-weight: 700;
    text-align: right;
}

.match-percent {
    flex: none;
    color: var(--muted);
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
}

.match-row.is-winner .match-team-name,
.match-row.is-winner .match-score {
    color: var(--win);
}

.match-row.is-loser .match-team-name,
.match-row.is-loser .match-score {
    color: var(--muted);
}

.match-row.is-tbd .match-team-name {
    color: var(--subtle);
}

.match-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.76rem;
}

.match-foot span:first-child {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.match-versus {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    padding: 20px 12px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
}

.versus-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: 0.92rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.versus-team .logo,
.versus-team .logo-fallback {
    width: 60px;
    height: 60px;
}

.versus-score {
    font-size: 1.8rem;
    font-weight: 700;
    white-space: nowrap;
}

.info-list {
    margin-top: 12px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 46px;
    padding: 10px 12px;
    font-size: 0.9rem;
}

.info-row + .info-row {
    border-top: 1px solid var(--border);
}

.info-row span:first-child {
    flex: none;
    color: var(--muted);
}

.info-row span:last-child,
.info-row a {
    text-align: right;
    overflow-wrap: anywhere;
}

.info-row a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Предикты */

.market {
    margin-top: 12px;
    padding: 12px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.market-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.95rem;
    font-weight: 600;
}

.market-title span {
    flex: none;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 500;
}

.market-bar {
    display: flex;
    height: 6px;
    margin-bottom: 10px;
    overflow: hidden;
    border-radius: 2px;
    background: var(--surface-2);
}

.market-bar i {
    display: block;
    background: var(--win);
}

.market-bar i + i {
    background: var(--accent);
}

.market-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.market-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
    min-height: 76px;
    padding: 10px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    background: var(--surface-0);
    color: var(--text);
    font: inherit;
    cursor: pointer;
}

.market-choice-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 30px;
    height: 30px;
}

.market-choice-icon svg {
    width: 27px;
    height: 27px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.market-choice-icon.is-check {
    color: var(--win);
}

.market-choice-icon.is-cross {
    color: var(--accent);
}

.market-option.is-picked .market-choice-icon,
.market-option.is-mine-won .market-choice-icon,
.market-option.is-mine-lost .market-choice-icon {
    filter: saturate(1.15) brightness(1.08);
}

.market-option:disabled,
.market-row:disabled {
    cursor: default;
}

.market-option.is-picked,
.market-row.is-picked {
    border-color: #fff;
}

.market-option.is-won,
.market-row.is-won {
    border-color: var(--win);
}

.market-name {
    max-width: 100%;
    font-size: 0.85rem;
    font-weight: 500;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.market-percent {
    font-size: 1.3rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.market-odds {
    color: var(--muted);
    font-size: 0.75rem;
}

.market-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.market-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 46px;
    padding: 6px 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    background: var(--surface-0);
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.market-row-fill {
    position: absolute;
    inset: 0 auto 0 0;
    background: rgba(255, 255, 255, 0.08);
}

.market-row > :not(.market-row-fill) {
    position: relative;
}

.market-row .logo,
.market-row .logo-fallback {
    width: 26px;
    height: 26px;
    font-size: 0.55rem;
}

.market-row .market-name {
    flex: 1;
    min-width: 0;
    font-size: 0.9rem;
}

.market-row .market-percent {
    font-size: 0.95rem;
}

.market-status {
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.35;
}

.market-status.is-error {
    color: #ff6b6b;
}

.market-status.is-good {
    color: var(--win);
}

/* Обзор турнира */

.result-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(197, 177, 116, 0.14);
    border: 1px solid var(--tone-champions);
    border-radius: var(--radius);
}

.result-card small {
    display: block;
    margin-bottom: 3px;
    color: var(--tone-champions);
    font-size: 0.72rem;
    font-weight: 600;
}

.reward {
    display: block;
    padding: 12px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.92rem;
    line-height: 1.4;
}

.reward a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.button-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin-top: 8px;
    border-radius: var(--radius);
    background: #fff;
    color: #000;
    font-size: 0.92rem;
    font-weight: 600;
}

.button-card {
    width: 100%;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

/* Таблица группы */

.standings {
    width: 100%;
    margin-bottom: 16px;
    border-collapse: collapse;
    background: var(--surface-1);
    border-radius: var(--radius);
    overflow: hidden;
    font-size: 0.9rem;
}

.standings th {
    padding: 8px;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
}

.standings td {
    padding: 8px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.standings th:nth-child(2),
.standings td:nth-child(2) {
    width: 100%;
    text-align: left;
}

.standings-team {
    display: flex;
    align-items: center;
    gap: 8px;
}

.standings-team .logo,
.standings-team .logo-fallback {
    width: 24px;
    height: 24px;
    font-size: 0.5rem;
}

/* Поиск */

.search {
    width: 100%;
    min-height: 44px;
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-1);
    color: var(--text);
    font: inherit;
    font-size: 16px;
    outline: none;
}

.search:focus {
    border-color: var(--subtle);
}

/* Строка мероприятия */

.row-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.event-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 68px;
    padding: 10px 12px;
    overflow: hidden;
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--val-card-background, #303030) 38%, transparent), transparent 70%),
        var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.event-row:active {
    border-color: var(--border-strong);
}

.event-row-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 44px;
    height: 44px;
}

.event-row-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.event-row-icon .logo-fallback {
    width: 44px;
    height: 44px;
}

.event-row-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.event-row-title {
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.event-row-meta {
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.3;
}

.badge-register {
    background: #fff;
    color: #000;
}

.season-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    margin-top: 24px;
    padding: 0 12px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 500;
}

.territory-body .row-list,
.territory-body {
    gap: 8px;
}

.territory {
    border: 1px solid var(--border);
}

/* Выбранные предикты */

.pick-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 10px 0;
}

.pick-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid #fff;
    border-radius: var(--radius-small);
}

.pick-info {
    min-width: 0;
}

.pick-name {
    font-size: 0.9rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.pick-line {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.78rem;
}

.pick-changed {
    color: #e5ae15;
}

.pick-cancel {
    flex: none;
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-small);
    background: none;
    color: var(--text);
    font: inherit;
    font-size: 0.8rem;
    cursor: pointer;
}

.market .market-status {
    margin: 0 0 10px;
}

.market-pair + .market-status,
.pick-list + .market-status {
    margin: 10px 0 0;
}

.market-option:disabled:not(.is-picked):not(.is-won),
.market-row:disabled:not(.is-picked):not(.is-won) {
    opacity: 0.7;
}

.event-row-icon img.is-mark {
    width: 34px;
    height: 34px;
    opacity: 0.28;
}

/* Ссылки внизу главной */

.page-links {
    margin-top: 24px;
    border-top: 1px solid var(--border);
}

.page-links .season-link {
    margin-top: 0;
    border-top: 0;
    border-bottom: 1px solid var(--border);
}

.market-share {
    flex: none;
    min-height: 30px;
    padding: 0 8px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-small);
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 0.75rem;
    cursor: pointer;
}

#tournament-market {
    scroll-margin-top: calc(var(--top-height) + 56px);
}

.past-toggle {
    width: 100%;
    min-height: 42px;
    margin-bottom: 12px;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}

/* Страница сезона */

.season-hero {
    position: relative;
    margin: -16px -16px 0;
    padding: 40px 16px 28px;
    overflow: hidden;
    background: #000 url('/images/vct27/season-stage-bg.png') center top / cover no-repeat;
    text-align: center;
    isolation: isolate;
}

.season-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.84) 55%, #000);
}

.season-hero-title {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #c5b174;
    font-family: 'FoundryGridnikW03-VCT', Arial, sans-serif;
    text-transform: uppercase;
}

.season-hero-title span {
    font-size: 2rem;
}

.season-hero-title strong {
    font-size: clamp(3rem, 18vw, 4.6rem);
    font-weight: normal;
    line-height: 1;
}

.season-hero p {
    max-width: 480px;
    margin: 18px auto 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
}

.season-intro {
    margin: 0 0 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-strong);
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.45;
    text-align: center;
}

.season-stage {
    display: flex;
    flex-direction: column;
    margin-bottom: 32px;
}

.season-stage-title {
    position: relative;
    margin-bottom: 16px;
    padding: 4px;
    border-radius: var(--radius-small);
    background: rgba(255, 255, 255, 0.75);
    color: #000;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-align: center;
    text-transform: uppercase;
}

.season-stage-title::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    width: 2px;
    height: 16px;
    transform: translateX(-50%);
    background: var(--border-strong);
}

.season-node {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 116px;
    padding: 8px;
    overflow: hidden;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface-1);
    color: var(--text);
    isolation: isolate;
}

.season-node::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: url('/images/vct27/vct-outline.png') center top / auto 150% no-repeat;
    opacity: 0.06;
}

a.season-node:active {
    border-color: #fff;
}

.season-node .event-date {
    align-self: flex-start;
}

.season-node-status {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 100px;
    background: rgba(0, 0, 0, 0.5);
    color: var(--muted);
}

.season-node-status .badge {
    position: absolute;
    right: 0;
}

.season-node-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 8px 10px;
    text-align: center;
}

.season-node-body h3 {
    font-size: 1.05rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.season-node-body p {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.season-logos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 4px 8px 8px;
}

.season-logos span {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    border-radius: var(--radius-small);
    background: rgba(255, 255, 255, 0.05);
}

.season-logos .logo,
.season-logos .logo-fallback {
    width: 28px;
    height: 28px;
    font-size: 0.5rem;
}

.season-node.is-global {
    min-height: 300px;
    border-color: #8a5cf6;
    background: linear-gradient(180deg, #2a1a52 0%, #150d2a 45%, #09060f 100%);
}

.season-node.is-champions {
    min-height: 300px;
    border-color: #c5b174;
    background: linear-gradient(180deg, #4a3f22 0%, #1f1a0e 50%, #0a0805 100%);
}

.season-node.is-global::before,
.season-node.is-champions::before {
    opacity: 0.12;
}

.season-connector {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 4px 0 12px;
}

.season-connector::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 8px;
    left: 50%;
    width: 2px;
    transform: translateX(-50%);
    background: var(--border-strong);
}

.season-connector::after {
    content: "";
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 0;
    border-top: 7px solid var(--border-strong);
    border-right: 5px solid transparent;
    border-left: 5px solid transparent;
    transform: translateX(-50%);
}

.season-connector span {
    position: relative;
    z-index: 1;
    padding: 3px 8px;
    border-radius: 100px;
    background: #2a2a2a;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
}

.season-goal {
    padding: 24px 16px;
    border: 1px solid #c5b174;
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(197, 177, 116, 0.12), rgba(0, 0, 0, 0));
    text-align: center;
}

.season-goal-title {
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: #c5b174;
    font-family: 'FoundryGridnikW03-VCT', Arial, sans-serif;
    text-transform: uppercase;
}

.season-goal-title span {
    font-size: 1.4rem;
}

.season-goal-title strong {
    font-size: clamp(2rem, 12vw, 3rem);
    font-weight: normal;
    line-height: 1.1;
}

.season-goal p {
    max-width: 480px;
    margin: 14px auto 20px;
    font-size: 0.92rem;
    line-height: 1.45;
}

.season-goal h3 {
    padding: 8px;
    border-top: 1px solid #c5b174;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
}

.season-goal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 16px;
    border-top: 1px solid #c5b174;
    border-bottom: 1px solid #c5b174;
}

.season-goal-grid > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 12px 8px;
}

.season-goal-grid > div + div {
    border-left: 1px solid #c5b174;
}

.season-goal-grid b {
    color: #c5b174;
    font-size: 0.85rem;
}

.season-goal-grid span {
    margin-top: auto;
    padding: 4px 8px;
    border-radius: 100px;
    background: #c5b174;
    color: #000;
    font-size: 0.68rem;
    font-weight: 600;
}

.season-goal-prize {
    color: #c5b174;
    font-size: 1.1rem;
    font-weight: 700;
}

/* Фильтры */

.filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
}

.filter-select {
    width: 100%;
    min-height: 42px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-1);
    color: var(--text);
    font: inherit;
    font-size: 0.85rem;
}

.list-count {
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 0.78rem;
}

/* Профиль */

.profile-head {
    margin-bottom: 16px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-1);
}

.profile-name {
    margin-bottom: 12px;
    font-size: 1.1rem;
    font-weight: 700;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.profile-stats div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 8px;
    border-radius: var(--radius-small);
    background: var(--surface-2);
    text-align: center;
}

.profile-stats b {
    font-size: 1.15rem;
}

.profile-stats span {
    color: var(--muted);
    font-size: 0.72rem;
}

.profile-state {
    flex: none;
    max-width: 96px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    text-align: right;
}

.profile-pick.is-won {
    border-color: var(--win);
}

.profile-pick.is-won .profile-state {
    color: var(--win);
}

.profile-pick.is-lost .profile-state {
    color: #ff6b6b;
}

/* Упрощённый вид */

.event-row {
    min-height: 60px;
    padding: 8px 12px;
}

.tournament-hero {
    min-height: 120px;
}

.tournament-hero .logo,
.tournament-hero .logo-fallback {
    width: 44px;
    height: 44px;
}

.reward {
    margin-bottom: 12px;
    color: #d4d4d4;
    font-size: 0.88rem;
}

.result-card {
    margin-bottom: 12px;
}

.market {
    margin-top: 0;
}

#match-market .market {
    margin-top: 12px;
}

.market-title {
    align-items: center;
}

.market-title > div:first-child {
    flex: 1;
}

.market-share {
    width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    border: 0;
}

.market-bar-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.75rem;
}

.market-option {
    min-height: 64px;
}

.market-percent {
    font-size: 1.1rem;
}

.pick-line {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 500;
}

.pick-changed {
    margin-top: 2px;
    color: #e5ae15;
}

.match-line {
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.82rem;
    text-align: center;
}

.past-toggle {
    margin: 12px 0;
    border-style: solid;
}

.profile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.profile-name {
    margin-bottom: 0;
}

.profile-points {
    font-size: 1.3rem;
    font-weight: 700;
}

.profile-points span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 500;
}

.profile-state {
    font-size: 0.95rem;
    font-weight: 700;
}

/* Шрифт и цвета */

.card-title,
.event-row-title,
.match-team-name,
.market-name,
.pick-name,
.person-handle,
.tab,
.chip,
.top-bar h1 {
    font-weight: 700;
}

.market-bar i {
    background: var(--win);
}

.market-bar i + i {
    background: var(--accent);
}

.match-row.is-loser .match-team-name,
.match-row.is-loser .match-score {
    color: #8a8a8a;
}

.market-status.is-error,
.profile-pick.is-lost .profile-state {
    color: #ff7b86;
}

/* Карточка матча: время справа */

.match-card {
    padding: 8px 12px;
}

.match-label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.72rem;
    white-space: nowrap;
}

.match-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.match-teams {
    flex: 1;
    min-width: 0;
}

.match-row {
    min-height: 30px;
}

.match-when {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    flex: none;
    min-width: 66px;
    padding-left: 12px;
    border-left: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.75rem;
    text-align: right;
}

.match-when b {
    color: var(--text);
    font-size: 0.78rem;
}

/* Иконка турнира в тексте */

.inline-event {
    display: inline;
    white-space: normal;
    font-weight: 700;
}

.inline-event .logo,
.inline-event .logo-fallback {
    display: inline-block;
    width: 18px;
    height: 18px;
    margin: 0 4px 0 2px;
    vertical-align: -4px;
}

.inline-event .logo-fallback {
    display: none;
}

/* Формат и время матча */

.match-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
}

.meta-chip {
    padding: 5px 10px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-small);
    color: var(--muted);
    font-size: 0.75rem;
}

.meta-chip.is-main {
    border-color: #fff;
    color: #fff;
    font-weight: 700;
}

/* Страница команды */

.team-logo {
    display: flex;
    justify-content: center;
    padding: 8px 0 4px;
}

.team-logo .logo,
.team-logo .logo-fallback {
    width: 112px;
    height: 112px;
    font-size: 1.2rem;
}

.people-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.person {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding-bottom: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-1);
    text-align: center;
}

.person-photo {
    position: relative;
    aspect-ratio: 1;
    margin-bottom: 6px;
    background: linear-gradient(180deg, #242424, #111);
}

.person-photo .logo,
.person-photo .logo-fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    background: none;
    object-fit: cover;
    object-position: top;
    font-size: 1.3rem;
}

.person-handle {
    padding: 0 4px;
    font-size: 0.85rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.person-name {
    padding: 2px 4px 0;
    color: var(--muted);
    font-size: 0.68rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Профиль */

.profile-user {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.profile-avatar,
.profile-user .logo-fallback {
    width: 44px;
    height: 44px;
    border-radius: 100px;
    object-fit: cover;
}

.pick-edit {
    flex: none;
    padding: 6px 10px;
    border: 1px solid #fff;
    border-radius: var(--radius-small);
    font-size: 0.75rem;
    font-weight: 700;
}

#winner-market {
    margin-top: 12px;
    scroll-margin-top: calc(var(--top-height) + 56px);
}

/* Банк очков, плейсхолдер и профиль */

.market-row .market-percent,
.market-option .market-percent {
    color: var(--win);
}

.person-photo {
    overflow: hidden;
}

.person-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.team-logo {
    padding: 0;
}

.team-logo .logo,
.team-logo .logo-fallback {
    width: 88px;
    height: 88px;
}

.team-logo + .section-heading {
    margin-top: 10px;
}

.profile-head {
    background: linear-gradient(120deg, #1c1c1c, #0f0f0f);
}

.profile-avatar,
.profile-user .logo-fallback {
    width: 52px;
    height: 52px;
    border-radius: 10px;
}

.pick-logos {
    position: relative;
    flex: none;
    width: 44px;
    height: 44px;
}

.pick-logos > .logo,
.pick-logos > .logo-fallback {
    width: 40px;
    height: 40px;
}

.pick-opponent {
    position: absolute;
    right: -4px;
    bottom: -4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    background: #000;
}

.pick-opponent .logo,
.pick-opponent .logo-fallback {
    width: 18px;
    height: 18px;
    font-size: 0.4rem;
}

.pick-choice {
    position: absolute;
    right: -2px;
    bottom: -2px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: 2px solid var(--surface-1);
    border-radius: 50%;
    background: #0d0d0d;
}

.pick-choice .market-choice-icon {
    width: 16px;
    height: 16px;
}

.pick-choice .market-choice-icon svg {
    width: 15px;
    height: 15px;
    stroke-width: 2.8;
}

.profile-pick.is-special .pick-logos > .logo {
    border-radius: 10px;
    object-fit: cover;
    object-position: top center;
}

/* Выбор стороны */

.market-payouts {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    color: var(--win);
    font-size: 1rem;
    font-weight: 700;
}

.market-payouts em {
    color: var(--muted);
    font-size: 0.7rem;
    font-style: normal;
    font-weight: 400;
}

.market-cancel {
    display: block;
    width: 100%;
    min-height: 34px;
    margin-top: 8px;
    border: 0;
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 0.78rem;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.market-option .market-percent {
    color: var(--text);
}

.market-option:disabled:not(.is-picked):not(.is-won),
.market-row:disabled:not(.is-picked):not(.is-won) {
    opacity: 1;
}

/* Всплывающее подтверждение */

.confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.7);
}

.confirm-box {
    width: 100%;
    max-width: 320px;
    padding: 18px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface-2);
    text-align: center;
}

.confirm-box p {
    margin-bottom: 16px;
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.confirm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.confirm-actions button {
    min-height: 44px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-small);
    background: none;
    color: var(--text);
    font: inherit;
    cursor: pointer;
}

.confirm-actions .is-primary {
    border-color: #fff;
    background: #fff;
    color: #000;
    font-weight: 700;
}

.confirm-actions.is-column {
    grid-template-columns: 1fr;
}

/* Проценты и очки в списке команд */

.market-row .market-percent {
    min-width: 42px;
    color: var(--text);
    text-align: right;
}

.market-points {
    color: var(--win);
    font-size: 0.8rem;
    font-weight: 700;
}

/* Значок соперника */

.pick-logos {
    width: 48px;
    height: 48px;
}

.pick-logos > .logo,
.pick-logos > .logo-fallback {
    width: 44px;
    height: 44px;
}

.pick-opponent {
    right: -2px;
    bottom: -2px;
    width: 22px;
    height: 22px;
    border: 2px solid var(--surface-1);
    border-radius: 50%;
    background: var(--surface-2);
}

.pick-opponent .logo,
.pick-opponent .logo-fallback {
    width: 14px;
    height: 14px;
    font-size: 0.35rem;
}

/* Иконка в шапке */

.page-icon {
    flex: none;
    width: 34px;
    height: 34px;
    margin-right: 4px;
    object-fit: contain;
}

/* Выбранная команда */

.market-option.is-picked,
.market-row.is-picked {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.market-option.is-won,
.market-row.is-won {
    border-color: var(--win);
    background: rgba(46, 212, 122, 0.12);
}

/* Полоса процентов */

.market-bar {
    gap: 3px;
    height: 10px;
    margin-bottom: 12px;
    overflow: visible;
    background: none;
    border-radius: 0;
}

.market-bar i {
    min-width: 6px;
    border-radius: 100px;
    background: linear-gradient(90deg, #17a65b, #3ee08c);
    box-shadow: 0 0 10px rgba(46, 212, 122, 0.35);
}

.market-bar i + i {
    background: linear-gradient(90deg, #ff6f7d, #e6324a);
    box-shadow: 0 0 10px rgba(255, 71, 87, 0.35);
}

/* Дата матча */

.versus-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 92px;
}

.versus-time {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.1;
}

.versus-date {
    color: var(--muted);
    font-size: 0.74rem;
    text-align: center;
}

/* Очки в случае победы */

.market-payouts-title {
    margin-top: 12px;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-align: center;
    text-transform: uppercase;
}

.market-payouts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 6px;
}

.market-payout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    border-radius: var(--radius-small);
    background: rgba(255, 255, 255, 0.05);
    color: var(--tone-champions);
}

.market-payout b {
    color: var(--text);
    font-size: 1.05rem;
}

.market-payout.is-picked {
    background: rgba(197, 177, 116, 0.18);
}

/* Переключатель матчей команды */

.segment {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-bottom: 12px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-1);
}

.segment button {
    min-height: 38px;
    border: 0;
    border-radius: var(--radius-small);
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
}

.segment button.active {
    background: #fff;
    color: #000;
}

.person-role {
    position: absolute;
    top: 6px;
    left: 6px;
    padding: 2px 6px;
    border-radius: var(--radius-small);
    background: rgba(0, 0, 0, 0.75);
    font-size: 0.62rem;
    font-weight: 700;
}

/* Шапка профиля и фон команды */

.profile-head {
    position: relative;
    margin-bottom: 8px;
    padding: 8px 10px;
    overflow: hidden;
    isolation: isolate;
}

.profile-head > *:not(.profile-bg) {
    position: relative;
}

.profile-bg {
    position: absolute;
    top: 50%;
    right: 58px;
    z-index: -1;
    width: 150px;
    height: 150px;
    object-fit: contain;
    opacity: 0.22;
    filter: saturate(1.2);
    transform: translateY(-50%) rotate(-10deg);
    pointer-events: none;
}

.profile-bg-button {
    display: block;
    width: 100%;
    min-height: 36px;
    margin-bottom: 16px;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-small);
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 0.78rem;
    cursor: pointer;
}

/* Команды в окнах */

.dialog-swap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
    color: var(--muted);
}

.dialog-team {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 0;
    max-width: 120px;
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.dialog-team .logo,
.dialog-team .logo-fallback {
    width: 52px;
    height: 52px;
}

.confirm-actions button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.confirm-actions button .logo,
.confirm-actions button .logo-fallback {
    width: 26px;
    height: 26px;
    font-size: 0.5rem;
}

.confirm-actions.is-column .is-primary {
    border-color: var(--border-strong);
    background: var(--surface-0);
    color: var(--text);
}

/* Выбор команды для фона */

.team-picker {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 420px;
    max-height: 80vh;
    padding: 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.team-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.team-picker-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    min-height: 120px;
    overflow-y: auto;
}

.picker-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 10px 4px;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    background: var(--surface-0);
    color: var(--text);
    font: inherit;
    font-size: 0.7rem;
    cursor: pointer;
}

.picker-team.is-current {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.picker-team span {
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.picker-clear {
    min-height: 36px;
    margin-bottom: 10px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-small);
    background: none;
    color: var(--text);
    font: inherit;
    font-size: 0.8rem;
    cursor: pointer;
}

/* Шапка профиля открывает выбор фона */

.profile-head {
    margin-bottom: 16px;
    cursor: pointer;
}

.profile-head:active {
    border-color: var(--border-strong);
}

.profile-bg {
    right: 118px;
}

/* Сообщение в сетке выбора команды */

.team-picker-list .state-message {
    grid-column: 1 / -1;
}

/* Очки в случае победы */

.market-payouts {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    color: var(--win);
    font-size: 1rem;
    font-weight: 700;
}

.market-payouts em {
    color: var(--muted);
    font-size: 0.68rem;
    font-style: normal;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Баннер над вкладками и список команд */

.profile-head {
    margin-bottom: 4px;
}

.team-picker {
    height: 80vh;
}

.team-picker-list {
    flex: 1;
    align-content: start;
}

/* Отступы блоков предикта */

#tournament-market,
#winner-market {
    margin-top: 12px;
}

.market-points.is-zero {
    color: var(--muted);
}

/* Полоса процентов одной линией */

.market-bar-labels {
    margin-bottom: 6px;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 700;
}

.market-bar-labels span:first-child {
    color: #00e676;
}

.market-bar-labels span:last-child {
    color: #ff1f3d;
}

.market-bar {
    gap: 0;
    height: 8px;
    margin-bottom: 12px;
    overflow: hidden;
    border-radius: var(--radius-small);
}

.market-bar i {
    min-width: 0;
    border-radius: 0;
    background: #00e676;
    box-shadow: none;
}

.market-bar i + i {
    background: #ff1f3d;
    box-shadow: none;
}

.market-option {
    justify-content: center;
    min-height: 52px;
}

/* Переключатель матчей команды текстом */

.segment {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    padding: 0;
    border: 0;
    background: none;
}

.segment button {
    min-height: 32px;
    padding: 0;
    color: var(--muted);
}

.segment button.active {
    background: none;
    color: var(--text);
}

/* Полоса процентов: мягче и со свечением */

.market-bar {
    overflow: visible;
}

.market-bar i {
    background: #3ecf8e;
    box-shadow: 0 0 8px rgba(62, 207, 142, 0.45);
}

.market-bar i:first-child {
    border-radius: var(--radius-small) 0 0 var(--radius-small);
}

.market-bar i + i {
    background: #ff5c6c;
    border-radius: 0 var(--radius-small) var(--radius-small) 0;
    box-shadow: 0 0 8px rgba(255, 92, 108, 0.45);
}

.market-bar-labels span:first-child {
    color: #3ecf8e;
}

.market-bar-labels span:last-child {
    color: #ff5c6c;
}

/* Полоса процентов: цвет чуть ярче */

.market-bar i {
    background: #1fd67a;
    box-shadow: 0 0 8px rgba(31, 214, 122, 0.5);
}

.market-bar i + i {
    background: #ff3b52;
    box-shadow: 0 0 8px rgba(255, 59, 82, 0.5);
}

.market-bar i.is-full,
.market-bar i + i.is-full {
    border-radius: var(--radius-small);
}

.market-bar-labels span:first-child {
    color: #1fd67a;
}

.market-bar-labels span:last-child {
    color: #ff3b52;
}

/* Линия под активным пунктом переключателя */

.segment {
    gap: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
}

.segment button {
    min-height: 40px;
    padding: 0 12px;
    border-bottom: 3px solid transparent;
    border-radius: 0;
}

.segment button.active {
    border-bottom-color: var(--accent);
}

/* Ссылка на турнир со страницы матча */

.match-tournament {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    margin-top: 12px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-1);
    font-size: 0.9rem;
    font-weight: 700;
}

.match-tournament:active {
    background: var(--surface-2);
}

.match-tournament span {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

.match-tournament .logo,
.match-tournament .logo-fallback {
    width: 28px;
    height: 28px;
    font-size: 0.5rem;
}

/* Идущие турниры заметнее */

.event-row.is-ongoing {
    border-color: color-mix(in srgb, var(--val-card-background, #ff4757) 40%, var(--border));
}

.event-row.is-ongoing .event-row-icon img.is-mark {
    width: 36px;
    height: 36px;
    opacity: 0.6;
}

/* Сетка турнира */

.bracket-scroll {
    margin: 0 -16px 16px;
    padding: 0 16px 8px;
    min-height: 70vh;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 16px;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.bracket-scroll::-webkit-scrollbar {
    display: none;
}

.bracket-board {
    position: relative;
}

.bracket-round,
.bracket-strip-item {
    position: absolute;
    top: 0;
    padding-bottom: 6px;
    border-bottom: 2px solid #444;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    text-align: center;
    text-transform: uppercase;
    transition: transform 0.25s ease, opacity 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.bracket-round.is-current,
.bracket-strip-item.is-current {
    border-bottom-color: var(--accent);
    color: var(--text);
}

.bracket-strip-item {
    background: var(--surface-0);
}

.bracket-strip-item.is-empty {
    border-bottom-color: transparent;
    background: none;
}

.bracket-svg {
    position: absolute;
    inset: 0;
    overflow: visible;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.bracket-svg.is-moving {
    opacity: 0;
    transition: none;
}

.bracket-card.is-collapsed,
.bracket-round.is-collapsed,
.bracket-zone.is-collapsed {
    opacity: 0;
    pointer-events: none;
}

.bracket-path {
    fill: none;
    stroke: #3a3a3a;
    stroke-width: 1.5;
    stroke-dasharray: 1;
    animation: bracket-draw 0.24s linear backwards;
    animation-delay: calc((var(--column, 1) - 1) * 0.34s);
}

.bracket-path.is-stub {
    animation-duration: 0.1s;
    animation-delay: calc((var(--column, 1) - 1) * 0.34s + 0.24s);
}

.bracket-path.is-done {
    stroke: #8a8a8a;
}

.bracket-path.is-live {
    stroke: var(--accent);
}

@keyframes bracket-draw {
    from { stroke-dashoffset: 1; }
}

.bracket-card {
    position: absolute;
    display: block;
    color: inherit;
    text-decoration: none;
    top: 0;
    transition: transform 0.25s ease, opacity 0.2s ease;
    animation: bracket-card-in 0.15s linear backwards;
    animation-delay: calc(var(--column, 0) * 0.34s);
}

@keyframes bracket-card-in {
    from { opacity: 0.35; }
}

.bracket-body {
    position: relative;
    height: var(--bracket-body-height, 65px);
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    background: var(--surface-1);
}

.bracket-card:active .bracket-body {
    background: var(--surface-2);
}

.bracket-card.is-live .bracket-body {
    border-color: var(--accent);
}

.bracket-divider {
    height: 1px;
    margin: 0 -8px;
    background: rgba(255, 255, 255, 0.06);
}

.bracket-time {
    padding-top: 3px;
    color: var(--muted);
    font-size: 0.68rem;
    font-variant-numeric: tabular-nums;
    text-align: center;
    white-space: nowrap;
}

.bracket-live {
    position: absolute;
    top: -8px;
    right: 6px;
    padding: 1px 6px;
    border-radius: 3px;
    background: var(--accent);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    animation: bracket-live-pulse 1.5s infinite;
}

@keyframes bracket-live-pulse {
    50% { opacity: 0.7; }
}

@media (prefers-reduced-motion: reduce) {
    .bracket-card,
    .bracket-path {
        animation: none;
        transition: none;
    }
}

.bracket-team {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 31.5px;
    font-size: 0.8rem;
    font-weight: 700;
}

.bracket-team .logo,
.bracket-team .logo-fallback {
    flex: none;
    width: 22px;
    height: 22px;
    font-size: 0.45rem;
}

.bracket-team-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.bracket-team-name.is-full-name {
    overflow: visible;
    text-overflow: clip;
}

.bracket-team.is-tbd {
    color: var(--subtle);
}

.bracket-team.is-winner {
    color: var(--win);
}

.bracket-team.is-loser {
    color: #8a8a8a;
}

.bracket-zone {
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.25s ease, opacity 0.2s ease;
    height: 24px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.bracket-nav {
    position: sticky;
    z-index: 9;
    margin: 0 -16px 12px;
    background: var(--surface-0);
}

.bracket-nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 16px;
}

.bracket-strip {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    height: 26px;
    overflow: hidden;
    pointer-events: none;
}

.bracket-strip-inner {
    position: absolute;
    top: 0;
    left: 16px;
}

.bracket-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    text-align: center;
}

.bracket-stage small {
    color: var(--muted);
    font-size: 0.68rem;
}

.bracket-stage b {
    font-size: 0.95rem;
}

.bracket-stage.is-switching {
    animation: bracket-stage-in 0.25s ease-out;
}

@keyframes bracket-stage-in {
    from { opacity: 0.2; transform: translateY(5px); }
}

.bracket-step {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    background: var(--surface-1);
    color: var(--text);
}

.bracket-step:disabled {
    opacity: 0.35;
}

.bracket-step svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.match-label img {
    flex: none;
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.match-label span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.team-background {
    display: block;
    width: 100%;
    min-height: 46px;
    margin-top: 28px;
    border: 0;
    border-radius: var(--radius);
    background: #fff;
    color: #000;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
}

.team-background.is-current {
    border: 1px solid var(--border);
    background: var(--surface-1);
    color: var(--text);
}

.team-background:disabled {
    opacity: 0.6;
}

/* Загрузка раздела */

.page-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

/* Перекрывает весь экран, пока страница грузится — вместе с шапкой и нижним меню */
.page-loader-overlay {
    position: fixed;
    inset: 0;
    z-index: 45;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-0);
}

.page-loader-overlay[hidden],
.no-loader .page-loader-overlay {
    display: none;
}

/* Плавные переходы: анимируется только opacity — это делает видеокарта, без перерасчёта вёрстки */
.page-loader-overlay {
    transition: opacity 0.2s ease;
}

.page-loader-overlay.is-fading {
    opacity: 0;
    pointer-events: none;
}

#app {
    transition: opacity 0.22s ease;
}

#app.is-pending {
    opacity: 0;
    transition: none;
}

/* Мягкая смена страниц (Chrome/Android WebView, Safari 18.2+; где не поддерживается — просто без неё) */
@view-transition {
    navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0.18s;
    animation-timing-function: ease;
}

@media (prefers-reduced-motion: reduce) {
    @view-transition {
        navigation: none;
    }

    #app,
    .page-loader-overlay {
        transition: none;
    }
}

.page-loader-overlay .page-loader {
    min-height: 0;
}

.page-loader-mark {
    position: relative;
    width: 72px;
    height: 72px;
}

.page-loader-mark img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.16;
}

/* Заливка идёт по диагонали из левого верхнего угла в правый нижний: маска с полосой
   по центру проезжает через значок одним движением — разгон и плавное торможение без остановки посередине */
.page-loader-mark .page-loader-fill {
    opacity: 1;
    -webkit-mask-image: linear-gradient(135deg, transparent 33.33%, #000 33.33%, #000 66.67%, transparent 66.67%);
    mask-image: linear-gradient(135deg, transparent 33.33%, #000 33.33%, #000 66.67%, transparent 66.67%);
    -webkit-mask-size: 300% 300%;
    mask-size: 300% 300%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    animation: page-loader-sweep 0.6s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

@keyframes page-loader-sweep {
    from { -webkit-mask-position: 100% 100%; mask-position: 100% 100%; }
    to { -webkit-mask-position: 0 0; mask-position: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
    .page-loader-mark .page-loader-fill {
        -webkit-mask-image: none;
        mask-image: none;
        animation: none;
    }
}

/* Какую команду заменить */

.dialog-replace {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    color: var(--muted);
}

.dialog-replace svg {
    flex: none;
}

.dialog-replace .dialog-team {
    flex: 0 0 84px;
}

.dialog-replace-list {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    max-height: 50vh;
    overflow-y: auto;
}

.dialog-replace-team {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 6px 8px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-small);
    background: var(--surface-0);
    color: var(--text);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.dialog-replace-team.is-selected {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.14);
}

.confirm-actions .is-primary:disabled {
    opacity: 0.35;
    cursor: default;
}

.dialog-replace-team span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.dialog-replace-team .logo,
.dialog-replace-team .logo-fallback {
    flex: none;
    width: 26px;
    height: 26px;
    font-size: 0.5rem;
}

/* Сравнение фона профиля */

.confirm-overlay.is-wide {
    padding: 8px;
}

.confirm-overlay.is-wide .confirm-box {
    max-width: 696px;
    padding: 16px 7px 8px;
}

.dialog-profile {
    margin-bottom: 12px;
    text-align: left;
}

.dialog-profile small {
    display: block;
    margin: 0 0 6px 2px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.dialog-profile .profile-head {
    margin-bottom: 14px;
    cursor: default;
    pointer-events: none;
}

.dialog-profile .profile-head:last-child {
    margin-bottom: 0;
}

/* Стили фона профиля */

.profile-head > .profile-bg-pattern,
.profile-head > .profile-bg-glow {
    position: absolute;
    z-index: -1;
    pointer-events: none;
}

.profile-bg-pattern {
    top: 50%;
    right: 144px;
    display: flex;
    align-items: center;
    gap: 9px;
    transform: translate(50%, -50%);
}

.profile-bg-pattern img {
    flex: none;
    object-fit: contain;
}

.profile-bg-glow {
    top: 50%;
    left: 50%;
    width: 24px;
    height: 6px;
    object-fit: fill;
    opacity: 0.6;
    filter: blur(1.5px) brightness(0.7) saturate(2.6);
    transform: translate(-50%, -50%) scale(20);
}

.profile-head.has-background .profile-points span {
    color: rgba(255, 255, 255, 0.8);
}

.profile-bg.is-solid {
    width: 46px;
    height: 46px;
    right: 121px;
    opacity: 1;
    filter: none;
    transform: translateY(-50%);
}

.dialog-profile [data-next-preview] .profile-head {
    margin-bottom: 0;
}

.dialog-styles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 8px;
}

.dialog-styles button {
    min-height: 36px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-small);
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

.dialog-styles button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.dialog-styles button:disabled {
    opacity: 0.5;
    cursor: default;
}

.dialog-styles button.active {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.12);
    color: var(--text);
}

/* Аватар на всю высоту блока */

.profile-head {
    padding: 0 12px 0 0;
}

.profile-user {
    gap: 14px;
}

.profile-avatar,
.profile-user .logo-fallback {
    flex: none;
    width: 60px;
    height: 60px;
    border-radius: 0;
}

/* Колокольчик и всплывающее уведомление */

#notifications-link {
    position: relative;
    color: var(--text);
}

.notifications-badge {
    position: absolute;
    top: 5px;
    right: 3px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 9px;
    background: var(--accent);
    color: #fff;
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
}

.notifications-badge[hidden] {
    display: none;
}

.notify-popup {
    position: fixed;
    top: calc(var(--top-height) + 10px);
    left: 50%;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 12px;
    width: calc(100% - 24px);
    max-width: 480px;
    padding: 10px 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface-2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    color: var(--text);
    text-decoration: none;
    transform: translateX(-50%);
    animation: notify-in 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.notify-popup.is-won {
    border-color: color-mix(in srgb, var(--win) 55%, var(--border-strong));
}

.notify-popup.is-leaving {
    opacity: 0;
    transform: translate(-50%, -12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

@keyframes notify-in {
    from { opacity: 0; transform: translate(-50%, -18px); }
}

.notify-logos {
    display: flex;
    flex: none;
}

.notify-logos .logo,
.notify-logos .logo-fallback {
    width: 36px;
    height: 36px;
    font-size: 0.6rem;
}

.notify-logos > * + * {
    margin-left: -14px;
}

.notify-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.notify-text b {
    font-size: 0.92rem;
}

.notify-text small {
    overflow: hidden;
    color: var(--muted);
    font-size: 0.74rem;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.notify-points {
    flex: none;
    color: var(--muted);
    font-size: 1.15rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.notify-popup.is-won .notify-points,
.notify-item.is-won .notify-points {
    color: var(--win);
}

/* Список уведомлений */

.notify-read-all {
    display: block;
    width: 100%;
    min-height: 40px;
    margin-bottom: 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-small);
    background: none;
    color: var(--text);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
}

.notify-read-all:disabled {
    opacity: 0.5;
}

.notify-item.is-removing {
    opacity: 0;
    transform: translateX(-24px);
    transition: opacity 0.09s linear, transform 0.09s linear;
}

.notify-item.is-opening {
    opacity: 0;
    transition: opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.notify-date {
    margin-top: 3px;
    color: var(--subtle);
    font-size: 0.7rem;
}

/* Лидерборд */

.leader-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.leader-row .profile-head {
    margin-bottom: 0;
    cursor: pointer;
}

.leader-row .profile-head:active {
    border-color: var(--border);
}

.leader-row.is-me .profile-head {
    border: 2px solid #fff;
    box-shadow: 0 0 10px #fff;
}

.leader-row .profile-bg.is-solid {
    right: 92px;
    width: 40px;
    height: 40px;
}

.leader-row .profile-head:has(.is-solid) .profile-user,
.leader-row .profile-head:has(.profile-bg-pattern) .profile-user {
    padding-right: 52px;
}

.leader-row .profile-name {
    font-size: 0.95rem;
}

.profile-name {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.profile-user {
    flex: 1;
}

.profile-points {
    flex: none;
    margin-left: 8px;
}

.leader-row .profile-points {
    font-size: 1.05rem;
}

.leader-row {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.leader-row .profile-head,
.podium-col[data-leader-profile] {
    transition: border-color 0.16s ease, transform 0.16s ease, background-color 0.16s ease;
}

.leader-row:hover .profile-head {
    border-color: var(--border-strong);
    background-color: #151515;
}

.leader-row:active .profile-head,
.podium-col[data-leader-profile]:active {
    transform: scale(0.985);
}

.podium-col[data-leader-profile] {
    cursor: pointer;
    outline: none;
}

.leader-row.is-flash .profile-head,
.podium-col.is-flash .podium-base {
    animation: leader-flash 1.4s ease-out;
}

@keyframes leader-flash {
    0%, 45% { box-shadow: 0 0 20px rgba(255, 255, 255, 0.4); }
}

.leader-me-button {
    flex: none;
    min-height: 32px;
    margin-right: 2px;
    padding: 0 10px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-small);
    background: var(--surface-2);
    color: var(--text);
    font: inherit;
    font-size: 0.74rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

.leader-me-button:disabled {
    opacity: 0.6;
}

.leader-row .profile-head {
    flex: 1;
    min-width: 0;
}

.leader-place {
    flex: none;
    width: 22px;
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.tournament-leaderboard-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 8px 2px 14px;
}

.tournament-leaderboard-head b {
    font-size: 1rem;
}

.tournament-leaderboard-head span {
    color: var(--muted);
    font-size: 0.76rem;
    text-align: right;
}


/* Подиум */

.podium {
    display: grid;
    grid-template-columns: 1fr 1.14fr 1fr;
    align-items: end;
    gap: 6px;
    margin: 10px 0 20px;
}

.podium-col {
    --podium-color: #c3c9d1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.podium-col.is-top-1 {
    --podium-color: #e3c766;
}

.podium-col.is-top-3 {
    --podium-color: #c98a5a;
}

.podium-avatar {
    position: relative;
    display: flex;
}

.podium-avatar .profile-avatar,
.podium-avatar .logo-fallback {
    width: 62px;
    height: 62px;
    border: 2px solid var(--podium-color);
    border-radius: 14px;
    font-size: 1.3rem;
    object-fit: cover;
}

.podium-col.is-top-1 .profile-avatar,
.podium-col.is-top-1 .logo-fallback {
    width: 82px;
    height: 82px;
    border-radius: 18px;
    font-size: 1.7rem;
    box-shadow: 0 0 22px color-mix(in srgb, var(--podium-color) 45%, transparent);
}

.podium-crown {
    position: absolute;
    top: -19px;
    left: 50%;
    width: 28px;
    height: 28px;
    fill: var(--podium-color);
    transform: translateX(-50%);
}

.podium-name {
    max-width: 100%;
    margin: 7px 0 8px;
    padding: 0 4px;
    overflow: hidden;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.podium-col.is-me .podium-base {
    border: 2px solid #fff;
    box-shadow: 0 0 10px #fff;
}

.podium-base {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    align-self: stretch;
    height: 88px;
    overflow: hidden;
    isolation: isolate;
    border-top: 3px solid var(--podium-color);
    border-radius: var(--radius) var(--radius) 0 0;
    background: linear-gradient(180deg, color-mix(in srgb, var(--podium-color) 26%, #101010), #0d0d0d);
}

.podium-col.is-top-2 .podium-base {
    height: 106px;
}

.podium-col.is-top-1 .podium-base {
    height: 132px;
}

.podium-base > .profile-bg-pattern,
.podium-base > .profile-bg-glow {
    position: absolute;
    z-index: -1;
    pointer-events: none;
}

.podium-base > .profile-bg {
    top: 50%;
    right: 50%;
    width: 84px;
    height: 84px;
    opacity: 0.32;
    transform: translate(50%, -50%) rotate(-8deg);
}

.podium-base > .profile-bg.is-solid {
    width: 72px;
    height: 72px;
    opacity: 0.28;
    transform: translate(50%, -50%);
}

.podium-base > .profile-bg-pattern {
    right: 50%;
    opacity: 0.6;
}

.podium-number {
    background: linear-gradient(180deg, #fff 15%, var(--podium-color) 85%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 2.3rem;
    font-weight: 700;
    line-height: 1;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.75));
}

.podium-col.is-top-1 .podium-number {
    font-size: 3.2rem;
}

.podium-points {
    font-size: 0.95rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.podium-points small {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.62rem;
    font-weight: 500;
}

/* Страницы лидерборда */

.leader-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 16px;
}

.leader-pager button {
    flex: none;
    min-width: 36px;
    height: 36px;
    padding: 0 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    background: var(--surface-1);
    color: var(--text);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
}

.leader-pager button.active {
    border-color: #fff;
    background: #fff;
    color: #000;
}

.leader-pager button:disabled {
    opacity: 0.35;
    cursor: default;
}

.leader-pager span {
    padding: 0 2px;
    color: var(--muted);
}

/* Карточка участника лидерборда и история очков */

.leader-profile-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(18px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
    background: rgba(0, 0, 0, 0.76);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.18s ease;
}

.leader-profile-modal.is-open {
    opacity: 1;
}

.leader-profile-card {
    position: relative;
    width: min(620px, 100%);
    max-height: min(760px, 92vh);
    overflow: auto;
    padding: 48px 18px 18px;
    border: 1px solid var(--border-strong);
    border-radius: 16px;
    background: #0c0c0c;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.72);
    transform: translateY(14px) scale(0.985);
    transition: transform 0.2s ease;
    overscroll-behavior: contain;
}

.leader-profile-modal.is-open .leader-profile-card {
    transform: translateY(0) scale(1);
}

.leader-profile-close {
    position: absolute;
    z-index: 2;
    top: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

.leader-profile-close:active {
    background: var(--surface-2);
}

.leader-profile-close .close-icon-img {
    width: 22px;
    height: 22px;
}

.leader-profile-content > .profile-head {
    margin-bottom: 14px;
}

.leader-profile-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-1);
}

.leader-profile-stats > div {
    min-width: 0;
    padding: 11px 5px 10px;
    border-right: 1px solid var(--border);
    text-align: center;
}

.leader-profile-stats > div:last-child {
    border-right: 0;
}

.leader-profile-stats b,
.leader-profile-stats span {
    display: block;
}

.leader-profile-stats b {
    font-size: 1.05rem;
    font-variant-numeric: tabular-nums;
}

.leader-profile-stats span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.66rem;
    white-space: nowrap;
}

.leader-history-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin: 0 2px 10px;
}

.leader-history-head span,
.leader-history-head small {
    display: block;
}

.leader-history-head span {
    font-size: 1rem;
    font-weight: 700;
}

.leader-history-head small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.7rem;
}

.leader-history-head > b {
    font-size: 1.35rem;
    font-variant-numeric: tabular-nums;
}

.leader-chart-wrap {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #080808;
}

.leader-chart {
    display: block;
    width: 100%;
    height: auto;
    min-height: 210px;
}

.leader-chart-grid {
    stroke: #252525;
    stroke-width: 1;
}

.leader-chart-axis,
.leader-chart-date {
    fill: var(--subtle);
    font-family: inherit;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.leader-chart-date.is-today {
    fill: #d7d7d7;
}

.leader-chart-area {
    fill: rgba(255, 255, 255, 0.045);
}

.leader-chart-line {
    fill: none;
    stroke: #f2f2f2;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.leader-chart-point {
    fill: #0b0b0b;
    stroke: #bdbdbd;
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}

.leader-chart-point.is-today {
    fill: #fff;
    stroke: #fff;
}

@media (max-width: 460px) {
    .leader-profile-card {
        padding: 46px 12px 12px;
        border-radius: 13px;
    }

    .leader-profile-stats span {
        font-size: 0.59rem;
    }

    .leader-chart {
        min-height: 190px;
    }
}

/* Окно «Поделиться» */

.share-link {
    margin: -6px 0 16px;
    padding: 8px 10px;
    overflow: hidden;
    border-radius: var(--radius-small);
    background: var(--surface-0);
    color: var(--muted);
    font-size: 0.75rem;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.confirm-actions.is-column .is-primary {
    border-color: #fff;
    background: #fff;
    color: #000;
}

/* Значок во всплывающей подсказке */

.toast:not([hidden]) {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast-icon {
    flex: none;
    width: 18px;
    height: 18px;
    object-fit: contain;
}

/* Окно «Поделиться ссылкой» */

.confirm-overlay.is-share {
    padding: 16px 12px;
}

.confirm-overlay.is-share .confirm-box {
    max-width: 480px;
    padding: 14px;
    text-align: left;
}

.share-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: -6px -8px 8px 0;
}

.share-head b {
    font-size: 1rem;
}

.share-close {
    width: 36px;
    height: 36px;
}

.share-link {
    margin: 0 0 12px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    background: var(--surface-0);
    color: var(--text);
    font-size: 0.8rem;
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-all;
    user-select: all;
}

.confirm-overlay.is-share .confirm-actions button {
    min-height: 40px;
    gap: 7px;
    font-size: 0.85rem;
    font-weight: 700;
}

.confirm-overlay.is-share .confirm-actions img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.confirm-overlay.is-share .confirm-actions .is-primary img {
    filter: invert(1);
}

/* Окно игрока как в старом предикторе */

.person {
    cursor: pointer;
}

.person:active {
    opacity: 0.75;
}

.player-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.55);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.25s ease;
    touch-action: none;
}

.player-modal.is-open {
    opacity: 1;
}

.player-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 0;
    background: none;
    opacity: 0.85;
    cursor: pointer;
}

.player-modal-close .close-icon-img {
    width: 24px;
    height: 24px;
}

.player-modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 100%;
}


.player-modal-image {
    width: min(256px, 70vw);
    max-height: 60vh;
    border-radius: 8px;
    object-fit: contain;
    transform: scale(0.92);
    transition: transform 0.25s ease;
}

.player-modal.is-open .player-modal-image {
    transform: scale(1);
}

.player-modal-nickname {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    overflow-wrap: anywhere;
}

.player-modal-nickname img {
    flex: none;
    width: 26px;
    height: 26px;
    object-fit: contain;
}

.player-modal-name {
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.92rem;
    text-align: center;
    overflow-wrap: anywhere;
}

/* Статистика команды */

.stat-list {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-1);
}

.stat-row,
.form-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 14px;
    border-bottom: 1px solid var(--border);
}

.stat-row:last-child,
.form-row:last-child {
    border-bottom: 0;
}

.stat-row span {
    flex: 1;
    color: var(--muted);
    font-size: 0.88rem;
}

.stat-row b {
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
}

.stat-row b.is-win,
.form-result.is-win {
    color: #1fd67a;
}

.stat-row b.is-loss,
.form-result.is-loss {
    color: #ff3b52;
}

.form-row {
    color: var(--text);
    text-decoration: none;
}

.form-row:active {
    background: var(--surface-2);
}

.form-result {
    flex: none;
    width: 16px;
    font-size: 0.85rem;
    font-weight: 700;
}

.form-row .logo,
.form-row .logo-fallback {
    width: 26px;
    height: 26px;
    font-size: 0.5rem;
}

.form-rival {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.form-score {
    flex: none;
    font-size: 0.9rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.team-background {
    margin: 14px 0 4px;
}

/* Иконка закрытия из общих файлов */

.close-icon-img {
    width: 14px;
    height: 14px;
    object-fit: contain;
}

/* Страница не прокручивается под открытым окном */

body.is-scroll-locked {
    position: fixed;
    right: 0;
    left: 0;
    overflow: hidden;
}

/* Итог предикта после матча */

.market-mine-note {
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.market-option.is-mine-won {
    border-color: var(--win);
    background: color-mix(in srgb, var(--win) 10%, var(--surface-0));
}

.market-option.is-mine-won .market-mine-note {
    color: var(--win);
}

.market-option.is-mine-lost {
    border-color: color-mix(in srgb, #ff3b52 55%, var(--border));
    background: color-mix(in srgb, #ff3b52 7%, var(--surface-0));
}

.market-option.is-mine-lost .market-mine-note {
    color: #ff3b52;
}


/* Живое обновление процентов */

.market-row-fill,
.market-bar i {
    transition: width 0.6s ease;
}

/* Итог и выплаты: подпись строго по центру */

.market-payouts {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
}

.market-payouts > span:first-child {
    justify-self: start;
}

.market-payouts > span:last-child {
    justify-self: end;
}

.market-payouts em {
    text-align: center;
}

/* Цифры слегка подпрыгивают при изменении */

.is-bump {
    display: inline-block;
    animation: number-bump 0.35s ease-out;
}

@keyframes number-bump {
    0% { transform: translateY(0) scale(1); }
    35% { transform: translateY(-3px) scale(1.08); }
    100% { transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .is-bump {
        animation: none;
    }
}

/* Очки под кнопками в цветах полоски: левая сторона зелёная, правая красная */

.market-payouts > span:first-child {
    color: #1fd67a;
}

.market-payouts > span:last-child {
    color: #ff3b52;
}

.market-payouts small {
    font-size: 0.72rem;
    font-weight: 600;
    opacity: 0.6;
}

/* Победитель в шапке матча */

.versus-score {
    display: flex;
    align-items: center;
    gap: 8px;
}

.versus-score span {
    color: var(--muted);
}

/* Трансляции и записи */

.match-media {
    margin-top: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-1);
}

.match-media summary {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 14px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.match-media summary::-webkit-details-marker {
    display: none;
}

.match-media summary::after {
    content: '';
    width: 8px;
    height: 8px;
    margin-left: auto;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.2s ease;
}

.match-media[open] summary::after {
    transform: rotate(-135deg) translateY(-2px);
}

.match-media summary span {
    padding: 1px 7px;
    border-radius: 9px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 0.72rem;
}

.media-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 10px 10px;
}

.media-game {
    padding: 6px 14px 6px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.media-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    background: var(--surface-0);
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
}

.media-link:active {
    background: var(--surface-2);
}

.media-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.media-language {
    flex: none;
    color: var(--muted);
    font-size: 0.72rem;
}

.media-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--muted);
}

/* Выбор на кнопке в цвете полоски: слева зелёный, справа красный */

.market-pair .market-option:first-child:is(.is-picked, .is-mine-won, .is-mine-lost) {
    border: 2px solid #1fd67a;
    background: var(--surface-0);
    box-shadow: 0 0 8px rgba(31, 214, 122, 0.45);
}

.market-pair .market-option:last-child:is(.is-picked, .is-mine-won, .is-mine-lost) {
    border: 2px solid #ff3b52;
    background: var(--surface-0);
    box-shadow: 0 0 8px rgba(255, 59, 82, 0.5);
}

.market-pair .market-option:first-child .market-mine-note {
    color: #1fd67a;
}

.market-pair .market-option:last-child .market-mine-note {
    color: #ff3b52;
}

.media-empty {
    padding: 0 14px 14px;
    color: var(--muted);
    font-size: 0.82rem;
}

/* Турнир над счётом: текстовая ссылка */

.match-tournament-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    margin: 0 0 10px 2px;
    color: var(--muted);
    font-size: 0.98rem;
    font-weight: 700;
    text-decoration: none;
}

.match-tournament-link img {
    flex: none;
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.match-tournament-link span {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.25);
    text-underline-offset: 3px;
}

.match-tournament-link svg {
    flex: none;
}

.match-tournament-link:active,
.match-tournament-link:hover {
    color: var(--text);
}

/* Логотип команды на кнопке выбора */

.market-pair .market-option .logo,
.market-pair .market-option .logo-fallback {
    width: 32px;
    height: 32px;
    font-size: 0.6rem;
}

/* Стадия матча ведёт в сетку */

.meta-chip.is-link {
    color: var(--text);
    text-decoration: none;
}

.meta-chip.is-link::after {
    content: '›';
    margin-left: 6px;
    color: var(--muted);
}

.bracket-card.is-flash .bracket-body,
.match-card.is-flash {
    animation: match-flash 2.2s ease-out;
}

@keyframes match-flash {
    0%, 40% {
        border-color: rgba(255, 255, 255, 0.45);
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.12);
    }
}

/* Окно выбора фона: страница за ним слегка размыта */

.confirm-overlay.is-wide {
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

/* Победитель белым, без зелёного */

.match-row.is-winner .match-team-name,
.match-row.is-winner .match-score,
.bracket-team.is-winner {
    color: #fff;
}

.match-row.is-loser .match-team-name,
.match-row.is-loser .match-score,
.bracket-team.is-loser {
    color: #7c7c7c;
}

/* Статистика команды белым */

.stat-row b.is-win,
.stat-row b.is-loss,
.form-result.is-win,
.form-result.is-loss {
    color: #fff;
}

.form-row .form-result.is-loss {
    color: #7c7c7c;
}

/* Вход через Telegram на сайте */

.login-gate {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 360px;
    margin: 8vh auto 0;
    text-align: center;
}

.login-gate-logo {
    width: 64px;
    height: 64px;
    margin-bottom: 18px;
    object-fit: contain;
}

.login-gate h2 {
    margin: 0 0 10px;
    font-size: 1.35rem;
}

.login-gate p {
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.login-gate-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 240px;
    padding: 14px 22px;
    border-radius: 12px;
    background: #2aabee;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.2s;
}

.login-gate-button.is-loading {
    opacity: 0.5;
    pointer-events: none;
}

.login-gate-hint {
    margin-top: 14px;
    color: var(--muted);
    font-size: 0.85rem;
}


/* Большой экран компьютера: крупнее и с плавающим меню */

@media (hover: hover) and (min-width: 1024px) {
    body {
        zoom: 1.12;
        background:
            radial-gradient(1200px 600px at 50% -10%, rgba(255, 71, 87, 0.07), transparent 70%),
            var(--surface-0);
        background-attachment: fixed;
    }

    #app {
        max-width: 760px;
        padding-top: 24px;
        padding-bottom: calc(var(--nav-height) + 64px);
    }

    .top-bar {
        padding-inline: max(16px, calc((100% - 760px) / 2));
        background: rgba(0, 0, 0, 0.82);
        -webkit-backdrop-filter: blur(3px);
        backdrop-filter: blur(3px);
    }

    .bottom-nav {
        left: 50%;
        right: auto;
        bottom: 18px;
        width: 520px;
        padding-bottom: 0;
        transform: translateX(-50%);
        overflow: hidden;
        border: 1px solid var(--border-strong);
        border-radius: 16px;
        background: rgba(15, 15, 15, 0.9);
        -webkit-backdrop-filter: blur(3px);
        backdrop-filter: blur(3px);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    }

    .bottom-nav a:hover {
        color: var(--text);
        background: rgba(255, 255, 255, 0.04);
    }

    .toast {
        bottom: calc(var(--nav-height) + 36px);
    }

    a.card:hover,
    .login-gate-button:hover {
        filter: brightness(1.12);
    }

    a.card:hover {
        border-color: var(--border-strong);
    }
}

@media (hover: hover) and (min-width: 1600px) {
    body {
        zoom: 1.25;
    }
}

/* Окно с рассчитанными предиктами */

.confirm-overlay.is-settle {
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.confirm-overlay.is-settle .confirm-box {
    max-width: 360px;
    padding: 22px 16px 16px;
    animation: settle-in 0.25s ease-out;
}

@keyframes settle-in {
    from { opacity: 0; transform: scale(0.94); }
    to { opacity: 1; transform: scale(1); }
}

.settle-total {
    color: var(--muted);
    font-size: 2.6rem;
    font-weight: 700;
    line-height: 1;
}

.settle-dialog.is-won .settle-total {
    color: var(--win);
    text-shadow: 0 0 24px rgba(46, 212, 122, 0.35);
}

.settle-label {
    margin: 6px 0 16px;
    color: var(--muted);
    font-size: 0.78rem;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.settle-dialog p {
    margin-bottom: 4px;
}

.settle-subtitle {
    color: var(--muted);
    font-size: 0.85rem;
}

.settle-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 14px 0 16px;
    text-align: left;
}

.settle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-1);
}

.settle-row .logo {
    width: 30px;
    height: 30px;
}

.settle-row-text {
    flex: 1;
    min-width: 0;
}

.settle-row-text b,
.settle-row-text small {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.settle-row-text b {
    font-size: 0.88rem;
}

.settle-row-text small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.75rem;
}

.settle-row-points {
    flex: none;
    color: var(--muted);
    font-weight: 700;
}

.settle-row.is-won .settle-row-points {
    color: var(--win);
}

.settle-more {
    color: var(--muted);
    font-size: 0.8rem;
    text-align: center;
}

/* Красный пункт в меню профиля */

.is-danger-text {
    color: #ff5c6c;
}

/* Крестик у уведомления */

.notify-item {
    position: relative;
}

.notify-dismiss {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 32px;
    height: 32px;
    margin: -6px -6px -6px 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--subtle);
    cursor: pointer;
}

.notify-dismiss:active {
    background: var(--surface-2);
    color: var(--text);
}

/* Дальние иконки волны видны только на широкой карточке */

.profile-bg-pattern img.is-wide-only {
    display: none;
}

/* Широкий экран: колонка шире, списки в две колонки, крупнее карточка профиля */

@media (hover: hover) and (min-width: 1024px) {
    :root {
        --page-width: 1100px;
    }

    #app {
        max-width: var(--page-width);
    }

    .top-bar {
        padding-inline: max(16px, calc((100% - var(--page-width)) / 2));
    }

    .card-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .notify-dismiss:hover {
        background: var(--surface-2);
        color: var(--text);
    }

    .profile-head {
        min-height: 84px;
    }

    .profile-avatar,
    .profile-user .logo-fallback {
        width: 84px;
        height: 84px;
    }

    .profile-name {
        font-size: 1.2rem;
    }

    .profile-points {
        font-size: 1.5rem;
    }

    #app > .profile-head .profile-bg-pattern,
    .is-page-card .profile-bg-pattern,
    .leader-row .profile-bg-pattern {
        right: 34%;
        gap: 30px;
    }

    #app > .profile-head .profile-bg-pattern,
    .is-page-card .profile-bg-pattern {
        transform: translate(50%, -50%) scale(1.3);
    }

    #app > .profile-head .profile-bg-pattern img.is-wide-only,
    .is-page-card .profile-bg-pattern img.is-wide-only,
    .leader-row .profile-bg-pattern img.is-wide-only {
        display: block;
    }

    #app > .profile-head .profile-bg-glow,
    .is-page-card .profile-bg-glow {
        transform: translate(-50%, -50%) scale(40, 28);
    }

    .leader-row .profile-head {
        min-height: 60px;
    }

    .leader-row .profile-avatar,
    .leader-row .profile-user .logo-fallback {
        width: 60px;
        height: 60px;
    }
}

@media (hover: hover) and (min-width: 1600px) {
    :root {
        --page-width: 1240px;
    }
}

/* Аватарка без фото как в Telegram: цветной градиент и крупная буква */

.tg-avatar {
    container-type: size;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.tg-avatar span {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 46cqh;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0;
}

/* Большой экран: без искусственного жирного начертания */

@media (hover: hover) and (min-width: 1024px) {
    body {
        font-synthesis: none;
    }
}

/* Дата в карточке предикта */

.pick-date {
    margin-top: 3px;
    color: var(--subtle);
    font-size: 0.75rem;
}

/* Удаление уведомления крестиком */

.notify-item.is-dismissing {
    pointer-events: none;
    opacity: 0;
    transform: translateX(48px) scale(0.96);
    transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.4, 0, 1, 1);
}

/* Меню своей карточки */

.confirm-overlay.is-own-card {
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.confirm-overlay.is-own-card .confirm-box {
    position: relative;
    max-width: 380px;
    padding: 52px 14px 14px;
    animation: settle-in 0.22s ease-out;
}

.own-card-preview {
    overflow: hidden;
    margin-bottom: 14px;
    text-align: left;
    pointer-events: none;
}

.dialog-x {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    background: none;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition: transform 0.12s ease;
}

.dialog-x:active {
    transform: scale(1.12);
}

/* Компьютер: панель сетки не едет за прокруткой и не закрывает матчи */

@media (hover: hover) and (min-width: 1024px) {
    .bracket-nav {
        position: static;
    }

    .bracket-strip {
        display: none;
    }
}

/* Окно своей карточки: страница за ним не размывается */

.confirm-overlay.is-own-card {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(0, 0, 0, 0.55);
}

/* Крестики из close.svg */

.dialog-x .close-icon-img {
    width: 24px;
    height: 24px;
}

.notify-dismiss-x {
    display: block;
    color: currentColor;
    font-family: Arial, sans-serif;
    font-size: 21px;
    font-weight: 700;
    line-height: 1;
    opacity: 0.7;
    transform: translateY(-1px);
    transition: opacity 0.15s;
}

.notify-dismiss:hover .notify-dismiss-x,
.notify-dismiss:active .notify-dismiss-x {
    opacity: 1;
}

/* Окно своей карточки почти во всю ширину карточки на странице */

.confirm-overlay.is-own-card {
    padding: 12px;
}

.confirm-overlay.is-own-card .confirm-box {
    max-width: 620px;
}

.confirm-overlay.is-own-card .confirm-actions {
    max-width: 380px;
    margin: 0 auto;
}

/* Окно своей карточки на компьютере шире, чтобы копия карточки не была мелкой */

@media (hover: hover) and (min-width: 1024px) {
    .confirm-overlay.is-own-card .confirm-box {
        max-width: 900px;
    }
}

/* Значок соперника в карточке предикта 18×18 */

.pick-opponent {
    right: -4px;
    bottom: -4px;
    width: 26px;
    height: 26px;
}

.pick-opponent .logo,
.pick-opponent .logo-fallback {
    width: 18px;
    height: 18px;
    font-size: 0.4rem;
}

/* Превью карточки в окне фона */

.fit-card {
    overflow: hidden;
    margin-bottom: 14px;
}

.fit-card:last-child,
.dialog-profile .fit-card + .dialog-styles {
    margin-bottom: 0;
}

.dialog-profile .fit-card + .dialog-styles {
    margin-top: 12px;
}

.fit-card .profile-head {
    margin: 0;
}

/* Роль в окне игрока: тонкие линии по бокам и акцентный цвет */

.player-modal-role {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
    color: var(--accent);
    font-size: 0.7rem;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.player-modal-role::before,
.player-modal-role::after {
    content: '';
    width: 22px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent));
}

.player-modal-role::after {
    background: linear-gradient(90deg, var(--accent), transparent);
}

/* Компьютер: карточки игроков меньше */

@media (hover: hover) and (min-width: 1024px) {
    .people-grid {
        grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
        gap: 12px;
    }
}

/* Компьютер: окно выбора фона шире, чтобы карточка в настоящих пропорциях не была мелкой */

@media (hover: hover) and (min-width: 1024px) {
    .confirm-overlay.is-wide .confirm-box {
        max-width: 900px;
        padding: 18px 14px 12px;
    }

    .confirm-overlay.is-wide .confirm-actions {
        max-width: 480px;
        margin: 0 auto;
    }
}

/* Запасной вход через бота под основной кнопкой */

.login-gate-alt {
    margin-top: 16px;
    color: var(--muted);
    font-size: 0.85rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.login-gate-alt.is-loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Активные сессии сайта */

.confirm-overlay.is-sessions .confirm-box {
    max-width: 460px;
    text-align: left;
}

.sessions-title {
    position: absolute;
    top: 16px;
    left: 18px;
    margin: 0;
    font-size: 1.05rem;
}

.sessions-hint {
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.4;
}

.session-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: min(52vh, 420px);
    margin-bottom: 14px;
    overflow-y: auto;
}

.session-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line, rgba(255, 255, 255, 0.08));
    border-radius: 12px;
    background: var(--surface-2);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.session-row.is-current {
    border-color: rgba(255, 70, 85, 0.45);
}

.session-row.is-removing {
    opacity: 0;
    transform: translateX(40px);
}

.session-info {
    flex: 1;
    min-width: 0;
}

.session-device {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}

.session-badge {
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(255, 70, 85, 0.16);
    color: var(--accent, #ff4655);
    font-size: 0.65rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.session-meta {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.75rem;
    overflow-wrap: anywhere;
}

.session-end {
    flex: none;
    padding: 7px 10px;
    border: 1px solid rgba(255, 92, 108, 0.4);
    border-radius: 10px;
    background: none;
    color: #ff5c6c;
    font: inherit;
    font-size: 0.75rem;
    cursor: pointer;
}

.session-end:disabled {
    opacity: 0.5;
}

.session-end:active {
    transform: scale(0.96);
}

.sessions-empty {
    padding: 18px 12px;
    border-radius: 12px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 0.85rem;
    text-align: center;
}

/* Полный экран Telegram на телефоне: всё сверху сдвигается под плавающие кнопки Telegram */

:root {
    --tg-top: 0px;
    --tg-bottom: 0px;
}

.top-bar {
    min-height: calc(var(--top-height) + var(--tg-top));
    padding-top: calc(8px + var(--tg-top));
}

.tabs {
    top: calc(var(--top-height) + var(--tg-top));
}

#tournament-market,
#winner-market {
    scroll-margin-top: calc(var(--top-height) + var(--tg-top) + 56px);
}

.notify-popup {
    top: calc(var(--top-height) + var(--tg-top) + 10px);
}

.bottom-nav {
    padding-bottom: max(env(safe-area-inset-bottom), var(--tg-bottom));
}

body.tg-fullscreen .confirm-overlay,
body.tg-fullscreen .player-modal {
    padding-top: calc(var(--tg-top) + 12px);
    padding-bottom: calc(var(--tg-bottom) + 12px);
}

.special-predict-list {
    display: grid;
    gap: 12px;
}

.special-predict-teaser {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 66px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-1);
}

.special-predict-teaser:active {
    border-color: var(--border-strong);
    background-color: var(--surface-2);
}

.special-teaser-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--text);
    font-size: 1.25rem;
    font-weight: 800;
}

.special-teaser-photo {
    flex: none;
    width: 42px;
    height: 42px;
    border: 1px solid #383838;
    border-radius: 9px;
    background: #111;
    object-fit: cover;
    object-position: 52% 32%;
}

.special-teaser-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.special-teaser-body small {
    color: var(--muted);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.special-teaser-body b {
    margin-top: 2px;
    font-size: 0.88rem;
    line-height: 1.25;
}

.special-teaser-body span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.68rem;
}

.special-predict-window {
    position: relative;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 16px;
    overflow: hidden;
    border: 1px solid #303030;
    border-radius: 12px;
    background: #101010;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.special-predict-window::before {
    content: none;
}

.special-predict-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.special-predict-title-row {
    display: flex;
    flex: 1;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    width: auto;
    min-width: 0;
}

.special-predict-title-row > div {
    flex: 1;
    min-width: 0;
}

.special-predict-photo {
    display: block;
    flex: none;
    width: 72px;
    height: 72px;
    border: 1px solid #3a3a3a;
    border-radius: 11px;
    background: #111;
    object-fit: cover;
    object-position: top center;
    box-shadow: 0 7px 18px rgba(0, 0, 0, 0.3);
}

.special-predict-head h3 {
    margin-top: 4px;
    font-size: 1.2rem;
    line-height: 1.3;
}

.special-predict-eyebrow {
    color: #b9a66d;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.special-predict-status {
    flex: none;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
}

.special-predict-status.is-open {
    background: rgba(46, 212, 122, 0.12);
    color: var(--win);
}

.special-predict-description {
    margin-top: 14px;
    padding: 11px 12px;
    border: 1px solid #292929;
    border-radius: 10px;
    background: #151515;
    color: #cecece;
    font-size: 0.84rem;
    line-height: 1.45;
}

.special-predict-dates {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    margin: 0 0 10px;
    color: var(--subtle);
    font-size: 0.66rem;
    letter-spacing: 0.025em;
}

.special-predict-dates span {
    padding: 0 14px 0 0;
    border: 0;
    background: none;
    white-space: nowrap;
}

.special-predict-dates span + span {
    padding-left: 14px;
    border-left: 1px solid #303030;
}

.special-predict-dates b {
    display: inline;
    margin-left: 3px;
    color: var(--text);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0;
}

.special-predict-window .market {
    margin-top: 16px;
    padding: 16px 0 0;
    border: 0;
    border-top: 1px solid #292929;
    border-radius: 0;
    background: transparent;
}

.special-predict-window .market-bar {
    height: 10px;
    border-radius: 999px;
}

.special-predict-window .market-bar i {
    transition: width 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}


.special-market-source {
    display: inline-block;
    margin-top: 12px;
    color: var(--muted);
    font-size: 0.78rem;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.card.is-static {
    cursor: default;
}

/* Переключатель «Показывать аватарку» в меню своей карточки */

.avatar-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    max-width: 380px;
    margin: 0 auto 10px;
    padding: 12px 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface-2);
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* Язык в настройках профиля — та же плашка, что «Показывать аватарку»; справа свой
   выпадающий список шрифтом сайта (системный список <select> шрифт не меняет) */
.language-select {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    max-width: 380px;
    margin: 0 auto 10px;
    padding: 8px 8px 8px 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface-2);
    color: var(--text);
    font-size: 0.9rem;
    text-align: left;
}

.language-select.is-open {
    z-index: 3;
}

.language-dropdown {
    position: relative;
    flex: none;
}

.language-dropdown-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 2px);
    background: var(--surface-1);
    color: var(--text);
    font: inherit;
    font-size: 0.88rem;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: border-color 0.15s ease;
}

.language-dropdown-button svg {
    color: var(--muted);
    transition: transform 0.2s ease;
}

.language-select.is-open .language-dropdown-button {
    border-color: var(--border-strong);
}

.language-select.is-open .language-dropdown-button svg {
    transform: rotate(180deg);
}

.language-dropdown-list {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 100%;
    margin: 0;
    padding: 4px;
    list-style: none;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface-1);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
    animation: language-list-in 0.14s ease-out;
}

.language-dropdown-list[hidden] {
    display: none;
}

.language-dropdown-list [role="option"] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 38px;
    padding: 0 10px 0 12px;
    border-radius: calc(var(--radius) - 3px);
    color: var(--muted);
    font-size: 0.88rem;
    white-space: nowrap;
    cursor: pointer;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.language-dropdown-list [role="option"] svg {
    visibility: hidden;
}

.language-dropdown-list [role="option"][aria-selected="true"] {
    color: var(--text);
}

.language-dropdown-list [role="option"][aria-selected="true"] svg {
    visibility: visible;
}

.language-dropdown-list [role="option"]:hover,
.language-dropdown-list [role="option"]:focus-visible,
.language-dropdown-list [role="option"]:focus {
    background: var(--surface-2);
    color: var(--text);
}

.language-dropdown-button:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 2px;
}

@keyframes language-list-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .language-dropdown-list { animation: none; }
    .language-dropdown-button svg { transition: none; }
}

.avatar-switch-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    font-size: 0.9rem;
}

.avatar-switch-text small {
    color: var(--muted);
    font-size: 0.72rem;
}

.switch-track {
    position: relative;
    flex: none;
    width: 46px;
    height: 28px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    transition: background 0.25s ease, box-shadow 0.25s ease;
}

.switch-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    transition: transform 0.28s cubic-bezier(0.3, 1.4, 0.5, 1), width 0.2s ease;
}

.avatar-switch[aria-checked="true"] .switch-track {
    background: var(--accent);
    box-shadow: 0 0 14px rgba(255, 71, 87, 0.35);
}

.avatar-switch[aria-checked="true"] .switch-thumb {
    transform: translateX(18px);
}

.avatar-switch:active .switch-thumb {
    width: 26px;
}

.avatar-switch[aria-checked="true"]:active .switch-thumb {
    transform: translateX(14px);
}

.avatar-switch.is-saving {
    cursor: progress;
}

.avatar-switch:disabled {
    opacity: 0.58;
    cursor: not-allowed;
}

.avatar-switch:disabled .switch-track {
    box-shadow: none;
}

.subscription-gate-icon {
    display: grid;
    width: 72px;
    height: 72px;
    margin: 0 auto 8px;
    place-items: center;
    border: 1px solid var(--border-strong);
    border-radius: 22px;
    background: var(--surface-2);
}

.subscription-gate-icon svg {
    width: 38px;
    height: 38px;
    fill: none;
    stroke: var(--text);
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.subscription-gate .login-gate-alt {
    border: 0;
    background: none;
    cursor: pointer;
}

.own-card-preview .profile-avatar.is-swapped {
    animation: avatar-swap 0.3s ease;
}

@keyframes avatar-swap {
    from {
        opacity: 0;
        transform: scale(0.85);
    }
}

@media (hover: hover) {
    .avatar-switch:hover {
        border-color: rgba(255, 255, 255, 0.22);
    }
}

/* ПК: заголовки внутри списка карточек (раунды, дни) — на всю ширину, карточки под ними по две */

@media (hover: hover) and (min-width: 1024px) {
    .card-list > .section-heading,
    .card-list > .day-heading,
    .card-list > h2,
    .card-list > h3 {
        grid-column: 1 / -1;
        margin-bottom: 0;
    }

    .card-list > .section-heading:not(:first-child) {
        margin-top: 8px;
    }
}

/* Без входа: вместо подсказки — кнопка входа */
.market-status.market-login {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border, #2c2c2c);
    border-radius: 10px;
    background: transparent;
    color: var(--text, #fff);
    font: inherit;
    font-size: 0.85rem;
    text-align: center;
    cursor: pointer;
}

.market-status.market-login:active {
    opacity: .7;
}

/* Техническая победа на странице матча — вместо счёта и времени */
/* Надпись стоит ровно по центру, стрелка — сбоку от неё и не сдвигает текст */
.versus-forfeit {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.versus-forfeit-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.05;
    text-transform: uppercase;
}

.versus-forfeit-arrow {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    fill: none;
    stroke: #fff;
    stroke-width: 3.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.versus-forfeit.is-left .versus-forfeit-arrow {
    right: calc(100% + 3px);
}

.versus-forfeit.is-right .versus-forfeit-arrow {
    left: calc(100% + 3px);
}


.versus-forfeit b {
    font-size: 1.25rem;
    font-weight: 700;
}

.versus-forfeit span {
    color: var(--muted);
    font-size: 0.8rem;
    letter-spacing: .04em;
}

/* Итог матча: проигравший приглушён — сразу видно, кто победил */
.versus-team.is-loser {
    opacity: .7;
}

.versus-team.is-winner span {
    color: var(--text, #fff);
}

/* Составы матча с VLR: два столбца под счётом */
.match-lineups {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-1);
}

.lineup-column {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.lineup-player {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 22px;
    font-size: 0.85rem;
    font-weight: 600;
}

.lineup-column.is-right .lineup-player {
    flex-direction: row-reverse;
    text-align: right;
}

.lineup-flag {
    flex: 0 0 auto;
    width: 16px;
    height: 11px;
    border-radius: 2px;
    object-fit: cover;
}

.lineup-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lineup-empty {
    color: var(--subtle);
    font-size: 0.85rem;
}

.lineup-column.is-right .lineup-empty {
    text-align: right;
}

/* Статистика матча с VLR: карточки карт, блок карты, раунды, таблицы команд */
.match-stats {
    --side-ct: #4ac88c;
    --side-t: #ec5c5c;
    min-width: 0;
    max-width: 100%;
    margin-top: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-1);
    overflow: hidden;
}

.match-stats-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 14px 2px;
}

.match-stats-head h2 {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
}

.match-stats-head a {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
}

/* Выбор карты: карточки с картинкой карты на фоне */
.map-cards {
    display: grid;
    grid-template-columns: repeat(var(--map-cards, 3), minmax(0, 1fr));
    gap: 6px;
    padding: 10px 10px 4px;
}

.map-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 2px;
    min-width: 0;
    height: 64px;
    padding: 8px 9px;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.8) 100%),
        var(--map-splash, none) center / cover no-repeat,
        var(--surface-2);
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    filter: saturate(0.55) brightness(0.8);
    transition: filter 0.15s ease, border-color 0.15s ease;
}

.map-card.is-all {
    justify-content: center;
    background: var(--surface-0);
}

.map-card.is-active {
    border-color: var(--text);
    box-shadow: inset 0 0 0 1px var(--text);
    filter: none;
}

.map-card-label {
    display: flex;
    align-items: baseline;
    gap: 5px;
    max-width: 100%;
    overflow: hidden;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.map-card-label i {
    color: var(--muted);
    font-style: normal;
    font-weight: 700;
}

.map-card-score {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.map-card-score .is-winner {
    color: var(--text);
}

.match-stats-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    padding: 6px 10px 12px;
}

/* Таблицы и раунды не растягивают блок шире экрана */
.match-stats-panel > * {
    min-width: 0;
    max-width: 100%;
}

/* Блок карты: картинка карты, логотипы, крупный счёт и половины */
.map-hero {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 6px;
    min-height: 128px;
    padding: 10px 12px 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-small);
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.6) 100%),
        var(--map-splash, none) center 42% / cover no-repeat,
        var(--surface-2);
}

.map-hero-name {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
}

.map-hero-name span {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.3em;
    text-transform: uppercase;
}

.map-hero-name small {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.7rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.map-hero-body {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
}

.map-hero-team {
    display: flex;
    justify-content: center;
}

.map-hero-team .logo {
    width: 44px;
    height: 44px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6));
}

.map-hero-score {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.map-hero-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 54px;
    color: rgba(255, 255, 255, 0.55);
}

.map-hero-side b {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.map-hero-side.is-winner {
    color: var(--text);
}

.map-hero-side small {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.72rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.map-hero-colon {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
}

/* Раунды на всю ширину блока */
.rounds {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    background: var(--surface-0);
}

.rounds-teams {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 2px;
    min-height: 100%;
}

.rounds-team {
    display: flex;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    width: 16px;
    max-height: 22px;
}

.rounds-team .logo {
    width: 14px;
    height: 14px;
}

.rounds-grid {
    display: flex;
    flex: 1 1 auto;
    justify-content: center;
    max-width: calc(var(--rounds, 24) * 24px + var(--round-gaps, 1) * 5px);
    gap: 2px;
    min-width: 0;
}

.round-col {
    display: flex;
    flex: 1 1 0;
    max-width: 22px;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.round-gap {
    flex: 0 0 5px;
}

.round-num {
    height: 12px;
    color: var(--subtle);
    font-size: 0.55rem;
    line-height: 12px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.rounds-teams .round-num {
    width: 16px;
}

.round-sq {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 3px;
    background: var(--surface-2);
}

.round-sq.is-ct {
    background: var(--side-ct);
}

.round-sq.is-t {
    background: var(--side-t);
}

.round-sq.is-win {
    background: var(--muted);
}

.round-sq img {
    width: 72%;
    height: 72%;
    object-fit: contain;
    filter: brightness(0);
    opacity: 0.75;
}

/* Таблица команды: тёмная шапка без белой полосы */
.stats-team {
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    background: var(--surface-0);
    overflow: hidden;
}

.stats-team-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px 6px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.stats-team-head .logo {
    width: 20px;
    height: 20px;
}

.stats-scroll {
    overflow-x: auto;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.74rem;
    font-variant-numeric: tabular-nums;
}

.stats-table th,
.stats-table td {
    padding: 7px 3px;
    white-space: nowrap;
    text-align: center;
}

.stats-table thead th {
    padding-top: 4px;
    padding-bottom: 6px;
    color: var(--subtle);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border);
}

.stats-table tbody tr + tr > * {
    border-top: 1px solid var(--surface-2);
}

.stats-table td.is-acs {
    font-weight: 800;
}

/* Разделители как на карточке: K D A | KAST | ADR | HS% | ACS */
.stats-table .is-kast,
.stats-table .is-adr,
.stats-table .is-hs,
.stats-table .is-acs {
    border-left: 1px solid var(--surface-2);
}

.stats-player-col {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--surface-0);
    text-align: left !important;
}

.stats-table .stats-player-col {
    padding-left: 7px;
}

.stats-player {
    display: flex;
    align-items: center;
    gap: 5px;
    max-width: 112px;
    font-weight: 700;
}

.stats-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stats-table .stats-agents-col {
    padding-left: 2px;
    padding-right: 6px;
    text-align: left;
}

.stats-agents {
    display: flex;
    flex: 0 0 auto;
    gap: 1px;
}

.stats-agents img {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    background: var(--surface-2);
    object-fit: cover;
}

.map-card.is-all .map-card-label {
    letter-spacing: 0;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Сыгранные карты на фоне блока счёта — как на итоговой карточке генератора */
.match-versus.has-maps {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.match-versus.has-maps > :not(.versus-maps) {
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}

.versus-maps {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: flex;
}

.versus-maps span {
    flex: 1 1 0;
    background: var(--map-splash, none) center 42% / cover no-repeat, var(--surface-2);
    filter: brightness(0.5);
}

.versus-maps span + span {
    border-left: 1px solid rgba(0, 0, 0, 0.6);
}

.versus-map-scores {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 16px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.versus-map-scores b {
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

/* Одинаковые таблицы обеих команд: фиксированная раскладка колонок */
.stats-table {
    table-layout: fixed;
    min-width: calc(80px + var(--agent-slots, 1) * 17px + 8px + 193px);
}

.stats-col-player {
    width: 80px;
}

.stats-col-k,
.stats-col-d,
.stats-col-a {
    width: 22px;
}

.stats-col-kast {
    width: 34px;
}

.stats-col-adr,
.stats-col-acs {
    width: 30px;
}

.stats-col-hs {
    width: 33px;
}

.stats-col-agents {
    width: calc(var(--agent-slots, 1) * 17px + 8px);
}

.stats-table .stats-player-col,
.stats-table .stats-agents-col {
    overflow: hidden;
}

.stats-table .stats-player {
    max-width: none;
}

.stats-table .stats-agents {
    flex-wrap: nowrap;
}

.map-hero-body {
    flex: 1 1 auto;
}

.map-hero {
    justify-content: center;
    min-height: 0;
    padding: 8px 12px;
}

.map-hero .map-hero-team .logo {
    width: 34px;
    height: 34px;
}

.map-hero .map-hero-side b {
    font-size: 1.9rem;
}

.map-hero .map-hero-colon {
    font-size: 1.6rem;
}

.map-hero .map-hero-side small {
    margin-top: 2px;
}

/* ПК: крупнее агенты, текст и счёт в статистике */
@media (min-width: 720px) {
    .match-stats-head h2 {
        font-size: 1.05rem;
    }

    .map-card {
        height: 78px;
    }

    .map-card-label {
        font-size: 0.82rem;
    }

    .map-card-score {
        font-size: 1.1rem;
    }

    .map-hero .map-hero-team .logo {
        width: 46px;
        height: 46px;
    }

    .map-hero .map-hero-side b {
        font-size: 2.4rem;
    }

    .map-hero .map-hero-side small {
        font-size: 0.8rem;
    }

    .round-num {
        font-size: 0.66rem;
    }

    .stats-team-head {
        padding: 12px 14px 8px;
        font-size: 0.95rem;
    }

    .stats-team-head .logo {
        width: 26px;
        height: 26px;
    }

    .stats-table {
        font-size: 0.92rem;
        min-width: 0;
    }

    .stats-table thead th {
        font-size: 0.74rem;
    }

    .stats-table th,
    .stats-table td {
        padding: 9px 6px;
    }

    .stats-table .stats-player-col {
        padding-left: 12px;
    }

    .stats-col-player {
        width: 150px;
    }

    .stats-col-k,
    .stats-col-d,
    .stats-col-a {
        width: 38px;
    }

    .stats-col-kast,
    .stats-col-hs {
        width: 54px;
    }

    .stats-col-adr,
    .stats-col-acs {
        width: 50px;
    }

    .stats-col-agents {
        width: calc(var(--agent-slots, 1) * 30px + 12px);
    }

    .stats-agents {
        gap: 3px;
    }

    .stats-agents img {
        width: 27px;
        height: 27px;
        border-radius: 4px;
    }

    .stats-table .lineup-flag {
        width: 20px;
        height: 14px;
    }
}

/* Счёт проигравшей стороны — почти белый, победитель — чисто белый */
.map-hero-side,
.map-hero .map-hero-side {
    color: rgba(255, 255, 255, 0.86);
}

.map-card-score {
    color: #d6d6d6;
}

/* Логотип полностью чёрный (чёрный значок на прозрачном фоне) — красим в белый */
img.logo.is-dark-logo {
    filter: brightness(0) invert(1);
}

/* Агенты в таблице — без подложки и скруглений */
.stats-agents img,
.stats-table .stats-agents img {
    border-radius: 0;
    background: none;
}

/* Карточки карт: счёт крупнее */
.map-card-score {
    font-size: 1.3rem;
    line-height: 1.1;
}

.map-card.is-active .map-card-score {
    font-size: 1.45rem;
}

@media (min-width: 720px) {
    .map-card-score {
        font-size: 1.5rem;
    }

    .map-card.is-active .map-card-score {
        font-size: 1.7rem;
    }
}

/* Таблица статистики v2: ник целиком, разницы цветом, на телефоне — прокрутка вправо */
.match-stats {
    width: 100%;
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}

.stats-table {
    width: 100%;
    min-width: calc(var(--name-chars, 8) * 1ch + 40px + var(--agent-slots, 1) * 19px + 8px + 11 * 34px);
}

.stats-col-player {
    width: calc(var(--name-chars, 8) * 1ch + 40px);
}

.stats-col-k,
.stats-col-d,
.stats-col-a,
.stats-col-kd,
.stats-col-fk,
.stats-col-fd,
.stats-col-fkd {
    width: 30px;
}

.stats-col-kast,
.stats-col-hs {
    width: 40px;
}

.stats-col-adr,
.stats-col-acs {
    width: 36px;
}

.stats-table .stats-player-col,
.stats-table .stats-player {
    overflow: visible;
    max-width: none;
}

.stats-table .stats-name {
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
}

.stats-table td.is-positive {
    color: var(--win, #2ed47a);
}

.stats-table td.is-negative {
    color: var(--accent, #ff4757);
}

.stats-table .is-kd,
.stats-table .is-fk {
    border-left: 1px solid var(--surface-2);
}

/* Тень у закреплённой колонки ника, когда таблица прокручена вправо */
.stats-scroll .stats-player-col {
    box-shadow: 1px 0 0 var(--surface-2);
}

/* Раунды на телефоне крупнее; не влезают — прокрутка вправо */
.rounds-grid {
    overflow-x: auto;
    justify-content: flex-start;
    scrollbar-width: thin;
}

.round-col {
    flex: 0 0 18px;
    max-width: none;
}

.round-sq img {
    width: 78%;
    height: 78%;
}

.rounds-team {
    max-height: none;
    height: 18px;
    flex: 0 0 18px;
}

@media (min-width: 720px) {
    .stats-table {
        min-width: 0;
    }

    .stats-col-player {
        width: calc(var(--name-chars, 8) * 1ch + 48px);
    }

    .stats-col-k,
    .stats-col-d,
    .stats-col-a,
    .stats-col-kd,
    .stats-col-fk,
    .stats-col-fd,
    .stats-col-fkd {
        width: 40px;
    }

    .stats-col-kast,
    .stats-col-hs {
        width: 54px;
    }

    .stats-col-adr,
    .stats-col-acs {
        width: 50px;
    }

    .rounds-grid {
        justify-content: center;
    }

    .round-col {
        flex: 0 0 24px;
    }

    .rounds-team {
        height: 24px;
        flex: 0 0 24px;
    }
}

/* ACS — первая колонка цифр: разделитель после неё, а не перед */
.stats-table .is-acs {
    border-left: 0;
    border-right: 1px solid var(--surface-2);
}

/* Две таблицы листаются вместе: общий горизонтальный скролл */
.stats-tables-scroll {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: thin;
}

/* Обе таблицы одной ширины: минимум считается один раз на общем контейнере */
.stats-tables-scroll {
    --stats-min: calc(var(--name-chars, 8) * 1ch + 40px + var(--agent-slots, 1) * 24px + 8px + 11 * 34px);
}

.stats-tables-scroll > .stats-team {
    min-width: var(--stats-min);
    overflow: visible;
}

.stats-tables-scroll .stats-team-head {
    position: sticky;
    left: 0;
    width: fit-content;
}

.stats-table-wrap {
    background: var(--surface-0);
}

.stats-tables-scroll .stats-table {
    width: 100%;
    min-width: 0;
}

/* Линия слева и справа от ACS */
.stats-table .is-acs {
    border-left: 1px solid var(--surface-2);
    border-right: 1px solid var(--surface-2);
}

/* Агенты крупнее — до линии ACS; остальной текст прежний */
.stats-col-agents {
    width: calc(var(--agent-slots, 1) * 24px + 8px);
}

.stats-agents img,
.stats-table .stats-agents img {
    width: 22px;
    height: 22px;
}

/* История раундов: иконки мельче */
.round-sq img {
    width: 58%;
    height: 58%;
}

/* Карты на фоне счёта: без разделителей, темнее */
.versus-maps span {
    filter: brightness(0.38);
}

.versus-maps span + span {
    border-left: 0;
}

.versus-maps span.is-tbd {
    background: var(--surface-2);
    filter: none;
}

/* Счёт матча крупнее */
.match-versus .versus-score {
    font-size: 2.6rem;
}

/* Карточка карты, которой ещё нет на VLR */
.map-card.is-tbd {
    justify-content: center;
    background: var(--surface-0);
    color: var(--muted);
    cursor: default;
    filter: none;
}

@media (min-width: 720px) {
    .stats-tables-scroll {
        --stats-min: calc(var(--name-chars, 8) * 1ch + 48px + var(--agent-slots, 1) * 37px + 12px + 7 * 40px + 4 * 52px);
    }

    .stats-col-agents {
        width: calc(var(--agent-slots, 1) * 37px + 12px);
    }

    .stats-agents img,
    .stats-table .stats-agents img {
        width: 34px;
        height: 34px;
    }

    .match-versus .versus-score {
        font-size: 3.2rem;
    }
}

/* Колонка ника: ширина ника (в em, измерена шрифтом сайта) + флаг и отступы, без запаса */
.stats-col-player {
    width: calc(var(--name-chars, 6) * 1em + 34px);
}

.stats-tables-scroll {
    --stats-min: calc(var(--name-chars, 6) * 0.74rem + 34px + var(--agent-slots, 1) * 24px + 8px + 11 * 34px);
}

.stats-table .stats-agents-col {
    padding-left: 0;
}

/* Всё листается вместе: ник и название команды не закреплены слева */
.stats-player-col,
.stats-tables-scroll .stats-team-head {
    position: static;
}

.stats-scroll .stats-player-col {
    box-shadow: none;
}

@media (min-width: 720px) {
    .stats-col-player {
        width: calc(var(--name-chars, 6) * 1em + 44px);
    }

    .stats-tables-scroll {
        --stats-min: calc(var(--name-chars, 6) * 0.92rem + 44px + var(--agent-slots, 1) * 37px + 12px + 7 * 40px + 4 * 52px);
    }
}

/* История раундов: иконка в клетке крупнее */
.round-sq img {
    width: 80%;
    height: 80%;
}

/* Линия перед FK−FD (+/–) */
.stats-table .is-fkd {
    border-left: 1px solid var(--surface-2);
}

/* Блок счёта с картами — той же ширины, что и статистика */
.match-versus.has-maps {
    width: 100%;
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* Сетка: время матча по левому краю под карточкой, а не по центру */
.bracket-time {
    padding-left: 4px;
    text-align: left;
}

/* Ник → агенты: отступ чуть больше */
.stats-table .stats-agents-col {
    padding-left: 8px;
}

.stats-col-player {
    width: calc(var(--name-chars, 6) * 1em + 42px);
}

@media (min-width: 720px) {
    .stats-table .stats-agents-col {
        padding-left: 10px;
    }

    .stats-col-player {
        width: calc(var(--name-chars, 6) * 1em + 54px);
    }
}

/* Название команды не уезжает при прокрутке таблиц вправо */
.stats-tables-scroll .stats-team-head {
    position: sticky;
    left: 0;
    z-index: 2;
    width: fit-content;
}

/* Счёт матча на телефоне чуть мельче (на ПК остаётся 3.2rem) */
@media (max-width: 719px) {
    .match-versus .versus-score {
        font-size: 2.1rem;
    }
}

/* Ссылка на турнир — по левому краю блока счёта с картами (он шириной до 980px по центру) */
.match-tournament-link:has(+ .match-versus.has-maps) {
    margin-left: calc(max(0px, (100% - 980px) / 2) + 2px);
}

/* ПК: иконки агентов чуть меньше (было 34px) */
@media (min-width: 720px) {
    .stats-agents img,
    .stats-table .stats-agents img {
        width: 28px;
        height: 28px;
    }

    .stats-col-agents {
        width: calc(var(--agent-slots, 1) * 31px + 14px);
    }

    .stats-tables-scroll {
        --stats-min: calc(var(--name-chars, 6) * 0.92rem + 54px + var(--agent-slots, 1) * 31px + 14px + 7 * 40px + 4 * 52px);
    }
}

/* Карточки карт: размер как при трёх карточках (Все карты + 2 карты); больше карт —
   карточки не сжимаются, а листаются вправо */
.map-cards {
    display: flex;
    overflow-x: auto;
    scrollbar-width: thin;
}

.map-cards > .map-card {
    flex: 0 0 calc((100% - 12px) / 3);
}

/* Между агентами и ACS линии нет — только справа от ACS */
.stats-table .is-acs {
    border-left: 0;
}

/* ПК: история раундов на всю ширину блока, без ограничения — клетки делят ширину поровну */
@media (min-width: 720px) {
    .rounds {
        align-items: stretch;
    }

    .rounds-grid {
        max-width: none;
        overflow-x: visible;
        justify-content: stretch;
    }

    .round-col {
        flex: 1 1 0;
        min-width: 0;
        max-width: none;
    }

    .rounds-teams {
        justify-content: stretch;
    }

    .rounds-team {
        flex: 1 1 0;
        height: auto;
        max-height: none;
    }

    .rounds-team .logo {
        width: 20px;
        height: 20px;
    }
}

/* ПК: клетки раундов умеренного размера (до 34px), полоска по центру; места мало — сжимаются */
@media (min-width: 720px) {
    .rounds {
        justify-content: center;
    }

    .rounds-grid {
        flex: 0 1 auto;
        justify-content: center;
    }

    .round-col {
        flex: 0 1 34px;
    }

    .round-gap {
        flex: 0 0 10px;
    }
}

/* ПК: клетки раундов ещё меньше — до 24px */
@media (min-width: 720px) {
    .round-col {
        flex: 0 1 24px;
    }

    .round-gap {
        flex: 0 0 8px;
    }

    .rounds-team .logo {
        width: 16px;
        height: 16px;
    }
}

/* ПК: клетки раундов ещё чуть меньше (20px), логотипы команд крупнее и вплотную к клеткам */
@media (min-width: 720px) {
    .round-col {
        flex: 0 1 20px;
    }

    .round-gap {
        flex: 0 0 6px;
    }

    .rounds {
        gap: 3px;
    }

    .rounds-team {
        width: 22px;
    }

    .rounds-team .logo {
        width: 20px;
        height: 20px;
    }
}

/* Логотипы команд вплотную к клеткам раундов: колонка логотипов по ширине логотипа,
   прижата вправо, полоска не растягивается (логотипы всегда рядом с клетками) */
.rounds {
    gap: 2px;
}

.rounds-teams,
.rounds-grid {
    flex: 0 1 auto;
}

.rounds-teams {
    flex: 0 0 auto;
    align-items: flex-end;
}

.rounds-team {
    width: auto;
    justify-content: flex-end;
}

/* Логотипы команд — первый столбец внутри полоски раундов: вплотную к клеткам,
   ровно той же высоты, что клетки */
.round-col.is-teams {
    margin-right: 2px;
}

.round-team {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1;
}

.round-team .logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Ник и агенты закреплены слева, остальные колонки листаются под ними.
   Отступ колонки агентов = ширина колонки ника (та же формула, что у <col>) */
.stats-table .stats-player-col,
.stats-table .stats-agents-col {
    position: sticky;
    z-index: 1;
    background: var(--surface-0);
}

.stats-table .stats-player-col {
    left: 0;
}

.stats-table .stats-agents-col {
    left: calc(var(--name-chars, 6) * 1em + 42px);
    box-shadow: 6px 0 6px -6px rgba(0, 0, 0, 0.9);
}

@media (min-width: 720px) {
    .stats-table .stats-agents-col {
        left: calc(var(--name-chars, 6) * 1em + 54px);
    }
}

/* История раундов всегда прижата к левому краю */
.rounds,
.rounds-grid {
    justify-content: flex-start;
}

@media (min-width: 720px) {
    .rounds,
    .rounds-grid {
        justify-content: flex-start;
    }
}

/* «Все карты» — узкая карточка; карточки карт делят остальное место (две на экран, дальше — прокрутка) */
.map-cards > .map-card.is-all {
    flex: 0 0 96px;
    align-items: center;
    padding: 8px 6px;
    text-align: center;
}

.map-cards > .map-card.is-all .map-card-label {
    white-space: normal;
    justify-content: center;
    line-height: 1.2;
}

.map-cards > .map-card:not(.is-all) {
    flex: 0 0 calc((100% - 96px - 12px) / 2);
}

@media (min-width: 720px) {
    .map-cards > .map-card.is-all {
        flex-basis: 120px;
    }

    .map-cards > .map-card:not(.is-all) {
        flex-basis: calc((100% - 120px - 12px) / 2);
    }
}

/* ПК: карточки карт тех же пропорций, что на телефоне (~1.8:1), а не на всю ширину */
@media (min-width: 720px) {
    .map-cards > .map-card.is-all {
        flex-basis: 104px;
    }

    .map-cards > .map-card:not(.is-all) {
        flex-basis: 150px;
    }

    .map-card {
        height: 82px;
    }
}

/* Телефон: карточки карт чуть уже, фиксированной ширины (лишние — прокрутка вправо) */
@media (max-width: 719px) {
    .map-cards > .map-card.is-all {
        flex-basis: 84px;
    }

    .map-cards > .map-card:not(.is-all) {
        flex-basis: 104px;
    }
}

/* Трансляции/записи матча — той же ширины, что блоки счёта и статистики (до 980px, по центру) */
.match-media {
    width: 100%;
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* История раундов на 100% ширины блока: слева логотип и название команды
   (на телефоне — код), клетки делят остальную ширину поровну */
.rounds {
    display: block;
}

.rounds-grid,
.rounds-grid {
    display: flex;
    align-items: stretch;
    width: 100%;
    max-width: none;
    gap: 2px;
}

.rounds-grid > .round-col {
    flex: 1 1 0;
    min-width: 13px;
    max-width: none;
}

.rounds-grid > .round-col.is-teams {
    flex: 0 0 auto;
    min-width: 0;
    margin-right: 4px;
}

.round-team {
    flex: 1 1 0;
    aspect-ratio: auto;
    width: auto;
    gap: 6px;
    justify-content: flex-start;
    padding-right: 4px;
    min-height: 0;
}

.round-team .logo {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
}

.round-team b {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    white-space: nowrap;
    text-transform: uppercase;
}

.round-team-name {
    display: none;
}

.round-gap {
    flex: 0 0 6px;
}

@media (min-width: 720px) {
    .rounds-grid > .round-col {
        flex: 1 1 0;
        max-width: none;
    }

    .round-team .logo {
        width: 22px;
        height: 22px;
    }

    .round-team b {
        font-size: 0.82rem;
    }

    .round-team-name {
        display: inline;
    }

    .round-team-code {
        display: none;
    }

    .round-gap {
        flex: 0 0 10px;
    }
}

/* Телефон: клетки раундов крупнее (22px), не влезают — листаются вправо */
@media (max-width: 719px) {
    .rounds-grid {
        overflow-x: auto;
    }

    .rounds-grid > .round-col {
        flex: 0 0 22px;
    }

    .round-team .logo {
        width: 18px;
        height: 18px;
    }
}

/* Телефон: клетки раундов средние — 17px (меньше, чем 22, но крупнее исходных 13) */
@media (max-width: 719px) {
    .rounds-grid > .round-col {
        flex: 0 0 17px;
    }

    .round-team .logo {
        width: 16px;
        height: 16px;
    }
}

/* ПК: полоска на всю ширину, но клетки невысокие (22px) — иконки небольшие */
@media (min-width: 720px) {
    .rounds-grid > .round-col:not(.is-teams) .round-sq {
        aspect-ratio: auto;
        height: 22px;
    }

    .rounds-grid > .round-col:not(.is-teams) .round-sq img {
        width: auto;
        height: 70%;
    }

    .round-team .logo {
        width: 18px;
        height: 18px;
    }

    .round-team b {
        font-size: 0.74rem;
    }
}

/* Страница матча: все блоки одной ширины (до 1340px, по центру) — и с картами, и без
   (будущий матч, состав, трансляции). Шапка — как на остальных страницах */
:root {
    --match-max: 1340px;
}

.match-versus,
.match-versus.has-maps,
.match-lineups,
.match-meta,
#match-market,
.match-stats,
.match-media {
    width: 100%;
    max-width: var(--match-max);
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.match-tournament-link,
.match-tournament-link:has(+ .match-versus.has-maps) {
    margin-left: calc(max(0px, (100% - var(--match-max)) / 2) + 2px);
}


/* Ширина блоков страницы матча — 1140px */
:root {
    --match-max: 940px;
}
