:root {
  color-scheme: light;
  --bg: #f6f5f2;
  --surface: #ffffff;
  --surface-soft: #f0f4f5;
  --ink: #172226;
  --muted: #66777e;
  --line: #d8e0df;
  --accent: #1f8a8a;
  --accent-deep: #116a6f;
  --warm: #c65d42;
  --yellow: #e0b13c;
  --green: #5f9868;
  --blue: #3f7fb7;
  --pink: #b45b83;
  --shadow: 0 18px 60px rgba(33, 47, 52, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(31, 138, 138, 0.09), rgba(246, 245, 242, 0) 280px),
    var(--bg);
  color: var(--ink);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
}

button {
  font: inherit;
}

a {
  color: var(--accent-deep);
}

.app-shell {
  width: min(1240px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 18px;
}

.workspace {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(216, 224, 223, 0.9);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent-deep);
  font-size: 13px;
  font-weight: 700;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: 20px;
  letter-spacing: 0;
}

.mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  min-width: 240px;
  padding: 4px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.mode-tab,
.tool-button,
.small-link,
.quiz-options button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.mode-tab {
  min-height: 38px;
  padding: 0 14px;
  font-weight: 700;
}

.mode-tab.active {
  background: var(--surface);
  border-color: var(--line);
  color: var(--accent-deep);
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(360px, 400px);
  min-height: 720px;
}

.atlas-panel {
  min-width: 0;
  padding: 18px;
  border-right: 1px solid var(--line);
}

.atlas-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.tool-button {
  min-height: 34px;
  padding: 0 12px;
  border-color: var(--line);
  background: var(--surface);
  color: var(--muted);
  font-weight: 700;
}

.tool-button.active {
  background: #e7f3f2;
  color: var(--accent-deep);
  border-color: rgba(31, 138, 138, 0.32);
}

.atlas-stage {
  position: relative;
  width: min(100%, 660px);
  margin: 0 auto;
  aspect-ratio: 424 / 505;
  background: #f7f1ee;
  border: 1px solid var(--line);
  overflow: hidden;
}

.atlas-stage.model-active .brain-image,
.atlas-stage.model-active .nerve-overlay,
.atlas-stage.model-active .hotspot-layer {
  display: none;
}

.brain-image,
.nerve-overlay,
.hotspot-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.brain-image {
  object-fit: contain;
  padding: 8px;
  filter: saturate(0.95);
}

.nerve-overlay {
  pointer-events: none;
}

.nerve-path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 5;
  opacity: 0.2;
}

.nerve-path.active {
  opacity: 0.95;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.95));
}

.hotspot {
  position: absolute;
  width: 42px;
  height: 42px;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: rgba(23, 34, 38, 0.76);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(23, 34, 38, 0.18);
}

.hotspot.active {
  background: var(--accent);
  border-color: #ffffff;
  transform: translate(-50%, -50%) scale(1.1);
}

.hotspot.dim {
  opacity: 0.34;
}

.precision-model-stage {
  position: absolute;
  inset: 0;
  z-index: 4;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 247, 242, 0.9)),
    #f7f1ee;
  overflow: auto;
}

.precision-model-stage[hidden] {
  display: none;
}

.model-shell {
  min-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
}

.model-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.model-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--warm);
  font-size: 12px;
  font-weight: 900;
}

.model-top h2 {
  margin-bottom: 6px;
  font-size: 20px;
  line-height: 1.2;
}

.model-top p {
  margin: 0;
  color: #40565d;
  font-size: 13px;
  line-height: 1.55;
}

.model-close {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(31, 138, 138, 0.28);
  background: var(--surface);
  color: var(--accent-deep);
  cursor: pointer;
  font-weight: 900;
}

.model-nerve-picker {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.model-nerve-chip {
  flex: 0 0 auto;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  color: #40565d;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.model-nerve-chip span {
  min-width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  background: #e7f3f2;
  color: var(--accent-deep);
  font-size: 11px;
}

.model-nerve-chip.active {
  border-color: rgba(31, 138, 138, 0.48);
  background: #eaf5f2;
  color: var(--accent-deep);
}

.model-nerve-chip.active span {
  background: var(--accent-deep);
  color: #fff;
}

.model-canvas {
  min-height: 0;
}

.model-figure {
  position: relative;
  min-height: 320px;
  border: 1px solid rgba(216, 224, 223, 0.95);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(236, 245, 244, 0.78)),
    #fbfcfb;
  overflow: hidden;
}

.model-embed-figure {
  min-height: 410px;
  background: #0f171b;
}

