/* =====================================================================
   SkyEdge — design system

   Hand-authored rather than generated, so the project has no build step:
   editing this file is the whole workflow. The design language is taken
   from the reference site — a zinc-950 ground, emerald-500 accent, and
   translucent "glass" surfaces with a white hairline and backdrop blur.
   ===================================================================== */

:root {
    /* Ground and surfaces */
    --zinc-950: #09090b;
    --zinc-900: #18181b;
    --zinc-800: #27272a;
    --zinc-700: #3f3f46;
    --zinc-600: #52525b;
    --zinc-500: #71717a;
    --zinc-400: #a1a1aa;
    --zinc-300: #d4d4d8;
    --zinc-200: #e4e4e7;
    --white: #ffffff;

    /* Accent */
    --emerald-600: #059669;
    --emerald-500: #10b981;
    --emerald-400: #34d399;
    --emerald-300: #6ee7b7;

    /* Semantic */
    --red-500: #ef4444;
    --red-400: #f87171;
    --amber-500: #f59e0b;
    --amber-400: #fbbf24;
    --blue-500: #3b82f6;
    --blue-400: #60a5fa;
    --purple-500: #a855f7;
    --purple-400: #c084fc;
    --pink-500: #ec4899;
    --pink-400: #f472b6;

    --radius: 0.75rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;

    --hairline: rgba(255, 255, 255, 0.15);
    --surface: rgba(24, 24, 27, 0.35);

    --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

    --max-width: 1400px;

    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--zinc-950);
    color: var(--zinc-300);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* The reference paints a fixed photographic ground behind the glass. Fixed
   rather than scrolling, so the cards blur against a stable image instead of
   smearing as the page moves. */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background: radial-gradient(ellipse at 20% 10%, rgba(16, 185, 129, 0.10), transparent 55%),
                radial-gradient(ellipse at 80% 60%, rgba(59, 130, 246, 0.08), transparent 55%),
                var(--zinc-950);
}

img, svg { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { margin: 0; font-weight: 800; color: var(--white); line-height: 1.25; }

p { margin: 0; }

/* Visible focus for keyboard users. Never removed — the reference site drops
   focus rings entirely, which we treat as a bug rather than a style. */
:focus-visible {
    outline: 2px solid var(--emerald-400);
    outline-offset: 2px;
    border-radius: 4px;
}

::selection { background: var(--emerald-500); color: var(--zinc-950); }

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: -9999px;
    z-index: 100;
}
.skip-link:focus {
    left: 1rem; top: 1rem;
    padding: 0.5rem 1rem;
    background: var(--emerald-500);
    color: var(--zinc-950);
    font-weight: 700;
    border-radius: var(--radius);
}

/* ---------------------------------------------------------------------
   Layout
   --------------------------------------------------------------------- */

.container {
    width: 100%;
    max-width: var(--max-width);
    margin-inline: auto;
    padding-inline: 1rem;
}

.page { padding-block: 1.5rem; padding-bottom: 6rem; }

@media (min-width: 768px) {
    .page { padding-bottom: 2rem; }
}

.layout { display: flex; gap: 1.5rem; align-items: flex-start; }
.layout__main { flex: 1; min-width: 0; }

.sidebar { display: none; width: 15rem; flex-shrink: 0; }

@media (min-width: 1024px) {
    .sidebar { display: block; }
    .sidebar > * { position: sticky; top: 5rem; }
}

.stack > * + * { margin-top: 1rem; }
.stack-sm > * + * { margin-top: 0.5rem; }
.stack-lg > * + * { margin-top: 1.5rem; }

.grid { display: grid; gap: 0.75rem; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (min-width: 640px) {
    .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
    .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.row { display: flex; align-items: center; gap: 0.75rem; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.row-wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.shrink-0 { flex-shrink: 0; }

/* ---------------------------------------------------------------------
   Surfaces
   --------------------------------------------------------------------- */

.glass {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--hairline);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border-radius: var(--radius-lg);
    transform: translateZ(0);
}

.card { padding: 1rem; }
.card-lg { padding: 1.5rem; }
.card-sm { padding: 0.75rem; }

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-body { padding: 1rem; }

.divide > * + * { border-top: 1px solid rgba(255, 255, 255, 0.05); }

/* ---------------------------------------------------------------------
   Typography
   --------------------------------------------------------------------- */

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    color: var(--white);
}

.brand__mark {
    display: grid;
    place-items: center;
    width: 2rem; height: 2rem;
    border-radius: 0.375rem;
    background: var(--emerald-500);
    color: var(--zinc-950);
    font-size: 1.125rem;
    font-weight: 900;
}

.page-title {
    font-size: 1.125rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.eyebrow {
    font-size: 0.6875rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--zinc-500);
}

.muted { color: var(--zinc-400); }
.dim   { color: var(--zinc-500); }
.faint { color: var(--zinc-600); }
.white { color: var(--white); }
.accent { color: var(--emerald-400); }
.danger { color: var(--red-400); }
.warn  { color: var(--amber-400); }

.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }

.bold { font-weight: 700; }
.black { font-weight: 900; }
.tabular { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.right { text-align: right; }

/* ---------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0 1rem;
    height: 2.5rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s;
}

.btn:active:not(:disabled) { transform: translateY(1px); }

.btn:disabled,
.btn[aria-disabled='true'] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-primary { background: var(--emerald-500); color: var(--zinc-950); }
.btn-primary:hover:not(:disabled) { background: var(--emerald-400); }

.btn-secondary {
    background: var(--surface);
    border-color: var(--hairline);
    color: var(--white);
    backdrop-filter: blur(12px);
}
.btn-secondary:hover:not(:disabled) { background: rgba(255, 255, 255, 0.1); }

.btn-ghost { background: transparent; color: var(--zinc-300); }
.btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.1); color: var(--white); }

.btn-danger { background: var(--red-500); color: var(--white); }
.btn-danger:hover:not(:disabled) { background: var(--red-400); }

.btn-sm { height: 2rem; padding: 0 0.75rem; font-size: 0.75rem; border-radius: 0.5rem; }
.btn-lg { height: 3rem; padding: 0 1.5rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* ---------------------------------------------------------------------
   Forms
   --------------------------------------------------------------------- */

.field { display: block; }
.field + .field { margin-top: 1rem; }

.label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--zinc-400);
}

/* The required marker is drawn by CSS rather than being text in the label:
   an asterisk in the DOM becomes part of the accessible name, so a screen
   reader announces "Password star". The required attribute carries the
   semantics; the star is purely visual. */
.label.required::after {
    content: '*';
    margin-inline-start: 0.15rem;
    color: var(--emerald-400);
}

.input, .select, .textarea {
    display: block;
    width: 100%;
    padding: 0.625rem 0.75rem;
    background: rgba(9, 9, 11, 0.6);
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    color: var(--white);
    font-family: inherit;
    font-size: 0.875rem;
    transition: border-color 0.15s;
}

.input:focus, .select:focus, .textarea:focus {
    border-color: var(--emerald-500);
    outline: none;
}

.input::placeholder, .textarea::placeholder { color: var(--zinc-600); }

.input:disabled, .select:disabled, .textarea:disabled { opacity: 0.5; }

.input[aria-invalid='true'] { border-color: rgba(239, 68, 68, 0.6); }

.input-amount {
    text-align: right;
    font-size: 1.125rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.textarea { resize: vertical; min-height: 6rem; }

.select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1.25rem;
    padding-right: 2rem;
}

.field-error { margin-top: 0.375rem; font-size: 0.75rem; font-weight: 600; color: var(--red-400); }
.field-hint  { margin-top: 0.375rem; font-size: 0.75rem; color: var(--zinc-500); }

/* Taller, darker inputs for the sign-up and sign-in cards, where there are
   only three of them and they carry the whole screen. */
.input-lg {
    padding: 0.9rem 1rem;
    font-size: 0.9375rem;
    background: rgba(0, 0, 0, 0.55);
    border-radius: var(--radius-lg);
}

/* ---------------------------------------------------------------------
   Auth card — the sign-up / sign-in screen
   --------------------------------------------------------------------- */

.auth-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem 1rem;
}

.auth-card {
    position: relative;
    width: 100%;
    max-width: 29rem;
    padding: 1.25rem 2rem 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
}

@media (min-width: 480px) { .auth-card { padding-inline: 2.5rem; } }

.auth-card__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.auth-card__back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--zinc-300);
}

.auth-card__back:hover { color: var(--white); }

.auth-card__close {
    display: inline-flex;
    padding: 0.25rem;
    border-radius: var(--radius);
    color: var(--zinc-400);
}

.auth-card__close:hover { color: var(--white); background: rgba(255,255,255,0.08); }

/* The crest is the one saturated thing above the fold, so it carries the
   brand colour and a glow rather than the heading doing it. */
.auth-card__crest {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4.5rem;
    height: 4.5rem;
    margin-bottom: 1.25rem;
    border-radius: 1.25rem;
    background: var(--emerald-500);
    color: var(--zinc-950);
    box-shadow: 0 0 36px rgba(16, 185, 129, 0.45);
}

.auth-card__title {
    font-size: clamp(1.875rem, 6vw, 2.25rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    color: var(--white);
    margin-bottom: 0.375rem;
}

.auth-card__subtitle { font-size: 0.9375rem; color: var(--zinc-400); margin-bottom: 2rem; }

/* Labels go back to upper-case here: with only three fields and no other
   structure on the screen they are what separates one block from the next. */
.auth-form { text-align: left; }

.auth-form .label {
    font-size: 0.6875rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--zinc-300);
    margin-bottom: 0.5rem;
}

