/* =========================================================================
   LAB BIOLOGI 3D STUDIO — Design System & Dissection Atlas UI
   Selaras penuh dengan Lab Fisika (momentum + lab3d-studio), skala TV 4K-ready
   ========================================================================= */
:root {
  --sb: #07101f;
  --sb2: #0f223d;
  --sb-hover: #173055;
  --sb-line: rgba(148, 163, 184, 0.16);
  --bg: #edf2f8;
  --card: #ffffff;
  --alt: #f8fafc;
  --line: #dce6f2;
  --ink: #0b1f38;
  --muted: #475569;
  --accent: #0d9488;
  --accent-dark: #0f766e;
  --accent-soft: #ccfbf1;
  --orange: #ea580c;
  --green: #059669;
  --red: #dc2626;
  --violet: #7c3aed;
  --sb-w: 296px;
}

* { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
@media (min-width: 1600px) { html { font-size: 18px; } }
@media (min-width: 2200px) { html { font-size: 22px; } }
@media (min-width: 3200px) { html { font-size: 28px; } }

html, body { margin: 0; height: 100%; }
body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
  line-height: 1.55;
}
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid #f26b1d; outline-offset: 2px; }
.mono { font-family: 'JetBrains Mono', Consolas, 'Courier New', monospace; }

.app { display: flex; min-height: 100vh; }

