/* ── StarShop Referral Battle — Yellow Glassmorphism ─────────────────────── */

:root {
    --bg-0: #0b0a07;
    --bg-1: #12100a;
    --bg-2: #1a160d;

    --ink: #fff8e6;
    --ink-dim: #c7bda0;
    --ink-mute: #847a5f;

    --yellow: #ffd83d;
    --yellow-hot: #ffe86a;
    --yellow-dark: #a57f00;
    --yellow-glow: rgba(255, 216, 61, 0.55);

    --glass: rgba(255, 216, 61, 0.06);
    --glass-strong: rgba(255, 216, 61, 0.10);
    --glass-border: rgba(255, 216, 61, 0.22);
    --glass-border-soft: rgba(255, 216, 61, 0.12);

    --danger: #ff6a5c;
    --good: #6bff9b;

    --r-lg: 22px;
    --r-md: 16px;
    --r-sm: 12px;
    --r-xs: 8px;

    --shadow-glow: 0 0 40px rgba(255, 216, 61, 0.12);
    --shadow-card: 0 20px 50px -20px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 216, 61, 0.08);
    --safe-top: 0px;
    --safe-right: 0px;
    --safe-bottom: 0px;
    --safe-left: 0px;
    --tg-viewport-height: 100dvh;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html, body {
    height: 100%;
    background: var(--bg-0);
    color: var(--ink);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
    overscroll-behavior-y: none;
}

body {
    min-height: var(--tg-viewport-height);
    background:
        radial-gradient(1200px 600px at 50% -200px, rgba(255, 216, 61, 0.15), transparent 60%),
        radial-gradient(800px 400px at 100% 100%, rgba(255, 140, 0, 0.08), transparent 70%),
        linear-gradient(180deg, var(--bg-0), var(--bg-1));
    position: relative;
    touch-action: manipulation;
}

/* ── Aurora blobs (floating yellow glow) ──────────────────────────────── */
.aurora {
    position: fixed;
    pointer-events: none;
    filter: blur(80px);
    opacity: 0.55;
    z-index: 0;
    border-radius: 50%;
}
.aurora-a {
    top: -120px; left: -80px;
    width: 380px; height: 380px;
    background: radial-gradient(circle, #ffd83d 0%, transparent 70%);
    animation: float1 16s ease-in-out infinite;
}
.aurora-b {
    top: 40%; right: -120px;
    width: 320px; height: 320px;
    background: radial-gradient(circle, #ff9f2e 0%, transparent 70%);
    animation: float2 20s ease-in-out infinite;
    opacity: 0.35;
}
.aurora-c {
    bottom: -160px; left: 30%;
    width: 420px; height: 420px;
    background: radial-gradient(circle, #ffe86a 0%, transparent 65%);
    animation: float1 24s ease-in-out infinite reverse;
    opacity: 0.25;
}
@keyframes float1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(40px, 60px) scale(1.08); }
}
@keyframes float2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(-60px, -40px) scale(1.12); }
}

.grain {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.035;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ── Layout ───────────────────────────────────────────────────────────── */
.app {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    min-height: var(--tg-viewport-height);
    padding:
        calc(18px + var(--safe-top))
        calc(14px + var(--safe-right))
        calc(140px + var(--safe-bottom))
        calc(14px + var(--safe-left));
}

.glass {
    background: var(--glass);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border: 1px solid var(--glass-border-soft);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-card);
}

.view-switch {
    display: flex;
    gap: 8px;
    padding: 6px;
    margin-bottom: 12px;
    border-radius: 18px;
}
.view-tab {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--ink-dim);
    padding: 11px 14px;
    border-radius: 14px;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.02em;
    flex: 1;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}
.view-tab.is-active {
    color: var(--bg-0);
    background: linear-gradient(135deg, var(--yellow-hot), var(--yellow));
    box-shadow: 0 10px 24px -18px rgba(255, 216, 61, 0.9);
}

.hero--insights {
    padding: 16px 14px 14px;
    margin-bottom: 16px;
}
.hero-top--insights {
    align-items: flex-start;
}
.hero-brand--stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    max-width: 320px;
}
.hero-badge--pulse::before {
    width: 8px;
    height: 8px;
    background: #8dffb0;
    box-shadow: 0 0 10px rgba(141, 255, 176, 0.6);
}
.pulse-hero-copy {
    color: rgba(255, 239, 196, 0.72);
    line-height: 1.45;
    font-size: 13px;
    max-width: 34ch;
}
.pulse-stamp {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    text-align: right;
}
.pulse-kpis {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}
.pulse-kpi {
    padding: 12px;
    border-radius: 16px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 216, 61, 0.03)),
        rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 216, 61, 0.12);
}
.pulse-kpi:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}
.pulse-kpi-label,
.pulse-kpi-meta {
    display: block;
}
.pulse-kpi-label {
    color: var(--ink-mute);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}
.pulse-kpi-value {
    display: block;
    color: var(--yellow-hot);
    font-size: 24px;
    line-height: 1;
    letter-spacing: -0.05em;
    margin-bottom: 5px;
}
.pulse-kpi-meta {
    color: rgba(255, 238, 192, 0.7);
    font-size: 11px;
}
.pulse-shell {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.pulse-section {
    margin-top: 2px;
}
.pulse-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.pulse-panel {
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 216, 61, 0.08);
}
.pulse-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.pulse-bar-row {
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255, 216, 61, 0.08);
}
.pulse-bar-copy {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.pulse-bar-title-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}
.pulse-bar-label {
    color: var(--ink);
    font-weight: 600;
    font-size: 13px;
}
.pulse-bar-value {
    color: rgba(255, 235, 182, 0.78);
    font-size: 11px;
    white-space: nowrap;
}
.pulse-bar-track {
    position: relative;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 216, 61, 0.08);
}
.pulse-bar-fill {
    position: absolute;
    inset: 0 auto 0 0;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(255, 216, 61, 0.38), rgba(255, 232, 106, 0.95));
    box-shadow: 0 0 18px rgba(255, 216, 61, 0.22);
}

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero {
    padding: 14px 10px 8px;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    backdrop-filter: blur(14px) saturate(155%);
    -webkit-backdrop-filter: blur(14px) saturate(155%);
}
.hero::before {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255, 216, 61, 0.08), transparent 40%);
    pointer-events: none;
}