.auth-form .field + .field { margin-top: 1.25rem; }

.auth-card__submit {
    height: 3.25rem;
    margin-top: 2rem;
    border-radius: var(--radius-full);
    font-size: 1rem;
    box-shadow: 0 0 28px rgba(16, 185, 129, 0.35);
}

/* Acceptance by completing the form, so the wording has to be next to the
   button that does it — not buried in a footer. */
.auth-card__terms {
    margin-top: 1rem;
    font-size: 0.6875rem;
    line-height: 1.6;
    color: var(--zinc-500);
    text-align: center;
}

.auth-card__terms a { color: var(--zinc-400); text-decoration: underline; }
.auth-card__terms a:hover { color: var(--white); }

.auth-card__alt { margin-top: 1.5rem; font-size: 0.875rem; color: var(--zinc-400); }
.auth-card__alt a { font-weight: 800; color: var(--emerald-400); }
.auth-card__alt a:hover { color: var(--emerald-300); }

.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    cursor: pointer;
}

.checkbox input[type='checkbox'] {
    flex-shrink: 0;
    width: 1rem; height: 1rem;
    margin-top: 0.125rem;
    accent-color: var(--emerald-500);
}

/* ---------------------------------------------------------------------
   Alerts
   --------------------------------------------------------------------- */

.alert {
    padding: 0.75rem;
    border: 1px solid;
    border-radius: var(--radius);
    font-size: 0.875rem;
}

.alert-error   { border-color: rgba(239, 68, 68, 0.3);  background: rgba(239, 68, 68, 0.1);  color: var(--red-400); }
.alert-success { border-color: rgba(16, 185, 129, 0.3); background: rgba(16, 185, 129, 0.1); color: var(--emerald-400); }
.alert-warn    { border-color: rgba(245, 158, 11, 0.3); background: rgba(245, 158, 11, 0.1); color: var(--amber-400); }
.alert-info    { border-color: var(--hairline);          background: rgba(255,255,255,0.05); color: var(--zinc-400); }

/* ---------------------------------------------------------------------
   Pills and badges
   --------------------------------------------------------------------- */

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.625rem;
    border: 1px solid;
    border-radius: var(--radius-full);
    font-size: 0.625rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.tone-good  { border-color: rgba(16, 185, 129, 0.3); background: rgba(16, 185, 129, 0.15); color: var(--emerald-400); }
.tone-bad   { border-color: rgba(239, 68, 68, 0.3);  background: rgba(239, 68, 68, 0.15);  color: var(--red-400); }
.tone-warn  { border-color: rgba(245, 158, 11, 0.3); background: rgba(245, 158, 11, 0.15); color: var(--amber-400); }
.tone-live  { border-color: rgba(239, 68, 68, 0.4);  background: rgba(239, 68, 68, 0.2);   color: var(--red-400); }
.tone-muted { border-color: rgba(113, 113, 122, 0.3); background: rgba(113,113,122,0.15);  color: var(--zinc-400); }

.dot { width: 0.5rem; height: 0.5rem; border-radius: var(--radius-full); flex-shrink: 0; }
.dot-live { background: var(--emerald-500); animation: pulse 2s ease-in-out infinite; }
.dot-idle { background: var(--zinc-600); }

@keyframes pulse { 50% { opacity: 0.4; } }

/* Horizontal scroll rails — sports chips, history strip. */
.rail {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { flex-shrink: 0; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 1rem;
    border: 1px solid var(--hairline);
    border-radius: var(--radius-full);
    background: var(--surface);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--zinc-300);
    transition: background-color 0.15s, color 0.15s;
}
.chip:hover { background: rgba(255, 255, 255, 0.1); color: var(--white); }
.chip[aria-current='true'], .chip.is-active {
    background: var(--emerald-500);
    border-color: var(--emerald-500);
    color: var(--zinc-950);
}

/* ---------------------------------------------------------------------
   Tables. Scroll inside their own container so the page never does.
   --------------------------------------------------------------------- */

.table-scroll { overflow-x: auto; }

.table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }

.table th {
    padding: 0.625rem 1rem;
    text-align: left;
    font-size: 0.6875rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--zinc-500);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
}

.table td {
    padding: 0.625rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

.table tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
.table tbody tr:last-child td { border-bottom: none; }

/* ---------------------------------------------------------------------
   Header
   --------------------------------------------------------------------- */

.header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--hairline);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    height: 4rem;
}

.header__nav { display: none; gap: 1.5rem; }

@media (min-width: 768px) {
    .header__nav { display: flex; }
    .header__menu-toggle { display: none; }
}

.header__link {
    padding: 1.25rem 0;
    border-bottom: 2px solid transparent;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--zinc-400);
    transition: color 0.15s;
}
.header__link:hover { color: var(--white); }
.header__link[aria-current='page'] { border-bottom-color: var(--emerald-500); color: var(--white); }

.header__balance {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    background: var(--surface);
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--white);
}
@media (min-width: 640px) { .header__balance { display: inline-flex; } }

.icon-btn {
    position: relative;
    display: grid;
    place-items: center;
    width: 2.25rem; height: 2.25rem;
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--zinc-300);
    cursor: pointer;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.1); color: var(--white); }

.badge-count {
    position: absolute;
    top: -0.25rem; right: -0.25rem;
    display: grid;
    place-items: center;
    min-width: 1rem; height: 1rem;
    padding: 0 0.25rem;
    border-radius: var(--radius-full);
    background: var(--emerald-500);
    color: var(--zinc-950);
    font-size: 0.625rem;
    font-weight: 900;
}

.mobile-nav { display: block; padding: 0.75rem 0; border-top: 1px solid rgba(255,255,255,0.1); }
@media (min-width: 768px) { .mobile-nav { display: none; } }

/*
   The menu is toggled by the `hidden` attribute, and an author `display:block`
   beats the UA stylesheet's `[hidden] { display: none }` — so without this the
   menu was permanently open, standing the mobile header up to nearly 300px and
   pushing the game most of the way down the screen.
*/
.mobile-nav[hidden] { display: none; }

.mobile-nav a {
    display: block;
    padding: 0.625rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--zinc-400);
}
.mobile-nav a:hover { background: rgba(255,255,255,0.05); color: var(--white); }

/* Bottom bar — Sports / Bet Slip / Aviator / Wallet, as in the reference. */
.bottom-nav {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: rgba(9, 9, 11, 0.92);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--hairline);
}
@media (min-width: 768px) { .bottom-nav { display: none; } }

.bottom-nav a, .bottom-nav button {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.625rem 0;
    border: 0;
    background: none;
    font-family: inherit;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--zinc-400);
    cursor: pointer;
}
.bottom-nav a[aria-current='page'] { color: var(--emerald-400); }

/* ---------------------------------------------------------------------
   Account dropdown
   --------------------------------------------------------------------- */

.menu { position: relative; }

.menu__panel {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    z-index: 50;
    width: 14rem;
    padding: 0.375rem;
    background: rgba(24, 24, 27, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.6);
}

.menu__panel[hidden] { display: none; }

.menu__item {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: var(--zinc-300);
    width: 100%;
    text-align: left;
    border: 0;
    background: none;
    font-family: inherit;
    cursor: pointer;
}
.menu__item:hover { background: rgba(255,255,255,0.1); color: var(--white); }

.avatar {
    display: grid;
    place-items: center;
    width: 1.5rem; height: 1.5rem;
    border-radius: var(--radius-full);
    background: var(--emerald-500);
    color: var(--zinc-950);
    font-size: 0.75rem;
    font-weight: 900;
}
.avatar-lg { width: 3.5rem; height: 3.5rem; font-size: 1.5rem; }

/* ---------------------------------------------------------------------
   Match cards and odds
   --------------------------------------------------------------------- */

.match__teams { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; }
.match__team  { font-size: 0.875rem; font-weight: 700; color: var(--white); }
.match__vs    { font-size: 0.625rem; font-weight: 900; letter-spacing: 0.15em; color: var(--zinc-600); }

.odds-row { display: flex; gap: 0.5rem; }

.odds-btn {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.625rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s;
}

.odds-btn:hover:not(:disabled) { border-color: rgba(255,255,255,0.25); background: rgba(255,255,255,0.1); }

.odds-btn[aria-pressed='true'] {
    border-color: var(--emerald-500);
    background: var(--emerald-500);
    color: var(--zinc-950);
}
.odds-btn[aria-pressed='true'] .odds-btn__label { color: rgba(9,9,11,0.7); }

