/* ============================================================
   World Cup 2026 — Bracket
   Scout Hub surface · JetBrains Mono display · IBM Plex body
   ============================================================ */

:root {
    --font-display: 'JetBrains Mono', monospace;
    --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-poppins: 'Poppins', var(--font-body);

    --bg-base: #000;
    --bg-elevated: #0A0A0A;
    --bg-interactive: #141414;
    --bg-raised: #1a1a1a;
    --bg-hover: rgba(255,255,255,0.04);

    --text-primary: rgba(255,255,255,0.92);
    --text-secondary: rgba(255,255,255,0.62);
    --text-tertiary: rgba(255,255,255,0.42);
    --text-muted: rgba(255,255,255,0.28);

    --border-subtle: rgba(255,255,255,0.08);
    --border-medium: rgba(255,255,255,0.14);
    --border-strong: rgba(255,255,255,0.22);

    --accent: #4DB8D4;
    --accent-soft: rgba(77,184,212,0.14);
    --accent-border: rgba(77,184,212,0.35);
    --success: #3DA66E;
    --success-soft: rgba(61,166,110,0.18);
    --warning: #D97B4A;
    --warning-soft: rgba(217,123,74,0.18);
    --critical: #ef4444;
    --critical-soft: rgba(239,68,68,0.18);
    --lime: #A8CC33;
    --lime-soft: rgba(168,204,51,0.16);

    --brand-orange: #E8652E;
    --brand-orange-deep: #C24D1C;
    --brand-orange-soft: rgba(232,101,46,0.16);
    --brand-orange-border: rgba(232,101,46,0.40);

    --gold: #F0C03D;
    --gold-deep: #B58515;
    --gold-soft: rgba(240,192,61,0.14);
    --gold-border: rgba(240,192,61,0.40);

    --grid-pattern: rgba(255,255,255,0.025);

    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-pill: 999px;

    --transition-fast: 150ms cubic-bezier(0.4,0,0.2,1);
    --transition-base: 200ms cubic-bezier(0.4,0,0.2,1);
    --transition-reveal: 280ms cubic-bezier(0.4,0,0.2,1);
}

/* Light theme overrides */
[data-theme="light"] {
    --bg-base: #FAFAF9;
    --bg-elevated: #FFFFFF;
    --bg-interactive: #F5F5F4;
    --bg-raised: #FFFFFF;
    --bg-hover: rgba(0,0,0,0.04);

    --text-primary: #0C0C0C;
    --text-secondary: #525252;
    --text-tertiary: #8A8A8A;
    --text-muted: rgba(0,0,0,0.30);

    --border-subtle: #E8E8E6;
    --border-medium: #D4D4D2;
    --border-strong: #A8A8A6;

    --accent: #0E7490;
    --accent-soft: rgba(14,116,144,0.10);
    --accent-border: rgba(14,116,144,0.35);

    --grid-pattern: rgba(0,0,0,0.025);

    --brand-orange-soft: rgba(232,101,46,0.10);
    --gold-soft: rgba(181,133,21,0.12);
    --gold-border: rgba(181,133,21,0.40);
    --gold: #B58515;
}

[data-motion="reduce"] *,
[data-motion="reduce"] *::before,
[data-motion="reduce"] *::after {
    transition-duration: 0ms !important;
    animation-duration: 0ms !important;
    animation-iteration-count: 1 !important;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
    font-family: var(--font-body);
    background: var(--bg-base);
    background-image:
        linear-gradient(var(--grid-pattern) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-pattern) 1px, transparent 1px);
    background-size: 20px 20px;
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.5;
    letter-spacing: -0.011em;
    min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { display: block; max-width: 100%; }
.mono { font-family: var(--font-display); }
.caps { text-transform: uppercase; letter-spacing: 0.08em; }

/* ============================================================
   NAVBAR  (matches Nations Hub)
   ============================================================ */
.navbar {
    height: 64px; position: sticky; top: 0; z-index: 200;
    background: linear-gradient(180deg, rgba(8,5,10,0.95) 0%, rgba(8,5,10,0.85) 100%);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 32px;
}
[data-theme="light"] .navbar {
    background: linear-gradient(180deg, rgba(250,250,249,0.95) 0%, rgba(250,250,249,0.85) 100%);
}
.navbar-left { display: flex; align-items: center; gap: 32px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: -0.01em; color: var(--text-primary); }
.brand-logo {
    width: 28px; height: 28px; border-radius: 7px;
    background: linear-gradient(135deg, var(--brand-orange) 0%, #3FB8F5 100%);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-size: 14px; font-weight: 800; color: #000;
}
.navbar-nav { display: flex; gap: 6px; }
.navbar-nav-item {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 7px 11px; border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 500; color: var(--text-secondary);
    transition: all var(--transition-fast);
}
.navbar-nav-item:hover { color: var(--text-primary); background: var(--bg-hover); }
.navbar-nav-item i { font-size: 11px; color: var(--brand-orange); opacity: 0.85; }
.navbar-right { display: flex; align-items: center; gap: 14px; }
.nav-search { position: relative; width: 240px; }
.nav-search input {
    width: 100%; height: 36px; padding: 0 36px 0 12px;
    background: var(--bg-elevated); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm); color: var(--text-primary);
    font: inherit; font-size: 13px;
}
.nav-search input::placeholder { color: var(--text-tertiary); }
.nav-search input:focus { outline: none; border-color: var(--accent-border); box-shadow: 0 0 0 3px var(--accent-soft); }
.nav-search i { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-tertiary); font-size: 12px; }
.btn-primary {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 14px; border-radius: var(--radius-sm);
    background: var(--brand-orange); color: #fff; font-weight: 600; font-size: 13px;
    transition: all var(--transition-fast);
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* ============================================================
   LAYOUT
   ============================================================ */
.hub { display: flex; min-height: calc(100vh - 64px); }

.sidebar {
    width: 232px; flex-shrink: 0;
    background: var(--bg-elevated);
    border-right: 1px solid var(--border-subtle);
    position: sticky; top: 64px;
    height: calc(100vh - 64px);
    display: flex; flex-direction: column;
    overflow-y: auto;
}
.sb-identity {
    padding: 22px 16px 18px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
}
.sb-logo {
    width: 56px; height: 56px; border-radius: 12px;
    background: linear-gradient(135deg, var(--brand-orange) 0%, var(--brand-orange-deep) 100%);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-weight: 800; font-size: 22px; color: #fff;
    box-shadow: 0 6px 16px rgba(232,101,46,0.4);
}
.sb-name { font-family: var(--font-display); font-size: 14px; font-weight: 700; letter-spacing: -0.01em; }
.sb-hosts { display: flex; align-items: center; gap: 4px; font-family: var(--font-display); font-size: 10px; font-weight: 600; letter-spacing: 0.06em; color: var(--text-tertiary); }
.sb-hosts .host.usa { color: #ef4444; }
.sb-hosts .host.mex { color: var(--accent); }
.sb-hosts .host.can { color: #ef4444; }
.sb-teams { font-size: 11px; color: var(--text-tertiary); }
.sb-status {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: var(--radius-pill);
    background: var(--warning-soft); color: var(--warning);
    border: 1px solid rgba(217,123,74,0.30);
    font-family: var(--font-display); font-size: 10px; font-weight: 600; letter-spacing: 0.06em;
}
.sb-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; }
.sb-nav { flex: 1; padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; }
.sb-nav-divider { padding: 12px 12px 4px; font-family: var(--font-display); font-size: 9.5px; font-weight: 600; letter-spacing: 0.10em; color: var(--text-tertiary); text-transform: uppercase; }
.sb-nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 500; color: var(--text-secondary);
    transition: all var(--transition-fast);
}
.sb-nav-item:hover { background: var(--bg-interactive); color: var(--text-primary); }
.sb-nav-item.active { background: var(--text-primary); color: var(--bg-base); }
.sb-nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }

.main { flex: 1; min-width: 0; padding: 24px 32px 100px; }

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--border-subtle); margin-bottom: 24px; }
.page-head h1 {
    font-family: var(--font-poppins);
    font-size: 38px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05;
    color: var(--text-primary);
}
.page-kicker {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--font-display); font-size: 10.5px; font-weight: 700;
    letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-tertiary);
    margin-bottom: 8px;
}
.page-kicker .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--brand-orange); }
.page-sub { font-size: 13.5px; color: var(--text-secondary); margin-top: 6px; max-width: 640px; }

.page-toolbar { display: flex; align-items: center; gap: 8px; }
.tb-btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 12px; border-radius: var(--radius-sm);
    background: var(--bg-elevated); border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-family: var(--font-display); font-size: 11px; font-weight: 600;
    letter-spacing: 0.06em; text-transform: uppercase;
    transition: all var(--transition-fast);
}
.tb-btn:hover { color: var(--text-primary); border-color: var(--border-medium); background: var(--bg-interactive); }
.tb-btn i { font-size: 11px; }
.tb-btn.danger:hover { color: var(--critical); border-color: rgba(239,68,68,0.30); }
.tb-divider { width: 1px; height: 18px; background: var(--border-subtle); margin: 0 2px; }

/* ============================================================
   RULES / META STRIP
   ============================================================ */
.meta-strip {
    display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
    padding: 12px 16px;
    background: var(--bg-elevated); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}
.meta-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-secondary); }
.meta-item .lbl { font-family: var(--font-display); font-size: 9.5px; font-weight: 700; letter-spacing: 0.10em; text-transform: uppercase; color: var(--text-tertiary); }
.meta-item .val { color: var(--text-primary); font-weight: 600; font-family: var(--font-display); }
.meta-item.right { margin-left: auto; }
.meta-rules-link { color: var(--accent); font-size: 12px; font-weight: 600; }

/* ============================================================
   ZONE HEADER  (Groups / Knockout)
   ============================================================ */
.zone-head { display: flex; align-items: baseline; gap: 14px; margin: 8px 0 16px; }
.zone-head h2 {
    font-family: var(--font-poppins); font-size: 22px; font-weight: 700;
    letter-spacing: -0.02em; color: var(--text-primary);
}
.zone-head .crumb { font-family: var(--font-display); font-size: 10.5px; font-weight: 700; letter-spacing: 0.10em; text-transform: uppercase; color: var(--text-tertiary); }
.zone-head .count { font-family: var(--font-display); font-size: 11.5px; color: var(--text-tertiary); margin-left: auto; }
.zone-head .count strong { color: var(--text-primary); font-weight: 700; }
.zone-head .zone-actions { display: flex; gap: 8px; margin-left: auto; }

/* ============================================================
   GROUPS PREDICTOR ZONE
   ============================================================ */
.groups-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
    margin-bottom: 36px;
}
@media (max-width: 1280px) { .groups-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px)  { .groups-grid { grid-template-columns: repeat(2, 1fr); } }

.group-card {
    --accent-line: var(--text-tertiary);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px 14px 12px;
    position: relative; cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast);
    overflow: hidden;
}
.group-card::before {
    content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 2px;
    background: var(--accent-line); border-radius: 0 2px 2px 0;
}
.group-card:hover { border-color: var(--border-medium); background: var(--bg-interactive); }
.group-card.expanded { border-color: var(--border-medium); background: var(--bg-interactive); cursor: default; }
.group-card.locked { background: var(--bg-base); border-style: dashed; }

.gc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.gc-title { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 12px; font-weight: 700; letter-spacing: 0.10em; text-transform: uppercase; color: var(--text-primary); }
.gc-title .gc-letter { font-size: 13px; font-weight: 800; color: var(--text-primary); }
.gc-title .gc-state { font-size: 9.5px; font-weight: 600; color: var(--text-tertiary); padding: 2px 6px; border-radius: var(--radius-xs); background: var(--bg-base); border: 1px solid var(--border-subtle); }
.gc-title .gc-state.live { color: var(--brand-orange); border-color: var(--brand-orange-border); background: var(--brand-orange-soft); }
.gc-title .gc-state.final-lbl { color: var(--text-secondary); }
.gc-actions { display: flex; align-items: center; gap: 4px; color: var(--text-tertiary); }
.gc-actions i { font-size: 11px; }
.gc-actions button { padding: 4px 6px; border-radius: var(--radius-xs); color: inherit; }
.gc-actions button:hover { color: var(--text-primary); background: var(--bg-hover); }