.hero-top {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}
.hero-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.hero-badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 9px; font-weight: 700; letter-spacing: 0.08em;
    color: var(--yellow-hot);
    background: rgba(255, 216, 61, 0.10);
    border: 1px solid var(--glass-border);
    padding: 2px 6px; border-radius: 999px;
    width: fit-content;
    text-transform: uppercase;
}
.hero-badge::before {
    content: ""; width: 6px; height: 6px; border-radius: 50%;
    background: var(--yellow);
    box-shadow: 0 0 10px var(--yellow-glow);
    animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:.5;transform:scale(.9)} 50%{opacity:1;transform:scale(1.2)} }

.hero-title {
    font-size: 16px; font-weight: 800; letter-spacing: -0.03em;
    background: linear-gradient(180deg, #fff8e6, #ffd83d 80%);
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
}

.hero-countdown {
    text-align: right;
    display: flex; flex-direction: column; gap: 2px;
    padding-top: 1px;
}
.cd-label { font-size: 9px; color: var(--ink-mute); text-transform: uppercase; letter-spacing: 0.08em; }
.cd-value { font-size: 14px; font-weight: 700; color: var(--yellow-hot); font-variant-numeric: tabular-nums; }
.hero-countdown.is-finished .cd-value {
    color: var(--good);
    text-shadow: 0 0 18px rgba(107, 255, 155, 0.28);
}
.hero-badge--season {
    color: #10120a;
    background: linear-gradient(135deg, var(--good), #e9ff9b);
    border-color: rgba(202, 255, 170, 0.42);
}
.hero-badge--season::before {
    background: #10120a;
    box-shadow: none;
}

/* ── Me Card ──────────────────────────────────────────────────────────── */
.me-card {
    padding: 10px;
    background:
        radial-gradient(circle at top left, rgba(255, 222, 107, 0.18), transparent 32%),
        linear-gradient(145deg, rgba(76, 55, 2, 0.28), rgba(30, 23, 9, 0.94) 52%, rgba(61, 43, 4, 0.24));
    border: 1px solid rgba(255, 216, 61, 0.22);
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    box-shadow:
        inset 0 1px 0 rgba(255, 246, 204, 0.08),
        0 14px 28px -24px rgba(0, 0, 0, 0.68),
        0 0 12px rgba(255, 216, 61, 0.04);
}
.me-card.is-clickable {
    cursor: pointer;
}
.me-card.is-clickable:active {
    transform: scale(.995);
}
.me-card::before {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    background:
        linear-gradient(128deg, rgba(255, 244, 199, 0.12), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 42%);
    pointer-events: none;
}
.me-card::after {
    content: "";
    position: absolute;
    top: -34%;
    right: -18%;
    width: 50%;
    height: 70%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 223, 115, 0.18), transparent 68%);
    filter: blur(8px);
    pointer-events: none;
}

.me-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}

.me-user {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    flex: 1;
}
.me-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--yellow), var(--yellow-dark));
    color: #1a1405;
    display: grid; place-items: center;
    font-weight: 800; font-size: 14px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 240, 188, 0.18);
    box-shadow: 0 6px 16px rgba(255, 216, 61, 0.24);
}
.me-who {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.me-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.08;
}
.me-tag {
    font-size: 11px;
    color: rgba(255, 232, 165, 0.62);
    font-variant-numeric: tabular-nums;
}

.me-head-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.bonus-glyph {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(255, 214, 104, 0.12);
    background: rgba(255, 214, 104, 0.06);
    display: grid;
    place-items: center;
    position: relative;
    cursor: pointer;
    transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}
.bonus-glyph[hidden] {
    display: none !important;
}
.bonus-glyph:active {
    transform: scale(.97);
}
.bonus-glyph::before {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: inherit;
    background:
        radial-gradient(circle at 30% 25%, rgba(255, 242, 184, 0.98), rgba(255, 212, 86, 0.96) 46%, rgba(236, 168, 34, 0.96));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.34),
        0 8px 18px rgba(255, 191, 31, 0.22);
    border: 1px solid rgba(255, 231, 174, 0.16);
}
.bonus-glyph-gift {
    position: relative;
    z-index: 1;
    font-size: 14px;
    line-height: 1;
    filter: saturate(1.06);
}
.bonus-glyph.is-claimable {
    animation: bonusPulse 1.6s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(255, 216, 61, 0.22);
}
.bonus-glyph.is-claimed::before {
    background:
        radial-gradient(circle at 30% 25%, rgba(255, 240, 174, 0.78), rgba(255, 199, 55, 0.88) 46%, rgba(214, 143, 24, 0.9));
}
.bonus-glyph.is-locked {
    opacity: 0.52;
    filter: saturate(0.7);
}
@keyframes bonusPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 216, 61, 0.18); }
    50% { transform: scale(1.06); box-shadow: 0 0 0 8px rgba(255, 216, 61, 0.06); }
}

.share-btn {
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 236, 182, 0.1);
    color: rgba(255, 240, 206, 0.86);
    font-size: 11px; font-weight: 600;
    padding: 7px 11px; border-radius: 999px;
    cursor: pointer;
    display: inline-flex; align-items: center; gap: 4px;
    transition: all .2s ease;
    flex-shrink: 0;
}
.share-btn:active { transform: scale(.97); background: rgba(255, 255, 255, 0.07); }
.share-btn:disabled {
    opacity: 0.72;
    cursor: default;
}
.share-btn--quiet {
    width: 34px;
    height: 34px;
    padding: 0;
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 240, 206, 0.78);
    justify-content: center;
}
.share-btn.is-busy span {
    animation: sharePulse 1s ease-in-out infinite;
}
.share-btn span { font-size: 14px; }
.share-btn--quiet span { font-size: 13px; }
.share-btn-copy { display: none; }

@keyframes sharePulse {
    0%, 100% { opacity: 0.45; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-1px); }
}

