@charset "UTF-8";
/* ==========================================================================
   LUDO BEST CLUB — application theme
   One stylesheet for every page. Mobile-first, built for an Android WebView.

   Colour system: the four Ludo token colours carry meaning throughout the
   app — red is loss, green is win, gold is money, blue is pending. The strip
   under the app bar shows all four, which is where the mapping comes from.

   Type: a system stack. Android resolves Bengali through Noto Sans Bengali
   and Latin through Roboto, so mixed-script copy sets correctly with no font
   download on a mobile connection. Character comes from weight, tracking and
   scale rather than from a display face.
   ========================================================================== */

/* ----------------------------------------------------------------- tokens */

:root {
    /* Ground */
    --bg:          #0B0A1A;
    --bg-soft:     #100E24;
    --surface:     #15132E;
    --surface-2:   #1E1B42;
    --surface-3:   #272252;
    --line:        #2C2856;
    --line-soft:   #221E45;

    /* Ink.
       --text-mute carries the small stuff: field labels, row metadata, tab
       captions, disabled states. It was #6E6899, which measured 3.5:1 on the
       page ground and 2.9:1 on a raised card — under the 4.5:1 small text
       needs, and the reason muted labels were hard to read. Lifted until it
       clears AA on every surface below (5.6 / 5.1 / 4.5). */
    --text:        #F2F0FF;
    --text-dim:    #A5A0CC;
    --text-mute:   #9089C0;

    /* Ludo tokens — the semantic palette */
    --red:         #E5484D;
    --red-dim:     #3A1620;
    /* --red is tuned to carry white text on a solid button. As text on a dark
       tint it only reaches 4.1:1, so small red labels use this lighter one. */
    --red-text:    #EE5F63;
    --green:       #2FB574;
    --green-dim:   #0F2E26;
    --gold:        #FFC53D;
    --gold-dim:    #3A2E10;
    --blue:        #3E8FF7;
    --blue-dim:    #14224A;

    /* Roles */
    --accent:      var(--gold);
    --accent-ink:  #241B00;
    --win:         var(--green);
    --loss:        var(--red);
    --pending:     var(--blue);

    /* Type */
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
            "Noto Sans Bengali", "Hind Siliguri", "Segoe UI Emoji", sans-serif;
    --font-num: ui-monospace, "SF Mono", "Roboto Mono", Menlo, monospace;

    --fs-xs:   0.6875rem;
    --fs-sm:   0.8125rem;
    --fs-md:   0.9375rem;
    --fs-lg:   1.125rem;
    --fs-xl:   1.5rem;
    --fs-2xl:  2rem;

    /* Space — 4px base */
    --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
    --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px;

    /* Radius */
    --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 22px; --r-full: 999px;

    /* Depth */
    --shadow-1: 0 1px 2px rgba(0,0,0,.4);
    --shadow-2: 0 4px 16px rgba(0,0,0,.45);
    --shadow-3: 0 12px 32px rgba(0,0,0,.55);

    /* Chrome */
    --appbar-h: 56px;
    --rail-h:   3px;
    --nav-h:    60px;
    --safe-top:    env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);

    --ease: cubic-bezier(.4, 0, .2, 1);
    --dur:  .18s;
}

/* ------------------------------------------------------------------ reset */

*, *::before, *::after { box-sizing: border-box; }

* {
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    background: var(--bg);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    min-height: 100dvh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: var(--fs-md);
    line-height: 1.5;
    /* The app is a game client, not a document: text selection off by
       default, switched back on for anything a player needs to copy. */
    -webkit-user-select: none;
    user-select: none;
    overscroll-behavior-y: none;
}

.selectable, input, textarea, [contenteditable] {
    -webkit-user-select: text;
    user-select: text;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration: none; touch-action: manipulation; }

button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; touch-action: manipulation; }