.odds-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.odds-btn__label { font-size: 0.75rem; font-weight: 600; color: var(--zinc-400); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.odds-btn__value { font-variant-numeric: tabular-nums; flex-shrink: 0; }

/* A price that just moved flashes, so the change is noticed rather than
   silently swapped under the cursor. */
.odds-btn.flash-up   { box-shadow: 0 0 0 2px var(--emerald-400); }
.odds-btn.flash-down { box-shadow: 0 0 0 2px var(--red-400); }

/* ---------------------------------------------------------------------
   Bet slip
   --------------------------------------------------------------------- */

/* One instance serves both layouts. Rendering the slip twice (once per
   layout) would put duplicate element ids and duplicate live regions in the
   DOM at the same time, since display:none removes something visually but
   leaves it reachable by getElementById and by assistive technology.

   Below lg it is a bottom sheet, hidden until opened. From lg up it is a
   sticky rail that is always visible — which is why the desktop rule has to
   override the `hidden` attribute the markup ships with. */
.betslip {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border-inline: 0;
    border-bottom: 0;
}

.betslip[hidden] { display: none; }

@media (min-width: 1024px) {
    .betslip,
    .betslip[hidden] {
        position: sticky;
        top: 5rem;
        inset-inline: auto;
        bottom: auto;
        z-index: auto;
        display: flex;
        width: 20rem;
        flex-shrink: 0;
        max-height: calc(100vh - 6rem);
        border-radius: var(--radius-lg);
        border: 1px solid var(--hairline);
    }
}

.betslip__backdrop {
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    border: 0;
    cursor: pointer;
}
@media (min-width: 1024px) { .betslip__backdrop { display: none; } }

.betslip__items { max-height: 45vh; overflow-y: auto; padding: 0.75rem; }

.betslip__item {
    padding: 0.75rem;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius);
    background: rgba(255,255,255,0.05);
}
.betslip__item + .betslip__item { margin-top: 0.5rem; }
.betslip__item.is-suspended { border-color: rgba(239,68,68,0.4); background: rgba(239,68,68,0.05); }

/* ---------------------------------------------------------------------
   Aviator betting panels

   Two of them, side by side from 640px up and stacked below that. Each is a
   self-contained unit: stake controls on the left, one big action button on
   the right, auto cash-out underneath.
   --------------------------------------------------------------------- */

.bet-panels { display: grid; gap: 0.75rem; grid-template-columns: 1fr; }

@media (min-width: 640px) { .bet-panels { grid-template-columns: 1fr 1fr; } }

.bet-panel {
    padding: 0.875rem;
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    background: rgba(24, 24, 27, 0.72);
    min-width: 0;
}

/* The action button matches the height of the stake block beside it rather
   than being sized by its own text, which is what makes it the obvious
   target under a thumb. */
.bet-panel__main { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; align-items: stretch; }
.bet-panel__stake { min-width: 0; }

.stepper {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem;
    border: 1px solid var(--hairline);
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, 0.45);
}

.stepper__btn {
    flex: none;
    width: 1.75rem;
    height: 1.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.08);
    color: var(--zinc-300);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.stepper__btn:hover:not(:disabled) { background: rgba(255,255,255,0.16); color: var(--white); }
.stepper__btn:disabled { opacity: 0.35; cursor: default; }

.stepper__input {
    flex: 1;
    min-width: 0;
    border: none;
    background: none;
    color: var(--white);
    text-align: center;
    font-size: 1.125rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    font-family: inherit;
}

.stepper__input:focus { outline: none; }
.stepper__input:disabled { opacity: 0.6; }

.bet-panel__chips { display: grid; grid-template-columns: 1fr 1fr; gap: 0.375rem; margin-top: 0.5rem; }

.bet-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.125rem;
    min-height: 5.25rem;
    padding: 0.5rem;
    border: none;
    border-radius: var(--radius-lg);
    background: var(--emerald-600, #059669);
    color: var(--white);
    font-family: inherit;
    font-size: 1.125rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.1;
    cursor: pointer;
    transition: background 0.15s, transform 0.08s;
}

.bet-action:hover:not(:disabled) { background: var(--emerald-500); }
.bet-action:active:not(:disabled) { transform: scale(0.98); }

.bet-action__amount { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0; opacity: 0.9; }
.bet-action__amount:empty { display: none; }

/* Waiting: still green, but visibly not a thing to press. */
.bet-action.is-waiting {
    background: rgba(5, 150, 105, 0.35);
    color: rgba(255, 255, 255, 0.55);
    cursor: default;
}

/* Cash out is amber, never green: it is a different decision from placing a
   bet and the colour has to say so before the label is read. */
.bet-action.is-cashout { background: var(--amber-500); color: var(--zinc-950); }
.bet-action.is-cashout:hover:not(:disabled) { background: #fbbf24; }

.bet-action:disabled:not(.is-waiting) { opacity: 0.55; cursor: default; }

.bet-panel__auto {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.bet-panel__auto-value {
    width: 4.5rem;
    margin-left: auto;
    padding: 0.3rem 0.5rem;
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    background: rgba(0, 0, 0, 0.45);
    color: var(--white);
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 700;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.bet-panel__auto-value:focus { outline: none; border-color: var(--emerald-500); }

.bet-panel__msg { margin-top: 0.625rem; font-size: 0.75rem; font-weight: 700; text-align: center; }
.bet-panel__msg.is-win   { color: var(--emerald-400); }
.bet-panel__msg.is-loss  { color: var(--zinc-500); }
.bet-panel__msg.is-error { color: var(--red-400); }

/* Switch. A real checkbox underneath, so it is focusable and announced as a
   checkbox without any ARIA of its own. */
.switch { display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.switch__track {
    position: relative;
    flex: none;
    width: 2.25rem;
    height: 1.25rem;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.15);
    transition: background 0.15s;
}

.switch__thumb {
    position: absolute;
    top: 0.1875rem;
    left: 0.1875rem;
    width: 0.875rem;
    height: 0.875rem;
    border-radius: var(--radius-full);
    background: var(--zinc-400);
    transition: transform 0.15s, background 0.15s;
}

.switch input:checked + .switch__track { background: var(--emerald-500); }
.switch input:checked + .switch__track .switch__thumb { transform: translateX(1rem); background: var(--white); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--emerald-400); outline-offset: 2px; }
.switch input:disabled + .switch__track { opacity: 0.45; }

.switch__label { font-size: 0.8125rem; font-weight: 600; color: var(--zinc-400); }

@media (prefers-reduced-motion: reduce) {
    .switch__track, .switch__thumb, .bet-action { transition: none; }
}

/* ---------------------------------------------------------------------
   Deposit
   --------------------------------------------------------------------- */

/* The balance leads, because it is the thing the player came to change. */
.deposit-hero {
    margin: -0.5rem -0.5rem 1.25rem;
    padding: 1.25rem 1.25rem 1rem;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(ellipse at 15% 0%, rgba(16, 185, 129, 0.22), transparent 62%),
        linear-gradient(160deg, rgba(16, 185, 129, 0.14), rgba(16, 185, 129, 0.03));
    border: 1px solid rgba(16, 185, 129, 0.22);
}

.deposit-hero__label {
    font-size: 0.6875rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--emerald-400);
}

.deposit-hero__balance {
    margin-top: 0.25rem;
    font-size: clamp(1.75rem, 7vw, 2.25rem);
    font-weight: 900;
    line-height: 1.1;
    color: var(--white);
    font-variant-numeric: tabular-nums;
}

/* Three plain facts, not three claims. Each one is checkable on this page. */
.deposit-hero__points {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem 1rem;
    margin: 0.875rem 0 0;
    padding: 0;
    list-style: none;
}

.deposit-hero__points li {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--zinc-300);
}

.deposit-hero__points li::before {
    content: '';
    width: 0.875rem;
    height: 0.875rem;
    flex: none;
    border-radius: var(--radius-full);
    background: var(--emerald-500)
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23052e16' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 13 4 4L19 7'/%3E%3C/svg%3E")
        center / 0.625rem no-repeat;
}

/*
   Deliberately not green, and deliberately not styled to be missed.
   It says the money on this page is not real; dressing that up as a piece of
   good news would be the one thing on the page that is not true.
*/
.deposit-note {
    margin-bottom: 1.25rem;
    padding: 0.625rem 0.75rem;
    border-left: 3px solid var(--zinc-600);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--zinc-400);
}

.deposit-note strong { color: var(--zinc-200); }

/* ---------------------------------------------------------------------
   Deposit progress

   Replaces the old "we redirected you away, check your phone" moment with
   something the player can watch. Three states, set by data-state: working
   while the prompt is out, then success or failed.
   --------------------------------------------------------------------- */

/* Same trap as .update-progress below: this panel is toggled by the `hidden`
   attribute, and `display: flex` beats it. Without this an empty progress box
   sat on the deposit page before anyone had pressed anything. */
.deposit-progress[hidden] { display: none; }

.deposit-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    padding: 1.75rem 1.25rem;
    margin-bottom: 1.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--hairline);
    background: rgba(0, 0, 0, 0.35);
}

.deposit-progress[data-state='success'] {
    border-color: rgba(16, 185, 129, 0.45);
    background: rgba(16, 185, 129, 0.08);
}

.deposit-progress[data-state='failed'] {
    border-color: rgba(239, 68, 68, 0.45);
    background: rgba(239, 68, 68, 0.07);
}

.deposit-progress__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
}

.deposit-progress__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 900;
    color: var(--zinc-950);
}

.deposit-progress[data-state='success'] .deposit-progress__mark { background: var(--emerald-400); }
.deposit-progress[data-state='failed'] .deposit-progress__mark { background: var(--red-400); }

.deposit-progress__title {
    font-size: 1.0625rem;
    font-weight: 800;
    color: var(--white);
}

.deposit-progress__text {
    font-size: 0.875rem;
    color: var(--zinc-400);
    max-width: 26rem;
}