.me-primary {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 7px;
}
.me-balance {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.me-balance-top {
    display: flex;
    align-items: center;
    gap: 7px;
}
.me-balance-label {
    font-size: 9px;
    color: rgba(255, 232, 165, 0.54);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}
.me-balance-value {
    font-size: 30px;
    line-height: 0.9;
    font-weight: 800;
    color: #fff9e6;
    letter-spacing: -0.05em;
    font-variant-numeric: tabular-nums;
}
.me-balance-value small {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 236, 182, 0.72);
    letter-spacing: 0.02em;
    margin-left: 4px;
}
.me-balance-note {
    font-size: 9px;
    color: rgba(255, 236, 182, 0.56);
    line-height: 1.25;
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
}
.me-balance-note[hidden] {
    display: none !important;
}

.drop-reveal-stage[hidden],
.drop-reveal-amount[hidden] {
    display: none !important;
}

.claim-btn {
    width: auto;
    min-width: 118px;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 13px;
    border: 0;
    background:
        linear-gradient(180deg, rgba(255, 244, 204, 0.98), rgba(255, 211, 72, 0.94)),
        linear-gradient(180deg, #ffe498, #f3c231);
    color: #241904;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -0.02em;
    font-family: inherit;
    justify-self: end;
    white-space: nowrap;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, opacity .18s ease;
    box-shadow:
        inset 0 1px 0 rgba(255, 252, 240, 0.5),
        0 10px 22px rgba(255, 191, 31, 0.14);
}
.claim-btn:active {
    transform: translateY(1px) scale(.997);
}
.claim-btn.is-busy {
    color: rgba(32, 22, 3, 0.92);
    background: linear-gradient(135deg, #ffe36f, #ffd13c 58%, #f6a20a);
    animation: claimGlow 1.15s ease-in-out infinite;
}
.claim-btn.is-pending {
    color: #fff8e6;
    background: linear-gradient(135deg, rgba(255, 216, 61, 0.22), rgba(255, 216, 61, 0.08));
    border: 1px solid rgba(255, 216, 61, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 252, 240, 0.12);
}
.claim-btn.is-connect {
    color: #201603;
    background: linear-gradient(135deg, #ffe57e, #ffd13c 58%, #f8b11f);
}
.claim-btn:disabled {
    opacity: 0.52;
    box-shadow: none;
}
.claim-btn.is-busy:disabled,
.claim-btn.is-pending:disabled {
    opacity: 1;
}
.claim-btn.is-pending:disabled {
    box-shadow: inset 0 1px 0 rgba(255, 252, 240, 0.12);
}
@keyframes claimGlow {
    0%, 100% { box-shadow: inset 0 1px 0 rgba(255, 252, 240, 0.45), 0 14px 26px rgba(255, 191, 31, 0.22); }
    50% { box-shadow: inset 0 1px 0 rgba(255, 252, 240, 0.52), 0 18px 30px rgba(255, 191, 31, 0.34); }
}
.wallet-chip {
    width: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 0 12px;
    margin-bottom: 8px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.028);
    border: 1px solid rgba(255, 236, 182, 0.08);
    color: var(--ink);
    text-align: left;
    font-family: inherit;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.wallet-chip[hidden] {
    display: none !important;
}
.wallet-chip:active {
    transform: translateY(1px);
}
.wallet-chip.is-busy {
    opacity: 0.78;
}
.wallet-chip.is-connected {
    background: linear-gradient(135deg, rgba(255, 216, 61, 0.06), rgba(255, 216, 61, 0.025));
    border-color: rgba(255, 216, 61, 0.18);
}
.wallet-chip-label {
    display: block;
    font-size: 10px;
    color: rgba(255, 232, 165, 0.56);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    white-space: nowrap;
}
.wallet-chip-value {
    display: block;
    max-width: 100%;
    color: var(--ink);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
    justify-self: end;
}
.wallet-disconnect {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid rgba(255, 236, 182, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 236, 182, 0.78);
    font-size: 16px;
    line-height: 1;
    display: grid;
    place-items: center;
    font-family: inherit;
}
.wallet-disconnect[hidden] {
    display: none !important;
}
.wallet-chip-arrow {
    color: rgba(255, 236, 182, 0.52);
    font-size: 16px;
    line-height: 1;
}

.me-stats {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    padding-top: 0;
    border-top: 1px solid rgba(255, 216, 61, 0.06);
}
.me-stat {
    min-width: 0;
    padding: 6px 7px 4px;
    background: transparent;
    border: 0;
    border-right: 1px solid rgba(255, 216, 61, 0.08);
    border-radius: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    cursor: pointer;
    transition: all .2s ease;
    text-align: left;
}
.me-stat:last-child {
    border-right: 0;
}
.me-stat:active { transform: scale(.97); }
.me-stat-label {
    font-size: 6px;
    color: rgba(255, 232, 165, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.me-stat-value {
    font-size: 12px;
    font-weight: 700;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.me-stat-value small {
    font-size: 8px;
    color: var(--ink-dim);
    font-weight: 500;
    margin-left: 3px;
}

.drop-reveal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background:
        radial-gradient(circle at top center, rgba(255, 216, 61, 0.12), transparent 36%),
        rgba(7, 6, 4, 0.78);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    opacity: 0;
    transition: opacity .24s ease;
}
.drop-reveal-backdrop[hidden] {
    display: none !important;
}
.drop-reveal-backdrop.is-visible {
    opacity: 1;
}
.drop-reveal {
    position: relative;
    width: min(100%, 312px);
    padding: 16px 16px 16px;
    border-radius: 24px;
    overflow: hidden;
    text-align: center;
    background:
        radial-gradient(circle at top center, rgba(255, 228, 115, 0.12), transparent 34%),
        linear-gradient(180deg, rgba(33, 26, 10, 0.96), rgba(15, 12, 5, 0.99));
    border: 1px solid rgba(255, 216, 61, 0.14);
    box-shadow:
        0 30px 90px rgba(0, 0, 0, 0.56),
        inset 0 1px 0 rgba(255, 251, 235, 0.08);
    transform: translateY(18px) scale(.95);
    opacity: 0;
    transition: transform .46s cubic-bezier(.18, .88, .24, 1), opacity .46s cubic-bezier(.18, .88, .24, 1), box-shadow .28s ease;
}
.drop-reveal.is-visible {
    transform: translateY(0) scale(1);
    opacity: 1;
}
.drop-reveal::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 216, 61, 0.08), transparent 38%),
        linear-gradient(125deg, rgba(255, 255, 255, 0.025), transparent 40%);
    pointer-events: none;
}
.drop-reveal.is-opening .drop-reveal-copy,
.drop-reveal.is-opening .drop-reveal-actions {
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
}
.drop-reveal.is-counting .drop-reveal-copy,
.drop-reveal.is-counting .drop-reveal-actions {
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
}
.drop-reveal.is-opening .drop-reveal-amount {
    opacity: 0.24;
    transform: translateY(10px) scale(.88);
    filter: blur(4px);
}
.drop-reveal.is-primed .drop-reveal-aura {
    margin: 18px auto 6px;
}
.drop-reveal.is-primed .drop-reveal-orb,
.drop-reveal.is-claiming .drop-reveal-orb {
    transform: scale(1.04);
}
.drop-reveal.is-claiming .drop-reveal-orb {
    animation: claimGlow 1.1s ease-in-out infinite;
}
.drop-reveal.is-revealed {
    box-shadow:
        0 34px 92px rgba(0, 0, 0, 0.58),
        0 0 28px rgba(255, 191, 31, 0.06),
        inset 0 1px 0 rgba(255, 251, 235, 0.1);
}
.drop-reveal-kicker {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 8px;
    min-height: 22px;
    border-radius: 999px;
    border: 1px solid rgba(255, 216, 61, 0.18);
    background: rgba(255, 216, 61, 0.08);
    color: rgba(255, 239, 190, 0.88);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.drop-reveal-kicker::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ffe87f, #ffbe25);
    box-shadow: 0 0 8px rgba(255, 216, 61, 0.22);
}
.drop-reveal-aura {
    position: relative;
    z-index: 1;
    width: 116px;
    height: 116px;
    margin: 14px auto 0;
    display: grid;
    place-items: center;
}
.drop-reveal-halo,
.drop-reveal-ring,
.drop-reveal-orb,
.drop-reveal-spark {
    position: absolute;
    border-radius: 999px;
}
.drop-reveal-halo {
    inset: 26px;
    background: radial-gradient(circle, rgba(255, 215, 84, 0.2), rgba(255, 215, 84, 0.04) 56%, transparent 74%);
    filter: blur(5px);
}
.drop-reveal-ring {
    inset: 18px;
    border: 1px solid rgba(255, 228, 154, 0.12);
}
.drop-reveal-ring--a {
    animation: none;
}
.drop-reveal-ring--b {
    display: none;
}
.drop-reveal-orb {
    inset: 28px;
    display: grid;
    place-items: center;
    background: radial-gradient(circle, rgba(37, 181, 255, 0.16), rgba(37, 181, 255, 0.05) 62%, transparent 78%);
    box-shadow: 0 0 30px rgba(36, 176, 255, 0.16);
    animation: none;
}
.ton-mark--reveal {
    width: 52px;
    height: 52px;
    object-fit: contain;
    filter: drop-shadow(0 10px 18px rgba(8, 83, 144, 0.22));
}
.drop-reveal-spark {
    display: none;
}
.drop-reveal-stage {
    position: relative;
    z-index: 1;
    margin: 8px auto 0;
    max-width: 184px;
    color: rgba(255, 239, 190, 0.68);
    font-size: 11px;
    line-height: 1.38;
    font-weight: 600;
}
.drop-reveal-amount {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 10px;
    font-size: clamp(32px, 10vw, 44px);
    line-height: 0.92;
    font-weight: 800;
    letter-spacing: -0.06em;
    color: #fffaf0;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 26px rgba(255, 216, 61, 0.12);
    transition: opacity .28s ease, transform .28s ease, filter .28s ease;
}
.drop-reveal-amount small {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: rgba(255, 239, 190, 0.78);
    margin-left: 6px;
}
.drop-reveal-copy {
    position: relative;
    z-index: 1;
    margin: 8px auto 0;
    max-width: 160px;
    color: rgba(255, 239, 190, 0.72);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.45;
    transition: opacity .28s ease, transform .28s ease;
}
.drop-reveal-actions {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 16px;
    transition: opacity .28s ease, transform .28s ease;
}
.drop-reveal-close {
    width: 100%;
    min-height: 40px;
    justify-content: center;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.drop-reveal-close {
    border: 1px solid rgba(255, 248, 230, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #fff8e6;
    font-family: inherit;
    transition: opacity .2s ease, transform .2s ease;
}
.drop-reveal.is-primed .drop-reveal-close {
    border-color: rgba(255, 216, 61, 0.16);
    background: linear-gradient(135deg, rgba(255, 243, 205, 0.92), rgba(255, 216, 61, 0.84));
    color: #231803;
    box-shadow: inset 0 1px 0 rgba(255, 252, 240, 0.34);
}
.drop-reveal-close:disabled {
    opacity: 0.68;
}

@keyframes revealSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes revealSpinReverse {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

@keyframes revealOrbPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 30px rgba(255, 191, 31, 0.32), inset 0 1px 0 rgba(255, 254, 247, 0.42), inset 0 -10px 18px rgba(109, 68, 0, 0.22); }
    50% { transform: scale(1.04); box-shadow: 0 0 42px rgba(255, 191, 31, 0.44), inset 0 1px 0 rgba(255, 254, 247, 0.46), inset 0 -10px 18px rgba(109, 68, 0, 0.18); }
}

@keyframes revealSpark1 {
    0% { opacity: 0; transform: translate(0, 0) scale(.6); }
    18% { opacity: 1; }
    100% { opacity: 0; transform: translate(-12px, -20px) scale(1.4); }
}

@keyframes revealSpark2 {
    0% { opacity: 0; transform: translate(0, 0) scale(.6); }
    20% { opacity: 1; }
    100% { opacity: 0; transform: translate(14px, -18px) scale(1.35); }
}

@keyframes revealSpark3 {
    0% { opacity: 0; transform: translate(0, 0) scale(.6); }
    14% { opacity: 1; }
    100% { opacity: 0; transform: translate(-10px, 18px) scale(1.28); }
}

@keyframes revealSpark4 {
    0% { opacity: 0; transform: translate(0, 0) scale(.6); }
    16% { opacity: 1; }
    100% { opacity: 0; transform: translate(12px, 16px) scale(1.32); }
}

/* ── Tabs ─────────────────────────────────────────────────────────────── */
.tabs {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 14px;
    padding: 5px;
    background: var(--glass);
    border: 1px solid var(--glass-border-soft);
    border-radius: 999px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.tab {
    background: transparent; border: 0; color: var(--ink-dim);
    font-size: 13px; font-weight: 600;
    padding: 10px 8px; border-radius: 999px;
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    transition: all .25s ease;
    font-family: inherit;
}
.tab.is-active {
    background: linear-gradient(135deg, var(--yellow), #ffbf1f);
    color: #1a1405;
    box-shadow: 0 4px 20px rgba(255, 216, 61, 0.35);
}
.tab-emoji { font-size: 14px; }

/* ── Nomination Title ─────────────────────────────────────────────────── */
.nom-section { margin-bottom: 16px; padding: 0 4px; }
.nom-head { display: flex; flex-direction: column; gap: 3px; }
.nom-title { font-size: 17px; font-weight: 700; color: var(--ink); }
.nom-sub { font-size: 12px; color: var(--ink-mute); }

/* ── Podium ───────────────────────────────────────────────────────────── */
.podium {
    display: grid; grid-template-columns: 1fr 1.15fr 1fr;
    gap: 8px;
    align-items: end;
    margin-bottom: 18px;
    min-height: 228px;
}
.podium-slot {
    display: flex; flex-direction: column; align-items: center;
    padding: 18px 10px 18px;
    border-radius: var(--r-md);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.04), transparent 26%),
        var(--glass);
    border: 1px solid var(--glass-border-soft);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    position: relative;
    overflow: hidden;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.05),
        0 18px 34px rgba(0,0,0,0.18);
}
.podium-slot::before {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent, var(--grad) 100%);
    opacity: 0.2;
    pointer-events: none;
}
.podium-slot::after {
    content: "";
    position: absolute;
    left: 18%;
    right: 18%;
    bottom: -12px;
    height: 44px;
    border-radius: 999px;
    background: radial-gradient(circle, color-mix(in srgb, var(--grad) 32%, transparent), transparent 70%);
    filter: blur(16px);
    opacity: .85;
    pointer-events: none;
}
.podium-slot.gold { --grad: #ffd83d; min-height: 228px; border-color: rgba(255, 216, 61, 0.45); }
.podium-slot.silver { --grad: #d9d9d9; min-height: 204px; }
.podium-slot.bronze { --grad: #c48a3a; min-height: 192px; }

.podium-medal {
    font-size: 28px; margin-bottom: 8px;
    filter: drop-shadow(0 4px 14px rgba(255, 216, 61, 0.45));
}
.podium-slot.gold .podium-medal { font-size: 34px; }

.podium-avatar {
    width: 52px; height: 52px; border-radius: 50%;
    background: linear-gradient(135deg, #2a220e, #1a1405);
    color: var(--yellow);
    display: grid; place-items: center;
    font-weight: 700; font-size: 20px;
    border: 2px solid var(--yellow);
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.26);
}
.podium-slot.gold .podium-avatar {
    width: 62px; height: 62px; font-size: 24px;
    box-shadow: 0 0 25px var(--yellow-glow), 0 14px 26px rgba(0,0,0,0.3);
}
.podium-slot.silver .podium-avatar { border-color: #d9d9d9; color: #d9d9d9; }
.podium-slot.bronze .podium-avatar { border-color: #c48a3a; color: #c48a3a; }
.podium-slot.silver .podium-avatar { box-shadow: 0 0 18px rgba(217,217,217,0.18), 0 12px 20px rgba(0,0,0,0.22); }
.podium-slot.bronze .podium-avatar { box-shadow: 0 0 18px rgba(196,138,58,0.16), 0 12px 20px rgba(0,0,0,0.22); }

.podium-name {
    font-size: 14px; font-weight: 700; color: var(--ink);
    max-width: 100%;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    text-align: center;
    margin-bottom: 6px;
    padding: 0 4px;
}
.podium-slot.gold .podium-name { font-size: 16px; }
.podium-value { font-size: 18px; font-weight: 800; color: var(--yellow-hot); font-variant-numeric: tabular-nums; }
.podium-slot.gold .podium-value { font-size: 20px; }
.podium-slot.silver .podium-value { color: #e6e6e6; }
.podium-slot.bronze .podium-value { color: #e6b577; }
.podium-main-value {
    color: inherit;
    font-weight: 800;
}
.podium-value-breakdown {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
    margin-left: 3px;
}
.podium-value-sep {
    color: rgba(255, 240, 190, 0.32);
}
.podium-value-total {
    color: rgba(255, 240, 190, 0.58);
    font-weight: 700;
}
.podium-slot.silver .podium-value-total {
    color: rgba(245, 245, 245, 0.58);
}
.podium-slot.bronze .podium-value-total {
    color: rgba(243, 205, 156, 0.58);
}
.ref-breakdown {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 4px;
    font-size: 12px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.ref-breakdown--compact {
    justify-content: center;
    margin-top: 6px;
    margin-bottom: 0;
}
.ref-breakdown-counted {
    color: rgba(255, 244, 198, 0.96);
    font-weight: 800;
}
.ref-breakdown-total {
    color: rgba(232, 196, 132, 0.56);
    font-weight: 600;
}
.ref-breakdown-sep {
    color: rgba(255, 236, 182, 0.28);
}

.podium-empty {
    font-size: 11px; color: var(--ink-mute);
    text-align: center; padding: 0 4px;
}

/* ── Leaderboard list ─────────────────────────────────────────────────── */
.board-list { display: flex; flex-direction: column; gap: 6px; }

.board-row {
    display: grid; grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center; gap: 10px;
    padding: 11px 14px;
    background:
        linear-gradient(90deg, rgba(255,255,255,0.03), transparent 24%),
        var(--glass);
    border: 1px solid var(--glass-border-soft);
    border-radius: var(--r-md);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
    transition: all .2s ease;
}
.board-row:active { transform: scale(.985); }
.board-row.me {
    background: linear-gradient(90deg, rgba(255, 216, 61, 0.15), rgba(255, 216, 61, 0.05));
    border-color: var(--glass-border);
    box-shadow: 0 0 24px rgba(255, 216, 61, 0.15);
}
.board-row.me::before {
    content: "";
    position: absolute; left: 0; top: 0; bottom: 0;
    width: 3px; background: var(--yellow);
}

.board-rank {
    font-size: 13px; font-weight: 700; color: var(--ink-dim);
    font-variant-numeric: tabular-nums;
    text-align: center;
}
.board-row.top1 .board-rank { color: var(--yellow-hot); font-size: 14px; }
.board-row.top2 .board-rank { color: #d9d9d9; }
.board-row.top3 .board-rank { color: #c48a3a; }
.board-row.top1,
.board-row.top2,
.board-row.top3 {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 10px 24px rgba(0,0,0,0.14);
}

.board-user { display: flex; align-items: center; gap: 12px; min-width: 0; }
.board-identity {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}
.board-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 216, 61, 0.25), rgba(255, 216, 61, 0.08));
    color: var(--yellow-hot);
    display: grid; place-items: center;
    font-size: 15px; font-weight: 700;
    flex-shrink: 0;
    border: 1px solid var(--glass-border-soft);
    position: relative;
    overflow: hidden;
}
.board-row.top1 .board-avatar {
    border-color: rgba(255,216,61,0.42);
    box-shadow: 0 0 18px rgba(255,216,61,0.16);
}
.board-row.top2 .board-avatar {
    border-color: rgba(217,217,217,0.32);
    box-shadow: 0 0 16px rgba(217,217,217,0.11);
}
.board-row.top3 .board-avatar {
    border-color: rgba(196,138,58,0.32);
    box-shadow: 0 0 16px rgba(196,138,58,0.12);
}
.avatar-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    z-index: 2;
    transition: opacity .2s ease;
}
.avatar-img.loaded {
    opacity: 1;
}
.avatar-fallback {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    position: relative;
    z-index: 1;
}
.board-name {
    font-size: 14px; font-weight: 700; color: var(--ink);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    min-width: 0;
}
.board-identity .ref-breakdown {
    margin-top: -4px;
}
.board-row.has-prize {
    grid-template-columns: 36px minmax(0, 1fr) auto auto;
    padding-top: 12px;
    padding-bottom: 12px;
}
.board-row.has-prize .board-user {
    align-items: center;
}
.board-prize {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-right: 2px;
}

.board-value {
    font-size: 14px; font-weight: 700; color: var(--yellow-hot);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.board-value small { font-size: 10px; color: var(--ink-dim); font-weight: 500; margin-left: 2px; }

.board-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--ink-mute);
    font-size: 13px;
}

/* ── Sticky self bar ──────────────────────────────────────────────────── */
.self-bar {
    position: fixed;
    bottom: calc(12px + var(--safe-bottom));
    left: calc(12px + var(--safe-left));
    right: calc(12px + var(--safe-right));
    max-width: 500px;
    margin: 0 auto;
    display: grid; grid-template-columns: 44px 1fr auto;
    align-items: center; gap: 12px;
    padding: 10px 16px;
    background: rgba(26, 20, 5, 0.85);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-md);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    z-index: 10;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 216, 61, 0.18);
}
.self-bar.is-clickable {
    cursor: pointer;
}
.self-bar.is-clickable:active {
    transform: scale(.992);
}
.self-rank {
    font-size: 15px; font-weight: 800; color: var(--yellow);
    text-align: center; font-variant-numeric: tabular-nums;
}
.self-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.self-name-val {
    font-size: 13px; font-weight: 600; color: var(--ink);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.self-delta { font-size: 10px; color: var(--good); font-weight: 600; }
.self-delta.down { color: var(--danger); }
.self-value {
    font-size: 14px; font-weight: 700; color: var(--yellow-hot);
    font-variant-numeric: tabular-nums;
}
.self-value small { font-size: 10px; color: var(--ink-dim); font-weight: 500; }

/* ── Footer ───────────────────────────────────────────────────────────── */
.foot {
    margin-top: 24px;
    text-align: center;
    font-size: 11px; color: var(--ink-mute);
    padding: 12px 20px;
}

.profile-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 30;
    background: rgba(4, 4, 6, 0.72);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    padding: calc(18px + var(--safe-top)) calc(14px + var(--safe-right)) calc(18px + var(--safe-bottom)) calc(14px + var(--safe-left));
}
.profile-sheet {
    max-width: 560px;
    margin: 0 auto;
    height: min(100%, 860px);
    display: flex;
    flex-direction: column;
    border-radius: 28px;
    overflow: hidden;
    background:
        radial-gradient(circle at top, rgba(255, 216, 61, 0.12), transparent 42%),
        rgba(12, 10, 7, 0.96);
    border: 1px solid rgba(255, 216, 61, 0.16);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
}
.profile-sheet-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255, 216, 61, 0.12);
}
.profile-sheet-kicker {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(255, 228, 150, 0.62);
    margin-bottom: 5px;
}
.profile-sheet-title {
    font-size: 22px;
    line-height: 1.05;
    color: var(--ink);
}
.profile-sheet-close {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid rgba(255, 216, 61, 0.14);
    background: rgba(255, 255, 255, 0.03);
    color: var(--ink-dim);
    font-size: 15px;
}
.profile-sheet-body {
    flex: 1;
    overflow: auto;
    padding: 18px 20px 28px;
}
.profile-sheet-empty {
    padding: 32px 18px;
    color: var(--ink-mute);
    text-align: center;
}
.admin-profile-hero {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 18px;
}
.admin-profile-main {
    display: flex;
    align-items: center;
    gap: 14px;
}
.admin-avatar-link {
    text-decoration: none;
}
.admin-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 216, 61, 0.26), rgba(255, 216, 61, 0.08));
    border: 1px solid rgba(255, 216, 61, 0.2);
    color: var(--yellow-hot);
    font-size: 24px;
    font-weight: 800;
    position: relative;
}
.admin-avatar--sm {
    width: 42px;
    height: 42px;
    font-size: 16px;
}
.admin-profile-copy {
    min-width: 0;
}
.user-profile-hero {
    gap: 14px;
}
.user-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.user-stat {
    padding: 11px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 216, 61, 0.1);
}
.user-stat-label {
    display: block;
    margin-bottom: 6px;
    color: var(--ink-mute);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.user-stat-value {
    color: var(--yellow-hot);
    font-size: 18px;
}
.admin-profile-name,
.admin-related-link {
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
}
.admin-profile-tag,
.admin-list-meta {
    color: var(--ink-mute);
    font-size: 12px;
}
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.admin-stat {
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 216, 61, 0.1);
}
.admin-stat-label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-mute);
    margin-bottom: 6px;
}
.admin-stat-value {
    font-size: 18px;
    color: var(--yellow-hot);
}
.admin-related-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 216, 61, 0.1);
}
.admin-related-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-mute);
    margin-bottom: 3px;
}
.admin-section {
    margin-top: 18px;
}
.user-list-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.user-list-head .admin-section-title {
    margin-bottom: 0;
}
.user-list-subtitle {
    color: rgba(255, 228, 150, 0.62);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}