/* Visible focus for keyboard users, suppressed for touch. */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
:focus:not(:focus-visible) { outline: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ------------------------------------------------------------------ shell */

.app {
    min-height: 100dvh;
    padding-top: calc(var(--appbar-h) + var(--rail-h) + var(--safe-top));
    display: flex;
    flex-direction: column;
}

.app--has-nav { padding-bottom: calc(var(--nav-h) + var(--safe-bottom)); }

.app-main {
    flex: 1;
    padding: var(--s4);
    display: flex;
    flex-direction: column;
    gap: var(--s4);
}

.app-main--flush { padding: 0; gap: 0; }

/* ---------------------------------------------------------------- app bar */

.appbar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    height: calc(var(--appbar-h) + var(--safe-top));
    padding: var(--safe-top) var(--s3) 0;
    display: flex;
    align-items: center;
    gap: var(--s2);
    background: rgba(17, 15, 38, .92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.appbar__back {
    display: grid;
    place-items: center;
    width: 36px; height: 36px;
    margin-left: -6px;
    border-radius: var(--r-full);
    color: var(--text-dim);
    flex: none;
}
.appbar__back:active { background: var(--surface-2); color: var(--text); }

.appbar__logo {
    width: 30px; height: 30px;
    border-radius: var(--r-sm);
    flex: none;
    object-fit: cover;
}

.appbar__title {
    font-size: var(--fs-md);
    font-weight: 700;
    letter-spacing: .01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1;
}

.appbar__actions { display: flex; align-items: center; gap: var(--s1); flex: none; }

.appbar__icon {
    display: grid;
    place-items: center;
    width: 36px; height: 36px;
    border-radius: var(--r-full);
    color: var(--text-dim);
}
.appbar__icon:active { background: var(--surface-2); color: var(--text); }

/* Balance chip — the one figure that must always be readable. */
.wallet-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 var(--s3) 0 10px;
    border-radius: var(--r-full);
    background: linear-gradient(135deg, var(--gold) 0%, #F0A81E 100%);
    color: var(--accent-ink);
    font-weight: 800;
    font-size: var(--fs-sm);
    font-variant-numeric: tabular-nums;
    letter-spacing: -.01em;
    box-shadow: 0 2px 10px rgba(255, 197, 61, .28);
    flex: none;
}
.wallet-chip:active { transform: scale(.96); }
.wallet-chip svg { width: 15px; height: 15px; }

/* The signature: the Ludo board's four token colours, on every screen. */
.token-rail {
    position: fixed;
    top: calc(var(--appbar-h) + var(--safe-top));
    left: 0; right: 0;
    z-index: 100;
    height: var(--rail-h);
    background: linear-gradient(90deg,
        var(--red)   0%,  var(--red)   25%,
        var(--green) 25%, var(--green) 50%,
        var(--gold)  50%, var(--gold)  75%,
        var(--blue)  75%, var(--blue)  100%);
}

/* ------------------------------------------------------------- bottom nav */

.bottom-nav {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 100;
    height: calc(var(--nav-h) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    display: flex;
    background: rgba(17, 15, 38, .96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--line-soft);
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-mute);
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: .02em;
    position: relative;
    transition: color var(--dur) var(--ease);
}

.nav-item svg { width: 22px; height: 22px; }
.nav-item:active { color: var(--text-dim); }

.nav-item.is-active { color: var(--gold); }
.nav-item.is-active::before {
    content: "";
    position: absolute;
    top: 0;
    width: 26px; height: 2px;
    border-radius: 0 0 2px 2px;
    background: var(--gold);
}

/* --------------------------------------------------------------- surfaces */

.card {
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-lg);
    padding: var(--s4);
}

.card--flat  { background: var(--bg-soft); }
.card--tight { padding: var(--s3); }

/* Section heading with a rule that runs to the edge. */
.section-head {
    display: flex;
    align-items: center;
    gap: var(--s3);
    margin-top: var(--s2);
}
.section-head::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}
.section-head__title {
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-dim);
}

/* -------------------------------------------------------------- typography */

.h1 { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.h2 { font-size: var(--fs-lg); font-weight: 700; letter-spacing: -.01em; line-height: 1.3; }
.h3 { font-size: var(--fs-md); font-weight: 700; }

.label {
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-mute);
}