/* ---------- Sidebar ---------- */
.sidebar {
  width: var(--sb-w);
  flex-shrink: 0;
  background: linear-gradient(180deg, #07101f 0%, #0c1b33 65%, #0e2444 100%);
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  transition: width 0.25s ease;
  z-index: 30;
  border-right: 1px solid var(--sb-line);
  box-shadow: 6px 0 28px rgba(7, 16, 31, 0.2);
}
.brand {
  display: flex; align-items: center; gap: 12px; padding: 18px 16px;
  border-bottom: 1px solid var(--sb-line);
}
.brand-logo {
  width: 46px; height: 46px; border-radius: 14px;
  background: linear-gradient(135deg, #2dd4bf, #0d9488);
  box-shadow: 0 6px 18px rgba(13, 148, 136, 0.42);
  display: grid; place-items: center; flex-shrink: 0;
}
.brand h1 { font-family: 'Space Grotesk', sans-serif; font-size: 1.08rem; font-weight: 800; margin: 0; color: #fff; letter-spacing: -0.01em; }
.brand p { margin: 2px 0 0; font-size: 0.78rem; color: #5eead4; font-weight: 600; }
.close-mobile {
  display: none; margin-left: auto; background: none; border: 1px solid var(--sb-line);
  color: #e2e8f0; width: 40px; height: 40px; border-radius: 10px;
}
.nav { flex: 1; overflow-y: auto; padding: 10px; }
.nav-title {
  font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: #64748b; padding: 12px 10px 6px; font-weight: 700;
}
.nav-item {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left;
  background: none; border: 1px solid transparent; color: #cbd5e1;
  padding: 10px; border-radius: 13px; min-height: 56px; margin-bottom: 4px;
  transition: all 0.18s ease;
}
.nav-item:hover { background: var(--sb-hover); }
.nav-item.active {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.24), rgba(13, 148, 136, 0.22));
  border-color: rgba(45, 212, 191, 0.55);
  color: #fff;
  box-shadow: inset 3px 0 0 #2dd4bf, 0 4px 16px rgba(13, 148, 136, 0.2);
}
.nav-num {
  width: 38px; height: 38px; border-radius: 11px;
  background: rgba(255, 255, 255, 0.08);
  display: grid; place-items: center; font-weight: 800; font-size: 1.15rem; flex-shrink: 0;
}
.nav-item.active .nav-num {
  background: linear-gradient(135deg, #2dd4bf, #0d9488);
  box-shadow: 0 3px 10px rgba(45, 212, 191, 0.35);
}
.nav-text b { display: block; font-size: 0.92rem; }
.nav-text span { font-size: 0.74rem; color: #94a3b8; }
.nav-item.active .nav-text span { color: #99f6e4; }

.sb-foot {
  padding: 12px; border-top: 1px solid var(--sb-line);
  display: flex; flex-direction: column; gap: 8px; background: rgba(0, 0, 0, 0.2);
}
.tool {
  width: 100%; min-height: 44px; border-radius: 11px;
  border: 1px solid rgba(148, 163, 184, 0.22); background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0; display: flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; text-decoration: none; font-size: 0.88rem; transition: all 0.16s ease;
}
.tool:hover { background: rgba(45, 212, 191, 0.18); border-color: rgba(45, 212, 191, 0.55); color: #fff; }
.sb-note { font-size: 0.7rem; color: #64748b; text-align: center; }

.app.collapsed .sidebar { width: 84px; }
.app.collapsed .brand-text,
.app.collapsed .nav-text,
.app.collapsed .nav-title,
.app.collapsed .tool span.t,
.app.collapsed .sb-note { display: none; }
.app.collapsed .nav-item { justify-content: center; }

/* ---------- Workspace & Topbar ---------- */
.work { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 2px 12px rgba(11, 31, 56, 0.04);
  padding: 14px 24px;
  display: flex; gap: 14px; align-items: flex-start;
  position: sticky; top: 0; z-index: 20;
}
.menu-btn {
  display: none; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff; font-size: 1.3rem; flex-shrink: 0;
}
.top-main { flex: 1; min-width: 0; }
.title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.title-row h2 { font-family: 'Space Grotesk', sans-serif; margin: 0; font-size: 1.35rem; font-weight: 800; color: var(--ink); letter-spacing: -0.015em; }
.pill {
  font-size: 0.75rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-dark); border: 1px solid #99f6e4;
}
.tp { margin-top: 4px; font-size: 0.9rem; color: var(--muted); }
.cp-btn {
  flex-shrink: 0; min-height: 44px; padding: 0 14px; border-radius: 11px;
  background: linear-gradient(135deg, #0b1f38, #1e3a5f); color: #5eead4;
  border: 1px solid rgba(45, 212, 191, 0.35); font-weight: 700; font-size: 0.85rem;
}
.cp-btn:hover { filter: brightness(1.12); }

.stage { padding: 20px 24px 40px; }
.panel { display: none; }
.panel.active { display: block; animation: bioFade 0.22s ease; }
@keyframes bioFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(320px, 1fr); gap: 18px; align-items: start; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin-top: 18px; }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  overflow: hidden; box-shadow: 0 12px 32px rgba(11, 31, 56, 0.08);
}
.card-h {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  padding: 13px 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid #e2e8f0;
}
.card-h h3 { font-family: 'Space Grotesk', sans-serif; margin: 0; font-size: 1.04rem; font-weight: 800; color: var(--ink); }
.hint {
  font-size: 0.76rem; color: var(--accent-dark); background: var(--accent-soft);
  padding: 4px 10px; border-radius: 999px; font-weight: 700;
}
.body { padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }

/* ---------- Bio3D WebGL Atlas Viewport ---------- */
.bio3d-stage { position: relative; background: #07101f; }
.bio3d-wrap {
  position: relative; width: 100%; height: 480px;
  background: radial-gradient(circle at 50% 28%, #162e47 0%, #0a1728 62%, #050b14 100%);
  overflow: hidden; touch-action: none; user-select: none;
}
@media (min-width: 1800px) { .bio3d-wrap { height: 560px; } }
@media (max-width: 600px) { .bio3d-wrap { height: 330px; } }
.bio3d-wrap canvas { width: 100% !important; height: 100% !important; display: block; cursor: grab; }
.bio3d-wrap canvas:active { cursor: grabbing; }

.bio3d-hud {
  position: absolute; top: 10px; left: 12px; right: 12px;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  pointer-events: none; z-index: 6; flex-wrap: wrap;
}
.bio3d-badge {
  font-size: 11px; font-weight: 700; letter-spacing: 0.03em;
  padding: 5px 11px; border-radius: 999px;
  background: rgba(7, 16, 31, 0.82); backdrop-filter: blur(6px);
  color: #5eead4; border: 1px solid rgba(45, 212, 191, 0.38);
}
.bio3d-hud-btns { display: flex; gap: 6px; pointer-events: auto; flex-wrap: wrap; }
.bio3d-btn {
  font-family: inherit; font-size: 12px; font-weight: 700;
  padding: 5px 11px; border-radius: 9px;
  background: rgba(15, 23, 42, 0.84); color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.35);
  backdrop-filter: blur(6px); transition: all 0.15s ease;
}
.bio3d-btn:hover { background: var(--accent); border-color: #2dd4bf; color: #fff; }
.bio3d-btn.active { background: var(--accent); border-color: #5eead4; color: #fff; }

/* Loading bar inside 3D */
.bio3d-loading {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  background: rgba(7, 16, 31, 0.86); color: #e2e8f0; z-index: 9;
  font-size: 0.9rem; font-weight: 600;
}
.bio3d-loading.hidden { display: none; }
.bio3d-bar { width: 220px; height: 7px; background: rgba(255,255,255,0.12); border-radius: 99px; overflow: hidden; }
.bio3d-bar > i { display: block; height: 100%; width: 25%; background: linear-gradient(90deg, #2dd4bf, #38bdf8); border-radius: 99px; transition: width 0.2s; }

/* SVG Leader Lines + Crisp 3D Callout Pins */
.bio-overlay { position: absolute; inset: 0; pointer-events: none; z-index: 4; overflow: hidden; }
.bio-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.bio-line { stroke: rgba(94, 234, 212, 0.6); stroke-width: 1.5; stroke-dasharray: 3 3; fill: none; }
.bio-line.active { stroke: #fbbf24; stroke-width: 2.2; stroke-dasharray: none; }
.bio-line.detached { stroke: #f97316; stroke-dasharray: 4 2; }
.bio-dot { fill: #2dd4bf; stroke: #07101f; stroke-width: 1.5; }
.bio-dot.active { fill: #fbbf24; r: 4.5; }

.bio-pin {
  position: absolute; transform: translate(-50%, -50%); pointer-events: auto;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px 3px 4px; border-radius: 999px;
  background: rgba(7, 16, 31, 0.86); color: #f8fafc;
  border: 1px solid rgba(94, 234, 212, 0.48);
  font-size: 11px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.45);
  transition: transform 0.12s ease;
  cursor: pointer;
}
.bio-pin:hover { background: rgba(13, 148, 136, 0.95); border-color: #99f6e4; transform: translate(-50%, -50%) scale(1.06); z-index: 8; }
.bio-pin.active { background: #f59e0b; color: #0b1b33; border-color: #fef3c7; z-index: 9; }
.bio-pin.detached { border-color: #fb923c; background: rgba(124, 45, 18, 0.9); }
.bio-pin .num {
  width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(45, 212, 191, 0.25); color: #5eead4; font-size: 10px; font-weight: 800;
}
.bio-pin.active .num { background: #0b1b33; color: #fbbf24; }
.bio-pin.detached .num { background: #f97316; color: #fff; }
@media (max-width: 600px) {
  .bio-pin { font-size: 10px; padding: 2px 6px 2px 3px; }
  .bio-pin .pin-txt { max-width: 84px; overflow: hidden; text-overflow: ellipsis; }
}

/* Assembly Challenge Banner */
.bio-challenge {
  display: none; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 10px 16px; background: linear-gradient(90deg, #0b1f38, #133b4a);
  color: #fff; border-top: 1px solid rgba(45, 212, 191, 0.35);
}
.bio-challenge.show { display: flex; }
.bio-challenge .q-target { font-weight: 700; color: #5eead4; }
.bio-challenge .q-score { font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; background: rgba(255,255,255,0.12); padding: 4px 10px; border-radius: 8px; }

/* Dissection Toolbar */
.toolbar {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px;
  border-top: 1px solid #e2e8f0; background: #fff; align-items: center;
}
.tb-group {
  display: flex; align-items: center; gap: 8px; background: #f8fafc;
  border: 1px solid #e2e8f0; padding: 5px 10px; border-radius: 11px;
}
.tb-group label { font-size: 0.78rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.tb-group input[type=range] { width: 110px; height: 22px; accent-color: var(--accent); margin: 0; }
.tb-group select { min-height: 32px; font-size: 0.82rem; padding: 0 6px; border-radius: 8px; border: 1px solid #cbd5e1; background: #fff; }

.btn {
  min-height: 40px; padding: 0 13px; border-radius: 11px;
  border: 1.5px solid #cbd5e1; background: #fff; color: var(--ink);
  font-weight: 700; font-size: 0.85rem; box-shadow: 0 2px 6px rgba(11, 31, 56, 0.05);
  display: inline-flex; align-items: center; gap: 6px;
}
.btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-dark); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.primary { background: linear-gradient(135deg, #0d9488, #0f766e); border-color: #0d9488; color: #fff; }
.btn.primary:hover:not(:disabled) { filter: brightness(1.07); color: #fff; }
.btn.active { background: #0b1f38; border-color: #0b1f38; color: #5eead4; }
.btn.warn { background: #fff7ed; border-color: #fdba74; color: #9a3412; }

/* Part List Chips + Anatomical Inspector */
.part-list { display: flex; flex-wrap: wrap; gap: 6px; }
.part-chip {
  font-size: 0.78rem; font-weight: 600; padding: 5px 10px; border-radius: 9px;
  border: 1px solid #cbd5e1; background: #f8fafc; color: var(--ink);
  display: inline-flex; align-items: center; gap: 5px; transition: all 0.14s ease;
}
.part-chip:hover { border-color: var(--accent); background: #f0fdfa; }
.part-chip.active { background: #0b1f38; color: #fff; border-color: #0b1f38; }
.part-chip.detached { background: #fff7ed; border-color: #fb923c; color: #9a3412; }
.part-chip.detached.active { background: #c2410c; color: #fff; border-color: #c2410c; }
.part-chip i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

.inspector-card {
  background: #f8fafc; border: 1.5px solid #dbe6f3; border-radius: 14px; padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.insp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.insp-title { font-family: 'Space Grotesk', sans-serif; font-size: 1.08rem; font-weight: 800; color: var(--ink); margin: 0; }
.insp-latin { font-size: 0.82rem; font-style: italic; color: var(--accent-dark); font-weight: 600; }
.insp-status { font-size: 0.72rem; font-weight: 800; padding: 3px 8px; border-radius: 999px; text-transform: uppercase; white-space: nowrap; }
.insp-status.attached { background: #dcfce7; color: #166534; }
.insp-status.detached { background: #ffedd5; color: #9a3412; }
.insp-sec { font-size: 0.88rem; line-height: 1.55; color: #1e293b; }
.insp-sec b { display: block; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 2px; }
.insp-actions { display: flex; flex-wrap: wrap; gap: 7px; padding-top: 4px; }

/* Controls, Readouts, Formula, Concepts */
.ctrl { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 13px; padding: 11px 14px; }
.ctrl label { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 0.9rem; margin-bottom: 6px; gap: 8px; }
.ctrl label output {
  background: var(--accent-soft); color: var(--accent-dark); border: 1px solid #99f6e4;
  padding: 2px 9px; border-radius: 7px; font-weight: 800; font-family: 'JetBrains Mono', monospace; font-size: 0.85rem;
}
input[type=range] { width: 100%; height: 28px; accent-color: var(--accent); }
select.field, input.field {
  width: 100%; min-height: 42px; border-radius: 10px; border: 1px solid #cbd5e1;
  padding: 0 10px; font: inherit; background: #fff; color: var(--ink);
}
.read { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.r { background: #fff; border: 1.5px solid #e2e8f0; border-radius: 12px; padding: 10px 12px; }
.r span { display: block; font-size: 0.74rem; color: var(--muted); font-weight: 600; }
.r b { font-family: 'JetBrains Mono', monospace; font-size: 1.06rem; color: var(--ink); }
.r.hl { background: linear-gradient(135deg, #f0fdfa, #ccfbf1); border-color: #5eead4; }
.r.hl b { color: var(--accent-dark); }

.formula {
  background: linear-gradient(180deg, #0b1f38 0%, #122d50 100%);
  color: #fff; border-radius: 13px; padding: 12px 14px;
  font-family: 'JetBrains Mono', Consolas, monospace; font-size: 0.95rem; line-height: 1.7;
}
.formula small { display: block; font-family: 'Inter', sans-serif; font-size: 0.75rem; color: #94a3b8; margin-bottom: 3px; }

.c-graph { display: block; width: 100%; height: 195px; background: #07101f; border-top: 2px solid #1e3a5f; }

.concept p, .inq li { font-size: 0.94rem; line-height: 1.65; margin: 0 0 10px; color: #1e293b; }
.inq ol { margin: 0; padding-left: 20px; }
.tag {
  display: inline-block; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.04em;
  padding: 2px 8px; border-radius: 6px; background: #f1f5f9; color: #334155;
  margin-right: 6px; text-transform: uppercase;
}

/* ---------- Modal CP & TP ---------- */
.modal {
  position: fixed; inset: 0; background: rgba(10, 22, 40, 0.58);
  display: none; align-items: center; justify-content: center; padding: 16px; z-index: 50;
}
.modal.open { display: flex; }
.modal-box {
  background: #fff; border-radius: 18px; max-width: 740px; width: 100%;
  max-height: 88vh; overflow: auto; padding: 22px 24px; box-shadow: 0 24px 60px rgba(0,0,0,0.3);
}
.modal-box h3 { font-family: 'Space Grotesk', sans-serif; margin: 0 0 6px; }
.modal-box h4 { margin: 16px 0 6px; font-size: 0.95rem; color: var(--accent-dark); }
.modal-box li, .modal-box p { font-size: 0.93rem; line-height: 1.6; }

/* ---------- Kuis / Uji Pemahaman ---------- */
.quiz { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 18px; align-items: start; }
.stim {
  background: linear-gradient(180deg, #f0fdfa 0%, #e6f4f1 100%);
  border: 1px solid var(--line); border-radius: 18px; padding: 18px;
  position: sticky; top: 92px; box-shadow: 0 12px 32px rgba(11, 31, 56, 0.07);
}
.stim-badge {
  display: inline-block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; background: #0b1f38; color: #5eead4; padding: 4px 10px; border-radius: 999px;
}
.stim h3 { font-family: 'Space Grotesk', sans-serif; margin: 10px 0 8px; font-size: 1.1rem; }
.stim p { font-size: 0.93rem; line-height: 1.65; margin: 0 0 12px; }
.stim svg { width: 100%; height: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.stim table { width: 100%; border-collapse: collapse; font-size: 0.88rem; margin-top: 6px; background: #fff; border-radius: 10px; overflow: hidden; }
.stim th, .stim td { border: 1px solid var(--line); padding: 6px 8px; text-align: center; }
.stim th { background: #f1f5f9; }

.qcard { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: 0 12px 32px rgba(11, 31, 56, 0.07); }
.q-meta { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; font-size: 0.8rem; color: var(--muted); font-weight: 700; margin-bottom: 10px; }
.q-text { font-size: 1.04rem; line-height: 1.6; font-weight: 600; margin-bottom: 14px; }
.opts { display: flex; flex-direction: column; gap: 10px; }
.opt {
  display: flex; gap: 12px; align-items: center; text-align: left; min-height: 54px;
  padding: 8px 14px 8px 8px; border-radius: 13px; border: 2px solid var(--line);
  background: #fff; color: var(--ink); font-size: 0.96rem;
}
.opt:hover:not(:disabled) { border-color: var(--accent); }
.opt .k { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: #f1f5f9; font-weight: 800; flex-shrink: 0; }
.opt.ok { border-color: var(--green); background: #ecfdf5; }
.opt.ok .k { background: var(--green); color: #fff; }
.opt.no { border-color: var(--red); background: #fef2f2; }
.opt.no .k { background: var(--red); color: #fff; }

.bs { width: 100%; border-collapse: separate; border-spacing: 0 8px; }
.bs td { padding: 8px 10px; background: var(--alt); font-size: 0.94rem; line-height: 1.5; }
.bs td:first-child { border-radius: 12px 0 0 12px; }
.bs td:last-child { border-radius: 0 12px 12px 0; white-space: nowrap; width: 1%; }
.bs .tf { min-height: 42px; min-width: 62px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; font-weight: 700; margin-left: 4px; }
.bs .tf.sel { background: var(--ink); color: #fff; border-color: var(--ink); }
.bs .tf.ok { background: var(--green); border-color: var(--green); color: #fff; }
.bs .tf.no { background: var(--red); border-color: var(--red); color: #fff; }

.feedback { margin-top: 14px; padding: 14px; border-radius: 14px; font-size: 0.93rem; line-height: 1.6; display: none; }
.feedback.show { display: block; }
.feedback.good { background: #ecfdf5; border: 1px solid #a7f3d0; }
.feedback.bad { background: #fff7ed; border: 1px solid #fed7aa; }
.q-nav { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-top: 16px; }
.dots { display: flex; gap: 6px; flex-wrap: wrap; }
.dot { width: 34px; height: 34px; border-radius: 11px; border: 2px solid var(--line); background: #fff; font-weight: 700; font-size: 0.85rem; }
.dot.cur { background: #0b1f38; border-color: #0b1f38; color: #fff; }
.dot.ok { background: var(--green); color: #fff; border-color: var(--green); }
.dot.no { background: var(--red); color: #fff; border-color: var(--red); }

.recap { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px; text-align: center; box-shadow: 0 12px 32px rgba(11, 31, 56, 0.08); }
.recap .big { font-size: 3.2rem; font-weight: 800; color: var(--accent); }
.recap table { margin: 16px auto 0; border-collapse: collapse; font-size: 0.92rem; }
.recap td, .recap th { border: 1px solid var(--line); padding: 8px 12px; }

/* ---------- Responsif ---------- */
@media (max-width: 1140px) { .grid, .grid2, .quiz { grid-template-columns: 1fr; } .stim { position: static; } }
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform 0.25s; width: 296px !important; box-shadow: 0 0 40px rgba(0,0,0,0.4); }
  .app.menu-open .sidebar { transform: none; }
  .close-mobile, .menu-btn { display: inline-grid; place-items: center; }
  #btn-collapse { display: none; }
  .topbar { padding: 12px 14px; }
  .stage { padding: 14px 12px 32px; }
  .cp-btn span.t { display: none; }
}
@media (max-width: 480px) {
  .title-row h2 { font-size: 1.1rem; }
  .read { grid-template-columns: 1fr 1fr; }
  .r b { font-size: 0.95rem; }
  .toolbar .btn { flex: 1 1 auto; justify-content: center; }
}
.scrim { display: none; }
@media (max-width: 900px) { .app.menu-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 25; } }
