/* =========================================================
   Benek'le Öğrenelim — keçe pano görünümü
   Her parça kesilmiş keçe gibidir: düzensiz köşe, sert gölge,
   içinde kesik çizgili dikiş.
   ========================================================= */

:root {
  --felt: #3F6FB5;        /* pano: mavi keçe */
  --felt-deep: #2C5592;
  --paper: #FFF8EC;       /* kartlar */
  --ink: #1E2340;         /* yazı, benekler */
  --red: #E5322D;         /* uğur böceği */
  --sun: #FFC53D;         /* yıldız, vurgu */
  --leaf: #5DBB63;        /* doğru */
  --orange: #FF8A3D;
  --pink: #F07FB4;
  --violet: #8A6CF0;
  --teal: #2FA39A;
  --muted: #5B607C;

  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .5 -.18'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");

  --cut: 28px 36px 30px 38px / 34px 28px 38px 30px;
  --cut-lg: 44px 56px 48px 60px / 52px 44px 58px 46px;
  --shadow: 0 6px 0 rgba(18, 24, 58, .22), 0 16px 26px -10px rgba(18, 24, 58, .38);
  --shadow-sm: 0 4px 0 rgba(18, 24, 58, .22), 0 10px 18px -10px rgba(18, 24, 58, .38);

  --display: 'Grandstander', ui-rounded, 'SF Pro Rounded', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --body: 'Andika', ui-rounded, 'SF Pro Rounded', system-ui, sans-serif;

  --card-w: clamp(84px, min(11vw, 15vh), 124px);
  --card-h: clamp(98px, min(13vw, 18vh), 144px);
  --eq-h: clamp(70px, 13vh, 112px);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }

body {
  margin: 0;
  background-color: var(--felt);
  background-image:
    radial-gradient(130% 100% at 50% 30%, rgba(255, 255, 255, .08), transparent 45%, rgba(8, 16, 52, .34) 100%),
    var(--noise);
  font-family: var(--body);
  color: var(--ink);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0;
  cursor: pointer; touch-action: manipulation;
}
:focus { outline: none; }
:focus-visible { outline: 4px solid var(--sun); outline-offset: 4px; border-radius: 16px; }
svg { display: block; }

#app { position: relative; height: 100vh; height: 100dvh; overflow: hidden; }

.screen {
  position: absolute; inset: 0; display: none;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.screen.active { display: flex; flex-direction: column; animation: screenIn .35s ease-out; }

/* ---------- Ortak parçalar ---------- */

.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: clamp(10px, 2vh, 18px) clamp(14px, 3vw, 32px) 6px;
}
.bar-right { display: flex; align-items: center; gap: 12px; }

.icon-btn {
  flex: none; position: relative;
  width: clamp(52px, 7.5vh, 66px); aspect-ratio: 1;
  border-radius: 50%;
  background-color: var(--paper); background-image: var(--noise);
  box-shadow: var(--shadow-sm);
  display: grid; place-items: center;
  transition: transform .15s;
}
.icon-btn::before {
  content: ""; position: absolute; inset: 5px; border-radius: 50%;
  border: 2px dashed rgba(30, 35, 64, .22); pointer-events: none;
}
.icon-btn svg { width: 50%; height: 50%; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:active { transform: translateY(3px); }
/* Tam ekran düğmesi: tam ekrandayken "küçült" simgesi görünür. */
[data-tam-ekran][hidden] { display: none; }
[data-tam-ekran] .fs-kapat, [data-tam-ekran][aria-pressed="true"] .fs-ac { display: none; }
[data-tam-ekran][aria-pressed="true"] .fs-kapat { display: block; }

.stars {
  display: flex; align-items: center; gap: 6px;
  height: clamp(46px, 6.5vh, 56px); padding: 0 18px 0 10px;
  border-radius: 999px; background: var(--paper); box-shadow: var(--shadow-sm);
  font: 900 clamp(20px, 3vh, 26px)/1 var(--display); color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stars svg { width: 30px; height: 30px; fill: var(--sun); stroke: #D99A00; stroke-width: 1.4; stroke-linejoin: round; }
.stars.bump { animation: bump .45s; }

/* Kesik kâğıt harfli başlık */
.cut-title { margin: 0; font-family: var(--display); font-weight: 900; line-height: .95; text-align: center; }
.cut-title .w1, .cut-title .w2 { white-space: nowrap; }
.cut-title .w1 { color: var(--sun); }
.cut-title .w2 { color: var(--paper); }
.cut-title .ch {
  display: inline-block;
  transform: rotate(var(--r, 0deg)) translateY(var(--y, 0));
  text-shadow: 0 5px 0 var(--felt-deep), 0 10px 14px rgba(10, 20, 60, .35);
}
.cut-title-sm { font-size: clamp(24px, 3.6vw, 40px); text-align: left; }
.cut-title-sm .ch { text-shadow: 0 3px 0 var(--felt-deep); }

.screen-title { margin: 0; font: 900 clamp(24px, 4vh, 36px)/1 var(--display); color: var(--paper); text-shadow: 0 3px 0 var(--felt-deep); }

.bubble {
  margin: 0; position: relative; max-width: 360px;
  background: var(--paper); color: var(--ink);
  border-radius: 26px 30px 28px 10px;
  padding: 12px 18px;
  font-size: clamp(16px, 2.3vh, 21px); line-height: 1.3;
  box-shadow: var(--shadow-sm);
}
.bubble::after {
  content: ""; position: absolute; left: -12px; bottom: 14px;
  border-style: solid; border-width: 10px 14px 10px 0;
  border-color: transparent var(--paper) transparent transparent;
}
.bubble:empty { visibility: hidden; }
.bubble.in { animation: bubbleIn .3s ease-out; }
.bubble-lg { font-size: clamp(18px, 2.8vh, 25px); max-width: 440px; }
.bubble-center { border-radius: 26px; text-align: center; }
.bubble-center::after { display: none; }

/* ---------- Benek (maskot) ---------- */

.benek { display: block; flex: none; animation: bob 3.2s ease-in-out infinite; }
.benek svg { width: 100%; height: auto; overflow: visible; }
.benek .b-eyes { transform-box: fill-box; transform-origin: center; animation: blink 5s infinite; }
.benek .b-spot { transition: fill .2s; }
.benek .b-spot.lit { fill: var(--sun); }
.benek.happy { animation: hop .55s ease-out 2; }
.benek.think { animation: tilt .9s ease-in-out; }
.benek.dance { animation: dance 1.1s ease-in-out infinite; }
.benek.jump { animation: hop .6s ease-out; }
.benek-xl { width: min(34vh, 260px); }
.benek-lg { width: clamp(110px, 22vh, 190px); }
.benek-sm { width: clamp(64px, 11vh, 96px); }

/* ---------- Açılış ---------- */

.splash {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(12px, 3vh, 28px); padding: 24px; text-align: center;
}
.splash .cut-title { font-size: clamp(46px, 9.5vw, 104px); }
.play-btn {
  position: relative;
  width: clamp(96px, 16vh, 132px); aspect-ratio: 1; border-radius: 50%;
  background-color: var(--red); background-image: var(--noise);
  box-shadow: var(--shadow);
  display: grid; place-items: center;
  transition: transform .15s;
}
.play-btn::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; border: 3px dashed rgba(255, 255, 255, .8); }
.play-btn::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 4px solid var(--sun); animation: ring 1.8s ease-out infinite; }
.play-btn svg { width: 44%; fill: var(--paper); margin-left: 8%; }
.play-btn:active { transform: scale(.95); }
.splash-note { margin: 0; color: var(--paper); opacity: .85; font-size: clamp(14px, 2vh, 18px); }

/* ---------- Ana sayfa ---------- */

.home-hero {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(16px, 3vw, 34px);
  padding: clamp(0px, 1.5vh, 16px) 24px 0;
}

.patches {
  /* İçerikten küçük olmasın: sığmazsa kartlar sekmelere binmek yerine sayfa kayar. */
  flex: 1 0 auto;
  display: flex; align-items: center; align-content: center; justify-content: center; flex-wrap: wrap;
  gap: clamp(12px, 2.2vw, 26px);
  padding: 8px clamp(14px, 3vw, 40px) clamp(60px, 10vh, 90px);
  --pw: clamp(118px, min(15vw, 26vh), 180px);
}
.patch {
  --c: var(--sun); --t: var(--ink);
  position: relative;
  width: var(--pw); aspect-ratio: 1 / 1.06;
  background-color: var(--c); background-image: var(--noise);
  border-radius: var(--cut); box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(2px, .8vh, 8px); padding: 14px 10px;
  transform: rotate(var(--r, 0deg)) translateY(var(--dy, 0px));
  transition: transform .22s cubic-bezier(.3, 1.4, .5, 1);
}
.patch::before {
  content: ""; position: absolute; inset: 9px; border-radius: inherit;
  border: 3px dashed rgba(255, 255, 255, .8); pointer-events: none;
}
.patch:nth-child(odd) { --r: -2.5deg; --dy: 12px; }
.patch:nth-child(even) { --r: 2deg; --dy: -6px; }
.patch:hover { transform: rotate(0deg) translateY(calc(var(--dy) - 6px)); }
.patch:active { transform: rotate(var(--r)) translateY(calc(var(--dy) + 4px)) scale(.97); }
.patch .ico { font-size: calc(var(--pw) * .38); line-height: 1; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .14)); }
.patch .lbl { font: 900 calc(var(--pw) * .118)/1.05 var(--display); color: var(--t); text-align: center; max-width: 9ch; }
.pips { display: flex; gap: 5px; }
.pips i { width: 9px; height: 9px; border-radius: 50%; background: color-mix(in srgb, var(--t) 22%, transparent); }
.pips i.on { background: var(--t); }