.muted  { color: var(--text-dim); }
.subtle { color: var(--text-mute); font-size: var(--fs-sm); }

/* Money: tabular so columns line up, tight so big figures stay compact. */
.amount {
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    letter-spacing: -.02em;
}
.amount--lg { font-size: var(--fs-2xl); line-height: 1.1; }
.amount--md { font-size: var(--fs-xl); }
.amount--win  { color: var(--green); }
.amount--loss { color: var(--red-text); }
.amount--gold { color: var(--gold); }

/* ---------------------------------------------------------------- buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s2);
    min-height: 46px;
    padding: 0 var(--s5);
    border-radius: var(--r-md);
    font-size: var(--fs-md);
    font-weight: 700;
    letter-spacing: .01em;
    text-align: center;
    transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.btn:active { transform: scale(.97); }
.btn[disabled], .btn.is-loading { opacity: .5; pointer-events: none; }

.btn--block { display: flex; width: 100%; }
.btn--sm { min-height: 36px; padding: 0 var(--s3); font-size: var(--fs-sm); border-radius: var(--r-sm); }

.btn--primary { background: linear-gradient(135deg, var(--gold), #F0A81E); color: var(--accent-ink); }
.btn--win     { background: var(--green); color: #fff; }
.btn--danger  { background: var(--red);   color: #fff; }
.btn--info    { background: var(--blue);  color: #fff; }
.btn--ghost   { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.btn--quiet   { background: transparent; color: var(--text-dim); }

.btn svg { width: 18px; height: 18px; }

/* ----------------------------------------------------------------- pills */

.pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: var(--r-full);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
}
.pill--win     { background: var(--green-dim); color: var(--green); }
.pill--loss    { background: var(--red-dim);   color: var(--red-text); }
.pill--pending { background: var(--blue-dim);  color: var(--blue); }
.pill--gold    { background: var(--gold-dim);  color: var(--gold); }
.pill--muted   { background: var(--surface-2); color: var(--text-dim); }

/* Live indicator, used on running matches. */
.pill--live { background: var(--red-dim); color: var(--red-text); }
.pill--live::before {
    content: "";
    width: 6px; height: 6px;
    border-radius: var(--r-full);
    background: currentColor;
    animation: pulse-dot 1.6s var(--ease) infinite;
}
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* ----------------------------------------------------------------- forms */

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

.field__label {
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.input {
    width: 100%;
    min-height: 48px;
    padding: 0 var(--s4);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    color: var(--text);
    /* Held at 16px: anything smaller makes iOS zoom the viewport on focus. */
    font-size: 16px;
    transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.input::placeholder { color: var(--text-mute); }
.input:focus { outline: none; border-color: var(--gold); background: var(--surface-3); }
.input[aria-invalid="true"] { border-color: var(--red); }

textarea.input { min-height: 96px; padding: var(--s3) var(--s4); resize: vertical; line-height: 1.5; }

.field__error { font-size: var(--fs-sm); color: var(--red); }
.field__hint  { font-size: var(--fs-sm); color: var(--text-mute); }

/* ------------------------------------------------------------------ lists */

.list { display: flex; flex-direction: column; gap: var(--s2); }

.row {
    display: flex;
    align-items: center;
    gap: var(--s3);
    padding: var(--s3) var(--s4);
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-md);
}
.row__body { flex: 1; min-width: 0; }
.row__title {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.row__meta { font-size: var(--fs-sm); color: var(--text-mute); }
.row__end { text-align: right; flex: none; }

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

/* ------------------------------------------------------------ empty state */

.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s3);
    padding: var(--s10) var(--s5);
    text-align: center;
    color: var(--text-mute);
}
.empty svg { width: 44px; height: 44px; opacity: .5; }
.empty__title { font-size: var(--fs-md); font-weight: 700; color: var(--text-dim); }

/* --------------------------------------------------------------- notices */