.model-embed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.precision-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.model-skull {
  fill: url("#cranialBase");
  stroke: #c7d8d7;
  stroke-width: 3;
}

.model-nasal {
  fill: url("#nasalDepth");
  stroke: #d8c2b8;
  stroke-width: 3;
}

.model-turbinate {
  fill: none;
  stroke: #cf8d77;
  stroke-width: 8;
  stroke-linecap: round;
  opacity: 0.58;
}

.model-mucosa {
  fill: rgba(198, 93, 66, 0.2);
  stroke: var(--warm);
  stroke-width: 3;
}

.model-fila {
  fill: none;
  stroke: #b45b83;
  stroke-width: 5;
  stroke-linecap: round;
}

.model-cribriform {
  fill: #fff2ea;
  stroke: rgba(198, 93, 66, 0.72);
  stroke-width: 3;
}

.model-bulb {
  fill: #e7f3f2;
  stroke: var(--accent);
  stroke-width: 4;
}

.model-tract,
.model-groove {
  fill: none;
  stroke: var(--accent-deep);
  stroke-width: 9;
  stroke-linecap: round;
}

.model-groove {
  stroke: #8b5a2b;
  stroke-width: 6;
  opacity: 0.75;
}

.model-label {
  fill: #26383e;
  font-size: 22px;
  font-weight: 900;
  text-anchor: middle;
}

.model-hotspot {
  position: absolute;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: rgba(23, 34, 38, 0.8);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(23, 34, 38, 0.2);
}

.model-hotspot.active {
  background: var(--warm);
  transform: translate(-50%, -50%) scale(1.16);
}

.model-spot-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 4px;
}

.model-detail-dock {
  display: grid;
  gap: 10px;
}

.model-spot-toolbar {
  display: grid;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.model-spot-toolbar > span {
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 900;
}

.model-spot-chip {
  flex: 0 0 auto;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: #40565d;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.model-spot-chip span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  background: #e7f3f2;
  color: var(--accent-deep);
  font-size: 12px;
}

.model-spot-chip.active {
  border-color: rgba(198, 93, 66, 0.55);
  background: #fff2ea;
  color: #9b422d;
}

.model-spot-chip.active span {
  background: var(--warm);
  color: #fff;
}

.model-inspector {
  padding: 12px;
  border-left: 4px solid var(--accent);
  background: rgba(255, 255, 255, 0.92);
}

.model-inspector > span {
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 900;
}

.model-inspector h3 {
  margin: 4px 0 10px;
  color: #1f3639;
  font-size: 18px;
}

.model-focus-summary {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
  padding: 10px;
  background: #eef6f4;
  border: 1px solid rgba(31, 138, 138, 0.18);
}

.model-focus-summary strong {
  color: var(--accent-deep);
  font-size: 14px;
}

.model-focus-summary span,
.model-focus-summary p {
  margin: 0;
  color: #33464c;
  font-size: 13px;
  line-height: 1.5;
}

.model-inspector dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.model-inspector div {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 8px;
}

.model-inspector dt {
  color: var(--warm);
  font-size: 13px;
  font-weight: 900;
}

.model-inspector dd {
  margin: 0;
  color: #33464c;
  font-size: 13px;
  line-height: 1.55;
}

.model-path {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
}

.model-path strong {
  color: var(--accent-deep);
  font-size: 12px;
}

.model-path span {
  color: #243237;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.model-path a {
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 900;
}

.model-path small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.info-panel {
  min-width: 0;
  max-height: calc(100vh - 152px);
  overflow: auto;
  scrollbar-gutter: stable;
  background: rgba(249, 250, 249, 0.9);
  padding: 18px;
}

.mode-section {
  display: none;
}

.mode-section.active {
  display: block;
}

.detail-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 16px;
  margin-bottom: 14px;
}

.detail-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.roman {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  background: var(--accent-deep);
  color: #fff;
  font-weight: 900;
  font-size: 18px;
}

.detail-head h2 {
  margin-bottom: 4px;
}

#detailSubtitle,
.muted,
.source-note {
  color: var(--muted);
}

#detailSubtitle {
  margin-bottom: 0;
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.tag {
  padding: 5px 8px;
  background: #eef6f4;
  color: var(--accent-deep);
  border: 1px solid rgba(31, 138, 138, 0.2);
  font-size: 12px;
  font-weight: 700;
}

.detail-view-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 12px 0;
  padding: 4px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.detail-view-tab {
  min-height: 36px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
}

.detail-view-tab.active {
  background: var(--surface);
  border-color: var(--line);
  color: var(--accent-deep);
}