/* collapsed teams listing — 2x2 grid */
.gc-teams { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 6px 10px; }
.gc-team { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-primary); font-weight: 500; line-height: 1.15; min-width: 0; }
.gc-team .rank { font-family: var(--font-display); font-size: 10px; font-weight: 700; color: var(--text-tertiary); width: 11px; flex-shrink: 0; }
.gc-team.picked .rank { color: var(--brand-orange); }
.gc-team.picked .rank::after { content: ' ✓'; font-size: 8.5px; }
.gc-team .flag { width: 16px; height: 12px; border-radius: 2px; object-fit: cover; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05); background: var(--bg-base); }
.gc-team .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.gc-team.rank-3, .gc-team.rank-4 { color: var(--text-secondary); font-size: 11px; }
.gc-team.rank-3 .flag, .gc-team.rank-4 .flag { width: 14px; height: 10px; }
.gc-team.rank-3 { opacity: 0.92; }
.gc-team.rank-4 { opacity: 0.78; }
.gc-team.crashed-out { opacity: 0.45; }
.gc-team.crashed-out .nm { text-decoration: line-through; }

.group-card.unpicked .gc-team .rank { color: var(--text-tertiary); }
.group-card.unpicked .gc-cta { margin-top: 10px; }
.gc-cta {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: var(--font-display); font-size: 10px; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--brand-orange);
}
.gc-cta i { font-size: 10px; }

/* expanded edit list */
.gc-edit { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.gc-row {
    display: grid; grid-template-columns: 18px 18px 1fr auto; align-items: center;
    gap: 10px; padding: 7px 6px;
    border-radius: var(--radius-xs);
    background: var(--bg-base); border: 1px solid var(--border-subtle);
}
.gc-row .pos { font-family: var(--font-display); font-size: 11px; font-weight: 700; color: var(--brand-orange); text-align: center; }
.gc-row .flag { width: 18px; height: 13px; border-radius: 2px; object-fit: cover; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05); }
.gc-row .name { font-size: 12.5px; color: var(--text-primary); font-weight: 500; }
.gc-row .ranknum { font-family: var(--font-display); font-size: 9.5px; color: var(--text-tertiary); margin-left: 6px; font-weight: 600; }
.gc-arrows { display: flex; gap: 2px; color: var(--text-tertiary); }
.gc-arrows button { padding: 4px 6px; border-radius: var(--radius-xs); font-size: 10px; }
.gc-arrows button:hover { color: var(--text-primary); background: var(--bg-hover); }
.gc-arrows button:disabled { opacity: 0.3; cursor: default; }
.gc-row.qualifies::before { content: ''; position: absolute; }
.gc-row.qualifies { box-shadow: inset 2px 0 0 var(--brand-orange); }

.gc-edit-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 8px; }
.gc-autofill {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: var(--font-display); font-size: 10px; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--text-secondary);
    padding: 6px 10px; border-radius: var(--radius-xs);
    background: var(--bg-base); border: 1px solid var(--border-subtle);
    transition: all var(--transition-fast);
}
.gc-autofill:hover { color: var(--text-primary); border-color: var(--border-medium); }
.gc-done { color: var(--brand-orange); font-family: var(--font-display); font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 6px 8px; }

.gc-locked-foot {
    margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border-subtle);
    font-size: 11px; color: var(--text-tertiary); display: flex; align-items: center; gap: 6px;
}
.gc-locked-foot .yp-lbl { font-family: var(--font-display); font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; }
.gc-locked-foot .yp-val { color: var(--text-secondary); }
.gc-locked-foot .yp-diff { color: var(--warning); margin-left: auto; }
.gc-locked-foot .yp-diff.match { color: var(--success); }

/* ============================================================
   KNOCKOUT TREE
   ============================================================ */
.tree-wrap {
    margin-top: 12px;
    background:
        radial-gradient(ellipse 90% 60% at 50% 50%, rgba(232,101,46,0.05), transparent 60%),
        var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px 12px 28px;
    overflow: hidden;
    position: relative;
}
.tree-wrap.fit-width {
    overflow: hidden;
}
.tree-wrap::-webkit-scrollbar { height: 10px; }
.tree-wrap::-webkit-scrollbar-track { background: transparent; }
.tree-wrap::-webkit-scrollbar-thumb { background: var(--border-subtle); border-radius: 6px; }

.tree {
    --tile-w: 156px;
    --tile-h: 96px;        /* 2 team rows (37px each) + 22px kickoff foot */
    --col-gap: 26px;
    --pitch: 108px;        /* R32 vertical pitch = tile-h + 12px gap */
    --final-w: 196px;      /* +25% */
    --final-h: 168px;
    /* Tree height: 8 R32 ties × 108px pitch = 864px - 12px last gap + 24px top */
    --tree-h: 876px;
    --conn: rgba(255,255,255,0.40);
    --conn-w: 1.5px;
    position: absolute;
    left: 50%;
    top: 24px;
    transform: translateX(-50%);
    transform-origin: top center;
    width: calc(var(--final-w) + 8 * var(--tile-w) + 9 * var(--col-gap));
    height: var(--tree-h);
}
[data-theme="light"] .tree { --conn: rgba(0,0,0,0.40); }

.stage-col {
    position: absolute; top: 0; bottom: 0;
}
.stage-col .stage-lbl {
    position: absolute; top: -20px; left: 50%; transform: translateX(-50%);
    font-family: var(--font-display); font-size: 9.5px; font-weight: 700;
    letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-tertiary);
    white-space: nowrap;
}