/*
   `.btn` sets `display: inline-flex`, which beats the UA stylesheet's
   `[hidden] { display: none }` at equal specificity — so a retry button
   hidden by the attribute stayed on screen, inviting a player to pay twice
   after a payment had already succeeded. The same trap as .mobile-nav and
   .betslip above.

   Not fixed globally with `[hidden] { display: none !important }`, tempting as
   that is: .betslip deliberately stays visible while carrying `hidden` at
   desktop widths, where the attribute means "the mobile drawer is closed", and
   a blanket rule would make the bet slip disappear.
*/
.deposit-progress__actions[hidden],
.deposit-progress__actions [hidden],
.drawer__panel [hidden] { display: none; }

.deposit-progress__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* The spinner is decorative here; the text beside it carries the meaning. */
@media (prefers-reduced-motion: reduce) {
    .deposit-progress .spinner { animation-duration: 2.4s; }
}
.deposit-note a { color: var(--emerald-400); font-weight: 700; text-decoration: underline; }

/* A big, calm amount box: the currency sits outside the value so the number
   itself stays the largest thing on the page. */
.deposit-amount {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    background: rgba(0, 0, 0, 0.5);
    transition: border-color 0.15s;
}

.deposit-amount:focus-within { border-color: var(--emerald-500); }

.deposit-amount__currency {
    flex: none;
    font-size: 0.875rem;
    font-weight: 800;
    color: var(--zinc-500);
}

.deposit-amount__input {
    width: 100%;
    min-width: 0;
    border: none;
    background: none;
    color: var(--white);
    font-family: inherit;
    font-size: 1.75rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.deposit-amount__input:focus { outline: none; }
.deposit-amount__input::placeholder { color: var(--zinc-700); }

.deposit-amount__input[aria-invalid='true'] { color: var(--red-400); }

/* Paybill / Buy Goods picker on the payments settings page. */
.pay-mode__choices { display: grid; gap: 0.5rem; margin-top: 0.5rem; }

@media (min-width: 560px) { .pay-mode__choices { grid-template-columns: 1fr 1fr; } }

.pay-mode__choice {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.75rem 0.875rem;
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    background: rgba(0, 0, 0, 0.35);
    cursor: pointer;
}

.pay-mode__choice:hover { border-color: rgba(255, 255, 255, 0.2); }

/* :has lets the selected card light up without any JavaScript; browsers
   without it simply show the radio, which is still perfectly usable. */
.pay-mode__choice:has(input:checked) {
    border-color: var(--emerald-500);
    background: rgba(16, 185, 129, 0.08);
}

.pay-mode__choice input { margin-top: 0.15rem; flex: none; accent-color: var(--emerald-500); }

/*
   The Paybill field group carries `.grid`, and an author `display: grid`
   beats the UA stylesheet's `[hidden] { display: none }` at equal
   specificity — the same trap fixed for .mobile-nav above. Without this,
   switching to Buy Goods left the Paybill Number and Account Number boxes
   visibly stacked on top of the Till Number box instead of actually hidden.
*/
[data-pay-fields][hidden] { display: none; }

/* The single deposit method, stated rather than offered as a choice. */
.deposit-method {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-lg);
    background: rgba(16, 185, 129, 0.08);
}

.deposit-method__mark {
    flex: none;
    padding: 0.4rem 0.55rem;
    border-radius: var(--radius);
    background: var(--emerald-500);
    color: var(--zinc-950);
    font-size: 0.625rem;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.quick-stakes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.375rem; margin-top: 0.5rem; }

.quick-stake {
    padding: 0.375rem;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 0.5rem;
    background: rgba(255,255,255,0.05);
    color: var(--zinc-300);
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
}
.quick-stake:hover { background: rgba(255,255,255,0.1); color: var(--white); }

.summary { padding: 0.75rem; border-radius: var(--radius); background: rgba(255,255,255,0.05); font-size: 0.75rem; }
.summary__row { display: flex; justify-content: space-between; }
.summary__row + .summary__row { margin-top: 0.25rem; }

/* ---------------------------------------------------------------------
   Aviator
   --------------------------------------------------------------------- */

.aviator-layout {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: 1fr;

    /*
       Everything above the grid on this page: the 4rem header, the page's own
       top padding, the title row, and the page's bottom padding. Kept as one
       figure so the fit below can be adjusted in a single place.
    */
    --aviator-chrome: 10.5rem;
}

/* min-width:0 so a wide table cannot force the grid track past the viewport. */
.aviator-layout > * { min-width: 0; }

.game {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-lg);
    /* A near-black ground that is not quite black, so the beams drawn over it
       in shadow have something to be darker than. */
    background: radial-gradient(ellipse 120% 110% at 12% 96%, #23242c 0%, #15161d 42%, #0a0a11 100%);
}

@media (min-width: 640px) { .game { aspect-ratio: 16 / 9; } }

/*
   From lg up the whole game fits the window without scrolling.

   The board is what gives: the history strip and the two betting panels are
   sized by their content, and the flight area takes whatever is left. Sizing
   it by aspect ratio instead — as it is on a phone — is what pushed the BET
   buttons below the fold on a laptop, which is the one thing on this page
   that always has to be reachable.
*/
@media (min-width: 1024px) {
    .aviator-layout {
        grid-template-columns: 19rem 1fr;
        height: calc(100vh - var(--aviator-chrome));
        /* dvh accounts for mobile browser chrome that comes and goes. */
        height: calc(100dvh - var(--aviator-chrome));
        /* Below this the board would be a letterbox; let the page scroll instead. */
        min-height: 33rem;
    }

    .aviator-layout__table { grid-column: 1; grid-row: 1; min-height: 0; }

    .aviator-layout__game {
        grid-column: 2;
        grid-row: 1;
        min-height: 0;
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    /* The column is a flex gap now, so the .stack margins would double it. */
    .aviator-layout__game > * + * { margin-top: 0; }

    .aviator-layout__game .game {
        flex: 1 1 auto;
        aspect-ratio: auto;
        min-height: 11rem;
    }

    /* ALL BETS fills the column and scrolls inside its own box. */
    .aviator-layout__table > .glass {
        display: flex;
        flex-direction: column;
        height: 100%;
    }
}

/* On a phone the list is capped so it cannot push the game off the screen;
   from lg up it stretches to the height of the column beside it. */
.bets-scroll { max-height: 22rem; overflow-y: auto; }

@media (min-width: 1024px) {
    .bets-scroll { max-height: none; flex: 1 1 auto; min-height: 0; }
}

/* Fine rays at low alpha. Wider wedges read as huge triangles at this size
   and swamp the flight curve drawn on top of them. */
/* Beams radiate from where the aircraft launches - 6% across, 12% up - which is
   the same point the flight path starts from, so the whole frame reads as one
   movement out of the corner rather than two unrelated effects. */
/* Beams fanning out of the bottom-left corner.

   Dark bands over a lighter ground rather than bright bands over black: in the
   reference the rays read as shadow, which is what keeps them from competing
   with the red curve for attention. No mask — they run the full width, fading
   only through the vignette. */
.game__sunburst {
    position: absolute;
    inset: 0;
    background: repeating-conic-gradient(from -90deg at 0% 100%,
        rgba(0, 0, 0, 0.62) 0deg 3.1deg,
        rgba(0, 0, 0, 0) 3.1deg 7.4deg);
    transform-origin: 0% 100%;
}

/* Cold atmosphere up and to the right, opposite the warm beams. It is what
   stops the dark half of the frame reading as an empty hole. */
/* The cold pool of light behind the multiplier. Sits above the beams so the
   rays read as passing through it. */
.game__aurora {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 46% 60% at 46% 30%, rgba(42, 120, 190, 0.34), transparent 68%),
        radial-gradient(ellipse 30% 40% at 58% 22%, rgba(80, 170, 230, 0.20), transparent 70%);
}

.game.is-running .game__sunburst { animation: spin 60s linear infinite; }

.game.is-crashed .game__sunburst {
    background: repeating-conic-gradient(from 0deg at 50% 58%,
        rgba(190, 30, 30, 0.42) 0deg 2.2deg,
        rgba(0, 0, 0, 0) 2.2deg 5deg);
}

@keyframes spin { to { transform: rotate(360deg); } }

.game__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 42px 42px;
}

.game__vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 35%, rgba(0,0,0,0.75) 100%);
}

.game__svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* The plane sits in its own layer: the SVG uses preserveAspectRatio="none",
   which would shear the aircraft out of shape. */
.game__plane {
    position: absolute;
    transform-origin: center;
    transition: left 0.1s linear, bottom 0.1s linear;
    /* Three shadows, and the first is the one that matters: a tight dark rim.
       The aircraft flies over its own crimson travelled-region, and red on red
       has almost no edge — the dark ring is what separates them. The two red
       glows behind it then lift the whole thing off the sky. */
    filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.95))
            drop-shadow(0 0 11px rgba(255, 90, 110, 0.9))
            drop-shadow(0 0 28px rgba(190, 24, 60, 0.55));
    width: clamp(4rem, 11vw, 7.5rem);
    z-index: 2;
}

/* The exhaust flickers rather than burning steady. */
.game__plane .aviator-burn {
    transform-box: fill-box;
    transform-origin: right center;
    animation: jet-burn 0.32s ease-in-out infinite alternate;
}

@keyframes jet-burn {
    from { opacity: 0.55; transform: scaleX(0.82); }
    to   { opacity: 1;    transform: scaleX(1.12); }
}

/* The line blooms while the round is running and loses it the moment the plane
   goes - a crashed round should look spent. */
.game.is-running .game__trail-line { filter: drop-shadow(0 0 6px rgba(251, 44, 90, 0.6)); }
.game.is-crashed .game__trail-glow { opacity: 0.12; }