.notice {
    display: flex;
    gap: var(--s3);
    padding: var(--s3) var(--s4);
    border-radius: var(--r-md);
    font-size: var(--fs-sm);
    line-height: 1.5;
    border: 1px solid transparent;
}
.notice--info { background: var(--blue-dim);  border-color: rgba(62,143,247,.3); color: #C6DCFF; }
.notice--warn { background: var(--gold-dim);  border-color: rgba(255,197,61,.3); color: #FFE3A3; }
.notice--err  { background: var(--red-dim);   border-color: rgba(229,72,77,.3);  color: #FFC9CB; }
.notice--ok   { background: var(--green-dim); border-color: rgba(47,181,116,.3); color: #A8EBCB; }

/* Scrolling notice ticker. */
.ticker {
    display: flex;
    align-items: center;
    gap: var(--s2);
    height: 34px;
    padding-left: var(--s3);
    background: var(--surface);
    border-block: 1px solid var(--line-soft);
    overflow: hidden;
}
.ticker__tag {
    flex: none;
    font-size: var(--fs-xs);
    font-weight: 800;
    letter-spacing: .06em;
    color: var(--gold);
}
.ticker__track { flex: 1; overflow: hidden; }
.ticker__text {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%;
    font-size: var(--fs-sm);
    color: var(--text-dim);
    animation: ticker 22s linear infinite;
}
@keyframes ticker { to { transform: translateX(-100%); } }

/* --------------------------------------------------------------- overlays */

.sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(4, 3, 12, .7);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur) var(--ease);
}
.sheet-backdrop.is-open { opacity: 1; pointer-events: auto; }

.sheet {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 201;
    max-height: 85dvh;
    overflow-y: auto;
    padding: var(--s5) var(--s4) calc(var(--s5) + var(--safe-bottom));
    background: var(--surface);
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    border-top: 1px solid var(--line);
    box-shadow: var(--shadow-3);
    transform: translateY(100%);
    transition: transform .24s var(--ease);
}
.sheet.is-open { transform: translateY(0); }

.sheet__grip {
    width: 36px; height: 4px;
    margin: -8px auto var(--s4);
    border-radius: var(--r-full);
    background: var(--line);
}

/* Toast, anchored above the nav bar. */
.toast-host {
    position: fixed;
    left: 50%;
    bottom: calc(var(--nav-h) + var(--safe-bottom) + var(--s4));
    z-index: 300;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: var(--s2);
    width: max-content;
    max-width: calc(100vw - var(--s8));
    pointer-events: none;
}

.toast {
    padding: 10px var(--s4);
    border-radius: var(--r-full);
    background: var(--surface-3);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-2);
    font-size: var(--fs-sm);
    font-weight: 600;
    text-align: center;
    animation: toast-in .22s var(--ease);
}
.toast--ok   { background: var(--green); border-color: var(--green); color: #06231A; }
.toast--err  { background: var(--red);   border-color: var(--red);   color: #fff; }
.toast--gold { background: var(--gold);  border-color: var(--gold);  color: var(--accent-ink); }
.toast.is-leaving { animation: toast-out .18s var(--ease) forwards; }

@keyframes toast-in  { from { opacity: 0; transform: translateY(8px); } }
@keyframes toast-out { to   { opacity: 0; transform: translateY(8px); } }

/* --------------------------------------------------------------- skeleton */

.skeleton {
    background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
    background-size: 200% 100%;
    border-radius: var(--r-sm);
    animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------------------------------------------------------------- spinner */

.spinner {
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,.25);
    border-top-color: currentColor;
    border-radius: var(--r-full);
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* -------------------------------------------------------------- utilities */

.stack   { display: flex; flex-direction: column; gap: var(--s3); }
.stack-2 { display: flex; flex-direction: column; gap: var(--s2); }
.cluster { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.between { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.grid-2  { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }

.grow    { flex: 1; min-width: 0; }
.center  { text-align: center; }
.right   { text-align: right; }
.hidden  { display: none !important; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mt-auto { margin-top: auto; }
.pb-4    { padding-bottom: var(--s4); }

/* Screen-reader-only text. */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* Wide content keeps its scrolling inside itself. */
.scroll-x {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.scroll-x::-webkit-scrollbar { display: none; }

/* ----------------------------------------------------------- wide screens */

/* The app is phone-shaped. On a tablet or desktop, hold that shape and
   centre it rather than stretching the layout. */
@media (min-width: 560px) {
    body {
        background: #06050F;
        display: flex;
        justify-content: center;
    }
    .app, .appbar, .token-rail, .bottom-nav, .sheet {
        width: 100%;
        max-width: 480px;
        margin-inline: auto;
    }
    .appbar, .token-rail, .bottom-nav, .sheet { left: 50%; right: auto; transform: translateX(-50%); }
    .sheet { transform: translateX(-50%) translateY(100%); }
    .sheet.is-open { transform: translateX(-50%) translateY(0); }
    .app {
        width: 100%;
        background: var(--bg);
        box-shadow: 0 0 60px rgba(0,0,0,.6);
    }
}

/* ==========================================================================
   Home screen
   ========================================================================== */

.home-body {
    display: flex;
    flex-direction: column;
    gap: var(--s3);
    padding: var(--s4);
}

/* ------------------------------------------------------------- banners */

.banner-slider {
    position: relative;
    aspect-ratio: 16 / 7;
    background: var(--surface);
    overflow: hidden;
}

.banner-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .5s var(--ease);
}
.banner-slide.is-active { opacity: 1; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; }

.banner-dots {
    position: absolute;
    left: 0; right: 0; bottom: var(--s2);
    display: flex;
    justify-content: center;
    gap: 6px;
}
.banner-dot {
    width: 6px; height: 6px;
    border-radius: var(--r-full);
    background: rgba(255,255,255,.4);
    transition: width var(--dur) var(--ease), background var(--dur) var(--ease);
}
.banner-dot.is-active { width: 18px; background: var(--gold); }

/* ---------------------------------------------------------- match hero */

/* The one thing the home screen exists to do: open a table. */
.match-hero {
    display: flex;
    align-items: center;
    gap: var(--s4);
    width: 100%;
    padding: var(--s4);
    text-align: left;
    color: var(--text);
    background:
        radial-gradient(120% 140% at 0% 0%, rgba(255,197,61,.14) 0%, transparent 55%),
        var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    transition: transform var(--dur) var(--ease);
}
.match-hero:active { transform: scale(.985); }

.match-hero__art {
    width: 60px; height: 60px;
    border-radius: var(--r-md);
    object-fit: cover;
    flex: none;
}

.match-hero__body { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.match-hero__title { font-size: var(--fs-lg); font-weight: 800; letter-spacing: -.01em; }
.match-hero__meta { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.match-hero__go { color: var(--text-mute); flex: none; }
.match-hero__go svg { width: 20px; height: 20px; }

/* -------------------------------------------------------- quick actions */

.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--s2);
}

.quick {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s2);
    padding: var(--s3) var(--s1);
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-md);
    transition: transform var(--dur) var(--ease);
}
.quick:active { transform: scale(.96); }

.quick__icon {
    display: grid;
    place-items: center;
    width: 38px; height: 38px;
    border-radius: var(--r-full);
}
.quick__icon svg { width: 19px; height: 19px; }
.quick__icon--gold  { background: var(--gold-dim);  color: var(--gold); }
.quick__icon--green { background: var(--green-dim); color: var(--green); }
.quick__icon--blue  { background: var(--blue-dim);  color: var(--blue); }
.quick__icon--red   { background: var(--red-dim);   color: var(--red); }

.quick__label {
    font-size: var(--fs-xs);
    font-weight: 600;
    text-align: center;
    line-height: 1.25;
    color: var(--text-dim);
}

/* ==========================================================================
   Profile
   ========================================================================== */

.profile-head {
    display: flex;
    align-items: center;
    gap: var(--s3);
    padding: var(--s4);
    background:
        radial-gradient(100% 140% at 100% 0%, rgba(62,143,247,.14) 0%, transparent 60%),
        var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
}

.profile-avatar {
    display: grid;
    place-items: center;
    width: 52px; height: 52px;
    flex: none;
    border-radius: var(--r-full);
    background: linear-gradient(135deg, var(--gold), #F0A81E);
    color: var(--accent-ink);
    font-size: var(--fs-xl);
    font-weight: 800;
    text-transform: uppercase;
}

/* ==========================================================================
   Auth screens
   ========================================================================== */

.auth {
    display: flex;
    flex-direction: column;
    gap: var(--s4);
    justify-content: center;
    min-height: 100%;
    padding: var(--s6) var(--s5);
    max-width: 420px;
    width: 100%;
    margin-inline: auto;
}

.auth__brand { text-align: center; margin-bottom: var(--s2); }
.auth__brand img { margin: 0 auto var(--s3); border-radius: var(--r-lg); }
.auth__title {
    font-size: var(--fs-xl);
    font-weight: 800;
    letter-spacing: -.02em;
}

/* Password field with an inline reveal control. */
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 72px; }
.input-toggle {
    position: absolute;
    right: 6px; top: 50%;
    transform: translateY(-50%);
    padding: 8px 10px;
    border-radius: var(--r-sm);
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--gold);
}
.input-toggle:active { background: var(--surface-3); }

.check {
    display: flex;
    align-items: center;
    gap: var(--s2);
    font-size: var(--fs-sm);
    color: var(--text-dim);
}
.check input {
    width: 18px; height: 18px;
    accent-color: var(--gold);
    flex: none;
}

.link { font-size: var(--fs-sm); font-weight: 600; color: var(--text-dim); }
.link--gold { color: var(--gold); }
.link:active { opacity: .7; }

/* ==========================================================================
   Leaderboard
   ========================================================================== */

.podium {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: end;
    gap: var(--s2);
}

.podium__place {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: var(--s3) var(--s2);
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-md);
    text-align: center;
    min-width: 0;
}

/* First place sits higher and carries the gold edge. */
.podium__place--1 {
    padding-block: var(--s5) var(--s3);
    border-color: rgba(255,197,61,.45);
    background:
        radial-gradient(120% 100% at 50% 0%, rgba(255,197,61,.16) 0%, transparent 65%),
        var(--surface);
}

.podium__medal {
    display: grid;
    place-items: center;
    width: 28px; height: 28px;
    border-radius: var(--r-full);
    font-size: var(--fs-sm);
    font-weight: 800;
    background: var(--surface-3);
    color: var(--text-dim);
}
.podium__place--1 .podium__medal { background: var(--gold);   color: var(--accent-ink); }
.podium__place--2 .podium__medal { background: #B9C2D0;       color: #1A1D23; }
.podium__place--3 .podium__medal { background: #C97B4A;       color: #23120A; }

.podium__name   { font-size: var(--fs-sm); font-weight: 600; max-width: 100%; }
.podium__amount { font-size: var(--fs-sm); color: var(--green); }

.rank {
    display: grid;
    place-items: center;
    width: 26px; height: 26px;
    flex: none;
    border-radius: var(--r-sm);
    font-size: var(--fs-sm);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    background: var(--surface-2);
    color: var(--text-mute);
}
.rank--1 { background: var(--gold); color: var(--accent-ink); }
.rank--2 { background: #B9C2D0;     color: #1A1D23; }
.rank--3 { background: #C97B4A;     color: #23120A; }

.row--me { border-color: rgba(255,197,61,.4); background: var(--gold-dim); }
.row--me .row__title { color: var(--gold); }

/* ==========================================================================
   Wallet
   ========================================================================== */

.wallet-total {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: var(--s6) var(--s4);
    text-align: center;
    background:
        radial-gradient(110% 130% at 50% 0%, rgba(255,197,61,.16) 0%, transparent 62%),
        var(--surface);
    border: 1px solid rgba(255,197,61,.28);
    border-radius: var(--r-lg);
}

/* Activity rows stack an amount over a status pill. */
.row__end .pill { margin-top: 4px; }

/* ==========================================================================
   Refer & earn
   ========================================================================== */

.refer-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: var(--s6) var(--s4);
    text-align: center;
    background:
        radial-gradient(110% 130% at 50% 0%, rgba(47,181,116,.18) 0%, transparent 62%),
        var(--surface);
    border: 1px solid rgba(47,181,116,.28);
    border-radius: var(--r-lg);
}
.refer-hero .subtle { max-width: 34ch; }

/* Referral code, sized to be read across a room and tapped to copy. */
.code-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s3);
    width: 100%;
    margin-top: 6px;
    padding: var(--s3) var(--s4);
    background: var(--surface-2);
    border: 1px dashed var(--line);
    border-radius: var(--r-md);
}
.code-chip:active { background: var(--surface-3); }
.code-chip__value {
    font-size: var(--fs-xl);
    font-weight: 800;
    letter-spacing: .16em;
    color: var(--gold);
}
.code-chip__hint { font-size: var(--fs-xs); color: var(--text-mute); }

/* ==========================================================================
   Video tutorials
   ========================================================================== */

.video-card {
    display: flex;
    align-items: center;
    gap: var(--s3);
    width: 100%;
    padding: var(--s2);
    text-align: left;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-md);
}
.video-card:active { background: var(--surface-2); }

.video-card__thumb {
    position: relative;
    flex: none;
    width: 120px;
    border-radius: var(--r-sm);
    overflow: hidden;
    background: var(--surface-2);
}
.video-card__thumb img { width: 100%; height: 68px; object-fit: cover; }

.video-card__play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(4,3,12,.35);
    color: #fff;
}
.video-card__play svg { width: 26px; height: 26px; }

.video-card__time {
    position: absolute;
    right: 4px; bottom: 4px;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(4,3,12,.85);
    font-size: 10px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.video-card__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.video-card__title { font-size: var(--fs-sm); font-weight: 600; line-height: 1.35; }

/* 16:9 player inside the sheet. */
.video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--r-md);
    overflow: hidden;
    background: #000;
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* One-time code: wide tracking so six digits are easy to check. */
.input--code {
    text-align: center;
    font-size: var(--fs-xl);
    font-weight: 800;
    letter-spacing: .5em;
    text-indent: .5em;
    font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Splash
   ========================================================================== */

.splash {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--s3);
    min-height: 100dvh;
    text-align: center;
}
.splash__logo { border-radius: var(--r-xl); }
.splash__title {
    font-size: var(--fs-xl);
    font-weight: 800;
    letter-spacing: .04em;
}
.splash__bar {
    width: 140px; height: 4px;
    border-radius: var(--r-full);
    background: var(--surface-2);
    overflow: hidden;
}
.splash__bar span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--gold), #F0A81E);
    animation: splash-fill .9s var(--ease) forwards;
}
@keyframes splash-fill { to { width: 100%; } }
.splash__foot {
    position: absolute;
    bottom: calc(var(--s6) + var(--safe-bottom));
    font-size: var(--fs-sm);
    color: var(--text-mute);
}

