:root {
  --krem: #fbf3e6;
  --krem-koyu: #f1dfc4;
  --kahve: #5a3a22;
  --mor: #7b3fe4;
  --mor-koyu: #5b25b8;
  --pembe: #e8407a;
  --sakin: #4caf6a;
  --rahatsiz: #f2c230;
  --kizgin: #f08a24;
  --cok-kizgin: #e0322f;
  --golge: 0 0.4cqw 1.2cqw rgba(90, 58, 34, .25);
  --oran: calc(1066 / 786);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #fff7ec, #ecd6b8);
  font-family: "Baloo 2", system-ui, sans-serif;
  color: var(--kahve);
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none; user-select: none;
  touch-action: manipulation;
}
button { font-family: inherit; color: inherit; touch-action: manipulation; }

#sahne-cerceve {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
#sahne {
  position: relative;
  width: min(100vw, 100dvh * var(--oran));
  aspect-ratio: 1066 / 786;
  overflow: hidden;
  border-radius: clamp(0px, 1.2cqw, 18px);
  container-type: size;
  box-shadow: 0 10px 40px rgba(90, 58, 34, .25);
  background: var(--krem);
}
.katman { position: absolute; inset: 0; }

/* ---------- arka plan ---------- */
#arka-plan { overflow: hidden; }
#arka-plan img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity var(--gecis, 700ms) ease, filter 1.6s ease, transform 1.6s ease;
  transform-origin: 50% 60%;
}
#arka-plan img.gorunur { opacity: 1; animation: yakinlas 14s ease-out forwards; }
#arka-plan.bulanik img { filter: blur(0.6cqw) saturate(1.05); transform: scale(1.06); animation: none; }
@keyframes yakinlas { from { transform: scale(1); } to { transform: scale(1.035); } }
#sahne.sarsinti #arka-plan { animation: sars 0.5s ease-in-out 2; }
@keyframes sars {
  0%,100% { transform: translate(0,0); }
  20% { transform: translate(-0.8%, 0.4%); }
  40% { transform: translate(0.7%, -0.5%); }
  60% { transform: translate(-0.5%, -0.3%); }
  80% { transform: translate(0.4%, 0.5%); }
}

/* üst bant: videodan gelen kayıt arayüzü izlerini yumuşak biçimde örter */
#baslik-bandi {
  bottom: auto; height: 11.5%;
  background: linear-gradient(to bottom, rgba(251,243,230,.92) 0%, rgba(251,243,230,.80) 70%, rgba(251,243,230,0) 100%);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  pointer-events: none;
}
#logo {
  position: absolute; left: 29.5%; top: 0; width: 17.5%;
  pointer-events: none; filter: drop-shadow(0 0.2cqw 0.3cqw rgba(255,255,255,.9));
}

/* ---------- üst kontroller ---------- */
#ust-kontroller {
  position: absolute; left: 1.2%; right: 1.2%; top: 1.2%;
  display: flex; align-items: center; justify-content: space-between;
  pointer-events: none;
}
#ust-kontroller > * { pointer-events: auto; }
.ikon-btn {
  width: 6cqw; height: 6cqw; min-width: 44px; min-height: 44px;
  border-radius: 50%; border: 0.35cqw solid #fff;
  background: var(--mor); color: #fff; font-size: 3cqw; line-height: 1;
  box-shadow: var(--golge); cursor: pointer;
}
.ikon-btn[aria-pressed="false"] { background: #9e8c7a; }
#ilerleme { display: flex; gap: 0.7cqw; margin-left: auto; margin-right: 1.5cqw; }
#ilerleme i {
  width: 1.3cqw; height: 1.3cqw; border-radius: 50%;
  background: rgba(123,63,228,.25); border: 0.2cqw solid #fff;
}
#ilerleme i.aktif { background: var(--mor); transform: scale(1.25); }
#ilerleme i.bitti { background: #b79cf0; }

.yon-btn {
  position: absolute; bottom: 3%;
  width: 8cqw; height: 8cqw; min-width: 52px; min-height: 52px;
  border-radius: 50%; border: 0.45cqw solid #fff;
  background: var(--mor); color: #fff; font-size: 5.5cqw; font-weight: 800; line-height: 0.8;
  box-shadow: var(--golge); cursor: pointer;
  transition: transform .15s, opacity .3s;
  display: grid; place-items: center; padding-bottom: 0.6cqw;
}
.yon-btn:active { transform: scale(.92); }
.yon-btn[disabled] { opacity: 0; pointer-events: none; }
#btn-geri { left: 1.5%; }
#btn-ileri { right: 1.5%; }
#btn-ileri.hazir { animation: nabiz 1.4s ease-in-out infinite; background: var(--pembe); }
@keyframes nabiz { 0%,100% { transform: scale(1); } 50% { transform: scale(1.12); } }