.game.is-crashed .game__plane { animation: fly-off 0.9s ease-in forwards; }

@keyframes fly-off {
    to { transform: translate(420px, -180px) rotate(-18deg); opacity: 0; }
}

.game__readout {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
}

.game__multiplier {
    font-size: clamp(3.25rem, 13vw, 7rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    color: var(--white);
    font-variant-numeric: tabular-nums;
    /* A tight dark halo for legibility over the curve, then a soft bloom for
       the glow. Order matters - the dark one has to sit underneath. */
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.85),
                 0 0 60px rgba(255, 255, 255, 0.28),
                 0 0 120px rgba(99, 102, 241, 0.35);
    line-height: 0.95;
}

.game__banner {
    font-size: clamp(1.5rem, 6vw, 3rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--red-500);
    text-shadow: 0 0 24px rgba(239,68,68,0.7);
    animation: shake 0.45s ease-out;
    margin-bottom: 0.5rem;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.game__countdown { font-size: clamp(2.5rem, 8vw, 3.75rem); font-weight: 900; color: var(--white); font-variant-numeric: tabular-nums; }

/* History pills: three tiers, as in the reference. The number is always
   shown, so colour is reinforcement rather than the only signal. */
.crash-pill { padding: 0.25rem 0.75rem; border: 1px solid; border-radius: var(--radius-full); font-family: var(--mono); font-size: 0.75rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.crash-low  { border-color: rgba(59,130,246,0.4);  background: rgba(59,130,246,0.15);  color: var(--blue-400); }
.crash-mid  { border-color: rgba(168,85,247,0.4);  background: rgba(168,85,247,0.15);  color: var(--purple-400); }
.crash-high { border-color: rgba(236,72,153,0.4);  background: rgba(236,72,153,0.15);  color: var(--pink-400); }

/* ALL BETS table. table-fixed with explicit widths so the columns cannot be
   pushed off the right edge on a narrow screen. */
.bets-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 0.875rem; }
.bets-table col.c-user  { width: 46%; }
.bets-table col.c-stake { width: 27%; }
.bets-table col.c-mult  { width: 27%; }

.bets-table th { padding: 0.625rem 0.75rem; font-size: 0.6875rem; }
.bets-table td { padding: 0.625rem 0.75rem; border-bottom: 1px solid rgba(255,255,255,0.05); }

/* A cashed-out row is tinted from the left edge inwards rather than filled
   flat, so a run of winners reads as a list and not as one green block. */
.bets-table tr.is-cashed { background: linear-gradient(90deg, rgba(16,185,129,0.16), rgba(16,185,129,0.04)); }
.bets-table tr.is-cashed td:first-child { box-shadow: inset 3px 0 0 var(--emerald-500); }
.bets-table tr.is-cashed .bets-table__avatar { color: var(--emerald-500); }
.bets-table tr.is-lost { opacity: 0.45; }

.bets-table__who { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.bets-table__avatar { flex: none; color: rgba(255,255,255,0.35); }

/* New rows slide in as players join the round, which is what makes the panel
   read as live rather than as a static list that occasionally changes. */
.bets-table tbody tr { animation: bet-in 0.25s ease-out; }

@keyframes bet-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .bets-table tbody tr { animation: none; }
}

/* ---------------------------------------------------------------------
   Progress bars
   --------------------------------------------------------------------- */

.progress { height: 0.375rem; width: 100%; overflow: hidden; border-radius: var(--radius-full); background: rgba(255,255,255,0.1); }
.progress__fill { height: 100%; border-radius: var(--radius-full); background: var(--emerald-500); transition: width 0.3s; }
.progress__fill.is-warn { background: var(--amber-500); }
.progress__fill.is-danger { background: var(--red-500); }

/* Dashboard chart: plain divs, no charting library. */
.chart { display: flex; align-items: flex-end; gap: 0.5rem; height: 140px; min-width: 560px; }
.chart__col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0.25rem; }
.chart__bars { display: flex; align-items: flex-end; justify-content: center; gap: 2px; width: 100%; height: 100%; }
.chart__bar { width: 50%; border-radius: 2px 2px 0 0; }
.chart__bar.is-staked { background: rgba(16,185,129,0.8); }
.chart__bar.is-deposit { background: rgba(59,130,246,0.8); }
.chart__label { font-size: 0.5625rem; color: var(--zinc-600); white-space: nowrap; }

/* ---------------------------------------------------------------------
   Empty and loading states
   --------------------------------------------------------------------- */

.empty { padding: 2.5rem 1rem; text-align: center; }
.empty__title { font-size: 1.125rem; font-weight: 700; color: var(--white); margin-bottom: 0.25rem; }
.empty__text { font-size: 0.875rem; color: var(--zinc-400); max-width: 24rem; margin-inline: auto; }

.spinner {
    width: 2rem; height: 2rem;
    border: 2px solid var(--emerald-500);
    border-top-color: transparent;
    border-radius: var(--radius-full);
    animation: spin 0.8s linear infinite;
}

/* ---------------------------------------------------------------------
   Pagination
   --------------------------------------------------------------------- */

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; }
.pagination__links { display: flex; gap: 0.25rem; }

.pagination__link {
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--hairline);
    border-radius: 0.5rem;
    background: var(--surface);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--zinc-300);
}
.pagination__link:hover { background: rgba(255,255,255,0.1); color: var(--white); }
.pagination__link[aria-current='page'] { background: var(--emerald-500); border-color: var(--emerald-500); color: var(--zinc-950); }
.pagination__link[aria-disabled='true'] { opacity: 0.4; pointer-events: none; }

/* ---------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------- */

.footer { margin-top: 3rem; border-top: 1px solid rgba(255,255,255,0.1); padding-bottom: 5rem; }
@media (min-width: 768px) { .footer { padding-bottom: 0; } }

.footer__grid { display: grid; gap: 2rem; grid-template-columns: 1fr; padding-block: 2.5rem; }
@media (min-width: 640px) { .footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer__grid { grid-template-columns: repeat(5, 1fr); } }

.footer h3 { font-size: 0.6875rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.15em; color: var(--zinc-400); margin-bottom: 0.75rem; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li + li { margin-top: 0.5rem; }
.footer a { font-size: 0.75rem; color: var(--zinc-500); }
.footer a:hover { color: var(--white); }

.footer__legal {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.75rem;
    color: var(--zinc-500);
}
@media (min-width: 640px) { .footer__legal { flex-direction: row; align-items: center; justify-content: space-between; } }

.age-badge {
    display: grid;
    place-items: center;
    width: 1.75rem; height: 1.75rem;
    border: 1px solid var(--zinc-600);
    border-radius: var(--radius-full);
    font-size: 0.625rem;
    font-weight: 900;
    color: var(--zinc-400);
}

/* ---------------------------------------------------------------------
   Prose, for the legal and help pages
   --------------------------------------------------------------------- */

.prose { font-size: 0.875rem; line-height: 1.7; color: var(--zinc-300); }
.prose h2 { font-size: 1rem; font-weight: 800; color: var(--white); margin-top: 1.5rem; margin-bottom: 0.5rem; }
.prose h2:first-child { margin-top: 0; }
.prose p + p { margin-top: 0.75rem; }
.prose ul { list-style: disc; padding-left: 1.25rem; margin-top: 0.5rem; }
.prose li + li { margin-top: 0.35rem; }
.prose a { color: var(--emerald-400); text-decoration: underline; }
.prose details { border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 1rem; }
.prose details + details { margin-top: 1rem; }
.prose summary { cursor: pointer; font-weight: 700; color: var(--white); }
.prose summary:hover { color: var(--emerald-400); }
.prose code { font-family: var(--mono); font-size: 0.8125em; padding: 0.1em 0.3em; background: rgba(255,255,255,0.08); border-radius: 3px; }

/* ---------------------------------------------------------------------
   Admin
   --------------------------------------------------------------------- */

.admin-layout { display: flex; flex-direction: column; gap: 1.25rem; }
@media (min-width: 1024px) { .admin-layout { flex-direction: row; } }

.admin-nav { flex-shrink: 0; }
@media (min-width: 1024px) { .admin-nav { width: 12rem; } }

.admin-nav ul { display: flex; gap: 0.375rem; overflow-x: auto; list-style: none; margin: 0; padding: 0 0 0.25rem; scrollbar-width: none; }
.admin-nav ul::-webkit-scrollbar { display: none; }
.admin-nav li { flex-shrink: 0; }

@media (min-width: 1024px) {
    .admin-nav ul { flex-direction: column; gap: 0.125rem; padding-bottom: 0; overflow: visible; }
}

.admin-nav a {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--zinc-300);
    white-space: nowrap;
}
@media (min-width: 1024px) { .admin-nav a { font-size: 0.875rem; } }
.admin-nav a:hover { background: rgba(255,255,255,0.1); color: var(--white); }
.admin-nav a[aria-current='page'] { background: var(--emerald-500); color: var(--zinc-950); }

/* A fold-away panel in the console, used by the new-user form on the user
   list. The native triangle is dropped for the pill on the right, which is the
   affordance every other control here uses. The pill is aria-hidden, so
   assistive tech reads the disclosure state from <details> itself rather than
   from a label that could drift out of step with it. */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }  /* older WebKit */
details > summary:focus-visible { outline: 2px solid var(--emerald-400); outline-offset: 4px; border-radius: 0.5rem; }
details[open] > summary .disclosure-toggle { font-size: 0; }
details[open] > summary .disclosure-toggle::after { content: 'Close'; font-size: 0.75rem; }

