/* ============================================================
   HamsterPvP — Design System (warm dark "eSports" theme)
   Derived from the Claude Design handoff. Tokens, components
   and layout used across all Razor pages.
   ============================================================ */
:root {
    /* Surfaces */
    --bg: #0c0a08;
    --bg-2: #100d0a;
    --surface: #17130e;
    --surface-2: #1e1812;
    --surface-3: #271f16;
    --line: #322a20;
    --line-2: #45382a;

    /* Text */
    --ink: #f6efe2;
    --ink-2: #b4a999;
    --ink-3: #7b7163;

    /* Brand + accents */
    --brand: #ff8a22;
    --brand-2: #ffa84a;
    --brand-deep: #e8631c;
    --cream: #f3dcab;
    --green: #46d38a;
    --blue: #5aa9ff;
    --red: #ff6060;
    --gold: #ffc53d;
    --silver: #cdd3da;
    --bronze: #d99a6c;
    --purple: #b27bff;

    /* Radius / shadow / glow */
    --r: 14px;
    --r-sm: 9px;
    --r-lg: 20px;
    --shadow: 0 10px 30px -12px rgba(0, 0, 0, .7);
    --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .8);
    --glow: 0 8px 26px -10px rgba(255, 138, 34, .5);

    --nav-h: 68px;

    --font-display: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
    --font-body: "Barlow", "Segoe UI", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Background atmosphere: warm orange + cool blue glow + faint grid. */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(60% 50% at 85% -5%, rgba(255, 138, 34, .14), transparent 60%),
        radial-gradient(45% 40% at 8% -8%, rgba(90, 169, 255, .07), transparent 60%),
        linear-gradient(180deg, #0e0b08, var(--bg) 40%);
}
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px);
    background-size: 46px 46px;
    -webkit-mask-image: radial-gradient(80% 55% at 50% 0%, #000, transparent 75%);
    mask-image: radial-gradient(80% 55% at 50% 0%, #000, transparent 75%);
}

a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: none; }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    line-height: 1.05;
    letter-spacing: -.01em;
    margin: 0;
    font-weight: 700;
}

button { font-family: var(--font-body); cursor: pointer; }

/* Heading focus ring suppression (FocusOnNavigate targets h1). */
h1:focus, h1:focus-visible { outline: none; }

/* ---- Helpers ---- */
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding-inline: 24px; }
.muted { color: var(--ink-2); }
.dim { color: var(--ink-3); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.delta-up { color: var(--green); }
.delta-down { color: var(--red); }
.up { color: var(--green); }
.down { color: var(--red); }
.divider { height: 1px; background: var(--line); border: 0; }
.eyebrow {
    font-family: var(--font-display);
    color: var(--brand);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .18em;
    font-size: 11px;
}

/* ---- Shell ---- */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.content { flex: 1; padding-bottom: 8px; }

/* Page entrance — animate position only (never opacity, so nothing hangs invisible). */
.page { animation: fadeUp .4s ease both; }
@media (prefers-reduced-motion: reduce) { .page { animation: none; } }
@keyframes fadeUp { from { transform: translateY(10px); } to { transform: translateY(0); } }
@keyframes floaty { 0%, 100% { transform: translateY(-12px); } 50% { transform: translateY(12px); } }
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(70, 211, 138, .5); }
    70% { box-shadow: 0 0 0 7px rgba(70, 211, 138, 0); }
    100% { box-shadow: 0 0 0 0 rgba(70, 211, 138, 0); }
}

/* ---- Nav ---- */
.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--nav-h);
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.nav-inner { height: 100%; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand img { width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .5)); }
.wordmark { font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -.01em; }
.wordmark .c { color: var(--cream); }
.wordmark .o { color: var(--brand); }

.nav-links { display: flex; gap: 2px; margin-left: 4px; }
.nav-link {
    display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 9px;
    border-radius: 8px; color: var(--ink-2);
    font-family: var(--font-display); font-weight: 600; font-size: 14px; transition: .15s;
}
.nav-link:hover { color: var(--ink); }
.nav-link .ico { color: inherit; display: inline-flex; }
.nav-link.active { background: var(--surface-2); color: var(--ink); }
.nav-link.active .ico { color: var(--brand); }

