/* ==========================================================================
   DERS OTURUMU (kısa ders) — 1.29.0 · Betik: assets/js/ders-oturumu.js
   Tam ekran odak görünümü: üstte kapat + ilerleme çubuğu, ortada tek soru kartı (listedeki kartın kendisi), altta Devam.
   Bitiş ekranı: Dede Korkut, sayaçlar, seri, günlük hedef, eylemler. Renkler site belirteçlerinden (açık/koyu tema).
   Ayrıca konu modu gösterge paneli notu (ünitenin tümü) ve kısa ders düğmeleri.
   ========================================================================== */
html.do-acik, html.do-acik body { overflow: hidden; }

/* Giriş düğmeleri (konu modu) */
.kn-oturum { gap: 6px; }
.kn-sorular-bas .kn-oturum { margin: 0 0 10px; }
.quiz-kapsam-not { margin: -4px 0 0; font-size: 0.8rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.quiz-dashboard-bar[hidden] { display: none; }

/* Perde ve yerleşim */
.do-perde { position: fixed; inset: 0; z-index: 1100; display: flex; background: var(--bg); color: var(--text); }
.do-kap { display: flex; flex-direction: column; width: 100%; max-width: 780px; height: 100%; margin: 0 auto; min-width: 0; }
.do-ust { display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 8px; }
.do-kapat { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius-full); border: 0; background: transparent; color: var(--text-muted); cursor: pointer; }
.do-kapat:hover { background: var(--surface-2); color: var(--text); }
.do-kapat:focus-visible, .do-devam:focus-visible { outline: 3px solid #ffc83d; outline-offset: 2px; }
.do-cubuk { flex: 1; height: 14px; border-radius: var(--radius-full); background: var(--surface-3); overflow: hidden; }
.do-cubuk i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--ok), color-mix(in srgb, var(--ok) 70%, #fff)); }
.do-sayac { flex: none; min-width: 52px; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text-muted); }
.do-baslik { margin: 0 16px 8px; font-size: var(--fs-14); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); outline: none; }
.do-sahne { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px 24px; outline: none; }
.do-sahne .question-card, .do-sahne .question-card.kn-gizli, .do-sahne .question-card.is-hidden { display: block !important; margin: 0; }
.do-yukleniyor, .do-bos { margin: 40px 0; text-align: center; color: var(--text-muted); font-weight: 700; }
.do-alt { padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--border); background: var(--surface); transition: background-color .2s ease; }
.do-alt[hidden] { display: none; }
.do-devam { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; font-size: var(--fs-18); }
.do-devam[hidden] { display: none; }
.do-devam kbd { font: inherit; font-size: 12px; opacity: .8; border: 1px solid currentColor; border-radius: 4px; padding: 0 5px; }
@media (pointer: coarse) { .do-devam kbd { display: none; } }
.do-perde.is-dogru .do-alt { background: var(--ok-bg); border-top-color: var(--ok-border); }
.do-perde.is-yanlis .do-alt { background: var(--bad-bg); border-top-color: var(--bad-border); }

/* Bitiş ekranı */
.do-perde.is-bitti .do-baslik { order: 0; margin: 4px 16px 0; text-align: center; text-transform: none; letter-spacing: 0; font-size: clamp(1.6rem, 1.2rem + 2vw, 2.3rem); font-weight: 1000; color: var(--text); }
.do-perde.is-bitti .do-cubuk i { background: var(--energy); }
.do-son { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding-top: 4px; }
.do-maskot { line-height: 0; }
.do-mesaj { margin: 0; max-width: 46ch; color: var(--text-muted); font-weight: 600; }
.do-sayilar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 520px; margin: 4px 0 0; }
.do-sayi { padding: 12px 8px; border-radius: var(--radius-lg); background: var(--surface); border: 2px solid var(--border); min-width: 0; }
.do-sayi dt { font-size: 12px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.do-sayi dd { margin: 4px 0 0; font-size: clamp(1.4rem, 1rem + 2vw, 2rem); font-weight: 1000; font-variant-numeric: tabular-nums; }
.do-sayi dd span { font-size: .6em; color: var(--text-muted); }
.do-sayi.is-dogru { border-color: var(--ok-border); }
.do-sayi.is-dogru dd b { color: var(--ok); }
.do-sayi.is-xp { border-color: color-mix(in srgb, var(--energy) 45%, transparent); }
.do-sayi.is-xp dd b { color: var(--energy-text, var(--energy)); }
.do-seri { margin: 0; padding: 6px 14px; border-radius: var(--radius-full); background: var(--energy-soft); color: var(--energy-text, var(--energy)); font-weight: 900; }
.do-hedef { width: 100%; max-width: 520px; }
.do-hedef p { margin: 0 0 6px; font-weight: 700; color: var(--text-muted); }
.do-hedef p b { color: var(--text); font-variant-numeric: tabular-nums; }
.do-hedef-cubuk { display: block; height: 10px; border-radius: var(--radius-full); background: var(--surface-3); overflow: hidden; }
.do-hedef-cubuk i { display: block; height: 100%; border-radius: inherit; background: var(--brand-600); }
.do-hedef.is-tamam .do-hedef-cubuk i { background: var(--ok); }
.do-eylem { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 520px; margin-top: 6px; }
.do-eylem > * { justify-content: center; text-align: center; min-height: 48px; }
@media (min-width: 640px) { .do-eylem { flex-direction: row; flex-wrap: wrap; justify-content: center; } .do-eylem > * { flex: 1 1 auto; } }

/* Hareket (azaltılmış harekette yok) */
@media (prefers-reduced-motion: no-preference) {
  .do-perde { animation: do-gir .22s ease-out; }
  .do-cubuk i { transition: width .35s cubic-bezier(.2, .8, .2, 1); }
  .do-sahne .question-card { animation: do-kart .26s cubic-bezier(.2, .8, .2, 1); }
  .do-son > * { animation: do-kart .4s cubic-bezier(.2, .8, .2, 1) both; }
  .do-son > :nth-child(2) { animation-delay: .06s; } .do-son > :nth-child(3) { animation-delay: .12s; }
  .do-son > :nth-child(4) { animation-delay: .18s; } .do-son > :nth-child(5) { animation-delay: .24s; } .do-son > :nth-child(6) { animation-delay: .3s; }
  .do-maskot { animation: do-zipla .7s cubic-bezier(.2, .8, .2, 1) both !important; }
}
@keyframes do-gir { from { opacity: 0; } to { opacity: 1; } }
@keyframes do-kart { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes do-zipla { 0% { opacity: 0; transform: scale(.6); } 60% { opacity: 1; transform: scale(1.08); } 100% { transform: scale(1); } }
