:root { --bg: #2a1408; --card: #3d2010; --gold: #FFC94A; --saffron: #FF9933; --green: #2fbf71; --ink: #fff6e8; --muted: #d5b99f; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; background: radial-gradient(circle at 50% 0%, #5a2c14, var(--bg) 70%); color: var(--ink); font-family: 'Noto Sans Devanagari','Noto Sans Telugu','Noto Sans Kannada','Noto Sans Tamil','Noto Sans Malayalam', system-ui, sans-serif; }
[hidden] { display: none !important; }
.screen { min-height: 100dvh; padding: 56px 12px 64px; display: flex; flex-direction: column; align-items: center; }
.card { width: min(440px, 100%); background: var(--card); border: 1.5px solid rgba(255,201,74,.4); border-radius: 20px; padding: 18px; }
.logo { font-size: 32px; font-weight: 800; text-align: center; color: var(--gold); }
.sub { text-align: center; color: var(--muted); margin: 4px 0 14px; }
.how { display: grid; gap: 8px; font-size: 14px; line-height: 1.45; background: rgba(0,0,0,.2); border-radius: 14px; padding: 12px; }
.best-row { text-align: center; margin: 14px 0 0; color: var(--muted); }
.best-row b { color: var(--gold); }
button.primary { width: 100%; margin-top: 12px; padding: 13px; font: inherit; font-weight: 800; font-size: 17px; color: #2a1408; background: linear-gradient(180deg, #FFD466, var(--saffron)); border: 0; border-radius: 14px; cursor: pointer; box-shadow: 0 4px 0 #b3661a; }
button.primary:active { transform: translateY(2px); box-shadow: 0 2px 0 #b3661a; }
button.ghost { width: 100%; margin-top: 10px; padding: 10px; font: inherit; font-weight: 700; color: var(--gold); background: transparent; border: 1.5px solid rgba(255,201,74,.5); border-radius: 14px; cursor: pointer; }
button.ghost.sm { width: auto; padding: 8px 12px; font-size: 13px; margin: 0; }
button.ghost:disabled { opacity: .4; }
.fine { font-size: 12px; color: var(--muted); margin: 12px 0 0; line-height: 1.45; }

.game { padding-top: 48px; gap: 10px; }
.hud { display: flex; gap: 10px; width: min(440px, 100%); }
.stat { flex: 1; background: var(--card); border: 1.5px solid rgba(255,201,74,.3); border-radius: 14px; padding: 6px 10px; text-align: center; }
.stat small { display: block; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.stat b { font-size: 22px; color: var(--gold); }
.board-wrap { width: 100%; display: flex; justify-content: center; }
/* Round Brainvita tray: a wooden disc with 33 holes, ringed by a groove where jumped marbles roll to rest. --u = one hole-pitch (% of the board width). */
#board { --u: 10.1; position: relative; width: min(94vw, calc(100dvh - 290px), 560px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 28%, #c98a3d, #8a531f 62%, #5e3512); border: 4px solid #3a200c; box-shadow: 0 12px 34px rgba(0,0,0,.65), inset 0 0 26px rgba(0,0,0,.4); }
.groove { position: absolute; inset: calc(50% - var(--u) * 4.85 * 1%); border-radius: 50%; background: radial-gradient(circle, transparent 0 calc(3.8 / 4.85 * 50%), rgba(30,14,4,.75) calc(3.85 / 4.85 * 50%), rgba(30,14,4,.55) 97%, transparent 100%); box-shadow: inset 0 0 12px rgba(0,0,0,.55); pointer-events: none; }
.disc { position: absolute; inset: calc(50% - var(--u) * 3.72 * 1%); border-radius: 50%; background: radial-gradient(circle at 38% 32%, #a86a2a, #7d4a1b 70%); box-shadow: inset 0 3px 8px rgba(0,0,0,.45), 0 0 0 2px rgba(255,220,150,.18); pointer-events: none; }
.hole, .marble { position: absolute; width: calc(var(--u) * .8 * 1%); aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); }
.hole { background: radial-gradient(circle at 60% 65%, #6d4118, #2f1907); box-shadow: inset 0 3px 6px rgba(0,0,0,.75), 0 1px 0 rgba(255,220,150,.25); }
.hole.target { box-shadow: inset 0 3px 6px rgba(0,0,0,.65), 0 0 0 3px var(--green); background: radial-gradient(circle, rgba(47,191,113,.6), #2f1907 75%); cursor: pointer; animation: pulse 1s ease-in-out infinite alternate; }
.marble { background: radial-gradient(circle at 32% 26%, #fff 0 7%, rgba(255,255,255,.35) 8% 16%, transparent 17%), radial-gradient(circle at 50% 50%, #5fb4ff, #1c5fbf 55%, #0c2f73 92%); box-shadow: 0 4px 6px rgba(0,0,0,.6), inset 0 -3px 5px rgba(0,20,80,.55); cursor: pointer; z-index: 2; transition: left .28s cubic-bezier(.3,.7,.3,1), top .28s cubic-bezier(.3,.7,.3,1); }
.marble.ringed { cursor: default; pointer-events: none; z-index: 1; }
.marble.sel { box-shadow: 0 0 0 3px var(--gold), 0 8px 10px rgba(0,0,0,.6); filter: brightness(1.15); }
.marble.movable { animation: bob 1.4s ease-in-out infinite; }
.marble.hint { box-shadow: 0 0 0 3px #fff, 0 0 18px 6px var(--gold); }
@keyframes pulse { to { transform: translate(-50%, -50%) scale(1.08); } }
@keyframes bob { 50% { filter: brightness(1.22); } }
.msg { min-height: 24px; text-align: center; color: var(--muted); font-size: 14px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.ad-slot { width: min(440px, 100%); margin-top: 12px; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: #000c; padding: 8px 14px; border-radius: 12px; z-index: 60; }

.sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgba(10,3,14,.6); padding: 12px; }
.sheet-card { width: min(460px, 100%); background: var(--card); border: 2px solid var(--gold); border-radius: 22px; padding: 18px; text-align: center; animation: rise .3s ease-out; }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
.sheet-icon { font-size: 44px; } .sheet-tag { font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); }
.sheet-card h2 { margin: 4px 0 6px; color: var(--gold); } .sheet-card p { margin: 0 0 8px; line-height: 1.5; }
.sheet-move { color: var(--muted); font-size: 13px; }
.once { text-align: center; font-size: 13px; color: var(--gold); margin: 12px 0 0; }
.once.done { background: rgba(0,0,0,.25); border-radius: 12px; padding: 10px; color: var(--ink); line-height: 1.45; }
