:root {
  color-scheme: dark;
  --bg: #101214;
  --panel: #171a1d;
  --panel-2: #1d2226;
  --line: #2b3238;
  --text: #eef2f4;
  --muted: #9ba6ad;
  --accent: #4aa3ff;
  --accent-2: #86d4a2;
  --bad: #ff6b6b;
  --warn: #f7c96b;
  --radius: 8px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; letter-spacing: 0; }
button, input { font: inherit; }
button { color: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 18, 20, .96);
}
.brand-title { font-size: 18px; font-weight: 760; }
.brand-sub, .muted { color: var(--muted); }
.brand-sub { font-size: 13px; margin-top: 2px; }
.header-dashboard {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}
.stats { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.stat { min-width: 70px; padding: 7px 9px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.stat .lbl { display: block; color: var(--muted); font-size: 11px; }
.stat .val { display: block; font-weight: 760; line-height: 1.15; }
.ok, .kpi-val.ok { color: var(--accent-2); }
.bad, .kpi-val.bad { color: var(--bad); }
.ability-card {
  display: grid;
  grid-template-columns: 118px minmax(108px, 132px);
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #12171b;
}
.ability-title {
  grid-column: 1 / -1;
  color: #dfe8ed;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
}
.chapter-radar {
  width: 118px;
  height: 118px;
}
.radar-svg {
  width: 100%;
  height: 100%;
  display: block;
}
.radar-ring {
  fill: none;
  stroke: #2d3943;
  stroke-width: 1;
}
.radar-axis {
  stroke: #26323b;
  stroke-width: 1;
}
.radar-area {
  fill: rgba(74, 163, 255, .24);
  stroke: none;
}
.radar-line {
  fill: none;
  stroke: #75bdff;
  stroke-width: 2;
  stroke-linejoin: round;
}
.radar-point {
  fill: #86d4a2;
  stroke: #0d1114;
  stroke-width: 1.5;
}
.radar-point.warn { fill: var(--warn); }
.radar-label {
  fill: #c9d6df;
  font-size: 12px;
  font-weight: 850;
  text-anchor: middle;
  dominant-baseline: middle;
  cursor: default;
}
.overall-ability {
  display: grid;
  gap: 3px;
  color: #cdd7dd;
  font-size: 12px;
  line-height: 1.25;
}
.overall-ability strong { color: #b8dcff; font-size: 13px; }
.ability-insight { color: var(--muted); }
.radar-tooltip {
  position: fixed;
  z-index: 80;
  width: 220px;
  padding: 10px 11px;
  border: 1px solid rgba(74, 163, 255, .45);
  border-radius: var(--radius);
  background: #10161b;
  color: #e8f0f4;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .35);
  pointer-events: none;
  font-size: 12px;
  line-height: 1.35;
}
.radar-tooltip[hidden] { display: none; }
.radar-tooltip strong,
.radar-tooltip span { display: block; }
.radar-tooltip strong { margin-bottom: 5px; color: #b8dcff; }

#app { width: min(1160px, calc(100% - 32px)); margin: 0 auto; padding: 26px 0 48px; }
.screen { display: none; }
.screen.active { display: block; }
.hero h1, .result-head h1, #screenHealth h1 { margin: 0 0 8px; font-size: clamp(26px, 4vw, 44px); line-height: 1.05; }
.hero { margin-bottom: 20px; }

.mode-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mode-grid.main-modes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mode-card, .card, .question-card, .kpi, .modal-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.mode-card {
  min-height: 118px;
  padding: 18px;
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms, transform 140ms, background 140ms;
}
.mode-card:hover { border-color: var(--accent); background: #1a2025; transform: translateY(-1px); }
.mode-title { font-size: 18px; font-weight: 760; margin-bottom: 8px; }
.mode-desc { color: var(--muted); line-height: 1.45; }

.card { padding: 16px; }
.quick-setup { margin-top: 16px; display: grid; gap: 14px; }
.row { display: grid; grid-template-columns: 170px 1fr; gap: 12px; align-items: start; }
.row > label { color: #c9d1d6; font-weight: 650; padding-top: 7px; }
.seg, .chips, .opts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.seg button, .chips button, .btn, .icon-btn {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  padding: 9px 12px;
  min-height: 38px;
  cursor: pointer;
  transition: background 140ms, border-color 140ms, transform 120ms;
}
.seg button.active, .chips button.active, .btn.primary { background: #15446f; border-color: #2d88d8; }
.chips button { text-align: left; }
.chip-badge {
  display: inline-flex;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(247, 201, 107, .14);
  color: var(--warn);
  font-size: 11px;
  font-weight: 800;
}
.btn:hover, .icon-btn:hover, .seg button:hover, .chips button:hover { border-color: #52606a; }
.btn.primary:hover { border-color: var(--accent); }
.btn.ghost { background: transparent; }
.btn.danger { background: #4b1d21; border-color: #81333b; color: #ffd1d1; }
.btn.small { min-height: 34px; padding: 7px 10px; }
.icon-btn { min-width: 40px; padding: 8px 10px; }
.chk { display: inline-flex; align-items: center; gap: 7px; color: #d7dde1; }
input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--accent); }
input[type="text"] { width: min(100%, 320px); border: 1px solid var(--line); border-radius: var(--radius); background: #111518; color: var(--text); padding: 10px 12px; }

.quiz-top { display: flex; justify-content: space-between; gap: 14px; align-items: center; margin-bottom: 14px; }
.prog-wrap { flex: 1; }
.prog-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; color: #dce3e7; }
.dot { color: var(--muted); }
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(134, 212, 162, .14);
  color: #a8e7bd;
  border: 1px solid rgba(134, 212, 162, .35);
  font-size: 12px;
  font-weight: 700;
}
.badge.alt { background: rgba(74, 163, 255, .14); color: #a8d4ff; border-color: rgba(74, 163, 255, .35); }
.badge.warn { background: rgba(247, 201, 107, .13); color: #f7d891; border-color: rgba(247, 201, 107, .36); }
.prog-bar { height: 9px; border-radius: 999px; overflow: hidden; background: #22282d; }
.prog-fill { height: 100%; width: 0; background: linear-gradient(90deg, #4aa3ff, #86d4a2); transition: width 160ms ease; }
.timer { min-width: 76px; justify-content: center; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); font-weight: 800; }

.question-card { padding: clamp(16px, 3vw, 26px); }
.shared-context-box {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(74, 163, 255, .38);
  border-radius: var(--radius);
  background: rgba(74, 163, 255, .08);
}
.shared-context-title {
  color: #b8dcff;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.shared-context-text {
  color: #e5edf2;
  line-height: 1.55;
  font-weight: 650;
}
.shuffle-note {
  margin-bottom: 12px;
  padding: 9px 11px;
  border: 1px solid rgba(247, 201, 107, .32);
  border-radius: var(--radius);
  background: rgba(247, 201, 107, .08);
  color: #f5d68d;
  font-size: 13px;
}
.qtext { font-size: clamp(20px, 3vw, 30px); line-height: 1.3; font-weight: 760; margin-bottom: 20px; }
.options { display: grid; gap: 10px; }
.option-btn {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 58px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #15191d;
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms, background 140ms;
}
.option-btn:hover:not(:disabled) { border-color: var(--accent); background: #192129; }
.option-btn:disabled { cursor: default; opacity: .98; }
.option-btn .key { width: 34px; height: 34px; border-radius: var(--radius); display: inline-flex; align-items: center; justify-content: center; background: #242b31; font-weight: 850; }
.option-btn.pending {
  border-color: var(--accent);
  background: rgba(74, 163, 255, .12);
}
.option-btn.pending .key { background: #15446f; }
.option-btn.correct { background: rgba(72, 158, 103, .18); border-color: rgba(134, 212, 162, .72); }
.option-btn.wrong { background: rgba(255, 107, 107, .14); border-color: rgba(255, 107, 107, .75); }
.question-hint { margin-top: 12px; }
.pre-answer-hint {
  border: 1px solid #313a42;
  border-radius: var(--radius);
  background: #12171b;
  overflow: hidden;
}
.pre-answer-hint summary {
  cursor: pointer;
  padding: 11px 13px;
  color: #dfe8ed;
  font-weight: 780;
  list-style-position: inside;
}
.pre-answer-hint[open] summary {
  border-bottom: 1px solid var(--line);
}
.pre-answer-hint summary:hover {
  background: #171d22;
}
.hint-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
}
.hint-grid h4 {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
}
.hint-symbols, .hint-steps { display: grid; gap: 7px; }
.hint-symbols > div {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 8px;
  padding: 8px;
  border: 1px solid #2b333a;
  border-radius: var(--radius);
  background: #0f1418;
}
.hint-symbols strong { color: #f7d891; }
.hint-symbols span, .hint-formula span { color: #c7d1d7; }
.hint-formula {
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid #2b333a;
  border-radius: var(--radius);
  background: #0f1418;
  margin-bottom: 7px;
}
.hint-formula code {
  color: #b8dcff;
  white-space: normal;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.hint-wide { grid-column: 1 / -1; }
.hint-steps {
  margin: 0;
  padding-left: 22px;
  color: #d7e0e5;
}
.hint-steps li { margin: 4px 0; }
.hint-tip {
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid rgba(74, 163, 255, .3);
  border-radius: var(--radius);
  background: rgba(74, 163, 255, .08);
  color: #bddfff;
}
.hint-more {
  display: grid;
  gap: 9px;
  margin-top: 10px;
}
.hint-more .btn {
  justify-self: start;
}
.progressive-hints {
  padding: 10px 10px 10px 28px;
  border: 1px solid #2b333a;
  border-radius: var(--radius);
  background: #0f1418;
}
.progressive-hints[hidden] {
  display: none;
}
.hint-empty {
  padding: 12px;
  color: var(--muted);
  font-size: 14px;
}
.answer-pending-note {
  min-height: 22px;
  color: var(--muted);
  font-size: 13px;
  margin-top: 10px;
}
.feedback { margin-top: 14px; padding: 13px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: #151a1e; line-height: 1.5; }
.feedback p { margin: 6px 0 0; color: #d9e1e5; }
.feedback.ok { border-color: rgba(134, 212, 162, .5); }
.feedback.bad { border-color: rgba(255, 107, 107, .55); }
.feedback.hide-text p { display: none; }
.feedback.hide-text .explain-section,
.feedback.hide-text .theory-warning,
.feedback.hide-text .explain-actions { display: none; }
.qfooter, .result-actions { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.qfooter .confirm-btn { margin-left: auto; }
.qfooter #btnNext { margin-left: 0; }
.confirm-btn:not(:disabled) {
  background: #17609b;
  border-color: var(--accent);
}
.btn.active { border-color: var(--warn); color: var(--warn); }

.explain-panel { display: grid; gap: 12px; }
.explain-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.answer-state {
  display: inline-flex;
  margin-right: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
.answer-state.right { background: rgba(134, 212, 162, .15); color: #a8e7bd; border: 1px solid rgba(134, 212, 162, .4); }
.answer-state.wrong { background: rgba(255, 107, 107, .14); color: #ffc3c3; border: 1px solid rgba(255, 107, 107, .4); }
.correct-answer { color: #dce5ea; font-weight: 700; text-align: right; }
.explain-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .025);
  overflow: hidden;
}
.explain-section summary {
  cursor: pointer;
  padding: 10px 12px;
  color: #e7eef2;
  font-weight: 760;
  list-style-position: inside;
}
.explain-body { padding: 0 12px 12px; color: #d7e0e5; }
.explain-body p { margin: 0; }
.formula-box { display: grid; gap: 8px; }
.formula-line {
  display: grid;
  grid-template-columns: minmax(120px, 220px) 1fr;
  gap: 10px;
  align-items: start;
  padding: 9px;
  border: 1px solid #313a42;
  border-radius: var(--radius);
  background: #11161a;
}
.formula-line code {
  color: #b8dcff;
  white-space: normal;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}
.formula-line span { color: #c8d2d8; }
.symbol-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.symbol-item {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 8px;
  padding: 9px;
  border: 1px solid #313a42;
  border-radius: var(--radius);
  background: #11161a;
}
.symbol-item strong { color: #f7d891; }
.symbol-item span { color: #c8d2d8; }
.diagram-wrap {
  border: 1px solid #313a42;
  border-radius: var(--radius);
  background: #11161a;
  padding: 10px;
}
.diagram-caption { color: var(--muted); font-size: 13px; margin-top: 8px; }
.memory-tip, .theory-warning {
  border-radius: var(--radius);
  padding: 10px 12px;
  border: 1px solid rgba(247, 201, 107, .35);
  background: rgba(247, 201, 107, .09);
  color: #f3d596;
}
.memory-tip {
  border-color: rgba(134, 212, 162, .32);
  background: rgba(134, 212, 162, .08);
  color: #bcebc9;
}
.explain-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.micro-svg {
  width: 100%;
  max-height: 300px;
  color: #9ba6ad;
  display: block;
}
.svg-axis, .svg-guide, .svg-shift, .svg-price, .svg-demand, .svg-supply, .svg-budget, .svg-mc, .svg-ac, .svg-avc, .svg-mr, .svg-shortage, .svg-surplus, .svg-indiff, .svg-ppf {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.svg-axis { stroke: #7d8992; stroke-width: 2; }
.svg-guide { stroke: #58656e; stroke-width: 1.4; stroke-dasharray: 4 4; }
.svg-demand { stroke: #4aa3ff; stroke-width: 3; }
.svg-supply { stroke: #86d4a2; stroke-width: 3; }
.svg-budget { stroke: #f7c96b; stroke-width: 3; }
.svg-indiff { stroke: #cda6ff; stroke-width: 3; }
.svg-ppf { stroke: #4aa3ff; stroke-width: 3; fill: none; }
.svg-mc { stroke: #86d4a2; stroke-width: 3; }
.svg-ac { stroke: #4aa3ff; stroke-width: 2.6; }
.svg-avc { stroke: #f7c96b; stroke-width: 2.6; }
.svg-mr { stroke: #cda6ff; stroke-width: 2.6; }
.svg-price { stroke: #f7c96b; stroke-width: 2.6; }
.svg-price.danger { stroke: #ff6b6b; }
.svg-price.floor { stroke: #ffb86b; }
.svg-shift { stroke: #f7c96b; stroke-width: 2.2; }
.svg-shortage { stroke: #ff6b6b; stroke-width: 3; }
.svg-surplus { stroke: #ffb86b; stroke-width: 3; }
.muted-line { opacity: .45; }
.svg-point { fill: #eef2f4; stroke: #101214; stroke-width: 2; }
.muted-point { fill: #7d8992; }
.danger-point { fill: #ff6b6b; }
.svg-label { fill: #eef2f4; font-weight: 800; font-size: 14px; }
.svg-note { fill: #c8d2d8; font-size: 12px; }
.elasticity-card, .utility-table { display: grid; gap: 8px; }
.elasticity-card > div, .utility-table > div {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 1.2fr;
  gap: 8px;
  padding: 9px;
  border: 1px solid #313a42;
  border-radius: var(--radius);
  background: #11161a;
}
.elasticity-card strong, .utility-head { color: #b8dcff; }
.utility-table > div { grid-template-columns: 1fr 1fr 1fr; }
.utility-head { font-weight: 800; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.kpi { padding: 14px; }
.kpi-lbl { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.kpi-val { font-size: 24px; font-weight: 850; }
.kpi-val.big { font-size: 34px; color: var(--accent); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 12px 0; }
h3 { margin: 0 0 12px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 420px; }
th, td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); font-size: 12px; font-weight: 720; }
.wrong-list { display: grid; gap: 10px; }
.wrong-item { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; background: #14181b; }
.wrong-item p { margin: 6px 0; }
.small { font-size: 13px; line-height: 1.45; }
.empty { color: var(--muted); padding: 10px 0; }
.dist-row, .warn-line { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.warn-line { display: block; color: #f3d596; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 20;
  width: min(390px, 92vw);
  height: 100vh;
  background: #15191c;
  border-left: 1px solid var(--line);
  transform: translateX(100%);
  transition: transform 160ms ease;
}
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 16px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; }
.drawer-body { padding: 16px; display: grid; gap: 16px; }
.drawer .row { grid-template-columns: 1fr; gap: 8px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 30;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #20262b;
  transition: opacity 140ms, transform 140ms;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.econ-symbol {
  color: #f7d891;
  border-bottom: 1px dotted rgba(247, 201, 107, .75);
  cursor: help;
  font-weight: 800;
  text-decoration: none;
}
.econ-symbol:focus {
  outline: 2px solid rgba(74, 163, 255, .55);
  outline-offset: 2px;
  border-radius: 4px;
}
.symbol-tooltip {
  position: fixed;
  z-index: 9999;
  max-width: 360px;
  background: rgba(17, 22, 26, .98);
  border: 1px solid rgba(74, 163, 255, .45);
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .4);
  color: var(--text);
  pointer-events: none;
  font-size: 13px;
  line-height: 1.42;
}
.symbol-tooltip[hidden] { display: none; }
.symbol-tooltip-title {
  font-weight: 800;
  color: #b8dcff;
  margin-bottom: 6px;
}
.symbol-tooltip-simple {
  color: #d7e0e5;
  margin-bottom: 6px;
}
.symbol-tooltip-formula {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #f7d891;
  background: rgba(247, 201, 107, .08);
  border: 1px solid rgba(247, 201, 107, .25);
  padding: 6px 8px;
  border-radius: 8px;
  margin-bottom: 6px;
}
.symbol-tooltip-example {
  color: #bcebc9;
  margin-bottom: 6px;
}
.symbol-tooltip-chapter {
  color: var(--muted);
  font-size: 12px;
}
.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .55);
  padding: 16px;
}
.modal[hidden] { display: none; }
.modal-card { width: min(430px, 100%); padding: 18px; }
.modal-card h3 { margin-top: 0; }

@media (max-width: 860px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .header-dashboard { width: 100%; align-items: flex-start; justify-content: flex-start; flex-direction: column; }
  .stats { justify-content: flex-start; }
  .ability-card { width: 100%; grid-template-columns: 112px 1fr; }
  .chapter-radar { width: 112px; height: 112px; }
  .mode-grid, .mode-grid.main-modes, .grid-2 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row { grid-template-columns: 1fr; }
  .qfooter .primary, .qfooter .confirm-btn { margin-left: 0; width: 100%; }
}

@media (max-width: 520px) {
  #app { width: min(100% - 20px, 1160px); padding-top: 18px; }
  .topbar { padding: 12px; }
  .ability-card { grid-template-columns: 96px 1fr; }
  .chapter-radar { width: 96px; height: 96px; }
  .stat { min-width: 62px; padding: 6px 7px; }
  .kpis { grid-template-columns: 1fr; }
  .option-btn { grid-template-columns: 36px 1fr; padding: 10px; }
  .option-btn .key { width: 30px; height: 30px; }
  .hint-grid { grid-template-columns: 1fr; }
  .hint-symbols > div { grid-template-columns: 1fr; }
  .qfooter .btn { width: 100%; }
  .explain-head { flex-direction: column; }
  .correct-answer { text-align: left; }
  .formula-line, .symbol-item { grid-template-columns: 1fr; }
  .symbol-grid { grid-template-columns: 1fr; }
  .symbol-tooltip { max-width: calc(100vw - 24px); }
}