/* column x-positions */
.col-L1 { left: 0;                                                          width: var(--tile-w); }
.col-L2 { left: calc(1*(var(--tile-w) + var(--col-gap)));                   width: var(--tile-w); }
.col-L3 { left: calc(2*(var(--tile-w) + var(--col-gap)));                   width: var(--tile-w); }
.col-L4 { left: calc(3*(var(--tile-w) + var(--col-gap)));                   width: var(--tile-w); }
.col-F  { left: calc(4*(var(--tile-w) + var(--col-gap)));                   width: var(--final-w); top: 0; bottom: 0; }
.col-R4 { left: calc(4*(var(--tile-w) + var(--col-gap)) + var(--final-w) + var(--col-gap));                                                    width: var(--tile-w); }
.col-R3 { left: calc(5*(var(--tile-w) + var(--col-gap)) + var(--final-w) + var(--col-gap));                                                    width: var(--tile-w); }
.col-R2 { left: calc(6*(var(--tile-w) + var(--col-gap)) + var(--final-w) + var(--col-gap));                                                    width: var(--tile-w); }
.col-R1 { left: calc(7*(var(--tile-w) + var(--col-gap)) + var(--final-w) + var(--col-gap));                                                    width: var(--tile-w); }

/* tile vertical positions — math: pitch 78, tile h 64. R32: i*78. R16: i*156+39. QF: i*312+117. SF: 273 */
.tile { position: absolute; width: 100%; }
.r32 { height: var(--tile-h); }
.r32.t0 { top: 0; }
.r32.t1 { top: 108px; }
.r32.t2 { top: 216px; }
.r32.t3 { top: 324px; }
.r32.t4 { top: 432px; }
.r32.t5 { top: 540px; }
.r32.t6 { top: 648px; }
.r32.t7 { top: 756px; }

.r16 { height: var(--tile-h); }
.r16.t0 { top: 54px; }
.r16.t1 { top: 270px; }
.r16.t2 { top: 486px; }
.r16.t3 { top: 702px; }

.qf  { height: var(--tile-h); }
.qf.t0 { top: 162px; }
.qf.t1 { top: 594px; }

.sf  { height: var(--tile-h); top: 378px; }

/* Final card centered vertically; 3rd place below */
/* WC trophy ornament — sits above the Final card, centred in col-F. */
.wc-trophy {
    position: absolute;
    top: 200px;
    left: 50%;
    width: 56px;
    height: auto;
    transform: translateX(-50%);
    z-index: 2;
    pointer-events: none;
    filter: drop-shadow(0 6px 18px rgba(240,192,61,0.30));
}

.tile-final {
    position: absolute; left: 0; right: 0; top: 342px;
    height: var(--final-h);
}
.tile-third {
    position: absolute; left: 10px; right: 10px; top: 580px; height: 90px;
}

/* ============================================================
   TIE CARD
   ============================================================ */
.tie {
    --rim: var(--border-subtle);
    background: var(--bg-base);
    border: 1px solid var(--rim);
    border-radius: var(--radius-md);
    display: grid; grid-template-rows: 1fr 1fr;
    overflow: hidden;
    position: relative;
    transition: border-color var(--transition-fast), background var(--transition-fast);
    height: 100%;
}
.tie:hover { border-color: var(--border-medium); }

.tie-side {
    display: grid; grid-template-columns: 18px 1fr auto;
    align-items: center; gap: 8px;
    padding: 7px 10px;
    color: var(--text-secondary);
    font-size: 12px; font-weight: 500;
    position: relative;
    transition: background var(--transition-fast), color var(--transition-fast);
}
.tie-side:not(.is-tbd):hover { background: var(--bg-hover); color: var(--text-primary); cursor: pointer; }
.tie-side + .tie-side { border-top: 1px solid var(--rim); }
.tie-side .seed {
    font-family: var(--font-display); font-size: 9.5px; font-weight: 800;
    letter-spacing: 0.06em; color: var(--text-tertiary);
    padding: 2px 4px; border-radius: 3px;
    background: var(--bg-elevated); border: 1px solid var(--border-subtle);
    text-align: center; min-width: 22px;
}
/* TBD row uses the same 3-column grid as a resolved row so the name and right-
   slot align vertically across both states inside a mixed tile. */
.tie-side.is-tbd { grid-template-columns: 18px 1fr auto; gap: 8px; }
.tie-side.is-tbd .flag-spacer { width: 18px; height: 13px; }
.tie-side.is-tbd .seed { white-space: nowrap; padding: 2px 6px; box-sizing: border-box; }
.tie-side.is-tbd .seed { background: transparent; border: 1px dashed var(--border-medium); color: var(--text-tertiary); }
.tie-side.is-tbd .nm { color: var(--text-tertiary); font-weight: 600; font-family: var(--font-display); font-size: 10.5px; letter-spacing: 0.08em; }
.tie-side .flag { width: 18px; height: 13px; border-radius: 2px; object-fit: cover; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08); background: var(--bg-elevated); }
.tie-side .nm { font-family: var(--font-poppins); font-weight: 700; font-size: 12px; letter-spacing: -0.01em; color: var(--text-primary); text-overflow: ellipsis; overflow: hidden; white-space: nowrap; min-width: 0; }
.tie-side.is-tbd .nm { color: var(--text-tertiary); font-weight: 600; font-family: var(--font-display); font-size: 10.5px; letter-spacing: 0.08em; }
.tie-side.is-tbd .flag { background: var(--bg-elevated); }
.tie-side .score { font-family: var(--font-display); font-size: 14px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.02em; min-width: 16px; text-align: right; }

/* tile dashed (TBD seed) */
.tie.tbd-seed { border-style: dashed; background: transparent; }
.tie.tbd-seed .tie-side { color: var(--text-tertiary); }
.tie.tbd-seed .tie-side .flag { display: none; }
.tie.tbd-seed .tie-side { grid-template-columns: 18px 1fr auto; gap: 10px; }
.tie.tbd-seed .tie-side .seed { white-space: nowrap; padding: 2px 6px; box-sizing: border-box; }
.tie.tbd-seed .seed { background: transparent; border: 1px dashed var(--border-medium); color: var(--text-tertiary); }

