/* Бонус·Лото — player screens. Mobile first; desktop layout from 900px (D-* mockups). */
:root {
    --bg: #0F1426; --surface: #1C2540; --card: #161D35; --navy: #1C2540;
    --line: #2A3457; --line2: #2E3A60; --line3: #3A4775; --line-top: #1F2847;
    --ink: #F3EFE6; --muted: #A9B0C7; --dim: #8E97B3; --faint: #6F7AA0;
    --gold: #F2BE4B; --mint: #9FE3C0; --coral: #FF7A6B; --coral-ink: #FF9A8E; --lilac: #CFC3FF;
    --bubble: #253052; --bubble-line: #34406A;
    --ease: cubic-bezier(.2, .8, .2, 1);
    --tabbar: 74px;
}

* { box-sizing: border-box; }
html, body, * { scrollbar-width: none; }
::-webkit-scrollbar { display: none; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; min-height: 100vh; overflow-x: hidden;
    font-family: Manrope, system-ui, sans-serif; background: var(--bg); color: var(--ink);
    -webkit-font-smoothing: antialiased;
    padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom));
}
a { color: var(--gold); }
a:hover { color: #FFD57A; }
button, input, select { font-family: inherit; }
button { cursor: pointer; }
a, button { transition: transform .15s ease, background-color .2s, border-color .2s, color .2s, box-shadow .2s, opacity .2s; }
a:active, button:active { transform: scale(.97); }
button:disabled { opacity: .35; cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }
pre { margin: 0; }

/* ---------- animations (from the mockups) ---------- */
@keyframes up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(255,122,107,.45); } 100% { box-shadow: 0 0 0 10px rgba(255,122,107,0); } }
@keyframes tick { from { opacity: .15; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes glow { 0%, 100% { text-shadow: 0 0 0 rgba(242,190,75,0); } 50% { text-shadow: 0 0 22px rgba(242,190,75,.45); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes cta { 0% { box-shadow: 0 0 0 0 rgba(242,190,75,.5); } 100% { box-shadow: 0 0 0 14px rgba(242,190,75,0); } }
@keyframes bar { from { width: 0; } }
@keyframes pop { 0% { transform: scale(.55); } 55% { transform: scale(1.14); } 100% { transform: scale(1); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheet { from { transform: translateY(100%); } to { transform: none; } }
@keyframes check { 0% { transform: scale(0) rotate(-30deg); } 60% { transform: scale(1.15) rotate(6deg); } 100% { transform: none; } }
@keyframes roll { 0% { opacity: 0; transform: translateY(-18px) rotate(-120deg); } 100% { opacity: 1; transform: none; } }
@keyframes spark { 0% { opacity: 0; transform: translate(0,0) scale(.4); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(1); } }
@keyframes slide { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
@keyframes newt { 0% { box-shadow: 0 0 0 0 rgba(159,227,192,.5); } 100% { box-shadow: 0 0 0 12px rgba(159,227,192,0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rollin { 0% { opacity: 0; transform: translateX(-90px) rotate(-300deg) scale(.7); } 70% { opacity: 1; transform: translateX(6px) rotate(15deg) scale(1.05); } 100% { transform: none; } }
@keyframes drop { 0% { transform: translateY(-60px) scale(.6); opacity: 0; } 70% { transform: translateY(6px) scale(1.04); opacity: 1; } 100% { transform: none; } }
@keyframes hit { 0% { transform: scale(.5); box-shadow: 0 0 0 0 rgba(242,190,75,.8); } 50% { transform: scale(1.18); } 100% { transform: scale(1); box-shadow: 0 0 0 10px rgba(242,190,75,0); } }
@keyframes slotpulse { 0%, 100% { border-color: var(--line3); } 50% { border-color: var(--gold); } }
@keyframes banner { from { opacity: 0; transform: translateY(24px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes fall { 0% { transform: translateY(-30px) rotate(0); opacity: 0; } 10% { opacity: 1; } 100% { transform: translateY(100vh) rotate(720deg); opacity: .2; } }
@keyframes trophy { 0% { opacity: 0; transform: scale(.3) rotate(-25deg); } 55% { opacity: 1; transform: scale(1.15) rotate(6deg); } 75% { transform: scale(.95) rotate(-3deg); } 100% { transform: none; } }
@keyframes halo { 0% { box-shadow: 0 0 0 0 rgba(242,190,75,.5); } 100% { box-shadow: 0 0 0 26px rgba(242,190,75,0); } }
@keyframes ballin { 0% { opacity: 0; transform: translateY(-24px) rotate(-180deg); } 100% { opacity: 1; transform: none; } }
@keyframes twinkle { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: .8; transform: scale(1.1); } }

.in { animation: up .55s var(--ease) both; }
.dl0 { animation-delay: .04s; } .dl1 { animation-delay: .1s; } .dl2 { animation-delay: .16s; } .dl3 { animation-delay: .22s; }
.dl4 { animation-delay: .28s; } .dl5 { animation-delay: .34s; } .dl6 { animation-delay: .4s; } .dl7 { animation-delay: .46s; }
.tick { animation: tick .35s ease-out; }
.pop { animation: pop .35s var(--ease); }
.prize { animation: glow 3s ease-in-out infinite; }
.fl1 { animation: float 4s ease-in-out infinite; } .fl2 { animation: float 5s ease-in-out .6s infinite; }
.cta { animation: cta 2.2s ease-out 1.2s infinite; }
.roll { animation: roll .45s var(--ease) both; }
.r1 { animation-delay: .08s; } .r2 { animation-delay: .16s; } .r3 { animation-delay: .24s; } .r4 { animation-delay: .32s; }
.sw { animation: slide .35s var(--ease) both; }
.banner { animation: banner .5s var(--ease) .2s both; }

/* ---------- text & layout utilities ---------- */
.h { font-family: Unbounded, sans-serif; font-weight: 600; letter-spacing: -.01em; }
.h1 { margin: 0; font-family: Unbounded, sans-serif; font-weight: 600; font-size: 22px; }
.h2 { margin: 0; font-family: Unbounded, sans-serif; font-weight: 600; font-size: 15px; }
.m0 { margin: 0; }
.t11 { font-size: 11px; } .t12 { font-size: 12px; } .t13 { font-size: 13px; } .t14 { font-size: 14px; } .t15 { font-size: 15px; }
.t16 { font-size: 16px; } .t17 { font-size: 17px; } .t18 { font-size: 18px; } .t22 { font-size: 22px; }
.b6 { font-weight: 600; } .b7 { font-weight: 700; } .b8 { font-weight: 800; }
.lh { line-height: 1.45; }
.muted { color: var(--muted); } .dim { color: var(--dim); } .ink { color: var(--ink); }
.gold { color: var(--gold); } .mint { color: var(--mint); } .coral { color: var(--coral-ink); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.nowrap { white-space: nowrap; }
.nodeco { text-decoration: none; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.center { text-align: center; } .right { text-align: right; }
.tnum { font-variant-numeric: tabular-nums; }
.min0 { min-width: 0; }
.rel { position: relative; }
.w100 { width: 100%; }
.grow { flex-grow: 1; }
.col { display: flex; flex-direction: column; }
.col.center { align-items: center; }
.end-x { align-items: flex-end; }
.gap1 { gap: 1px; } .gap2 { gap: 2px; } .gap4 { gap: 4px; } .gap6 { gap: 6px; } .gap8 { gap: 8px; } .gap10 { gap: 10px; }
.stack-3, .stack-10, .stack-12, .stack-14, .stack-16, .stack-18, .stack-24 { display: flex; flex-direction: column; min-width: 0; }
.stack-3 { gap: 3px; } .stack-10 { gap: 10px; } .stack-12 { gap: 12px; } .stack-14 { gap: 14px; } .stack-16 { gap: 16px; } .stack-18 { gap: 18px; } .stack-24 { gap: 24px; }
.row-6, .row-10 { display: flex; align-items: center; }
.row-6 { gap: 6px; } .row-10 { gap: 10px; }
.wrap-x { flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.row-between.end { align-items: flex-end; }
.row-between.baseline { align-items: baseline; }
.row-between.start { align-items: flex-start; }
.spacer44 { width: 44px; flex-shrink: 0; }

@media (max-width: 899px) { .d-only { display: none !important; } }
@media (min-width: 900px) { .m-only { display: none !important; } }

/* ---------- shell: header, main, tab bar ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 62px; padding: 18px 20px 0; }
.top-left { display: flex; align-items: center; gap: 48px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.logo:hover { color: var(--ink); }
.logo-ball {
    width: 30px; height: 30px; border-radius: 50%; background: var(--gold); color: var(--navy);
    display: flex; align-items: center; justify-content: center;
    font-family: Unbounded, sans-serif; font-weight: 700; font-size: 13px; box-shadow: inset 0 -3px 0 rgba(0,0,0,.18);
}
.logo-text { font-family: Unbounded, sans-serif; font-weight: 600; font-size: 16px; letter-spacing: -.01em; }
.top-nav { display: flex; gap: 8px; }
.top-nav a { height: 44px; padding: 0 16px; display: flex; align-items: center; border-radius: 12px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; }
.top-nav a:hover { color: var(--ink); }
.top-nav a[aria-current] { background: var(--surface); color: var(--ink); font-weight: 700; }
.top form { margin: 0; }
.pill {
    display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 22px;
    background: var(--surface); border: 1px solid var(--line2); color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 700;
}
.pill:hover { color: var(--ink); border-color: var(--line3); }

.wrap { max-width: 1440px; margin: 0 auto; padding: 14px 20px 24px; display: flex; flex-direction: column; gap: 14px; }

.tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    display: flex; justify-content: space-around; align-items: center;
    height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding: 0 8px calc(6px + env(safe-area-inset-bottom));
    background: var(--card); border-top: 1px solid var(--line);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 64px; padding: 8px 0; text-decoration: none; color: var(--dim); font-size: 11px; font-weight: 600; }
.tabbar a[aria-current] { color: var(--gold); font-weight: 700; }

/* ---------- shared components ---------- */
.badge {
    width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0; background: var(--gold); color: var(--navy);
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 11px;
}
.badge-sm { width: 24px; height: 24px; border-radius: 7px; font-size: 9px; }
.badge-28 { width: 28px; height: 28px; border-radius: 8px; font-size: 10px; }
.badge-lg { width: 34px; height: 34px; border-radius: 10px; font-size: 12px; }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 12px; font-size: 11px; font-weight: 800; white-space: nowrap; flex-shrink: 0; }
.chip-live { background: rgba(255,122,107,.16); color: var(--coral-ink); }
.chip-open { background: rgba(159,227,192,.16); color: var(--mint); }
.chip-soon { background: rgba(185,167,255,.16); color: var(--lilac); }
.chip-done { background: var(--bubble); color: var(--muted); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--coral); animation: pulse 1.4s infinite; flex-shrink: 0; }

.tag { font-size: 11px; font-weight: 800; color: var(--navy); background: var(--mint); border-radius: 10px; padding: 3px 8px; white-space: nowrap; }
.tag-coral { background: var(--coral); }
.tag-dim { background: var(--bubble); color: var(--muted); }

.btn {
    display: flex; align-items: center; justify-content: center; gap: 8px; height: 54px; padding: 0 24px; border-radius: 16px; border: none;
    background: var(--gold); color: var(--navy); text-decoration: none; font-weight: 800; font-size: 16px; white-space: nowrap;
}
.btn:hover { color: var(--navy); background: #FFCB5C; }
.btn-sm { height: 44px; padding: 0 16px; border-radius: 14px; font-size: 14px; flex-shrink: 0; }
.btn-xs { height: 40px; padding: 0 16px; border-radius: 12px; font-size: 14px; flex-shrink: 0; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; border: 1px solid var(--line3); color: var(--ink); font-weight: 700; font-size: 15px; }
.btn-ghost:hover { background: var(--surface); color: var(--ink); }
.btn-soft {
    height: 48px; border-radius: 14px; border: 1px solid var(--line2); background: var(--surface); color: var(--ink);
    font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-text { height: 44px; padding: 0 18px; border: none; background: transparent; color: var(--muted); font-weight: 700; font-size: 14px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.btn-text:hover { color: var(--ink); }
.btn-outline {
    display: inline-flex; align-items: center; height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line2);
    background: transparent; color: var(--ink); font-weight: 700; font-size: 14px; text-decoration: none; flex-shrink: 0; align-self: flex-start;
}
.btn-outline:hover { color: var(--ink); border-color: var(--line3); }
.mint-outline { border-color: var(--mint); color: var(--mint); }
.mint-outline:hover { color: var(--mint); background: rgba(159,227,192,.08); }

.panel { background: var(--surface); border: 1px solid var(--line2); border-radius: 22px; padding: 18px; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.box-pad { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.side-box { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px; }

.back {
    width: 44px; height: 44px; flex-shrink: 0; border-radius: 14px; background: var(--surface); border: 1px solid var(--line2);
    display: flex; align-items: center; justify-content: center; color: var(--ink);
}
.back:hover { color: var(--ink); border-color: var(--line3); }
.page-head { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.center-head { justify-content: space-between; }

.balls { display: flex; gap: 8px; flex-wrap: wrap; }
.balls.gap6 { gap: 6px; }
.ball {
    width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; background: var(--bubble); border: 1px solid var(--bubble-line); color: var(--ink);
    display: flex; align-items: center; justify-content: center; font-family: Unbounded, sans-serif; font-weight: 600; font-size: 13px;
}
.ball.hit { background: var(--gold); border-color: var(--gold); color: var(--navy); font-weight: 700; box-shadow: inset 0 -3px 0 rgba(0,0,0,.18); }
.ball.miss { background: transparent; color: var(--muted); font-weight: 500; }
.ball-sm { width: 34px; height: 34px; font-size: 12px; }
.ball-44 { width: 44px; height: 44px; font-size: 14px; }
.ball-46 { width: 46px; height: 46px; font-size: 15px; }
.ball-lg { width: 44px; height: 44px; font-size: 14px; }
.hit-anim { animation: hit .7s var(--ease) both; }

.bar { height: 6px; border-radius: 3px; background: var(--bg); overflow: hidden; }
.bar > div { height: 100%; border-radius: 3px; background: var(--mint); animation: bar 1.2s var(--ease) .4s both; }
.bar-thin { height: 4px; }
.bar-thin > div { background: var(--gold); animation: none; transition: width .35s var(--ease); }

.rows { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.rows > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 16px; font-size: 14px; }
.rows > div + div { border-top: 1px solid var(--line); }
.rows b { font-weight: 800; font-size: 15px; text-align: right; }

.link-card {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 18px;
    background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none;
}
.link-card:hover { color: var(--ink); border-color: var(--line3); }
.links { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; font-weight: 700; }
.links a { text-decoration: none; }

.empty { padding: 28px 20px; border-radius: 20px; border: 1px dashed var(--line3); text-align: center; display: flex; flex-direction: column; gap: 6px; }
.empty p { margin: 0; }
.alert { padding: 12px 14px; border-radius: 14px; background: rgba(255,122,107,.12); border: 1px solid rgba(255,122,107,.35); color: #FFB4AA; font-size: 14px; font-weight: 600; }
.alert-dim { background: var(--card); border-color: var(--line); color: var(--muted); }
.alert-ok { background: rgba(159,227,192,.10); border-color: rgba(159,227,192,.35); color: var(--mint); }
.err { color: #FFB4AA; }

.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 30; }
.cf { position: absolute; top: 0; width: 8px; height: 12px; border-radius: 2px; animation: fall 2.8s cubic-bezier(.3,.6,.4,1) both; }
.cf:nth-child(even) { width: 6px; }
.cf:nth-child(3n) { height: 8px; }

/* ---------- hub ---------- */
.hub-banner {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px;
    border-radius: 18px; background: var(--surface); border: 1px solid var(--line2);
}
.hub-banner a:not(.btn) { text-decoration: none; }
.filters { display: flex; gap: 8px; overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
.fchip {
    height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--line2); background: transparent; color: #C9CEDD;
    font-weight: 700; font-size: 13px; white-space: nowrap; display: flex; align-items: center; text-decoration: none; flex-shrink: 0;
}
.fchip:hover { color: var(--ink); border-color: var(--line3); }
.fchip.on { background: var(--gold); border-color: var(--gold); color: var(--navy); font-weight: 800; }
.draw-list { display: flex; flex-direction: column; gap: 12px; }
.card {
    display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 20px;
    background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none;
}
.card:hover { color: var(--ink); border-color: var(--line3); transform: translateY(-2px); }
.live-card { animation: up .55s var(--ease) both, ring 2s 1s infinite; }
.card-title { font-weight: 800; font-size: 15px; }
.card-prize { font-family: Unbounded, sans-serif; font-weight: 700; font-size: 22px; line-height: 1.1; }
.card-when { font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat {
    padding: 20px 22px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line2);
    color: var(--ink); text-decoration: none; display: flex; flex-direction: column; gap: 4px;
}
.stat:hover { color: var(--ink); border-color: var(--line3); }
.stat-gold { border-color: var(--gold); }
.stat-num { font-family: Unbounded, sans-serif; font-weight: 700; font-size: 30px; }

/* ---------- draw page ---------- */
.hero {
    position: relative; isolation: isolate; overflow: hidden; background: var(--surface); border: 1px solid var(--line2);
    border-radius: 24px; padding: 20px; display: flex; flex-direction: column; gap: 14px;
}
.hero-blob { position: absolute; z-index: -1; right: -34px; top: 72px; width: 110px; height: 110px; border-radius: 50%; background: var(--gold); opacity: .10; }
.hero-ring { position: absolute; z-index: -1; right: 30px; top: 104px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--mint); opacity: .45; }
.hero-sub { font-size: 14px; }
.hero-prize { font-family: Unbounded, sans-serif; font-weight: 700; font-size: 44px; line-height: 1.05; color: var(--gold); overflow-wrap: anywhere; }
.hero-actions { display: flex; flex-direction: column; gap: 12px; }
.cd { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.cd > div { background: var(--bg); border-radius: 14px; padding: 10px 0; display: flex; flex-direction: column; align-items: center; gap: 2px; overflow: hidden; }
.cd b { font-family: Unbounded, sans-serif; font-weight: 600; font-size: 22px; font-variant-numeric: tabular-nums; }
.cd span { font-size: 11px; color: var(--muted); }
.hero-balls span {
    position: absolute; z-index: -1; border-radius: 50%; color: var(--navy); display: flex; align-items: center; justify-content: center;
    font-family: Unbounded, sans-serif; font-weight: 700;
}
.hero-balls .fb1 { right: 56px; top: 44px; width: 150px; height: 150px; font-size: 58px; box-shadow: inset 0 -12px 0 rgba(0,0,0,.18), inset 0 10px 0 rgba(255,255,255,.22); animation: float 5s ease-in-out infinite; }
.hero-balls .fb2 { right: 200px; top: 170px; width: 88px; height: 88px; font-size: 32px; background: var(--ink); box-shadow: inset 0 -8px 0 rgba(0,0,0,.12); animation: float 6s ease-in-out .8s infinite; }
.hero-balls .fb3 { right: 70px; top: 214px; width: 104px; height: 104px; font-size: 38px; background: var(--mint); box-shadow: inset 0 -9px 0 rgba(0,0,0,.15); animation: float 4.5s ease-in-out .4s infinite; }
.hero-balls i { position: absolute; z-index: -1; right: 210px; top: 58px; width: 56px; height: 56px; border-radius: 50%; border: 2px dashed var(--line3); }
.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.how > div { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 10px; transition: transform .2s ease; }
.how > div:hover { transform: translateY(-3px); }
.how b { font-size: 16px; }
.how p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.45; }
.how-n { width: 36px; height: 36px; border-radius: 50%; background: var(--bubble); display: flex; align-items: center; justify-content: center; font-family: Unbounded, sans-serif; font-weight: 700; font-size: 14px; }
.mini-tk { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line2); }
.mini-tk.dashed { flex-direction: row; border-style: dashed; }
.prev {
    display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: 22px;
    background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none;
}
.prev:hover { color: var(--ink); border-color: var(--line3); }
.prev-l { display: flex; flex-direction: column; gap: 12px; }

/* ---------- pick ---------- */
.narrow { width: 100%; max-width: 520px; margin: 0 auto; }
.narrow-wide { width: 100%; max-width: 760px; margin: 0 auto; }
.pick-top { display: flex; flex-direction: column; gap: 14px; }
.slots5, .live-slots { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; width: 100%; }
.slot {
    aspect-ratio: 1; border-radius: 50%; border: 2px dashed var(--line3); color: var(--faint);
    display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
}
.slot.filled {
    border: none; background: var(--gold); color: var(--navy); font-family: Unbounded, sans-serif; font-weight: 700; font-size: 17px;
    box-shadow: inset 0 -4px 0 rgba(0,0,0,.18);
}
.nums { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.num {
    height: 50px; border-radius: 14px; border: 1px solid var(--line2); background: var(--card); color: var(--ink);
    font-family: Unbounded, sans-serif; font-weight: 500; font-size: 15px;
}
.num:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.num.sel { border-color: var(--gold); background: var(--gold); color: var(--navy); font-weight: 700; box-shadow: 0 6px 16px rgba(242,190,75,.25); }
.num.sel:disabled { opacity: 1; }
.overlay {
    position: fixed; inset: 0; z-index: 40; background: rgba(9,12,24,.82);
    display: flex; align-items: flex-end; justify-content: center; animation: fade .25s ease-out both;
}
.sheet {
    width: 100%; max-width: 520px; background: var(--surface); border-top: 1px solid var(--line2); border-radius: 28px 28px 0 0;
    padding: 14px 22px calc(30px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: 16px;
    text-align: center; animation: sheet .45s cubic-bezier(.2,.9,.2,1) both;
}
.sheet .balls { justify-content: center; }
.grip { width: 40px; height: 4px; border-radius: 2px; background: var(--line3); }
.check-wrap { position: relative; width: 72px; height: 72px; }
.check {
    width: 72px; height: 72px; border-radius: 50%; background: var(--mint); color: var(--navy);
    display: flex; align-items: center; justify-content: center; animation: check .55s var(--ease) .1s both;
}
.sp { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; border-radius: 50%; animation: spark .9s ease-out .15s both; }

/* ---------- tickets ---------- */
.tk-head { min-height: 44px; }
.seg {
    position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px;
    background: var(--card); border: 1px solid var(--line); border-radius: 14px;
}
.seg-thumb {
    position: absolute; top: 4px; left: 4px; width: calc(50% - 6px); height: 40px; border-radius: 10px; background: var(--gold);
    transition: transform .35s var(--ease);
}
.seg.second .seg-thumb { transform: translateX(calc(100% + 4px)); }
.seg button { position: relative; height: 40px; border: none; border-radius: 10px; font-weight: 700; font-size: 14px; background: transparent; color: var(--muted); }
.seg button[aria-selected="true"] { color: var(--navy); }
.newt {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; color: var(--ink); text-decoration: none;
    background: rgba(159,227,192,.10); border: 1px solid rgba(159,227,192,.35);
    animation: up .5s var(--ease) .1s both, newt 1.8s ease-out .6s 3;
}
.newt:hover { color: var(--ink); }
.newt-ico { width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; background: var(--mint); color: var(--navy); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; }
.grp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; color: var(--ink); text-decoration: none; }
.grp-head:hover { color: var(--ink); }
.tk {
    position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line2); border-radius: 18px;
    padding: 12px 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.tk:not(.tk-empty)::before, .tk:not(.tk-empty)::after {
    content: ""; position: absolute; top: 50%; margin-top: -10px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg);
}
.tk::before { left: -10px; } .tk::after { right: -10px; }
.tk-empty { border: 1px dashed var(--gold); padding: 12px 14px; }
.arch { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }

/* ---------- live ---------- */
.stage {
    background: var(--surface); border: 1px solid var(--line2); border-radius: 24px; padding: 16px 16px 18px;
    display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.stage-title { margin: 0; font-size: 16px; }
.stage-text { font-size: 13px; }
.onair {
    display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 16px; flex-shrink: 0;
    background: var(--bubble); color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .04em;
}
.onair .dot { display: none; }
.onair.is-live { background: rgba(255,122,107,.14); color: var(--coral-ink); }
.onair.is-live .dot { display: block; width: 8px; height: 8px; }
.drum-wrap {
    position: relative; width: 110px; height: 110px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line2);
    display: flex; align-items: center; justify-content: center;
}
.drum { position: absolute; left: 0; top: 0; width: 106px; height: 106px; display: none; }
.drum.show { display: block; }
.drum.spin { animation: spin .7s linear infinite; }
.drum span { position: absolute; width: 14px; height: 14px; border-radius: 50%; }
.stage-ball {
    width: 94px; height: 94px; border-radius: 50%; background: var(--gold); color: var(--navy);
    display: flex; align-items: center; justify-content: center; font-family: Unbounded, sans-serif; font-weight: 700; font-size: 36px;
    box-shadow: inset 0 -8px 0 rgba(0,0,0,.18), inset 0 6px 0 rgba(255,255,255,.25); animation: rollin .75s var(--ease) both;
}
.ringspin { position: absolute; inset: -10px; border-radius: 50%; border: 2px dashed var(--line3); animation: spin 14s linear infinite; }
.live-slots .slot.filled { font-size: 16px; }
.slot.drop { animation: drop .7s ease-out both; }
.slot.next { animation: slotpulse 1.4s ease-in-out infinite; }
.stream { aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: var(--bg); }
.stream:has(> a) { aspect-ratio: auto; background: none; }
.stream iframe { width: 100%; height: 100%; border: 0; display: block; }
.fair { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-radius: 18px; background: var(--bg); font-size: 14px; color: var(--muted); }
.fair > span { flex: 1; }
.win-banner {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 18px;
    background: var(--mint); color: var(--navy); text-decoration: none;
}
.win-banner:hover { color: var(--navy); }
.win-title { font-weight: 800; font-size: 15px; }
.live-tk {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px;
    background: var(--card); border: 1px solid var(--line); border-radius: 16px; transition: border-color .4s;
}
.live-tk.hot { border-color: var(--gold); }
.hits { font-family: Unbounded, sans-serif; font-weight: 700; font-size: 22px; }

/* ---------- results ---------- */
.res-grid { display: flex; flex-direction: column; gap: 16px; }
.congrats {
    position: relative; isolation: isolate; overflow: hidden; background: var(--surface); border: 1px solid var(--line2); border-radius: 24px;
    padding: 24px 20px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
}
.congrats .balls { justify-content: center; margin-top: 4px; }
.congrats .btn { margin-top: 4px; }
.tw { position: absolute; z-index: -1; border-radius: 50%; animation: twinkle 2.4s ease-in-out infinite; }
.trophy {
    width: 76px; height: 76px; border-radius: 50%; background: var(--gold); color: var(--navy); display: flex; align-items: center; justify-content: center;
    animation: trophy .8s var(--ease) .2s both, halo 1.8s ease-out 1s 3;
}
.win-amount { font-family: Unbounded, sans-serif; font-weight: 700; font-size: 46px; line-height: 1; color: var(--gold); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.bi { animation: ballin .5s var(--ease) both; }
.b0 { animation-delay: .5s; } .b1 { animation-delay: .6s; } .b2 { animation-delay: .7s; } .b3 { animation-delay: .8s; } .b4 { animation-delay: .9s; }
.res-balls .ball { width: 44px; height: 44px; font-size: 14px; }
.bl { animation: ballin .6s var(--ease) both; }
.bl:nth-child(2) { animation-delay: .1s; } .bl:nth-child(3) { animation-delay: .2s; } .bl:nth-child(4) { animation-delay: .3s; } .bl:nth-child(5) { animation-delay: .4s; }
.tiers { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; font-size: 14px; }
.tiers > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 10px 16px; }
.tiers > div + div { border-top: 1px solid var(--line); }
.tiers-h { color: var(--muted); font-size: 12px; }
.tiers .mine { background: rgba(242,190,75,.08); }
.shield { width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; background: rgba(159,227,192,.14); color: var(--mint); display: flex; align-items: center; justify-content: center; }

/* ---------- verify ---------- */
.mono-box {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.55; color: var(--ink);
    background: var(--bg); border-radius: 14px; padding: 12px 14px; white-space: pre-wrap; word-break: break-all; overflow-x: auto;
}
.proto { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); align-items: baseline; }

/* ---------- login ---------- */
.login { width: 100%; max-width: 420px; margin: 24px auto 0; }
.input {
    height: 52px; width: 100%; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line2); background: var(--card);
    color: var(--ink); font-size: 16px;
}
.input:focus { outline: none; border-color: var(--gold); }
.input[aria-invalid="true"] { border-color: var(--coral); }

/* =================== desktop (D-* mockups) =================== */
@media (min-width: 900px) {
    body { padding-bottom: 0; }
    .top { height: 76px; padding: 0 64px; border-bottom: 1px solid var(--line-top); }
    .logo-ball { width: 34px; height: 34px; font-size: 15px; }
    .logo-text { font-size: 18px; }
    .wrap { padding: 32px 64px 40px; gap: 24px; }
    .h1 { font-size: 32px; }
    .h2 { font-size: 18px; }
    .in { animation-duration: .6s; }

    .badge { width: 40px; height: 40px; border-radius: 12px; font-size: 13px; }
    .badge-sm { width: 28px; height: 28px; border-radius: 8px; font-size: 10px; }
    .badge-28 { width: 32px; height: 32px; border-radius: 9px; font-size: 11px; }
    .chip { height: 26px; padding: 0 10px; border-radius: 13px; font-size: 12px; }
    .dot { width: 8px; height: 8px; }
    .side-box { border-radius: 24px; padding: 24px; }
    .ball { width: 40px; height: 40px; }
    .ball-sm { width: 38px; height: 38px; font-size: 13px; }

    .grid-8-4 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: start; }
    .grid-8-4 > :first-child { grid-column: span 8; }
    .grid-8-4 > :nth-child(2) { grid-column: span 4; }

    /* hub */
    .hub-head { display: flex; flex-direction: column; gap: 6px; }
    .hub-head p { margin: 0; font-size: 15px; }
    .filters { margin: 0; padding: 0; overflow: visible; }
    .fchip { height: 44px; padding: 0 18px; border-radius: 22px; font-size: 14px; }
    .draw-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
    .card { gap: 16px; padding: 22px; border-radius: 24px; }
    .card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0,0,0,.35); }
    .live-card { animation: up .6s var(--ease) both, ring 2.2s 1s infinite; }
    .card-title { font-size: 17px; }
    .card-prize { font-size: 30px; }
    .card-when { font-size: 16px; }
    .card-foot { padding-top: 14px; font-size: 13px; }
    .card .t11 { font-size: 12px; }
    .card .t12 { font-size: 13px; }

    /* draw */
    .hero { border-radius: 28px; padding: 40px 44px; gap: 26px; min-height: 440px; }
    .hero-sub { font-size: 17px; }
    .hero-prize { font-size: 84px; line-height: 1; max-width: 520px; }
    .hero-prize-box { max-width: 520px; }
    .hero-prize-box .t13 { font-size: 15px; }
    .cd { display: flex; gap: 10px; }
    .cd > div { width: 92px; border-radius: 16px; padding: 12px 0; }
    .cd b { font-size: 30px; }
    .cd span { font-size: 12px; }
    .hero-actions { flex-direction: row; align-items: center; }
    .hero-actions .btn { height: 56px; padding: 0 32px; }
    .hero-actions .btn-ghost { padding: 0 24px; }
    .hero .bar { max-width: 420px; }
    .hero .row-between.muted.t12 { max-width: 420px; }
    .rows { background: var(--card); border-radius: 24px; padding: 8px 24px; }
    .rows > div { padding: 10px 0; font-size: 15px; }
    .prev { flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 28px; }
    .prev-l { flex-direction: row; align-items: center; gap: 28px; }

    /* pick */
    .overlay { align-items: center; }
    .sheet { border-radius: 28px; border: 1px solid var(--line2); padding: 32px; }

    /* live */
    .stage { border-radius: 28px; padding: 32px 40px 36px; gap: 28px; min-height: 720px; }
    .stage-title { font-size: 26px; }
    .stage .muted.t12 { font-size: 14px; }
    .onair { height: 36px; padding: 0 14px; border-radius: 18px; font-size: 13px; }
    .onair.is-live .dot { width: 9px; height: 9px; }
    .stage-text { font-size: 16px; margin-top: 12px; }
    .drum-wrap { width: 260px; height: 260px; }
    .drum { left: 77px; top: 77px; }
    .stage-ball { width: 220px; height: 220px; font-size: 88px; box-shadow: inset 0 -16px 0 rgba(0,0,0,.18), inset 0 12px 0 rgba(255,255,255,.25); animation-duration: .8s; }
    .live-slots { display: flex; justify-content: center; gap: 18px; }
    .live-slots .slot { width: 92px; height: 92px; font-size: 16px; }
    .live-slots .slot.filled { font-size: 30px; box-shadow: inset 0 -7px 0 rgba(0,0,0,.18); }
    .win-banner { padding: 20px 22px; border-radius: 22px; }
    .win-title { font-family: Unbounded, sans-serif; font-weight: 700; font-size: 20px; }
    .live .side-box .live-tk { background: var(--surface); border-color: var(--line2); padding: 14px 16px; }
    .live .side-box .live-tk.hot { border-color: var(--gold); }
    .hits { font-size: 24px; }

    /* results: 7 / 5 */
    .res-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: start; }
    .res-main { grid-column: 1 / span 7; grid-row: 1; }
    .res-side { grid-column: 8 / span 5; grid-row: 1; }
    .res-card { background: var(--surface); border: 1px solid var(--line2); border-radius: 28px; padding: 32px 36px; }
    .res-balls { display: flex; gap: 14px; }
    .res-balls .ball {
        width: 84px; height: 84px; font-size: 28px;
        box-shadow: inset 0 -7px 0 rgba(0,0,0,.18), inset 0 6px 0 rgba(255,255,255,.22);
    }
    .tiers { border-color: var(--line2); }
    .tiers > div { padding: 11px 20px; font-size: 15px; }
    .tiers > div + div { border-color: var(--line2); }
    .tiers-h { background: var(--card); font-size: 13px !important; }
    .res-card .tiers { background: transparent; }
    .congrats { border-radius: 28px; padding: 32px 28px 28px; }

    .login { margin-top: 64px; }
    .panel { padding: 28px; border-radius: 24px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (min-width: 900px) {
    .hero-balls { position: absolute; inset: 0; z-index: -1; }
    .hero-meta { justify-content: flex-start; gap: 12px; }
}
.live [data-win]:not(:has(a)) { display: none; }