.nav-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* ---- Segmented control ---- */
.seg {
    display: inline-flex; gap: 3px; padding: 3px;
    background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px;
}
.seg a, .seg button {
    border: 0; background: none; color: var(--ink-2);
    font-family: var(--font-display); font-weight: 600; font-size: 12px;
    padding: 0 12px; height: 28px; display: inline-flex; align-items: center; gap: 7px;
    border-radius: 999px; cursor: pointer; transition: .15s;
}
.seg a:hover, .seg button:hover { color: var(--ink); }
.seg .on {
    background: linear-gradient(180deg, var(--surface-3), var(--surface-2));
    color: var(--ink); box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset;
}
.seg .on.brand {
    background: linear-gradient(180deg, var(--brand-2), var(--brand-deep));
    color: #2a1604;
}
.seg.lg button, .seg.lg a { height: 38px; font-size: 13.5px; padding: 0 18px; }

/* ---- Buttons ---- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 44px; padding: 0 18px; border-radius: var(--r-sm);
    border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink);
    font-family: var(--font-display); font-weight: 600; font-size: 14.5px; transition: .15s;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { height: 36px; padding: 0 13px; font-size: 13px; }
.btn-lg { height: 52px; padding: 0 24px; font-size: 16px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary {
    background: linear-gradient(180deg, var(--brand-2), var(--brand-deep));
    color: #2a1604; border-color: transparent; box-shadow: var(--glow);
}
.btn-primary:hover { filter: brightness(1.04); }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--brand); }
.btn-link {
    background: none; border: 0; color: var(--ink-2); height: auto; padding: 0;
    font-family: var(--font-display); font-weight: 600; font-size: 13px;
    display: inline-flex; align-items: center; gap: 4px;
}
.btn-link:hover { color: var(--brand); transform: none; }

/* ---- Cards ---- */
.card {
    background: linear-gradient(180deg, var(--surface), var(--bg-2));
    border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow);
}
.card-pad { padding: 20px; }
.card-hover { transition: .18s; }
.card-hover:hover { border-color: var(--line-2); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.clip {
    --c: 16px;
    clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
}

/* ---- Pills / tags / status ---- */
.pill {
    display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px;
    border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2);
    font-size: 12px;
}
.pill.big { height: 36px; padding: 0 14px; }
.pill.ok { border-color: color-mix(in srgb, var(--green) 35%, var(--line)); background: color-mix(in srgb, var(--green) 9%, var(--surface-2)); }
.pill .label { font-family: var(--font-display); font-weight: 700; letter-spacing: .04em; }
.pill.ok .label { color: var(--green); }
.tag {
    display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px;
    border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2);
    color: var(--ink-2); font-family: var(--font-display); font-weight: 600;
    font-size: 11px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap;
}
.dot { width: 9px; height: 9px; border-radius: 999px; display: inline-block; background: var(--ink-3); }
.dot-live { background: var(--green); animation: pulse 2s infinite; }
@media (prefers-reduced-motion: reduce) { .dot-live { animation: none; } }

/* ---- Rank badge ---- */
.rank-badge {
    display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; vertical-align: middle;
    height: 22px; padding: 0 8px; border-radius: 999px;
    font-family: var(--font-display); font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .02em;
    color: var(--rc, var(--brand));
    border: 1px solid color-mix(in srgb, var(--rc, var(--brand)) 40%, transparent);
    background: color-mix(in srgb, var(--rc, var(--brand)) 16%, transparent);
}
.rank-badge.small { height: 19px; padding: 0 7px; font-size: 10px; }

/* ---- Avatars ---- */
.av { border-radius: 7px; image-rendering: pixelated; border: 1px solid var(--line); object-fit: cover; }
.av-ring { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--brand); }
.skin-fallback {
    display: grid; place-items: center; background:
        repeating-linear-gradient(45deg, var(--surface-3), var(--surface-3) 6px, var(--surface-2) 6px, var(--surface-2) 12px);
    border: 1px solid var(--line); color: var(--ink-2);
    font-family: var(--font-display); font-weight: 700;
}

/* ---- Mode icon chip ---- */
.mode-ico {
    display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
    background: color-mix(in srgb, var(--brand) 14%, var(--surface-2)); color: var(--brand); flex: none;
}
.mode-ico.sm { width: 32px; height: 32px; border-radius: 8px; }

/* ---- Section head ---- */
.section-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 16px; margin-bottom: 22px; flex-wrap: wrap;
}
.section-head h1 { font-size: 34px; }
.section-head h2, .section-head h3 { margin: 0; }