.admin-section-title {
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--ink);
}
.admin-section-note {
    margin: -2px 0 10px;
    font-size: 11px;
    color: rgba(255, 228, 150, 0.58);
}
.admin-meta-grid,
.admin-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.admin-meta-row,
.admin-list-card {
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255, 216, 61, 0.08);
}
.admin-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}
.admin-meta-label {
    color: var(--ink-mute);
    font-size: 12px;
}
.admin-meta-value,
.admin-list-strong {
    color: var(--ink);
    font-weight: 600;
    font-size: 13px;
}
.admin-list-main {
    display: flex;
    align-items: center;
    gap: 12px;
}
.admin-list-copy {
    min-width: 0;
    flex: 1;
}
.user-ref-card {
    padding-top: 13px;
    padding-bottom: 13px;
}
.user-ref-meta {
    color: rgba(255, 236, 182, 0.72);
    font-size: 12px;
    margin-bottom: 4px;
}
.admin-list-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}
.admin-inline-pill,
.admin-tx-kind {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.admin-inline-pill {
    color: rgba(255, 235, 182, 0.78);
    background: rgba(255, 216, 61, 0.08);
    border: 1px solid rgba(255, 216, 61, 0.12);
}
.admin-inline-pill--good {
    color: #12210f;
    background: rgba(107, 255, 155, 0.88);
    border-color: rgba(107, 255, 155, 0.52);
}
.admin-inline-pill--bad {
    color: #fff4ec;
    background: rgba(255, 106, 92, 0.22);
    border-color: rgba(255, 106, 92, 0.32);
}
.admin-tx-kind {
    color: var(--yellow-hot);
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255, 216, 61, 0.08);
}

