:root { --bg: #1d1147; --card: #2c1c66; --line: #46349a; --text: #fff; --muted: #b9acea; --hot: #ffd23f; --ink: #1d1147; --good: #35d07f; --bad: #ff5d73; color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font-family: ui-rounded, 'SF Pro Rounded', system-ui, 'Segoe UI', Roboto, sans-serif; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; overflow-x: hidden; }
/* iPhone "yakınlaştırma kapalı" ayarını yok sayar: iki parmakla ve çift dokunuşla büyütme burada kapanır.
   :where sıfır önceliklidir, oyun alanlarının touch-action: none kuralları geçerli kalır. */
:where(*) { touch-action: pan-y; }
main { max-width: 520px; min-height: 100dvh; margin: 0 auto; padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); display: flex; flex-direction: column; }
.hidden { display: none !important; }
section { flex: 1; width: 100%; }
.center { display: grid; place-items: center; text-align: center; }
.center > * { width: 100%; }
.stack { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.stack > .btn, .stack > .rows, .stack > .bar { width: 100%; }
form { display: grid; gap: 12px; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: 2rem; line-height: 1.15; text-wrap: balance; }
h3 { font-size: 1rem; color: var(--muted); margin-top: 6px; }
.logo img { display: block; margin: 0 auto 4px; border-radius: 28px; }
.logo { font-size: 3.4rem; font-weight: 900; letter-spacing: -.03em; }
.muted { color: var(--muted); }
.error { color: #ff9aa8; font-weight: 700; min-height: 1.4em; }
button, input { font: inherit; color: inherit; }
input { width: 100%; padding: 16px; font-size: 1.2rem; border-radius: 16px; border: 2px solid var(--line); background: var(--card); text-align: center; user-select: text; -webkit-user-select: text; }
input:focus-visible, button:focus-visible { outline: 3px solid var(--hot); outline-offset: 2px; }
#codeInput { text-transform: uppercase; letter-spacing: .3em; font-weight: 800; }
.btn { border: 0; border-radius: 16px; padding: 17px; font-size: 1.15rem; font-weight: 800; background: var(--hot); color: var(--ink); cursor: pointer; }
.btn.second { background: var(--card); color: var(--text); border: 2px solid var(--line); }
.btn:active { transform: scale(.98); }
.link { background: none; border: 0; color: var(--muted); padding: 12px; cursor: pointer; }
.code { font-size: 4rem; font-weight: 900; letter-spacing: .15em; margin-right: -.15em; line-height: 1; color: var(--hot); }
#qrImg { border-radius: 16px; background: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chips span { background: var(--card); border-radius: 99px; padding: 9px 16px; font-weight: 700; }
.chips .off { opacity: .45; }
.big-icon { font-size: 5.5rem; line-height: 1.2; }
.rule { font-size: 1.35rem; margin: 12px 0 22px; line-height: 1.35; text-wrap: balance; }
.double { color: var(--hot); font-weight: 900; font-size: 1.2rem; margin-bottom: 18px; }
.bar { height: 8px; border-radius: 9px; background: var(--card); overflow: hidden; }
.bar i { display: block; height: 100%; width: 100%; background: var(--hot); transform-origin: left; }
#play { display: flex; flex-direction: column; gap: 12px; }
.status { display: flex; justify-content: space-between; gap: 12px; font-size: .95rem; color: var(--muted); }
.status b { white-space: nowrap; color: var(--text); }
#stage { flex: 1; display: grid; min-height: 380px; position: relative; }
.pad { border: 0; border-radius: 28px; background: #8b2440; font-size: 2.6rem; font-weight: 900; cursor: pointer; width: 100%; height: 100%; touch-action: none; }
.pad small { display: block; font-size: 1.1rem; font-weight: 700; margin-top: 8px; }
.pad .clock { font-variant-numeric: tabular-nums; font-size: 4.5rem; }
.finish { display: grid; place-items: center; text-align: center; align-content: center; gap: 10px; font-size: 1.1rem; }
.finish b { font-size: 2.4rem; }
.board { display: grid; gap: 6px; align-content: center; align-self: center; width: 100%; }
.board button { border: 0; border-radius: 12px; background: var(--card); aspect-ratio: 1; padding: 0; font-size: min(8.5vw, 2.6rem); line-height: 1; cursor: pointer; touch-action: none; }
.board.wrong { animation: shake .3s; pointer-events: none; }
.board.lock { opacity: .4; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.swarm { position: absolute; inset: 0; overflow: hidden; border-radius: 28px; background: #17306b; }
.swarm span { position: absolute; left: 0; font-size: 2.1rem; line-height: 1; will-change: transform; }
.keys { align-self: center; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.keys .shown { grid-column: 1 / -1; text-align: center; font-size: 3.4rem; font-weight: 900; min-height: 1.3em; }
.keys .ask { grid-column: 1 / -1; text-align: center; font-size: 1.3rem; font-weight: 700; }
.keys button { border: 0; border-radius: 16px; background: var(--card); padding: 18px 0; font-size: 1.6rem; font-weight: 800; cursor: pointer; }
.keys .ok { background: var(--hot); color: var(--ink); }
.keys button:disabled { opacity: .4; }
.reveal { font-size: 1.25rem; font-weight: 800; color: var(--hot); }
.reveal:empty { display: none; }
.rows { display: grid; gap: 7px; }
.row { display: grid; grid-template-columns: 2.2em 1fr auto 3em; gap: 8px; align-items: center; text-align: left; background: var(--card); border-radius: 14px; padding: 12px 14px; font-weight: 700; }
.row.me { box-shadow: inset 0 0 0 2px var(--hot); }
.row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .val { color: var(--muted); font-size: .92rem; font-variant-numeric: tabular-nums; }
.row .pts { text-align: right; font-variant-numeric: tabular-nums; color: var(--good); }
.row .pts.neg { color: var(--bad); }
.row .pts.zero { color: var(--muted); }
.rows.small .row { padding: 7px 14px; grid-template-columns: 2.2em 1fr auto 3em; }
#offline { position: fixed; inset: auto 0 0; background: var(--bad); color: #2b0010; text-align: center; padding: 12px; font-weight: 800; }
.confetti i { position: fixed; top: -20px; width: 10px; height: 16px; z-index: 9; pointer-events: none; animation: fall 2.4s linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } .board.wrong { animation: none; } }

.rounds { display: flex; align-items: center; gap: 18px; background: var(--card); border-radius: 18px; padding: 8px 12px; }
.rounds > div { min-width: 170px; }
.rounds b { font-size: 1.6rem; }
.rounds button { width: 48px; height: 48px; border: 0; border-radius: 14px; background: var(--line); font-size: 1.6rem; font-weight: 800; cursor: pointer; }
.rounds button:disabled { opacity: .35; }
.quiz { display: grid; gap: 18px; align-content: center; text-align: center; width: 100%; }
.quiz.wrong, .sides.wrong { animation: shake .3s; }
.quiz.lock, .sides.lock { opacity: .4; }
.quiz .count { font-size: 1.3rem; font-weight: 800; color: var(--muted); }
.quiz .ask { font-size: 3.6rem; font-weight: 900; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opts button { border: 0; border-radius: 18px; background: var(--card); padding: 26px 8px; font-size: 1.4rem; font-weight: 800; cursor: pointer; touch-action: none; }
.opts.emo { grid-template-columns: repeat(4, 1fr); }
.opts.emo button { font-size: 2.4rem; padding: 16px 0; border: 2px solid var(--hot); }
.items { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; font-size: 2.6rem; padding: 18px; border-radius: 24px; background: #17306b; min-height: 160px; align-content: center; }
.sides { display: grid; grid-template-rows: 1fr 1fr; gap: 12px; width: 100%; }
.sides button { position: relative; border: 0; border-radius: 26px; background: var(--card); cursor: pointer; touch-action: none; min-height: 170px; }
.sides button i { position: absolute; width: 9%; aspect-ratio: 1; border-radius: 50%; background: var(--hot); max-height: 12%; }
.sides.words button { font-size: 2rem; font-weight: 900; }
.sides.words button:last-child { background: #17306b; }
.board.nums button { font-size: 1.9rem; font-weight: 900; }
.board.nums .used { opacity: .18; }
.board.memo button { background: var(--card); }
.board.memo .lit { background: var(--hot); }
.board.holes button { font-size: 3rem; border-radius: 50%; background: #120a30; aspect-ratio: 1; }
.board.memo, .board.holes { max-width: 380px; margin: 0 auto; }
.topbar { position: absolute; top: 14px; left: 18px; right: 18px; pointer-events: none; }
.lane { background: var(--card); display: grid; align-content: center; gap: 26px; padding: 24px; }
.track { position: relative; display: block; height: 64px; border-radius: 16px; background: #120a30; }
.track i { position: absolute; top: 0; bottom: 0; transform: translateX(-50%); }
.track .goal { width: 10%; background: var(--good); border-radius: 8px; }
.track .needle { width: 6px; background: #fff; border-radius: 4px; top: -10px; bottom: -10px; }
.lane em { font-style: normal; font-size: 1.4rem; min-height: 1.4em; }
.balloon { overflow: hidden; touch-action: none; }
.balloon .b { display: block; font-size: 4.5rem; line-height: 1.2; transform-origin: 50% 60%; }
.balloon small { margin-top: 160px; }

.range { width: 100%; margin: 0; padding: 0; border: 0; background: none; height: 44px; accent-color: var(--hot); touch-action: none; }
.quiz .ask.mid { font-size: 2.5rem; letter-spacing: .04em; }
.quiz .ask.small { font-size: 1.7rem; line-height: 1.3; white-space: pre-line; text-wrap: balance; }
.quiz .ask.emoji { font-size: 5rem; line-height: 1.3; }
.quiz .ask.dice { font-size: 4.6rem; line-height: 1.1; }
.quiz .ask.plate { justify-self: center; background: #fff; color: #111; border-left: 18px solid #1747b5; border-radius: 10px; padding: 2px 26px; }
.quiz .ask.green { background: #12803f; border-radius: 24px; }
.quiz .ask.red { background: #a3203b; border-radius: 24px; }
.quiz .ask.shadow { font-size: 6rem; line-height: 1.4; background: #e9e3ff; border-radius: 24px; filter: none; color: transparent; text-shadow: 0 0 0 #1d1147; }
.opts.long { grid-template-columns: 1fr; }
.opts.long button { padding: 18px 12px; font-size: 1.15rem; }
.opts.icons button { font-size: 2.6rem; padding: 14px 0; }
.clockface { width: min(240px, 60vw); }
.clockface circle { fill: #fff; stroke: var(--hot); stroke-width: 4; }
.clockface text { font-size: 10px; font-weight: 800; text-anchor: middle; fill: #1d1147; }
.target { justify-self: center; font-size: 2.2rem; font-weight: 900; background: var(--hot); color: var(--ink); border-radius: 18px; padding: 6px 22px; }
.board.s5 button { font-size: min(7vw, 2rem); font-weight: 800; }
.board.s6 button { font-size: min(6vw, 1.7rem); font-weight: 800; }
.board.s3 button, .board.s4 button { font-weight: 800; }
.board.round button { display: grid; place-items: center; }
.disc { display: block; aspect-ratio: 1; border-radius: 50%; background: var(--hot); }
.choices { display: grid; gap: 12px; align-content: center; width: 100%; }
.choices button { border: 0; border-radius: 20px; background: var(--card); padding: 24px 10px; font-size: 1.7rem; font-weight: 800; cursor: pointer; touch-action: none; }
.value { font-size: 3.2rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.bigbar { height: 70px; border-radius: 18px; background: var(--card); overflow: hidden; }
.bigbar i { display: block; height: 100%; background: var(--good); }
.anglebox svg { width: min(260px, 64vw); }
.anglebox path { fill: none; stroke: var(--hot); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.hues { display: grid; grid-template-columns: 1fr 1fr; height: 180px; border-radius: 24px; overflow: hidden; }
.arena { position: relative; overflow: hidden; border-radius: 28px; background: #17306b; touch-action: none; min-height: 380px; }
.arena.square { aspect-ratio: 1; align-self: center; width: 100%; min-height: 0; }
.fill { position: absolute; inset: 0; width: 100%; height: 100%; }
.fill svg { width: 100%; height: 100%; display: block; }
.fill line { stroke: var(--hot); stroke-width: 1.6; stroke-linecap: round; }
.note { position: absolute; top: 14px; left: 12px; right: 12px; text-align: center; font-size: 1.3rem; font-weight: 800; pointer-events: none; font-variant-numeric: tabular-nums; text-shadow: 0 1px 4px #0008; }
.sprite { position: absolute; transform: translate(-50%, -50%); font-size: 1.8rem; line-height: 1; pointer-events: none; }
.sprite.mid { font-size: 2.2rem; }
.sprite.big { font-size: 2.7rem; }
.sprite.huge { font-size: 3.6rem; }
.sprite.up { transform: translate(-50%, -50%) rotate(-45deg); }
.sprite.rock { transform: translate(-50%, -50%) rotate(-45deg); }
.sprite.flip { transform: translate(-50%, -50%) scaleX(-1); }
.sprite.tap { pointer-events: auto; border: 0; background: none; padding: 10px; cursor: pointer; touch-action: none; }
.sprite.fly { transition: left .22s, top .22s; }
.sprite.tag { font-size: 1.3rem; font-weight: 900; background: var(--hot); color: var(--ink); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; }
.sprite.pip { width: 18px; height: 18px; border-radius: 50%; background: var(--hot); }
.dot { position: absolute; transform: translate(-50%, -50%); width: 66px; height: 66px; border: 0; border-radius: 50%; background: var(--bad); color: #fff; font-size: 1.3rem; font-weight: 900; cursor: pointer; touch-action: none; }
.dot.moving { background: #7a6bd0; width: 72px; height: 72px; pointer-events: none; }
.dot.moving.on { background: var(--good); }
.curtain { position: absolute; left: 34%; right: 0; top: 40%; height: 20%; background: repeating-linear-gradient(90deg, #8b2440 0 18px, #a3314f 18px 36px); }
.curtain.open { opacity: .25; }
.road { position: absolute; left: 14px; right: 14px; top: 50%; height: 84px; transform: translateY(-50%); background: #120a30; border-radius: 16px; overflow: hidden; }
.road .wall { position: absolute; right: 0; top: 10px; font-size: 3.4rem; line-height: 1.2; }
.road .car { position: absolute; left: 0; top: 12px; font-size: 3.2rem; line-height: 1.2; transform: scaleX(-1); }
.ring, .grow { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); aspect-ratio: 1; border-radius: 50%; max-height: none; }
.ring { border: 5px solid var(--hot); }
.grow { background: #ffffff3d; }
.lr { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.lr button { border: 0; border-radius: 28px; background: var(--card); font-size: 1.7rem; font-weight: 900; cursor: pointer; touch-action: none; min-height: 340px; }
.lr .lit { background: var(--hot); color: var(--ink); }
.lr.lock { opacity: .4; }
.overcount { position: absolute; top: 60px; left: 0; right: 0; text-align: center; font-size: 4rem; font-weight: 900; pointer-events: none; text-shadow: 0 2px 8px #000a; }
.prize { position: absolute; inset: 0; display: grid; place-items: center; font-size: 9rem; }
.board.cards { max-width: 380px; margin: 0 auto; }
.board.cards button { font-size: 2.6rem; background: #5a43c9; }
.board.cards .up { background: #fff; }
.board.cards .got { opacity: .35; }
.board.mines { max-width: 400px; margin: 0 auto; }
.board.mines button { font-size: 1.7rem; }
.board.mines .boom { background: var(--bad); }
.finish .phone { font-size: 2.9rem; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.finish .huge { font-size: 5.5rem; }
.cup { position: absolute; width: 22%; aspect-ratio: .85; transform: translate(-50%, -50%); background: linear-gradient(#ff8a4c, #d9542b); clip-path: polygon(14% 0, 86% 0, 100% 100%, 0 100%); transition: left .4s, top .25s, transform .25s; }
.cup.up { transform: translate(-50%, -115%); }
.foot { display: flex; gap: 8px; justify-content: center; }
a.link { text-decoration: none; }
