/* SınavYapıcı — tasarım */
:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --ink: #1c2333;
  --muted: #6b7487;
  --line: #e3e7f0;
  --primary: #4f46e5;
  --primary-2: #7c3aed;
  --primary-soft: #eef0fe;
  --green: #16a34a;
  --green-soft: #e9f9ef;
  --red: #dc2626;
  --red-soft: #fdecec;
  --amber: #b45309;
  --amber-soft: #fef6e7;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(28, 35, 51, .06), 0 8px 24px rgba(28, 35, 51, .07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-tap-highlight-color: rgba(79, 70, 229, .15);
  overscroll-behavior-y: none;
}
button, a { -webkit-tap-highlight-color: rgba(79, 70, 229, .15); }

/* ---------- mobil alt sekme çubuğu (uygulama hissi) ---------- */
.tabbar { display: none; }
@media (max-width: 720px) {
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom, 0);
    box-shadow: 0 -2px 16px rgba(28, 35, 51, .06);
  }
  .tabbar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 8px 2px 7px; color: var(--muted); font-weight: 600; font-size: .68rem;
    text-decoration: none; min-height: 54px; justify-content: center;
  }
  .tabbar a .tab-ico { font-size: 1.35rem; line-height: 1; filter: grayscale(.4); opacity: .7; transition: all .15s; }
  .tabbar a .tab-lbl { max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar a.active { color: var(--primary); }
  .tabbar a.active .tab-ico { filter: none; opacity: 1; transform: translateY(-1px); }
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.9rem; margin: 0 0 6px; }
h3 { margin: 0 0 12px; font-size: 1.1rem; }
h4 { margin: 18px 0 8px; }

/* ---------- navbar ---------- */
.navbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 24px;
  padding: 0 28px; height: 60px;
}
.brand {
  font-weight: 800; font-size: 1.2rem; color: var(--ink) !important;
  display: flex; align-items: center; gap: 8px;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-size: .95rem; font-weight: 800;
}
#nav-links { display: flex; gap: 4px; margin-left: auto; }
#nav-links a {
  padding: 8px 14px; border-radius: 10px; color: var(--ink);
  font-weight: 600; font-size: .95rem;
}
#nav-links a:hover { background: var(--primary-soft); text-decoration: none; }
#nav-links a.active { background: var(--primary); color: #fff; }