.stat { padding: 1rem; }
.stat__label { font-size: 0.6875rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.1em; color: var(--zinc-500); margin-bottom: 0.25rem; }
.stat__value { font-size: 1.25rem; font-weight: 900; color: var(--white); font-variant-numeric: tabular-nums; }
.stat__sub { font-size: 0.6875rem; color: var(--zinc-600); margin-top: 0.125rem; }

/* The crash point on the Aviator control page. Sized like the player-facing
   multiplier so the operator reads the same number at the same weight, and
   amber rather than white: this is the one figure on the console that is not
   yet public. */
.admin-crash {
    font-size: clamp(2.75rem, 9vw, 5rem);
    font-weight: 900;
    line-height: 1;
    color: var(--amber-500);
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 36px rgba(245, 158, 11, 0.35);
}

/* ---------------------------------------------------------------------
   Utilities
   --------------------------------------------------------------------- */

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.hidden { display: none !important; }
.block { display: block; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.w-full { width: 100%; }
.relative { position: relative; }

/* Motion is decoration here; every state is also carried by text. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Branding preview: the wordmark shown at the size it actually renders. */
.brand-preview {
    display: flex;
    align-items: center;
    padding: 1.25rem;
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    background: rgba(0, 0, 0, 0.4);
}

/* ---------------------------------------------------------------------
   Aviator welcome popup

   One layered surface rather than a split panel: sky, then the aircraft, then
   a scrim that darkens only the side the words sit on, then the words. The
   aircraft is placed here rather than inside the background SVG because the
   background is sliced to fill the card and the aircraft must not be.

   Off the site's emerald palette on purpose — this should read as a promotion
   sitting on top of the product, not as part of the page behind it.

   Rendered with [hidden] and opened by app.js, so `display` only lifts once
   the script is running and able to close it again.
   --------------------------------------------------------------------- */

.promo[hidden] { display: none; }

.promo {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.promo__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 6, 16, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: promo-fade 0.25s ease-out;
}

.promo__dialog {
    position: relative;
    width: 100%;
    max-width: 60rem;
    /* Never taller than the window: the close button has to stay reachable
       without the page behind it scrolling. */
    max-height: calc(100dvh - 2rem);
    overflow: hidden auto;
    border-radius: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: #2a0f3d;
    /* A drop shadow for depth and a coloured spill for warmth. */
    box-shadow: 0 40px 90px -20px rgba(0, 0, 0, 0.8),
                0 0 80px -30px rgba(219, 39, 119, 0.55);
    animation: promo-rise 0.36s cubic-bezier(0.2, 0.9, 0.3, 1);
}

/* ---- layers ---- */

.promo__art {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.promo__scene { width: 100%; height: 100%; display: block; }

.promo__hero {
    position: absolute;
    pointer-events: none;
    /* Right of centre and overlapping inwards, so the aircraft crosses into
       the text column instead of sitting in its own box. */
    right: 1%;
    top: 50%;
    width: 46%;
    transform: translateY(-50%);
}

.promo__plane-svg {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.55));
    animation: promo-approach 6.5s ease-in-out infinite;
}

/* The propeller genuinely rotates here — a nose-on disc can, where the game's
   side-on view can only pulse its width. Origin is the hub in the plane's own
   viewBox, not the element's box, so it spins true rather than wobbling. */
.promo__blades {
    transform-box: view-box;
    transform-origin: 159px 121px;
    animation: promo-blades 0.26s linear infinite;
}

.promo__rays  { animation: promo-rays 7s ease-in-out infinite; }
.promo__motes { animation: promo-motes 5s ease-in-out infinite; }

/* Darkens the text side only, so the headline holds contrast over the sky
   without flattening the half the aircraft is in. */
.promo__scrim {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(100deg,
        rgba(26, 12, 42, 0.94) 0%,
        rgba(26, 12, 42, 0.86) 34%,
        rgba(36, 14, 52, 0.42) 58%,
        rgba(36, 14, 52, 0) 78%);
}

/* Covers the card so a click anywhere on it opens the game. Beneath the close
   button and out of the tab order — the CTA is the real link. */
.promo__stretch {
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: inherit;
}

.promo__close {
    position: absolute;
    top: 0.875rem;
    right: 0.875rem;
    z-index: 4;
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--radius-full);
    background: rgba(10, 6, 18, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition: background 0.18s ease, transform 0.18s ease, color 0.18s ease;
}
.promo__close:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    transform: scale(1.08);
}

/* ---- words ---- */

.promo__body {
    position: relative;
    z-index: 3;
    /* Lets clicks fall through to the card-wide link; the CTA and the legal
       links opt back in below. */
    pointer-events: none;
    padding: 1.75rem 1.5rem 1.375rem;
}

.promo__body a { pointer-events: auto; }

@media (min-width: 768px) {
    .promo__body { padding: 2.75rem 2.5rem; max-width: 34rem; }
}

.promo__brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.promo__mark {
    display: grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.5rem;
    background: #fff;
    color: #86198f;
    font-size: 1rem;
    font-weight: 900;
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.5);
}

.promo__word {
    font-size: 0.9375rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    color: #fff;
}

/* Glass, per the premium treatment on secondary chrome. Used here and on the
   round chips only — everything glass makes nothing stand out. */
.promo__game {
    padding: 0.1875rem 0.5rem;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 0.625rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
}

.promo__eyebrow {
    display: flex;
    align-items: center;
    gap: 0.4375rem;
    margin-top: 1.5rem;
    font-size: 0.6875rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #fbcfe8;
}

/* A live indicator earns a heartbeat; nothing else on the card does. */
.promo__pulse {
    width: 0.4375rem;
    height: 0.4375rem;
    border-radius: var(--radius-full);
    background: #4ade80;
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
    animation: promo-pulse 2s ease-out infinite;
}

.promo__headline {
    margin-top: 0.5rem;
    /* Wrapped by width rather than a hard break, because the wording is
       operator-editable and so cannot carry markup. */
    max-width: 18ch;
    font-size: clamp(2rem, 7vw, 3.5rem);
    font-weight: 900;
    line-height: 0.96;
    letter-spacing: -0.035em;
    color: #fff;
    text-wrap: balance;
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.5), 0 0 60px rgba(236, 72, 153, 0.25);
}

.promo__sub {
    margin-top: 0.875rem;
    max-width: 30ch;
    font-size: 1rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.86);
}

.promo__recent { margin-top: 1.375rem; }

.promo__recent-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.625rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(255, 255, 255, 0.55);
}

.promo__chips { display: flex; flex-wrap: wrap; gap: 0.375rem; }

.promo__chip {
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 0.8125rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: rgba(255, 255, 255, 0.82);
}
.promo__chip.is-warm {
    color: #a5f3fc;
    border-color: rgba(165, 243, 252, 0.3);
}
.promo__chip.is-hot {
    color: #fde047;
    border-color: rgba(253, 224, 71, 0.4);
    box-shadow: 0 0 16px -4px rgba(253, 224, 71, 0.5);
}

/* ---- the call to action ---- */

.promo__cta {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.625rem;
    /* Comfortably past the 44px minimum tap target. */
    min-height: 3.25rem;
    padding: 0 2rem;
    border-radius: var(--radius-full);
    background: linear-gradient(180deg, #ffffff 0%, #ffe9f4 100%);
    color: #9d174d;
    font-size: 1.0625rem;
    font-weight: 900;
    letter-spacing: 0.01em;
    box-shadow: 0 16px 34px -10px rgba(0, 0, 0, 0.7),
                0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.promo__cta:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 22px 44px -12px rgba(0, 0, 0, 0.75),
                0 0 30px -6px rgba(255, 255, 255, 0.4);
}
.promo__cta:active { transform: translateY(0) scale(1); }
.promo__cta:hover .promo__cta-arrow { transform: translateX(3px); }

.promo__cta-arrow { transition: transform 0.18s ease; }

/* A highlight crossing the button every few seconds. Long gap, short sweep —
   a button that glints constantly reads as broken rather than premium. */
.promo__shine {
    position: absolute;
    top: 0;
    left: -60%;
    width: 45%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.85), transparent);
    animation: promo-shine 5.5s ease-in-out infinite;
}

.promo__meta {
    margin-top: 0.875rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.62);
    font-variant-numeric: tabular-nums;
}

/* Kept readable but stepped down, so it informs without competing. */
.promo__legal {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding-top: 0.875rem;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 0.6875rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.6);
}
.promo__legal a { text-decoration: underline; color: rgba(255, 255, 255, 0.85); }
.promo__legal .age-badge { flex-shrink: 0; }

/* ---- phone: the aircraft moves up out of the way of the words ---- */

@media (max-width: 767px) {
    .promo__hero {
        right: 2%;
        top: 1.75rem;
        width: 64%;
        transform: none;
    }

    /* Vertical rather than diagonal, because the aircraft is now above the
       text rather than beside it. */
    .promo__scrim {
        background: linear-gradient(180deg,
            rgba(26, 12, 42, 0.35) 0%,
            rgba(26, 12, 42, 0.72) 30%,
            rgba(26, 12, 42, 0.95) 48%,
            rgba(26, 12, 42, 0.97) 100%);
    }

    /* Room for the aircraft above the brand line. */
    .promo__body { padding-top: 9.5rem; }

    .promo__headline { max-width: 14ch; }
    .promo__cta { width: 100%; }
}

/* ---- motion ---- */