/* ---- Stat tile ---- */
.stat-tile {
    --c: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px;
}
.stat-tile .k {
    display: flex; align-items: center; gap: 8px;
    font-family: var(--font-display); font-size: 11px; letter-spacing: .12em;
    text-transform: uppercase; color: var(--ink-3);
}
.stat-tile .v { font-family: var(--font-mono); font-weight: 700; font-size: 28px; line-height: 1; color: var(--ink); }

.mini-stat { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; }
.mini-stat .k { font-family: var(--font-display); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.mini-stat .num { font-weight: 700; font-size: 18px; }

/* small inline stat (label over value) */
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat .k { font-family: var(--font-display); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.stat .v { font-family: var(--font-mono); font-weight: 700; font-size: 24px; color: var(--ink); }

/* ---- Inputs ---- */
.input {
    width: 100%; height: 44px; padding: 0 14px; border-radius: var(--r-sm);
    border: 1px solid var(--line-2); background: var(--surface-3); color: var(--ink);
    font-family: var(--font-body); font-size: 15px;
}
.input::placeholder { color: var(--ink-3); }
.input:focus { outline: none; border-color: var(--brand); }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.field label {
    font-family: var(--font-display); font-size: 12px; letter-spacing: .06em;
    text-transform: uppercase; color: var(--ink-3); font-weight: 600;
}
.field-row { display: flex; gap: 12px; }
.search { position: relative; width: min(100%, 340px); }
.search .ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.search .input { padding-left: 40px; }

/* ---- Leaderboard / data table ---- */
table.lb { width: 100%; border-collapse: collapse; }
table.lb th {
    text-align: left; padding: 12px 16px; color: var(--ink-3);
    font-family: var(--font-display); font-weight: 600; font-size: 11px;
    text-transform: uppercase; letter-spacing: .08em; border-bottom: 1px solid var(--line);
}
table.lb td { padding: 11px 16px; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
table.lb tbody tr { cursor: pointer; transition: background .12s; }
table.lb tbody tr:hover { background: var(--surface-2); }
table.lb tbody tr:last-child td { border-bottom: 0; }
table.lb .right { text-align: right; }
.rank-pos { font-family: var(--font-display); font-weight: 700; color: var(--ink-3); width: 1%; white-space: nowrap; }
.rank-1 { color: var(--gold); }
.rank-2 { color: var(--silver); }
.rank-3 { color: var(--bronze); }
.wr-bar { width: 54px; height: 6px; border-radius: 4px; background: var(--surface-3); overflow: hidden; display: inline-block; }
.wr-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-deep), var(--brand-2)); }
.player-cell { display: flex; align-items: center; gap: 11px; }
.player-cell .nm { font-weight: 600; font-size: 15px; }

/* ---- Podium ---- */
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: end; max-width: 620px; margin: 0 auto; }
.podium-col { display: flex; flex-direction: column; align-items: center; gap: 10px; cursor: pointer; }
.podium-col .nm { font-weight: 700; }
.podium-col .elo { font-family: var(--font-mono); font-weight: 700; }
.pedestal {
    --c: 12px; width: 100%; display: grid; place-items: center;
    border: 1px solid var(--line); border-bottom: 3px solid var(--pc);
    background: linear-gradient(180deg, color-mix(in srgb, var(--pc) 22%, var(--surface-2)), var(--surface));
}
.pedestal span { font-family: var(--font-display); font-weight: 700; color: var(--pc); opacity: .9; }

/* ---- Hero (home) ---- */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 40px; align-items: center; padding-top: 18px; }
.hero h1 { font-size: clamp(40px, 6vw, 68px); line-height: .98; letter-spacing: -.02em; }
.hero-art { position: relative; display: grid; place-items: center; }
.hero-art .glow { position: absolute; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 138, 34, .32), transparent 65%); filter: blur(8px); }
.hero-art img { width: min(100%, 380px); position: relative; filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .55)); }
@media (prefers-reduced-motion: no-preference) { .hero-art img { animation: floaty 5s ease-in-out infinite; } }