/* ==========================================================================
   Countdown
   ========================================================================== */

.countdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--s2);
    margin: var(--s3) 0;
}

.countdown__box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: var(--s2) 0;
    background: var(--surface-2);
    border-radius: var(--r-sm);
}

.countdown__n {
    font-size: var(--fs-lg);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--gold);
    letter-spacing: -.02em;
}

.countdown__l {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-mute);
}

/* WhatsApp support, sitting next to the balance chip in the app bar. Brand
   green so it is recognisable at a glance rather than reading as one more
   grey icon. */
.appbar__icon--whatsapp {
    color: #25D366;
    background: rgba(37, 211, 102, .12);
}
.appbar__icon--whatsapp:active { background: rgba(37, 211, 102, .24); color: #25D366; }
.appbar__icon--whatsapp svg { width: 20px; height: 20px; }

/* ==========================================================================
   Home — balance strip, richer match hero, tutorial banner
   Colour here is load-bearing rather than decorative: gold is money you can
   stake, green is money you can withdraw, and the four Ludo token colours
   keep doing the same job they do everywhere else in the app.
   ========================================================================== */

.wallet-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s2);
}

.wallet-tile {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: var(--s3) var(--s3) 10px;
    border-radius: var(--r-lg);
    border: 1px solid var(--line);
    background: var(--surface);
    transition: transform var(--dur) var(--ease);
    min-width: 0;
}
.wallet-tile:active { transform: scale(.98); }