.gate {
  position: absolute; right: clamp(12px, 2vw, 24px);
  bottom: calc(clamp(12px, 2vh, 24px) + env(safe-area-inset-bottom));
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  display: grid; place-items: center;
  touch-action: none;
}
.gate-ico { width: 24px; height: 24px; fill: none; stroke: var(--paper); stroke-width: 2.2; stroke-linecap: round; opacity: .8; }
.gate-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.gate-ring circle { fill: none; stroke: var(--sun); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; }
.gate.holding .gate-ring circle { stroke-dashoffset: 0; transition: stroke-dashoffset 2s linear; }
.gate-hint {
  position: absolute; right: 66px; white-space: nowrap;
  background: var(--ink); color: var(--paper); font-size: 14px;
  padding: 7px 11px; border-radius: 10px;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.gate-hint.show { opacity: 1; }

/* ---------- Oyun ekranı ---------- */

#play.active { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; }
#play > .bar { grid-row: 1; }
#play > .equation { grid-row: 2; }
#play > .stage { grid-row: 3; }
#play > .dock { grid-row: 4; }

.progress { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(6px, 1.2vw, 12px); }
.progress i { width: clamp(20px, 3.2vh, 28px); aspect-ratio: 1; border-radius: 50%; border: 3px dashed rgba(255, 255, 255, .55); }
.progress i.done { background: var(--red); border: 3px solid var(--ink); animation: pop .4s; }
.progress i.current { border: 3px solid var(--sun); animation: pulse 1.4s ease-in-out infinite; }

.equation {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(8px, 1.4vw, 16px);
  min-height: var(--eq-h); padding: 2px 16px 10px;
}
#play[data-eq="off"] .equation { display: none; }
.eq-term {
  min-width: clamp(60px, 9vh, 92px); padding: 6px 16px 9px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background-color: var(--paper); background-image: var(--noise);
  border-radius: var(--cut); box-shadow: var(--shadow-sm);
  font: 700 clamp(32px, 6.4vh, 60px)/1 var(--body);
  animation: cardIn .4s cubic-bezier(.3, 1.5, .5, 1) backwards;
}
.eq-op { font: 900 clamp(30px, 6vh, 54px)/1 var(--display); color: var(--paper); text-shadow: 0 4px 0 var(--felt-deep); }
.eq-q { background: rgba(255, 255, 255, .14); box-shadow: none; outline: 3px dashed var(--sun); outline-offset: -3px; color: var(--paper); }
.eq-q.filled { background-color: var(--leaf); outline: 0; color: #fff; box-shadow: var(--shadow-sm); animation: pop .45s; }

.stage { position: relative; min-height: 0; margin: 0 clamp(12px, 3vw, 36px); }
.scene {
  position: absolute; inset: 0; overflow: hidden;
  border-radius: var(--cut-lg);
  background-color: var(--scene, #FFE39A); background-image: var(--noise);
  box-shadow: var(--shadow);
}
.scene::before {
  content: ""; position: absolute; inset: 12px; border-radius: inherit;
  border: 3px dashed rgba(255, 255, 255, .7); pointer-events: none;
}

.dock {
  display: grid; grid-template-columns: auto minmax(0, 340px) 1fr; align-items: center;
  gap: clamp(8px, 1.5vw, 18px);
  padding: clamp(8px, 1.6vh, 14px) clamp(14px, 3vw, 36px) clamp(10px, 2vh, 18px);
  min-height: calc(var(--card-h) + 28px);
}
.answers { display: flex; justify-content: center; gap: clamp(10px, 2vw, 22px); }

.answer {
  position: relative;
  width: var(--card-w); height: var(--card-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  background-color: var(--paper); background-image: var(--noise);
  border-radius: var(--cut); box-shadow: var(--shadow);
  transition: opacity .3s, transform .3s;
  animation: cardIn .45s cubic-bezier(.3, 1.5, .5, 1) backwards; animation-delay: var(--d, 0s);
}
.answer::before { content: ""; position: absolute; inset: 7px; border-radius: inherit; border: 3px dashed rgba(30, 35, 64, .2); pointer-events: none; }
.answer .num { font: 700 calc(var(--card-h) * .46)/1 var(--body); color: var(--ink); }
.answer.wrong { opacity: .5; animation: wobble .5s; }
.answer.right { background-color: var(--leaf); animation: pop .45s; }
.answer.right .num { color: #fff; }
.answer.right .dots i { background: #fff; }
.answer.fade { opacity: .35; scale: .92; }
.answer.glow { opacity: 1; animation: glow 1.1s ease-in-out infinite; }

.dots { display: grid; grid-template-columns: repeat(var(--cols, 5), var(--d, 9px)); gap: 3px; justify-content: center; }
.dots i { width: var(--d, 9px); aspect-ratio: 1; border-radius: 50%; background: var(--ink); transition: transform .2s, box-shadow .2s; }
.answer .dots { --d: clamp(7px, 1.2vh, 10px); }
.eq-term .dots { --d: clamp(9px, 1.6vh, 13px); }
.dots.d1 i { background: var(--red); }
.dots.d2 i { background: var(--felt); }
.dots i.lit { transform: scale(1.45); box-shadow: 0 0 0 3px var(--sun); }

.tag {
  position: absolute; top: -8px; right: -8px; z-index: 2;
  min-width: 32px; height: 32px; padding: 0 6px; border-radius: 16px;
  background: var(--ink); color: var(--paper);
  font: 700 19px/32px var(--body); text-align: center;
  transform: scale(0); transition: transform .25s cubic-bezier(.3, 1.6, .5, 1);
  pointer-events: none;
}
.counted > .tag { transform: scale(1); }

.hand-hint { position: absolute; z-index: 30; font-size: 52px; line-height: 1; margin: -6px 0 0 -18px; pointer-events: none; filter: drop-shadow(0 6px 4px rgba(0, 0, 0, .25)); }

/* --- Say Bakalım --- */
.scene-say { --scene: #FFE39A; --obj: clamp(58px, min(9vw, 13vh), 92px); }
.obj {
  position: absolute; z-index: 1;
  width: var(--obj); height: var(--obj);
  margin: calc(var(--obj) / -2) 0 0 calc(var(--obj) / -2);
  display: grid; place-items: center; border-radius: 50%;
  transition: background-color .2s, box-shadow .2s;
}
.obj .emo { font-size: calc(var(--obj) * .72); line-height: 1; transform: rotate(var(--tilt, 0deg)); filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .14)); pointer-events: none; }
.obj.counted { background-color: rgba(255, 255, 255, .6); box-shadow: 0 0 0 4px var(--ink); }

/* --- Hayvan Otobüsü --- */
.scene-bus { --scene: #BDE3FF; --seat: clamp(40px, min(6.6vw, 9.5vh), 74px); display: flex; flex-direction: column; }
.bus-row {
  position: relative; z-index: 1; flex: 1;
  /* wrap-reverse: dar ekranda durak otobüsün üstüne geçer; çapraz eksen ters döndüğü için flex-start = alt */
  display: flex; flex-wrap: wrap-reverse; align-items: flex-start; align-content: flex-start; justify-content: center;
  gap: 12px clamp(12px, 4vw, 56px); padding: 20px 24px 0;
}
.road {
  position: relative; z-index: 0; height: 22%; min-height: 40px;
  background: #6E7391 repeating-linear-gradient(90deg, transparent 0 40px, rgba(255, 248, 236, .85) 40px 80px) center / 100% 6px no-repeat;
}
.bus {
  position: relative;
  background-color: var(--sun); background-image: var(--noise);
  border-radius: 22px 54px 16px 16px;
  padding: calc(var(--seat) * .24) calc(var(--seat) * 1.08) calc(var(--seat) * .5) calc(var(--seat) * .28);
  margin-bottom: calc(var(--seat) * -.1);
  box-shadow: 0 6px 0 rgba(18, 24, 58, .25);
  transition: transform .2s, box-shadow .2s;
}
.bus::before { content: ""; position: absolute; inset: 6px; border-radius: inherit; border: 3px dashed rgba(255, 255, 255, .75); pointer-events: none; }
.bus.drop-hover { transform: scale(1.03); box-shadow: 0 0 0 6px rgba(255, 255, 255, .85), 0 6px 0 rgba(18, 24, 58, .25); }
.bus.drive { animation: drive 1.1s cubic-bezier(.5, 0, .8, .4) forwards; }
.seats { display: grid; grid-template-columns: repeat(5, var(--seat)); grid-auto-rows: var(--seat); gap: calc(var(--seat) * .12); }
.seat { position: relative; border-radius: 12px; background: #E3F3FF; border: 3px dashed rgba(30, 35, 64, .28); display: grid; place-items: center; }
.seat.has-a { background: #FFE9D6; border-style: solid; border-color: rgba(30, 35, 64, .16); }
.seat.has-b { background: #FFE0EE; border-style: solid; border-color: rgba(30, 35, 64, .16); }
.bus-front {
  position: absolute; right: calc(var(--seat) * .2); top: calc(var(--seat) * .24);
  width: calc(var(--seat) * .66); height: calc(var(--seat) * 1.25);
  background: #E3F3FF; border-radius: 10px 32px 10px 10px;
}
.bus-light { position: absolute; right: calc(var(--seat) * .16); bottom: calc(var(--seat) * .2); width: calc(var(--seat) * .26); aspect-ratio: 1; border-radius: 50%; background: #FFF6C9; box-shadow: 0 0 0 3px rgba(30, 35, 64, .15); }
.wheel {
  position: absolute; bottom: calc(var(--seat) * -.42);
  width: calc(var(--seat) * .82); aspect-ratio: 1; border-radius: 50%;
  background: var(--ink); box-shadow: inset 0 0 0 calc(var(--seat) * .17) #4A4F6A;
}
.wheel.w1 { left: 12%; }
.wheel.w2 { right: 14%; }
.stop { display: flex; align-items: flex-end; gap: 10px; }
.stop-pole { position: relative; width: 8px; height: calc(var(--seat) * 2.7); background: #4A4F6A; border-radius: 4px; }
.stop-sign {
  position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
  background: var(--leaf); color: #fff; font: 900 13px/1 var(--display); letter-spacing: .06em;
  padding: 7px 9px; border-radius: 9px; box-shadow: 0 3px 0 rgba(0, 0, 0, .18);
}
.queue { display: grid; grid-template-columns: repeat(3, var(--seat)); gap: 6px; align-items: end; }
.pas {
  position: relative; width: var(--seat); height: var(--seat);
  display: grid; place-items: center; border-radius: 50%;
  font-size: calc(var(--seat) * .66); line-height: 1;
}
.pas .emo { pointer-events: none; }
.seat .pas { width: 100%; height: 100%; }
.pas.waiting { touch-action: none; cursor: grab; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .18)); }
.pas.waiting.lifted { z-index: 20; cursor: grabbing; filter: drop-shadow(0 14px 8px rgba(0, 0, 0, .28)); }
.pas.counted { background: rgba(255, 255, 255, .7); }

/* --- Uğur Böceği --- */
.scene-leaf { --scene: #7CC56A; }
.ugur-row {
  position: relative; z-index: 1; height: 100%;
  display: flex; align-items: center; justify-content: center;
  gap: clamp(10px, 3vw, 40px); padding: 18px;
}
.ugur-svg { flex: 0 1 auto; min-width: 0; height: 100%; width: auto; max-width: 56%; overflow: visible; }
.ugur-svg.fly { animation: flyAway 1.3s ease-in forwards; }
.numcard {
  flex: none; position: relative;
  width: var(--card-w); height: var(--card-h);
  display: grid; place-items: center;
  background-color: var(--paper); background-image: var(--noise);
  border-radius: var(--cut); box-shadow: var(--shadow);
  transition: transform .3s, box-shadow .3s, background-color .3s, opacity .3s;
}
.numcard .num { font: 700 calc(var(--card-h) * .5)/1 var(--body); }
.numcard.dim { opacity: .6; }
.numcard.active { box-shadow: 0 0 0 7px var(--sun), var(--shadow); transform: translateY(-4px) rotate(-2deg); }
.numcard.done { background-color: var(--leaf); color: #fff; }
.numcard.done::after {
  content: "✓"; position: absolute; top: -12px; right: -12px;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--ink); color: var(--paper);
  display: grid; place-items: center; font: 700 20px/1 var(--body);
}
.wing { fill: var(--red); stroke: var(--ink); stroke-width: 5; stroke-linejoin: round; transition: opacity .3s; }
.wing-g { cursor: pointer; outline: none; transition: opacity .3s; }
.wing-g.active .wing { animation: wingGlow 1.3s ease-in-out infinite; }
.wing-g:focus-visible .wing { stroke: var(--sun); stroke-width: 10; }
.spot circle { fill: var(--ink); }
.spot text { fill: var(--paper); font: 700 17px var(--body); opacity: 0; pointer-events: none; }
.spot.counted circle { stroke: var(--sun); stroke-width: 4; }
.spot.counted text { opacity: 1; }
.spot-in { transform-box: fill-box; transform-origin: center; animation: spotIn .38s cubic-bezier(.3, 1.6, .5, 1) both; }

/* --- Kurbağa Zıplasın --- */
.scene-pond { --scene: #2FA39A; }
.scene-pond::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 120px 26px at 18% 22%, transparent 60%, rgba(255, 255, 255, .18) 62% 66%, transparent 68%),
    radial-gradient(ellipse 90px 20px at 84% 86%, transparent 60%, rgba(255, 255, 255, .16) 62% 66%, transparent 68%);
}
.pads {
  position: absolute; z-index: 1; top: 58%;
  left: clamp(16px, 4%, 48px); right: clamp(16px, 4%, 48px);
  display: flex; justify-content: center; gap: clamp(4px, 1vw, 12px);
}
.pad {
  position: relative; flex: 1 1 0; max-width: 96px; aspect-ratio: 1;
  display: grid; place-items: center;
  font: 700 clamp(18px, min(3vw, 4.6vh), 34px)/1 var(--body); color: var(--ink);
  filter: drop-shadow(0 5px 0 rgba(0, 40, 40, .28));
}
.pad .leaf {
  position: absolute; inset: 0; border-radius: 50%;
  background-color: #8FD67F; background-image: var(--noise);
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .12);
  -webkit-mask: conic-gradient(from 22deg, transparent 0 32deg, #000 0);
  mask: conic-gradient(from 22deg, transparent 0 32deg, #000 0);
  transition: background-color .3s;
}
.pad .n { position: relative; }
.pad.start .leaf { background-color: #FFE07A; }
.pad.visited .leaf { background-color: #C7EFB9; }
.pad.goal .leaf { background-color: var(--sun); }
.frog {
  --f: clamp(48px, min(7vw, 10vh), 84px);
  position: absolute; z-index: 4; left: 0; top: 0;
  width: var(--f); height: var(--f);
  margin: calc(var(--f) * -1) 0 0 calc(var(--f) / -2);
  display: grid; place-items: center;
  font-size: calc(var(--f) * .86); line-height: 1;
  filter: drop-shadow(0 5px 0 rgba(0, 0, 0, .2));
}
.frog.nudge::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 4px solid var(--sun); animation: ring 1.6s ease-out infinite; }
.arcs { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; overflow: visible; }
.arc { fill: none; stroke: var(--sun); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 1 11; }
.hop-tray {
  position: absolute; z-index: 3; top: clamp(20px, 9%, 48px); left: 50%; transform: translateX(-50%);
  display: flex; gap: 12px; padding: 10px 18px 12px; border-radius: 999px;
  background: rgba(14, 60, 58, .28);
}
.hop-tok { width: clamp(38px, 6vh, 52px); height: auto; overflow: visible; transition: opacity .3s, transform .3s; }
.hop-tok path { fill: none; stroke: var(--sun); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 1 8; }
.hop-tok.used { opacity: .3; transform: scale(.8); }
.hop-tok.used path { stroke: var(--paper); }

/* --- Balon Patlat --- */
.scene-sky { --scene: #A8DAFF; }
.cloud { position: absolute; z-index: 0; background: #fff; opacity: .85; border-radius: 999px; height: clamp(26px, 5.5vh, 46px); }
.cloud::before, .cloud::after { content: ""; position: absolute; background: inherit; border-radius: 50%; }
.cloud::before { width: 55%; aspect-ratio: 1; left: 14%; bottom: 30%; }
.cloud::after { width: 38%; aspect-ratio: 1; right: 14%; bottom: 36%; }
.cloud.c1 { width: 150px; left: 8%; top: 16%; }
.cloud.c2 { width: 110px; right: 12%; top: 10%; }
.cloud.c3 { width: 130px; right: 30%; top: 46%; opacity: .6; }
.balloon {
  --bw: clamp(78px, min(11vw, 17vh), 124px);
  position: absolute; bottom: 0; z-index: 2;
  width: var(--bw); height: calc(var(--bw) * 1.2);
  margin-left: calc(var(--bw) / -2);
  will-change: transform;
  transition: opacity .3s;
}
.balloon::after { content: ""; position: absolute; top: calc(100% + 6px); left: 50%; width: 2px; height: calc(var(--bw) * .7); background: rgba(30, 35, 64, .45); }
.bal-body {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  border-radius: 50% 50% 47% 53% / 56% 56% 44% 44%;
  background-color: var(--bc);
  background-image: radial-gradient(circle at 30% 26%, rgba(255, 255, 255, .5) 0 10%, transparent 11%), var(--noise);
  box-shadow: inset -8px -12px 0 rgba(0, 0, 0, .12);
  font: 700 calc(var(--bw) * .52)/1 var(--body); color: var(--paper);
  text-shadow: 0 3px 0 rgba(0, 0, 0, .18);
}
.bal-body::after {
  content: ""; position: absolute; left: 50%; top: 100%; margin-left: -8px;
  border-style: solid; border-width: 0 8px 10px; border-color: transparent transparent var(--bc);
  transform: translateY(-3px);
}
.balloon.wrong { opacity: .55; }
.balloon.wrong .bal-body { animation: wobble .5s; }
.balloon.glow { opacity: 1; }
.balloon.glow .bal-body { animation: glowB 1.1s ease-in-out infinite; }
.balloon.popped .bal-body { animation: popOut .28s ease-out forwards; }
.balloon.popped::after { opacity: 0; }

/* ---------- Ödül, mola ---------- */

.reward, .break {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(10px, 2.4vh, 24px); padding: 24px; text-align: center;
}
.reward-card {
  position: relative;
  padding: clamp(14px, 2.4vh, 22px) clamp(26px, 5vw, 48px) clamp(16px, 2.6vh, 24px);
  background-color: var(--paper); background-image: var(--noise);
  border-radius: var(--cut-lg); box-shadow: var(--shadow);
}
.reward-card::before { content: ""; position: absolute; inset: 9px; border-radius: inherit; border: 3px dashed rgba(30, 35, 64, .18); pointer-events: none; }
.reward-kicker { margin: 0; font: 900 clamp(24px, 4.4vh, 40px)/1.1 var(--display); }
.sticker {
  width: clamp(110px, 22vh, 176px); aspect-ratio: 1; margin: clamp(10px, 2vh, 18px) auto;
  border-radius: 50%; background: #fff;
  display: grid; place-items: center;
  box-shadow: 0 0 0 8px var(--sun), var(--shadow);
  animation: peel .9s cubic-bezier(.3, 1.5, .5, 1) .25s both;
}
.sticker span { font-size: clamp(64px, 13vh, 104px); line-height: 1; }
.reward-name { margin: 0; font: 900 clamp(20px, 3.2vh, 28px)/1.1 var(--display); color: var(--red); }
.reward-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(10px, 2vw, 20px); }
.big-btn {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-width: clamp(104px, 14vw, 136px); padding: 14px 16px 12px;
  background-color: var(--paper); background-image: var(--noise);
  border-radius: var(--cut); box-shadow: var(--shadow);
  font: 900 clamp(15px, 2.2vh, 19px)/1 var(--display);
  transition: transform .15s;
}
.big-btn svg { width: clamp(34px, 5vh, 44px); height: clamp(34px, 5vh, 44px); fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.big-btn:active { transform: translateY(3px); }
.big-btn.primary { background-color: var(--red); color: var(--paper); }
.big-btn.primary svg { stroke: var(--paper); }
.big-btn.primary svg path[d^="M8.5 5.6"] { fill: var(--paper); stroke: none; }
.break-num { min-height: 1em; font: 900 clamp(80px, 18vh, 160px)/1 var(--display); color: var(--sun); text-shadow: 0 6px 0 var(--felt-deep); }
.break-num.pop { animation: pop .45s; }

/* ---------- Albüm ---------- */

.album-book {
  position: relative; flex: 1; min-height: 0; overflow: auto;
  margin: 8px clamp(14px, 4vw, 60px) clamp(14px, 3vh, 30px);
  padding: clamp(18px, 3vw, 34px);
  background-color: var(--paper); background-image: var(--noise);
  border-radius: var(--cut-lg); box-shadow: var(--shadow);
}
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(96px, 13vw, 140px), 1fr)); gap: clamp(14px, 2vw, 24px); }
.slot {
  position: relative; aspect-ratio: 1; border-radius: 50%;
  container-type: inline-size;
  border: 3px dashed rgba(30, 35, 64, .22);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.slot .q { font: 900 40px/1 var(--display); color: rgba(30, 35, 64, .18); }
.slot.got { border: 0; background: #fff; box-shadow: 0 0 0 6px var(--c), var(--shadow-sm); transform: rotate(var(--r, 0deg)); }
.slot .stk { font-size: clamp(40px, 7vh, 62px); font-size: 44cqi; line-height: 1; }
.slot .nm { font: 700 clamp(12px, 1.8vh, 15px)/1.1 var(--body); font-size: clamp(12px, 11cqi, 17px); }
.slot .x { position: absolute; top: -4px; right: -4px; background: var(--red); color: #fff; font: 700 14px/1 var(--body); padding: 5px 8px; border-radius: 12px; }

/* ---------- Ebeveyn alanı ---------- */

.sheet {
  flex: 1; min-height: 0; display: flex; flex-direction: column;
  width: min(1000px, calc(100% - 24px)); margin: clamp(10px, 2vh, 20px) auto;
  background: var(--paper); border-radius: 28px; box-shadow: var(--shadow); overflow: hidden;
}
.sheet-head { display: flex; align-items: center; gap: 16px; padding: 14px 22px; border-bottom: 2px dashed rgba(30, 35, 64, .14); }
.sheet-head .icon-btn { width: 52px; }
.eyebrow { margin: 0 0 2px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sheet-head h2 { margin: 0; font: 900 clamp(20px, 3vw, 26px)/1.1 var(--display); }
.sheet-body { overflow: auto; padding: 4px 22px 40px; user-select: text; -webkit-user-select: text; }
.block { padding: 20px 0; border-bottom: 2px dashed rgba(30, 35, 64, .12); }
.block:last-child { border-bottom: 0; }
.block h3 { margin: 0 0 10px; font: 900 20px/1.2 var(--display); }
.field { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 0; }
.field-label b { display: block; font-size: 16px; }
.field-label span { display: block; margin-top: 3px; font-size: 14px; line-height: 1.45; color: var(--muted); max-width: 60ch; }
.seg { flex: none; display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: #EFE7D6; }
.seg button { min-width: 54px; padding: 9px 12px; border-radius: 10px; font: 700 15px/1 var(--body); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.toggle { flex: none; position: relative; width: 60px; height: 34px; border-radius: 17px; background: #D7CFBF; transition: background-color .2s; }
.toggle::after { content: ""; position: absolute; top: 4px; left: 4px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .2); transition: transform .2s; }
.toggle[aria-checked="true"] { background: var(--leaf); }
.toggle[aria-checked="true"]::after { transform: translateX(26px); }
.table-wrap { overflow-x: auto; }
.stats { width: 100%; border-collapse: collapse; font-size: 15px; }
.stats th, .stats td { padding: 10px 8px; border-bottom: 1px solid rgba(30, 35, 64, .1); text-align: left; }
.stats thead th { font-size: 13px; color: var(--muted); font-weight: 700; }
.stats td { text-align: center; font-variant-numeric: tabular-nums; }
.stats thead th:not(:first-child) { text-align: center; }
.note { margin: 10px 0 0; font-size: 14px; line-height: 1.5; color: var(--muted); max-width: 75ch; }
.act-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-top: 14px; }
.act-card { padding: 16px 18px; border-radius: 18px; background: #fff; border-top: 8px solid var(--c); }
.act-card h4 { margin: 0 0 4px; display: flex; align-items: center; gap: 8px; font: 900 18px/1.2 var(--display); }
.act-card dl { margin: 0; }
.act-card dt { margin-top: 10px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.act-card dd { margin: 3px 0 0; font-size: 15px; line-height: 1.45; }
.principles { margin: 0; padding-left: 20px; max-width: 80ch; font-size: 15px; line-height: 1.55; }
.principles li { margin: 8px 0; }
.btn { padding: 12px 18px; border-radius: 12px; background: #EFE7D6; font: 700 15px/1 var(--body); }
.btn-danger { background: var(--red); color: #fff; margin-top: 12px; }

.modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 20px; background: rgba(14, 20, 48, .55); }
.modal-card { max-width: 420px; padding: 24px; border-radius: 24px; background: var(--paper); box-shadow: var(--shadow); }
.modal-card h3 { margin: 0 0 8px; font: 900 22px/1.2 var(--display); }
.modal-card p { margin: 0; line-height: 1.5; color: var(--muted); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.modal-actions .btn-danger { margin-top: 0; }

/* ---------- Uçan parçalar ---------- */

.fly-star { position: fixed; z-index: 200; left: 0; top: 0; width: 56px; height: 56px; pointer-events: none; }
.fly-star svg { width: 100%; height: 100%; fill: var(--sun); stroke: #D99A00; stroke-width: 1.2; stroke-linejoin: round; }
.confetti { position: fixed; z-index: 199; width: 12px; height: 16px; border-radius: 3px; pointer-events: none; }

/* ---------- Hareketler ---------- */

@keyframes screenIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes bubbleIn { from { opacity: 0; transform: translateY(6px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-2deg); } }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
@keyframes hop { 0%, 100% { transform: none; } 40% { transform: translateY(-22px) rotate(6deg) scale(1.05); } 70% { transform: scale(1.06, .94); } }
@keyframes tilt { 30%, 70% { transform: rotate(-12deg); } }
@keyframes dance { 0%, 100% { transform: rotate(-6deg) translateY(0); } 25% { transform: rotate(0) translateY(-14px); } 50% { transform: rotate(6deg) translateY(0); } 75% { transform: rotate(0) translateY(-14px); } }
@keyframes ring { 0% { transform: scale(.9); opacity: .9; } 100% { transform: scale(1.25); opacity: 0; } }
@keyframes pop { 0% { transform: scale(.7); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes bump { 50% { transform: scale(1.18); } }
@keyframes pulse { 50% { transform: scale(1.18); } }
@keyframes cardIn { from { opacity: 0; transform: translateY(24px) scale(.85); } to { opacity: 1; transform: none; } }
@keyframes wobble { 20% { transform: rotate(-8deg); } 40% { transform: rotate(7deg); } 60% { transform: rotate(-5deg); } 80% { transform: rotate(3deg); } }
@keyframes glow { 50% { transform: translateY(-5px); box-shadow: 0 0 0 8px var(--sun), var(--shadow); } }
@keyframes glowB { 50% { transform: scale(1.08); box-shadow: 0 0 0 8px var(--sun), inset -8px -12px 0 rgba(0, 0, 0, .12); } }
@keyframes spotIn { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes wingGlow { 50% { stroke: var(--sun); stroke-width: 13; } }
@keyframes popOut { to { transform: scale(1.5); opacity: 0; } }
@keyframes peel { 0% { transform: rotate(-40deg) scale(0); } 100% { transform: rotate(-6deg) scale(1); } }
@keyframes drive { 0% { transform: none; } 15% { transform: translateX(-14px) rotate(-1deg); } 100% { transform: translateX(130vw); } }
@keyframes flyAway { 0% { transform: none; } 25% { transform: translateY(12px) scale(.96); } 100% { transform: translate(30vw, -110vh) rotate(25deg) scale(.6); } }


/* =========================================================
   Okuma bölümü
   ========================================================= */

/* ---------- Bölüm sekmeleri ---------- */
#home.active { overflow-y: auto; }
.worlds { display: flex; justify-content: center; gap: 14px; padding: clamp(6px, 1.4vh, 14px) 16px 0; }
.world-tab {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 18px 7px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, .14); color: var(--paper);
  font: 900 clamp(16px, 2.4vh, 20px)/1 var(--display);
  transition: background-color .2s, color .2s;
}
.wt-glyph {
  flex: none; white-space: nowrap;
  display: grid; place-items: center; min-width: 62px; height: 40px; padding: 0 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .2); font: 700 18px/1 var(--body); letter-spacing: .04em;
}
.world-tab[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-sm); }
.world-tab[aria-selected="true"] .wt-glyph { background: var(--sun); }
/* Yedi oyun 4 + 3 dizilsin */
.patches.many { --pw: clamp(100px, min(13vw, 20vh), 156px); width: 100%; max-width: calc(var(--pw) * 4 + 3 * clamp(12px, 2.2vw, 26px) + 2 * clamp(14px, 3vw, 40px) + 8px); margin-inline: auto; }
.patch.locked { filter: saturate(.3); opacity: .7; }
.lock-badge {
  position: absolute; top: -8px; right: -8px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--ink); display: grid; place-items: center;
}
.lock-badge svg { width: 18px; height: 18px; fill: none; stroke: var(--paper); stroke-width: 2.4; stroke-linecap: round; }

/* ---------- Ortak okuma parçaları ---------- */
.scene-letter { --scene: #FFE8B8; }
.scene-drum { --scene: #FFD9B0; }
.scene-rhyme { --scene: #E4DAFF; }
.scene-sound { --scene: #CFEFEA; }
.scene-read { --scene: #FFE3EF; }
.scene-build { --scene: #D9F2CF; }
.scene-sentence { --scene: #FFE0DC; }
.scene-trace { --scene: #FFFDF6; }
.scene-hece { --scene: #FFF0C2; }
.scene-find { --scene: #D6ECFF; }

.r-center {
  position: relative; z-index: 1; height: 100%;
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: clamp(14px, 4vw, 48px); padding: 20px;
}
.pic-card {
  position: relative; flex: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-width: clamp(130px, 24vh, 210px); min-height: clamp(130px, 24vh, 210px); padding: 14px 18px;
  background-color: var(--paper); background-image: var(--noise);
  border-radius: var(--cut); box-shadow: var(--shadow);
}
.pic-card .pic { font-size: clamp(60px, 14vh, 120px); line-height: 1; }
.pic-card.big .pic { font-size: clamp(72px, 18vh, 150px); }
.pic-word { font: 700 clamp(26px, 5vh, 44px)/1 var(--body); }
.mk { color: var(--red); }

.answer.pic .pic { font-size: calc(var(--card-h) * .56); line-height: 1; }
.answer.pic .pic-pair { font-size: calc(var(--card-h) * .38); letter-spacing: -.05em; }
.answer.pic { width: calc(var(--card-w) * 1.15); }
.answer.word { width: auto; min-width: calc(var(--card-w) * 1.3); padding: 0 22px; }
.wtext { font: 700 calc(var(--card-h) * .34)/1 var(--body); color: var(--ink); white-space: nowrap; }
.answer.right .wtext, .answer.right .wtext .sy { color: #fff; }
.answer.hl { translate: 0 -8px; box-shadow: 0 0 0 6px var(--sun), var(--shadow); }
.beats { display: flex; gap: 4px; }
.beats i { width: 9px; height: 9px; border-radius: 50%; background: var(--red); }
.answer.right .beats i { background: #fff; }

.sy { border-radius: 10px; transition: background-color .2s; }
.sy.s0 { color: var(--ink); }
.sy.s1 { color: var(--red); }
.sy.hl { background: var(--sun); }
.punct { color: var(--ink); }

.read-card { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.word-big {
  padding: 14px 32px 20px;
  background-color: var(--paper); background-image: var(--noise);
  border-radius: var(--cut-lg); box-shadow: var(--shadow);
  font: 700 clamp(48px, 11vh, 104px)/1.05 var(--body); letter-spacing: .02em;
}
.help-btn, .ear-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 18px 10px 12px; border-radius: 999px;
  background: var(--paper); box-shadow: var(--shadow-sm);
  font: 700 16px/1 var(--body);
}
.help-btn svg, .ear-btn svg { width: 26px; height: 26px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ear-btn { width: clamp(110px, 22vh, 170px); height: clamp(110px, 22vh, 170px); justify-content: center; padding: 0; border-radius: 50%; box-shadow: var(--shadow); }
.ear-btn svg { width: 50%; height: 50%; }

/* ---------- Harf dersi ---------- */
.letter-pair { display: flex; align-items: flex-end; gap: 14px; }
.lt {
  display: grid; place-items: center;
  min-width: clamp(84px, 16vh, 150px); height: clamp(100px, 20vh, 180px); padding: 0 12px;
  background-color: var(--paper); background-image: var(--noise);
  border-radius: var(--cut); box-shadow: var(--shadow);
  font: 700 clamp(64px, 15vh, 130px)/1 var(--body); color: var(--ink);
}
.lt.up { color: var(--red); }

.lbub {
  --b: clamp(58px, min(9vw, 13vh), 90px);
  position: absolute; z-index: 1;
  width: var(--b); height: var(--b); margin: calc(var(--b) / -2) 0 0 calc(var(--b) / -2);
  display: grid; place-items: center; border-radius: 50%;
  background-color: var(--bc, #fff); background-image: var(--noise); box-shadow: var(--shadow-sm);
  font: 700 calc(var(--b) * .6)/1 var(--body); color: var(--ink);
}
.lbub.found { background-color: var(--leaf); color: #fff; animation: pop .4s; }
.lbub.nope { animation: wobble .5s; }
.lbub.glow { animation: glowB 1.1s ease-in-out infinite; }
.eq-letter { font-size: clamp(36px, 7vh, 64px); letter-spacing: .08em; }
.eq-count { font-size: clamp(24px, 4.6vh, 40px); font-variant-numeric: tabular-nums; }

.hece-mak {
  position: relative; z-index: 1; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(14px, 3vh, 28px); padding: 16px;
}
.hm-top { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: clamp(10px, 2vw, 22px); }
.hm-plus { font: 900 40px/1 var(--display); color: var(--ink); opacity: .45; }
.hm-partners { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.hm-made { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; min-height: clamp(56px, 10vh, 84px); }
.chip-syl {
  display: grid; place-items: center; height: clamp(56px, 10vh, 84px); padding: 0 20px; border-radius: 20px;
  background: var(--sun); box-shadow: var(--shadow-sm);
  font: 700 clamp(32px, 7vh, 56px)/1 var(--body);
  animation: cardIn .4s cubic-bezier(.3, 1.5, .5, 1) backwards;
}
.tile {
  display: grid; place-items: center;
  min-width: clamp(60px, 11vh, 92px); height: clamp(64px, 12vh, 100px); padding: 0 14px;
  background-color: var(--paper); background-image: var(--noise);
  border-radius: 22px; box-shadow: var(--shadow-sm);
  font: 700 clamp(34px, 7.5vh, 62px)/1 var(--body); color: var(--ink);
  transition: box-shadow .2s;
}
.tile.big { min-width: clamp(80px, 15vh, 130px); height: clamp(90px, 17vh, 140px); font-size: clamp(54px, 11vh, 96px); color: var(--red); }
.tile.used { box-shadow: 0 0 0 4px var(--leaf), var(--shadow-sm); }
.tile.gone { visibility: hidden; }
.tile.glow { animation: glow 1.1s ease-in-out infinite; }

/* Harf izleme */
.trace-svg { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; touch-action: none; }
.tr-line { stroke: rgba(30, 35, 64, .22); stroke-width: .8; }
.tr-line.base { stroke: rgba(30, 35, 64, .45); stroke-width: 1.3; }
.tr-line.dash { stroke-dasharray: 3 3; }
.tr-guide { fill: none; stroke: #ECE3CF; stroke-width: 15; stroke-linecap: round; stroke-linejoin: round; }
.tr-dot { fill: #ECE3CF; }
.tr-center { fill: none; stroke: rgba(30, 35, 64, .35); stroke-width: 1.2; stroke-dasharray: 2 4; stroke-linecap: round; }
.tr-done { fill: none; stroke: var(--red); stroke-width: 11; stroke-linecap: round; stroke-linejoin: round; }
.tr-done-dot { fill: var(--red); }
.trace-svg.complete .tr-done { stroke: var(--leaf); }
.trace-svg.complete .tr-done-dot { fill: var(--leaf); }
.tr-ink { fill: none; stroke: var(--felt); stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.tr-ink.fail { opacity: 0; transition: opacity .35s; }
.tr-demo { fill: none; stroke: var(--sun); stroke-width: 10; stroke-linecap: round; stroke-linejoin: round; }
.tr-demo-dot { fill: var(--sun); }
.tr-pen { fill: var(--ink); }
.tr-start circle { fill: var(--leaf); }
.tr-start text { fill: #fff; font: 700 8px var(--body); pointer-events: none; }
.tr-start { transform-box: fill-box; transform-origin: center; animation: pulse 1.2s ease-in-out infinite; }
.tr-arrow { fill: var(--leaf); }
.trace-side { position: absolute; z-index: 2; top: 50%; right: clamp(16px, 3vw, 36px); transform: translateY(-50%); display: flex; flex-direction: column; gap: 10px; }
.trace-side .lt { min-width: clamp(60px, 11vh, 96px); height: clamp(70px, 13vh, 110px); font-size: clamp(44px, 9vh, 80px); }

/* ---------- Hece Davulu ---------- */
.drum { width: clamp(140px, 30vh, 240px); filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .18)); }
.drum svg { width: 100%; height: auto; }
.drum.hit { animation: drumHit .25s ease-out; }
.drum-col { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.drum-beats { display: flex; gap: 8px; min-height: 20px; }
.drum-beats i { width: 20px; height: 20px; border-radius: 50%; background: var(--red); animation: pop .3s; }
.syl-row { display: flex; gap: 8px; min-height: 46px; }
.syl-chip {
  display: grid; place-items: center; min-width: 54px; height: 44px; padding: 0 10px; border-radius: 12px;
  border: 3px dashed rgba(30, 35, 64, .25);
  font: 700 26px/1 var(--body);
}
.syl-chip.on { border: 0; background: var(--sun); animation: pop .35s; }

/* ---------- Kelime Kur ---------- */
.build {
  position: relative; z-index: 1; height: 100%;
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: clamp(16px, 4vw, 50px); padding: 16px;
}
.build-right { display: flex; flex-direction: column; align-items: center; gap: clamp(14px, 3vh, 26px); }
.slots { display: flex; gap: 10px; }
.slot-b {
  display: grid; place-items: center;
  min-width: clamp(70px, 12vh, 104px); height: clamp(64px, 12vh, 100px); padding: 0 12px;
  border-radius: 20px; border: 4px dashed rgba(30, 35, 64, .3);
  font: 700 clamp(34px, 7vh, 60px)/1 var(--body);
}
.slot-b.next { border-color: var(--sun); }
.slot-b.filled { border: 0; background: var(--paper); box-shadow: var(--shadow-sm); }
.tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* ---------- Cümle Oku ---------- */
.sentence {
  position: relative; z-index: 1; height: 100%;
  display: flex; align-items: center; justify-content: center; align-content: center; flex-wrap: wrap;
  gap: 14px clamp(10px, 1.6vw, 18px); padding: 24px clamp(20px, 5vw, 60px);
}
.wchip {
  padding: 10px 18px 14px; border-radius: 18px;
  background-color: var(--paper); background-image: var(--noise); box-shadow: var(--shadow-sm);
  font: 700 clamp(36px, 7.6vh, 70px)/1.05 var(--body);
  transition: box-shadow .2s;
}
.wchip.hl { box-shadow: 0 0 0 5px var(--sun), var(--shadow-sm); }

/* ---------- Harf Yolu ---------- */
.path-wrap { flex: 1; min-height: 0; overflow: auto; padding: 6px clamp(14px, 4vw, 60px) 28px; }
.path { display: flex; flex-direction: column; gap: clamp(10px, 2vh, 18px); max-width: 1000px; margin: 0 auto; }
.pgroup {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 12px 18px;
  background-color: var(--c); background-image: var(--noise);
  border-radius: var(--cut); box-shadow: var(--shadow);
}
.pgroup::before { content: ""; position: absolute; inset: 7px; border-radius: inherit; border: 3px dashed rgba(255, 255, 255, .75); pointer-events: none; }
.pg-lbl { flex: none; width: 52px; text-align: center; font: 900 15px/1.05 var(--display); color: var(--t); }
.stones { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(8px, 1.4vw, 14px); }
.stone {
  position: relative; width: clamp(62px, min(10vw, 11vh), 92px); aspect-ratio: 1; border-radius: 50%;
  display: flex; flex-wrap: wrap; align-content: center; align-items: baseline; justify-content: center; gap: 3px;
  background: var(--paper); box-shadow: var(--shadow-sm); color: var(--ink);
}
.stone .lo { font: 700 clamp(28px, 5vh, 44px)/1 var(--body); }
.stone .up { font: 700 clamp(15px, 2.6vh, 22px)/1 var(--body); color: var(--muted); }
.stone.done { background: #fff; }
.stone.done::after {
  content: "★"; position: absolute; top: -6px; right: -6px;
  width: 26px; height: 26px; border-radius: 50%; background: var(--sun); color: var(--ink);
  display: grid; place-items: center; font-size: 15px; line-height: 1;
}
.stone.now { box-shadow: 0 0 0 6px var(--red), var(--shadow-sm); animation: pulse 1.4s ease-in-out infinite; }
.stone.locked { background: rgba(255, 255, 255, .3); box-shadow: none; outline: 3px dashed rgba(30, 35, 64, .3); outline-offset: -3px; color: rgba(30, 35, 64, .45); }
.stone.locked .up { color: rgba(30, 35, 64, .35); }

/* ---------- Ebeveyn: okuma ---------- */
.field-col { flex-direction: column; align-items: stretch; }
.letter-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.letter-pick button { min-width: 40px; height: 40px; padding: 0 10px; border-radius: 10px; background: #EFE7D6; font: 700 18px/1 var(--body); }
.letter-pick button.in { background: #DCEFD3; }
.letter-pick button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.letter-pick .gsep { width: 10px; }
.block .sub-h { margin-top: 24px; }
.note a { color: var(--felt-deep); }

@keyframes drumHit { 40% { transform: scale(1.06, .9) translateY(6px); } }

@media (max-width: 760px) {
  .worlds { gap: 8px; }
  .world-tab { padding-right: 12px; font-size: 15px; }
  .wt-glyph { min-width: 48px; height: 34px; font-size: 15px; }
  .trace-side { top: 14px; transform: none; flex-direction: row; }
  .pg-lbl { width: 36px; font-size: 12px; }
}

/* ---------- Oyunlar bölümü ---------- */
.wt-shapes { display: flex; gap: 6px; }
.wt-shapes i { display: block; width: 13px; height: 13px; background: currentColor; }
.wt-shapes .sh-c { border-radius: 50%; }
.wt-shapes .sh-t { clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.wt-shapes .sh-s { border-radius: 2px; }

/* Eşini Bul */
.scene-mem { --scene: #E4DAFF; }
.mem-grid {
  position: absolute; inset: clamp(18px, 3vh, 30px) clamp(18px, 3vw, 34px); z-index: 1;
  display: grid; grid-template-columns: repeat(var(--cols, 3), var(--mw, 100px)); gap: var(--gap, 12px);
  justify-content: center; align-content: center;
}
.mem-card { width: var(--mw, 100px); aspect-ratio: 4 / 5; perspective: 900px; animation: cardIn .4s cubic-bezier(.3, 1.5, .5, 1) backwards; }
.mem-card:nth-child(3n+2) { animation-delay: .05s; }
.mem-card:nth-child(3n) { animation-delay: .1s; }
.mem-card:disabled { cursor: default; }
.mem-in { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .38s cubic-bezier(.3, 1.3, .5, 1); }
.mem-card.open .mem-in { transform: rotateY(180deg); }
.mem-back, .mem-front {
  position: absolute; inset: 0; border-radius: var(--cut); box-shadow: var(--shadow-sm);
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: grid; place-items: center; background-image: var(--noise);
}
.mem-back { background-color: var(--red); }
.mem-back::before, .mem-front::before { content: ""; position: absolute; inset: 7px; border-radius: inherit; border: 3px dashed rgba(255, 255, 255, .7); }
.mem-back i { position: absolute; width: 18%; aspect-ratio: 1; border-radius: 50%; background: var(--ink); }
.mem-back i:nth-child(1) { left: 22%; top: 24%; } .mem-back i:nth-child(2) { right: 22%; top: 30%; }
.mem-back i:nth-child(3) { left: 28%; bottom: 22%; } .mem-back i:nth-child(4) { right: 26%; bottom: 28%; width: 13%; }
.mem-front { background-color: var(--paper); transform: rotateY(180deg); font-size: calc(var(--mw, 100px) * .56); line-height: 1; }
.mem-front::before { border-color: rgba(30, 35, 64, .18); }
.mem-card.found .mem-front { background-color: #D9F2CF; box-shadow: 0 0 0 5px var(--leaf), var(--shadow-sm); }

/* Örüntü Treni */
.scene-train { --scene: #BDE3FF; --wg: clamp(30px, min(calc((100vw - 70px) / (var(--n, 6) + 2)), 15vh), 118px); }
.scene-train::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30%; background: #7CC56A; background-image: var(--noise); }
.train {
  position: absolute; z-index: 2; left: 50%; bottom: calc(30% - var(--wg) * .12);
  display: flex; align-items: flex-end; gap: calc(var(--wg) * .1);
  transform: translateX(-50%);
}
.train.go { animation: trainGo 1.1s ease-in forwards; }
.loco { font-size: calc(var(--wg) * 1.15); line-height: .9; filter: drop-shadow(0 5px 0 rgba(0, 0, 0, .15)); }
.wagon {
  position: relative; width: var(--wg); height: calc(var(--wg) * .92);
  display: grid; place-items: center; font-size: calc(var(--wg) * .56); line-height: 1;
  background-color: var(--paper); background-image: var(--noise);
  border-radius: 14px 14px 8px 8px; box-shadow: var(--shadow-sm);
  border-bottom: calc(var(--wg) * .1) solid var(--felt-deep);
  transition: transform .2s, box-shadow .2s;
}
.wagon::before, .wagon::after { content: ""; position: absolute; bottom: calc(var(--wg) * -.22); width: calc(var(--wg) * .24); aspect-ratio: 1; border-radius: 50%; background: var(--ink); border: 3px solid #fff; }
.wagon::before { left: 12%; } .wagon::after { right: 12%; }
.wagon.empty { background: rgba(255, 255, 255, .45); outline: 4px dashed var(--orange); outline-offset: -4px; box-shadow: none; }
.wagon.empty b { font: 900 calc(var(--wg) * .55)/1 var(--display); color: var(--orange); animation: pulse 1.4s ease-in-out infinite; }
.wagon.filled { background-color: #FFE39A; animation: pop .45s; }
.wagon.hl { transform: translateY(-10px); box-shadow: 0 0 0 5px var(--sun), var(--shadow-sm); }
.rails { position: absolute; z-index: 1; left: 0; right: 0; bottom: calc(30% - var(--wg) * .26); height: 8px; background: repeating-linear-gradient(90deg, #8B5A2B 0 10px, transparent 10px 26px), #5B607C; background-size: 26px 8px, auto; border-radius: 4px; }
@keyframes trainGo { 0% { transform: translateX(-50%); } 15% { transform: translateX(calc(-50% + 12px)); } 100% { transform: translateX(-160vw); } }

/* Gölge Avı */
.scene-shadow { --scene: #CFEFEA; }
.shadow-spot {
  position: relative; width: clamp(150px, 34vh, 280px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle, #FFFDF2 0 55%, #FFF2B8 75%, rgba(255, 242, 184, 0) 76%);
}
.shadow-pic { font-size: clamp(90px, 21vh, 180px); line-height: 1; filter: brightness(0); opacity: .82; transition: filter .6s, opacity .6s; }
.shadow-spot.peek .shadow-pic { filter: brightness(0) opacity(.5); animation: pulse 1.2s ease-in-out; }
.shadow-spot.lit .shadow-pic { filter: none; opacity: 1; }

/* Hangisi Farklı? */
.scene-odd { --scene: #FFE3EF; }
.odd-row { gap: clamp(10px, 2.4vw, 28px); }
.odd-card { --card-h: clamp(104px, min(16vw, 24vh), 176px); --card-w: calc(var(--card-h) * .84); }

/* Boy Sırası */
.scene-size { --scene: #FFF0C2; }
.size-wrap {
  position: relative; z-index: 1; height: 100%;
  display: grid; grid-template-rows: 1fr 1fr; gap: 6px; padding: clamp(14px, 3vh, 26px) clamp(14px, 3vw, 32px);
  --u: clamp(56px, min(calc((100vw - 140px) / var(--n, 4)), 25vh), 180px);
}
.size-shelf {
  display: flex; justify-content: center; align-items: flex-end; gap: clamp(6px, 1.4vw, 16px);
  border-bottom: 10px solid #C98B4E; border-radius: 0 0 6px 6px; padding-bottom: 4px;
}
.size-slot { width: var(--u); height: var(--u); display: grid; place-items: end center; border-radius: 16px; outline: 3px dashed rgba(30, 35, 64, .18); outline-offset: -3px; }
.size-slot.filled { outline: 0; }
.size-pile { display: flex; justify-content: center; align-items: center; gap: clamp(6px, 1.6vw, 20px); }
.size-item { width: var(--u); height: var(--u); display: grid; place-items: center; border-radius: 18px; }
.size-item span { display: block; font-size: calc(var(--u) * .86 * var(--s, 1)); line-height: 1; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .14)); }
.size-item.placed { place-items: end center; }
.size-item.gone { visibility: hidden; }
.size-item.glow { animation: glow 1.1s ease-in-out infinite; background: rgba(255, 255, 255, .5); }

/* Renk Sepeti */
.scene-basket { --scene: #FFE7CC; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(10px, 2vh, 18px); }
.basket-deck {
  display: flex; justify-content: center; align-items: center; gap: clamp(8px, 1.8vw, 16px);
  padding: 8px 12px;
}
.b-item-card {
  width: clamp(66px, min(14vw, 12vh), 92px); aspect-ratio: 1;
  background: var(--paper); border-radius: var(--cut); box-shadow: var(--shadow-sm);
  display: grid; place-items: center; border: 3px solid transparent;
  transition: transform .25s cubic-bezier(.3, 1.4, .5, 1), opacity .25s;
}
.b-item-card.active { border-color: var(--sun); animation: pulse 1.4s ease-in-out infinite; box-shadow: 0 0 0 5px var(--sun), var(--shadow); }
.b-item-card.placed { opacity: 0.18; transform: scale(0.85); pointer-events: none; }
.b-item-icon { font-size: clamp(36px, 7vw, 52px); line-height: 1; filter: drop-shadow(0 3px 0 rgba(0,0,0,.12)); }
.basket-pair {
  display: flex; justify-content: center; align-items: stretch; gap: clamp(14px, 3.5vw, 36px);
  padding-bottom: 8px; margin-top: auto;
}
.basket-box {
  flex: 1; max-width: clamp(140px, 36vw, 220px); min-height: clamp(110px, 20vh, 160px);
  background: #FFFDF4; border: 4px dashed var(--bc, var(--sun)); border-radius: 24px;
  padding: 10px 12px; display: flex; flex-direction: column; align-items: center;
  box-shadow: var(--shadow-sm); cursor: pointer; transition: transform .2s, border-color .2s;
}
.basket-box:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.basket-box.glow { animation: glow 1.1s ease-in-out infinite; }
.basket-label {
  font: 900 clamp(14px, 2.2vh, 18px)/1.2 var(--display); color: var(--bc);
  margin-bottom: 8px; display: flex; align-items: center; gap: 6px;
}
.basket-tray { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; flex: 1; width: 100%; }
.basket-chip { font-size: clamp(24px, 5vw, 36px); line-height: 1; animation: pop .3s cubic-bezier(.3, 1.5, .5, 1); }

/* Balon Avı */
.scene-balloon-pop { --scene: #C7EEFF; overflow: hidden; }
.sky-wrap {
  position: absolute; inset: 0; display: flex; justify-content: space-around; align-items: center;
  flex-wrap: wrap; padding: clamp(10px, 2vh, 20px) 10px; z-index: 1;
}
.pop-balloon {
  position: relative; width: clamp(74px, min(14vw, 22vh), 116px); aspect-ratio: 1 / 1.25;
  background: none; border: none; cursor: pointer; padding: 0;
  animation: floatBalloon var(--dur, 3.2s) ease-in-out infinite alternate;
  animation-delay: var(--d, 0s); transition: transform .2s;
}
.pop-balloon:hover { transform: scale(1.08); }
.pop-balloon.glow { animation: glow 1.1s ease-in-out infinite, floatBalloon var(--dur, 3.2s) ease-in-out infinite alternate; }
.pop-balloon.popped { animation: balloonPop .35s cubic-bezier(0.1, 0.8, 0.2, 1) forwards !important; pointer-events: none; }
.balloon-body {
  position: absolute; inset: 0 0 14px 0; background-color: var(--bc, #FF5E7E);
  background-image: radial-gradient(circle at 35% 30%, rgba(255,255,255,.45) 0%, transparent 60%);
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  display: grid; place-items: center; box-shadow: 0 8px 18px rgba(0,0,0,.12);
}
.balloon-body::after {
  content: ""; position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%);
  width: 10px; height: 6px; background-color: inherit; border-radius: 2px 2px 5px 5px;
}
.balloon-art { font-size: calc(clamp(74px, min(14vw, 22vh), 116px) * 0.44); line-height: 1; filter: drop-shadow(0 2px 0 rgba(0,0,0,.15)); }
.balloon-string {
  position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%);
  width: 2px; height: 16px; background: rgba(30, 35, 64, .35); border-radius: 1px;
}
@keyframes floatBalloon {
  0% { transform: translateY(0); }
  100% { transform: translateY(var(--dy, -16px)); }
}
@keyframes balloonPop {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.8; }
  100% { transform: scale(0); opacity: 0; }
}

/* Yapboz */
.scene-puzzle { --scene: #EEDBFF; display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding: clamp(8px, 1.8vh, 18px); }
.puzzle-board {
  position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr;
  gap: 4px; width: clamp(160px, 34vh, 230px); aspect-ratio: 1; margin: auto auto 10px;
  background: #C98B4E; padding: 6px; border-radius: 20px; box-shadow: var(--shadow);
}
.puzzle-slot {
  position: relative; overflow: hidden; background: #FFFDF4; border-radius: 10px;
  display: grid; place-items: center;
}
.puzzle-slot.empty {
  background: rgba(255, 255, 255, .4); outline: 3px dashed var(--orange); outline-offset: -4px;
}
.puzzle-q { font: 900 32px var(--display); color: var(--orange); animation: pulse 1.2s ease-in-out infinite; }
.puzzle-piece-inner {
  width: 200%; height: 200%; position: absolute; display: grid; place-items: center;
  font-size: clamp(130px, 28vh, 190px); line-height: 1; user-select: none; pointer-events: none;
}
.quad-0 { top: 0; left: 0; }
.quad-1 { top: 0; right: 0; }
.quad-2 { bottom: 0; left: 0; }
.quad-3 { bottom: 0; right: 0; }
.puzzle-rack {
  display: flex; justify-content: center; gap: clamp(10px, 2.5vw, 22px);
  margin-top: auto; padding-bottom: 6px; z-index: 2;
}
.puzzle-choice {
  position: relative; overflow: hidden; width: clamp(64px, 13vw, 84px); aspect-ratio: 1;
  background: #FFFDF4; border: 3px solid #E2E8F0; border-radius: 14px;
  box-shadow: var(--shadow-sm); cursor: pointer; transition: transform .2s, box-shadow .2s;
}
.puzzle-choice:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.puzzle-board.completed { animation: pop .5s ease; box-shadow: 0 0 0 6px var(--leaf), var(--shadow); }

/* Benek Yolda */
.scene-maze { --scene: #D4F4D2; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: clamp(6px, 1.4vh, 16px); }
.maze-grid {
  display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); grid-template-rows: repeat(var(--rows, 3), 1fr);
  gap: clamp(6px, 1.2vw, 12px); width: clamp(200px, min(40vh, 72vw), 310px); aspect-ratio: var(--cols) / var(--rows);
  margin: auto auto 8px; z-index: 1;
}
.maze-tile {
  position: relative; background: #FFFDF4; border: 3px solid #C4DDB4; border-radius: 16px;
  box-shadow: var(--shadow-xs); display: grid; place-items: center;
  font-size: clamp(24px, 4.5vh, 38px); cursor: pointer; transition: transform .15s, background .15s;
}
.maze-tile.walkable:hover { background: #F1FCEF; transform: scale(1.02); }
.maze-tile.rock { background: #E2E8F0; border-color: #CBD5E1; cursor: not-allowed; }
.maze-flower { animation: pulse 1.5s ease-in-out infinite; }
.maze-star { animation: pulse 1.2s infinite alternate; font-size: .75em; }
.maze-benek {
  position: absolute; display: grid; place-items: center; font-size: 1.15em;
  z-index: 3; transition: transform .2s;
}
.maze-benek.win { animation: benekSpin .7s cubic-bezier(.16, 1, .3, 1); }
@keyframes benekSpin {
  0% { transform: scale(1) rotate(0); }
  50% { transform: scale(1.3) rotate(180deg); }
  100% { transform: scale(1) rotate(360deg); }
}
.maze-ctrls { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: auto; padding-bottom: 6px; z-index: 2; }
.maze-ctrl-row { display: flex; gap: 6px; }
.maze-arr {
  width: clamp(40px, 7.5vw, 46px); height: clamp(40px, 7.5vw, 46px);
  background: #FFFDF4; border: 2px solid #CBD5E1; border-radius: 12px;
  font-size: 18px; display: grid; place-items: center; box-shadow: var(--shadow-xs);
  cursor: pointer; transition: transform .1s;
}
.maze-arr:active { transform: scale(.93); }

/* Benek'i Süsle */
.scene-dress { --scene: #FFF3D6; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.dress-stage { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-top: 6px; z-index: 1; }
.dress-benek-wrap { position: relative; width: clamp(130px, 26vh, 175px); aspect-ratio: 200 / 215; margin: 0 auto; }
.dress-benek { position: relative; width: 100%; height: 100%; }
.dress-benek svg { width: 100%; height: 100%; display: block; }
.dress-hat { position: absolute; top: -14%; left: 50%; transform: translateX(-50%); font-size: clamp(36px, 7.5vh, 52px); z-index: 5; pointer-events: none; line-height: 1; }
.dress-glass { position: absolute; top: 22%; left: 50%; transform: translateX(-50%); font-size: clamp(26px, 5.5vh, 38px); z-index: 5; pointer-events: none; line-height: 1; }
.dress-neck { position: absolute; top: 40%; left: 50%; transform: translateX(-50%); font-size: clamp(26px, 5.5vh, 38px); z-index: 5; pointer-events: none; line-height: 1; }
.btn-snap {
  margin-top: 10px; display: inline-flex; align-items: center; gap: 8px; padding: 7px 18px;
  background: #38A169; color: #fff; font: 900 15px var(--display); border: none;
  border-radius: 999px; box-shadow: 0 4px 12px rgba(56, 161, 105, .35); cursor: pointer;
  transition: transform .2s, background .2s;
}
.btn-snap:hover { transform: scale(1.05); background: #2F855A; }
.btn-snap:active { transform: scale(.96); }
.dress-wardrobe { background: #FFFDF4; border-top: 2px solid rgba(30, 35, 64, .08); padding: 8px 12px 14px; z-index: 2; }
.dress-tabs { display: flex; justify-content: center; gap: 8px; margin-bottom: 8px; }
.d-tab {
  padding: 4px 12px; font: 700 13px var(--f); border-radius: 999px;
  border: 1px solid rgba(30, 35, 64, .12); background: transparent; color: var(--text-muted); cursor: pointer;
}
.d-tab.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.dress-items { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.d-item {
  width: 44px; height: 44px; border-radius: 12px; background: #fff; border: 2px solid #E2E8F0;
  display: grid; place-items: center; font-size: 24px; cursor: pointer; transition: transform .15s, border-color .15s;
}
.d-item.sel { border-color: #38A169; box-shadow: 0 0 0 3px rgba(56, 161, 105, .25); transform: scale(1.08); }
.wing-item .d-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--wc); }
.scene-dress.flash::after {
  content: ""; position: absolute; inset: 0; background: #fff; z-index: 99; animation: flashAnim .3s forwards; pointer-events: none;
}
@keyframes flashAnim { 0% { opacity: .9; } 100% { opacity: 0; } }

/* Benek'in Macerası */
#play[data-act="macera"] .dock { display: none; }
#play[data-act="macera"] > .stage { margin-bottom: clamp(10px, 2vh, 18px); }
.scene-adv { --scene: #BDE3FF; touch-action: none; }
.scene-adv::before { display: none; }
.adv-canvas { position: absolute; inset: 0; display: block; }
.adv-mark { position: absolute; width: 1px; height: 1px; pointer-events: none; }
.adv-pad { position: absolute; left: clamp(12px, 2.4vw, 28px); bottom: clamp(12px, 2.4vh, 26px); display: flex; gap: clamp(10px, 1.8vw, 18px); z-index: 2; }
.adv-btn {
  --b: clamp(62px, min(11vh, 12vw), 96px);
  width: var(--b); height: var(--b); border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 248, 236, .88); box-shadow: var(--shadow-sm);
  touch-action: none; -webkit-user-select: none; user-select: none;
  transition: transform .08s;
}
.adv-btn svg { width: 46%; height: 46%; fill: none; stroke: var(--ink); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.adv-btn.on { transform: translateY(3px) scale(.95); background: #fff; }
.adv-jump { position: absolute; right: clamp(12px, 2.4vw, 28px); bottom: clamp(12px, 2.4vh, 26px); z-index: 2; --b: clamp(74px, min(13vh, 14vw), 112px); background: var(--sun); }
.adv-jump.on { background: #FFD76E; }
.adv-jump.nudge { animation: pulse 1s ease-in-out infinite; }

/* Benek Grand Prix (2D Araba Yarışı) */
#play[data-act="yaris"] .dock { display: none; }
#play[data-act="yaris"] > .stage { margin-bottom: clamp(10px, 2vh, 18px); }
.scene-race { --scene: #48BB78; touch-action: none; overflow: hidden; }
.scene-race::before { display: none; }
.race-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.race-mark { position: absolute; width: 1px; height: 1px; pointer-events: none; }

.race-hud {
  position: absolute; top: clamp(8px, 1.6vh, 14px); left: clamp(8px, 1.8vw, 16px);
  display: flex; align-items: center; gap: clamp(6px, 1.2vw, 10px); z-index: 10;
}
.hud-item {
  background: rgba(26, 32, 44, 0.82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  padding: 4px 10px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex; flex-direction: column; align-items: center; min-width: 50px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.hud-label { font: 800 9px/1 var(--f); color: rgba(255, 255, 255, 0.65); letter-spacing: 0.5px; }
.hud-val { font: 900 clamp(15px, 2.2vh, 20px)/1.1 var(--display); color: #FFD700; }
.hud-pos .hud-val { color: #FF5E7E; }
.btn-auto-gas {
  background: rgba(26, 32, 44, 0.82); border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px; padding: 6px 12px; color: #fff; font: 700 11px var(--f);
  display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); transition: background .15s, transform .15s;
}
.btn-auto-gas.active { background: #38A169; border-color: #48BB78; }

.race-minimap-wrap {
  position: absolute; top: clamp(8px, 1.6vh, 14px); right: clamp(8px, 1.8vw, 16px);
  background: rgba(26, 32, 44, 0.78); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 2px solid rgba(255, 255, 255, 0.15); border-radius: 16px;
  padding: 4px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3); z-index: 10;
}
.race-minimap { display: block; border-radius: 12px; width: clamp(100px, 18vw, 135px); height: auto; aspect-ratio: 140 / 100; }

.race-lights {
  position: absolute; top: 22%; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  background: rgba(17, 24, 39, 0.94); border: 2px solid rgba(255, 255, 255, 0.15);
  padding: 14px 26px; border-radius: 22px; box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
  z-index: 25; transition: opacity .4s;
}
.race-lights > div:not(.light-banner) { display: flex; gap: 12px; }
.light-dot {
  width: 28px; height: 28px; border-radius: 50%; background: #374151;
  border: 2px solid rgba(255, 255, 255, 0.1); transition: background .15s, box-shadow .15s;
}
.light-dot.red { background: #EF4444; box-shadow: 0 0 18px #EF4444; }
.light-dot.green { background: #10B981; box-shadow: 0 0 22px #10B981; }
.light-banner { font: 900 24px/1 var(--display); color: #fff; letter-spacing: 1px; }

.race-speedo {
  position: absolute; bottom: clamp(10px, 2vh, 18px); left: 50%; transform: translateX(-50%);
  width: clamp(84px, 15vh, 108px); aspect-ratio: 1; pointer-events: none; z-index: 10;
}
.speedo-gauge { width: 100%; height: 100%; transform: rotate(135deg); }
.speedo-bg-ring {
  fill: rgba(26, 32, 44, 0.85); stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 8; stroke-dasharray: 264; stroke-dashoffset: 66;
}
.speedo-bar {
  fill: none; stroke: #FFB800; stroke-width: 8; stroke-linecap: round;
  stroke-dasharray: 264; stroke-dashoffset: 264; transition: stroke-dashoffset .08s linear;
}
.speedo-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; color: #fff;
}
.speedo-num { font: 900 clamp(20px, 3.4vh, 26px)/1 var(--display); color: #fff; }
.speedo-unit { font: 700 9px var(--f); color: rgba(255, 255, 255, 0.6); }
.speedo-gear { font: 900 11px var(--f); color: #38A169; margin-top: 2px; }

.race-touch-controls {
  position: absolute; inset: 0; pointer-events: none; z-index: 15;
}
.steer-group {
  position: absolute; left: clamp(10px, 2.2vw, 24px); bottom: clamp(12px, 2.4vh, 24px);
  display: flex; gap: clamp(8px, 1.5vw, 16px); pointer-events: auto;
}
.steer-btn {
  --b: clamp(56px, min(10.5vh, 12vw), 84px);
  width: var(--b); height: var(--b); border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 248, 236, 0.88); border: 2px solid rgba(30, 35, 64, 0.12);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22); touch-action: none;
  cursor: pointer; transition: transform .06s, background .06s;
}
.steer-btn svg { width: 50%; height: 50%; fill: none; stroke: var(--ink); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.steer-btn.active { transform: scale(0.92); background: #FFD76E; }

.pedal-group {
  position: absolute; right: clamp(10px, 2.2vw, 24px); bottom: clamp(12px, 2.4vh, 24px);
  display: flex; align-items: flex-end; gap: clamp(8px, 1.4vw, 14px); pointer-events: auto;
}
.pedal-btn {
  border-radius: 18px; display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); touch-action: none;
  cursor: pointer; transition: transform .06s, filter .06s;
}
.pedal-label { font: 900 clamp(11px, 1.8vh, 14px) var(--display); color: #fff; letter-spacing: 0.5px; }
.pedal-drift {
  width: clamp(48px, 8.5vw, 64px); height: clamp(48px, 8.5vw, 64px);
  background: linear-gradient(135deg, #ECC94B, #D69E2E); border: 2px solid #B7791F;
}
.pedal-brake {
  width: clamp(52px, 9vw, 70px); height: clamp(66px, 11vh, 88px);
  background: linear-gradient(135deg, #F56565, #C53030); border: 2px solid #9B2C2C;
}
.pedal-gas {
  width: clamp(58px, 10vw, 78px); height: clamp(82px, 14vh, 110px);
  background: linear-gradient(135deg, #48BB78, #276749); border: 2px solid #22543D;
}
.pedal-btn.active { transform: translateY(4px) scale(0.95); filter: brightness(1.2); }


@media (max-width: 760px) {
  .worlds { gap: 6px; padding-inline: 8px; }
  .world-tab { gap: 6px; padding: 6px 10px 6px 6px; font-size: 14px; }
  .wt-glyph { min-width: 40px; height: 30px; padding: 0 7px; font-size: 13px; }
  .wt-shapes i { width: 10px; height: 10px; }
}
@media (max-width: 480px) {
  .world-tab { gap: 5px; padding: 5px 9px 5px 5px; font-size: 13px; }
  .wt-glyph { min-width: 0; height: 28px; padding: 0 7px; font-size: 12px; letter-spacing: 0; }
  .wt-shapes { gap: 4px; }
  .wt-shapes i { width: 8px; height: 8px; }
  .bar { gap: 8px; }
  .bar-right { gap: 8px; }
  .icon-btn { width: 46px; }
  .progress { flex-wrap: nowrap; gap: 4px; }
  .progress i { width: 13px; border-width: 2px; }
  .stars { height: 42px; padding: 0 12px 0 8px; gap: 4px; font-size: 19px; }
  .stars svg { width: 24px; height: 24px; }
  .answers { gap: 8px; }
  .answer.pic { width: min(calc(var(--card-w) * 1.15), calc((100vw - 52px) / 4)); }
}
@media (max-width: 380px) {
  .icon-btn { width: 42px; }
  .bar { padding-inline: 10px; }
}

/* ---------- Uyum ---------- */

@media (max-width: 760px) {
  .dock { grid-template-columns: auto 1fr; }
  .answers { grid-column: 1 / -1; }
  #home.active { overflow-y: auto; }
  .home-hero { gap: 10px; padding: 0 16px; }
  .home-hero .benek-lg { width: clamp(80px, 13vh, 118px); }
  .home-hero .bubble-lg { font-size: 17px; }
  .patches { flex: 1 0 auto; gap: 16px; padding-top: 18px; padding-bottom: 84px; }
  .cut-title-sm { font-size: 22px; }
  .progress i { width: 18px; }
}
@media (max-width: 620px) {
  .field { flex-direction: column; align-items: flex-start; }
  .ugur-row { gap: 6px; padding: 14px 8px; }
  .numcard { width: 62px; height: 78px; }
  .numcard .num { font-size: 40px; }
  .numcard.done::after { width: 28px; height: 28px; top: -10px; right: -8px; font-size: 16px; }
}
@media (max-height: 560px) and (orientation: landscape) {
  .home-hero .bubble { display: none; }
  .benek-lg { width: 90px; }
  .patches { padding-top: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