.detail-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.fine-panel {
  display: grid;
  gap: 12px;
  margin: 12px 0 14px;
}

.fine-panel[hidden],
.route-visual[hidden],
.lesion-board[hidden],
.route-details[hidden],
.detail-list[hidden] {
  display: none;
}

.fine-header {
  padding: 12px;
  border-left: 4px solid var(--warm);
  background: #fff9f6;
}

.fine-header span {
  color: #9b422d;
  font-size: 12px;
  font-weight: 900;
}

.fine-header strong {
  display: block;
  margin: 5px 0;
  color: #243237;
  font-size: 14px;
}

.fine-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.fiber-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fiber-chip {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.fiber-chip.active {
  border-color: var(--fiber-color, var(--accent));
  background: #fff9f6;
  color: #243237;
}

.fine-svg-wrap {
  overflow-x: auto;
  padding: 8px;
  border: 1px solid var(--line);
  background: #fbfcfb;
}

.fine-svg {
  min-width: 620px;
  width: 100%;
  height: auto;
}

.fine-zone {
  fill: #f7f1ee;
  stroke: #d8c9c2;
  stroke-width: 2;
}

.fine-zone.temporal {
  fill: #f4efe7;
}

.fine-zone-label,
.fine-label,
.fine-small {
  text-anchor: middle;
  fill: #26383e;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.fine-zone-label {
  font-size: 16px;
  font-weight: 900;
}

.fine-label {
  font-size: 14px;
  font-weight: 900;
}

.fine-small {
  font-size: 12px;
  font-weight: 700;
}

.fine-nucleus {
  fill: #e7f3f2;
  stroke: rgba(31, 138, 138, 0.42);
  stroke-width: 2;
}

.fine-danger {
  fill: #fff2ea;
  stroke: rgba(198, 93, 66, 0.72);
  stroke-width: 2;
}

.fine-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.9;
}

.fine-line.motor {
  stroke: var(--warm);
}

.fine-line.sensory {
  stroke: var(--blue);
}

.fine-line.mixed {
  stroke: var(--accent);
}

.fine-line.para {
  stroke: var(--green);
}

.fine-line.taste {
  stroke: var(--blue);
}

.fine-line.stapedius {
  stroke: var(--yellow);
}

.fine-svg-wrap[data-active-fiber="motor"] .fine-line:not(.motor),
.fine-svg-wrap[data-active-fiber="sensory"] .fine-line:not(.sensory),
.fine-svg-wrap[data-active-fiber="mixed"] .fine-line:not(.mixed),
.fine-svg-wrap[data-active-fiber="para"] .fine-line:not(.para),
.fine-svg-wrap[data-active-fiber="taste"] .fine-line:not(.taste),
.fine-svg-wrap[data-active-fiber="stapedius"] .fine-line:not(.stapedius) {
  opacity: 0.16;
}

.fiber-notes {
  display: grid;
  gap: 8px;
}

.fiber-note {
  display: grid;
  grid-template-columns: 10px 1fr;
  column-gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.fiber-note > span {
  grid-row: span 2;
  width: 10px;
  min-height: 100%;
}

.fiber-note strong {
  font-size: 13px;
}

.fiber-note p {
  grid-column: 2;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.muted-note {
  opacity: 0.45;
}

.micro-checkpoints {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.micro-checkpoints h3 {
  margin: 0;
  color: var(--accent-deep);
  font-size: 14px;
}

.micro-checkpoints article {
  padding: 10px;
  border-left: 3px solid rgba(31, 138, 138, 0.28);
  background: #fbfcfb;
}

.micro-checkpoints strong {
  font-size: 14px;
}

.micro-checkpoints p {
  margin: 4px 0 0;
  color: #33464c;
  font-size: 13px;
  line-height: 1.55;
}

.route-visual {
  margin: 12px 0 14px;
  padding: 12px;
  background: linear-gradient(135deg, #eef7f6, #fbfaf7);
  border-left: 4px solid var(--accent);
}

.route-caption,
.lesion-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.route-caption span,
.lesion-title span {
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 900;
}

.route-caption strong,
.lesion-title strong {
  color: #243237;
  font-size: 13px;
}

.route-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--stop-count), minmax(92px, 1fr));
  gap: 8px;
  overflow-x: auto;
  padding: 8px 2px 4px;
}

.route-track::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 18px;
  right: 18px;
  height: 3px;
  background: rgba(31, 138, 138, 0.22);
}

.route-stop {
  position: relative;
  z-index: 1;
  min-width: 92px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: center;
}