.wallet-tile--gold {
    border-color: rgba(255, 197, 61, .32);
    background:
        radial-gradient(120% 130% at 0% 0%, rgba(255, 197, 61, .18) 0%, transparent 62%),
        var(--surface);
}
.wallet-tile--green {
    border-color: rgba(47, 181, 116, .32);
    background:
        radial-gradient(120% 130% at 100% 0%, rgba(47, 181, 116, .18) 0%, transparent 62%),
        var(--surface);
}

.wallet-tile__label {
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--text-mute);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wallet-tile__value {
    font-size: var(--fs-xl);
    font-weight: 800;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
}
.wallet-tile--gold  .wallet-tile__value { color: var(--gold); }
.wallet-tile--green .wallet-tile__value { color: var(--green); }

.wallet-tile__cta {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-top: 2px;
    font-size: var(--fs-xs);
    font-weight: 700;
    color: var(--text-dim);
}
.wallet-tile__cta svg { width: 13px; height: 13px; }

/* ------------------------------------------------------------ match hero */

.match-hero { position: relative; overflow: hidden; }

/* A slow colour wash behind the card, so the primary action on the screen
   is the thing that visibly moves. */
.match-hero__glow {
    position: absolute;
    inset: -40% -10%;
    z-index: 0;
    background:
        radial-gradient(40% 55% at 18% 30%, rgba(229, 72, 77, .28) 0%, transparent 70%),
        radial-gradient(40% 55% at 50% 70%, rgba(47, 181, 116, .26) 0%, transparent 70%),
        radial-gradient(40% 55% at 82% 30%, rgba(62, 143, 247, .26) 0%, transparent 70%);
    animation: hero-drift 14s ease-in-out infinite alternate;
    pointer-events: none;
}
@keyframes hero-drift {
    from { transform: translate3d(-4%, 0, 0) scale(1); }
    to   { transform: translate3d(4%, 0, 0) scale(1.08); }
}

