:root {
  --bg: #07080b;
  --gold: #e8c26b;
  --gold-2: #b8862e;
  --gold-grad: linear-gradient(135deg, #f7e08f 0%, #c8963a 45%, #f1d27a 70%, #a87628 100%);
  --red: #c4161c;
  --black: #141418;
  --green: #0b7a3b;
  --text: #f3efe6;
  --muted: #9a9486;
  --serif: Didot, "Bodoni 72", "Playfair Display", Georgia, serif;
  --sans: -apple-system, "SF Pro Text", "Avenir Next", system-ui, "Segoe UI", Roboto, sans-serif;
  --cond: "Avenir Next Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --st: env(safe-area-inset-top, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: var(--bg); color: var(--text); font-family: var(--sans); overflow: hidden; overscroll-behavior: none; }
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
button, a { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; text-decoration: none; touch-action: manipulation; }
img { -webkit-user-drag: none; pointer-events: none; }

#app { position: fixed; inset: 0; max-width: 520px; margin: 0 auto; overflow: hidden; background: var(--bg); }

.scene { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility 0s linear .6s; display: flex; flex-direction: column; }
.scene.active { opacity: 1; visibility: visible; transition: opacity .6s ease, visibility 0s; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 14px; padding: 14px 22px; font-weight: 700; letter-spacing: .02em; transition: transform .12s ease, filter .2s; }
.btn:active { transform: scale(.96); }
.btn-gold { background: var(--gold-grad); color: #2a1c05; box-shadow: 0 6px 24px rgba(232, 194, 107, .35), inset 0 1px 0 rgba(255,255,255,.6); text-shadow: 0 1px 0 rgba(255,255,255,.35); }
.btn-ghost { color: var(--muted); border: 1px solid rgba(255,255,255,.14); }
.btn-big { width: 100%; padding: 18px 22px; font-size: 18px; border-radius: 16px; }
.btn-tiny { font-size: 13px; color: var(--muted); padding: 10px; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- toast ---------- */
.toast { position: absolute; left: 50%; top: calc(var(--st) + 64px); transform: translate(-50%, -20px); width: max-content; max-width: 88%; padding: 12px 16px; border-radius: 14px; background: rgba(20, 20, 24, .94); border: 1px solid rgba(232,194,107,.4); font-size: 14px; line-height: 1.35; text-align: center; opacity: 0; pointer-events: none; transition: all .35s cubic-bezier(.2,.9,.3,1.2); z-index: 60; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

#fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; }

/* =========================================================
   0. SPLASH
   ========================================================= */
#s-splash { align-items: center; justify-content: center; background: radial-gradient(120% 70% at 50% 0%, #3a0d12 0%, #12060a 45%, #050507 100%); }
.splash-glow { position: absolute; inset: -20%; background: radial-gradient(40% 30% at 50% 45%, rgba(232,194,107,.18), transparent 70%); animation: breathe 4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .5; transform: scale(1.08); } }
.splash-inner { position: relative; width: 100%; padding: calc(var(--st) + 20px) 28px calc(var(--sb) + 20px); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; }
.brand-crown { font-size: 28px; color: var(--gold); line-height: 1; text-shadow: 0 0 20px rgba(232,194,107,.6); }
.brand h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(30px, 9vw, 40px); line-height: 1.02; letter-spacing: .06em; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-top: 6px; }
.brand h1 b { display: block; font-size: 2.4em; line-height: .95; letter-spacing: 0; }
.brand h1 span { display: block; letter-spacing: .42em; margin-right: -.42em; font-size: .8em; }
.brand-sub { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
.splash-chip { width: 120px; height: 120px; filter: drop-shadow(0 14px 24px rgba(0,0,0,.6)); animation: chipFloat 3.4s ease-in-out infinite; }
@keyframes chipFloat { 0%,100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-10px) rotate(8deg); } }
.invite { display: flex; flex-direction: column; gap: 4px; }
.invite small { font-size: 11px; letter-spacing: .25em; text-transform: uppercase; color: var(--muted); }
.invite b { font-family: var(--serif); font-size: 34px; color: var(--text); }
.invite span { font-size: 14px; color: var(--gold); }
.age { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.age p { font-size: 15px; line-height: 1.4; color: #d8d2c4; margin-bottom: 4px; }
.age .btn { width: 100%; font-size: 17px; }
.sound-hint { font-size: 12px; color: var(--muted); }
.connecting { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; background: #050507; opacity: 0; visibility: hidden; transition: opacity .4s; }
.connecting.show { opacity: 1; visibility: visible; }
.connecting p { font-size: 15px; color: var(--muted); letter-spacing: .02em; }
.spin-chip { width: 70px; height: 70px; animation: spinY 1.1s linear infinite; }
@keyframes spinY { to { transform: rotateY(360deg); } }

/* =========================================================
   1. ROULETTE
   ========================================================= */
#s-roulette { background: #0a0708; }
.topbar { position: relative; z-index: 5; flex: none; display: flex; align-items: center; gap: 10px; padding: calc(var(--st) + 8px) 14px 8px; background: linear-gradient(#000 0%, rgba(0,0,0,.6) 100%); }
.live { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 6px; background: #e0182a; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.table-name { flex: 1; font-size: 13px; font-weight: 600; color: #d8d2c4; letter-spacing: .02em; }
.table-name em { color: var(--gold); font-style: normal; }
.mute { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.08); font-size: 16px; }

.stage { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.backdrop { position: absolute; inset: 0; background:
  radial-gradient(60% 45% at 50% 30%, rgba(255,190,120,.16), transparent 70%),
  repeating-linear-gradient(90deg, rgba(0,0,0,.18) 0 2px, transparent 2px 26px),
  linear-gradient(180deg, #3a0c12 0%, #24070b 55%, #120406 100%); }
.backdrop::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 18%; background: linear-gradient(#000, transparent); }
.backdrop i { position: absolute; border-radius: 50%; background: radial-gradient(circle, rgba(255,214,140,.55), transparent 65%); filter: blur(2px); animation: bokeh 6s ease-in-out infinite; }
.backdrop i:nth-child(1) { width: 60px; height: 60px; left: 6%; top: 14%; }
.backdrop i:nth-child(2) { width: 34px; height: 34px; left: 82%; top: 10%; animation-delay: -2s; }
.backdrop i:nth-child(3) { width: 80px; height: 80px; left: 72%; top: 30%; opacity: .5; animation-delay: -4s; }
.backdrop i:nth-child(4) { width: 26px; height: 26px; left: 22%; top: 36%; animation-delay: -1s; }
.backdrop i:nth-child(5) { width: 44px; height: 44px; left: 90%; top: 52%; animation-delay: -3s; }
.backdrop i:nth-child(6) { width: 30px; height: 30px; left: 4%; top: 58%; animation-delay: -5s; }
@keyframes bokeh { 50% { opacity: .35; transform: scale(1.2); } }

.history { position: absolute; top: 8px; right: 10px; z-index: 4; display: flex; gap: 4px; }
.history span { min-width: 24px; height: 24px; padding: 0 4px; border-radius: 6px; display: grid; place-items: center; font-size: 12px; font-weight: 800; border: 1px solid rgba(255,255,255,.12); }
.history span.r { background: var(--red); }
.history span.b { background: #1b1b20; }
.history span.g { background: var(--green); }
.history span.new { animation: pop .5s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { from { transform: scale(0); } }

.croupier { position: absolute; left: 50%; top: 3%; height: 57%; aspect-ratio: 200 / 262; transform: translateX(-50%); z-index: 1; animation: idle 3.6s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes idle { 50% { transform: translateX(-50%) translateY(2px) rotate(.6deg); } }
.croupier.throw { animation: throw .7s ease; }
@keyframes throw { 30% { transform: translateX(-50%) rotate(-5deg) translateY(4px); } 70% { transform: translateX(-50%) rotate(3deg); } }
.cr-head { position: absolute; left: 28%; top: 13%; width: 44%; z-index: 3; filter: drop-shadow(0 4px 6px rgba(0,0,0,.4)); }
.cr-body { position: absolute; left: 0; bottom: 0; width: 100%; height: 65%; z-index: 2; filter: drop-shadow(0 6px 10px rgba(0,0,0,.5)); }
.nametag { position: absolute; left: 50%; bottom: 6%; transform: translateX(-50%); z-index: 4; white-space: nowrap; font-size: 10px; font-weight: 700; letter-spacing: .06em; padding: 3px 8px; border-radius: 20px; background: rgba(0,0,0,.65); color: var(--gold); border: 1px solid rgba(232,194,107,.4); }

.bubble { position: absolute; z-index: 6; left: 50%; top: 3%; width: min(78%, 330px); transform: translate(-50%, -10px) scale(.9); padding: 11px 14px; border-radius: 16px; background: #fffaf0; color: #1b1308; font-size: 14px; line-height: 1.32; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.45); opacity: 0; pointer-events: none; transition: all .3s cubic-bezier(.2,1.3,.4,1); }
.bubble::after { content: ""; position: absolute; left: 50%; bottom: -8px; border: 9px solid transparent; border-bottom: 0; border-top-color: #fffaf0; transform: translateX(-50%); }
.bubble.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.bubble b { color: var(--red); }

#wheel { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; height: 50%; z-index: 2; }

.nikita { position: absolute; right: -13%; bottom: -2%; height: 43%; aspect-ratio: 600 / 467; z-index: 3; transform-origin: 50% 100%; transition: filter .4s; }
.nikita img { width: 100%; height: 100%; object-fit: contain; object-position: bottom; filter: drop-shadow(0 6px 12px rgba(0,0,0,.6)); }
.nikita.bbq { aspect-ratio: 400 / 544; right: 1%; }
.nikita.shake { animation: shake .5s ease infinite; }
.nikita.dead img { filter: grayscale(1) brightness(.75) drop-shadow(0 6px 12px rgba(0,0,0,.6)); }
.nikita.jump { animation: jump .6s cubic-bezier(.3,1.6,.5,1) 2; }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-4px) rotate(-1.5deg); } 75% { transform: translateX(4px) rotate(1.5deg); } }
@keyframes jump { 40% { transform: translateY(-14%) scale(1.04); } }
.nik-tag { position: absolute; right: 19%; bottom: 6%; font-size: 10px; font-weight: 800; letter-spacing: .08em; padding: 3px 8px; border-radius: 20px; background: rgba(0,0,0,.7); border: 1px solid rgba(232,194,107,.5); white-space: nowrap; }
.nik-tag i { font-style: normal; color: #111; background: var(--gold-grad); padding: 0 4px; border-radius: 4px; margin-left: 2px; }
.nik-emote { position: absolute; right: 52%; top: -4%; font-size: 30px; opacity: 0; transform: scale(.4); transition: all .3s cubic-bezier(.2,1.6,.4,1); white-space: nowrap; font-weight: 900; }
.nik-emote.show { opacity: 1; transform: scale(1) rotate(-8deg); }
.nik-emote .sticker { display: inline-block; font-family: var(--cond); font-size: 20px; padding: 4px 10px; background: #ffd23f; color: #1b1308; border-radius: 8px; box-shadow: 0 4px 0 #b88a00; }

.chat { position: absolute; left: 8px; bottom: 47%; z-index: 4; width: 36%; display: flex; flex-direction: column; gap: 4px; pointer-events: none; }
.chat p { font-size: 11px; line-height: 1.3; padding: 4px 8px; border-radius: 9px; background: rgba(0,0,0,.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: chatIn .35s ease; align-self: flex-start; max-width: 100%; transition: opacity .6s; }
.chat p b { color: var(--gold); font-weight: 700; margin-right: 4px; }
.chat p.old { opacity: .45; }
@keyframes chatIn { from { opacity: 0; transform: translateY(8px); } }

.result { position: absolute; left: 50%; top: 40%; z-index: 7; transform: translate(-50%, -50%) scale(.5); display: flex; flex-direction: column; align-items: center; gap: 6px; opacity: 0; pointer-events: none; transition: all .35s cubic-bezier(.2,1.5,.4,1); }
.result.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.result > b { width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; font-family: var(--cond); font-size: 46px; font-weight: 800; border: 4px solid var(--gold); box-shadow: 0 0 40px rgba(232,194,107,.6); }
.result > b.r { background: radial-gradient(circle at 40% 35%, #ff3d45, #9c0d14); }
.result > b.b { background: radial-gradient(circle at 40% 35%, #3a3a42, #0b0b0d); }
.result > b.g { background: radial-gradient(circle at 40% 35%, #20b25e, #075226); }
.result span { max-width: 300px; text-align: center; font-size: 15px; font-weight: 700; padding: 8px 14px; border-radius: 12px; background: rgba(0,0,0,.78); line-height: 1.3; }
.result span:empty { display: none; }

.viewers { position: absolute; left: 10px; top: 8px; z-index: 4; font-size: 11px; color: #d8d2c4; padding: 3px 8px; border-radius: 6px; background: rgba(0,0,0,.45); }
.viewers small { color: var(--muted); font-size: 10px; }

/* felt */
.felt { position: relative; flex: none; padding: 10px 12px 12px; background:
  radial-gradient(120% 140% at 50% 0%, #17804a 0%, #0e5c33 55%, #093d22 100%); border-top: 6px solid #3b1d0c; box-shadow: inset 0 8px 18px rgba(0,0,0,.45); }
.felt::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.035) 1px, transparent 1px); background-size: 3px 3px; pointer-events: none; }
.felt-rule { position: relative; text-align: center; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.55); margin-bottom: 8px; }
.row-small { position: relative; display: grid; grid-template-columns: .7fr 1fr 1fr 1fr 1fr; gap: 5px; margin-bottom: 6px; }
.cell { height: 34px; border-radius: 6px; border: 1.5px solid rgba(255,255,255,.45); font-family: var(--cond); font-weight: 700; font-size: 13px; letter-spacing: .05em; color: rgba(255,255,255,.8); }
.cell.zero { background: rgba(11,122,59,.7); }
.cell.dim { opacity: .5; }
.cell.nope { animation: shake .4s ease; opacity: .9; border-color: #ff6b6b; }
.row-big { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bet { position: relative; height: clamp(74px, 11vh, 96px); border-radius: 10px; border: 2px solid rgba(255,255,255,.6); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; transition: transform .15s, box-shadow .3s, border-color .3s; overflow: visible; }
.bet:active { transform: scale(.97); }
.bet b { font-family: var(--cond); font-size: 20px; font-weight: 800; letter-spacing: .08em; }
.bet em { font-style: normal; font-size: 11px; color: rgba(255,255,255,.7); }
.bet-diamond { width: 22px; height: 22px; transform: rotate(45deg); border-radius: 3px; border: 2px solid rgba(255,255,255,.8); }
.bet-red .bet-diamond { background: var(--red); }
.bet-black .bet-diamond { background: #111; }
.bet-red { background: linear-gradient(180deg, rgba(214,26,34,.92), rgba(150,14,20,.92)); }
.bet-black { background: linear-gradient(180deg, rgba(30,30,36,.95), rgba(8,8,10,.95)); }
.bet.armed { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(232,194,107,.5), 0 0 24px rgba(232,194,107,.45); }
.bet.won { animation: winFlash .5s ease 4; }
@keyframes winFlash { 50% { box-shadow: 0 0 0 4px #fff, 0 0 40px #fff; } }
.felt.locked .bet, .felt.locked .cell { pointer-events: none; }
.bet .stack { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 34px; height: 50px; }
.bet .stack svg { width: 34px; height: 34px; }
.bet .stack svg, .tray svg { position: absolute; left: 0; width: 44px; height: 44px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.5)); }

/* hud */
.hud { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 12px calc(var(--sb) + 10px); background: linear-gradient(180deg, #120c08, #070505); border-top: 1px solid rgba(232,194,107,.2); }
.money { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; }
.tray { position: relative; width: 44px; height: 54px; flex: none; }
.money-col { display: flex; flex-direction: column; line-height: 1.1; }
.money-col small { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.money-col b { font-family: var(--cond); font-size: 24px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.money-col b.bump { animation: bump .5s ease; }
@keyframes bump { 40% { transform: scale(1.25); color: #fff; } }
.spin { flex: none; height: 56px; padding: 0 22px; border-radius: 28px; font-family: var(--cond); font-size: 19px; font-weight: 800; letter-spacing: .1em; background: var(--gold-grad); color: #2a1c05; box-shadow: 0 6px 20px rgba(232,194,107,.35); transition: opacity .3s, transform .12s, filter .3s; }
.spin:disabled { filter: grayscale(1) brightness(.45); box-shadow: none; }
.spin:not(:disabled) { animation: pulse 1.4s ease-in-out infinite; }
.spin:active { transform: scale(.95); }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(232,194,107,.18), 0 6px 26px rgba(232,194,107,.55); } }

/* cashout overlay */
.cashout { position: absolute; left: 0; right: 0; bottom: 0; z-index: 20; padding: 0 12px calc(var(--sb) + 12px); transform: translateY(105%); transition: transform .6s cubic-bezier(.2,1,.3,1); }
.cashout.show { transform: translateY(0); }
.cashout-card { position: relative; border-radius: 22px; padding: 18px 16px 8px; background: linear-gradient(180deg, rgba(30,22,10,.97), rgba(10,8,6,.98)); border: 1px solid rgba(232,194,107,.45); box-shadow: 0 -10px 50px rgba(0,0,0,.7); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.cashout-win { font-family: var(--cond); font-weight: 800; font-size: 18px; letter-spacing: .2em; color: var(--muted); }
.cashout-win b { display: block; text-align: center; font-size: 54px; letter-spacing: .02em; line-height: 1; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cashout-quote { display: flex; gap: 10px; align-items: center; background: #fffaf0; color: #1b1308; border-radius: 16px; padding: 10px 12px; }
.cashout-quote img { width: 44px; height: 54px; object-fit: cover; object-position: top; border-radius: 10px; flex: none; }
.cashout-quote p { font-size: 15px; line-height: 1.3; font-weight: 600; }
.cashout-quote b { color: var(--red); }
#btn-more { transition: transform .35s cubic-bezier(.2,1.5,.4,1), opacity .3s; }

/* =========================================================
   2. CASHIER
   ========================================================= */
#s-cashier { align-items: center; justify-content: flex-start; padding: calc(var(--st) + 16px) 16px calc(var(--sb) + 16px); background: radial-gradient(100% 60% at 50% 0%, #1d1a12, #070707 70%); overflow-y: auto; }
.cashier { width: 100%; margin: auto 0; border-radius: 22px; padding: 20px 18px; background: #111114; border: 1px solid rgba(255,255,255,.08); box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.cashier-head { display: flex; align-items: baseline; gap: 8px; }
.cashier-head span { font-family: var(--cond); font-weight: 800; letter-spacing: .2em; color: var(--gold); }
.cashier-head em { font-style: normal; font-size: 13px; color: var(--muted); }
.cashier-amount { font-family: var(--cond); font-weight: 800; font-size: 46px; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.cashier-to { font-size: 13px; color: var(--muted); line-height: 1.5; padding-bottom: 14px; border-bottom: 1px dashed rgba(255,255,255,.12); }
.cashier-to b { color: var(--text); }
.checks { list-style: none; display: flex; flex-direction: column; gap: 12px; padding: 16px 0 6px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; animation: chatIn .35s ease; }
.checks li i { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 13px; font-weight: 900; border: 2px solid rgba(255,255,255,.18); }
.checks li.pending i { border-top-color: var(--gold); animation: rot .8s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
.checks li.ok i { background: #1f9d55; border-color: #1f9d55; }
.checks li.warn i { background: #e0a100; border-color: #e0a100; color: #111; }
.checks li.fail i { background: #d6222c; border-color: #d6222c; }
.checks li div { display: flex; flex-direction: column; gap: 2px; }
.checks li b { font-size: 15px; font-weight: 600; }
.checks li span { font-size: 13px; color: var(--muted); line-height: 1.35; }
.checks li.warn span { color: #ffc940; }
.checks li.fail span { color: #ff6b6b; }
.sb { display: none; gap: 12px; align-items: center; margin: 8px 0; padding: 10px; border-radius: 14px; background: #1a1a1f; border: 1px solid rgba(255,255,255,.06); }
.sb.show { display: flex; animation: chatIn .4s ease; }
.sb img { width: 64px; height: 86px; object-fit: cover; object-position: top; border-radius: 10px; background: #0b0b0d; flex: none; }
.sb b { display: block; font-size: 13px; color: var(--gold); letter-spacing: .04em; margin-bottom: 3px; }
.sb span { font-size: 13px; color: #cfc9bb; line-height: 1.35; }
.verdict { display: none; flex-direction: column; gap: 12px; margin-top: 14px; }
.verdict.show { display: flex; }
.verdict-no, .verdict-yes { border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; animation: pop .45s cubic-bezier(.2,1.5,.4,1) both; }
.verdict-no { background: rgba(214,34,44,.14); border: 1px solid rgba(214,34,44,.6); }
.verdict-no b { color: #ff5a63; font-family: var(--cond); font-size: 19px; letter-spacing: .04em; }
.verdict-yes { background: rgba(232,194,107,.1); border: 1px solid rgba(232,194,107,.5); animation-delay: 1.4s; }
.verdict-yes b { color: var(--gold); font-family: var(--cond); font-size: 17px; letter-spacing: .06em; text-transform: uppercase; }
.verdict span { font-size: 14px; line-height: 1.35; color: #e4ddcd; }
#btn-tocase { animation: pop .45s cubic-bezier(.2,1.5,.4,1) 2.4s both; }

/* =========================================================
   3. CASE
   ========================================================= */
#s-case { background: radial-gradient(100% 50% at 50% 0%, #1b2030, #0a0b0f 70%); }
.case-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: calc(var(--st) + 18px) 16px calc(var(--sb) + 24px); display: flex; flex-direction: column; align-items: center; gap: 16px; }
.case-header { text-align: center; }
.case-header small { font-size: 11px; letter-spacing: .3em; color: var(--muted); }
.case-header h2 { font-family: var(--cond); font-weight: 800; font-size: 30px; letter-spacing: .06em; margin: 2px 0; }
.case-header p { font-size: 13px; color: var(--muted); }
.case-header p b { color: var(--gold); }
.case-visual { width: 86%; max-width: 340px; animation: caseFloat 3s ease-in-out infinite; }
.case-visual.shake { animation: caseShake .12s linear infinite; }
.case-visual.gone { animation: caseGone .45s ease forwards; }
@keyframes caseFloat { 50% { transform: translateY(-8px); } }
@keyframes caseShake { 25% { transform: translate(-3px, 1px) rotate(-1deg); } 75% { transform: translate(3px, -1px) rotate(1deg); } }
@keyframes caseGone { to { transform: scale(1.4); opacity: 0; filter: brightness(3); } }
.case-svg { width: 100%; display: block; filter: drop-shadow(0 0 30px rgba(232,194,107,.25)); }

.roller-wrap { position: relative; width: calc(100% + 32px); margin: 0 -16px; display: none; }
.roller-wrap.show { display: block; animation: chatIn .4s ease; }
.roller { position: relative; height: 150px; overflow: hidden; background: linear-gradient(180deg, #11131a, #0b0c10); border-top: 1px solid rgba(255,255,255,.08); border-bottom: 1px solid rgba(255,255,255,.08); -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); }
.strip { position: absolute; left: 0; top: 10px; display: flex; gap: 6px; will-change: transform; }
.marker { position: absolute; left: 50%; top: -6px; bottom: -6px; width: 3px; margin-left: -1.5px; background: #ffd23f; box-shadow: 0 0 12px #ffd23f; border-radius: 2px; z-index: 2; }
.marker::before, .marker::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); border: 8px solid transparent; }
.marker::before { top: 0; border-top-color: #ffd23f; }
.marker::after { bottom: 0; border-bottom-color: #ffd23f; }

.item { --rc: #4b69ff; position: relative; flex: none; width: 112px; height: 130px; border-radius: 6px; overflow: hidden; background: radial-gradient(120% 80% at 50% 100%, color-mix(in srgb, var(--rc) 45%, transparent), transparent 70%), linear-gradient(180deg, #23262f, #191b22); border-bottom: 4px solid var(--rc); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px 6px; text-align: center; gap: 6px; }
.item .ico { font-size: 42px; line-height: 1; filter: drop-shadow(0 4px 6px rgba(0,0,0,.5)); }
.item .nm { font-size: 10.5px; line-height: 1.2; color: #e9e6df; font-weight: 600; }
.item.r-blue { --rc: #4b69ff; } .item.r-grey { --rc: #8a96a8; } .item.r-purple { --rc: #8847ff; } .item.r-pink { --rc: #d32ce6; } .item.r-red { --rc: #eb4b4b; } .item.r-gold { --rc: #ffcc33; }
.item.gta { background: linear-gradient(160deg, #ff6fb1 0%, #ff9a5a 40%, #7b3cf0 100%); border-bottom-color: #ffcc33; }
.item.gta .ico { font-family: var(--cond); font-weight: 900; font-size: 44px; color: #fff; text-shadow: 2px 2px 0 #1a0b2e, 0 0 18px rgba(255,255,255,.5); letter-spacing: -.02em; }
.item.gta .nm { color: #fff; font-weight: 800; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.item.win { box-shadow: inset 0 0 0 2px #fff, 0 0 30px var(--rc); }

.drop { min-height: 0; width: 100%; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.drop .d-label { font-size: 11px; letter-spacing: .25em; text-transform: uppercase; color: var(--muted); }
.drop .d-name { font-family: var(--cond); font-weight: 800; font-size: 22px; line-height: 1.15; }
.drop .d-rar { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.drop .d-note { font-size: 14px; color: #cfc9bb; }
.drop.junk .d-rar { background: rgba(138,150,168,.2); color: #b0bccb; }
.drop.gold .d-name { font-size: 28px; background: linear-gradient(90deg, #ff6fb1, #ffb36b, #ffd23f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.drop.gold .d-rar { background: #ffcc33; color: #2a1c05; }
.drop > * { animation: pop .4s cubic-bezier(.2,1.5,.4,1) both; }

.case-contents { width: 100%; }
.case-contents h3 { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 10px; text-align: center; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.grid .item { width: auto; height: 104px; }
.grid .item .ico { font-size: 32px; }
.grid .item .nm { font-size: 10px; }
.grid .item.gta .ico { font-size: 34px; }

.shake-screen { animation: screenShake .5s ease; }
@keyframes screenShake { 20% { transform: translate(-6px, 3px); } 40% { transform: translate(5px, -4px); } 60% { transform: translate(-4px, 2px); } 80% { transform: translate(3px, -1px); } }

/* =========================================================
   4. FINALE
   ========================================================= */
#s-final { background: radial-gradient(120% 60% at 50% 0%, #3b1240 0%, #160a1c 45%, #07060a 100%); }
.final-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: calc(var(--st) + 22px) 18px calc(var(--sb) + 30px); display: flex; flex-direction: column; align-items: center; gap: 22px; }
.final-hero { position: relative; text-align: center; padding-top: 8px; }
.final-24 { font-family: var(--cond); font-weight: 900; font-size: 150px; line-height: .85; background: linear-gradient(180deg, #fff3c4, #e8c26b 40%, #a87628); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 30px rgba(232,194,107,.45)); animation: pop .8s cubic-bezier(.2,1.5,.4,1) both; }
.final-hero h1 { font-family: var(--cond); font-weight: 900; font-size: 40px; line-height: 1; letter-spacing: .02em; margin-top: 6px; animation: pop .8s cubic-bezier(.2,1.5,.4,1) .25s both; }
.final-hero h1 span { background: linear-gradient(90deg, #ff6fb1, #ffb36b, #ffd23f); -webkit-background-clip: text; background-clip: text; color: transparent; }

.poster { position: relative; width: 100%; aspect-ratio: 4 / 5; border-radius: 20px; overflow: hidden; background: linear-gradient(180deg, #3d1b6e 0%, #c2307a 45%, #ff8a4c 72%, #ffcf6b 100%); box-shadow: 0 20px 60px rgba(194,48,122,.35); animation: pop .8s cubic-bezier(.2,1.3,.4,1) .5s both; }
.poster-sun { position: absolute; left: 50%; top: 30%; width: 70%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%; background: linear-gradient(180deg, #fff1a8, #ff9a5a 55%, #ff4f8b); --sun-mask: linear-gradient(180deg, #000 0 55%, transparent 55% 58%, #000 58% 66%, transparent 66% 70%, #000 70% 77%, transparent 77% 82%, #000 82% 87%, transparent 87% 93%, #000 93%); -webkit-mask-image: var(--sun-mask); mask-image: var(--sun-mask); opacity: .95; }
.poster-palms { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 75%; }
.poster-nik { position: absolute; left: 50%; bottom: 0; width: 108%; transform: translateX(-50%); filter: saturate(1.15) contrast(1.08) drop-shadow(0 0 2px #fff) drop-shadow(0 0 14px rgba(255,111,177,.8)); }
.poster-title { position: absolute; left: 0; right: 0; top: 5%; display: flex; flex-direction: column; align-items: center; text-align: center; }
.pt-small { font-family: var(--cond); font-weight: 800; font-size: 14px; letter-spacing: .35em; color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,.4); }
.pt-vi { font-family: var(--cond); font-weight: 900; font-size: 92px; line-height: .9; letter-spacing: -.02em; background: linear-gradient(180deg, #fff 0%, #ffe0f0 40%, #ff6fb1 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(3px 3px 0 #1a0b2e); }
.pt-ed { font-family: var(--cond); font-weight: 800; font-size: 13px; letter-spacing: .3em; padding: 4px 10px; background: #1a0b2e; color: #ffd23f; border-radius: 4px; margin-top: 4px; }

.cert { position: relative; width: 100%; border-radius: 18px; padding: 18px 18px 16px; background: linear-gradient(160deg, #1c1810, #0d0b08); border: 1.5px solid rgba(232,194,107,.6); box-shadow: inset 0 0 0 5px #0d0b08, inset 0 0 0 6px rgba(232,194,107,.3); overflow: hidden; }
.cert-top { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: .25em; color: var(--gold); }
.cert-top em { font-style: normal; color: var(--muted); letter-spacing: .1em; }
.cert h2 { font-family: var(--serif); font-size: 28px; font-weight: 700; margin: 10px 0 12px; }
.cert h2 b { background: linear-gradient(90deg, #ff6fb1, #ffb36b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cert ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.cert li { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding-bottom: 8px; border-bottom: 1px dashed rgba(232,194,107,.18); }
.cert li span { color: var(--muted); }
.countdown { margin-top: 14px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; }
.countdown div { background: rgba(232,194,107,.08); border-radius: 10px; padding: 8px 2px; }
.countdown b { display: block; font-family: var(--cond); font-weight: 800; font-size: 24px; color: var(--gold); font-variant-numeric: tabular-nums; }
.countdown small { font-size: 10px; color: var(--muted); letter-spacing: .08em; }
.countdown-cap { grid-column: 1 / -1; font-size: 11px; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }
.stamp { position: relative; width: fit-content; margin: 14px auto 0; transform: rotate(-5deg); border: 2.5px solid rgba(230,40,50,.75); color: rgba(230,40,50,.8); border-radius: 8px; padding: 4px 8px; font-family: var(--cond); font-weight: 900; font-size: 12px; letter-spacing: .12em; line-height: 1.2; text-align: center; }

.letter { width: 100%; font-size: 16px; line-height: 1.55; color: #ece6d8; background: rgba(255,255,255,.04); border-radius: 18px; padding: 18px; border: 1px solid rgba(255,255,255,.06); }
.letter p + p { margin-top: 12px; }
.letter .sign { margin-top: 16px; display: flex; align-items: center; gap: 10px; color: var(--gold); font-weight: 600; }
.letter .sign img { width: 40px; height: 48px; object-fit: cover; object-position: top; border-radius: 10px; }

.choice { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 4px; }
.btn-gta { width: 100%; padding: 22px; font-family: var(--cond); font-size: 24px; font-weight: 900; letter-spacing: .06em; border-radius: 18px; color: #fff; background: linear-gradient(120deg, #ff3e9a 0%, #ff8a4c 50%, #ffcf3f 100%); box-shadow: 0 10px 40px rgba(255,62,154,.5), inset 0 1px 0 rgba(255,255,255,.5); text-shadow: 0 2px 4px rgba(0,0,0,.25); animation: gtaPulse 1.6s ease-in-out infinite; }
@keyframes gtaPulse { 50% { transform: scale(1.03); box-shadow: 0 14px 60px rgba(255,62,154,.75), inset 0 1px 0 rgba(255,255,255,.5); } }
.btn-cash { font-size: 11.5px; color: #6f6a60; padding: 6px; display: inline-block; }
.replay { font-size: 12px; color: #5d5850; padding: 10px; margin-top: 6px; }

.modal { position: absolute; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(0,0,0,.75); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s; }
.modal.show { opacity: 1; visibility: visible; transition: opacity .3s; }
.modal-card { width: 100%; max-width: 360px; background: #15121a; border: 1px solid rgba(255,255,255,.1); border-radius: 22px; padding: 22px 18px 12px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.modal-card p { font-size: 15px; line-height: 1.45; color: #d8d2c4; }
.modal-card .modal-big { font-family: var(--cond); font-weight: 900; font-size: 30px; color: #fff; }
.modal-card .btn-gta { font-size: 20px; padding: 18px; }

@media (max-height: 700px) {
  .splash-inner { gap: 14px; }
  .splash-chip { width: 90px; height: 90px; }
  .invite b { font-size: 28px; }
  .cell { height: 28px; }
  .felt-rule { margin-bottom: 5px; }
  .felt { padding-top: 7px; padding-bottom: 8px; }
  .spin { height: 50px; }
}
.result span b { color: var(--gold); }
.final-scroll > *, .case-scroll > * { flex-shrink: 0; }
.case-scroll.rolling { justify-content: center; }