/* footer band (kickoff/venue/status) — only on tiles that have one */
.tie-foot {
    grid-row: 3; padding: 4px 10px; min-height: 18px;
    display: flex; align-items: center; justify-content: space-between; gap: 6px;
    background: var(--bg-elevated);
    border-top: 1px solid var(--rim);
    font-family: var(--font-display); font-size: 9px; font-weight: 600;
    letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--text-tertiary);
}
.tie.has-foot { grid-template-rows: 1fr 1fr 22px; }
.tie-foot .ko-time { color: var(--accent); }
.tie-foot .venue { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; text-align: right; }
.tie-foot .live-pill {
    display: inline-flex; align-items: center; gap: 5px;
    color: var(--brand-orange); font-weight: 800;
}
.tie-foot .live-pill::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%;
    background: var(--brand-orange); box-shadow: 0 0 8px var(--brand-orange);
    animation: livepulse 1.4s ease-in-out infinite;
}
@keyframes livepulse {
    0%,100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.35; transform: scale(0.85); }
}

/* WINNER side bar (left edge accent in team kit colour) */
.tie-side.win { color: var(--text-primary); font-weight: 600; }
.tie-side.win::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: var(--kit, var(--text-primary));
}
.tie-side.loser { color: var(--text-muted); }
.tie-side.loser .nm { color: var(--text-muted); }

/* PREDICTED winner side — gradient from the kit-bar fading to transparent so
   the row blends into the tile instead of reading as a separate stacked card. */
.tie-side.predicted-win {
    background: linear-gradient(
        90deg,
        rgba(232,101,46,0.22) 0%,
        rgba(232,101,46,0.12) 45%,
        rgba(232,101,46,0.04) 100%
    );
    color: var(--text-primary);
}
.tie-side.predicted-win .nm { color: var(--text-primary); }
.tie-side.predicted-win::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: var(--brand-orange);
}
.tie-side.predicted-win .check {
    color: var(--brand-orange); font-size: 11px; font-weight: 800; font-family: var(--font-display);
}

/* tile glow on the user's predicted path */
.tie.on-path {
    box-shadow: 0 0 0 1px var(--brand-orange-border), 0 4px 18px rgba(232,101,46,0.10);
    border-color: var(--brand-orange-border);
}

/* prediction-locked (real result overrode user pick) */
.tie.locked-real .tie-foot .yp { color: var(--text-tertiary); }
.tie.locked-real .tie-foot .yp.wrong { color: var(--warning); }
.tie.locked-real .tie-foot .yp.right { color: var(--success); }

/* ============================================================
   CONNECTORS
   between consecutive stage columns. We draw with pseudo-elements:
   each tile reaches out half the column gap, and the parent-column
   tile draws a vertical merge line on its OUTBOUND side.
   ============================================================ */

/* Connector stub vertical position: 50% of the TIE BODY (excluding the 22px
   kickoff foot), not 50% of the tile. So `(tile-h - foot-h) / 2` from the top.
   For a 96px tile with a 22px foot: 37px — the line between the two team rows. */
.tree {
    --conn-y: 37px;
}
/* horizontal stub right (outgoing from L stages) */
.stage-col.col-L1 .tile::after,
.stage-col.col-L2 .tile::after,
.stage-col.col-L3 .tile::after,
.stage-col.col-L4 .tile.sf::after {
    content: ''; position: absolute;
    left: 100%; top: var(--conn-y);
    width: calc(var(--col-gap) / 2 + 1px); height: var(--conn-w);
    background: var(--conn);
    z-index: 1;
}
/* horizontal stub left (incoming into L stages 2/3/4) */
.stage-col.col-L2 .tile::before,
.stage-col.col-L3 .tile::before,
.stage-col.col-L4 .tile.sf::before {
    content: ''; position: absolute;
    right: 100%; top: var(--conn-y);
    width: calc(var(--col-gap) / 2); height: var(--conn-w);
    background: var(--conn);
    z-index: 1;
}
/* Mirror: right half — outgoing left, incoming right */
.stage-col.col-R1 .tile::before,
.stage-col.col-R2 .tile::before,
.stage-col.col-R3 .tile::before,
.stage-col.col-R4 .tile.sf::before {
    content: ''; position: absolute;
    right: 100%; top: var(--conn-y);
    width: calc(var(--col-gap) / 2 + 1px); height: var(--conn-w);
    background: var(--conn);
    z-index: 1;
}
.stage-col.col-R2 .tile::after,
.stage-col.col-R3 .tile::after,
.stage-col.col-R4 .tile.sf::after {
    content: ''; position: absolute;
    left: 100%; top: var(--conn-y);
    width: calc(var(--col-gap) / 2); height: var(--conn-w);
    background: var(--conn);
    z-index: 1;
}

/* vertical merge lines — each parent column draws verticals on its outbound side */
.merge-line {
    position: absolute; width: var(--conn-w); background: var(--conn); z-index: 0;
}
/* Merge-lines sit at the COL-GAP MIDPOINT — exactly where the horizontal stubs
   from each side meet. Was at the col edge (right: -1px), leaving a visual gap
   between the stub end and the line. */
.col-L1 .merge-line { right: calc(var(--col-gap) / -2); }
.col-L2 .merge-line { right: calc(var(--col-gap) / -2); }
.col-L3 .merge-line { right: calc(var(--col-gap) / -2); }
.col-R1 .merge-line { left:  calc(var(--col-gap) / -2); }
.col-R2 .merge-line { left:  calc(var(--col-gap) / -2); }
.col-R3 .merge-line { left:  calc(var(--col-gap) / -2); }

/* SF -> Final connectors extend the FULL gap since the Final card has no ::before */
.stage-col.col-L4 .tile.sf::after,
.stage-col.col-R4 .tile.sf::before {
    width: calc(var(--col-gap) + 2px);
}