/* ── Animations on row appear ─────────────────────────────────────────── */
.board-row { animation: slideIn .3s ease backwards; }
.board-row:nth-child(1)  { animation-delay: .02s; }
.board-row:nth-child(2)  { animation-delay: .04s; }
.board-row:nth-child(3)  { animation-delay: .06s; }
.board-row:nth-child(4)  { animation-delay: .08s; }
.board-row:nth-child(5)  { animation-delay: .10s; }
.board-row:nth-child(6)  { animation-delay: .12s; }
.board-row:nth-child(7)  { animation-delay: .14s; }
.board-row:nth-child(8)  { animation-delay: .16s; }
.board-row:nth-child(9)  { animation-delay: .18s; }
.board-row:nth-child(10) { animation-delay: .20s; }

@keyframes slideIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Gifts (premium prize cards) ──────────────────────────────────────── */
.gift-tile {
    position: relative;
    width: 48px; height: 48px;
    border-radius: 15px;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--gift-from, #f6d66c), var(--gift-to, #7b4e12));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        inset 0 -8px 12px rgba(0, 0, 0, 0.25),
        0 8px 18px rgba(0, 0, 0, 0.38);
    isolation: isolate;
}
.gift-tile::before {
    content: "";
    position: absolute; inset: 0;
    background:
        radial-gradient(60% 55% at 50% 30%, rgba(255, 255, 255, 0.35), transparent 65%),
        radial-gradient(40% 40% at 20% 80%, rgba(0, 0, 0, 0.22), transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.gift-tile::after {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: 10px;
    border: 1px solid rgba(255, 248, 230, 0.18);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.14),
        inset 0 -8px 10px rgba(0,0,0,0.12);
    pointer-events: none;
    z-index: 1;
}

.gift-tile-img {
    position: absolute;
    inset: 7px;
    width: calc(100% - 14px);
    height: calc(100% - 14px);
    object-fit: cover;
    object-position: center;
    border-radius: 9px;
    z-index: 2;
    opacity: 0;
    transition: opacity .25s ease;
    background:
        radial-gradient(circle at 50% 30%, rgba(255,255,255,0.16), transparent 58%),
        rgba(22, 17, 9, 0.28);
    pointer-events: none;
}
.gift-tile-img.loaded { opacity: 1; }

.gift-tile-fallback {
    position: absolute; inset: 0;
    display: grid; place-items: center;
    opacity: 0;
    z-index: 1;
    pointer-events: none;
}
.gift-tile.is-failed .gift-tile-fallback {
    opacity: 1;
}
.gift-tile.is-failed .gift-tile-fallback::before {
    content: "";
    width: 58%;
    height: 58%;
    border-radius: 16px;
    background:
        radial-gradient(circle at 30% 30%, rgba(255,255,255,0.34), transparent 56%),
        linear-gradient(135deg, rgba(255,255,255,0.16), rgba(255,255,255,0.04));
    border: 1px solid rgba(255, 248, 230, 0.24);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.18),
        0 10px 22px rgba(0,0,0,0.18);
}

