/* Eğlenerek Öğren — stiller
   Açık arka plan, büyük yazılar, yüksek kontrast. Harici font yok. */

:root {
  --bg: #f3f7fc;
  --surface: #ffffff;
  --surface-2: #eaf0f8;
  --ink: #15202e;
  --ink-2: #3a4859;
  --line: #c3d0e0;
  --primary: #2a3caa;
  --primary-hover: #1f2f8c;
  --ok: #12683a;
  --ok-bg: #e1f4e8;
  --bad: #a3231a;
  --bad-bg: #fde7e5;
  --warn: #7f4b00;
  --warn-bg: #fff1d2;
  --info: #3a4859;
  --info-bg: #eceff4;
  --focus: #ffcf3f;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 3px 0 rgba(21, 32, 46, 0.10), 0 10px 24px rgba(21, 32, 46, 0.07);
  --tc: #0b7a82;
  --tc-soft: #d9f2f3;
  --sc: #1f6fb2;
  --sc-soft: #e2effa;
  --fs: clamp(17px, 0.75vw + 12px, 24px);
  font-size: var(--fs);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.45;
  min-height: 100vh;
}

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 0.6em; }
small { font-size: 0.8em; }
svg { max-width: 100%; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 8px; top: -60px;
  background: var(--ink); color: #fff;
  padding: 10px 16px; border-radius: 10px; z-index: 100;
  font-weight: 700;
}
.skip-link:focus { top: 8px; }

.noscript { padding: 24px; font-size: 1.2rem; text-align: center; background: var(--warn-bg); }

:focus { outline: none; }
:focus-visible {
  outline: 4px solid var(--ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 9px var(--focus);
  border-radius: 10px;
}
h1:focus-visible, h2:focus-visible { box-shadow: none; outline-offset: 6px; }

.muted { color: var(--ink-2); }
.small { font-size: 0.85rem; }
.center { text-align: center; }

/* ---------- Düğmeler ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4em;
  min-height: 52px;
  padding: 0.55em 1.1em;
  border: 3px solid transparent;
  border-radius: 14px;
  font: inherit; font-weight: 800; font-size: 1rem;
  cursor: pointer;
  text-align: center;
  background: var(--surface);
  color: var(--ink);
  transition: transform 0.12s ease, background-color 0.12s ease, box-shadow 0.12s ease;
  touch-action: manipulation;
}
.btn:active:not(:disabled) { transform: translateY(2px); }
.btn:disabled { cursor: not-allowed; opacity: 0.5; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 0 #18237a; }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: 0 3px 0 var(--line); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); }
.btn-danger { background: #fff; color: var(--bad); border-color: #e6a19b; box-shadow: 0 3px 0 #e6a19b; }
.btn-danger:hover:not(:disabled) { background: var(--bad-bg); }
.btn-lg { font-size: 1.1rem; min-height: 60px; padding: 0.6em 1.3em; }
.btn-xl { font-size: 1.3rem; min-height: 68px; padding: 0.6em 1.5em; }
.btn-small { min-height: 46px; font-size: 0.9rem; padding: 0.4em 0.9em; }
.btn-tool { min-height: 48px; font-size: 0.95rem; padding: 0.35em 0.9em; background: var(--surface); border-color: var(--line); }
.btn-tool:hover { background: var(--surface-2); }
.icon-btn {
  width: 46px; height: 46px; border-radius: 10px;
  border: 2px solid var(--line); background: #fff; color: var(--ink);
  font-size: 1.05rem; font-weight: 800; cursor: pointer;
}
.icon-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.icon-btn:hover:not(:disabled) { background: var(--surface-2); }

/* ---------- Üst çubuk ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 3px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1rem; flex: 0 1 auto; min-width: 0; }
.brand-text { white-space: nowrap; font-size: 1.1rem; }
/* Üst çubukta yer yetmezse hiçbir şey yarım kalmasın (app.js → fitTopbar ölçer):
   önce site adı, yine sığmazsa oyun etiketi (ör. “2. Ünite”; görev ekranında da yazar) gizlenir */
.topbar.tb-compact .brand-text { display: none; }
.topbar.tb-mini .mode-pill { display: none; }
.brand .logo-mark { flex: 0 0 auto; }
.bw-1, .bw-2 { color: #0d2a52; }
.hero h1.brand-title { margin: 0; line-height: 0; }
.brand-logo { display: block; width: 100%; max-width: 440px; height: auto; margin: -6px 0 -10px -14px; }
/* Puan tablosu küçülmez; yer yetmezse önce marka yazısı kısalır */
.scoreboard { display: flex; gap: 10px; flex: 1 0 auto; justify-content: center; flex-wrap: nowrap; min-width: 0; }
.scoreboard .team-chip { flex: 0 1 auto; white-space: nowrap; }
/* Geniş ekranlarda üst çubuk tek satır: yer yetmezse marka yazısı “…” ile kısalır */
@media (min-width: 1101px) {
  .topbar { flex-wrap: nowrap; }
  .brand { flex: 0 1 auto; min-width: 0; overflow: hidden; }
  .tools { flex: 0 0 auto; }
}
/* Tablet ve küçük projeksiyon: puan tablosu kendi satırında */
@media (min-width: 761px) and (max-width: 1100px) {
  .scoreboard { order: 3; flex-basis: 100%; }
}
/* 1101–1200 px: “Sırada” yazılı takım çipiyle tek satıra sığmaz; puan tablosu yine kendi satırında */
@media (min-width: 1101px) and (max-width: 1200px) {
  .topbar { flex-wrap: wrap; }
  .scoreboard { order: 3; flex-basis: 100%; }
}
/* Orta genişlikte üst çubuk sığsın: öğretmen oyununda marka yazısı yerine yalnızca etiket */
@media (max-width: 1150px) {
  .brand:has(.mode-pill) .brand-text { display: none; }
}
.tools { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }

.team-chip {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  background: var(--tc-soft);
  border: 3px solid var(--tc);
  border-radius: 999px;
  min-width: 0;
  font-weight: 700;
}
.team-chip.is-active {
  background: var(--tc);
  color: #fff;
  box-shadow: 0 0 0 4px var(--tc-soft), 0 6px 14px rgba(0, 0, 0, 0.15);
  transform: scale(1.04);
}
.chip-mascot { font-size: 1.5rem; line-height: 1; }
.chip-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 12em; }
.chip-score {
  background: #fff; color: var(--ink);
  border-radius: 999px; padding: 2px 12px;
  font-size: 1.25rem; font-weight: 900;
  border: 2px solid var(--tc);
}
.chip-score small { font-size: 0.6em; font-weight: 700; }
.chip-turn {
  font-size: 0.8rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.04em;
  background: #fff; color: var(--tc); border-radius: 999px; padding: 2px 8px;
}

/* ---------- Genel düzen ---------- */
#main { outline: none; }
.screen {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}
.panel {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 0 0 16px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.section-title { text-align: center; margin-top: 28px; }
.eyebrow { font-weight: 800; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.85rem; margin-bottom: 4px; }
.lead { font-size: 1.35rem; font-weight: 600; }
.lead-sm { font-size: 1.05rem; color: var(--ink-2); }
.screen-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 20px; }
.note {
  background: #fff8e1; border: 2px solid #f0d58a; border-radius: var(--radius-sm);
  padding: 8px 12px; font-size: 0.9rem; color: #4d3a00; margin-top: 10px;
}

/* ---------- Ana ekran ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 24px; align-items: center;
  background: linear-gradient(135deg, #ffffff 0%, #eaf4ff 55%, #fff3e6 100%);
  border: 2px solid var(--line);
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.hero h1 { font-size: clamp(2rem, 4vw, 3.2rem); color: #1b2a6b; }
.home-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 16px; }
.hero-art { display: flex; justify-content: center; }
.home-art { width: 100%; max-height: 52vh; height: auto; }
.storage-note { margin-top: 12px; background: var(--warn-bg); border-radius: 10px; padding: 8px 12px; font-size: 0.9rem; }

.system-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.system-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 20px 14px;
  background: var(--sc-soft);
  border: 3px solid var(--sc);
  border-radius: 22px;
  font: inherit; color: var(--ink); cursor: pointer;
  box-shadow: 0 5px 0 var(--sc);
  transition: transform 0.15s ease;
  text-align: center;
}
.system-card:hover { transform: translateY(-3px); }
.sc-name { font-size: 1.35rem; font-weight: 900; color: var(--sc); }
.sc-tag { font-size: 1rem; }
.sc-go { margin-top: 6px; font-weight: 800; background: #fff; border-radius: 999px; padding: 4px 14px; border: 2px solid var(--sc); }
.system-card:disabled { cursor: not-allowed; opacity: 0.6; transform: none; }

/* ---------- Üniteler (ana ekran) ---------- */
.unit-title { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 36px; margin-bottom: 2px; }
.unit-no {
  font-size: 0.85rem; font-weight: 900; letter-spacing: 0.04em; text-transform: uppercase;
  color: #fff; background: #0d2a52; border-radius: 999px; padding: 4px 12px;
}
.unit-sub { text-align: center; color: var(--ink-2); font-weight: 700; margin: 0 0 12px; }
.unit-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 16px; }
.unit-actions .btn { flex: 0 1 320px; }