/* ---- Grids ---- */
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); }
.grid-auto-wide { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* ---- Online teaser ---- */
.avatar-stack { display: flex; }
.avatar-stack > * { margin-left: -10px; }
.avatar-stack > *:first-child { margin-left: 0; }

/* ---- Player profile ---- */
.profile-hero-banner {
    height: 92px; border-bottom: 1px solid var(--line); position: relative;
    background: linear-gradient(120deg, color-mix(in srgb, var(--brand) 22%, var(--surface)), var(--surface-2) 60%, color-mix(in srgb, var(--blue) 10%, var(--surface)));
}
.profile-hero-banner::after {
    content: ""; position: absolute; inset: 0; opacity: .5;
    background-image: linear-gradient(rgba(0, 0, 0, .18) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 0, 0, .18) 1px, transparent 1px);
    background-size: 28px 28px;
}
.profile-hero-body { padding: 14px 24px 22px; display: flex; gap: 22px; align-items: flex-end; flex-wrap: wrap; }
.profile-hero-body .av { margin-top: -56px; box-shadow: 0 0 0 4px var(--surface), 0 12px 24px rgba(0, 0, 0, .5); }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; }
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.match-row {
    display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 10px;
    background: var(--surface); border: 1px solid var(--line); cursor: pointer; transition: background .12s;
}
.match-row:hover { background: var(--surface-2); }
.match-row.win { border-left: 3px solid var(--green); }
.match-row.loss { border-left: 3px solid var(--red); }
.match-row .res { width: 44px; font-family: var(--font-display); font-weight: 700; font-size: 13px; }
.row-btn {
    display: flex; align-items: center; gap: 11px; padding: 8px 9px; border-radius: 9px;
    background: none; border: 0; text-align: left; width: 100%; transition: background .12s; cursor: pointer; color: inherit;
}
.row-btn:hover { background: var(--surface-2); }

/* ---- Tier cards (ranks) ---- */
.tier-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: start; }
.tier { position: relative; overflow: hidden; }
.tier.featured { transform: translateY(-8px); border-color: color-mix(in srgb, var(--tc) 45%, var(--line)); box-shadow: 0 24px 50px -20px color-mix(in srgb, var(--tc) 55%, transparent); }
.tier .top-strip { position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--tc); }
.tier .popular { position: absolute; top: 14px; right: 14px; color: var(--tc); background: color-mix(in srgb, var(--tc) 18%, transparent); border-color: color-mix(in srgb, var(--tc) 40%, transparent); }
.tier .head { padding: 26px 24px 22px; }
.tier.featured .head { background: linear-gradient(180deg, color-mix(in srgb, var(--tc) 10%, transparent), transparent); }
.tier .crown-badge { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 13px; background: color-mix(in srgb, var(--tc) 16%, var(--surface-2)); color: var(--tc); margin-bottom: 16px; }
.tier h3 { font-size: 24px; color: var(--tc); }
.tier .tagline { color: var(--ink-3); font-size: 13.5px; margin-top: 6px; min-height: 38px; }
.tier .price { display: flex; align-items: baseline; gap: 6px; margin-top: 8px; }
.tier .price .amt { font-family: var(--font-mono); font-weight: 700; font-size: 38px; }
.tier .perks { padding: 18px 24px 24px; display: flex; flex-direction: column; gap: 11px; }
.perk { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.perk .chk { color: var(--tc); margin-top: 1px; flex: none; }

/* ---- Checkout ---- */
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.summary { position: sticky; top: calc(var(--nav-h) + 18px); }
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14.5px; }
.summary-row > span:last-child { min-width: 0; text-align: right; }
.summary-row.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.receipt-reference {
    max-width: min(100%, 280px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pay-methods { display: flex; gap: 8px; margin-bottom: 18px; }
.pay-method {
    flex: 1; height: 46px; display: grid; place-items: center; border-radius: var(--r-sm);
    border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
    font-family: var(--font-display); font-weight: 600; font-size: 13px; cursor: pointer;
}
.pay-method:hover { color: var(--ink); }
.pay-method.active { border-color: var(--brand); color: var(--brand-2); background: color-mix(in srgb, var(--brand) 10%, var(--surface)); }
.check-hint { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; margin-top: 4px; }
.check-ok { color: var(--green); }
.check-bad { color: var(--red); }
.success-circle { width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 50%; background: color-mix(in srgb, var(--green) 16%, var(--surface-2)); color: var(--green); display: grid; place-items: center; }

/* ---- Alerts ---- */
.alert { padding: 12px 16px; border-radius: var(--r-sm); margin: 12px 0; border: 1px solid var(--line-2); background: var(--surface-2); font-size: 14px; }
.alert-ok { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, transparent); background: color-mix(in srgb, var(--green) 10%, transparent); }
.alert-err { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); background: color-mix(in srgb, var(--red) 10%, transparent); }
.alert-warn { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 35%, transparent); background: color-mix(in srgb, var(--gold) 9%, transparent); }