.gift-tile--inline {
    width: 54px;
    height: 54px;
    border-radius: 17px;
}
.gift-tile--inline::after {
    border-radius: 12px;
}
.gift-tile--inline .gift-tile-img {
    border-radius: 11px;
}
.gift-tile--podium {
    width: 82px;
    height: 82px;
    border-radius: 24px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        inset 0 -10px 14px rgba(0, 0, 0, 0.28),
        0 10px 24px rgba(0, 0, 0, 0.48);
}
.podium-slot.gold .gift-tile--podium {
    width: 92px;
    height: 92px;
    border-radius: 26px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.32),
        inset 0 -12px 16px rgba(0, 0, 0, 0.3),
        0 0 26px rgba(255, 216, 61, 0.32),
        0 12px 30px rgba(0, 0, 0, 0.5);
}
.gift-tile--podium::after {
    inset: 7px;
    border-radius: 16px;
}
.gift-tile--podium .gift-tile-img {
    inset: 10px;
    width: calc(100% - 20px);
    height: calc(100% - 20px);
    border-radius: 14px;
}

.gift-action {
    appearance: none;
    border: 1px solid var(--glass-border-soft);
    background:
        radial-gradient(circle at top, rgba(255, 216, 61, 0.16), transparent 62%),
        linear-gradient(180deg, rgba(255, 248, 230, 0.08), rgba(255, 216, 61, 0.04)),
        rgba(18, 16, 10, 0.46);
    color: var(--ink);
    font: inherit;
    margin: 0;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform .18s ease, box-shadow .24s ease, border-color .24s ease;
    backdrop-filter: blur(18px) saturate(145%);
    -webkit-backdrop-filter: blur(18px) saturate(145%);
}
.gift-action::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(125deg, rgba(255,255,255,0.14), transparent 34%),
        radial-gradient(circle at 70% 100%, rgba(255, 216, 61, 0.12), transparent 48%);
    opacity: .9;
    pointer-events: none;
}
.gift-action::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 10px;
    width: 62%;
    height: 16%;
    transform: translateX(-50%);
    border-radius: 999px;
    background: radial-gradient(circle, rgba(255, 216, 61, 0.26), transparent 72%);
    filter: blur(10px);
    opacity: 0;
    pointer-events: none;
}
.gift-action:active {
    transform: translateY(1px) scale(.985);
}
.gift-action--gold {
    border-color: rgba(255, 216, 61, 0.26);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28), 0 0 22px rgba(255, 216, 61, 0.08);
}
.gift-action--silver {
    border-color: rgba(217, 217, 217, 0.2);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24), 0 0 18px rgba(217, 217, 217, 0.06);
}
.gift-action--bronze,
.gift-action--top3 {
    border-color: rgba(196, 138, 58, 0.24);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24), 0 0 18px rgba(196, 138, 58, 0.08);
}
.gift-action-frame,
.gift-action-open,
.gift-action-caption {
    position: relative;
    z-index: 1;
}
.gift-action-frame {
    display: grid;
    place-items: center;
}