/* ---------- genel ---------- */
.container { max-width: 1080px; margin: 0 auto; padding: 28px 20px 60px; }
.page-head { margin-bottom: 20px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.hidden { display: none !important; }
.narrow { max-width: 520px; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px; margin-bottom: 18px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: #fff; color: var(--ink);
  border: 1px solid var(--line); border-radius: 11px;
  padding: 10px 18px; font-size: .95rem; font-weight: 600;
  cursor: pointer; transition: all .15s;
}
.btn:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; border: none; }
.btn-primary:hover { filter: brightness(1.08); color: #fff; }
.btn-danger { background: var(--red); color: #fff; border: none; }
.btn-danger:hover { filter: brightness(1.1); color: #fff; }
.btn-lg { padding: 13px 26px; font-size: 1.05rem; }
.btn-sm { padding: 5px 12px; font-size: .85rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-hint {
  background: var(--amber-soft); border-color: #f3d9a4; color: var(--amber);
  margin-top: 14px;
}

.input {
  width: 100%; padding: 11px 14px; margin: 6px 0 12px;
  border: 1px solid var(--line); border-radius: 10px;
  font-size: 1rem; font-family: inherit; background: #fff; color: var(--ink);
}
.input:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
.input-sm { width: 110px; padding: 7px 10px; margin: 2px 0; }

.warn {
  background: var(--amber-soft); border: 1px solid #f3d9a4; color: var(--amber);
  border-radius: 10px; padding: 10px 14px; margin-top: 12px; font-size: .92rem;
}
.ok-line { color: var(--green); }
.warn-line { color: var(--amber); }
.c-green { color: var(--green); font-weight: 600; }
.c-red { color: var(--red); font-weight: 600; }
.c-gray { color: var(--muted); }

/* ---------- ana sayfa ---------- */
.hero { text-align: center; padding: 48px 10px 36px; }
.hero h1 { font-size: 2.5rem; line-height: 1.2; }
.grad {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { color: var(--muted); font-size: 1.08rem; }
.hero-btns { display: flex; gap: 12px; justify-content: center; margin: 26px 0 14px; flex-wrap: wrap; }
.feature-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px; margin-top: 10px;
}
.feature { margin-bottom: 0; }
.f-ico { font-size: 1.7rem; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: .93rem; margin: 0; }

/* ---------- kurulum ---------- */
.setup-card h3 { margin-top: 18px; }
.setup-card h3:first-child { margin-top: 0; }
.choice-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.choice {
  flex: 1; min-width: 140px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: #fff; border: 2px solid var(--line); border-radius: 13px;
  padding: 16px 10px; cursor: pointer; font-family: inherit; transition: all .15s;
}
.choice:hover { border-color: var(--primary); }
.choice.active { border-color: var(--primary); background: var(--primary-soft); }
.choice-big { font-size: 1.35rem; font-weight: 800; color: var(--ink); }
.choice-sub { font-size: .82rem; color: var(--muted); }
.choice-sm { padding: 12px 10px; font-weight: 700; font-size: 1rem; }
.setup-summary { margin: 14px 0; min-height: 20px; font-size: .92rem; }

/* ---------- sınav ---------- */
.exam-layout { display: grid; grid-template-columns: 1fr 280px; gap: 18px; align-items: start; }
.q-card { min-height: 320px; }
.q-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.q-no { margin-left: auto; color: var(--muted); font-weight: 700; font-size: .92rem; }
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: .78rem; font-weight: 700;
}
.badge-sec { background: var(--primary-soft); color: var(--primary); }
.badge-real { background: var(--amber-soft); color: var(--amber); }
.badge-ozgun { background: #eef3f8; color: #5b6b85; }
.badge-flag { background: var(--red-soft); color: var(--red); }
.q-text { font-size: 1.02rem; margin-bottom: 18px; white-space: normal; }

/* ---- soru içi görseller: SVG figür + tablo ---- */
.q-fig { margin: 14px auto; text-align: center; max-width: 100%; overflow-x: auto; }
.q-fig svg, .q-text svg {
  display: block; margin: 12px auto; width: 100%; max-width: 340px; height: auto;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px;
}
.q-fig figcaption, .fig-cap { font-size: .82rem; color: var(--muted); margin-top: 4px; }
.q-text table, .q-table {
  border-collapse: collapse; margin: 14px auto; font-size: .92rem;
  width: auto; max-width: 100%; background: #fff;
}
.q-text th, .q-text td, .q-table th, .q-table td {
  border: 1px solid var(--line); padding: 7px 12px; text-align: center;
}
.q-text th, .q-table th { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.q-text caption { caption-side: top; font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
@media (max-width: 720px) {
  .q-text table, .q-table { font-size: .82rem; display: block; overflow-x: auto; white-space: nowrap; }
  .q-text th, .q-text td, .q-table th, .q-table td { padding: 6px 8px; }
}

.opts { display: flex; flex-direction: column; gap: 9px; }
.opt {
  display: flex; gap: 12px; align-items: flex-start;
  border: 2px solid var(--line); border-radius: 11px;
  padding: 11px 14px; cursor: pointer; transition: all .12s;
}
.opt:hover { border-color: var(--primary); }
.opt.sel { border-color: var(--primary); background: var(--primary-soft); }
.opt input { display: none; }
.opt-letter {
  flex: 0 0 26px; height: 26px; border-radius: 50%;
  background: var(--bg); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .85rem;
}
.opt.sel .opt-letter { background: var(--primary); color: #fff; }
.opt-text { padding-top: 2px; }

.hint-box {
  margin-top: 14px; padding: 12px 14px; border-radius: 10px;
  background: var(--amber-soft); border: 1px solid #f3d9a4; color: var(--amber);
}

.exam-nav-btns { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.exam-nav-btns .btn-primary { margin-left: auto; }

.exam-side { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 0; }
.side-card { padding: 16px; }
.side-name { font-weight: 700; margin-bottom: 6px; font-size: .95rem; }
.timer { font-size: 2rem; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.timer-low { color: var(--red); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.grid-title { font-weight: 700; margin-bottom: 10px; }
.q-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.q-cell {
  aspect-ratio: 1; border: 1.5px solid var(--line); border-radius: 8px;
  background: #fff; font-weight: 700; font-size: .82rem; cursor: pointer;
  color: var(--muted); font-family: inherit;
}
.q-cell.ans { background: var(--green-soft); border-color: var(--green); color: var(--green); }
.q-cell.flag { background: var(--red-soft); border-color: var(--red); color: var(--red); }
.q-cell.cur { outline: 2.5px solid var(--primary); color: var(--primary); }
.legend { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 3px; }
.dot-cur { background: var(--primary); }
.dot-ans { background: var(--green); }
.dot-flag { background: var(--red); }
.dot-blank { background: var(--line); }

/* ---------- sonuç ---------- */
.result-top { display: grid; grid-template-columns: 320px 1fr; gap: 18px; align-items: stretch; }
.score-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  background: linear-gradient(160deg, var(--primary), var(--primary-2));
  color: #fff; border: none;
}
.score-big { font-size: 3.1rem; font-weight: 800; line-height: 1; }
.score-kind { opacity: .9; margin: 8px 0 14px; font-size: .9rem; }
.score-rank { background: rgba(255, 255, 255, .16); border-radius: 10px; padding: 8px 14px; font-size: .95rem; }
.score-pct { margin-top: 8px; font-size: .92rem; opacity: .95; }
.score-baraj { margin-top: 14px; width: 100%; }
.score-baraj .baraj-item { background: rgba(255, 255, 255, .12); color: #fff; }
.score-baraj .baraj-ok { background: rgba(255, 255, 255, .2); }
.score-baraj .baraj-no { background: rgba(0, 0, 0, .14); opacity: .85; }

.net-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.net-table th, .net-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); }
.net-table th { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; }
.tot-row td { font-weight: 700; background: var(--bg); }

.topic-row { display: grid; grid-template-columns: 1fr 160px 50px; gap: 12px; align-items: center; padding: 7px 0; }
.topic-name { font-size: .93rem; }
.topic-pct { font-weight: 700; text-align: right; }
.bar { height: 10px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; }
.bar-good { background: var(--green); }
.bar-mid { background: #eab308; }
.bar-bad { background: var(--red); }

.advice-list { display: flex; flex-direction: column; gap: 10px; }
.advice-item {
  background: var(--primary-soft); border-radius: 10px; padding: 12px 14px; font-size: .94rem;
}

.rev-item { border: 1px solid var(--line); border-radius: 11px; margin-bottom: 10px; overflow: hidden; }
.rev-item summary {
  padding: 12px 16px; cursor: pointer; font-size: .94rem;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: #fff;
}
.rev-item summary::-webkit-details-marker { display: none; }
.rev-item[open] summary { border-bottom: 1px solid var(--line); background: var(--bg); }
.rev-no { font-weight: 800; }
.rev-body { padding: 16px; }
.rev-opt { padding: 7px 12px; border-radius: 8px; margin: 4px 0; font-size: .93rem; }
.rev-correct { background: var(--green-soft); border: 1px solid #bfe8cd; }
.rev-wrong { background: var(--red-soft); border: 1px solid #f4c5c5; }
.solution-box {
  margin-top: 14px; padding: 14px 16px; border-radius: 10px;
  background: var(--primary-soft); font-size: .95rem;
}

.assume-grid { display: flex; gap: 16px; flex-wrap: wrap; }
.assume-grid label { font-size: .85rem; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }

/* ---------- grafik ---------- */
.chart { width: 100%; height: auto; margin: 10px 0; }
.chart-line { fill: none; stroke: var(--primary); stroke-width: 2.5; }
.chart-dot { fill: var(--primary-2); }
.chart-label { font-size: 11px; fill: var(--ink); text-anchor: middle; font-weight: 700; }
.chart-date { font-size: 10px; fill: var(--muted); text-anchor: middle; }

/* ---------- hesaplama ---------- */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.tab {
  padding: 9px 20px; border-radius: 999px; border: 1.5px solid var(--line);
  background: #fff; font-weight: 700; font-size: .92rem; cursor: pointer; font-family: inherit;
  color: var(--muted);
}
.tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.calc-table td:first-child { width: 50%; }
.net-cell { font-weight: 800; color: var(--primary); }
.calc-obp { display: block; margin: 14px 0 8px; color: var(--muted); font-size: .92rem; }
.obp-block { margin: 14px 0; padding: 12px 14px; background: var(--bg); border-radius: 10px; }
.check-line { display: flex; align-items: center; gap: 8px; font-size: .92rem; cursor: pointer; }
.check-line input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--primary); cursor: pointer; }
.calc-score-simple { background: #fff; border: 1.5px dashed var(--primary); }
.calc-score-simple .calc-score-val { color: var(--ink); }
.calc-result { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 16px; }
.calc-score-card {
  flex: 1; min-width: 180px; text-align: center;
  background: var(--primary-soft); border-radius: 12px; padding: 16px;
}
.calc-score-name { font-size: .85rem; color: var(--muted); font-weight: 700; }
.calc-score-val { font-size: 1.9rem; font-weight: 800; color: var(--primary); }
.calc-score-rank { font-size: .85rem; color: var(--muted); }
.calc-score-pct { font-size: .85rem; color: var(--primary); font-weight: 600; margin-top: 2px; }

/* ---- giriş modu / araç çubuğu ---- */
.calc-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.entry-toggle { display: flex; align-items: center; gap: 6px; }
.mini-tab {
  padding: 6px 12px; border-radius: 8px; border: 1.5px solid var(--line);
  background: #fff; font-weight: 600; font-size: .82rem; cursor: pointer; font-family: inherit; color: var(--muted);
}
.mini-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---- baraj ---- */
.baraj-list { display: flex; flex-direction: column; gap: 5px; margin-top: 12px; text-align: left; }
.baraj-item { font-size: .82rem; padding: 5px 10px; border-radius: 7px; font-weight: 600; }
.baraj-ok { background: var(--green-soft); color: var(--green); }
.baraj-no { background: var(--red-soft); color: var(--red); }
.baraj-note { margin-top: 12px; }

/* ---- açıklama ---- */
.explain-card { margin-top: 18px; }
.explain { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; overflow: hidden; }
.explain summary { padding: 11px 14px; cursor: pointer; font-weight: 600; font-size: .93rem; }
.explain summary::-webkit-details-marker { display: none; }
.explain summary::before { content: "▸ "; color: var(--primary); }
.explain[open] summary::before { content: "▾ "; }
.explain[open] summary { border-bottom: 1px solid var(--line); background: var(--bg); }
.explain p { padding: 12px 14px; margin: 0; font-size: .92rem; color: var(--ink); }

/* ---------- onay penceresi (modal) ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(28, 35, 51, .55); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; animation: fadeIn .12s ease;
}
@keyframes fadeIn { from { opacity: 0; } }
.modal {
  background: var(--card); border-radius: 16px; padding: 22px;
  max-width: 400px; width: 100%; box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
  animation: popIn .15s ease;
}
@keyframes popIn { from { transform: scale(.94); opacity: 0; } }
.modal-msg { font-size: 1.02rem; margin-bottom: 20px; line-height: 1.5; }
.modal-btns { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.modal-btns .btn { min-height: 46px; flex: 1; }
@media (max-width: 720px) { .modal-btns { flex-direction: column-reverse; } }

/* ---------- erişilebilirlik: klavye odağı ---------- */
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.q-cell:focus-visible { outline-offset: 1px; }

/* ---------- devam eden sınav bandı ---------- */
.resume-band {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  background: linear-gradient(135deg, var(--amber-soft), #fff);
  border: 2px solid #f3d9a4;
}
.resume-actions { display: flex; gap: 8px; }

/* ---------- full sınavlar ---------- */
.full-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.full-btn {
  display: flex; flex-direction: column; gap: 6px; text-align: left;
  background: #fff; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 14px 16px; cursor: pointer; font-family: inherit; transition: all .15s;
}
.full-btn:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.full-title { font-weight: 700; font-size: .98rem; color: var(--ink); }
.full-meta { font-size: .82rem; color: var(--muted); }
.full-short { color: var(--amber); }
.full-complete {
  background: linear-gradient(135deg, var(--primary-soft), #fff);
  border-color: var(--primary); border-width: 2px;
}
.full-complete .full-title { color: var(--primary); }

/* ---------- giriş ---------- */
.auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 760px; }

/* ---------- duyarlılık ---------- */
@media (max-width: 900px) {
  .exam-layout { grid-template-columns: 1fr; }
  .exam-side { position: static; }
  .result-top { grid-template-columns: 1fr; }
  .auth-row { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.9rem; }
  .topic-row { grid-template-columns: 1fr 90px 44px; }
  .navbar { padding: 0 14px; gap: 10px; }
  #nav-links a { padding: 8px 9px; font-size: .85rem; }
}

/* ======================= MOBİL (uygulama gibi) ======================= */
@media (max-width: 720px) {
  /* üst çubuk sade: sadece logo; gezinme alt sekmeye taşındı */
  #nav-links { display: none; }
  .navbar { height: 52px; justify-content: center; padding: 0 14px; }
  .navbar .brand { font-size: 1.1rem; }

  .container { padding: 16px 14px calc(80px + env(safe-area-inset-bottom, 0)); }
  .card { padding: 16px; border-radius: 16px; margin-bottom: 14px; }
  h1 { font-size: 1.5rem; }
  .page-head { margin-bottom: 14px; }

  /* dokunma hedefleri ve tam-genişlik aksiyonlar */
  .btn { min-height: 46px; padding: 12px 18px; }
  .btn-lg { min-height: 52px; }
  .hero-btns { flex-direction: column; }
  .hero-btns .btn { width: 100%; }
  .hero { padding: 24px 6px 16px; }
  .hero h1 { font-size: 1.7rem; }
  .hero p { font-size: 1rem; }

  /* kurulum seçimleri tam genişlik, kolay basılır */
  .choice-row { flex-direction: column; }
  .choice { width: 100%; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 14px 16px; }
  .choice-big { font-size: 1.15rem; }
  .choice-sub { margin-left: auto; }

  /* ---- sınav ekranı: app düzeni (timer üstte sabit, soru, ızgara) ---- */
  .exam-layout { display: flex; flex-direction: column; gap: 12px; }
  .exam-side { display: contents; }
  .exam-main { order: 2; }
  .exam-side .side-card:first-child {
    order: 1; position: sticky; top: 52px; z-index: 30;
    display: flex; align-items: center; gap: 12px; padding: 10px 14px;
    margin-bottom: 0; box-shadow: var(--shadow);
  }
  .exam-side .side-card:first-child .side-name { margin: 0; font-size: .9rem; flex: 1; }
  .exam-side .side-card:first-child .timer { font-size: 1.5rem; }
  .exam-side .side-card:first-child .muted { display: none; }
  .exam-side .side-card:nth-child(2) { order: 3; }
  .exam-side .btn-danger { order: 4; }

  .q-card { min-height: 0; }
  .q-text { font-size: 1.05rem; }
  .opt { padding: 14px; }
  .opt-letter { flex-basis: 30px; height: 30px; }
  .exam-nav-btns { position: sticky; bottom: calc(64px + env(safe-area-inset-bottom, 0)); background: var(--bg); padding: 8px 0; }
  .exam-nav-btns .btn { flex: 1; min-width: 0; }
  .q-grid { grid-template-columns: repeat(8, 1fr); }

  /* sonuç ekranı */
  .score-big { font-size: 2.6rem; }
  .net-table { font-size: .82rem; }
  .net-table th, .net-table td { padding: 6px 5px; }
  .topic-row { grid-template-columns: 1fr 70px 38px; gap: 8px; }
  .assume-grid { flex-direction: column; gap: 10px; }
  .assume-grid label { flex-direction: row; align-items: center; justify-content: space-between; }

  /* hesaplama */
  .calc-toolbar { flex-direction: column; align-items: stretch; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .tab { white-space: nowrap; }
  .calc-table td:first-child { width: auto; }
  .input-sm { width: 90px; }
  .calc-result { flex-direction: column; }

  /* full sınav kartları tek sütun */
  .full-grid { grid-template-columns: 1fr; }

  /* devam bandı dikey */
  .resume-band { flex-direction: column; align-items: stretch; }
  .resume-actions .btn { flex: 1; }

  /* sınav sırasında alt sekme gizli (kazara çıkışı önle) */
  body.exam-mode .tabbar { display: none; }
  body.exam-mode .container { padding-bottom: 16px; }
  body.exam-mode .exam-nav-btns { bottom: env(safe-area-inset-bottom, 0); }
}

/* çok dar ekran */
@media (max-width: 380px) {
  .q-grid { grid-template-columns: repeat(6, 1fr); }
  .hero h1 { font-size: 1.45rem; }
}