/* Connectors stay uniformly neutral — the kit-colour left-edge bar on each
   winning side already conveys "predicted advance", so colouring only the
   champion's path back to R32 leaves the rest of the bracket looking
   inconsistent (orange champion route + grey for every other game). */

/* ============================================================
   FINAL CARD
   ============================================================ */
.tie.final {
    --rim: var(--gold-border);
    border-color: var(--gold-border);
    background:
        radial-gradient(ellipse 80% 70% at 50% 0%, var(--gold-soft) 0%, transparent 70%),
        var(--bg-base);
    box-shadow: 0 0 0 1px var(--gold-border), 0 8px 40px rgba(240,192,61,0.15);
    grid-template-rows: 22px 1fr 1fr 28px;
    height: 100%;
}
.tie.final .final-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 4px 12px;
    background: linear-gradient(180deg, var(--gold-soft) 0%, transparent 100%);
    border-bottom: 1px solid var(--gold-border);
}
.tie.final .final-head .lbl {
    font-family: var(--font-display); font-size: 10.5px; font-weight: 800;
    letter-spacing: 0.20em; text-transform: uppercase; color: var(--gold);
    display: inline-flex; align-items: center; gap: 6px;
}
.tie.final .final-head .lbl i { font-size: 11px; }
.tie.final .final-head .id {
    font-family: var(--font-display); font-size: 9.5px; font-weight: 600;
    letter-spacing: 0.08em; color: var(--text-tertiary);
}
.tie.final .tie-side { padding: 12px 14px; }
.tie.final .tie-side .nm { font-size: 15px; }
.tie.final .tie-side .flag { width: 24px; height: 17px; }
.tie.final .tie-side .seed { font-size: 11px; min-width: 26px; }
.tie.final .tie-foot { grid-row: 4; background: transparent; border-top: 1px solid var(--gold-border); padding: 5px 14px; justify-content: center; }
.tie.final .tie-foot.final-foot { justify-content: center; color: var(--gold); }
.tie.final .tie-foot .venue { color: var(--gold); }
.tie.final .tie-side.win.champion::before { background: var(--gold); }
.tie.final.has-champion {
    background:
        radial-gradient(ellipse 90% 100% at 50% 50%, rgba(240,192,61,0.25), transparent 70%),
        var(--bg-base);
    box-shadow: 0 0 0 1px var(--gold), 0 8px 48px rgba(240,192,61,0.30);
    border-color: var(--gold);
}

/* trophy ornament — restrained */
.trophy {
    position: absolute; left: 50%; top: -30px; transform: translateX(-50%);
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    color: var(--gold);
    background: var(--bg-base);
    border: 1px solid var(--gold-border);
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4), 0 0 0 4px var(--bg-elevated);
}
.trophy i { font-size: 18px; }

/* ============================================================
   3rd-PLACE CARD
   ============================================================ */
.tie.third {
    --rim: var(--border-subtle);
    grid-template-rows: 22px 1fr 1fr;
    background: var(--bg-base);
    opacity: 0.85;
}
.tie.third:hover { opacity: 1; }
.tie.third .third-head {
    padding: 2px 10px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-subtle);
    font-family: var(--font-display); font-size: 8.5px; font-weight: 700;
    letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-tertiary);
    display: flex; align-items: center; justify-content: space-between;
}
.tie.third .tie-side { padding: 5px 10px; font-size: 11px; }
.tie.third .tie-side .nm { font-size: 11px; }

/* ============================================================
   FLOATING SAVE & SHARE PILL
   ============================================================ */
.float-pill {
    position: fixed; bottom: 22px; right: 22px; z-index: 300;
    display: flex; align-items: center; gap: 10px;
    padding: 12px 18px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-pill);
    box-shadow: 0 10px 32px rgba(0,0,0,0.4);
    transition: all var(--transition-base);
    font-size: 13px; font-weight: 500;
}
.float-pill .progress {
    font-family: var(--font-display); font-size: 11px; font-weight: 700;
    letter-spacing: 0.06em; color: var(--text-secondary);
}
.float-pill .progress strong { color: var(--text-primary); }
.float-pill .divider { width: 1px; height: 16px; background: var(--border-subtle); }
.float-pill button {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px; border-radius: var(--radius-pill);
    background: var(--brand-orange); color: #fff;
    font-family: var(--font-display); font-weight: 700; font-size: 11px;
    letter-spacing: 0.10em; text-transform: uppercase;
    transition: all var(--transition-fast);
}
.float-pill.warm { border-color: var(--brand-orange-border); box-shadow: 0 10px 32px rgba(232,101,46,0.30); background: var(--bg-elevated); }
.float-pill button:hover { filter: brightness(1.08); transform: translateY(-1px); }
.float-pill button:disabled { background: var(--bg-interactive); color: var(--text-tertiary); cursor: not-allowed; }

/* helper pill (onboarding) */
.hint-pill {
    position: fixed; bottom: 22px; left: 254px; z-index: 290;
    max-width: 320px;
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 14px 12px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 24px rgba(0,0,0,0.4);
    color: var(--text-secondary); font-size: 12px;
    line-height: 1.4;
    transition: all var(--transition-base);
}
.hint-pill .lbl {
    display: block;
    font-family: var(--font-display); font-size: 9.5px; font-weight: 800;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--accent); margin-bottom: 3px;
}
.hint-pill .dismiss { color: var(--text-tertiary); padding: 0 4px; font-size: 13px; line-height: 1; }
.hint-pill .dismiss:hover { color: var(--text-primary); }

