/* לוטו הזהב — night neighborhood + gold. RTL, logical properties only. */
@font-face { font-family: "Suez One"; src: url(../fonts/suez-one-hebrew-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Suez One"; src: url(../fonts/suez-one-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }
@font-face { font-family: "Heebo"; src: url(../fonts/heebo-hebrew-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Heebo"; src: url(../fonts/heebo-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }
@font-face { font-family: "Heebo"; src: url(../fonts/heebo-hebrew-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Heebo"; src: url(../fonts/heebo-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }
@font-face { font-family: "Heebo"; src: url(../fonts/heebo-hebrew-800-normal.woff2) format("woff2"); font-weight: 800; font-display: swap; unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Heebo"; src: url(../fonts/heebo-latin-800-normal.woff2) format("woff2"); font-weight: 800; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }

:root {
  --bg: #07050f; --bg-2: #110c22; --panel: #171030; --line: rgb(245 197 66 / .22);
  --ink: #fbf3dc; --ink-2: #cfc3a4; --muted: #9a8fb3;
  --gold: #f5c542; --gold-2: #e09b14; --gold-hi: #fff0b3;
  --ok: #7bd88f; --bad: #ff8a80; --tg: #2aabee;
  --c0: #e53935; --c1: #1e88e5; --c2: #43a047; --c3: #fdd835; --c4: #fb8c00; --c5: #8e24aa;
  --gutter: clamp(16px, 4vw, 56px); --topbar-h: 64px; --radius: 18px;
  --display: "Suez One", "Heebo", "Arial Hebrew", serif; --body: "Heebo", "Arial Hebrew", Arial, sans-serif;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--body); overflow-x: clip; }
img { max-width: 100%; display: block; }
a { color: var(--gold); }
h1, h2, h3 { line-height: 1.15; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--gold-hi); outline-offset: 3px; border-radius: 6px; }
.skip { position: fixed; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--gold); color: #000; padding: 10px 16px; border-radius: 10px; font-weight: 700; }
.skip:focus { top: 12px; }
.sr, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ───────── buttons ───────── */
.btn { --h: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--h); padding: 0 22px; border-radius: 999px;
  font: 700 16px/1 var(--body); text-decoration: none; cursor: pointer; border: 1.5px solid transparent; transition: transform .15s, background .2s, box-shadow .2s; }
.btn:active { transform: translateY(1px) scale(.98); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-gold { background: linear-gradient(135deg, var(--gold-hi), var(--gold) 45%, var(--gold-2)); color: #241500; box-shadow: 0 8px 30px rgb(245 197 66 / .35), inset 0 1px 0 rgb(255 255 255 / .6); }
.btn-gold:hover { box-shadow: 0 10px 40px rgb(245 197 66 / .55), inset 0 1px 0 rgb(255 255 255 / .6); }
.btn-ghost { background: rgb(255 255 255 / .05); color: var(--ink); border-color: rgb(255 255 255 / .2); backdrop-filter: blur(6px); }
.btn-ghost:hover { border-color: var(--gold); }
.btn-tg { background: var(--tg); color: #fff; }
.btn-sm { --h: 40px; padding: 0 16px; font-size: 14px; }
.btn-lg { --h: 58px; padding: 0 30px; font-size: 18px; }
.btn.is-busy { position: relative; color: transparent; }
.btn.is-busy::after { content: ""; position: absolute; width: 22px; height: 22px; border-radius: 50%; border: 3px solid #241500; border-block-start-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link { background: none; border: 0; color: var(--gold); font: inherit; text-decoration: underline; cursor: pointer; padding: 8px 4px; min-height: 44px; }

/* ───────── topbar ───────── */
.topbar { position: fixed; z-index: 50; inset-inline: 0; top: 0; height: var(--topbar-h); display: flex; align-items: center; gap: 20px; padding-inline: var(--gutter);
  transition: background .3s, backdrop-filter .3s; }
.topbar.is-solid { background: rgb(7 5 15 / .82); backdrop-filter: blur(14px); border-block-end: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 400 24px/1 var(--display); color: var(--gold); text-decoration: none; }
.brand-ball { width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0 12%, var(--gold) 30%, var(--gold-2) 100%); box-shadow: 0 0 18px rgb(245 197 66 / .6); }
.topnav { display: flex; gap: 22px; margin-inline-start: auto; }
.topnav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 15px; opacity: .85; }
.topnav a:hover { color: var(--gold); opacity: 1; }
.demo-ribbon { position: fixed; z-index: 49; top: var(--topbar-h); inset-inline: 0; text-align: center; font-size: 13px; padding: 4px 12px; background: rgb(142 36 170 / .85); color: #fff; }
.demo-ribbon a { color: #fff; font-weight: 700; }

/* ───────── journey ───────── */
.journey { position: relative; height: calc(var(--scenes, 11) * 100svh); }
.stage { position: sticky; top: 0; height: 100svh; overflow: hidden; background: #000; }
.scene { position: absolute; inset: 0; opacity: 0; visibility: hidden; }
.scene.is-on { visibility: visible; }
.scene:first-child { opacity: 1; }
.scene-bg, .scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; will-change: transform, opacity; }
.scene::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 85% at 50% 50%, transparent 35%, rgb(0 0 0 / .8) 100%), linear-gradient(180deg, rgb(0 0 0 / .55), transparent 30%, transparent 55%, rgb(0 0 0 / .85)); }
.scene--studio { background: #050309; }
.scene--studio .scene-bg { filter: blur(40px) brightness(.3) saturate(1.6); transform: scale(1.3); }
.scene--studio::before { content: ""; position: absolute; z-index: 1; inset: 0; pointer-events: none; background: radial-gradient(38% 55% at 30% 52%, rgb(255 200 110 / .3), transparent 70%); }
.scene-cap { position: absolute; z-index: 2; inset-inline: var(--gutter); text-align: center; visibility: hidden; }
.scene-cap--hero { top: clamp(72px, 14vh, 120px); translate: 0 0; visibility: visible; width: min(720px, 100% - 2 * var(--gutter)); margin-inline: auto; inset-inline: 0; }
.scene[data-mood="street"].is-on::after {
  background: radial-gradient(95% 70% at 50% 38%, rgb(0 0 0 / .35), rgb(0 0 0 / .88) 72%),
    linear-gradient(180deg, rgb(0 0 0 / .72), transparent 28%, transparent 52%, rgb(0 0 0 / .92));
}
.hero-banner { margin-bottom: clamp(14px, 2.5vw, 22px); padding: 14px 18px; border-radius: 16px;
  background: rgb(7 5 15 / .82); border: 1px solid rgb(245 197 66 / .4); backdrop-filter: blur(12px);
  box-shadow: 0 12px 40px rgb(0 0 0 / .55); text-align: start; }
.hero-legal { font-size: clamp(14px, 1.55vw, 17px); line-height: 1.55; color: var(--ink); font-weight: 600; }
.hero-legal strong { color: var(--gold-hi); font-weight: 800; }
.kicker { font-weight: 800; letter-spacing: .04em; color: var(--gold-hi); font-size: clamp(15px, 1.75vw, 20px); text-shadow: 0 2px 12px #000, 0 0 24px rgb(0 0 0 / .8); }
.kicker span:not(:empty)::after { content: " · "; }
.hero-title { font: 400 clamp(64px, 12vw, 180px)/.95 var(--display); color: var(--gold);
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 50%, var(--gold-2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 4px 0 #6b4300) drop-shadow(0 10px 30px rgb(0 0 0 / .9)); }
.hero-title span { filter: none; }
.hero-title span { display: block; font: 700 clamp(20px, 3vw, 34px)/1.3 var(--body); -webkit-text-fill-color: var(--ink); margin-top: 10px; }
.hero-pool { margin-top: 18px; font-size: clamp(18px, 2.2vw, 24px); }
.hero-pool b { color: var(--gold); font-family: var(--display); font-weight: 400; font-size: 1.4em; }
.scene-cap--place { top: calc(var(--topbar-h) + 60px); }
.scene-cap--place p { font: 400 clamp(34px, 6vw, 84px)/1 var(--display); color: var(--ink); text-shadow: 0 4px 30px #000; }
.scene-cap--place small { display: block; margin-top: 10px; font-size: clamp(15px, 1.6vw, 20px); color: var(--gold-hi); letter-spacing: .06em; text-shadow: 0 2px 12px #000; }
.jobj { position: absolute; z-index: 2; margin: 0; left: 50%; top: 50%; width: min(46vw, 620px); opacity: var(--o, 0); pointer-events: none;
  transform: translate(-50%, -50%) translate3d(var(--x, 0px), var(--y, 0px), 0) scale(var(--s, 1)) rotate(var(--r, 0deg)); filter: drop-shadow(0 50px 50px rgb(0 0 0 / .65)) drop-shadow(0 0 40px rgb(245 197 66 / .18)); }
.jpanel { position: absolute; z-index: 3; inset-inline-start: var(--gutter); top: 50%; translate: 0 -50%; width: min(480px, 42vw); display: grid; gap: 14px; justify-items: start;
  opacity: var(--o, 0); visibility: hidden; transform: translate3d(0, var(--py, 0px), 0); }
.jpanel.is-on { visibility: visible; }
.station-tag { font-weight: 700; color: var(--gold); letter-spacing: .08em; font-size: 14px; }
.jpanel h2 { font: 400 clamp(44px, 5.4vw, 76px)/1 var(--display); color: var(--ink); text-shadow: 0 4px 30px #000; }
.jpanel h2 span { display: block; font: 700 clamp(17px, 1.6vw, 21px)/1.4 var(--body); color: var(--gold-hi); margin-top: 8px; }
.jpanel .desc { color: var(--ink-2); font-size: 18px; text-shadow: 0 2px 10px #000; }
.jpanel .price { font-size: 18px; } .jpanel .price b { color: var(--gold); font-size: 1.15em; }
.station-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.fx-layer { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; mix-blend-mode: screen; opacity: 0; transition: opacity 1s; }
.fx-layer.is-on { opacity: .9; }
.rail { position: absolute; z-index: 4; inset-inline-end: var(--gutter); top: 50%; translate: 0 -50%; display: grid; gap: 6px; }
.rail button { display: flex; align-items: center; gap: 10px; justify-content: flex-end; flex-direction: row-reverse; min-height: 36px; background: none; border: 0; color: var(--ink); cursor: pointer; font: 700 13px var(--body); opacity: .55; padding: 4px; }
.rail button::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--gold); transition: background .2s, transform .2s; }
.rail button[aria-current="step"] { opacity: 1; color: var(--gold); }
.rail button[aria-current="step"]::before { background: var(--gold); transform: scale(1.3); box-shadow: 0 0 12px var(--gold); }
.rail span { text-shadow: 0 1px 6px #000; }
.shout { position: absolute; z-index: 3; top: 28%; inset-inline-start: 12%; max-width: 280px; padding: 10px 16px; border-radius: 18px 18px 18px 4px; background: var(--gold); color: #241500; font-weight: 800; opacity: 0; transform: scale(.7); pointer-events: none; }
.shout.is-on { animation: shout 3.2s ease forwards; }
@keyframes shout { 10% { opacity: 1; transform: scale(1.05); } 18%, 80% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: translateY(-14px); } }
.scroll-hint { position: absolute; z-index: 4; bottom: 28px; inset-inline: 0; text-align: center; font-weight: 700; font-size: 14px; color: var(--ink-2); transition: opacity .4s; }
.scroll-hint span { display: block; width: 24px; height: 38px; margin: 0 auto 8px; border: 2px solid var(--ink-2); border-radius: 14px; position: relative; }
.scroll-hint span::after { content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--gold); animation: hint 1.6s infinite; }
@keyframes hint { to { transform: translateY(12px); opacity: 0; } }

/* ───────── sections ───────── */
.sec { position: relative; padding-block: clamp(72px, 10vw, 130px); scroll-margin-top: var(--topbar-h); }
.sec:nth-of-type(even) { background: linear-gradient(180deg, var(--bg-2), var(--bg)); }
.wrap { width: min(1180px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.wrap.narrow { width: min(820px, 100% - 2 * var(--gutter)); }
.eyebrow { color: var(--gold); font-weight: 700; letter-spacing: .08em; font-size: 14px; margin-bottom: 10px; }
.sec-title { font: 400 clamp(38px, 5vw, 64px)/1.05 var(--display); margin-bottom: clamp(28px, 4vw, 48px); }

/* ball */
.ball { --c: var(--c0); list-style: none; width: var(--sz, 44px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: radial-gradient(circle at 34% 28%, #fff 0 8%, var(--c) 32%, color-mix(in srgb, var(--c), #000 55%) 100%); box-shadow: inset 0 -4px 8px rgb(0 0 0 / .35), 0 6px 14px rgb(0 0 0 / .45); }
.ball span { width: 56%; aspect-ratio: 1; border-radius: 50%; background: rgb(255 255 255 / .94); color: #111; display: grid; place-items: center; font: 800 calc(var(--sz, 44px) * .3)/1 var(--body); }
.b0 { --c: var(--c0); } .b1 { --c: var(--c1); } .b2 { --c: var(--c2); } .b3 { --c: var(--c3); } .b4 { --c: var(--c4); } .b5 { --c: var(--c5); }
.ball.ghost { background: transparent; border: 2px dashed rgb(255 255 255 / .25); box-shadow: none; }
.ball.hit { outline: 3px solid var(--gold-hi); outline-offset: 2px; box-shadow: 0 0 22px var(--gold), inset 0 -4px 8px rgb(0 0 0 / .35); }
.picked-balls, .card-balls, .drawn-balls { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.picked-balls.sm { --sz: 28px; gap: 4px; display: inline-flex; vertical-align: middle; }

/* pool */
.pool-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; }
.pool-main { padding: clamp(24px, 4vw, 44px); border-radius: var(--radius); background: radial-gradient(120% 120% at 80% 0%, rgb(245 197 66 / .22), transparent 60%), var(--panel); border: 1px solid var(--line); }
.pool-label { color: var(--ink-2); font-weight: 700; }
.pool-amount { font: 400 clamp(56px, 9vw, 120px)/1 var(--display); color: var(--gold); text-shadow: 0 0 40px rgb(245 197 66 / .35); margin-block: 8px 14px; }
.pool-formula { color: var(--ink-2); } .pool-sponsor { margin-top: 10px; color: var(--gold-hi); font-weight: 700; }
.pool-tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0; }
.pool-tiers > div { padding: 18px; border-radius: 14px; background: rgb(255 255 255 / .04); border: 1px solid rgb(255 255 255 / .08); }
.pool-tiers dt { font-weight: 700; color: var(--ink-2); font-size: 14px; }
.pool-tiers dd { margin: 6px 0 2px; font: 400 clamp(26px, 3vw, 38px)/1.1 var(--display); color: var(--ink); }
.pool-tiers small { color: var(--muted); }

/* play */
.play { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(24px, 4vw, 48px); align-items: start; }
.play-picker, .play-details, .sent, .check-form, .mine { padding: clamp(20px, 3vw, 32px); border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.picked { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.picked-label { font-weight: 800; color: var(--gold); }
.picked .ball { --sz: 46px; }
.grid37 { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 8px; }
.n { min-height: 48px; border-radius: 50%; aspect-ratio: 1; border: 2px solid color-mix(in srgb, var(--c), #fff 10%); background: rgb(255 255 255 / .03); color: var(--ink); font: 800 17px var(--body); cursor: pointer; transition: transform .12s, background .15s; }
.n:hover { transform: scale(1.08); }
.n[aria-pressed="true"] { background: radial-gradient(circle at 34% 28%, #fff 0 8%, var(--c) 34%, color-mix(in srgb, var(--c), #000 50%)); color: #fff; text-shadow: 0 1px 3px #000; transform: scale(1.06); }
.picker-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.play > * { min-width: 0; }
.play-details { display: grid; gap: 16px; }
.kind { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.kind legend { font-weight: 700; margin-bottom: 8px; }
.kind-opt { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; border: 1.5px solid rgb(255 255 255 / .14); cursor: pointer; }
.kind-opt:has(input:checked) { border-color: var(--gold); background: rgb(245 197 66 / .08); }
.kind-opt input { accent-color: var(--gold); width: 20px; height: 20px; margin-top: 3px; }
.kind-opt b { display: block; } .kind-opt small { color: var(--muted); }
.field { display: grid; gap: 6px; font-weight: 700; font-size: 15px; }
.field input { min-height: 50px; padding: 0 14px; border-radius: 12px; border: 1.5px solid rgb(255 255 255 / .18); background: rgb(0 0 0 / .3); color: var(--ink); font: 400 17px var(--body); }
.field input[dir="ltr"] { text-align: end; }
.field input:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgb(245 197 66 / .25); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.check input { accent-color: var(--gold); width: 22px; height: 22px; flex: none; }
.form-error { color: var(--bad); font-weight: 700; min-height: 1.4em; }
.fine { color: var(--muted); font-size: 14px; }
.sent { display: grid; gap: 14px; justify-items: start; border-color: var(--gold); }
.sent-title { font: 400 36px/1 var(--display); color: var(--ok); }
.sent-code b { font: 800 22px var(--body); color: var(--gold); letter-spacing: .06em; }
.mine { margin-top: 24px; } .mine h3 { font-size: 18px; margin-bottom: 10px; }
.mine ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.mine li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.mine-status { color: var(--ink-2); font-size: 14px; }

/* results */
.sec-results { background: radial-gradient(80% 60% at 50% 0%, rgb(245 197 66 / .18), transparent), var(--bg) !important; text-align: center; }
.drawn-balls { justify-content: center; gap: 14px; margin-bottom: 36px; }
.drawn-balls .ball { --sz: clamp(56px, 9vw, 88px); animation: drop .7s cubic-bezier(.3, 1.6, .5, 1) backwards; }
.drawn-balls .ball:nth-child(2) { animation-delay: .15s; } .drawn-balls .ball:nth-child(3) { animation-delay: .3s; } .drawn-balls .ball:nth-child(4) { animation-delay: .45s; } .drawn-balls .ball:nth-child(5) { animation-delay: .6s; } .drawn-balls .ball:nth-child(6) { animation-delay: .75s; }
@keyframes drop { from { transform: translateY(-80px) scale(.4); opacity: 0; } }
.winners { display: grid; gap: 18px; text-align: start; max-width: 760px; margin-inline: auto; }
.tier { padding: 20px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.tier h3 { color: var(--gold); margin-bottom: 10px; } .tier ul { margin: 0; padding-inline-start: 20px; display: grid; gap: 6px; }

/* board */
.board-tools { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { min-height: 42px; padding: 0 18px; border-radius: 999px; border: 1.5px solid rgb(255 255 255 / .18); background: transparent; color: var(--ink); font: 700 15px var(--body); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--gold); color: #241500; border-color: var(--gold); }
.search input { min-height: 44px; min-width: min(280px, 100%); padding: 0 14px; border-radius: 999px; border: 1.5px solid rgb(255 255 255 / .18); background: rgb(0 0 0 / .3); color: var(--ink); font: 400 16px var(--body); }
.board { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.card { padding: 16px; border-radius: 16px; background: linear-gradient(160deg, rgb(245 197 66 / .08), transparent 40%), var(--panel); border: 1px solid var(--line); display: grid; gap: 12px; }
.card.empty { color: var(--muted); }
.card.win { border-color: var(--gold); box-shadow: 0 0 30px rgb(245 197 66 / .25); }
.card-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.card-name { font-weight: 800; }
.half-tag { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-inline: 6px; border-radius: 50%; background: var(--gold); color: #241500; font-size: 14px; }
.card-code { font: 700 13px ui-monospace, monospace; color: var(--muted); letter-spacing: .05em; }
.card-balls .ball { --sz: 38px; }
.card-foot { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; min-height: 40px; }
.badge { font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: rgb(255 255 255 / .08); }
.badge.ok { color: var(--ok); } .badge.gold { background: var(--gold); color: #241500; font-size: 15px; }
.board-empty { color: var(--muted); padding: 30px; text-align: center; border: 1.5px dashed var(--line); border-radius: var(--radius); }

/* check */
.check-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 14px; align-items: end; }
.check-form .form-error { grid-column: 1 / -1; }
.check-result { margin-top: 18px; display: grid; gap: 12px; }
.status { font-weight: 700; }

/* telegram */
.tg-wrap { display: flex; flex-wrap: wrap; gap: 30px; align-items: center; justify-content: space-between; }
.tg-cmds { list-style: none; padding: 0; display: grid; gap: 8px; margin: 0 0 14px; }
.tg-cmds code { display: inline-block; min-width: 200px; direction: ltr; text-align: left; padding: 3px 10px; border-radius: 8px; background: rgb(42 171 238 / .15); color: #9fdcff; margin-inline-end: 10px; }

/* rules + faq */
.rules { counter-reset: r; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.rules > li { counter-increment: r; position: relative; padding: 20px 22px; padding-inline-start: 74px; border-radius: 16px; background: var(--panel); border: 1px solid rgb(255 255 255 / .07); }
.rules > li::before { content: counter(r); position: absolute; inset-inline-start: 18px; top: 18px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font: 400 20px var(--display); color: #241500; background: radial-gradient(circle at 35% 30%, #fff 0 8%, var(--gold) 35%, var(--gold-2)); }
.rules h3 { font-size: 20px; color: var(--gold); margin-bottom: 6px; }
.rules p + p { margin-top: 8px; } .rules ul { margin: 6px 0 0; padding-inline-start: 20px; display: grid; gap: 6px; }
.example { padding: 10px 14px; border-radius: 10px; background: rgb(245 197 66 / .08); border-inline-start: 3px solid var(--gold); color: var(--ink-2); }
details { border-block-end: 1px solid rgb(255 255 255 / .1); }
summary { cursor: pointer; padding: 18px 0; font-weight: 800; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 12px; min-height: 44px; }
summary::after { content: "+"; color: var(--gold); font-size: 24px; line-height: 1; } details[open] summary::after { content: "−"; }
details p { padding-block-end: 18px; color: var(--ink-2); }

/* footer, dock, dialog, toast */
.footer { padding: 48px 0 110px; border-block-start: 1px solid var(--line); background: #040309; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-links a { color: var(--ink-2); display: inline-block; padding-block: 10px; }
.dock { display: none; }
.dlg { width: min(480px, 100% - 32px); padding: 0; border: 1px solid var(--gold); border-radius: var(--radius); background: var(--panel); color: var(--ink); }
.dlg::backdrop { background: rgb(0 0 0 / .7); backdrop-filter: blur(4px); }
.dlg-form { display: grid; gap: 14px; padding: 26px; }
.dlg-form h2 { font: 400 30px var(--display); color: var(--gold); }
.dlg .picked-balls .ball { --sz: 38px; }
.toast { position: fixed; z-index: 90; bottom: 96px; left: 50%; translate: -50% 20px; max-width: calc(100% - 32px); padding: 12px 20px; border-radius: 999px; background: var(--ink); color: #120c00; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .25s, translate .25s; }
.toast.is-on { opacity: 1; translate: -50% 0; }

/* ───────── mobile ───────── */
@media (max-width: 960px) {
  .topnav { display: none; }
  .topbar .btn { margin-inline-start: auto; }
  .pool-grid, .play { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .jobj { width: min(80vw, 380px); }
  .jpanel { inset-inline: var(--gutter); width: auto; top: auto; bottom: 84px; translate: none; text-align: center; justify-items: center; gap: 10px; }
  .jpanel .desc { font-size: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .jpanel h2 { font-size: 40px; }
  .station-actions { justify-content: center; }
  .rail { inset-inline-start: 50%; inset-inline-end: auto; top: calc(var(--topbar-h) + 8px); translate: 50% 0; display: flex; gap: 2px; }
  .rail button { white-space: nowrap; font-size: 11px; gap: 4px; padding: 2px 4px; }
  .scene-cap--place { top: calc(var(--topbar-h) + 64px); }
  .shout { inset-inline-start: 6%; top: 24%; max-width: 220px; font-size: 14px; }
  .scroll-hint { bottom: 92px; }
  .pool-tiers { grid-template-columns: 1fr 1fr; }
  .pool-tiers > div { padding: 14px; }
  .play-picker { padding: 14px; }
  .grid37 { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
  .n { min-height: 0; font-size: 15px; }
  .picked .ball { --sz: 40px; }
  .check-form { grid-template-columns: 1fr; }
  .board { grid-template-columns: 1fr; }
  .rules > li { padding-inline-start: 64px; }
  .dock { display: flex; position: fixed; z-index: 60; inset-inline: 10px; bottom: max(10px, env(safe-area-inset-bottom)); justify-content: space-around; padding: 6px; border-radius: 20px; background: rgb(17 12 34 / .92); backdrop-filter: blur(12px); border: 1px solid var(--line); }
  .dock a { display: grid; justify-items: center; gap: 2px; min-width: 64px; min-height: 48px; padding: 4px; color: var(--ink); text-decoration: none; font-size: 18px; }
  .dock span { font-size: 11px; font-weight: 700; }
  .demo-ribbon { font-size: 11px; }
}
.game-tabs { display: flex; gap: 8px; margin-block: 0 20px; flex-wrap: wrap; }
.game-tab { flex: 1; min-width: 140px; min-height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--ink-2); font-weight: 700; cursor: pointer; }
.game-tab.is-on { background: linear-gradient(135deg, var(--gold-hi), var(--gold)); color: #241500; border-color: transparent; }
.chance-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.chance-suits { display: grid; gap: 12px; }
.chance-row { padding: 12px; border-radius: var(--radius); border: 1px solid var(--line); background: rgb(255 255 255 / .03); }
.chance-row.is-off { opacity: .45; pointer-events: none; }
.chance-row-head { font-weight: 800; margin-bottom: 8px; }
.chance-ranks { display: flex; flex-wrap: wrap; gap: 6px; }
.chance-ranks button { min-width: 40px; min-height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink); font-weight: 700; cursor: pointer; }
.chance-ranks button[aria-pressed="true"] { background: var(--gold); color: #241500; border-color: transparent; }
.chance-drawn { font-size: clamp(22px, 5vw, 32px); letter-spacing: .08em; font-weight: 800; }
.card-tag { display: inline-block; padding: 2px 8px; border-radius: 8px; background: rgb(245 197 66 / .15); font-size: 13px; margin-inline-start: 6px; }

@media (prefers-reduced-motion: reduce) {
  .drawn-balls .ball, .shout.is-on, .scroll-hint span::after { animation: none; }
  .btn, .n { transition: none; }
}