.route-dot {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  margin: 0 auto 8px;
  background: var(--surface);
  border: 2px solid rgba(31, 138, 138, 0.32);
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 900;
}

.route-stop strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

.route-stop small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.route-stop.focused .route-dot,
.lesion-card.focused {
  background: #fff2ea;
  border-color: rgba(198, 93, 66, 0.56);
  color: #9b422d;
}

.lesion-board {
  margin: 12px 0 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.lesion-grid {
  display: grid;
  gap: 8px;
}

.lesion-card {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 10px 10px 10px 12px;
  border: 0;
  border-left: 3px solid var(--line);
  background: #fbfcfb;
  cursor: pointer;
  text-align: left;
}

.lesion-card strong {
  color: #1f3639;
  font-size: 14px;
}

.lesion-card span {
  color: #33464c;
  font-size: 13px;
  line-height: 1.5;
}

.lesion-card em {
  color: var(--accent-deep);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.45;
}

.route-map {
  display: grid;
  gap: 8px;
  margin: 12px 0 14px;
}

.route-details {
  margin: 12px 0 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.route-details summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  color: var(--accent-deep);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.route-step {
  position: relative;
  display: grid;
  grid-template-columns: 30px 1fr;
  column-gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  background: #fbfcfb;
}

.route-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 24px;
  bottom: -9px;
  width: 2px;
  height: 9px;
  background: var(--line);
}

.route-index {
  grid-row: span 2;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  background: #e7f3f2;
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 900;
}

.route-step strong {
  color: #1f3639;
  font-size: 14px;
}

.route-step p {
  grid-column: 2;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.detail-list div {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.detail-list dt {
  margin-bottom: 6px;
  color: var(--accent-deep);
  font-size: 13px;
  font-weight: 800;
}

.detail-list dd {
  margin: 0;
  color: #243237;
  line-height: 1.65;
}

.nerve-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.nerve-item {
  min-height: 62px;
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  text-align: left;
}

.nerve-item strong {
  display: block;
  margin-bottom: 4px;
}

.nerve-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.nerve-item.active {
  border-color: rgba(31, 138, 138, 0.5);
  background: #eaf5f2;
}

.symptom-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.symptom-chip {
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  font-weight: 700;
}

.symptom-chip.active {
  background: #fff2ea;
  border-color: rgba(198, 93, 66, 0.4);
  color: #9b422d;
}

.result-card ul {
  margin: 8px 0 0;
  padding-left: 18px;
  line-height: 1.65;
}

.quiz-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

#quizProgress {
  color: var(--accent-deep);
  font-weight: 800;
}

.quiz-type {
  display: inline-block;
  margin: 0 8px 6px 0;
  padding: 3px 7px;
  background: #eef6f4;
  color: var(--accent-deep);
  border: 1px solid rgba(31, 138, 138, 0.22);
  font-size: 12px;
  font-weight: 900;
  vertical-align: middle;
}

.small-link {
  padding: 0;
  color: var(--accent-deep);
  font-weight: 800;
}

.quiz-options {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.quiz-options button {
  min-height: 48px;
  padding: 10px 12px;
  border-color: var(--line);
  background: var(--surface-soft);
  text-align: left;
}

.quiz-options button.correct {
  background: #eaf5e9;
  border-color: rgba(95, 152, 104, 0.42);
}

.quiz-options button.wrong {
  background: #faece7;
  border-color: rgba(198, 93, 66, 0.42);
}

.quiz-feedback {
  min-height: 46px;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.source-note {
  padding: 12px 2px 0;
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 860px) {
  .main-grid {
    grid-template-columns: 1fr;
  }

  .atlas-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .info-panel {
    max-height: none;
    overflow: visible;
    padding-top: 14px;
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: 100vw;
    padding-top: 0;
  }

  .workspace {
    border-left: 0;
    border-right: 0;
  }

  .topbar {
    display: grid;
  }

  .mode-tabs {
    min-width: 0;
    width: 100%;
  }

  .main-grid {
    min-height: 0;
  }

  .atlas-panel,
  .info-panel {
    padding: 12px;
  }

  .hotspot {
    width: 34px;
    height: 34px;
    font-size: 11px;
  }

  .precision-model-stage {
    padding: 12px;
  }

  .model-top {
    display: grid;
  }

  .model-close {
    width: 100%;
  }

  .model-figure {
    min-height: 280px;
  }

  .model-embed-figure {
    min-height: 330px;
  }

  .model-inspector div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .model-label {
    font-size: 18px;
  }

  .nerve-list,
  .symptom-grid {
    grid-template-columns: 1fr;
  }
}