/* toast */
.toast {
    position: fixed; top: 86px; right: 22px; z-index: 310;
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    border-left: 3px solid var(--warning);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 28px rgba(0,0,0,0.4);
    font-size: 12.5px;
    max-width: 360px;
}
.toast i { color: var(--warning); font-size: 14px; }
.toast .x { margin-left: 8px; color: var(--text-tertiary); cursor: pointer; padding: 0 4px; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-mask {
    position: fixed; inset: 0; z-index: 400;
    background: rgba(0,0,0,0.72);
    backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
}
.modal {
    width: 100%; max-width: 480px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.modal-head {
    padding: 18px 22px 14px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex; align-items: center; justify-content: space-between;
}
.modal-head .ttl { font-family: var(--font-poppins); font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.modal-head .x { color: var(--text-tertiary); font-size: 18px; padding: 4px; }
.modal-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 18px; }
.modal-stat {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px;
    padding: 14px; background: var(--bg-base);
    border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
}
.modal-stat .item .lbl { font-family: var(--font-display); font-size: 9.5px; font-weight: 700; letter-spacing: 0.10em; text-transform: uppercase; color: var(--text-tertiary); }
.modal-stat .item .val { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--text-primary); margin-top: 2px; }
.modal-label {
    font-family: var(--font-display); font-size: 9.5px; font-weight: 700;
    letter-spacing: 0.10em; text-transform: uppercase; color: var(--text-tertiary);
    margin-bottom: 6px; display: block;
}
.modal-input {
    width: 100%; height: 40px; padding: 0 12px;
    background: var(--bg-base); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm); color: var(--text-primary);
    font: inherit; font-size: 14px;
}
.modal-input:focus { outline: none; border-color: var(--accent-border); box-shadow: 0 0 0 3px var(--accent-soft); }
.modal-champ {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px;
    background: linear-gradient(135deg, var(--gold-soft) 0%, transparent 100%);
    border: 1px solid var(--gold-border); border-radius: var(--radius-md);
}
.modal-champ .flag { width: 28px; height: 20px; border-radius: 3px; }
.modal-champ .meta { flex: 1; }
.modal-champ .lbl { font-family: var(--font-display); font-size: 9.5px; font-weight: 700; letter-spacing: 0.10em; text-transform: uppercase; color: var(--gold); }
.modal-champ .nm { font-family: var(--font-poppins); font-size: 16px; font-weight: 700; }

.share-url {
    display: flex; align-items: center; gap: 0;
    background: var(--bg-base); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
    overflow: hidden;
}
.share-url input {
    flex: 1; padding: 10px 12px; background: transparent; border: none;
    color: var(--text-primary); font-family: var(--font-display); font-size: 12.5px; font-weight: 500;
}
.share-url input:focus { outline: none; }
.share-url button {
    padding: 10px 14px; border-left: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-family: var(--font-display); font-size: 10.5px; font-weight: 700;
    letter-spacing: 0.10em; text-transform: uppercase;
}
.share-url button:hover { background: var(--bg-hover); color: var(--text-primary); }
.share-url button.copied { color: var(--success); }

.share-row { display: flex; gap: 8px; flex-wrap: wrap; }
.share-row .btn {
    flex: 1; min-width: 120px;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 14px; border-radius: var(--radius-sm);
    background: var(--bg-base); border: 1px solid var(--border-subtle); color: var(--text-primary);
    font-family: var(--font-display); font-size: 11px; font-weight: 700;
    letter-spacing: 0.10em; text-transform: uppercase;
    transition: all var(--transition-fast);
}
.share-row .btn:hover { border-color: var(--border-medium); background: var(--bg-interactive); }
.share-row .btn.twitter i { color: var(--accent); }
.share-row .btn.whatsapp i { color: var(--success); }