/* ---------- Nasıl oynanır ---------- */
.howto-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.howto-steps li { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 2px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.howto-steps h2 { font-size: 1.2rem; margin-bottom: 4px; }
.howto-ic { font-size: 2.2rem; line-height: 1; flex: 0 0 auto; }
.type-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 14px; }
.type-card { background: #fff; border: 2px solid var(--line); border-radius: var(--radius); padding: 16px; text-align: center; }
.type-ic { font-size: 2.2rem; }

/* ---------- Kurulum ---------- */
.setup-form fieldset.panel { margin-bottom: 16px; }
.setup-form legend {
  font-size: 1.25rem; font-weight: 900; padding: 0 6px;
  display: flex; align-items: center; gap: 8px;
}
.step-num {
  display: inline-grid; place-items: center;
  width: 1.7em; height: 1.7em; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 0.85em;
}
.teams-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.team-editor { border: 3px solid var(--tc); background: var(--tc-soft); border-radius: var(--radius); padding: 14px; min-width: 0; }
.team-editor h3 { color: var(--tc); display: flex; align-items: center; gap: 8px; }
.te-mascot { font-size: 1.8rem; }
.field { display: block; margin: 0 0 12px; border: 0; padding: 0; min-width: 0; }
.field-label { display: block; font-weight: 800; margin-bottom: 6px; padding: 0; }
.text-input {
  width: 100%; font: inherit; font-size: 1.1rem; font-weight: 700;
  padding: 10px 12px; min-height: 52px;
  border: 3px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
}
.text-input:focus-visible { border-color: var(--ink); }

/* görünmez ama odaklanabilir radyo/onay kutuları */
.swatch input, .mascot-opt input, .opt input, .sys-check input {
  position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0;
}
.swatches, .mascots { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch span, .mascot-opt span {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 46px; padding: 6px 12px;
  border: 3px solid var(--line); border-radius: 999px; background: #fff;
  cursor: pointer; font-weight: 700; font-size: 0.95rem;
}
.swatch i { width: 22px; height: 22px; border-radius: 50%; background: var(--c); display: inline-block; border: 2px solid rgba(0, 0, 0, 0.25); }
.mascot-opt b { font-size: 1.4rem; line-height: 1; }
.swatch input:checked + span, .mascot-opt input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; }
.swatch input:checked + span::after, .mascot-opt input:checked + span::after { content: "✔"; }
.swatch input:focus-visible + span, .mascot-opt input:focus-visible + span,
.opt input:focus-visible + span, .sys-check input:focus-visible + span {
  outline: 4px solid var(--ink); outline-offset: 3px; box-shadow: 0 0 0 9px var(--focus);
}

.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.opt span {
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
  min-height: 64px; padding: 10px 14px;
  border: 3px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer;
}
.opt b { font-size: 1.1rem; }
.opt small { color: var(--ink-2); font-size: 0.85rem; }
.opt input:checked + span { border-color: var(--primary); background: #e6eaff; box-shadow: inset 0 0 0 2px var(--primary); }
.opt input:checked + span b::before { content: "● "; color: var(--primary); }

.sys-checks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sys-check span {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 10px; min-height: 110px;
  border: 3px solid var(--line); border-radius: 16px; background: #fff; cursor: pointer; text-align: center;
}
.sys-check .tick {
  position: absolute; top: 8px; right: 10px;
  width: 30px; height: 30px; border-radius: 8px; border: 3px solid var(--line);
  display: grid; place-items: center; font-style: normal; color: transparent; font-weight: 900;
}
.sys-check input:checked + span { border-color: var(--sc); background: var(--sc-soft); }
.sys-check input:checked + span .tick { background: var(--sc); border-color: var(--sc); color: #fff; }

.setup-summary {
  background: #e6eaff; border: 3px solid var(--primary); border-radius: var(--radius);
  padding: 14px 18px; font-size: 1.15rem; text-align: center; margin-bottom: 8px;
}
.form-error { color: var(--bad); font-weight: 800; text-align: center; min-height: 1.4em; }
.danger-zone { margin-top: 24px; }
.danger-zone h2 { font-size: 1.2rem; }

/* ---------- Öğretmenin Soruları (ayrı oyun) ---------- */
:root { --teach: #9a3412; --teach-soft: #fff1e0; --teach-line: #f0b37a; }
.btn-teacher { background: var(--teach-soft); color: var(--teach); border-color: var(--teach); box-shadow: 0 3px 0 var(--teach); }
.btn-teacher:hover:not(:disabled) { background: #ffe4c7; }
.mode-pill {
  display: inline-flex; align-items: center; gap: 4px; margin-left: 6px;
  background: var(--teach-soft); color: var(--teach); border: 2px solid var(--teach);
  border-radius: 999px; padding: 2px 10px; font-size: 0.85rem; font-weight: 900; white-space: nowrap;
}
.teacher-pill { background: var(--teach-soft); border-color: var(--teach); color: var(--teach); }
.teacher-card {
  display: flex; align-items: center; gap: 18px; width: 100%;
  padding: 18px 20px; text-align: left; cursor: pointer; font: inherit; color: var(--ink);
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border: 3px solid var(--teach); border-radius: 22px; box-shadow: 0 5px 0 var(--teach);
  transition: transform 0.15s ease;
}
.teacher-card:hover { transform: translateY(-3px); }
.teacher-card .sc-go { border-color: var(--teach); flex: 0 0 auto; }
.tc-icon { font-size: 3.4rem; line-height: 1; margin: 0; flex: 0 0 auto; }
.tc-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 auto; }
.tc-name { font-size: 1.45rem; font-weight: 900; color: var(--teach); }
.tc-desc { font-size: 1.02rem; }
.tc-count { font-weight: 800; font-size: 0.95rem; color: var(--ink-2); }
.teacher-hero {
  display: flex; align-items: center; gap: 18px;
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border: 3px solid var(--teach); border-radius: 26px; padding: 18px 22px; margin-bottom: 16px;
}
.teacher-hero h1 { color: var(--teach); margin-bottom: 6px; }
.teacher-hero .lead-sm { margin: 0; color: var(--ink); }
.teacher-play { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 10px; }
.teacher-play .btn { flex: 1 1 260px; }
.teacher-empty { text-align: center; border-style: dashed; border-color: var(--teach-line); }
.teacher-screen .q-pair.is-custom { border-color: var(--teach-line); background: #fffaf3; }
.q-entry-actions { display: flex; flex-wrap: wrap; gap: 10px; }
/* Kalıcı soru seti (ör. 15/10/2026) */
.set-area { border: 3px solid #1e5aa8; background: linear-gradient(135deg, #ffffff 0%, #eaf2fd 100%); display: flex; flex-direction: column; gap: 10px; }
.set-head { display: flex; align-items: center; gap: 14px; }
.set-ic { font-size: 3rem; line-height: 1; flex: 0 0 auto; }
.set-head h2 { color: #1e4f94; font-size: 1.9rem; margin-bottom: 4px; }
.set-head p { margin: 0 0 6px; }
.set-sum { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.set-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.set-actions .btn { flex: 1 1 240px; }
.set-list h3.set-sys { display: flex; align-items: center; gap: 6px; margin: 14px 0 6px; font-size: 1.1rem; }
.set-list ol { margin: 0; padding-left: 1.6em; display: grid; gap: 6px; }
.set-list li { overflow-wrap: anywhere; }
.set-q { display: block; font-weight: 700; }
.set-a { display: inline-block; margin-top: 2px; font-size: 0.92rem; font-weight: 800; color: var(--ok); }
.own-title { text-align: left; margin-top: 22px; color: var(--teach); }

/* Karışık Bölüm */
.mix-card { border: 3px solid var(--sc); background: linear-gradient(135deg, #ffffff 0%, var(--sc-soft) 100%); display: flex; flex-direction: column; gap: 10px; }
.mix-head { display: flex; align-items: center; gap: 14px; }
.mix-head h2 { color: var(--sc); font-size: 1.45rem; margin-bottom: 4px; }
.mix-head p { margin: 0 0 6px; }
.mix-counts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mix-sys {
  display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 0.9rem;
  border: 2px solid var(--sc); border-radius: 999px; padding: 2px 10px 2px 4px; background: #fff; white-space: nowrap;
}
.mix-list ul { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 6px; }
.mix-list li { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 6px 10px; overflow-wrap: anywhere; }
.mix-card > .btn { align-self: flex-start; }
.mix-q { margin: 12px 0 8px; }
.mix-opts { margin-bottom: 4px; }
.opt b .sys-icon { vertical-align: middle; }
.sys-check small { font-weight: 700; color: var(--ink-2); }
.sys-check.is-disabled span { opacity: 0.55; cursor: not-allowed; border-style: dashed; }
.setup-teacher h1 { color: var(--teach); }

/* ---------- Soru yönetimi ---------- */
.q-entry h2 { font-size: 1.25rem; }
.q-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 18px; }
.q-errors { border-color: var(--bad); background: var(--bad-bg); }
.q-errors h2 { font-size: 1.2rem; color: var(--bad); }
.q-errors ul { margin: 0; padding-left: 1.2em; font-weight: 700; }
.q-sys { border-left: 8px solid var(--sc); }
.q-sys h2 { display: flex; align-items: center; gap: 8px; color: var(--sc); font-size: 1.4rem; }
.q-sum { font-weight: 600; }
.q-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.q-pair {
  display: flex; flex-direction: column; gap: 8px;
  border: 2px solid var(--line); border-radius: 16px; padding: 12px 14px; background: #fff; min-width: 0;
}
.q-pair.is-custom { border-color: var(--primary); background: #f3f5ff; }
.q-pair.is-hidden { background: var(--surface-2); border-style: dashed; }
.q-pair.is-hidden .q-prompts { color: var(--ink-2); text-decoration: line-through; text-decoration-thickness: 1px; }
.q-pair-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.q-tag { display: inline-block; font-size: 0.8rem; font-weight: 800; border-radius: 999px; padding: 3px 10px; background: var(--surface-2); border: 2px solid var(--line); }
.q-tag-custom { background: #e6eaff; border-color: var(--primary); color: #1b2a8c; }
.q-tag-hidden { background: var(--warn-bg); border-color: #d7a54a; color: var(--warn); }
.q-prompts { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: 1rem; overflow-wrap: anywhere; }
.q-answers summary { cursor: pointer; font-weight: 800; color: var(--primary); min-height: 44px; display: flex; align-items: center; }
.q-answers p { margin: 4px 0; font-size: 0.95rem; overflow-wrap: anywhere; }
.q-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }

.q-tips { background: #fff8e1; border-color: #f0d58a; }
.q-tips p { margin: 0; }
.opt-compact span { min-height: 54px; }
.opt-compact b { display: inline-flex; align-items: center; gap: 6px; }
.qpair-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.qform legend { font-size: 1.25rem; font-weight: 900; display: flex; align-items: center; gap: 8px; padding: 0 6px; }
.qform textarea.text-input { resize: vertical; min-height: 76px; font-weight: 600; }
select.text-input { cursor: pointer; }
.field-hint { display: block; margin-top: 4px; font-size: 0.85rem; }
.q-fieldset { border: 0; padding: 0; margin: 0 0 12px; }
.q-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1.4fr); gap: 6px; align-items: center; margin-bottom: 6px; }
.q-rownum {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--ink); color: #fff; font-weight: 900; font-size: 0.9rem;
}
.q-arrow { font-weight: 900; color: var(--ink-2); }
.text-input::placeholder { color: #6b7686; font-weight: 600; }
.q-order { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.q-order li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: center; }
.q-check { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-weight: 700; min-height: 44px; cursor: pointer; }
.q-check input { width: 24px; height: 24px; }
.q-preview { display: flex; justify-content: center; background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 6px; margin-bottom: 12px; }
.q-preview .diagram { max-height: 300px; width: auto; height: auto; }

/* ---------- Ortak hap etiketleri ---------- */
.sys-pill, .count-pill, .together-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px; font-weight: 800; font-size: 0.95rem;
  border: 2px solid var(--line); background: #fff;
}
.sys-pill { background: var(--sc-soft); border-color: var(--sc); color: var(--ink); }
.together-pill { background: #fff3c4; border-color: #e0b52c; }
.center-pill { display: flex; width: max-content; margin: 0 auto 10px; }
.team-tag {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--tc-soft); border: 2px solid var(--tc); color: var(--ink);
  border-radius: 999px; padding: 2px 12px; font-weight: 800;
}

/* ---------- Bilgi kartları ---------- */
.intro-head { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 14px; }
.intro-card {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; align-items: center;
  background: #fff; border: 4px solid var(--sc); border-radius: 26px; padding: 24px;
  box-shadow: 0 6px 0 var(--sc);
}
.intro-text h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); color: var(--sc); }
.intro-p { font-size: clamp(1.2rem, 1.6vw, 1.6rem); font-weight: 600; margin-bottom: 0.5em; }
.intro-visual { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.intro-visual > .diagram { max-height: 58vh; width: auto; height: auto; }
.intro-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.intro-dots { display: flex; gap: 10px; }
.intro-dots i { width: 16px; height: 16px; border-radius: 50%; background: var(--line); display: block; }
.intro-dots i.on { background: var(--sc); transform: scale(1.25); }
.first-turn { text-align: center; margin-top: 14px; font-weight: 700; }

.gas-visual { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.gas-chips { display: grid; gap: 10px; width: 100%; }
.gas-chip { margin: 0; padding: 12px 16px; border-radius: 16px; font-size: 1.2rem; border: 3px solid; text-align: center; }
.gas-in { background: #e2effa; border-color: #1f6fb2; }
.gas-out { background: #eef0f3; border-color: #6b7280; }

.joints-visual { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: center; width: 100%; }
.joints-visual .diagram { max-height: 52vh; width: 100%; height: auto; }
.bone-types { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.bone-types li { display: flex; flex-direction: column; align-items: center; background: #fbf7ee; border: 2px solid #d9cfb8; border-radius: 14px; padding: 8px; text-align: center; }
.bone-types svg { width: 120px; height: 50px; }
.bone-types span { font-size: 0.85rem; color: var(--ink-2); }

.blood-visual { margin: 0; width: 100%; text-align: center; }
.blood-visual svg { width: 100%; max-width: 520px; height: auto; }
.blood-visual .o2 { font-size: 11px; font-weight: 800; fill: #1f6fb2; }
.blood-visual figcaption { font-weight: 700; }
.legend-o2 { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 2px solid #1f6fb2; color: #1f6fb2; font-weight: 800; font-size: 0.8rem; }
.legend-food { display: inline-block; width: 26px; height: 18px; border-radius: 5px; background: #ffe08a; border: 2px solid #a87400; vertical-align: middle; }

/* ---------- Animasyonlar ---------- */
.anim-box { width: 100%; display: flex; flex-direction: column; align-items: center; }
.anim-controls { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 8px; }
.anim-caption { font-weight: 700; text-align: center; min-height: 3em; margin: 6px 0 0; }

.breath-svg { width: 100%; max-width: 360px; height: auto; }
.breath .b-lungs { transform-box: fill-box; transform-origin: 50% 0%; transition: transform 2.6s ease-in-out; }
.breath .b-dia { transform-box: fill-box; transform-origin: 50% 100%; transition: transform 2.6s ease-in-out; }
.breath[data-state="in"] .b-lungs { transform: scale(1.08); }
.breath[data-state="in"] .b-dia { transform: translateY(8px) scaleY(0.6); }
.breath .b-air { opacity: 0; transition: opacity 0.6s ease; }
.breath[data-state="in"] .b-air-in, .breath[data-state="out"] .b-air-out { opacity: 1; }
.breath .cap-in, .breath[data-state="in"] .cap-out { display: none; }
.breath[data-state="in"] .cap-in { display: inline; }
.b-dia-label { font-size: 13px; font-weight: 800; fill: #8a3f12; }

.circ-svg { width: 100%; max-width: 460px; height: auto; }
.circ-svg .c-big { font-size: 18px; font-weight: 900; fill: var(--ink); }
.circ-svg .c-small { font-size: 12px; font-weight: 700; fill: var(--ink-2); }
.circ-svg .c-lab { font-size: 15px; font-weight: 900; }
.circ-svg .c-red { fill: #b3261e; }
.circ-svg .c-blue { fill: #1f55b8; }

/* ---------- Görev ekranı ---------- */
.task-screen { padding-top: 14px; }
.turn-banner {
  display: flex; align-items: center; gap: 14px;
  background: var(--tc); color: #fff;
  border-radius: 22px; padding: 10px 20px; margin-bottom: 12px;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.18);
}
.turn-mascot { font-size: 2.6rem; line-height: 1; background: #fff; border-radius: 50%; width: 1.5em; height: 1.5em; display: grid; place-items: center; flex: 0 0 auto; }
.turn-text { display: flex; flex-direction: column; min-width: 0; }
.turn-label { font-size: 0.9rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; }
.turn-text strong { font-size: clamp(1.5rem, 3vw, 2.2rem); overflow-wrap: anywhere; }
.task-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.timer {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px; border-radius: 999px; background: #fff; border: 2px solid var(--line); font-weight: 800;
}
.timer-off { color: var(--ink-2); }
.timer b { font-size: 1.2rem; min-width: 1.6em; display: inline-block; text-align: right; }
.timer-bar { width: 90px; height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.timer-bar i { display: block; height: 100%; background: var(--primary); transition: width 0.2s linear; }
.timer.is-low { border-color: var(--warn); background: var(--warn-bg); color: var(--warn); }
.timer.is-low .timer-bar i { background: var(--warn); }

.progress-dots { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 10px; }
.pdot {
  min-width: 34px; height: 34px; padding: 0 6px; border-radius: 999px;
  display: grid; place-items: center; font-weight: 800; font-size: 0.85rem;
  background: var(--tc-soft); border: 3px solid var(--tc); color: var(--ink);
}
.pdot.is-current { background: var(--tc); color: #fff; transform: scale(1.15); }
.pdot.done-ok { background: var(--ok-bg); }
.pdot.done-bad { background: var(--bad-bg); }

.prompt { font-size: clamp(1.6rem, 3vw, 2.4rem); margin: 4px 0 6px; overflow-wrap: anywhere; }
.task-note { display: inline-block; background: #fff8e1; border: 2px solid #f0d58a; border-radius: 10px; padding: 4px 12px; font-weight: 700; }
.hint { color: var(--ink-2); font-size: 1rem; margin-bottom: 10px; }

.task-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.task-grid.task-find { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.task-body, .task-aside { min-width: 0; }
/* Kontrol/Sonraki düğmesi her ekran boyunda görünür kalır */
.task-actions {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: stretch; gap: 6px;
  margin-top: 12px; padding: 10px 0 12px;
  background: linear-gradient(to top, var(--bg) 82%, rgba(243, 247, 252, 0));
}
.task-actions p { margin: 0; }
.next-up { text-align: center; font-weight: 700; }

@media (min-width: 981px) {
  .task-head { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: 16px; align-items: center; margin-bottom: 4px; }
  .task-head .turn-banner { margin-bottom: 0; }
  .task-head .progress-dots { margin-bottom: 0; }
  .task-screen .prompt { margin-top: 8px; }
  .task-screen .hint { margin-bottom: 6px; }
}
@media (min-width: 981px) and (max-height: 820px) {
  .diagram-frame .diagram { height: calc(100vh - 330px); min-height: 330px; }
  .task-screen .turn-mascot { font-size: 2rem; }
  .choice { min-height: 64px; }
}

/* Çoktan seçmeli */
.choice-list { display: grid; gap: 12px; }
.choice {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  width: 100%; min-height: 76px; padding: 12px 16px;
  background: #fff; color: var(--ink);
  border: 4px solid var(--line); border-radius: 18px;
  font: inherit; font-size: clamp(1.25rem, 2vw, 1.6rem); font-weight: 800; text-align: left;
  cursor: pointer; box-shadow: 0 4px 0 var(--line);
}
.choice:hover:not(:disabled) { border-color: var(--tc); }
.choice:disabled { cursor: default; opacity: 1; }
.choice-key {
  flex: 0 0 auto; width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center; background: var(--surface-2); font-weight: 900;
}
.choice-text { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.choice.is-selected { border-color: var(--tc); background: var(--tc-soft); box-shadow: 0 4px 0 var(--tc); }
.choice.is-selected .choice-key { background: var(--tc); color: #fff; }
.choice.is-correct { border-color: var(--ok); background: var(--ok-bg); box-shadow: 0 4px 0 var(--ok); }
.choice.is-correct .choice-key { background: var(--ok); color: #fff; }
.choice.is-wrong { border-color: var(--bad); background: var(--bad-bg); border-style: dashed; box-shadow: none; }
.choice.is-wrong .choice-key { background: var(--bad); color: #fff; }

.mark { display: inline-block; font-size: 0.85rem; font-weight: 900; border-radius: 999px; padding: 3px 10px; white-space: normal; }
.mark-ok { background: var(--ok); color: #fff; }
.mark-bad { background: var(--bad); color: #fff; }
.mark-sel { background: var(--tc); color: #fff; }

/* Çizimde bul */
.diagram-frame {
  background: #fff; border: 3px solid var(--line); border-radius: 22px;
  padding: 8px; display: flex; justify-content: center;
}
.diagram-frame .diagram { width: auto; height: min(64vh, 600px); max-width: 100%; }
.diagram { display: block; }
.hs > * { fill: transparent; stroke: transparent; stroke-width: 3; }
.diagram.is-interactive .hs { cursor: pointer; }
.diagram.is-interactive .hs:hover > * { fill: rgba(42, 60, 170, 0.12); stroke: rgba(42, 60, 170, 0.7); stroke-dasharray: 6 5; }
.hs.is-selected > * { fill: rgba(42, 60, 170, 0.2); stroke: var(--primary); stroke-width: 4; stroke-dasharray: 8 5; }
.hs.is-correct > * { fill: rgba(18, 104, 58, 0.22); stroke: var(--ok); stroke-width: 4; stroke-dasharray: none; }
.hs.is-wrong > * { fill: rgba(163, 35, 26, 0.14); stroke: var(--bad); stroke-width: 4; stroke-dasharray: 3 4; }
.hs.is-highlight > * { fill: rgba(255, 207, 63, 0.28); stroke: #b98a00; stroke-width: 3; stroke-dasharray: 6 4; }
.num { pointer-events: none; }
.num circle { fill: #fff; stroke: var(--ink); stroke-width: 2.5; }
.num text { font-size: 14px; font-weight: 900; fill: var(--ink); font-family: inherit; }
.num.is-selected circle { fill: var(--primary); stroke: var(--primary); }
.num.is-selected text { fill: #fff; }
.num.is-correct circle { fill: var(--ok); stroke: var(--ok); }
.num.is-correct text { fill: #fff; }
.num.is-wrong circle { fill: var(--bad); stroke: var(--bad); }
.num.is-wrong text { fill: #fff; }
.x-badge { fill: #fff; stroke: var(--bad); stroke-width: 2.5; }
.num .x-text { font-size: 12px; fill: var(--bad); }
.lab { pointer-events: none; }
.lab-line { stroke: var(--ink); stroke-width: 2; }
.lab-dot { fill: var(--ink); }
.lab-box { fill: #fff; stroke: var(--ink); stroke-width: 2; }
.lab-text { font-size: 15px; font-weight: 800; fill: var(--ink); font-family: inherit; }
.lab-ok .lab-box { fill: var(--ok); stroke: var(--ok); }
.lab-ok .lab-text { fill: #fff; }
.lab-ok .lab-line, .lab-ok .lab-dot { stroke: var(--ok); fill: var(--ok); }

.spot-panel { background: #fff; border: 2px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.spot-title { font-weight: 800; margin-bottom: 8px; }
.spot-buttons { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 8px; }
.spot-btn {
  min-height: 58px; border-radius: 14px; border: 3px solid var(--line); background: #fff;
  font: inherit; font-size: 1.4rem; font-weight: 900; cursor: pointer; color: var(--ink);
}
.spot-btn:hover:not(:disabled) { border-color: var(--primary); }
.spot-btn:disabled { cursor: default; }
.spot-btn.is-selected { background: var(--primary); border-color: var(--primary); color: #fff; }
.spot-btn.is-correct { background: var(--ok); border-color: var(--ok); color: #fff; }
.spot-btn.is-wrong { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); border-style: dashed; }
.spot-choice { margin: 10px 0 0; font-size: 1.05rem; }

/* Eşleştir */
.match-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 16px; }
.match-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.col-title { font-weight: 900; margin: 0; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.85rem; }
.m-item, .m-target {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  width: 100%; min-height: 70px; padding: 10px 12px;
  border: 4px solid var(--line); border-radius: 16px; background: #fff; color: var(--ink);
  font: inherit; font-weight: 800; font-size: 1.15rem; text-align: left; cursor: pointer;
  box-shadow: 0 4px 0 var(--line);
}
.m-item:disabled, .m-target:disabled { cursor: default; opacity: 1; }
.m-key {
  display: inline-grid; place-items: center; flex: 0 0 auto;
  width: 38px; height: 38px; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 900;
}
.m-num {
  display: inline-grid; place-items: center; flex: 0 0 auto;
  width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--ink); font-weight: 900;
}
.m-text { flex: 1 1 140px; min-width: 0; overflow-wrap: anywhere; }
.m-desc { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; font-weight: 700; }
.m-status { font-size: 0.9rem; font-weight: 900; color: var(--tc); }
.m-slot {
  flex: 1 1 100%;
  display: flex; align-items: center; gap: 6px;
  border: 3px dashed var(--line); border-radius: 12px; padding: 4px 10px; min-height: 46px;
  color: var(--ink-2); font-size: 1rem;
}
.m-target.is-filled .m-slot { border-style: solid; border-color: var(--tc); background: var(--tc-soft); color: var(--ink); }
.m-item.is-picked, .m-target.is-picked { border-color: var(--tc); background: var(--tc-soft); box-shadow: 0 0 0 4px var(--tc); }
.m-item.is-matched { border-color: var(--tc); }
.m-target.is-correct { border-color: var(--ok); background: var(--ok-bg); }
.m-target.is-wrong { border-color: var(--bad); background: var(--bad-bg); border-style: dashed; }
.m-target.is-over, .slot.is-over, .order-pool.is-over { outline: 4px dashed var(--primary); outline-offset: 2px; }
.is-dragging { opacity: 0.5; }

/* Sırala */
.order-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 16px; }
.order-pool { background: var(--surface-2); border: 3px dashed var(--line); border-radius: 18px; padding: 12px; min-width: 0; }
.pool-cards { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.pool-card {
  width: 100%; min-height: 64px; padding: 10px 14px;
  border: 4px solid var(--tc); border-radius: 16px; background: #fff; color: var(--ink);
  font: inherit; font-weight: 800; font-size: 1.15rem; text-align: left; cursor: pointer;
  box-shadow: 0 4px 0 var(--tc); overflow-wrap: anywhere;
}
.pool-card:hover:not(:disabled) { background: var(--tc-soft); }
.order-target { min-width: 0; }
.order-slots { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 10px; }
.slot {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  min-height: 70px; padding: 8px 10px;
  border: 4px dashed var(--line); border-radius: 16px; background: #fff;
}
.slot.is-filled { border-style: solid; border-color: var(--tc); background: var(--tc-soft); }
.slot.is-correct { border-color: var(--ok); background: var(--ok-bg); border-style: solid; }
.slot.is-wrong { border-color: var(--bad); background: var(--bad-bg); border-style: dashed; }
.slot-num {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: var(--ink); color: #fff; font-weight: 900; font-size: 1.1rem;
}
.slot-text { flex: 1 1 150px; min-width: 0; font-weight: 800; font-size: 1.15rem; overflow-wrap: anywhere; cursor: grab; }
.slot-empty { flex: 1 1 auto; color: var(--ink-2); font-weight: 700; }
.slot-tools { display: flex; gap: 6px; }

/* Geri bildirim */
.feedback {
  display: flex; gap: 14px; align-items: flex-start;
  border-radius: 18px; padding: 14px 16px; border: 4px solid;
  animation: pop-in 0.35s ease;
}
.fb-icon {
  flex: 0 0 auto; width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.8rem; font-weight: 900; color: #fff;
}
.fb-title { font-size: 1.45rem; font-weight: 900; margin-bottom: 4px; }
.fb-answer { font-size: 1.15rem; }
.fb-expl { font-size: 1.1rem; margin: 0; }
.fb-ok { background: var(--ok-bg); border-color: var(--ok); }
.fb-ok .fb-icon { background: var(--ok); }
.fb-bad { background: var(--bad-bg); border-color: var(--bad); }
.fb-bad .fb-icon { background: var(--bad); }
.fb-warn { background: var(--warn-bg); border-color: var(--warn); }
.fb-warn .fb-icon { background: var(--warn); }
.fb-info { background: var(--info-bg); border-color: var(--info); }
.fb-info .fb-icon { background: var(--info); }

@keyframes pop-in { from { transform: scale(0.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- Duraklatma ---------- */
.pause-overlay {
  position: fixed; inset: 0; z-index: 20;
  background: rgba(21, 32, 46, 0.55);
  display: grid; place-items: center; padding: 16px;
}
.pause-card {
  background: #fff; border-radius: 26px; padding: 28px 32px; text-align: center;
  max-width: 480px; width: 100%; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}
.pause-ic { font-size: 3rem; margin: 0; }

/* ---------- Özet ve final ---------- */
.summary-title { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--sc); font-size: clamp(1.9rem, 3.5vw, 2.8rem); }
.summary-screen .eyebrow { text-align: center; }
.summary-main { text-align: center; font-size: clamp(1.25rem, 2vw, 1.6rem); font-weight: 700; max-width: 900px; margin: 0 auto 16px; }
.learned ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px 16px; }
.learned li { font-size: 1.1rem; font-weight: 600; }
.learned li span { color: var(--ok); font-weight: 900; }
.team-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 16px 0; }
.team-result { background: var(--tc-soft); border: 4px solid var(--tc); border-radius: 22px; padding: 16px; min-width: 0; }
.team-result h3 { margin-bottom: 8px; }
.team-result h4 { margin: 12px 0 6px; }
.tr-line { font-size: 1.2rem; }
.tr-total { font-size: 1.2rem; }
.big-score { font-size: 1.4rem; }
.big-score b { font-size: 2.6rem; color: var(--tc); }
.badge-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.badge-list li { display: flex; align-items: center; gap: 8px; background: #fff; border: 2px solid #e0b52c; border-radius: 999px; padding: 4px 14px 4px 4px; font-weight: 800; }
.medal {
  display: inline-grid; place-items: center; border-radius: 50%; flex: 0 0 auto;
  background: radial-gradient(circle at 35% 30%, #fff7cf, #f2c94c 70%);
  border: 3px solid #b8860b;
}

.final-title { text-align: center; font-size: clamp(2.2rem, 5vw, 3.4rem); }
.winner {
  text-align: center; background: var(--tc-soft); border: 4px solid var(--tc);
  border-radius: 26px; padding: 18px; margin-bottom: 16px;
}
.winner.tie { background: #fff3c4; border-color: #e0b52c; }
.winner h2 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); }
.winner-ic { font-size: 3rem; margin: 0; }
.final-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.stats-table { width: 100%; border-collapse: collapse; font-size: 1.1rem; }
.stats-table th, .stats-table td { border-bottom: 2px solid var(--surface-2); padding: 8px 6px; text-align: left; vertical-align: middle; }
.stats-table thead th { font-size: 0.95rem; color: var(--ink-2); overflow-wrap: anywhere; }
.stats-table td { font-weight: 800; }
.stats-table .sys-icon { vertical-align: middle; }
.topic-list { padding-left: 1.4em; margin: 0; }
.topic-list li { margin-bottom: 6px; font-weight: 700; }
.topic-list .sys-icon { vertical-align: middle; }
.together ul { margin: 0; padding-left: 1.2em; }
.together li { font-size: 1.1rem; margin-bottom: 4px; }

/* Tekrar */
.review-card {
  background: #fff; border: 4px solid var(--sc); border-radius: 26px; padding: 20px 24px;
  box-shadow: 0 6px 0 var(--sc); max-width: 900px; margin: 0 auto;
}
.review-card h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); color: var(--sc); }
.ri-goal { font-weight: 700; color: var(--ink-2); }
.review-item { border-top: 2px solid var(--surface-2); padding-top: 12px; margin-top: 12px; }
.ri-q { font-size: 1.2rem; font-weight: 700; }
.ri-a { font-size: 1.25rem; background: var(--ok-bg); border-radius: 12px; padding: 8px 12px; }
.ri-a span { color: var(--ok); font-weight: 900; }
.ri-e { font-size: 1.15rem; }
/* Tekrar ekranında cevap önce kapalı; tıklayınca açılır */
.ri-reveal > summary {
  display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; list-style: none;
  font-size: 1.1rem; font-weight: 800; color: var(--ink);
  background: #fff; border: 3px solid var(--sc, var(--line)); border-radius: 999px; padding: 6px 18px;
}
.ri-reveal > summary::-webkit-details-marker { display: none; }
.ri-reveal > summary:hover { background: var(--sc-soft, #f4f6fb); }
.ri-reveal > summary:focus-visible { outline: 4px solid var(--focus, #1b4fd8); outline-offset: 3px; }
.ri-reveal .ri-hide, .ri-reveal[open] .ri-show { display: none; }
.ri-reveal[open] .ri-hide { display: inline; }
.ri-reveal[open] > summary { margin-bottom: 8px; font-size: 0.95rem; min-height: 36px; padding: 4px 14px; }
.review-points { list-style: none; padding: 0; font-size: 1.2rem; font-weight: 600; }
.review-screen .intro-nav { max-width: 900px; margin-left: auto; margin-right: auto; }

/* ---------- Pencereler ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(21, 32, 46, 0.55); z-index: 40; }
.modal {
  position: fixed; z-index: 41;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100vh - 32px); overflow: auto;
  background: #fff; border-radius: 24px; padding: 22px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.modal h2 { font-size: 1.5rem; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.menu-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.modal-celebrate { text-align: center; overflow: hidden; }
.cel-ic { font-size: 3.2rem; margin: 0; }
.cel-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; text-align: left; }
.cel-list li { display: flex; gap: 12px; align-items: center; background: #fffbea; border: 2px solid #e0b52c; border-radius: 18px; padding: 10px 12px; }
.cel-list p { margin: 4px 0 0; }
.modal-celebrate .modal-actions { justify-content: center; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i {
  position: absolute; top: -20px; left: calc(var(--i) * 7.2%);
  width: 10px; height: 14px; border-radius: 3px;
  background: hsl(calc(var(--i) * 47), 75%, 55%);
  animation: confetti-fall 3.2s ease-in calc(var(--i) * 0.12s) 1 forwards;
  opacity: 0;
}
@keyframes confetti-fall {
  0% { transform: translateY(0) rotate(0); opacity: 0.9; }
  100% { transform: translateY(420px) rotate(220deg); opacity: 0; }
}

/* Bildirim */
#toast-root { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 60; width: min(560px, calc(100vw - 32px)); }
.toast {
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
  background: var(--ink); color: #fff; border-radius: 16px; padding: 12px 16px;
  font-weight: 700; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.toast-close { background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, 0.5); border-radius: 10px; min-width: 44px; min-height: 44px; font-size: 1rem; cursor: pointer; }

/* ---------- Duyarlı tasarım ---------- */
@media (max-width: 980px) {
  .task-grid, .task-grid.task-find { grid-template-columns: minmax(0, 1fr); }
  /* tek sütunda düğme, görev alanının tamamı boyunca ekranın altında kalır */
  .task-aside { display: contents; }
  .diagram-frame .diagram { height: min(58vh, 520px); }
  .intro-card { grid-template-columns: minmax(0, 1fr); }
  .intro-visual > .diagram { max-height: 46vh; }
}

@media (max-width: 760px) {
  :root { font-size: 17px; }
  .hero { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .hero-art { order: -1; }
  .home-art { max-height: 30vh; }
  .system-cards, .sys-checks { grid-template-columns: minmax(0, 1fr); }
  .teams-grid, .team-results, .final-grid, .menu-grid { grid-template-columns: minmax(0, 1fr); }
  .match-grid, .order-wrap { grid-template-columns: minmax(0, 1fr); }
  .qpair-grid, .q-list { grid-template-columns: minmax(0, 1fr); }
  .teacher-card { flex-wrap: wrap; gap: 10px; }
  .mix-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .set-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .set-ic { font-size: 2.4rem; }
  .mix-card > .btn { align-self: stretch; }
  .teacher-hero { flex-direction: column; align-items: flex-start; gap: 6px; }
  .tc-icon { font-size: 2.6rem; }
  .mode-pill { font-size: 0.75rem; padding: 1px 8px; }
  .q-row { grid-template-columns: auto minmax(0, 1fr); }
  .q-row .q-arrow { display: none; }
  .q-row input[data-q="mright"] { grid-column: 2; }
  .joints-visual { grid-template-columns: minmax(0, 1fr); }
  .brand-text { display: none; }
  .topbar { padding: 6px 10px; gap: 8px; }
  .scoreboard { order: 3; flex-basis: 100%; gap: 6px; }
  .scoreboard .team-chip { padding: 4px 8px; gap: 6px; flex: 1 1 0; min-width: 0; }
  .team-chip.is-active { transform: none; }
  .chip-name { max-width: 8em; font-size: 0.9rem; }
  .chip-mascot { font-size: 1.2rem; }
  .chip-score { font-size: 1.05rem; padding: 1px 8px; }
  .chip-score small { display: none; }
  .chip-turn { display: none; }
  .screen { padding: 14px 16px 40px; }
  .intro-card, .review-card { padding: 16px; }
  .turn-banner { padding: 8px 12px; }
  .turn-mascot { font-size: 2rem; }
  .diagram-frame .diagram { height: auto; width: 100%; max-height: 62vh; }
  .intro-nav .btn { flex: 1 1 140px; }
  .intro-dots { order: -1; width: 100%; justify-content: center; }
  .modal { padding: 18px; }
  .btn-xl { font-size: 1.15rem; }
}

@media (max-width: 380px) {
  .choice { padding: 10px; gap: 10px; }
  .choice-key { width: 40px; height: 40px; }
  .slot-tools { width: 100%; justify-content: flex-end; }
}

/* Projeksiyon / büyük ekran */
@media (min-width: 1600px) {
  .screen { max-width: 1440px; }
}

/* Hareket azaltma tercihi */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .confetti { display: none; }
  .team-chip.is-active, .pdot.is-current, .intro-dots i.on { transform: none; }
}

/* Yazdırma: sonuç ekranı okunur kalsın */
@media print {
  .topbar, .screen-actions, #toast-root, #modal-root { display: none !important; }
  body { background: #fff; }
}
