/* WordBoom: sakin pastel, premium. Başlıklar Fraunces (serif), arayüz ve harfler Plus Jakarta Sans.
   Kural: düğmeler boştayken hareket etmez; yalnızca basınca hafif geri bildirim verir. */

:root {
  --ink: #1e3a34;
  --ink-2: #566f69;
  --ink-3: #8fa39d;
  --ivory: #fbf8f1;
  --ivory-2: #f3eee3;
  --line: rgba(30, 58, 52, .1);
  --line-2: rgba(30, 58, 52, .16);
  --forest: #24453e;
  --forest-2: #2f5a51;
  --sage: #b9d3c8;
  --clay: #c47a62;
  --clay-2: #ad654e;
  --gold: #c9a45c;
  --gold-2: #e5cd97;
  --ice: #9fd0e6;
  --glass: rgba(251, 248, 241, .72);
  --glass-line: rgba(255, 255, 255, .7);
  --shadow-s: 0 1px 2px rgba(20, 40, 36, .06), 0 4px 12px -4px rgba(20, 40, 36, .12);
  --shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 18px 40px -16px rgba(20, 40, 36, .3);
  --shadow-l: 0 30px 70px -20px rgba(20, 40, 36, .45);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.4, .64, 1);
  --serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --top: env(safe-area-inset-top, 0px);
  --bottom: env(safe-area-inset-bottom, 0px);
  --tile: 64px;
  --gap: 8px;
  font-family: var(--sans);
  color: var(--ink);
  color-scheme: light;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; background: #e3ebe5; }
body { touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; touch-action: manipulation; }
button:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; }

