@font-face {
  font-family: Inter;
  src: url("../assets/fonts/inter-variable-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #0c0818;
  --panel: rgba(20, 13, 38, 0.66);
  --panel-strong: rgba(24, 16, 44, 0.9);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f6f1ff;
  --muted: #a99dc6;
  --pink: #ff2d7a;
  --pink-soft: #ff6aa2;
  --teal: #2de2d0;
  --gold: #ffc64a;
  --coral: #ff6a4d;
  --violet: #8a5cff;
  --d0: #ffbf2e; --d1: #2f8cff; --d2: #ff2d6f; --d3: #18d6a8; --d4: #9a5cff;
  --radius: 22px;
  --blur: blur(18px) saturate(150%);
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px var(--line) inset;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); overflow: hidden; }
body {
  font: 500 15px/1.4 Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  font-feature-settings: "tnum" 1, "cv11" 1;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

.ui { position: fixed; inset: 0; pointer-events: none; z-index: 2; }
.ui > * { pointer-events: auto; }
.ui .caption, .ui .reveal { pointer-events: none; }

/* ---------- Brand / top ---------- */
.top {
  position: absolute; inset: 0 0 auto 0;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: calc(18px + var(--safe-t)) 22px 0; pointer-events: none;
}
.top > * { pointer-events: auto; }
.logo { font-weight: 850; letter-spacing: .06em; font-size: 22px; line-height: 1; display: inline-flex; gap: .18em; align-items: baseline; user-select: none; }
.logo span { color: #fff; }
.logo b {
  font-style: italic; font-weight: 900; color: var(--pink-soft);
  text-shadow: 0 0 6px rgba(255, 45, 122, .9), 0 0 22px rgba(255, 45, 122, .55);
  animation: neon 6s infinite;
}
.logo.big { font-size: clamp(54px, 12vw, 110px); }
@keyframes neon { 0%, 92%, 100% { opacity: 1 } 93% { opacity: .55 } 94% { opacity: 1 } 96% { opacity: .7 } }
.brand .sub { color: var(--muted); font-size: 12px; margin-top: 6px; letter-spacing: .04em; }

.top-right { display: flex; align-items: center; gap: 12px; }
.jackpot {
  display: flex; flex-direction: column; align-items: flex-end; padding: 8px 16px; border-radius: 16px;
  background: var(--panel); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--shadow);
}
.jackpot .lbl { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.jackpot .val { font-size: 20px; font-weight: 800; color: var(--gold); text-shadow: 0 0 18px rgba(255, 198, 74, .45); letter-spacing: -.01em; }
.jackpot.bump .val { animation: bump .6s var(--spring); }
@keyframes bump { 40% { transform: scale(1.12) } }
.icons { display: flex; gap: 8px; }
.ibtn {
  width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-size: 18px;
  background: var(--panel); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--shadow);
  transition: transform .2s var(--ease), background .2s;
}
.ibtn:hover { background: rgba(48, 30, 84, .8); transform: translateY(-1px); }
.ibtn:active { transform: scale(.94); }
#lang-label { font-size: 12px; font-weight: 800; letter-spacing: .06em; }
#btn-sound .off { display: none; }
#btn-sound.muted .on { display: none; }
#btn-sound.muted .off { display: block; color: var(--muted); }

.balance {
  position: absolute; top: calc(84px + var(--safe-t)); left: 22px; font-size: 12px; color: var(--muted);
  padding: 6px 12px; border-radius: 999px; background: var(--panel); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--shadow);
}
.balance b { color: var(--text); margin-left: 4px; }
.balance b.neg { color: #ff8fb3; }
.balance b.pos { color: var(--teal); }

/* ---------- Now playing ---------- */
.np {
  position: absolute; left: 20px; bottom: calc(20px + var(--safe-b));
  display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 16px; text-align: left;
  background: var(--panel); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--shadow);
  transition: transform .25s var(--ease), opacity .3s;
}
.np:hover { transform: translateY(-2px); }
.np img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; box-shadow: 0 0 0 1px var(--line); }
.np-text { display: flex; flex-direction: column; line-height: 1.15; }
.np-text small { font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.np-text b { font-size: 13px; }
.np-text em { font-style: normal; font-size: 11px; color: var(--pink-soft); }
.eq { display: flex; gap: 2px; align-items: flex-end; height: 16px; margin-left: 4px; }
.eq i { width: 3px; height: 4px; border-radius: 2px; background: var(--teal); transition: height .08s linear; }
.np.paused .eq i { height: 3px !important; background: var(--muted); }
.np.paused img { filter: grayscale(.8) brightness(.7); }

/* ---------- Dock ---------- */
.dock {
  position: absolute; left: 50%; bottom: calc(18px + var(--safe-b)); transform: translateX(-50%);
  width: min(720px, calc(100vw - 32px));
  transition: transform .5s var(--ease), opacity .4s;
}
.dock.away { transform: translate(-50%, 130%); opacity: 0; pointer-events: none; }
.dock-inner {
  display: grid; grid-template-columns: 1fr auto; gap: 12px 16px; align-items: center;
  padding: 14px 16px; border-radius: var(--radius);
  background: var(--panel); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--shadow);
}
.ticket-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.lbl { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.link { color: var(--teal); font-size: 12px; font-weight: 700; padding: 2px 0; border-bottom: 1px dashed rgba(45, 226, 208, .4); }
.link:hover { color: #fff; }

.chips, .slots { display: flex; gap: 7px; align-items: center; flex-wrap: nowrap; }
.chip-gap { width: 8px; }

/* Mini balls (match the 3D balls: white with decade-coloured band) */
.ball {
  --c: var(--d0);
  position: relative; width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #17121f;
  background:
    radial-gradient(circle at 34% 28%, rgba(255,255,255,.95) 0 8%, rgba(255,255,255,0) 30%),
    radial-gradient(circle at 50% 50%, transparent 58%, rgba(0,0,0,.28) 100%),
    linear-gradient(#f7f3ec 0 24%, var(--c) 24% 76%, #f7f3ec 76%);
  box-shadow: 0 6px 14px -6px rgba(0,0,0,.7);
}
.ball span { width: 62%; height: 62%; border-radius: 50%; background: #fffdf8; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--c); line-height: 1; letter-spacing: -.03em; }
.ball.sz { --c: #d8143f; background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.7) 0 8%, rgba(255,255,255,0) 30%), radial-gradient(circle at 50% 50%, transparent 58%, rgba(0,0,0,.35) 100%), #d8143f; }
.ball.sz span { color: #d8143f; box-shadow: 0 0 0 2px var(--gold); }
.ball.empty { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.ball.empty span { display: none; }
.ball.hit { box-shadow: 0 0 0 2px var(--gold), 0 0 18px 2px rgba(255, 198, 74, .65); }
.ball.hit::after {
  content: ""; position: absolute; right: -3px; top: -3px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2317121f' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E") center/9px no-repeat;
}
.ball.dim { opacity: .38; filter: saturate(.4); }
.ball.pop { animation: pop .55s var(--spring); }
@keyframes pop { 0% { transform: scale(.2) rotate(-90deg); opacity: 0 } 100% { transform: none; opacity: 1 } }
.ball.sm { width: 30px; height: 30px; font-size: 12px; }

.actions { display: flex; gap: 10px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 18px;
  border-radius: 15px; font-weight: 750; font-size: 14px; white-space: nowrap;
  transition: transform .18s var(--ease), box-shadow .25s, background .25s, opacity .2s;
}
.btn svg { font-size: 17px; }
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.sm { height: 38px; padding: 0 14px; font-size: 13px; border-radius: 12px; }
.btn.xl { height: 58px; padding: 0 30px; font-size: 17px; border-radius: 18px; }
.btn.ghost { background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn.ghost:hover { background: rgba(255, 255, 255, .11); }
.btn.primary {
  color: #fff; background: linear-gradient(135deg, #ff3d86 0%, #ff6a4d 100%);
  box-shadow: 0 10px 30px -8px rgba(255, 45, 122, .75), inset 0 1px 0 rgba(255, 255, 255, .35);
  position: relative; overflow: hidden;
}
.btn.primary::after {
  content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  transform: translateX(-120%); animation: shine 4.5s 2s infinite;
}
@keyframes shine { 0%, 70% { transform: translateX(-120%) } 100% { transform: translateX(120%) } }
.btn.primary:hover { box-shadow: 0 14px 38px -8px rgba(255, 45, 122, .9), inset 0 1px 0 rgba(255, 255, 255, .35); transform: translateY(-1px); }
.btn.primary small { font-weight: 600; opacity: .8; font-size: 11px; padding: 2px 7px; border-radius: 999px; background: rgba(0,0,0,.18); }

.options { grid-column: 1 / -1; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--line); }
.options .link { margin-left: auto; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: rgba(0, 0, 0, .25); box-shadow: inset 0 0 0 1px var(--line); }
.seg button { height: 28px; padding: 0 12px; border-radius: 9px; font-size: 12px; font-weight: 700; color: var(--muted); transition: background .2s, color .2s; }
.seg button[aria-checked="true"] { background: rgba(255, 255, 255, .12); color: #fff; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer; user-select: none; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle i { width: 34px; height: 20px; border-radius: 999px; background: rgba(255,255,255,.12); position: relative; transition: background .25s; }
.toggle i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .3s var(--spring); }
.toggle input:checked + i { background: linear-gradient(135deg, var(--gold), var(--coral)); }
.toggle input:checked + i::after { transform: translateX(14px); }
.toggle input:checked ~ span { color: var(--gold); }
.toggle input:focus-visible + i { outline: 2px solid var(--teal); outline-offset: 2px; }

/* drawing state */
.dock.drawing .ticket { display: none; }
.dock.drawing .options { display: none; }
.dock.drawing #drawn { display: block !important; }
.drawn .slots { gap: 8px; }
.drawn .ball { width: 44px; height: 44px; font-size: 16px; }

/* ---------- Caption & reveal ---------- */
.caption {
  position: absolute; left: 50%; top: calc(92px + var(--safe-t)); transform: translateX(-50%);
  font-size: 12px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: rgba(255,255,255,.85);
  padding: 8px 16px; border-radius: 999px; background: rgba(12, 8, 24, .45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; transition: opacity .4s, transform .4s var(--ease); white-space: nowrap;
}
.caption.show { opacity: 1; }
.reveal { position: absolute; left: 50%; top: calc(140px + var(--safe-t)); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.reveal-ball {
  font-size: clamp(64px, 11vw, 120px); font-weight: 900; line-height: 1; letter-spacing: -.04em;
  color: #fff; text-shadow: 0 0 30px var(--rc, rgba(255,45,122,.9)), 0 0 80px var(--rc, rgba(255,45,122,.6));
  opacity: 0; transform: scale(.6); filter: blur(8px);
}
.reveal.show .reveal-ball { animation: revealIn 1.6s var(--ease) forwards; }
@keyframes revealIn {
  0% { opacity: 0; transform: scale(.6); filter: blur(10px) }
  18% { opacity: 1; transform: scale(1.08); filter: blur(0) }
  30% { transform: scale(1) }
  78% { opacity: 1; transform: scale(1) }
  100% { opacity: 0; transform: scale(1.04) translateY(-10px); filter: blur(4px) }
}
.reveal-tag { font-size: 13px; font-weight: 900; letter-spacing: .3em; text-transform: uppercase; color: #17121f; background: var(--gold); padding: 6px 14px; border-radius: 999px; opacity: 0; box-shadow: 0 0 30px rgba(255,198,74,.7); }
.reveal.show.match .reveal-tag { animation: tagIn 1.6s var(--spring) forwards; }
@keyframes tagIn { 0%, 12% { opacity: 0; transform: scale(.4) } 30% { opacity: 1; transform: scale(1) } 80% { opacity: 1 } 100% { opacity: 0 } }

/* ---------- Result ---------- */
.result { position: absolute; right: 24px; top: 50%; transform: translateY(-50%); width: min(380px, calc(100vw - 32px)); }
.result .card {
  padding: 22px; border-radius: 26px; background: var(--panel-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow), 0 0 0 1px rgba(255,255,255,.04);
  animation: cardIn .7s var(--ease) both;
}
@keyframes cardIn { from { opacity: 0; transform: translateX(40px) scale(.96) } }
.result.win .card { box-shadow: var(--shadow), 0 0 0 1px rgba(255,198,74,.35), 0 0 60px -10px rgba(255,198,74,.45); }
.res-class { font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.result h2 { margin: 6px 0 2px; font-size: 30px; line-height: 1.1; letter-spacing: -.02em; font-weight: 900; }
.result.win h2 { background: linear-gradient(90deg, var(--gold), #fff3c4, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.res-prize { font-size: 15px; color: var(--muted); font-weight: 700; }
.result.win .res-prize { font-size: 34px; color: var(--gold); font-weight: 900; text-shadow: 0 0 24px rgba(255,198,74,.5); }
.res-rows { margin: 16px 0 10px; display: grid; gap: 10px; }
.res-row { display: grid; gap: 6px; }
.mini { display: flex; gap: 5px; flex-wrap: wrap; }
.quote { margin: 10px 0 16px; color: #d9cff0; font-size: 14px; font-style: italic; }
.res-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.res-actions .primary { flex: 1; }

/* ---------- Toast ---------- */
.toast {
  position: absolute; left: 50%; bottom: calc(190px + var(--safe-b)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 10px 16px; border-radius: 12px; background: var(--panel-strong); box-shadow: var(--shadow); font-size: 13px; font-weight: 600;
  transition: opacity .3s, transform .3s var(--ease); max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Dialog sheets ---------- */
dialog.sheet {
  border: 0; padding: 0; background: transparent; color: var(--text); max-width: min(560px, calc(100vw - 24px)); width: 100%; max-height: calc(100dvh - 24px);
  margin: auto;
}
dialog.sheet.wide { max-width: min(720px, calc(100vw - 24px)); }
dialog.sheet::backdrop { background: rgba(8, 5, 16, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
dialog.sheet[open] .sheet-inner { animation: sheetIn .45s var(--ease); }
@keyframes sheetIn { from { opacity: 0; transform: translateY(24px) scale(.98) } }
.sheet-inner {
  background: var(--panel-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border-radius: 26px; box-shadow: var(--shadow); padding: 20px 22px 22px; max-height: calc(100dvh - 24px); overflow: auto;
}
.sheet-inner header { display: flex; justify-content: space-between; align-items: center; }
.sheet-inner h2 { margin: 0; font-size: 20px; font-weight: 850; letter-spacing: -.01em; }
.x { width: 36px; height: 36px; border-radius: 12px; font-size: 24px; line-height: 1; color: var(--muted); background: rgba(255,255,255,.05); }
.x:hover { color: #fff; background: rgba(255,255,255,.1); }
.pk-sub { color: var(--muted); margin: 6px 0 14px; font-size: 13px; }
.pk-sub.ok { color: var(--teal); }

.grid49 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cell {
  position: relative; aspect-ratio: 1; border-radius: 12px; font-weight: 750; font-size: 15px; color: #e8def9;
  background: rgba(255, 255, 255, .045); box-shadow: inset 0 0 0 1px var(--line);
  transition: background .2s, transform .15s var(--ease), color .2s;
}
.cell:hover { background: rgba(255, 255, 255, .09); }
.cell:active { transform: scale(.92); }
.cell svg { position: absolute; inset: 14%; width: 72%; height: 72%; stroke: var(--pink); stroke-width: 3.2; opacity: 0; filter: drop-shadow(0 0 6px rgba(255,45,122,.8)); }
.cell svg path { stroke-dasharray: 30; stroke-dashoffset: 30; }
.cell.on { color: rgba(255,255,255,.5); background: rgba(255, 45, 122, .1); }
.cell.on svg { opacity: 1; }
.cell.on svg path { animation: draw .28s var(--ease) forwards; }
.cell.on svg path + path { animation-delay: .1s; }
@keyframes draw { to { stroke-dashoffset: 0 } }
.cell.full:not(.on) { opacity: .4; }
.pk-sz { margin-top: 16px; display: grid; gap: 8px; font-size: 12px; color: var(--muted); font-weight: 600; }
.sz-row { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; }
.sz-row button { height: 38px; border-radius: 10px; font-weight: 800; background: rgba(255,255,255,.045); box-shadow: inset 0 0 0 1px var(--line); transition: background .2s; }
.sz-row button[aria-pressed="true"] { background: #d8143f; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2), 0 0 16px rgba(216,20,63,.6); color: #fff; }
.sheet-inner footer { display: flex; gap: 8px; margin-top: 18px; }
.sheet-inner footer .primary { margin-left: auto; min-width: 140px; }

/* stats */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0; }
.kpi { padding: 12px; border-radius: 16px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--line); }
.kpi b { display: block; font-size: 20px; font-weight: 850; margin-top: 4px; letter-spacing: -.01em; }
.kpi b.neg { color: #ff8fb3; } .kpi b.pos { color: var(--teal); }
.st-section { margin-top: 18px; }
.st-section h3 { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 120px; }
.bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; font-size: 11px; color: var(--muted); }
.bar i { width: 100%; border-radius: 6px 6px 3px 3px; background: linear-gradient(to top, rgba(255,45,122,.5), var(--pink)); min-height: 2px; transition: height .6s var(--ease); }
.bar:nth-child(n+4) i { background: linear-gradient(to top, rgba(255,198,74,.5), var(--gold)); }
.bar b { color: var(--text); font-size: 12px; }
table.cls { width: 100%; border-collapse: collapse; font-size: 13px; }
table.cls th { text-align: left; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 6px 8px; }
table.cls td { padding: 8px; border-top: 1px solid var(--line); }
table.cls td:nth-child(n+2), table.cls th:nth-child(n+2) { text-align: right; }
table.cls tr.got td { color: var(--gold); }
.hot { display: flex; gap: 6px; flex-wrap: wrap; }
.st-foot { margin-top: 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }

/* lifetime */
.life-ctrl { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.life-ctrl input[type=range] { flex: 1; accent-color: var(--pink); }
.life-ctrl output { font-weight: 850; font-size: 18px; min-width: 2ch; text-align: right; }
.life-ctrl span { color: var(--muted); font-size: 13px; }
.life-res .kpis { grid-template-columns: repeat(3, 1fr); }
.life-note { color: var(--muted); font-size: 13px; margin-top: 12px; }
.life-note b { color: var(--text); }

/* ---------- Gate ---------- */
.gate {
  position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; text-align: center; padding: 24px;
  background: radial-gradient(ellipse at 50% 60%, rgba(12,8,24,.35) 0%, rgba(12,8,24,.85) 70%);
  transition: opacity .9s var(--ease), visibility .9s;
}
.gate.gone { opacity: 0; visibility: hidden; }
.gate-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.gate-sub { color: #d9cff0; margin: 0 0 18px; font-size: 16px; letter-spacing: .04em; }
.gate-hint { color: var(--muted); font-size: 12px; margin-top: 12px; max-width: 360px; }
#gate-enter:disabled { opacity: .75; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px), (max-height: 560px) {
  .np { left: auto; right: 22px; bottom: auto; top: calc(78px + var(--safe-t)); padding: 4px; border-radius: 13px; }
  .np-text { display: none; }
  .np img { width: 32px; height: 32px; }
  .np .eq { position: absolute; left: 50%; bottom: 7px; transform: translateX(-50%); margin: 0; height: 12px; }
}
@media (max-width: 760px) {
  .np { right: 14px; top: calc(62px + var(--safe-t)); }
}
@media (max-width: 760px) {
  .top { padding: calc(12px + var(--safe-t)) 14px 0; }
  .logo { font-size: 18px; }
  .brand .sub { display: none; }
  .jackpot { padding: 6px 12px; border-radius: 13px; }
  .jackpot .val { font-size: 16px; }
  .ibtn { width: 38px; height: 38px; border-radius: 12px; font-size: 16px; }
  .icons { gap: 6px; }
  .top-right { gap: 8px; }
  .balance { top: calc(52px + var(--safe-t)); left: 14px; }
  .dock { width: 100vw; bottom: 0; }
  .dock-inner { grid-template-columns: minmax(0, 1fr); border-radius: 24px 24px 0 0; padding: 14px 14px calc(14px + var(--safe-b)); gap: 12px; }
  .ball { width: 34px; height: 34px; font-size: 13px; }
  .chips { gap: 5px; }
  .drawn .ball { width: 38px; height: 38px; font-size: 14px; }
  .drawn .slots { gap: 5px; justify-content: center; }
  .actions { min-width: 0; }
  .actions .btn { min-width: 0; padding: 0 14px; }
  .actions .btn.primary { flex: 1; }
  .ticket { min-width: 0; }
  .options { gap: 10px 12px; justify-content: space-between; }
  .options .link { margin-left: 0; }
  .options .seg button { padding: 0 10px; }
  .caption { top: calc(108px + var(--safe-t)); font-size: 11px; }
  .reveal { top: calc(150px + var(--safe-t)); }
  .result { right: 0; left: 0; top: auto; bottom: 0; transform: none; width: 100%; }
  .result .card { border-radius: 24px 24px 0 0; padding: 18px 18px calc(18px + var(--safe-b)); animation-name: cardUp; }
  @keyframes cardUp { from { opacity: 0; transform: translateY(40px) } }
  .result h2 { font-size: 24px; }
  .result.win .res-prize { font-size: 26px; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .toast { bottom: calc(230px + var(--safe-b)); }
  .grid49 { gap: 5px; }
  .cell { border-radius: 10px; font-size: 14px; }
}
@media (max-width: 420px) {
  .btn.primary small { display: none; }
}
@media (max-width: 360px) {
  .actions .btn.ghost span { display: none; }
}
@media (max-width: 380px) {
  .ibtn { width: 34px; height: 34px; border-radius: 11px; font-size: 15px; }
  .icons { gap: 4px; }
  .top-right { gap: 6px; }
  .jackpot { padding: 5px 9px; }
  .jackpot .val { font-size: 14px; }
  .logo { font-size: 16px; }
  .ball { width: 30px; height: 30px; font-size: 12px; }
  .drawn .ball { width: 34px; height: 34px; }
  .btn { padding: 0 12px; }
}
@media (max-height: 560px) and (orientation: landscape) {
  .options { display: none; }
  .dock-inner { padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