@keyframes promo-fade { from { opacity: 0; } to { opacity: 1; } }

@keyframes promo-rise {
    from { opacity: 0; transform: translateY(18px) scale(0.97); }
    to   { opacity: 1; transform: none; }
}

/* Rise, bank a touch, and grow very slightly — the "grow" is what sells it as
   coming at the reader rather than drifting across. */
@keyframes promo-approach {
    0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
    50%      { transform: translateY(-11px) rotate(-1.2deg) scale(1.035); }
}

@keyframes promo-blades { to { transform: rotate(360deg); } }

@keyframes promo-rays {
    0%, 100% { opacity: 0.5; }
    50%      { opacity: 0.85; }
}

@keyframes promo-motes {
    0%, 100% { opacity: 0.7; transform: translateY(0); }
    50%      { opacity: 1;   transform: translateY(-6px); }
}

@keyframes promo-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7); }
    70%  { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); }
    100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

@keyframes promo-shine {
    0%, 62%  { left: -60%; }
    88%, 100% { left: 125%; }
}

/* Motion is decoration here. Someone who has asked for less of it still gets
   the whole card, just without anything that moves. */
@media (prefers-reduced-motion: reduce) {
    .promo__backdrop,
    .promo__dialog,
    .promo__plane-svg,
    .promo__blades,
    .promo__rays,
    .promo__motes,
    .promo__pulse,
    .promo__shine { animation: none; }

    .promo__shine { opacity: 0; }
    .promo__cta, .promo__cta-arrow, .promo__close { transition: none; }
}

/* ---------------------------------------------------------------------
   The console's preview

   The same card, taken out of its fixed overlay so it sits in the page.
   Everything inside is inert: it is a picture of the promotion, not the
   promotion.
   --------------------------------------------------------------------- */

.promo-preview {
    container-type: inline-size;
    border-radius: 1.25rem;
    overflow: hidden;
}

.promo-preview .promo__dialog {
    position: relative;
    max-width: none;
    max-height: none;
    overflow: hidden;
    animation: none;
    /* A real aspect, so the preview is not a short strip. */
    min-height: 22rem;
}

.promo-preview .promo__body { pointer-events: none; }
.promo-preview .promo__cta { cursor: default; }
.promo-preview .promo__cta:hover { transform: none; }

/* The preview lives in a narrower column than the real overlay, so it lays out
   on its own width rather than the window's. */
.promo-preview .promo__hero {
    right: -12%;
    top: 0;
    width: 78%;
    transform: none;
}
.promo-preview .promo__body { padding: 1.5rem 1.25rem; padding-top: 8.5rem; max-width: none; }
.promo-preview .promo__scrim {
    background: linear-gradient(180deg,
        rgba(26, 12, 42, 0.35) 0%,
        rgba(26, 12, 42, 0.72) 30%,
        rgba(26, 12, 42, 0.95) 48%,
        rgba(26, 12, 42, 0.97) 100%);
}

@container (min-width: 40rem) {
    .promo-preview .promo__hero {
        right: -4%;
        top: 50%;
        width: 58%;
        transform: translateY(-50%);
    }
    .promo-preview .promo__body { padding: 2.25rem 2rem; max-width: 32rem; }
    .promo-preview .promo__scrim {
        background: linear-gradient(100deg,
            rgba(26, 12, 42, 0.94) 0%,
            rgba(26, 12, 42, 0.86) 34%,
            rgba(36, 14, 52, 0.42) 58%,
            rgba(36, 14, 52, 0) 78%);
    }
}

/* ---------------------------------------------------------------------
   Live updates

   A score or a price that changes under the reader needs to say so, or the
   change is simply missed. Brief and small: this is a nudge, not a fanfare,
   and it runs on numbers that can move every few seconds.
   --------------------------------------------------------------------- */

[data-live-home].is-changed,
[data-live-away].is-changed {
    animation: live-goal 1.6s ease-out;
    border-radius: 0.25rem;
}

[data-odds-value].is-up   { animation: live-up 1.6s ease-out; }
[data-odds-value].is-down { animation: live-down 1.6s ease-out; }

@keyframes live-goal {
    0%   { background: var(--emerald-500); color: var(--zinc-950); transform: scale(1.25); }
    40%  { background: var(--emerald-500); color: var(--zinc-950); transform: scale(1); }
    100% { background: transparent; }
}

@keyframes live-up {
    0%, 55% { color: var(--emerald-400); }
    100%    { color: inherit; }
}

@keyframes live-down {
    0%, 55% { color: var(--red-400); }
    100%    { color: inherit; }
}

/* A price that moved is also worth marking for somebody who cannot see the
   colour change, which the arrow does without needing one. */
[data-odds-value].is-up::after   { content: ' \2191'; font-size: 0.75em; }
[data-odds-value].is-down::after { content: ' \2193'; font-size: 0.75em; }

@media (prefers-reduced-motion: reduce) {
    [data-live-home].is-changed,
    [data-live-away].is-changed,
    [data-odds-value].is-up,
    [data-odds-value].is-down { animation: none; }
}

/* The propeller disc on the Aviator aircraft. Spun rather than redrawn: one
   transform on one ellipse, which costs nothing next to the multiplier
   animation running beside it. */
.aviator-prop {
    transform-box: fill-box;
    transform-origin: center;
    animation: aviator-prop 0.18s linear infinite;
}

@keyframes aviator-prop {
    from { transform: scaleX(1); }
    50%  { transform: scaleX(0.35); }
    to   { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
    .aviator-prop { animation: none; }
}

/* ---------------------------------------------------------------------
   Admin dashboard — charts and filters

   Categorical palette, validated for this app's dark surface with the
   dataviz skill's six-checks script. Two runs, because the two charts never
   show all four colors together:

     validate_palette.js "#059669,#dc2626,#2563eb" --mode dark
       --surface "#0d0d12" --pairs all      -> the money chart's 3 series
     (chart-4 stands alone on the signup chart — one series needs no
     pairwise check at all.)

   A first pass validated all five slots together and passed on adjacent
   pairs only — the default check. Running it again with --pairs all (every
   slot against every other, not just neighbours) caught that chart-3 and a
   since-dropped fifth "sportsbook" slot were nearly identical under
   deuteranopia (ΔE 1.3, chart-1's own adjacent-pair pass would never have
   surfaced it, since the two are never neighbours in that check). Both
   charts plot a strict subset of the five, but a chart's own series are all
   simultaneously on screen together, which is exactly the condition
   --pairs all checks and the default does not — so the subset actually used
   together is what gets validated, not the full slot list.

   Money chart, all-pairs PASS: lightness band 0.48–0.67, chroma floor
   cleared, worst pair ΔE 8.6 deutan / 27.2 normal, contrast ≥3:1.

   The order is fixed and a series keeps its slot regardless of which filter
   is applied — changing the period never repaints a survivor into another
   series' color.
   --------------------------------------------------------------------- */

:root {
    --chart-1: #059669; /* mpesa collected — money that arrived */
    --chart-2: #dc2626; /* mpesa failed — money that did not */
    --chart-3: #2563eb; /* aviator revenue */
    --chart-4: #d97706; /* signups — its own chart, never paired with the above */
    --chart-grid: rgba(255, 255, 255, 0.08);
}

/* ---- filter row ---------------------------------------------------- */

.dash-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem;
    margin-bottom: 1.25rem;
}

.dash-filter__tab {
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--hairline);
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--zinc-300);
    white-space: nowrap;
}
.dash-filter__tab:hover { background: rgba(255, 255, 255, 0.08); color: var(--white); }
.dash-filter__tab.is-active {
    background: var(--emerald-500);
    border-color: var(--emerald-500);
    color: var(--zinc-950);
}

/* A native <details> — no JS needed to open it, and it opens itself when the
   page loads with period=custom already selected. */
.dash-filter__custom { position: relative; }
.dash-filter__custom summary {
    list-style: none;
    cursor: pointer;
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--hairline);
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--zinc-300);
}
.dash-filter__custom summary::-webkit-details-marker { display: none; }
.dash-filter__custom[open] summary,
.dash-filter__custom summary:hover { background: rgba(255, 255, 255, 0.08); color: var(--white); }
.dash-filter__custom.is-active summary { background: var(--emerald-500); border-color: var(--emerald-500); color: var(--zinc-950); }

.dash-filter__panel {
    position: absolute;
    z-index: 5;
    top: calc(100% + 0.5rem);
    left: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.625rem;
    padding: 0.875rem;
    border-radius: var(--radius);
    border: 1px solid var(--hairline);
    background: var(--zinc-900);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.6);
}

.dash-filter__label { display: block; font-size: 0.6875rem; color: var(--zinc-500); margin-bottom: 0.25rem; }

.dash-filter__range {
    margin-left: 0.25rem;
    font-size: 0.75rem;
    color: var(--zinc-500);
}

/* ---- stat tile trims for money that failed ------------------------- */

.stat--failed .stat__value { color: var(--red-400); }
.stat__hint {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.6875rem;
    color: var(--zinc-500);
    margin-top: 0.125rem;
}

/* A steady dot for "counted this instant", distinct from the pulsing live
   dot used elsewhere for in-play state — this number is current, not moving. */
.stat__live-dot {
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 999px;
    background: var(--emerald-400);
    box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.25);
}

/* ---- line chart ------------------------------------------------------ */

.linechart { position: relative; }
.linechart__svg { display: block; width: 100%; height: auto; overflow: visible; }