.gift-action--inline {
    align-self: flex-start;
    padding: 5px;
    border-radius: 21px;
    background:
        linear-gradient(180deg, rgba(255, 248, 230, 0.08), rgba(255, 216, 61, 0.03)),
        rgba(18, 16, 10, 0.38);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.05),
        0 8px 18px rgba(0,0,0,0.2);
}

.gift-action--podium {
    margin-top: 16px;
    padding: 12px;
    border-radius: 34px;
    background:
        radial-gradient(circle at 50% 18%, rgba(255, 216, 61, 0.2), transparent 58%),
        rgba(18, 16, 10, 0.18);
    border-color: rgba(255, 248, 230, 0.12);
}
.gift-action--podium::after {
    opacity: 0.95;
}

.gift-action-open {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(11, 10, 7, 0.62);
    border: 1px solid rgba(255, 248, 230, 0.14);
    color: var(--yellow-hot);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22);
}

.board-row.top1 .gift-action--inline {
    transform: scale(1.03);
}
.board-row.top2 .gift-action--inline,
.board-row.top3 .gift-action--inline {
    transform: scale(1.01);
}

@media (max-width: 430px) {
    .pulse-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .pulse-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .pulse-kpi-value {
        font-size: 22px;
    }
    .pulse-bar-title-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }
    .hero {
        padding: 13px 10px 8px;
    }
    .hero-title {
        font-size: 15px;
    }
    .cd-value {
        font-size: 13px;
    }
    .me-card {
        padding: 9px;
    }
    .me-head {
        gap: 8px;
    }
    .me-avatar {
        width: 34px;
        height: 34px;
        font-size: 13px;
    }
    .me-name {
        font-size: 13px;
    }
    .me-head-actions {
        gap: 6px;
    }
    .me-balance-value {
        font-size: 26px;
    }
    .me-primary {
        gap: 8px;
    }
    .claim-btn {
        min-width: 104px;
        min-height: 38px;
        padding: 0 14px;
    }
    .me-stats {
        gap: 0;
    }
    .me-stat-value {
        font-size: 13px;
    }
    .wallet-chip {
        min-height: 38px;
        padding: 0 10px;
        gap: 8px;
    }
    .wallet-chip-label {
        font-size: 9px;
    }
    .wallet-chip-value {
        font-size: 11px;
    }
    .drop-reveal {
        padding: 16px 15px 15px;
    }
    .podium {
        gap: 6px;
        min-height: 214px;
    }
    .podium-slot {
        padding: 15px 8px 14px;
    }
    .podium-slot.gold { min-height: 214px; }
    .podium-slot.silver { min-height: 194px; }
    .podium-slot.bronze { min-height: 182px; }
    .podium-avatar {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }
    .podium-slot.gold .podium-avatar {
        width: 56px;
        height: 56px;
        font-size: 21px;
    }
    .gift-tile--podium {
        width: 72px;
        height: 72px;
    }
    .podium-slot.gold .gift-tile--podium {
        width: 82px;
        height: 82px;
    }
    .board-row.has-prize {
        grid-template-columns: 32px minmax(0, 1fr) auto auto;
        gap: 8px;
    }
    .gift-tile--inline {
        width: 48px;
        height: 48px;
    }
    .admin-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .profile-sheet-body {
        padding-inline: 14px;
    }
}

@media (max-width: 370px) {
    .me-primary {
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch;
    }
    .claim-btn {
        width: 100%;
        justify-self: stretch;
    }
    .wallet-chip-label {
        letter-spacing: 0.06em;
    }
}

/* Dev banner (mock mode) ───────────────────────────────────────────── */
.dev-banner {
    position: fixed; top: calc(8px + var(--safe-top)); right: calc(8px + var(--safe-right));
    background: rgba(255, 106, 92, 0.15);
    border: 1px solid rgba(255, 106, 92, 0.4);
    color: #ffb4ac;
    font-size: 10px; font-weight: 600;
    padding: 4px 8px; border-radius: 999px;
    z-index: 100;
    text-transform: uppercase; letter-spacing: 0.5px;
}