.match-hero__art,
.match-hero__body,
.match-hero__go { position: relative; z-index: 1; }

/* -------------------------------------------------------- tutorial banner */

.tutorial-banner {
    display: flex;
    align-items: center;
    gap: var(--s3);
    padding: var(--s2);
    border-radius: var(--r-lg);
    border: 1px solid rgba(229, 72, 77, .3);
    background:
        linear-gradient(100deg, rgba(229, 72, 77, .16) 0%, transparent 60%),
        var(--surface);
    transition: transform var(--dur) var(--ease);
}
.tutorial-banner:active { transform: scale(.985); }

.tutorial-banner__thumb {
    position: relative;
    flex: none;
    width: 104px;
    border-radius: var(--r-md);
    overflow: hidden;
    background: var(--surface-2);
}
.tutorial-banner__thumb img { width: 100%; height: 60px; object-fit: cover; }

.tutorial-banner__play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(4, 3, 12, .35);
    color: #fff;
}
.tutorial-banner__play svg { width: 24px; height: 24px; }

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

.tutorial-banner__kicker {
    font-size: var(--fs-xs);
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--red-text);
}
.tutorial-banner__title {
    font-size: var(--fs-sm);
    font-weight: 700;
    line-height: 1.3;
}
.tutorial-banner__meta { font-size: var(--fs-xs); color: var(--text-mute); }
.tutorial-banner__go { flex: none; color: var(--text-mute); }
.tutorial-banner__go svg { width: 18px; height: 18px; }