.modal-foot {
    padding: 14px 22px;
    background: var(--bg-base);
    border-top: 1px solid var(--border-subtle);
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.modal-foot .micro { font-size: 11px; color: var(--text-tertiary); }
.btn-modal-primary {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 18px; border-radius: var(--radius-sm);
    background: var(--brand-orange); color: #fff;
    font-family: var(--font-display); font-size: 11.5px; font-weight: 700;
    letter-spacing: 0.10em; text-transform: uppercase;
}
.btn-modal-primary:hover { filter: brightness(1.08); }

/* ============================================================
   STATE CATALOG  (auxiliary screens below the main page)
   ============================================================ */
.catalog {
    margin-top: 72px; padding-top: 32px;
    border-top: 1px dashed var(--border-subtle);
}
.catalog-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 12px; }
.catalog-head h2 { font-family: var(--font-poppins); font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.catalog-head .crumb { font-family: var(--font-display); font-size: 10.5px; font-weight: 700; letter-spacing: 0.10em; text-transform: uppercase; color: var(--text-tertiary); }
.catalog-head .lede { font-size: 13px; color: var(--text-secondary); margin-left: auto; max-width: 520px; text-align: right; }

.cat-section { margin: 28px 0 12px; }
.cat-section h3 { font-family: var(--font-display); font-size: 11px; font-weight: 700; letter-spacing: 0.10em; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 12px; }

/* Tie state grid */
.tie-states { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.tie-state {
    background: var(--bg-elevated); border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
    padding: 14px;
}
.tie-state .state-lbl {
    display: flex; align-items: center; justify-content: space-between;
    font-family: var(--font-display); font-size: 9.5px; font-weight: 700;
    letter-spacing: 0.10em; text-transform: uppercase;
    color: var(--text-tertiary); margin-bottom: 10px;
}
.tie-state .state-lbl .nm { color: var(--text-primary); }
.tie-state .tile-demo { width: 100%; height: 86px; position: relative; }
.tie-state .tile-demo .tie { height: 100%; }

/* Group state grid */
.group-states { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.group-state-card { display: flex; flex-direction: column; gap: 10px; }
.group-state-card .state-lbl {
    font-family: var(--font-display); font-size: 9.5px; font-weight: 700;
    letter-spacing: 0.10em; text-transform: uppercase; color: var(--text-tertiary);
}

/* MOBILE preview frame */
.mobile-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.mobile-mock .stage-tabs button { padding: 5px 8px; font-size: 9px; }
.mobile-mock {
    width: 100%; aspect-ratio: 9 / 19.5;
    background: var(--bg-base); border: 1px solid var(--border-medium);
    border-radius: 24px; overflow: hidden; position: relative;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}

.mobile-mock .mob-status {
    height: 28px; display: flex; align-items: center; justify-content: space-between;
    padding: 6px 22px 4px;
    font-family: var(--font-display); font-size: 11px; font-weight: 700; color: var(--text-primary);
}
.mobile-mock .mob-status .right { display: flex; gap: 4px; font-size: 10px; }
.mobile-mock .mob-notch { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 90px; height: 22px; background: var(--bg-base); border-radius: 999px; }
.mob-frame-label {
    text-align: center; margin-top: 8px;
    font-family: var(--font-display); font-size: 10.5px; font-weight: 700;
    letter-spacing: 0.10em; text-transform: uppercase; color: var(--text-tertiary);
}

/* OG image card */
.og-frame {
    width: 100%; max-width: 800px;
    aspect-ratio: 1200 / 630;
    background: linear-gradient(135deg, #06040a 0%, #1a0d05 60%, #0d0805 100%);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    padding: 36px;
    color: #fff;
    position: relative; overflow: hidden;
    display: grid; grid-template-rows: auto 1fr auto;
}
.og-frame::before {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 60% 70% at 12% 10%, rgba(232,101,46,0.25), transparent 60%),
        radial-gradient(ellipse 60% 70% at 88% 88%, rgba(63,184,245,0.18), transparent 60%);
}
.og-frame > * { position: relative; z-index: 1; }
.og-head { display: flex; align-items: center; justify-content: space-between; }
.og-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; }
.og-brand .lg { width: 32px; height: 32px; border-radius: 8px; background: linear-gradient(135deg, var(--brand-orange) 0%, #3FB8F5 100%); display: flex; align-items: center; justify-content: center; color: #000; font-weight: 800; }
.og-stamp { font-family: var(--font-display); font-size: 12px; font-weight: 700; letter-spacing: 0.20em; text-transform: uppercase; color: rgba(255,255,255,0.5); }
.og-body { display: flex; align-items: center; gap: 32px; margin-top: 14px; }
.og-name { font-family: var(--font-poppins); font-size: 56px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; color: #fff; }
.og-tag { font-size: 18px; color: rgba(255,255,255,0.75); margin-top: 6px; }
.og-champ {
    margin-left: auto; padding: 18px 22px;
    background: rgba(240,192,61,0.10);
    border: 1px solid rgba(240,192,61,0.4);
    border-radius: 14px;
    display: flex; flex-direction: column; gap: 4px; align-items: flex-end;
}
.og-champ .lbl { font-family: var(--font-display); font-size: 12px; font-weight: 700; letter-spacing: 0.20em; text-transform: uppercase; color: var(--gold); }
.og-champ .flag { width: 80px; height: 56px; border-radius: 4px; box-shadow: 0 4px 12px rgba(0,0,0,0.4); }
.og-champ .nm { font-family: var(--font-poppins); font-size: 32px; font-weight: 800; letter-spacing: -0.03em; }
.og-foot { display: flex; align-items: flex-end; justify-content: space-between; }
.og-path { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.og-path .step {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 10px;
    background: rgba(255,255,255,0.08); border-radius: 999px;
    font-family: var(--font-display); font-size: 11px; font-weight: 700; letter-spacing: 0.10em; text-transform: uppercase;
}
.og-path .step.win { background: rgba(232,101,46,0.18); color: #fff; }
.og-path .step img { width: 16px; height: 12px; border-radius: 2px; }
.og-url { font-family: var(--font-display); font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.7); letter-spacing: 0.06em; }

/* Shared bracket banner */
.shared-banner {
    display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
    padding: 16px 18px;
    background: linear-gradient(135deg, var(--brand-orange-soft) 0%, transparent 100%);
    border: 1px solid var(--brand-orange-border);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}
.shared-banner .av { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--brand-orange) 0%, var(--brand-orange-deep) 100%); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; font-size: 16px; color: #fff; }
.shared-banner .who { display: flex; flex-direction: column; gap: 2px; }
.shared-banner .who .nm { font-family: var(--font-poppins); font-size: 16px; font-weight: 700; letter-spacing: -0.02em; }
.shared-banner .who .sub { font-family: var(--font-display); font-size: 11px; color: var(--text-tertiary); letter-spacing: 0.06em; }
.shared-banner .stats { display: flex; gap: 18px; margin-left: auto; }
.shared-banner .stat { display: flex; flex-direction: column; align-items: flex-end; }
.shared-banner .stat .val { font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.shared-banner .stat .lbl { font-family: var(--font-display); font-size: 9.5px; font-weight: 600; letter-spacing: 0.10em; text-transform: uppercase; color: var(--text-tertiary); }
.shared-banner .fork {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 18px; border-radius: var(--radius-sm);
    background: var(--brand-orange); color: #fff;
    font-family: var(--font-display); font-size: 12px; font-weight: 700;
    letter-spacing: 0.10em; text-transform: uppercase;
}
.shared-banner .fork:hover { filter: brightness(1.08); }

/* ============================================================
   STAGE TABS  (mobile / tablet)
   ============================================================ */
.stage-tabs {
    display: flex; gap: 4px; padding: 4px;
    background: var(--bg-elevated); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
}
.stage-tabs button {
    padding: 6px 12px; border-radius: var(--radius-pill);
    font-family: var(--font-display); font-size: 10.5px; font-weight: 700;
    letter-spacing: 0.10em; text-transform: uppercase; color: var(--text-tertiary);
    transition: all var(--transition-fast);
}
.stage-tabs button.active { background: var(--text-primary); color: var(--bg-base); }
.stage-tabs button:hover:not(.active) { color: var(--text-primary); }

/* small responsive: groups become carousel on tablet+below */
@media (max-width: 768px) {
    .main { padding: 16px 16px 100px; }
    .page-head { flex-direction: column; align-items: flex-start; }
    .float-pill { left: 16px; right: 16px; bottom: 16px; justify-content: space-between; }
    .hint-pill { display: none; }
}