.linechart__grid { stroke: var(--chart-grid); stroke-width: 1; }
/* A halo, not just a color: a gridline label naming the axis MINIMUM sits at
   the same height as the series that touches that minimum — that is what a
   minimum is — so the label and the line are guaranteed to cross. Painting a
   dark stroke behind the fill keeps the number legible wherever it lands,
   rather than chasing a one-off vertical offset for this one collision. */
.linechart__axis-label {
    font-size: 9px;
    fill: var(--zinc-500);
    font-family: var(--font);
    paint-order: stroke;
    stroke: #0d0d12;
    stroke-width: 3px;
    stroke-linejoin: round;
}

.linechart__area { opacity: 0.1; }
.linechart__line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.linechart__dot { stroke: var(--zinc-950); stroke-width: 2; }

.linechart__crosshair {
    stroke: rgba(255, 255, 255, 0.25);
    stroke-width: 1;
    pointer-events: none;
    opacity: 0;
}

.linechart__hit { fill: transparent; cursor: crosshair; }

/* ---- shared legend --------------------------------------------------- */

.chart-legend { display: flex; flex-wrap: wrap; gap: 0.875rem; margin-top: 0.75rem; }
.chart-legend__item { display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.75rem; color: var(--zinc-400); }
.chart-legend__swatch { width: 0.875rem; height: 2px; border-radius: 1px; flex-shrink: 0; }
.chart-legend__swatch.is-bar { height: 0.625rem; border-radius: 2px; }

/* ---- tooltip ----------------------------------------------------------- */

.chart-tooltip {
    position: absolute;
    z-index: 6;
    top: 0;
    left: 0;
    min-width: 9.5rem;
    padding: 0.625rem 0.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--hairline);
    background: rgba(9, 9, 11, 0.96);
    box-shadow: 0 16px 32px -10px rgba(0, 0, 0, 0.7);
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, calc(-100% - 0.75rem));
    transition: opacity 0.1s ease;
}
.chart-tooltip.is-visible { opacity: 1; }
.chart-tooltip__title { font-size: 0.6875rem; font-weight: 700; color: var(--zinc-400); margin-bottom: 0.375rem; }
.chart-tooltip__row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; font-size: 0.75rem; }
.chart-tooltip__row + .chart-tooltip__row { margin-top: 0.25rem; }
.chart-tooltip__key { display: inline-flex; align-items: center; gap: 0.375rem; color: var(--zinc-400); }
.chart-tooltip__stroke { width: 0.75rem; height: 2px; border-radius: 1px; flex-shrink: 0; }
.chart-tooltip__value { font-weight: 800; color: var(--white); font-variant-numeric: tabular-nums; }

/* ---- bar chart ---------------------------------------------------------- */

.barchart__bar {
    fill: var(--chart-4);
    cursor: pointer;
}
.barchart__bar:hover, .barchart__bar:focus-visible { fill: color-mix(in srgb, var(--chart-4) 82%, white); }
.barchart__bar:focus-visible { outline: 2px solid var(--white); outline-offset: 1px; }

/* ---- the table-view toggle every chart carries ------------------------- */

.chart-table-toggle summary {
    list-style: none;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--zinc-400);
    margin-top: 0.75rem;
}
.chart-table-toggle summary::-webkit-details-marker { display: none; }
.chart-table-toggle summary:hover { color: var(--white); }
.chart-table-toggle[open] summary { color: var(--white); }
.chart-table-toggle .table-scroll { margin-top: 0.625rem; }

@media (max-width: 640px) {
    .dash-filter__panel { left: auto; right: 0; }
}

/* ---------------------------------------------------------------------
   M-Pesa deposits console

   A payment dashboard rather than a database dump: tight rows, aligned
   numerals, one accent reserved for money that actually arrived.
   --------------------------------------------------------------------- */

.deposit-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.deposit-filters__search { flex: 1 1 22rem; min-width: 0; }
.deposit-filters .select { width: auto; }

.deposits-table { font-size: 0.8125rem; }
.deposits-table th { white-space: nowrap; }

/* Compact, even rows — the old table's tall wrapping cells were most of why
   it read as a raw dump. */
.deposits-table td {
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
    vertical-align: middle;
}

.deposits-table tbody tr { transition: background 0.12s ease; }
.deposits-table .nowrap { white-space: nowrap; }

/* ---- reference + copy ------------------------------------------------ */

.deposit-ref { display: inline-flex; align-items: center; gap: 0.375rem; }

.deposit-ref__copy {
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-sm, 0.25rem);
    border: 1px solid var(--hairline);
    background: rgba(255, 255, 255, 0.04);
    color: var(--zinc-400);
    font-size: 0.6875rem;
    font-weight: 700;
    cursor: pointer;
    line-height: 1.4;
}

.deposit-ref__copy:hover { color: var(--white); border-color: rgba(255, 255, 255, 0.25); }
.deposit-ref__copy.is-copied { color: var(--zinc-950); background: var(--emerald-400); border-color: var(--emerald-400); }

/* ---- pager ----------------------------------------------------------- */

.deposit-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1rem;
}

.deposit-pager .pagination { margin-top: 0; }

/* A pending count is worth noticing without shouting. */
.tone-warn-text { color: var(--amber-400); }

/* ---- details drawer -------------------------------------------------- */

.drawer { position: fixed; inset: 0; z-index: 60; }
.drawer__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); }

.drawer__panel {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: min(26rem, 100%);
    overflow-y: auto;
    padding: 1.25rem;
    background: var(--zinc-900);
    border-left: 1px solid var(--hairline);
    box-shadow: -24px 0 48px -24px rgba(0, 0, 0, 0.8);
}

.drawer__list { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; }
.drawer__list dt { font-size: 0.6875rem; color: var(--zinc-500); margin-top: 0.875rem; }
.drawer__list dd {
    margin: 0.125rem 0 0;
    font-size: 0.875rem;
    color: var(--white);
    word-break: break-word;
}

@media (max-width: 720px) {
    .deposit-filters__search { flex-basis: 100%; }
    .deposit-filters .select { flex: 1 1 8rem; }
    .drawer__panel { width: 100%; border-left: 0; }
}

/* ---- M-Pesa statements ------------------------------------------------ */

.grid-5 { grid-template-columns: 1fr; }

@media (min-width: 640px)  { .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.stmt-amount { width: 6.5rem; flex: 0 0 auto; }

/* The statement carries more columns than the deposits table, so it leans on
   the horizontal scroll its container already provides rather than shrinking
   every cell until none of them are readable. */
.stmt-table { min-width: 64rem; }
.stmt-table td, .stmt-table th { padding-left: 0.625rem; padding-right: 0.625rem; }

/* ---- download menu ---------------------------------------------------- */

.stmt-download { position: relative; }
.stmt-download summary { list-style: none; cursor: pointer; }
.stmt-download summary::-webkit-details-marker { display: none; }

.stmt-download__menu {
    position: absolute;
    z-index: 20;
    top: calc(100% + 0.375rem);
    right: 0;
    min-width: 14rem;
    padding: 0.625rem;
    border-radius: var(--radius);
    border: 1px solid var(--hairline);
    background: var(--zinc-900);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.6);
}

.stmt-download__item {
    display: block;
    padding: 0.5rem 0.625rem;
    border-radius: var(--radius);
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--zinc-300);
}

.stmt-download__item:hover { background: rgba(255, 255, 255, 0.06); color: var(--white); }

/* ---------------------------------------------------------------------
   System update progress

   A wheel rather than a bar: an incremental update writes only the files
   that differ, so most of the time is the check, which has no honest
   percentage. The number and the running count sit beside it.
   --------------------------------------------------------------------- */

/* `.btn`, `.grid` and friends have bitten this repeatedly: an author rule that
   sets `display` beats the UA stylesheet's `[hidden] { display: none }` at
   equal specificity, so a panel toggled by the attribute stays on screen. This
   one showed "Starting" on a page where nothing had started. */
.update-progress[hidden] { display: none; }

.update-progress {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--hairline);
    background: rgba(0, 0, 0, 0.35);
}

.update-progress__wheel { display: flex; flex: none; color: var(--emerald-400); }
.update-progress__wheel svg { width: 1.5rem; height: 1.5rem; animation: spin 0.8s linear infinite; }

/* The wheel stops and changes colour when there is nothing left to wait for. */
.update-progress[data-state='done'] .update-progress__wheel svg { animation: none; }
.update-progress[data-state='done'] { border-color: rgba(16, 185, 129, 0.45); background: rgba(16, 185, 129, 0.08); }
.update-progress[data-state='failed'] .update-progress__wheel { color: var(--red-400); }
.update-progress[data-state='failed'] .update-progress__wheel svg { animation: none; }

.update-progress__body { min-width: 0; flex: 1; }
.update-progress__stage { font-size: 0.875rem; font-weight: 700; color: var(--white); }
.update-progress__count { font-size: 0.75rem; font-weight: 400; color: var(--zinc-500); margin-left: 0.375rem; }

/* One line only: a long path must not push the panel's height around while
   it changes several times a second. */
.update-progress__detail {
    font-size: 0.6875rem;
    color: var(--zinc-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.update-progress__percent {
    flex: none;
    font-size: 1rem;
    font-weight: 800;
    color: var(--emerald-400);
    min-width: 3rem;
    text-align: right;
}

@media (prefers-reduced-motion: reduce) {
    .update-progress__wheel svg { animation-duration: 2.4s; }
}