/* ---------- ikonlar ---------- */
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.ic.fill { fill: currentColor; stroke: none; }
.ic.gold { fill: var(--gold); stroke: none; width: 16px; height: 16px; }
.coin { display: inline-block; width: 16px; height: 16px; border-radius: 50%; flex: 0 0 auto; background: radial-gradient(circle at 35% 30%, #f6e6b8, var(--gold) 55%, #a8843f); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .45); }

/* ---------- arka plan ---------- */
.bg { position: fixed; inset: 0; z-index: 0; background: linear-gradient(180deg, #eef3ee, #dfe8e2); }
.bg-img { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 1s var(--ease); }
.bg-img.thumb { filter: blur(20px); transform: scale(1.1); }
.bg-img.on { opacity: 1; }
.bg-veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(246, 243, 236, .42) 0%, rgba(246, 243, 236, .08) 38%, rgba(246, 243, 236, .18) 70%, rgba(236, 240, 234, .62) 100%); }
#fx { position: fixed; inset: 0; z-index: 60; pointer-events: none; }

/* ---------- yerleşim ---------- */
.screen { position: fixed; inset: 0; z-index: 10; display: flex; flex-direction: column; padding: calc(var(--top) + 14px) 18px calc(var(--bottom) + 16px); }
.screen.center { align-items: center; justify-content: center; gap: 12px; }
.game, .map { padding-left: max(18px, calc(50% - 250px)); padding-right: max(18px, calc(50% - 250px)); }
.grow { flex: 1; }

/* ---------- tipografi ---------- */
.eyebrow { font-family: var(--sans); font-weight: 700; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.title { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 32px; line-height: 1.08; letter-spacing: -.01em; color: var(--ink); }
.note { margin: 0; font-weight: 500; font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.note.small { font-size: 12.5px; }
.label { font-weight: 700; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.wordmark { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 64px; line-height: 1; letter-spacing: -.02em; color: var(--ink); }
.wordmark em { font-style: italic; color: var(--clay); }
.wordmark.small { font-size: 22px; white-space: nowrap; }
.pill .sep { width: 1px; height: 16px; margin: 0 4px; background: var(--line-2); }
.topbar .icon-btn { width: 40px; height: 40px; border-radius: 13px; }
.topbar .pill { height: 40px; border-radius: 13px; }
@media (max-width: 380px) { .topbar { gap: 6px; } .topbar .wordmark.small { font-size: 19px; } .topbar .pill { padding: 0 10px; } }

/* ---------- düğmeler ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 52px; padding: 0 22px; border-radius: 16px;
  font-weight: 700; font-size: 16px; letter-spacing: .01em;
  background: var(--glass); color: var(--ink);
  border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: var(--shadow-s);
  transition: transform .12s ease, background .2s, box-shadow .2s;
}
.btn:active { transform: scale(.985); }
.btn.primary {
  background: linear-gradient(180deg, var(--forest-2), var(--forest)); color: var(--ivory);
  border-color: rgba(255, 255, 255, .08);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .14) inset, 0 14px 30px -12px rgba(20, 40, 36, .55);
}
.btn.big { min-height: 58px; font-size: 17px; }
.btn small { font-weight: 600; font-size: 13px; opacity: .75; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 14px; flex: 0 0 auto; display: grid; place-items: center; color: var(--ink);
  background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--shadow-s);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  transition: transform .12s ease;
}
.icon-btn:active { transform: scale(.95); }
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 12px;
  background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--shadow-s);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums;
}

/* ---------- açılış ---------- */
.splash { justify-content: flex-end; gap: 28px; padding-bottom: calc(var(--bottom) + 40px); }
.splash::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(246, 243, 236, 0) 38%, rgba(246, 243, 236, .78) 70%, rgba(246, 243, 236, .94) 100%); }
.splash-mark { text-align: center; animation: rise 1.2s var(--ease) both; }
.splash-mark .eyebrow { margin-bottom: 10px; }
.splash-tag { margin: 14px 0 0; font-weight: 500; font-size: 16px; color: var(--ink-2); }
.splash .btn { animation: rise 1.2s .25s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

/* ---------- harita ---------- */
.topbar { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; padding-bottom: 12px; }
.map-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; touch-action: pan-y; scrollbar-width: none; margin: 0 -18px; padding: 0 18px 24px; -webkit-mask: linear-gradient(180deg, transparent, #000 14px, #000 calc(100% - 28px), transparent); mask: linear-gradient(180deg, transparent, #000 14px, #000 calc(100% - 28px), transparent); }
.map-scroll::-webkit-scrollbar { display: none; }
.chapter { position: relative; margin-top: 6px; height: 156px; border-radius: 24px; overflow: hidden; background: var(--sage) center/cover; box-shadow: var(--shadow); }
.chapter::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 40, 36, 0) 25%, rgba(20, 40, 36, .62)); }
.chapter .ch-body { position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 1; color: var(--ivory); }
.chapter .eyebrow { color: rgba(251, 248, 241, .8); }
.chapter h2 { margin: 4px 0 10px; font-family: var(--serif); font-weight: 500; font-size: 28px; line-height: 1; }
.ch-progress { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.ch-bar { flex: 1; height: 4px; border-radius: 2px; background: rgba(251, 248, 241, .28); overflow: hidden; }
.ch-bar i { display: block; height: 100%; background: var(--gold-2); border-radius: 2px; }
.trail-map { position: relative; margin-top: 10px; }
.trail-map svg.path { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.trail-map svg.path path { fill: none; stroke: rgba(251, 248, 241, .9); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1 9; }
.trail-map svg.path path.done { stroke: var(--forest); stroke-dasharray: none; stroke-width: 2.5; opacity: .55; }
.medal { position: absolute; width: 66px; height: 66px; margin: -33px 0 0 -33px; border-radius: 50%; padding: 3px; background: var(--ivory); box-shadow: var(--shadow); transition: transform .12s ease; }
.medal:active { transform: scale(.96); }
.medal .ph { position: absolute; inset: 3px; border-radius: 50%; background: var(--sage) center/cover; overflow: hidden; }
.medal .ph::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 40, 36, .05), rgba(20, 40, 36, .45)); }
.medal .num { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; font-family: var(--serif); font-weight: 600; font-size: 24px; color: var(--ivory); text-shadow: 0 1px 8px rgba(20, 40, 36, .5); }
.medal.done { background: linear-gradient(160deg, var(--gold-2), var(--gold)); }
.medal.current { width: 86px; height: 86px; margin: -43px 0 0 -43px; padding: 4px; background: var(--forest); box-shadow: 0 0 0 6px rgba(251, 248, 241, .65), var(--shadow); }
.medal.current .ph { inset: 4px; }
.medal.current .num { font-size: 30px; }
.medal.locked { background: rgba(251, 248, 241, .6); box-shadow: var(--shadow-s); }
.medal.locked .ph { filter: grayscale(.8) blur(1.5px); opacity: .55; }
.medal.locked .num { font-size: 0; }
.medal.locked .num .ic { width: 20px; height: 20px; color: var(--ivory); }
.medal .stars { position: absolute; left: 50%; bottom: -13px; z-index: 2; transform: translateX(-50%); display: flex; gap: 1px; padding: 2px 6px; border-radius: 10px; background: var(--ivory); box-shadow: var(--shadow-s); }
.medal .stars svg { width: 11px; height: 11px; fill: var(--line-2); }
.medal .stars svg.on { fill: var(--gold); }
.medal .tagline { position: absolute; top: 50%; left: calc(100% + 12px); transform: translateY(-50%); white-space: nowrap; text-align: left; }
.medal.right .tagline { left: auto; right: calc(100% + 12px); text-align: right; }
.medal .tagline b { display: block; font-family: var(--serif); font-weight: 500; font-size: 15px; color: var(--ink); text-shadow: 0 0 10px rgba(251, 248, 241, .9); }
.medal .tagline span { font-weight: 600; font-size: 11.5px; color: var(--ink-2); text-shadow: 0 0 8px rgba(251, 248, 241, .9); }
.medal .theme { position: absolute; top: -2px; right: -2px; z-index: 2; width: 16px; height: 16px; border-radius: 50%; background: var(--gold); border: 2px solid var(--ivory); }
.map-foot { flex: 0 0 auto; padding-top: 10px; }

/* ---------- oyun ---------- */
.game { gap: 12px; }
.game-top { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.timer { position: relative; width: 58px; height: 58px; flex: 0 0 auto; border-radius: 50%; background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--shadow-s); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.timer svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.timer .track { fill: none; stroke: var(--line); stroke-width: 3; }
.timer .ring { fill: none; stroke: var(--forest); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 175.9; stroke-dashoffset: 0; transition: stroke-dashoffset .12s linear, stroke .4s; }
.timer b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); font-weight: 600; font-size: 20px; font-variant-numeric: tabular-nums; }
.timer.low .ring { stroke: var(--clay); }
.timer.low b { color: var(--clay-2); }
.timer.frozen .ring { stroke: var(--ice); }
.timer.frozen b { color: #3f86a6; }
.timer.waiting b { font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.scorebox { flex: 1; display: flex; align-items: center; gap: 14px; height: 58px; padding: 0 16px; border-radius: 18px; background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--shadow-s); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.score-line { display: flex; flex-direction: column; line-height: 1; min-width: 62px; }
.score-line b { font-family: var(--serif); font-weight: 600; font-size: 24px; font-variant-numeric: tabular-nums; }
.score-line small { margin-top: 3px; font-weight: 700; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.score-line b.bump { animation: bump .35s var(--spring); }
@keyframes bump { 40% { transform: scale(1.12); } }
.starbar { position: relative; flex: 1; height: 20px; margin-right: 9px; }
.starbar-track { position: absolute; left: 0; right: 0; top: 8px; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
#starFill { height: 100%; width: 0; border-radius: 2px; background: linear-gradient(90deg, var(--sage), var(--forest-2)); transition: width .5s var(--ease); }
.mk { position: absolute; top: 0; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; display: grid; place-items: center; background: var(--ivory); box-shadow: var(--shadow-s); }
.mk svg { width: 12px; height: 12px; fill: var(--line-2); transition: fill .3s; }
.mk.on svg { fill: var(--gold); }
.mk.on { animation: starPop .55s var(--spring); }
@keyframes starPop { 0% { transform: scale(.5); } 60% { transform: scale(1.35); } 100% { transform: scale(1); } }

.theme-chip { align-self: center; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 9px; background: rgba(201, 164, 92, .9); color: #fff; font-weight: 700; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; box-shadow: var(--shadow-s); }
.goals { flex: 0 0 auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 12px; border-radius: 20px; background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--shadow-s); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.slot { display: flex; gap: 3px; padding: 4px; border-radius: 10px; background: rgba(30, 58, 52, .045); transition: transform .3s var(--spring), background .3s; }
.slot .sc { width: 24px; height: 28px; border-radius: 7px; display: grid; place-items: center; background: rgba(255, 255, 255, .7); box-shadow: inset 0 0 0 1px var(--line); font-weight: 800; font-size: 14px; color: var(--ivory); }
.slot.theme .sc.wide { width: auto; min-width: 70px; padding: 0 10px; color: #9b7a35; font-weight: 700; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; box-shadow: inset 0 0 0 1px rgba(201, 164, 92, .35); }
.slot.filled { background: rgba(36, 69, 62, .08); }
.slot.filled .sc { background: linear-gradient(180deg, var(--forest-2), var(--forest)); box-shadow: none; }
.slot.theme.filled { background: rgba(201, 164, 92, .14); }
.slot.theme.filled .sc { background: linear-gradient(180deg, #d4b26c, var(--gold)); }
.slot.land { animation: land .45s var(--spring); }
@keyframes land { 35% { transform: scale(1.12); } }
.slot.ping { animation: ping .45s; }
@keyframes ping { 35% { transform: translateY(-3px); } }

.current { flex: 0 0 auto; height: 40px; display: grid; place-items: center; position: relative; }
.current-word {
  height: 40px; padding: 0 18px; border-radius: 12px; display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 20px; letter-spacing: .14em; color: var(--ink);
  background: var(--ivory); box-shadow: var(--shadow-s);
  opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .2s var(--ease), background .15s, color .15s;
}
.current-word.on { opacity: 1; transform: none; }
.current-word.valid { background: var(--forest); color: var(--ivory); }
.current-word.theme { background: var(--gold); color: #fff; }
.current-word.bad { animation: shake .34s; }
.current-word.dup { color: var(--ink-3); }
.current-word em { font-style: normal; font-weight: 700; font-size: 12.5px; letter-spacing: .04em; opacity: .85; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.counter { position: absolute; font-weight: 700; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); transition: opacity .15s; text-shadow: 0 0 10px rgba(251, 248, 241, .9); }
.current-word.on + .counter { opacity: 0; }

.board-wrap { position: relative; flex: 1 1 auto; min-height: 0; display: grid; place-items: center; }
.board { position: relative; padding: 12px; border-radius: 28px; display: grid; gap: var(--gap); grid-template-columns: repeat(var(--cols), var(--tile)); grid-auto-rows: var(--tile); background: rgba(251, 248, 241, .42); border: 1px solid var(--glass-line); box-shadow: var(--shadow); -webkit-backdrop-filter: blur(22px) saturate(1.2); backdrop-filter: blur(22px) saturate(1.2); }
.tile {
  position: relative; width: var(--tile); height: var(--tile); border-radius: calc(var(--tile) * .24);
  display: grid; place-items: center; font-family: var(--sans); font-weight: 700; font-size: calc(var(--tile) * .44); line-height: 1; color: var(--ink);
  background: linear-gradient(180deg, #fffefb, var(--ivory-2));
  box-shadow: 0 0 0 1px rgba(30, 58, 52, .06), 0 1px 0 #fff inset, 0 6px 14px -8px rgba(20, 40, 36, .4);
  transition: transform .16s var(--ease), box-shadow .2s, background .15s, color .15s;
}
.tile.hole { background: none; box-shadow: none; pointer-events: none; }
.tile.sel { transform: scale(.94); background: linear-gradient(180deg, #cf8a72, var(--clay)); color: var(--ivory); box-shadow: 0 8px 18px -8px rgba(173, 101, 78, .7); }
.tile.sel.valid { background: linear-gradient(180deg, var(--forest-2), var(--forest)); box-shadow: 0 8px 18px -8px rgba(20, 40, 36, .7); }
.tile.sel.theme { background: linear-gradient(180deg, #d6b56f, var(--gold)); color: #fff; box-shadow: 0 8px 18px -8px rgba(160, 125, 60, .7); }
.tile.win { animation: win .5s var(--spring) both; }
@keyframes win { 0% { transform: scale(.94); } 45% { transform: scale(1.08) translateY(-4px); } 100% { transform: none; } }
.tile.nope { animation: nope .32s; }
@keyframes nope { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.tile.hint::after { content: ''; position: absolute; inset: -4px; border-radius: calc(var(--tile) * .3); border: 2px solid var(--gold); }
.tile.intro { opacity: 0; animation: tileIn .55s var(--ease) forwards; }
@keyframes tileIn { from { opacity: 0; transform: translateY(10px) scale(.92); } to { opacity: 1; transform: none; } }
.trail { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.trail polyline { fill: none; stroke: rgba(196, 122, 98, .45); stroke-linecap: round; stroke-linejoin: round; transition: stroke .15s; }
.trail.valid polyline { stroke: rgba(36, 69, 62, .35); }
.trail.theme polyline { stroke: rgba(201, 164, 92, .5); }
.hand { position: absolute; left: 0; top: 0; width: 44px; height: 44px; margin: -8px 0 0 -12px; pointer-events: none; z-index: 5;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath d='M18 6a4 4 0 0 1 8 0v14l2-.4a4 4 0 0 1 4.6 2.6l.4 1 1.2-.2a4 4 0 0 1 4.4 3l.2.7c1.7-.2 3.6 1 3.9 2.8L44 38c.6 4.5-2.8 8-7.3 8H26c-2.4 0-4.6-1.2-6-3.2L10.5 30a3.6 3.6 0 0 1 5.4-4.7L18 27z' fill='%23fbf8f1' stroke='%231e3a34' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E");
  filter: drop-shadow(0 8px 12px rgba(20, 40, 36, .3)); transition: transform .14s linear, opacity .2s; }
.fly { position: fixed; z-index: 55; pointer-events: none; display: grid; place-items: center; font-family: var(--sans); font-weight: 800; color: var(--ivory); border-radius: 9px; background: var(--forest); box-shadow: var(--shadow-s); }
.fly.theme { background: var(--gold); }
.fly.pts { background: none; box-shadow: none; font-family: var(--serif); font-weight: 600; color: var(--forest); font-size: 22px; text-shadow: 0 0 14px rgba(251, 248, 241, 1), 0 0 4px rgba(251, 248, 241, 1); }
.fly.pts.theme { color: #a8843f; }

.game-bottom { flex: 0 0 auto; position: relative; display: flex; justify-content: center; min-height: 82px; }
.boosters { display: flex; gap: 26px; justify-content: center; align-items: flex-start; transition: opacity .2s; }
.booster { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 700; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); text-shadow: 0 0 10px rgba(251, 248, 241, 1), 0 0 3px rgba(251, 248, 241, 1); }
.booster .disc { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--shadow-s); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); transition: transform .12s ease; }
.booster:active .disc { transform: scale(.95); }
.booster .disc .ic { width: 22px; height: 22px; }
.booster .count { position: absolute; top: -4px; right: -10px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; gap: 3px; background: var(--forest); color: var(--ivory); font-size: 11px; letter-spacing: 0; box-shadow: var(--shadow-s); }
.booster .count.buy { background: var(--ivory); color: var(--ink); box-shadow: 0 0 0 1px var(--line), var(--shadow-s); }
.booster .count .coin { width: 10px; height: 10px; }
.booster.gift .disc { box-shadow: 0 0 0 2px var(--gold), var(--shadow-s); }
.booster.gift::before { content: 'Hediye'; position: absolute; top: -22px; left: 50%; transform: translateX(-50%); padding: 2px 8px; border-radius: 6px; background: var(--gold); color: #fff; font-size: 9.5px; letter-spacing: .1em; }
.finish { position: absolute; left: 50%; top: 4px; width: min(340px, 100%); transform: translateX(-50%); animation: rise .5s var(--ease); }
.game-bottom.finish-on .boosters { opacity: 0; pointer-events: none; }

.banner {
  position: fixed; left: 50%; top: 42%; z-index: 50; pointer-events: none; transform: translate(-50%, -50%); opacity: 0;
  padding: 12px 26px; border-radius: 18px; white-space: nowrap;
  font-family: var(--serif); font-weight: 500; font-size: clamp(26px, 8vw, 36px); color: var(--ivory);
  background: rgba(36, 69, 62, .92); box-shadow: var(--shadow-l); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.banner.gold { background: rgba(176, 140, 72, .94); }
.banner.coral { background: rgba(173, 101, 78, .94); }
.banner.show { animation: banner 1.5s var(--ease) forwards; }
@keyframes banner {
  0% { opacity: 0; transform: translate(-50%, -40%) scale(.96); }
  18% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  78% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -58%) scale(.98); }
}
.toast {
  position: fixed; left: 50%; bottom: calc(var(--bottom) + 122px); z-index: 45; transform: translateX(-50%);
  width: max-content; max-width: calc(100% - 36px); padding: 11px 16px; border-radius: 14px; text-align: center;
  background: rgba(30, 58, 52, .92); color: var(--ivory); font-weight: 600; font-size: 14px; line-height: 1.4;
  box-shadow: var(--shadow-l); animation: rise .35s var(--ease);
}
.freeze-fx { position: fixed; inset: 0; z-index: 5; pointer-events: none; box-shadow: inset 0 0 120px rgba(159, 208, 230, .8); animation: fadeIn .3s; }
@keyframes fadeIn { from { opacity: 0; } }

/* ---------- katmanlar ---------- */
.overlay { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; padding: calc(var(--top) + 16px) 12px calc(var(--bottom) + 12px); background: rgba(20, 40, 36, .32); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fadeIn .25s; overflow-y: auto; touch-action: pan-y; }
.sheet {
  position: relative; width: 100%; max-width: 420px; margin: auto auto 0; display: flex; flex-direction: column; gap: 14px; text-align: center;
  padding: 26px 22px 22px; border-radius: 30px; background: var(--ivory); box-shadow: var(--shadow-l); overflow: hidden;
  animation: sheetIn .45s var(--ease);
}
@media (min-height: 760px) { .sheet { margin: auto; } }
.sheet.tall { max-height: 90vh; overflow-y: auto; }
@keyframes sheetIn { from { transform: translateY(40px); opacity: 0; } }
.hero { position: relative; height: 190px; margin: -26px -22px 4px; background: var(--sage) center/cover; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(251, 248, 241, 0) 45%, var(--ivory)); }
.hero-back { position: absolute; top: 14px; left: 14px; z-index: 1; }
.meta { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; font-weight: 600; font-size: 13.5px; color: var(--ink-2); }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.meta .ic { width: 16px; height: 16px; color: var(--ink-3); }
.goal-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; border-radius: 16px; overflow: hidden; background: var(--line); box-shadow: 0 0 0 1px var(--line); }
.goal-list li { display: flex; align-items: center; gap: 12px; padding: 13px 16px; background: #fff; font-weight: 600; font-size: 15px; text-align: left; }
.goal-list li .mini-slot { display: flex; gap: 2px; flex: 0 0 auto; }
.goal-list li .mini-slot i { width: 10px; height: 12px; border-radius: 3px; background: var(--forest); opacity: .85; }
.goal-list li.theme .mini-slot i { background: var(--gold); }
.goal-list li.done { color: var(--ink-3); text-decoration: line-through; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row2 .btn { font-size: 14px; padding: 0 12px; }
.toggles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; border-radius: 14px; overflow: hidden; background: var(--line); box-shadow: 0 0 0 1px var(--line); }
.toggle { min-height: 48px; font-weight: 700; font-size: 14px; background: #fff; color: var(--ink-3); transition: background .2s, color .2s; }
.toggle[aria-pressed='true'] { background: var(--forest); color: var(--ivory); }

.result .title { font-size: 36px; }
.big-stars { display: flex; justify-content: center; align-items: flex-end; gap: 10px; height: 64px; }
.big-stars svg { width: 46px; height: 46px; fill: var(--line); }
.big-stars svg:nth-child(2) { width: 60px; height: 60px; }
.big-stars svg.on { fill: var(--gold); animation: starIn .6s var(--spring) both; }
.big-stars svg:nth-child(2).on { animation-delay: .3s; }
.big-stars svg:nth-child(3).on { animation-delay: .6s; }
@keyframes starIn { 0% { transform: scale(0); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.res-score b { display: block; font-family: var(--serif); font-weight: 500; font-size: 52px; line-height: 1; font-variant-numeric: tabular-nums; }
.tag { display: inline-block; margin-top: 8px; padding: 3px 10px; border-radius: 7px; background: rgba(201, 164, 92, .16); color: #9b7a35; font-weight: 700; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 1px; border-radius: 14px; overflow: hidden; background: var(--line); box-shadow: 0 0 0 1px var(--line); }
.stats div { padding: 10px 8px; background: #fff; font-weight: 600; font-size: 12px; color: var(--ink-2); }
.stats b { display: block; font-family: var(--serif); font-weight: 600; font-size: 20px; color: var(--ink); }
.word-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 8px; }
.word-chips span { padding: 4px 10px; border-radius: 8px; background: #fff; box-shadow: 0 0 0 1px var(--line); font-weight: 700; font-size: 12.5px; letter-spacing: .08em; }
.word-chips span.theme { color: #9b7a35; box-shadow: 0 0 0 1px rgba(201, 164, 92, .45); }
.reward { display: flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--serif); font-weight: 600; font-size: 20px; }
.reward .coin { width: 20px; height: 20px; }
.reward .tag { margin: 0 0 0 4px; font-family: var(--sans); }
.next-card { display: flex; align-items: center; gap: 14px; padding: 8px; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px var(--line); text-align: left; }
.next-card .thumb { width: 58px; height: 58px; border-radius: 13px; background: var(--sage) center/cover; flex: 0 0 auto; }
.next-card b { display: block; font-family: var(--serif); font-weight: 500; font-size: 17px; }
.next-card span { font-weight: 600; font-size: 12.5px; color: var(--ink-2); }
.book-themes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.book-theme { padding: 10px 12px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--line); text-align: left; }
.book-theme b { display: block; font-family: var(--serif); font-weight: 500; font-size: 15px; }
.book-theme small { font-weight: 700; font-size: 11.5px; color: var(--ink-2); }
.book-theme .bar { height: 3px; margin-top: 6px; border-radius: 2px; background: var(--line); overflow: hidden; }
.book-theme .bar i { display: block; height: 100%; background: var(--gold); }
.loader { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--forest); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-height: 690px) {
  .goals { padding: 8px; gap: 6px; }
  .slot .sc { width: 21px; height: 25px; font-size: 13px; }
  .booster .disc { width: 48px; height: 48px; }
  .game { gap: 8px; }
  .chapter { height: 120px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