/* ---------- anlatıcı kutusu ---------- */
#anlatici {
  position: absolute; left: 12%; right: 12%; bottom: 3%;
  min-height: 9%;
  display: flex; align-items: center; gap: 1.4cqw;
  padding: 1.2cqw 2.2cqw;
  background: rgba(255, 251, 244, .96);
  border: 0.35cqw solid var(--krem-koyu);
  border-radius: 2.2cqw;
  box-shadow: var(--golge);
  font-size: 2.35cqw; font-weight: 600; line-height: 1.3;
  animation: belir .45s ease both;
}
#anlatici[hidden] { display: none; }
#anlatici::before { content: "📖"; font-size: 3cqw; }

/* ---------- konuşma / düşünce balonları ---------- */
.balon {
  position: absolute;
  max-width: 34%;
  padding: 1.3cqw 2cqw;
  background: #fff;
  border: 0.35cqw solid var(--kahve);
  border-radius: 2.4cqw;
  font-size: 2.45cqw; font-weight: 700; line-height: 1.25;
  box-shadow: var(--golge);
  transform: translate(-50%, -100%);
  animation: balon-gir .4s cubic-bezier(.3,1.6,.5,1) both;
  text-align: center;
}
.balon .kim { display: block; font-size: 1.6cqw; font-weight: 800; letter-spacing: .02em; margin-bottom: .2cqw; }
.balon[data-kim="oly"] .kim { color: #e0661b; }
.balon[data-kim="lia"] .kim { color: #d94f86; }
.balon[data-kim="ogretmen"] .kim { color: #3d7a54; }
.balon.konusma::after {
  content: ""; position: absolute; bottom: -1.9cqw;
  width: 2.4cqw; height: 2.4cqw;
  background: #fff;
  border-right: 0.35cqw solid var(--kahve); border-bottom: 0.35cqw solid var(--kahve);
}
.balon.konusma[data-kuyruk="sol"]::after { left: 18%; transform: skewX(25deg) rotate(45deg); }
.balon.konusma[data-kuyruk="sag"]::after { right: 18%; transform: skewX(-25deg) rotate(45deg); }
.balon.konusma[data-kuyruk="orta"]::after { left: calc(50% - 1.2cqw); transform: rotate(45deg); }
.balon.dusunce {
  border-radius: 50%;
  padding: 1.2cqw 2.6cqw;
  min-width: 13cqw; min-height: 9cqw;
  display: grid; place-items: center;
}
.balon.dusunce .nokta {
  position: absolute; background: #fff; border: 0.3cqw solid var(--kahve); border-radius: 50%;
}
.balon.dusunce .n1 { width: 2.2cqw; height: 2.2cqw; bottom: -2.4cqw; }
.balon.dusunce .n2 { width: 1.3cqw; height: 1.3cqw; bottom: -4.3cqw; }
.balon.dusunce[data-kuyruk="sol"] .n1 { left: 22%; } .balon.dusunce[data-kuyruk="sol"] .n2 { left: 14%; }
.balon.dusunce[data-kuyruk="sag"] .n1 { right: 22%; } .balon.dusunce[data-kuyruk="sag"] .n2 { right: 14%; }
.balon.dusunce svg { width: 9cqw; height: auto; }
.balon.cikis { animation: balon-cik .3s ease forwards; }
@keyframes balon-gir { from { opacity: 0; transform: translate(-50%, -80%) scale(.6); } }
@keyframes balon-cik { to { opacity: 0; transform: translate(-50%, -100%) scale(.8); } }
@keyframes belir { from { opacity: 0; transform: translateY(10%); } }

/* ---------- duygu termometresi ---------- */
.termometre {
  position: absolute; top: 13%;
  width: 9.5%; height: 62%;
  display: flex; flex-direction: column; align-items: center;
  animation: belir .6s ease both;
  pointer-events: none;
}
.termometre.sag .seviye-yazi { align-self: flex-end; }
.termometre.cikis { animation: termo-cik .5s ease forwards; }
@keyframes termo-cik { to { opacity: 0; transform: scale(.85); } }
.termometre .ad {
  font-size: 1.9cqw; font-weight: 800; color: #fff;
  background: var(--mor); border-radius: 1.2cqw; padding: 0 1.2cqw; margin-bottom: 0.6cqw;
  box-shadow: var(--golge);
}
.termometre svg { width: 100%; flex: 1; overflow: visible; filter: drop-shadow(0 0.3cqw 0.5cqw rgba(90,58,34,.3)); }
.termometre .dolgu { transition: height 1.6s cubic-bezier(.45,0,.3,1), y 1.6s cubic-bezier(.45,0,.3,1), fill 1.6s ease; }
.termometre .seviye-yazi {
  margin-top: 0.6cqw; white-space: nowrap; align-self: flex-start;
  font-size: 1.75cqw; font-weight: 800; color: #fff;
  border-radius: 1.2cqw; padding: 0.1cqw 1cqw;
  transition: background-color 1.2s ease;
  box-shadow: var(--golge);
}
.termometre.titre svg { animation: titre .12s linear infinite; }
@keyframes titre { 0%,100% { transform: translateX(0); } 50% { transform: translateX(2%); } }

/* ---------- açılış ve ekran butonları ---------- */
.buyuk-btn {
  position: absolute; left: 50%; transform: translateX(-50%);
  padding: 1.4cqw 4.5cqw;
  font-size: 3.6cqw; font-weight: 800; color: #fff;
  background: linear-gradient(180deg, #a06bff, var(--mor) 55%, var(--mor-koyu));
  border: 0.5cqw solid #fff; border-radius: 5cqw;
  box-shadow: 0 0.8cqw 0 var(--mor-koyu), var(--golge);
  cursor: pointer;
  animation: belir .5s ease both, nabiz2 1.8s ease-in-out .6s infinite;
}
.buyuk-btn:active { transform: translateX(-50%) translateY(0.5cqw); box-shadow: 0 0.3cqw 0 var(--mor-koyu); }
@keyframes nabiz2 { 0%,100% { scale: 1; } 50% { scale: 1.06; } }

.acilis-kart {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -55%);
  width: 62%; padding: 2.5cqw 3cqw 7.5cqw;
  text-align: center;
  background: rgba(255, 251, 244, .93);
  border: 0.5cqw solid #fff; border-radius: 3.5cqw;
  box-shadow: 0 1.5cqw 4cqw rgba(90,58,34,.3);
  animation: belir .6s ease both;
}
.acilis-kart img { width: 58%; }
.acilis-kart h1 { margin: 0.5cqw 0 0; font-size: 4cqw; line-height: 1.1; color: var(--kahve); }
.acilis-kart p { margin: 0.6cqw 0 0; font-size: 2.2cqw; font-weight: 600; }
.acilis-kart .buyuk-btn { bottom: -3.5cqw; }

.bilgi-kart {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 58%; padding: 3cqw;
  background: rgba(255, 251, 244, .96);
  border: 0.5cqw solid #fff; border-radius: 3cqw;
  box-shadow: 0 1.5cqw 4cqw rgba(90,58,34,.3);
  text-align: center; font-size: 2.4cqw; font-weight: 600;
  animation: belir .6s ease both;
}
.bilgi-kart h2 { margin: 0 0 1cqw; font-size: 3.4cqw; }
.bilgi-kart .kucuk-btn {
  margin-top: 2cqw; padding: 0.8cqw 3cqw; font-size: 2.4cqw; font-weight: 800;
  border: 0.4cqw solid #fff; border-radius: 3cqw; background: var(--mor); color: #fff; cursor: pointer;
  box-shadow: var(--golge);
}

#dondur-uyari {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%);
  background: var(--mor); color: #fff; font-weight: 700; font-size: 15px;
  padding: 8px 16px; border-radius: 20px; box-shadow: 0 4px 14px rgba(0,0,0,.2);
}

@media (prefers-reduced-motion: reduce) {
  #arka-plan img.gorunur, #btn-ileri.hazir, .buyuk-btn, .termometre.titre svg { animation: none !important; }
  #sahne.sarsinti #arka-plan { animation: none; }
}

#sahne[data-sahne="acilis"] #logo, #sahne[data-sahne="asama2-yakinda"] #logo { display: none; }

/* ================================================================ SAKİNLEŞME KÖŞESİ */
#termometreler, #baloncuklar, #ekran-butonlari { pointer-events: none; }
#baloncuklar .balon, #ekran-butonlari > * { pointer-events: auto; }
#sahne[data-sahne="tasarim"] #logo, #sahne[data-sahne="bos-kose"] #logo,
#sahne[data-sahne="bitis"] #logo { display: none; }

.kose-alani {
  position: absolute; overflow: hidden;
  border-radius: 1.6cqw;
  box-shadow: 0 0.8cqw 3cqw rgba(90, 58, 34, .35), 0 0 0 0.45cqw #fff;
  transition: left 1.8s cubic-bezier(.6,0,.25,1), top 1.8s cubic-bezier(.6,0,.25,1),
              width 1.8s cubic-bezier(.6,0,.25,1), height 1.8s cubic-bezier(.6,0,.25,1),
              border-radius 1.8s ease, box-shadow 1.8s ease;
  container-type: inline-size;
}
.kose-alani.sinifta { border-radius: 0; box-shadow: 0 0 0 0 rgba(0,0,0,0), 0 0 0 0 #fff; }
.kose-arka { position: absolute; max-width: none; height: auto; pointer-events: none; user-select: none; }
.kose-nesneler { position: absolute; inset: 0; touch-action: none; }
.kose-nesne { position: absolute; touch-action: none; }
.kose-nesne img {
  width: 100%; height: 100%; object-fit: contain; display: block;
  pointer-events: none; user-select: none; -webkit-user-drag: none;
  filter: drop-shadow(0 0.4cqw 0.5cqw rgba(70, 40, 20, .28));
}
.kose-alani.tasarim .kose-nesne { cursor: grab; }
.kose-nesne.tasiniyor { cursor: grabbing; z-index: 5000 !important; }
.kose-nesne.tasiniyor img { filter: drop-shadow(0 1.4cqw 1.2cqw rgba(70, 40, 20, .4)); transform: scale(1.04); }
.kose-nesne.secili { outline: 0.5cqw dashed rgba(123, 63, 228, .85); outline-offset: 0.3cqw; border-radius: 1cqw; }
.kose-nesne.yeni img { animation: nesne-gir .5s cubic-bezier(.3,1.6,.5,1); }
@keyframes nesne-gir { from { transform: scale(.4); opacity: 0; } }

.sil-btn {
  position: absolute; z-index: 6000; transform: translate(-50%, -50%);
  width: 6cqw; height: 6cqw; min-width: 40px; min-height: 40px;
  border-radius: 50%; border: 0.5cqw solid #fff;
  background: #e0322f; color: #fff; font-size: 3cqw; font-weight: 800; line-height: 1;
  box-shadow: var(--golge); cursor: pointer;
}

.tasarim-panel {
  position: absolute; left: 1.2%; top: 12%; width: 22%; bottom: 14%;
  display: flex; flex-direction: column; gap: 0.7cqw;
  overflow-y: auto; overscroll-behavior: contain;
  padding: 0.3cqw 0.4cqw 1cqw;
  scrollbar-width: thin;
}
.kategori-btn {
  flex: none; text-align: left;
  padding: 0.9cqw 1.4cqw;
  font-size: 1.9cqw; font-weight: 800; color: #fff;
  background: var(--mor); border: 0.35cqw solid #fff; border-radius: 1.6cqw;
  box-shadow: var(--golge); cursor: pointer;
}
.kategori-btn[aria-expanded="true"] { background: var(--pembe); }
.kategori-btn::after { content: " ▾"; opacity: .8; }
.kategori-btn[aria-expanded="true"]::after { content: " ▴"; }
.tepsi {
  flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0.6cqw;
  padding: 0.7cqw; background: rgba(255, 251, 244, .94);
  border: 0.3cqw solid #fff; border-radius: 1.6cqw; box-shadow: var(--golge);
  animation: belir .3s ease both;
}
.tepsi[hidden] { display: none; }
.tepsi-nesne {
  aspect-ratio: 1; padding: 0.5cqw; cursor: pointer;
  background: #fff; border: 0.25cqw solid var(--krem-koyu); border-radius: 1.2cqw;
  display: grid; place-items: center;
  transition: transform .15s;
}
.tepsi-nesne:active { transform: scale(.92); }
.tepsi-nesne img { max-width: 100%; max-height: 100%; object-fit: contain; pointer-events: none; }

.tamam-btn {
  position: absolute; right: 2.4%; bottom: 3.4%; z-index: 20;
  padding: 1cqw 2.6cqw;
  font-size: 2.4cqw; font-weight: 800; color: #fff;
  background: linear-gradient(180deg, #5cc97a, #3a9d58);
  border: 0.45cqw solid #fff; border-radius: 4cqw;
  box-shadow: 0 0.6cqw 0 #2d7a44, var(--golge);
  cursor: pointer;
}
.tamam-btn:active { transform: translateY(0.4cqw); box-shadow: 0 0.2cqw 0 #2d7a44; }

.karakter {
  position: absolute; bottom: 2%;
  height: 62%; width: auto;
  filter: drop-shadow(0 0.6cqw 0.8cqw rgba(60, 35, 15, .3));
  pointer-events: none; user-select: none;
  animation: karakter-gir .9s cubic-bezier(.3,1.3,.5,1) both;
}
@keyframes karakter-gir { from { opacity: 0; transform: translateY(6%); } }

.balon.yuzlu { padding-left: 7.2cqw; text-align: left; }
.balon-yuz {
  position: absolute; left: 0.9cqw; top: 50%; transform: translateY(-50%);
  width: 5.6cqw; height: 5.6cqw; border-radius: 50%;
  border: 0.3cqw solid var(--kahve);
}

.hazir-yazi {
  position: absolute; left: 50%; top: 14%; transform: translateX(-50%);
  white-space: nowrap;
  padding: 0.8cqw 3.4cqw;
  font-size: 4.4cqw; font-weight: 800; color: #fff;
  background: linear-gradient(180deg, #ff7aa8, var(--pembe));
  border: 0.5cqw solid #fff; border-radius: 5cqw;
  box-shadow: var(--golge);
  animation: rozet 0.8s cubic-bezier(.3,1.6,.5,1) both;
}
@keyframes rozet { from { opacity: 0; transform: translateX(-50%) scale(.5); } }
.son-butonlar {
  position: absolute; left: 50%; bottom: 4%; transform: translateX(-50%);
  display: flex; gap: 2cqw;
  animation: belir .6s ease .3s both;
}
.son-butonlar button {
  padding: 1cqw 2.8cqw; font-size: 2.6cqw; font-weight: 800; color: #fff;
  border: 0.45cqw solid #fff; border-radius: 4cqw; cursor: pointer;
  box-shadow: var(--golge);
}
.son-butonlar .yeniden { background: var(--mor); }
.son-butonlar .bitir { background: linear-gradient(180deg, #5cc97a, #3a9d58); }
.uyari-baloncuk {
  position: absolute; left: 61%; top: 50%; transform: translate(-50%, -50%);
  max-width: 50%; padding: 1.6cqw 2.6cqw; text-align: center;
  font-size: 2.4cqw; font-weight: 700;
  background: #fff; border: 0.4cqw solid var(--kahve); border-radius: 2.4cqw;
  box-shadow: var(--golge); z-index: 7000; pointer-events: none;
  animation: belir .3s ease both;
}
@media (prefers-reduced-motion: reduce) {
  .kose-alani { transition: none; }
  .karakter, .hazir-yazi { animation: none; }
}

/* Köşenin göründüğü sahnelerde arka plan sabit kalır: köşe kesiti sınıf görseliyle birebir hizalanmalı */
#sahne[data-sahne="bos-kose"] #arka-plan img, #sahne[data-sahne="tasarim"] #arka-plan img,
#sahne[data-sahne="sinifa-aktar"] #arka-plan img, #sahne[data-sahne="bitis"] #arka-plan img { animation: none; }
.balon.konusma[data-kuyruk="yok"]::after { display: none; }
#sahne[data-sahne="tasarim"] #anlatici { left: 25%; right: 29%; }
.kategori-btn { font-size: 1.75cqw; }
.tasarim-panel { overflow-x: hidden; }
.tepsi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tepsi-nesne { min-width: 0; }
.tepsi-nesne img { width: 100%; height: 100%; }
.tamam-btn { right: auto; left: 1.2%; width: 22%; bottom: 3%; padding: 1cqw 0.6cqw; font-size: 2.1cqw; }
#sahne[data-sahne="tasarim"] #anlatici { left: 25%; right: 2%; }
/* Köşedeki nesnelerin katman sırası yalnızca köşe alanının içinde geçerlidir */
.kose-alani { isolation: isolate; }
#kose-katman { z-index: 1; }
#termometreler, #baloncuklar, #anlatici, #ekran-butonlari { z-index: 2; }
#sahne[data-sahne="sinifa-aktar"] #logo { display: none; }

/* ================================================================ SEKMELER */
#logo { display: none !important; }
#anlatici { display: none !important; }
#ilerleme { display: none; }
#sekmeler { display: flex; gap: 0.8cqw; margin: 0 auto; pointer-events: auto; }
#sekmeler[hidden] { display: none; }
.sekme {
  padding: 0.6cqw 1.6cqw;
  font-size: 1.75cqw; font-weight: 800; color: var(--mor-koyu);
  background: rgba(255, 255, 255, .92);
  border: 0.3cqw solid var(--mor); border-radius: 3cqw;
  box-shadow: var(--golge); cursor: pointer; white-space: nowrap;
}
.sekme.aktif { background: var(--mor); color: #fff; border-color: #fff; }
.sekme:focus-visible, .acilis-secimler button:focus-visible { outline: 0.4cqw solid var(--pembe); outline-offset: 0.3cqw; }
.acilis-kart { padding-bottom: 2.5cqw; top: 50%; transform: translate(-50%, -50%); }
.acilis-kart img { width: 44%; }
.acilis-secimler { display: grid; gap: 1.1cqw; margin-top: 1.6cqw; }
.acilis-secimler button {
  display: flex; align-items: center; gap: 1.4cqw;
  padding: 1cqw 2cqw; text-align: left;
  font-size: 2.6cqw; font-weight: 800; color: #fff;
  background: linear-gradient(180deg, #a06bff, var(--mor) 60%, var(--mor-koyu));
  border: 0.45cqw solid #fff; border-radius: 3cqw;
  box-shadow: 0 0.6cqw 0 var(--mor-koyu), var(--golge); cursor: pointer;
}
.acilis-secimler button:nth-child(2) { background: linear-gradient(180deg, #ff86b0, var(--pembe) 60%, #b82a5e); box-shadow: 0 0.6cqw 0 #b82a5e, var(--golge); }
.acilis-secimler button:nth-child(3) { background: linear-gradient(180deg, #6fd68c, #3a9d58 60%, #2d7a44); box-shadow: 0 0.6cqw 0 #2d7a44, var(--golge); }
.acilis-secimler button:active { transform: translateY(0.4cqw); }
.acilis-secimler span {
  flex: none; display: grid; place-items: center;
  width: 4.2cqw; height: 4.2cqw; border-radius: 50%;
  background: #fff; color: var(--kahve); font-size: 2.4cqw;
}
/* Üst kontroller ve yön düğmeleri köşe katmanının üstünde kalmalı */
#ust-kontroller, .yon-btn { z-index: 3; }
#kose-katman { pointer-events: none; }
#kose-katman > *:not(.karakter) { pointer-events: auto; }

/* ================================================================ SENARYO SEÇİMİ */
.senaryo-menu {
  position: absolute; left: 50%; top: 54%; transform: translate(-50%, -50%);
  width: 70%; padding: 2.4cqw 3cqw 2.8cqw;
  text-align: center;
  background: rgba(255, 251, 244, .95);
  border: 0.5cqw solid #fff; border-radius: 3cqw;
  box-shadow: 0 1.5cqw 4cqw rgba(90,58,34,.3);
  animation: belir .5s ease both;
}
.senaryo-menu h2 { margin: 0; font-size: 3.4cqw; line-height: 1.15; }
.senaryo-menu p { margin: 0.4cqw 0 1.6cqw; font-size: 2.1cqw; font-weight: 600; }
.senaryo-liste { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2cqw; }
.senaryo-kart {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 0.6cqw;
  padding: 1.4cqw 1cqw;
  font-size: 2.1cqw; font-weight: 800; color: var(--kahve);
  background: #fff; border: 0.4cqw solid var(--mor); border-radius: 2cqw;
  box-shadow: 0 0.5cqw 0 var(--mor-koyu); cursor: pointer;
}
.senaryo-kart:active { transform: translateY(0.4cqw); box-shadow: 0 0.1cqw 0 var(--mor-koyu); }
.senaryo-kart .no {
  display: grid; place-items: center; width: 5cqw; height: 5cqw; border-radius: 50%;
  background: var(--mor); color: #fff; font-size: 2.8cqw;
}
.senaryo-kart.yakinda { border-color: #c9b6ef; box-shadow: 0 0.5cqw 0 #b9a5e3; }
.senaryo-kart.yakinda .no { background: #b79cf0; }
.senaryo-kart .etiket {
  font-size: 1.4cqw; font-weight: 700; color: #fff;
  background: #9e8c7a; border-radius: 1cqw; padding: 0 0.8cqw;
}
.senaryo-kart:focus-visible { outline: 0.4cqw solid var(--pembe); outline-offset: 0.3cqw; }

/* ================================================================ SENARYO SAHNESİ */
.sahne-cocuk {
  position: absolute; bottom: 5%; height: 50%; width: auto;
  transition: left .9s ease-in-out;
  object-fit: contain; object-position: bottom center;
  filter: drop-shadow(0 0.6cqw 0.8cqw rgba(60, 35, 15, .28));
  animation: karakter-gir .8s cubic-bezier(.3,1.3,.5,1) both;
  user-select: none; -webkit-user-drag: none;
}
.sahne-cocuk.poz-degisti { animation: poz .35s ease; }
@keyframes poz { 0% { transform: scale(1); } 40% { transform: scale(1.03) translateY(-1%); } 100% { transform: scale(1); } }
.sahne-cocuk.secilebilir { cursor: pointer; animation: parilti 1.6s ease-in-out infinite; }
.sahne-cocuk.secilebilir:hover, .sahne-cocuk.secilebilir:focus-visible { outline: none; filter: drop-shadow(0 0 1.2cqw rgba(123, 63, 228, .9)); }
.sahne-cocuk.bakildi { animation: none; }
.sahne-cocuk.dogru { filter: drop-shadow(0 0 1.4cqw rgba(76, 175, 106, .95)); }
@keyframes parilti {
  0%,100% { filter: drop-shadow(0 0 0.4cqw rgba(123, 63, 228, .4)); }
  50% { filter: drop-shadow(0 0 1.4cqw rgba(123, 63, 228, .95)); }
}
.balon.dusunce .dusunce-resim { width: 8cqw; height: 7cqw; object-fit: contain; }

.soru-yazi {
  position: absolute; left: 50%; top: 13%; transform: translateX(-50%);
  white-space: nowrap; padding: 0.7cqw 3cqw;
  font-size: 3.4cqw; font-weight: 800; color: #fff;
  background: linear-gradient(180deg, #a06bff, var(--mor));
  border: 0.5cqw solid #fff; border-radius: 5cqw; box-shadow: var(--golge);
  animation: rozet .7s cubic-bezier(.3,1.6,.5,1) both;
}
.gitsin-kutu {
  position: absolute; left: 50%; top: 13%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 1.2cqw;
  padding: 1.6cqw 3cqw 2cqw;
  background: rgba(255, 251, 244, .96); border: 0.5cqw solid #fff; border-radius: 3cqw;
  box-shadow: 0 1.5cqw 4cqw rgba(90,58,34,.3);
  animation: rozet .6s cubic-bezier(.3,1.6,.5,1) both;
}
.gitsin-kutu p { margin: 0; font-size: 3cqw; font-weight: 800; white-space: nowrap; }
.gitsin-butonlar { display: flex; gap: 5cqw; }
.gitsin-butonlar button {
  width: 10cqw; height: 10cqw; min-width: 56px; min-height: 56px; border-radius: 50%;
  font-size: 5.6cqw; font-weight: 800; color: #fff; line-height: 1;
  border: 0.6cqw solid #fff; cursor: pointer; box-shadow: var(--golge);
  transition: transform .15s;
}
.gitsin-butonlar button:active { transform: scale(.9); }
.gitsin-butonlar .evet { background: radial-gradient(circle at 35% 30%, #7be08f, #3a9d58); }
.gitsin-butonlar .hayir { background: radial-gradient(circle at 35% 30%, #ff7a72, #d32f2a); }

/* Logo her sayfada üstte */
#ust-logo { height: 8cqw; width: auto; margin-left: 1cqw; filter: drop-shadow(0 0.2cqw 0.4cqw rgba(90,58,34,.25)); pointer-events: none; }
#sahne[data-sahne="acilis"] #ust-logo { visibility: hidden; }
.acilis-kart img { width: 40%; }

/* İkinci bölümde termometreler kısa ve çocukların yanında */
#sahne[data-bolum="bolum2"] .termometre { top: 40%; height: 44%; width: 7%; }
#sahne[data-bolum="bolum2"] .termometre .ad { display: none; }
#sahne[data-bolum="bolum2"] .termometre .seviye-yazi { font-size: 1.5cqw; }

/* Senaryo sahnesindeki eşyalar (oyun tahtası, piyonlar, lobutlar, top) */
.sahne-nesne {
  position: absolute; height: auto; pointer-events: none; user-select: none;
  filter: drop-shadow(0 0.4cqw 0.6cqw rgba(60, 35, 15, .25));
  animation: karakter-gir .7s ease both;
}
.sahne-nesne.top { transition: left var(--sure, 1.2s) linear, bottom var(--sure, 1.2s) linear; animation: none; }

/* Senaryo sonu kartı (gitti / gitmedi) */
.sonuc-kart .sonuc-butonlar { display: flex; gap: 1.2cqw; justify-content: center; flex-wrap: wrap; }

/* Gelişim Merdiveni logosu: her ekranda sağ alt köşede */
#kurum-logo {
  position: absolute; right: 11%; bottom: 2%; z-index: 4;
  width: 12cqw; height: auto; pointer-events: none; user-select: none;
  filter: drop-shadow(0 0 0.25cqw rgba(255, 255, 255, .95)) drop-shadow(0 0 0.5cqw rgba(255, 255, 255, .7));
}

/* İki çocuk aynı oyuncağı çekiştiriyor */
.sahne-nesne.cekistir { animation: cekistir .3s ease-in-out infinite; }
@keyframes cekistir { 0%,100% { transform: translateX(0) rotate(0); } 25% { transform: translateX(-1.4cqw) rotate(-6deg); } 75% { transform: translateX(1.4cqw) rotate(6deg); } }

/* Sakinleşme köşesi sahnesi (küreyle nefes) */
.sakin-kose {
  position: absolute; inset: 0; z-index: 6;
  background: rgba(255, 246, 236, .55); backdrop-filter: blur(0.6cqw);
  opacity: 0; transition: opacity .6s ease;
}
.sakin-kose.acik { opacity: 1; }
.sakin-kose .kose-alani { border-radius: 1.5cqw; box-shadow: 0 0.6cqw 2cqw rgba(90, 58, 34, .25); }
.sakin-kose .sakin-cocuk { left: 50%; translate: -50% 0; bottom: 8%; z-index: 300; animation: none; }
/* Birden ona sayarken köşede beliren büyük rakam */
.sayac-rakam {
  position: absolute; left: 20%; top: 14%; z-index: 310;
  font-family: "Baloo 2", system-ui, sans-serif; font-weight: 800; font-size: 11cqw; line-height: 1;
  color: #f07a1a; -webkit-text-stroke: 0.25cqw #fff; text-shadow: 0 0.5cqw 1.2cqw rgba(90, 58, 34, .3);
}
.sayac-rakam.pop { animation: rakam-pop .6s ease-out; }
@keyframes rakam-pop { 0% { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); } }

/* Küreyle nefes videosu: köşenin ortasında yuvarlak köşeli çerçeve */
.kure-video {
  position: absolute; left: 15%; top: 13%; width: 70%; aspect-ratio: 16 / 9; z-index: 5;
  border-radius: 2cqw; overflow: hidden; border: 0.5cqw solid #fff;
  box-shadow: 0 0.8cqw 2.4cqw rgba(90, 58, 34, .35);
  transition: opacity .8s ease, transform .8s ease;
}
.kure-video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.kure-video.kapan { opacity: 0; transform: scale(.96); }

/* Ayaklarını yere vurma: çocuk hafifçe zıplayıp yere basar, yerde "RAP!" yazısı belirir */
.sakin-kose .sakin-cocuk.rap { animation: rap-adim .32s ease-in 1; transform-origin: 50% 100%; }
@keyframes rap-adim { 0% { transform: translateY(0) } 45% { transform: translateY(-3.5%) } 80% { transform: translateY(0) scaleY(.96) } 100% { transform: none } }
.rap-yazi {
  position: absolute; z-index: 310; bottom: 6%; font-family: "Baloo 2", system-ui, sans-serif; font-weight: 800;
  font-size: 4.2cqw; color: #8a4b1f; -webkit-text-stroke: 0.15cqw #fff; animation: rap-yazi .7s ease-out forwards; pointer-events: none;
}
@keyframes rap-yazi { 0% { transform: scale(.5); opacity: 0 } 25% { transform: scale(1.15); opacity: 1 } 100% { transform: scale(1) translateY(-40%); opacity: 0 } }
@media (prefers-reduced-motion: reduce) { .sakin-kose .sakin-cocuk.rap, .rap-yazi { animation-duration: .01s; } }

/* Sonuç ekranı: üstte yeniden seçilebilen "gitsin mi?" sorusu, altta sonuç kartı */
.gitsin-kutu.ust { top: 9%; padding: 1.2cqw 2.6cqw 1.5cqw; gap: 0.9cqw; }
.gitsin-kutu.ust p { font-size: 2.5cqw; }
.gitsin-kutu.ust .gitsin-butonlar button { width: 7.5cqw; height: 7.5cqw; font-size: 4.2cqw; }
.sonuc-kart.alt { top: auto; bottom: 7%; transform: translateX(-50%); padding: 2cqw 3cqw; }
.sonuc-kart .ipucu { font-size: 1.7cqw; opacity: .8; margin-top: -0.4cqw; }