/* ---- Match head-to-head ---- */
.h2h { display: flex; align-items: center; gap: 8px; }
.h2h-side { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 8px 4px; background: none; border: 0; cursor: pointer; color: inherit; }
.h2h-side.lose { opacity: .82; }
.h2h-vs { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.h2h-vs .vs { font-family: var(--font-display); font-weight: 700; font-size: 30px; color: var(--ink-3); }
.h2h-vs .bar { width: 1px; height: 80px; background: var(--line-2); }
.h2h-stats { display: flex; gap: 20px; }

/* ---- Match timeline ---- */
.tl-item { display: grid; grid-template-columns: 52px 24px 1fr; align-items: center; gap: 10px; padding: 9px 0; }
.tl-item + .tl-item { border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }

/* ---- Legal / prose pages ---- */
.legal { max-width: 820px; }
.legal h1 { font-size: 32px; margin-bottom: 6px; }
.legal h2 { font-size: 19px; margin: 30px 0 10px; color: var(--ink); }
.legal h3 { font-size: 15px; margin: 18px 0 6px; color: var(--ink); font-family: var(--font-display); }
.legal p, .legal li { color: var(--ink-2); font-size: 15px; line-height: 1.65; }
.legal p { margin: 8px 0; }
.legal ul { padding-left: 20px; margin: 8px 0; }
.legal li { margin: 4px 0; }
.legal a { color: var(--brand-2); }
.legal a:hover { text-decoration: underline; }
.legal address { font-style: normal; color: var(--ink); line-height: 1.7; }
.legal .updated { color: var(--ink-3); font-size: 13px; margin: 0 0 20px; }
.legal .ph { color: var(--brand-2); background: color-mix(in srgb, var(--brand) 13%, transparent); padding: 1px 6px; border-radius: 5px; font-family: var(--font-mono); font-size: 13px; }
.legal .ph-note { font-size: 13px; }

/* ---- Cookie consent banner (revealed by JS only when not yet accepted) ---- */
.cookie-banner {
    display: none; position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 200;
    max-width: 720px; margin: 0 auto; padding: 16px 18px;
    background: linear-gradient(180deg, var(--surface-2), var(--surface));
    border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow-lg);
    align-items: center; gap: 16px; flex-wrap: wrap;
}
.cookie-banner .txt { flex: 1; min-width: 240px; font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
.cookie-banner .txt a { color: var(--brand-2); }
.cookie-banner .actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---- Footer ---- */
.footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 34px 0 46px; background: var(--bg-2); }
.footer-legal { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 18px; display: flex; gap: 18px; flex-wrap: wrap; }
.footer-legal a { color: var(--ink-3); font-size: 12.5px; font-family: var(--font-display); font-weight: 600; }
.footer-legal a:hover { color: var(--ink); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { width: 38px; height: 38px; object-fit: contain; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: var(--ink-2); font-family: var(--font-display); font-weight: 600; font-size: 13.5px; }
.footer-links a:hover { color: var(--ink); }
.footer-disclaimer { color: var(--ink-3); font-size: 12px; max-width: 320px; text-align: right; }

/* ---- Icons ---- */
.ico { display: inline-flex; flex: none; }
.ico svg { display: block; }

/* ---- Events ---- */
.events-grid { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 18px; align-items: start; }

.ev-hero {
    margin-bottom: 18px;
    background: linear-gradient(120deg, color-mix(in srgb, var(--ec, var(--brand)) 16%, var(--surface)), var(--bg-2) 70%);
}
.ev-hero-top { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.ev-hero-top .tag.accent { color: #1a1206; border-color: transparent; background: var(--ec, var(--brand)); }
.ev-hero-title { font-size: 28px; margin: 0 0 10px; }
.ev-hero-when {
    display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2);
    font-family: var(--font-display); font-weight: 600; font-size: 14px;
}
.ev-hero-desc { color: var(--ink-2); font-size: 14.5px; line-height: 1.6; margin: 12px 0 16px; max-width: 64ch; }

/* Calendar */
.cal { padding: 16px; }
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cal-title { font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.cal-nav .btn-ico {
    width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px;
    border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink-2); transition: .15s;
}
.cal-nav .btn-ico:hover { color: var(--ink); border-color: var(--brand); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow {
    text-align: center; font-family: var(--font-display); font-weight: 600; font-size: 10.5px;
    text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); padding-bottom: 4px;
}
.cal-cell {
    position: relative; aspect-ratio: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 3px; border-radius: 8px;
    font-family: var(--font-mono); font-size: 13px; color: var(--ink-2); border: 1px solid transparent;
}
.cal-cell.blank { border: 0; }
a.cal-cell.has-ev { color: var(--ink); background: var(--surface-2); border-color: var(--line); cursor: pointer; transition: .15s; }
a.cal-cell.has-ev:hover { border-color: var(--brand); transform: translateY(-1px); }
.cal-cell.today { color: var(--brand-2); box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 45%, transparent) inset; }
.cal-cell.sel { background: color-mix(in srgb, var(--brand) 18%, var(--surface-2)); border-color: var(--brand); color: var(--ink); }
.cal-dots { display: flex; gap: 3px; height: 5px; align-items: center; }
.cal-dot { width: 5px; height: 5px; border-radius: 999px; background: var(--brand); }

/* Event list */
.ev-col-title, .ev-col-head h2 { font-size: 18px; margin: 0 0 12px; }
.ev-col-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.ev-col-head .btn-link { gap: 5px; }
.ev-list { display: flex; flex-direction: column; gap: 10px; }
.ev-row {
    display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 14px; padding: 14px 16px;
    background: linear-gradient(180deg, var(--surface), var(--bg-2));
    border: 1px solid var(--line); border-radius: var(--r);
}
.ev-row.ev-past { opacity: .6; }
.ev-date {
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    border-right: 1px solid var(--line); padding-right: 12px;
}
.ev-date .d { font-family: var(--font-mono); font-weight: 700; font-size: 24px; line-height: 1; color: var(--ec, var(--brand-2)); }
.ev-date .m { font-family: var(--font-display); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin-top: 3px; }
.ev-date .w { font-size: 10.5px; color: var(--ink-3); margin-top: 1px; }
.ev-body { min-width: 0; }
.ev-title { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--ink); margin: 0 0 7px; overflow-wrap: anywhere; }
.ev-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 7px; }
.ev-tags .tag.live { color: #06281a; background: var(--green); border-color: transparent; }
.ev-when { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 12.5px; }
.ev-desc { color: var(--ink-2); font-size: 13.5px; line-height: 1.55; margin: 8px 0 0; overflow-wrap: anywhere; }
.ev-actions { margin-top: 11px; }

/* ---- Responsive ---- */
/* Progressively thin the nav so it never overflows: drop the IP-copy button, then the menu links
   (both remain reachable in the footer). Keeps the brand, language switch and the primary CTA. */
@media (max-width: 1180px) { .copy-ip { display: none; } }
@media (max-width: 1000px) { .nav-links { display: none; } }
@media (max-width: 880px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-art { display: none; }
    .profile-grid, .mode-grid, .checkout-grid { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
    .tier-grid { grid-template-columns: 1fr; }
    .tier.featured { transform: none; }
    .events-grid { grid-template-columns: 1fr; }
    .ev-hero-title { font-size: 24px; }
}
@media (max-width: 720px) {
    .hide-sm { display: none !important; }
    .footer-disclaimer { text-align: left; }
    .section-head h1 { font-size: 28px; }
}
@media (max-width: 560px) {
    /* Stack the head-to-head so two players + stats no longer overflow narrow phones */
    .h2h { flex-direction: column; gap: 6px; }
    .h2h-side { width: 100%; }
    .h2h-vs { flex-direction: row; }
    .h2h-vs .vs { font-size: 22px; }
    /* Let long player names in timeline lines wrap instead of forcing overflow */
    .tl-item > :last-child { min-width: 0; overflow-wrap: anywhere; }
}

/* ---- Blazor error UI ---- */
#blazor-error-ui {
    display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;
    background: #b3261e; color: #fff; padding: 10px 16px;
}
#blazor-error-ui .reload, #blazor-error-ui .dismiss { color: #fff; cursor: pointer; margin-left: 10px; }
