:root {
  color-scheme: light;
  --bg: #eef7fb;
  --surface: #ffffff;
  --surface-soft: #f4f9fc;
  --surface-blue: #e5f3f9;
  --line: #d4e5ed;
  --line-strong: #bdd5e0;
  --ink: #183441;
  --muted: #58717d;
  --navy: #133f55;
  --accent: #187d9a;
  --accent-dark: #0d6079;
  --accent-soft: #d8eff5;
  --success: #2d7c61;
  --success-soft: #e3f3ec;
  --warning: #a35f24;
  --warning-soft: #fff0df;
  --danger: #b24b52;
  --danger-soft: #fae8ea;
  --shadow: 0 20px 50px rgba(33, 78, 98, 0.11);
  --shadow-soft: 0 10px 24px rgba(33, 78, 98, 0.08);
  --radius: 15px;
  --sidebar: 268px;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--bg); overflow-x: hidden; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 8%, rgba(107, 193, 215, 0.17), transparent 30%),
    linear-gradient(145deg, #f6fbfd 0%, var(--bg) 70%);
}

button, select, input { font: inherit; }

button { border-radius: var(--radius); -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

button:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid rgba(24, 125, 154, 0.28);
  outline-offset: 3px;
}

.app-shell { min-height: 100dvh; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }

.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  padding: 22px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: #eaf7fb;
  background: linear-gradient(180deg, #123d52 0%, #0d3244 100%);
  overflow-y: auto;
  z-index: 20;
}

.brand { display: flex; align-items: center; gap: 12px; padding: 2px 4px 12px; }
.brand-mark {
  width: 43px; height: 43px; display: grid; place-items: center;
  border-radius: 13px; background: #e6f5f8; color: var(--navy);
  font-size: 14px; font-weight: 800; letter-spacing: .06em;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.6);
}
.brand strong { display: block; font-size: 17px; letter-spacing: .04em; }
.brand small { display: block; margin-top: 4px; color: #9fc4d2; font-size: 11px; }

.course-progress { padding: 14px; border: 1px solid rgba(216,239,245,.14); border-radius: var(--radius); background: rgba(255,255,255,.055); }
.progress-copy { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #b9d7e1; }
.progress-copy strong { color: #fff; }
.progress-track { height: 6px; margin-top: 10px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.13); }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: #7ccad9; transition: width .35s ease; }

#courseNav { display: grid; gap: 5px; }
.nav-item {
  width: 100%; min-height: 43px; padding: 9px 10px;
  display: grid; grid-template-columns: 26px minmax(0,1fr) auto; align-items: center; gap: 9px;
  border: 0; border-radius: 12px; color: #c9e0e8; background: transparent;
  text-align: left; cursor: pointer; transition: background .2s ease, color .2s ease, transform .2s ease;
}
.nav-item:hover:not(:disabled) { color: #fff; background: rgba(255,255,255,.08); transform: translateX(2px); }
.nav-item.active { color: #fff; background: rgba(124,202,217,.17); box-shadow: inset 3px 0 0 #78c6d8; }
.nav-item:disabled { cursor: not-allowed; color: #658694; opacity: .72; }
.nav-index { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; background: rgba(255,255,255,.08); font-size: 11px; }
.nav-item.active .nav-index { background: #dff2f6; color: #123d52; }
.nav-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.nav-state { font-size: 11px; color: #79c2d2; }
.nav-item:disabled .nav-state { color: #678795; }

.sidebar-action { margin-top: auto; padding: 11px 12px; border: 1px solid rgba(255,255,255,.16); border-radius: var(--radius); color: #cbe1e8; background: rgba(255,255,255,.04); cursor: pointer; }
.sidebar-action:hover { background: rgba(255,255,255,.09); }

.main-shell { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 12; height: 70px; padding: 0 clamp(18px, 3vw, 42px);
  display: flex; align-items: center; gap: 16px;
  border-bottom: 1px solid rgba(190,216,226,.74);
  background: rgba(247,252,253,.9); backdrop-filter: blur(14px);
}
.breadcrumb { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; color: var(--navy); }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.control-button, .icon-button, .primary-button, .secondary-button, .soft-button, .danger-button {
  border-radius: var(--radius); cursor: pointer; transition: transform .18s ease, background .18s ease, border-color .18s ease, opacity .18s ease;
}
.control-button, .icon-button { min-height: 38px; padding: 8px 13px; border: 1px solid var(--line-strong); color: var(--navy); background: #fff; }
.control-button:hover, .icon-button:hover { border-color: var(--accent); background: #f3fafc; }
.control-button:active, .icon-button:active, .primary-button:active, .secondary-button:active, .soft-button:active { transform: scale(.98); }
.menu-button { display: none; align-items: center; justify-content: center; }
.menu-button .menu-icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.mobile-audio-button { display: none; }
.speed-control { display: flex; align-items: center; gap: 6px; padding: 0 9px 0 11px; min-height: 38px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fff; color: var(--muted); font-size: 12px; }
.speed-control select { border: 0; color: var(--ink); background: transparent; }

.page-stage { min-height: calc(100dvh - 70px); padding: clamp(24px, 3.3vw, 50px); }
.page-enter { animation: page-in .42s cubic-bezier(.16,1,.3,1) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.stagger > * { opacity: 0; animation: rise-in .48s cubic-bezier(.16,1,.3,1) forwards; }
.stagger > *:nth-child(1) { animation-delay: .04s; }
.stagger > *:nth-child(2) { animation-delay: .1s; }
.stagger > *:nth-child(3) { animation-delay: .16s; }
.stagger > *:nth-child(4) { animation-delay: .22s; }
.stagger > *:nth-child(5) { animation-delay: .28s; }
.stagger > *:nth-child(6) { animation-delay: .34s; }
@keyframes rise-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.page-frame { max-width: 1440px; margin: 0 auto; }
.page-heading { margin-bottom: 24px; }
.page-heading h1 { margin: 0; max-width: 900px; font-size: clamp(28px, 3vw, 43px); line-height: 1.17; letter-spacing: -.03em; color: var(--navy); }
.page-heading p { margin: 11px 0 0; max-width: 760px; color: var(--muted); line-height: 1.75; }
.eyebrow { margin-bottom: 10px; color: var(--accent-dark); font-size: 12px; font-weight: 800; letter-spacing: .15em; }

.panel { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.93); box-shadow: var(--shadow-soft); }
.panel-pad { padding: clamp(18px, 2vw, 28px); }
.section-title { margin: 0 0 14px; color: var(--navy); font-size: 20px; }
.section-copy { margin: 0; color: var(--muted); line-height: 1.75; }

.primary-button, .secondary-button, .soft-button, .danger-button { min-height: 46px; padding: 11px 20px; border: 1px solid transparent; font-weight: 700; white-space: nowrap; }
.primary-button { color: #fff; background: var(--accent-dark); box-shadow: 0 10px 20px rgba(13,96,121,.18); }
.primary-button:hover { background: #0a5269; transform: translateY(-1px); }
.secondary-button { color: var(--accent-dark); border-color: var(--accent); background: #fff; }
.secondary-button:hover { background: var(--accent-soft); }
.soft-button { color: var(--navy); border-color: var(--line); background: var(--surface-soft); }
.soft-button:hover { border-color: var(--accent); background: var(--accent-soft); }
.danger-button { color: #fff; background: var(--danger); }
button:disabled, .is-disabled { cursor: not-allowed !important; opacity: .46; transform: none !important; box-shadow: none !important; }
.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.intro-layout { min-height: calc(100dvh - 164px); display: grid; grid-template-columns: minmax(0,1.12fr) minmax(360px,.88fr); gap: clamp(20px, 3vw, 42px); align-items: center; }
.intro-overview-page { align-items: start; }
.intro-brief-card {
  position: relative;
  grid-column: 1 / -1;
  overflow: hidden;
  margin-bottom: 18px;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid rgba(124,202,217,.72);
  border-radius: 24px;
  background:
    radial-gradient(circle at 94% 12%, rgba(124,202,217,.34), transparent 28%),
    linear-gradient(135deg, #ffffff 0%, #eaf8fc 100%);
  box-shadow: 0 24px 60px rgba(13,64,83,.12);
}
.intro-brief-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.5) 48%, transparent 66%);
  transform: translateX(-110%);
}
.intro-brief-card.playing::after { opacity: .7; animation: intro-light-pass 3.2s ease-in-out infinite; }
@keyframes intro-light-pass { from { transform: translateX(-110%); } to { transform: translateX(110%); } }
.intro-brief-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.intro-kicker { padding: 7px 11px; border-radius: 999px; background: var(--accent-dark); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.intro-state-pill { padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--accent-dark); background: #fff; font-size: 12px; font-weight: 800; }
.intro-state-pill.done { color: #24624e; border-color: #8cc4ad; background: var(--success-soft); }
.intro-brief-card h1 { margin: 0; font-size: clamp(34px, 4.2vw, 58px); line-height: 1.08; letter-spacing: -.045em; color: var(--navy); }
.intro-brief-card .lead { margin: 18px 0 20px; max-width: 900px; font-size: clamp(16px, 1.5vw, 20px); line-height: 1.75; color: var(--muted); }
.intro-copy h1 { margin: 0; font-size: clamp(34px, 3.2vw, 48px); line-height: 1.12; letter-spacing: -.04em; color: var(--navy); }
.intro-copy .lead { margin: 18px 0 20px; max-width: 700px; font-size: clamp(16px, 1.5vw, 20px); line-height: 1.75; color: var(--muted); }
.scene-observation-panel {
  margin-top: 18px;
  padding: 16px 18px;
  border-left: 3px solid var(--accent-dark);
  border-radius: 0 16px 16px 0;
  background: rgba(255,255,255,.72);
}
.scene-observation-panel > strong { color: var(--navy); font-size: 16px; }
.scene-observation-list { display: grid; margin-top: 8px; }
.scene-observation-list > div {
  min-height: 42px;
  padding: 9px 0;
  display: grid;
  grid-template-columns: 52px minmax(0,1fr);
  align-items: start;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.scene-observation-list > div + div { border-top: 1px solid rgba(189,213,224,.72); }
.scene-observation-list b { color: var(--accent-dark); }
.scene-narration-content:not(.active) { display: none; }
.intro-flow-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.intro-flow-steps span {
  position: relative;
  min-height: 38px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(255,255,255,.72);
  font-size: 12px;
  font-weight: 800;
}
.intro-flow-steps span.active { border-style: solid; color: #fff; background: var(--accent-dark); }
.intro-script { max-width: 760px; display: grid; gap: 10px; margin-bottom: 20px; }
.intro-script p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.78; }
.reveal-line {
  opacity: 0;
  filter: blur(3px);
  transform: translateY(14px) scale(.992);
  transition:
    opacity .38s cubic-bezier(.16,1,.3,1),
    filter .38s cubic-bezier(.16,1,.3,1),
    transform .38s cubic-bezier(.16,1,.3,1);
  will-change: opacity, filter, transform;
}
.reveal-line.visible { opacity: 1; filter: none; transform: none; }
.target-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0 18px; }
.target-card { padding: 13px 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.7); }
.target-card strong { display: block; margin-bottom: 6px; color: var(--navy); }
.target-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.68; }
.role-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.role-tag { padding: 7px 11px; border: 1px solid var(--line-strong); border-radius: 10px; background: rgba(255,255,255,.7); color: var(--accent-dark); font-size: 12px; font-weight: 700; }
.gcsc-overview { margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.88); }
.gcsc-overview h2 { margin: 0 0 7px; color: var(--navy); font-size: 18px; }
.gcsc-overview > p { margin: 0 0 12px; color: var(--muted); line-height: 1.65; }
.gcsc-list { display: grid; gap: 8px; }
.gcsc-list > div { display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 9px; align-items: start; color: var(--muted); font-size: 13px; line-height: 1.65; }
.gcsc-list strong { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: var(--accent-dark); }
.intro-media { position: relative; overflow: hidden; padding: 10px; border: 1px solid var(--line-strong); border-radius: 22px; background: #d9edf3; box-shadow: var(--shadow); }
.intro-media video { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); background: #cfe4eb; }
.scene-intro-page .intro-media video { object-fit: contain; background: #0b2029; }
.media-controls { position: absolute; left: 24px; right: 24px; bottom: 24px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.media-caption { max-width: 360px; padding: 9px 12px; border-radius: 12px; color: #fff; background: rgba(12,49,67,.83); font-size: 12px; backdrop-filter: blur(10px); }
.play-chip { padding: 9px 13px; border: 1px solid rgba(255,255,255,.45); border-radius: 12px; color: #fff; background: rgba(12,49,67,.78); cursor: pointer; }
.intro-entry-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 20px 48px rgba(10,78,99,.12);
}
.intro-entry-panel.ready { border-color: rgba(124,202,217,.78); background: linear-gradient(135deg, #ffffff 0%, #eaf9fc 100%); }
.intro-entry-copy { display: grid; gap: 4px; color: var(--muted); line-height: 1.6; }
.intro-entry-copy strong { color: var(--navy); font-size: 18px; }
.intro-action-row { justify-content: end; margin: 0; }
.intro-action-row .primary-button { min-width: 180px; min-height: 54px; font-size: 16px; }
.operation-notes {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 6px 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,.78);
  box-shadow: var(--shadow-soft);
}
.intro-notes { opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .45s ease, transform .45s ease; }
.intro-notes.visible { opacity: 1; transform: none; pointer-events: auto; }
.operation-notes-head {
  padding: 12px 2px 11px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(189,213,224,.72);
}
.operation-notes-head strong { color: var(--navy); font-size: 16px; }
.operation-notes-head span { color: var(--muted); font-size: 12px; }
.note-item {
  min-height: 0;
  padding: 14px 2px;
  display: grid;
  grid-template-columns: 30px minmax(0,1fr);
  align-items: start;
  gap: 11px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}
.note-item + .note-item { border-top: 1px solid rgba(189,213,224,.72); }
.note-item strong { width: 30px; height: 30px; display: grid; place-items: center; margin: 0; border-radius: 50%; color: #fff; background: var(--accent-dark); font-size: 14px; line-height: 1; }
.note-item p { margin: 2px 0 0; }
.intro-overview-page .operation-notes { grid-column: 1; }
.gcsc-home-card {
  grid-column: 2;
  align-self: end;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--muted);
  background: linear-gradient(145deg, rgba(255,255,255,.94), rgba(234,248,252,.9));
  box-shadow: var(--shadow-soft);
}
.gcsc-home-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.gcsc-home-head span { padding: 5px 9px; border-radius: 9px; color: #fff; background: var(--accent-dark); font-size: 12px; font-weight: 800; }
.gcsc-home-head h2 { margin: 0; color: var(--navy); font-size: 18px; }
.gcsc-home-lead { margin: 0 0 10px; color: var(--ink); font-size: 13px; line-height: 1.65; }
.gcsc-home-list { display: grid; gap: 8px; }
.gcsc-home-list > div { display: grid; grid-template-columns: 28px minmax(0,1fr); gap: 8px; align-items: start; }
.gcsc-home-list strong { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; color: var(--accent-dark); background: #fff; border: 1px solid var(--line-strong); font-size: 13px; }
.gcsc-home-list p { margin: 1px 0 0; font-size: 12px; line-height: 1.62; }

.theory-layout { display: grid; grid-template-columns: minmax(210px, .32fr) minmax(0, 1fr); gap: 18px; }
.theory-tabs { padding: 9px; align-self: start; position: sticky; top: 88px; }
.theory-tab { width: 100%; padding: 12px 13px; display: flex; align-items: center; justify-content: space-between; border: 0; border-radius: 11px; color: var(--muted); background: transparent; text-align: left; cursor: pointer; }
.theory-tab:hover { background: var(--surface-soft); }
.theory-tab.active { color: var(--navy); background: var(--accent-soft); font-weight: 800; }
.theory-content { min-height: 410px; }
.theory-content h2 { margin: 0 0 15px; color: var(--navy); font-size: clamp(23px, 2.2vw, 32px); }
.theory-content p { color: var(--muted); line-height: 1.9; }
.theory-body { display: grid; gap: 12px; }
.theory-body p { margin: 0; }
.theory-reveal-line {
  display: block;
  opacity: 0;
  filter: blur(2px);
  transform: translateY(7px);
  animation: theory-line-soft-in var(--theory-line-duration, 240ms) cubic-bezier(.22, 1, .36, 1) var(--theory-line-delay, 0ms) both;
}
@keyframes theory-line-soft-in {
  from { opacity: 0; filter: blur(2px); transform: translateY(7px); }
  to { opacity: 1; filter: none; transform: none; }
}
.inline-theory-visual {
  width: 100%;
  display: block;
  padding: 0;
  margin: 2px 0 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}
.inline-theory-visual img,
.inline-theory-visual video {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: linear-gradient(135deg, #f4fbfd, #edf8fb);
}
.inline-theory-visual video { pointer-events: none; }
.inline-theory-visual span {
  display: grid;
  gap: 4px;
  padding: 10px 12px 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.inline-theory-visual strong {
  color: var(--navy);
  font-size: 14px;
}
.inline-theory-visual small { margin-top: 3px; color: var(--accent-dark); font-size: 12px; font-weight: 700; }
.inline-theory-visual.viewed { border-color: #83b9a6; background: var(--success-soft); }
.inline-theory-visual:disabled { opacity: .48; cursor: not-allowed; box-shadow: none; }
.inline-theory-visual:active { transform: scale(.99); }
.term {
  position: relative;
  display: inline;
  margin: 0;
  padding: 0 2px;
  border: 0;
  border-bottom: 1px dotted currentColor;
  color: var(--danger);
  background: transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.term:hover, .term:focus-visible { background: #fff3ee; outline: 0; }
.term:hover::after, .term:focus-visible::after {
  content: attr(data-definition);
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 40;
  width: min(260px, 72vw);
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
  box-shadow: var(--shadow-soft);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.55;
}
.fact-grid, .risk-grid, .target-grid, .report-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin-top: 18px; }
.fact-block { padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); }
.fact-block strong { display: block; margin-bottom: 7px; color: var(--navy); }
.fact-block p { margin: 0; font-size: 13px; line-height: 1.65; }
.learn-status { margin-top: 20px; padding-top: 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line); }

.theory-audio-panel {
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(280px,.7fr);
  gap: 16px;
  align-items: center;
}
.theory-audio-copy h2 { margin: 4px 0 8px; color: var(--navy); }
.theory-audio-copy p { margin: 0; color: var(--muted); line-height: 1.7; }
.theory-audio-controls { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; align-items: center; }
.range-control, .check-control {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
}
.range-control input { width: 100%; accent-color: var(--accent-dark); }
.check-control input { accent-color: var(--accent-dark); }
.panel-inline {
  margin-top: 18px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #f9fdfe 0%, #f2f9fb 100%);
}
.pathology-progress { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; }
.pathology-progress h3 { margin: 0 0 4px; color: var(--navy); }
.pathology-progress p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.section-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-title-row h3 { margin: 0 0 4px; color: var(--navy); }
.section-title-row p { margin: 0; color: var(--muted); line-height: 1.65; }
.status-pill {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--accent-dark);
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}
.status-pill.done { color: #24624e; border-color: #8cc4ad; background: var(--success-soft); }
.pathology-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
.pathology-grid .visual-card { min-height: 220px; }
.pathology-grid .visual-card img { object-fit: contain; padding: 8px; background: #f3fbfd; }
.visual-card:disabled { cursor: not-allowed; opacity: .48; transform: none; }
.visual-card em { color: var(--danger); font-style: normal; font-weight: 700; }
.theory-unlock-panel { margin-top: 16px; }
.unlock-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.unlock-item { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--muted); }
.unlock-item strong { display: block; margin-bottom: 6px; color: var(--navy); }
.unlock-item.done { border-color: #8cc4ad; background: var(--success-soft); }
.theory-original-media {
  max-height: 58dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #edf7fa;
}
.theory-original-media img,
.theory-original-media video {
  display: block;
  width: 100%;
  max-height: 58dvh;
  height: auto;
  object-fit: contain;
  border-radius: 14px;
}
.click-zoom-image { cursor: zoom-in; }
.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 36px);
  background: rgba(12, 34, 45, .94);
}
.image-lightbox[hidden] { display: none; }
.image-lightbox img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100dvh - clamp(28px, 6vw, 72px));
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .38);
  cursor: zoom-out;
}
.image-lightbox-close {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  z-index: 2001;
  min-width: 54px;
  min-height: 42px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 12px;
  color: #fff;
  background: rgba(14, 50, 65, .78);
  cursor: pointer;
}

.visual-learning { margin-top: 18px; }
.visual-grid { display: grid; grid-template-columns: repeat(5, minmax(150px,1fr)); gap: 10px; }
.visual-card { position: relative; min-height: 190px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; cursor: pointer; text-align: left; }
.visual-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.visual-card img, .visual-card video { width: 100%; height: 118px; object-fit: cover; display: block; background: #d7e9ef; }
.visual-card .visual-placeholder { height: 118px; padding: 14px; display: flex; align-items: end; background: linear-gradient(145deg, #cde8ef, #eff8fa); color: var(--navy); font-weight: 800; line-height: 1.35; }
.visual-card span { display: block; padding: 11px 12px; color: var(--ink); font-size: 12px; line-height: 1.5; }
.visual-card.viewed::after { content: "已浏览"; position: absolute; top: 9px; right: 9px; padding: 5px 8px; border-radius: 9px; color: #fff; background: var(--success); font-size: 10px; }

.quiz-shell { max-width: 960px; margin: 0 auto; }
.quiz-meta { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; margin-bottom: 16px; }
.quiz-progress { height: 8px; overflow: hidden; border-radius: 999px; background: #dbe9ee; }
.quiz-progress span { display: block; height: 100%; background: var(--accent); transition: width .3s ease; }
.question-panel { padding: clamp(22px, 4vw, 42px); }
.question-type { color: var(--accent-dark); font-weight: 800; font-size: 12px; }
.question-panel h2 { margin: 13px 0 24px; color: var(--navy); font-size: clamp(21px, 2.4vw, 30px); line-height: 1.5; }
.answer-list { display: grid; gap: 10px; }
.answer-option { width: 100%; padding: 15px 17px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--ink); background: #fff; cursor: pointer; text-align: left; }
.answer-option:hover { border-color: var(--accent); background: #f2fafc; }
.answer-option.correct { color: var(--success); border-color: #7cbba4; background: var(--success-soft); }
.answer-option.wrong { color: var(--danger); border-color: #d79aa0; background: var(--danger-soft); animation: soft-shake .32s ease; }
@keyframes soft-shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.analysis-box { margin-top: 16px; padding: 14px 16px; border-radius: 13px; background: var(--warning-soft); color: #74471e; line-height: 1.7; }

.simulation-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.mode-strip { margin-top: 16px; padding: 8px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.72); }
.mode-strip span { color: var(--muted); font-size: 12px; }
.mode-button { min-height: 34px; padding: 7px 13px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: #fff; cursor: pointer; }
.mode-button.active { color: #fff; border-color: var(--accent-dark); background: var(--accent-dark); }
.scene-panel { overflow: hidden; }
.scene-head { padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.scene-head strong { color: var(--navy); }
.case-switch { display: flex; gap: 6px; }
.case-button { padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: #fff; cursor: pointer; }
.case-button.active { color: #fff; border-color: var(--accent-dark); background: var(--accent-dark); }
.case-lock { padding: 7px 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--accent-dark); background: var(--accent-soft); font-size: 12px; font-weight: 700; }
.patient-stage { position: relative; min-height: 420px; padding: 20px; display: grid; grid-template-columns: minmax(0,1fr) minmax(280px,.8fr); gap: 16px; background: linear-gradient(160deg, #e8f5f8, #f8fcfd); }
.patient-stage,
.patient-card,
.question-actions,
.question-action,
.toolbox,
.scene-panel {
  min-width: 0;
  max-width: 100%;
}
.patient-video { display: block; width: 100%; max-width: 100%; height: 310px; object-fit: cover; border-radius: var(--radius); background: #c9e1e8; }
.patient-card { display: flex; flex-direction: column; gap: 12px; }
.patient-profile { padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.88); }
.patient-profile strong { display: block; color: var(--navy); font-size: 18px; }
.patient-profile span { color: var(--muted); font-size: 12px; }
.response-card { position: relative; min-height: 132px; padding: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.response-card h3 { margin: 0 0 8px; font-size: 14px; color: var(--accent-dark); }
.response-card p { margin: 0; color: var(--muted); line-height: 1.65; }
.response-card .patient-expression { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); font-size: 12px; }
.response-card .practice-observation-note,
.response-card .test-observation-note { margin-top: 9px; padding: 9px 10px; border-radius: 10px; font-size: 12px; }
.response-card .practice-observation-note { color: #74501f; background: rgba(255,240,223,.86); }
.response-card .test-observation-note { color: var(--accent-dark); background: var(--accent-soft); }
.response-card.orientation-success { border-color: #8abfa9; background: linear-gradient(145deg, #ffffff 0%, var(--success-soft) 100%); }
.response-card.orientation-partial { border-color: #d7b07b; background: var(--warning-soft); }
.response-card.cognitive-alert { border-color: #d3979d; background: var(--danger-soft); animation: soft-shake .32s ease; }
.orientation-review-visuals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.orientation-review-visuals img { display: block; width: 100%; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.response-score { margin-left: 6px; padding: 3px 7px; border-radius: 999px; color: var(--success); background: rgba(45,124,97,.1); font-size: 11px; font-weight: 700; }
.response-score.low { color: var(--danger); background: rgba(178,75,82,.1); }
.fruit-feedback { position: absolute; top: 12px; right: 12px; width: 50px; height: 34px; pointer-events: none; }
.fruit-slice { position: absolute; right: 10px; bottom: 2px; width: 29px; height: 29px; border-radius: 50% 50% 50% 8px; background: radial-gradient(circle at 42% 42%, #fff7d6 0 17%, transparent 18%), linear-gradient(135deg, #f7cf65 0 52%, #f19f5b 53%); box-shadow: inset 0 0 0 3px rgba(255,255,255,.65), 0 8px 14px rgba(45,124,97,.13); transform: rotate(-28deg); }
.fruit-feedback span { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #f4bd59; opacity: 0; }
.fruit-feedback span:nth-child(2) { left: 4px; top: 15px; }
.fruit-feedback span:nth-child(3) { left: 18px; top: 1px; background: #86cba8; }
.fruit-feedback span:nth-child(4) { left: 34px; top: 12px; background: #f08f72; }
.confetti { position: absolute; width: 5px; height: 13px; border-radius: 3px; background: #7ccad9; opacity: 0; }
.confetti.c1 { left: 2px; top: 2px; transform: rotate(-28deg); background: #7ccad9; }
.confetti.c2 { left: 24px; top: -2px; transform: rotate(18deg); background: #f4bd59; }
.confetti.c3 { right: 1px; top: 0; transform: rotate(35deg); background: #f08f72; }
.question-actions { display: grid; gap: 8px; }
.question-action { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--navy); background: #fff; cursor: pointer; text-align: left; overflow-wrap: anywhere; }
.question-action:active { transform: none; }
.question-action small { display: block; max-width: 100%; overflow-wrap: anywhere; line-height: 1.5; }
.question-action.done { color: var(--success); border-color: #86bca9; background: var(--success-soft); }
.question-action.current { color: #fff; border-color: var(--accent-dark); background: var(--accent-dark); }
.question-action.locked { color: var(--muted); border-color: var(--line); background: var(--surface-soft); cursor: pointer; }
.orientation-flow-hint { padding: 11px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #a8d4e3; color: #245d72; background: #e9f7fc; }
.orientation-flow-hint strong { display: block; margin-bottom: 2px; color: var(--navy); font-size: 13px; }
.orientation-flow-hint p { margin: 0; font-size: 12px; line-height: 1.55; }
.orientation-flow-hint .soft-button { flex: 0 0 auto; min-height: 36px; padding: 7px 11px; }
.orientation-next-card {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.86);
  color: var(--muted);
}
.orientation-next-card.ready {
  border-color: #7fb8a4;
  background: linear-gradient(145deg, #ffffff 0%, var(--success-soft) 100%);
}
.orientation-next-card strong {
  display: block;
  margin-bottom: 5px;
  color: var(--navy);
}
.orientation-next-card p {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.65;
}
.inline-severity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.inline-severity-button {
  min-height: 44px;
  border-color: #86bca9;
  background: #fff;
  cursor: pointer;
}
.toolbox { padding: 18px; }
.toolbox h2 { margin: 0 0 12px; font-size: 18px; color: var(--navy); }
.tool-group { margin-top: 13px; }
.tool-group h3 { margin: 0 0 8px; color: var(--muted); font-size: 12px; font-weight: 700; }
.distractor-group { margin-top: 10px; padding-top: 0; }
.check-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 13px; }
.check-button { padding: 10px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: #fff; cursor: pointer; }
.check-button.done { color: var(--success); border-color: #83bba7; background: var(--success-soft); }
.tool-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tool-item { padding: 11px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); color: var(--ink); cursor: grab; font-size: 12px; text-align: center; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.tool-item.dragging, .severity-button.dragging { opacity: .72; transform: scale(.98); }
.tool-item.tool-bounce, .severity-button.tool-bounce { animation: drag-bounce .36s ease; }
.tool-item.placed { color: var(--success); border-color: #8cbfae; background: var(--success-soft); cursor: default; }
.tool-item.distractor { color: #765f4c; background: #fff8f0; }
.drop-zone { position: relative; min-height: 108px; margin: 13px 0; padding: 12px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 7px; border: 2px dashed var(--line-strong); border-radius: 13px; background: #f8fcfd; }
.drop-zone.drag-over { border-color: var(--accent); background: var(--accent-soft); }
.drop-zone strong { width: 100%; color: var(--muted); font-size: 12px; }
.placed-chip { padding: 6px 8px; border-radius: 9px; color: var(--success); background: var(--success-soft); font-size: 11px; }
.tool-success-check { position: absolute; top: 9px; right: 10px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--success); box-shadow: 0 8px 18px rgba(45,124,97,.22); font-size: 19px; font-weight: 900; pointer-events: none; }
.severity-drop { min-height: 68px; margin-bottom: 8px; padding: 12px; display: grid; align-content: center; gap: 4px; border: 2px dashed var(--line-strong); border-radius: 13px; background: #f8fcfd; }
.severity-drop.ready { background: #fff; }
.severity-drop.drag-over { border-color: var(--accent); background: var(--accent-soft); }
.severity-drop.attention {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 4px rgba(24,125,154,.14);
}
.severity-drop strong { color: var(--navy); font-size: 13px; }
.severity-drop span { color: var(--muted); font-size: 12px; }
.severity-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }
.severity-button { padding: 10px 6px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--navy); cursor: grab; font-size: 12px; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.severity-button:disabled { color: var(--muted); cursor: not-allowed; background: var(--surface-soft); }
.severity-button.locked { color: var(--muted); cursor: pointer; background: var(--surface-soft); opacity: .58; }
.orientation-rubric { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.orientation-rubric h2 { margin-bottom: 9px; }
.orientation-rubric > div { padding: 9px 0; display: grid; gap: 3px; border-bottom: 1px solid var(--line); }
.orientation-rubric > div:last-child { border-bottom: 0; }
.orientation-rubric strong { color: var(--navy); font-size: 12px; }
.orientation-rubric span { color: var(--muted); font-size: 11px; line-height: 1.55; }
.orientation-judgement-panel { margin-top: 18px; padding: clamp(18px, 2vw, 28px); }
.orientation-judgement-panel > h2 { margin: 0 0 14px; color: var(--navy); font-size: 21px; }
.orientation-judgement-panel .severity-drop { min-height: 82px; }
.orientation-judgement-panel .severity-grid { margin-top: 10px; }
.orientation-records { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.record-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 9px; color: var(--navy); font-size: 13px; }
.record-head span { color: var(--muted); font-size: 12px; }
.mini-score-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.mini-score-table th, .mini-score-table td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.mini-score-table th { color: var(--muted); font-weight: 600; }
.mini-score-table td:last-child, .mini-score-table th:last-child { text-align: right; }
@keyframes drag-bounce { 0% { transform: translateX(0) scale(1); } 30% { transform: translateX(-7px) scale(.96); } 58% { transform: translateX(5px) scale(1.03); } 78% { transform: translateX(-2px) scale(.99); } 100% { transform: translateX(0) scale(1); } }
@keyframes tool-check-pop { from { opacity: 0; transform: scale(.65); } 45% { opacity: 1; transform: scale(1.08); } to { opacity: 1; transform: scale(1); } }
@keyframes fruit-pop { from { opacity: 0; transform: translateY(8px) scale(.85); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes fruit-particle { 0% { opacity: 0; transform: translate(0, 6px) scale(.7); } 35% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--tx, -8px), var(--ty, -15px)) scale(1); } }
@media (prefers-reduced-motion: no-preference) {
  .tool-success-check { animation: tool-check-pop .28s cubic-bezier(.16,1,.3,1) both; }
  .response-card.orientation-success { animation: success-pop .32s ease both; }
  .fruit-feedback { animation: fruit-pop .38s ease both; }
  .fruit-feedback span { animation: fruit-particle .78s ease both; }
  .fruit-feedback span:nth-child(2) { --tx: -10px; --ty: -13px; }
  .fruit-feedback span:nth-child(3) { --tx: 0; --ty: -18px; animation-delay: .06s; }
  .fruit-feedback span:nth-child(4) { --tx: 9px; --ty: -12px; animation-delay: .1s; }
  .confetti { animation: fruit-particle .85s ease both; }
  .confetti.c1 { --tx: -13px; --ty: -18px; animation-delay: .04s; }
  .confetti.c2 { --tx: 2px; --ty: -22px; animation-delay: .1s; }
  .confetti.c3 { --tx: 14px; --ty: -18px; animation-delay: .16s; }
}
@keyframes success-pop { from { transform: translateY(4px) scale(.99); } to { transform: none; } }

.risk-summary { display: grid; grid-template-columns: 290px minmax(0,1fr); gap: 18px; }
.risk-dial { min-height: 310px; padding: 26px; display: grid; place-items: center; text-align: center; }
.risk-score { width: 174px; height: 174px; border-radius: 50%; display: grid; place-items: center; border: 14px solid var(--accent-soft); box-shadow: inset 0 0 0 1px var(--line); }
.risk-score strong { display: block; color: var(--navy); font-size: 45px; line-height: 1; }
.risk-score span { color: var(--muted); font-size: 12px; }
.risk-level { margin-top: 16px; font-size: 22px; color: var(--accent-dark); font-weight: 800; }
.score-table { width: 100%; border-collapse: collapse; }
.score-table th, .score-table td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.score-table th { color: var(--muted); font-size: 12px; font-weight: 600; }
.score-table td:last-child, .score-table th:last-child { text-align: right; }
.risk-dimension-list { display: grid; gap: 8px; }
.risk-dimension-item { padding: 13px 14px; display: grid; grid-template-columns: minmax(80px,.8fr) minmax(0,1.4fr) auto; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.risk-dimension-item strong { color: var(--navy); }
.risk-dimension-item span { color: var(--muted); line-height: 1.5; }
.risk-dimension-item b { color: var(--accent-dark); }
.recommendation { margin-top: 18px; padding: 18px; border-left: 4px solid var(--accent); border-radius: 0 13px 13px 0; background: var(--surface-blue); }
.recommendation strong { display: block; margin-bottom: 8px; color: var(--navy); }
.recommendation p { margin: 0; color: var(--muted); line-height: 1.7; }

.feedback-fruit { position: relative; top: auto; right: auto; margin: 12px auto 4px; }
.choice-row { display: grid; gap: 8px; margin-top: 10px; }

.scenario-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(330px,.9fr); gap: 18px; }
.scenario-media { overflow: hidden; }
.scenario-audio-player { min-height: 230px; padding: 34px 24px; display: grid; grid-template-columns: auto minmax(0,1fr); align-content: center; align-items: center; gap: 14px 16px; background: linear-gradient(145deg, #e8f5f7, #f7fbfc); }
.scenario-audio-player > div { display: grid; gap: 4px; }
.scenario-audio-player strong { color: var(--navy); font-size: 20px; }
.scenario-audio-player span { color: var(--muted); line-height: 1.6; }
.scenario-audio-player .scenario-audio-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--accent-dark); font-size: 25px; }
.scenario-audio-player audio { grid-column: 1 / -1; width: 100%; margin-top: 8px; }
.scenario-caption { padding: 14px 17px; color: var(--muted); line-height: 1.65; }
.task-stack { display: grid; gap: 12px; }
.task-panel { padding: 18px; }
.task-panel h2 { margin: 0 0 12px; font-size: 17px; color: var(--navy); }
.choice-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice-button { min-height: 45px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--navy); background: #fff; cursor: pointer; }
.choice-button.selected { color: #fff; border-color: var(--accent-dark); background: var(--accent-dark); }
.measure-hint { margin: -2px 0 10px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.measure-list { display: grid; gap: 7px; }
.measure-locked { padding: 14px; border: 1px dashed var(--line-strong); border-radius: 11px; color: var(--muted); background: var(--surface-soft); font-size: 13px; line-height: 1.6; }
.measure-button { padding: 11px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink); text-align: left; cursor: pointer; }
.measure-button.selected { color: var(--success); border-color: #75ae9a; background: var(--success-soft); }
.drag-palette button[draggable="true"] { cursor: grab; }
.scenario-drop-zone { min-height: 70px; margin-top: 10px; padding: 12px; display: grid; align-content: center; gap: 4px; border: 2px dashed var(--line-strong); border-radius: 13px; background: var(--surface-soft); color: var(--muted); }
.scenario-drop-zone strong { color: var(--navy); font-size: 13px; }
.scenario-drop-zone span { font-size: 12px; line-height: 1.5; }
.scenario-drop-zone.drag-over, .emergency-drop.drag-over, .search-order.drag-over { border-color: var(--accent); background: var(--accent-soft); }
.scenario-drop-zone.filled { border-color: #7ab19e; background: var(--success-soft); color: var(--success); }
.comparison-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.comparison-good, .comparison-bad { padding: 14px; border-radius: 13px; line-height: 1.65; }
.comparison-good { border: 1px solid #7ab19e; background: var(--success-soft); color: #235f4b; }
.comparison-bad { border: 1px solid #d39aa0; background: var(--danger-soft); color: #7d3037; }
.comparison-grid strong { display: block; margin-bottom: 5px; }
.comparison-grid p { margin: 0; }

.scenario-assessment-strip { margin-bottom: 18px; padding: 13px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.72); box-shadow: var(--shadow-soft); }
.scenario-assessment-strip > div { min-width: 0; padding: 11px 14px; display: grid; gap: 3px; border-radius: 12px; background: var(--surface-soft); }
.scenario-assessment-strip span, .scenario-assessment-strip small { color: var(--muted); font-size: 11px; }
.scenario-assessment-strip strong { color: var(--navy); font-size: 17px; overflow-wrap: anywhere; }
.scenario-assessment-strip .risk-tone-success { color: var(--success); }
.scenario-assessment-strip .risk-tone-warning { color: #a86119; }
.scenario-assessment-strip .risk-tone-danger { color: var(--danger); }
.measure-button { transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.measure-button:hover { border-color: var(--accent); background: var(--surface-blue); transform: translateY(-1px); }
.measure-button.selected:hover { border-color: #75ae9a; background: var(--success-soft); }
.scenario-standard-list { display: grid; gap: 9px; margin-top: 10px; }
.scenario-standard-item { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.scenario-standard-item.active { border-color: #e3a14c; background: #fff6e8; box-shadow: inset 4px 0 0 #e3a14c; }
.scenario-standard-item strong { color: var(--navy); }
.scenario-standard-item p { margin: 4px 0 0 !important; color: var(--muted); line-height: 1.55; }
.scenario-comparison-modal .modal-panel { width: min(980px, 100%); }
.scenario-alert-modal .modal-panel, .scenario-standards-modal .modal-panel { width: min(760px, 100%); }
.scenario-comparison-summary { margin-bottom: 14px; padding: 12px 14px; display: flex; justify-content: space-between; gap: 10px; border-radius: 12px; background: var(--surface-blue); }
.scenario-comparison-summary strong { color: var(--navy); }
.scenario-comparison-summary span { color: var(--muted); text-align: right; }
.scenario-animation-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.scenario-animation-card { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.scenario-animation-card.good { border-color: #79b39e; background: #f5fcf8; }
.scenario-animation-card.bad { border-color: #d99ba1; background: #fff7f7; }
.scenario-animation-heading { margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.scenario-animation-heading span { padding: 4px 9px; border-radius: 999px; color: #fff; background: var(--success); font-size: 12px; font-weight: 800; }
.scenario-animation-card.bad .scenario-animation-heading span { background: var(--danger); }
.scenario-animation-heading b { color: var(--navy); font-size: 13px; text-align: right; }
.scenario-animation-stage { position: relative; height: 210px; overflow: hidden; border-radius: 12px; border: 1px solid var(--line); background: linear-gradient(180deg,#e9f5f8 0 68%,#d5e6e1 68% 100%); }
.scenario-animation-stage::before { content: ""; position: absolute; left: 0; right: 0; top: 67%; height: 2px; background: rgba(23,85,106,.18); }
.scenario-scene-door { position: absolute; right: 14px; top: 25px; width: 60px; height: 116px; display: grid; place-items: start center; border: 5px solid #8aa8b3; border-bottom: 0; background: #f8fcfd; }
.scenario-scene-door span { margin-top: 9px; padding: 3px 6px; border-radius: 5px; color: #fff; background: var(--navy); font-size: 10px; font-weight: 800; }
.scenario-person { position: absolute; top: 91px; width: 50px; display: grid; justify-items: center; gap: 3px; z-index: 2; }
.scenario-person > span { width: 45px; height: 45px; display: grid; place-items: center; border: 4px solid #fff; border-radius: 50%; color: #fff; background: #718b96; box-shadow: 0 6px 13px rgba(13,56,72,.18); font-weight: 900; }
.scenario-person small { padding: 2px 5px; border-radius: 5px; color: var(--navy); background: rgba(255,255,255,.9); white-space: nowrap; }
.scenario-elder { left: 51%; }
.scenario-nurse { left: 31%; }
.scenario-nurse > span { background: var(--accent-dark); }
.scenario-comfort-bubble { position: absolute; left: 13%; top: 22px; max-width: 190px; padding: 7px 10px; border-radius: 10px 10px 10px 2px; color: var(--navy); background: #fff; box-shadow: 0 5px 14px rgba(13,56,72,.12); font-size: 11px; font-weight: 700; opacity: 1; }
.scenario-protection-badge { position: absolute; right: 87px; bottom: 12px; padding: 6px 9px; border-radius: 8px; color: #fff; background: var(--success); font-size: 10px; font-weight: 800; opacity: 1; }
.scenario-empty-post { position: absolute; left: 18px; top: 26px; padding: 6px 9px; border: 1px dashed #d5949b; border-radius: 8px; color: var(--danger); background: rgba(255,255,255,.84); font-size: 11px; }
.bad-stage .scenario-elder { left: 69%; }
.scenario-red-alert { position: absolute; inset: 18px 82px 18px 18px; z-index: 5; padding: 14px; display: grid; place-content: center; gap: 5px; border: 3px solid #fff; border-radius: 12px; color: #fff; background: rgba(188,40,50,.94); box-shadow: 0 0 0 5px rgba(188,40,50,.18), 0 14px 30px rgba(94,20,26,.25); opacity: 1; }
.scenario-red-alert strong { font-size: 17px; }
.scenario-red-alert span { font-size: 11px; line-height: 1.5; }
.scenario-animation-card > p { margin: 10px 2px 0 !important; color: var(--muted); font-size: 12px; line-height: 1.6; }
.scenario-pass-message { margin-top: 14px !important; padding: 12px 14px; border-radius: 11px; color: #235f4b; background: var(--success-soft); font-weight: 700; }

@media (prefers-reduced-motion: no-preference) {
  .good-stage .scenario-nurse { animation: scenario-nurse-approach 3.8s ease-in-out both; }
  .good-stage .scenario-elder { animation: scenario-elder-calm 3.8s ease-in-out both; }
  .scenario-comfort-bubble { animation: scenario-bubble-in 3.8s ease both; }
  .scenario-protection-badge { animation: scenario-badge-in 3.8s ease both; }
  .bad-stage .scenario-elder { animation: scenario-elder-exit 3.8s ease-in both; }
  .scenario-red-alert { animation: scenario-alert-in 3.8s ease both, scenario-alert-pulse 1s 3.8s ease-in-out infinite; }
}
@keyframes scenario-nurse-approach { 0% { left: 6%; } 45%,100% { left: 31%; } }
@keyframes scenario-elder-calm { 0%,40% { left: 57%; } 70%,100% { left: 51%; } }
@keyframes scenario-bubble-in { 0%,34% { opacity: 0; transform: translateY(6px); } 50%,100% { opacity: 1; transform: none; } }
@keyframes scenario-badge-in { 0%,65% { opacity: 0; transform: scale(.86); } 78%,100% { opacity: 1; transform: none; } }
@keyframes scenario-elder-exit { 0% { left: 18%; } 68%,100% { left: 69%; } }
@keyframes scenario-alert-in { 0%,64% { opacity: 0; transform: scale(.94); } 76%,100% { opacity: 1; transform: none; } }
@keyframes scenario-alert-pulse { 0%,100% { box-shadow: 0 0 0 5px rgba(188,40,50,.18), 0 14px 30px rgba(94,20,26,.25); } 50% { box-shadow: 0 0 0 10px rgba(188,40,50,.08), 0 14px 30px rgba(94,20,26,.3); } }

.flow-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.flow-cards { display: grid; gap: 8px; }
.flow-card { padding: 13px 15px; display: grid; grid-template-columns: 32px minmax(0,1fr); gap: 11px; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; text-align: left; }
.flow-card:hover { border-color: var(--accent); }
.flow-card.selected { color: var(--success); border-color: #81b9a5; background: var(--success-soft); }
.flow-card.rejected { position: relative; color: var(--danger); border-color: #d39aa0; background: var(--danger-soft); }
.flow-card.rejected::after { content: "×"; position: absolute; right: 12px; top: 50%; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--danger); font-size: 22px; font-weight: 900; transform: translateY(-50%); }
.flow-number { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--surface-blue); color: var(--navy); font-size: 12px; font-weight: 800; }
.selected-flow { min-height: 410px; padding: 20px; }
.selected-flow h2 { margin-top: 0; color: var(--navy); }
.selected-step { position: relative; margin-bottom: 9px; padding: 12px 14px 12px 45px; border-radius: 11px; background: var(--surface-blue); color: var(--ink); }
.selected-step span { position: absolute; left: 13px; top: 11px; width: 23px; height: 23px; display: grid; place-items: center; border-radius: 7px; color: #fff; background: var(--accent-dark); font-size: 11px; }

.emergency-grid { display: grid; grid-template-columns: 340px minmax(0,1fr); gap: 18px; }
.emergency-alert { padding: 18px; border: 1px solid #d89ca2; border-radius: var(--radius); background: var(--danger-soft); color: #7d3037; }
.emergency-alert strong { display: block; margin-bottom: 6px; }
.emergency-tools { margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.82); }
.emergency-tools h2 { margin: 0 0 10px; color: var(--navy); font-size: 17px; }
.emergency-tool { width: 100%; margin-bottom: 7px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); cursor: grab; text-align: left; }
.emergency-tool.used { color: var(--success); border-color: #7ab19e; background: var(--success-soft); cursor: default; }
.emergency-drop { min-height: 78px; margin-top: 12px; padding: 12px; display: grid; align-content: center; gap: 4px; border: 2px dashed var(--line-strong); border-radius: 13px; background: var(--surface-soft); color: var(--muted); }
.emergency-drop strong { color: var(--navy); font-size: 13px; }
.emergency-drop span { font-size: 12px; line-height: 1.5; }
.emergency-drop.filled { border-color: #7ab19e; background: var(--success-soft); color: var(--success); }
.stage-list { display: grid; gap: 9px; margin-top: 14px; }
.stage-button { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: #fff; cursor: pointer; text-align: left; }
.stage-button.done { color: var(--success); border-color: #80b7a3; background: var(--success-soft); }
.search-board { padding: 22px; }
.search-board h2 { margin: 0 0 10px; color: var(--navy); }
.search-zones { display: flex; flex-wrap: wrap; gap: 8px; margin: 15px 0; }
.search-zone { padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; color: var(--navy); background: #fff; cursor: pointer; }
.search-zone.used { opacity: .4; cursor: default; }
.search-order { min-height: 150px; padding: 14px; display: grid; gap: 8px; border: 2px dashed var(--line-strong); border-radius: 13px; background: var(--surface-soft); }
.search-order-item { padding: 10px 12px; border-radius: 10px; background: var(--surface-blue); color: var(--navy); }

.human-banner { margin-bottom: 18px; padding: 22px; text-align: center; color: #fff; background: linear-gradient(120deg, #123f55, #176a7d); }
.human-banner h1 { margin: 0; font-size: clamp(25px, 3vw, 39px); }
.human-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.human-list { padding: 18px; }
.human-list h2 { margin: 0 0 13px; color: var(--navy); }
.human-item { width: 100%; margin-bottom: 8px; padding: 13px 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink); cursor: pointer; text-align: left; }
.human-item:hover { border-color: var(--accent); }
.human-item.viewed { color: var(--success); border-color: #82b8a5; background: var(--success-soft); }
.human-item.taboo.viewed { color: var(--danger); border-color: #d39aa0; background: var(--danger-soft); }

.family-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.family-card { min-height: 170px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; cursor: pointer; text-align: left; scroll-margin-block: 88px; transition: border-color .3s ease, background .3s ease, box-shadow .3s ease, transform .3s ease; }
.family-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.family-card.viewed { border-color: #83b9a6; background: var(--success-soft); }
.family-card.narration-active,
.family-card.viewed.narration-active { border-color: var(--accent-dark); background: #eef9fc; box-shadow: 0 0 0 3px rgba(33,143,171,.16), 0 14px 30px rgba(13,96,121,.12); transform: translateY(-2px); }
.family-card strong { display: block; margin-bottom: 9px; color: var(--navy); font-size: 18px; }
.family-card p { margin: 0; color: var(--muted); line-height: 1.75; }

.mnemonic-poster { max-width: 860px; margin: 0 auto; padding: clamp(30px, 6vw, 72px); text-align: center; border: 1px solid var(--line-strong); border-radius: 24px; background: linear-gradient(160deg, #e4f3f7, #fff); box-shadow: var(--shadow); }
.mnemonic-poster h1 { margin: 0 0 28px; color: var(--navy); font-size: clamp(30px, 4vw, 52px); }
.summary-poster .eyebrow { justify-content: center; }
.summary-lead { max-width: 720px; margin: -8px auto 24px; color: var(--muted); line-height: 1.75; }
.mnemonic-line { margin: 0; color: var(--accent-dark); font-size: clamp(23px, 3vw, 38px); font-weight: 800; line-height: 1.75; opacity: 0; animation: rise-in .55s ease forwards; }
.mnemonic-line:nth-of-type(2) { animation-delay: .12s; }
.mnemonic-line:nth-of-type(3) { animation-delay: .24s; }
.mnemonic-line:nth-of-type(4) { animation-delay: .36s; }
.mnemonic-line:nth-of-type(5) { animation-delay: .48s; }
.mnemonic-line:nth-of-type(6) { animation-delay: .6s; }
.mnemonic-line:nth-of-type(7) { animation-delay: .72s; }

.score-hero { padding: clamp(24px,4vw,44px); display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; }
.total-score { width: 168px; height: 168px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-dark); color: #fff; box-shadow: 0 20px 42px rgba(13,96,121,.22); }
.total-score strong { display: block; font-size: 54px; line-height: 1; }
.total-score span { display: block; text-align: center; font-size: 12px; color: #c8e7ee; }
.score-hero h2 { margin: 0 0 9px; color: var(--navy); font-size: 30px; }
.score-hero p { margin: 0; color: var(--muted); line-height: 1.7; }
.score-breakdown { margin-top: 18px; overflow: hidden; }
.score-breakdown-head { padding: 15px 17px; display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); background: var(--surface-soft); color: var(--muted); }
.score-breakdown-head strong { color: var(--navy); }
.score-breakdown-list { display: grid; }
.score-breakdown-item { padding: 14px 16px; display: grid; grid-template-columns: minmax(150px,1.4fr) repeat(3,minmax(100px,.7fr)); gap: 12px; align-items: center; border-bottom: 1px solid var(--line); }
.score-breakdown-item:last-child { border-bottom: 0; }
.score-breakdown-item > strong { color: var(--navy); }
.score-breakdown-item span { color: var(--muted); font-size: 13px; }
.score-breakdown-item b { color: var(--accent-dark); }
.completion-note { margin-top: 18px; padding: 18px; border-radius: var(--radius); background: var(--success-soft); color: #235f4b; }
.gcsc-summary { margin-top: 18px; padding: 20px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fff; }
.gcsc-summary h2 { margin: 0 0 7px; color: var(--navy); }
.gcsc-summary > p { margin: 0 0 12px; color: var(--muted); }
.gcsc-summary > div { padding: 11px 0; display: grid; grid-template-columns: 130px minmax(0,1fr); gap: 12px; border-top: 1px solid var(--line); color: var(--muted); line-height: 1.65; }
.gcsc-summary > div strong { color: var(--accent-dark); }
.learning-data-list { display: grid; gap: 7px; }
.learning-data-item { padding: 11px 12px; display: grid; grid-template-columns: minmax(0,1fr) auto 36px; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.learning-data-item strong { color: var(--navy); }
.learning-data-item span { color: var(--muted); font-size: 12px; }
.learning-data-item b { color: var(--accent-dark); text-align: right; }

.modal-backdrop { position: fixed; inset: 0; padding: 18px; display: grid; place-items: center; background: rgba(12,36,47,.52); z-index: 100; backdrop-filter: blur(5px); }
.modal-backdrop[hidden] { display: none; }
.modal-panel { width: min(660px, 100%); max-height: min(780px, 90dvh); overflow: auto; border: 1px solid rgba(255,255,255,.5); border-radius: 20px; background: #fff; box-shadow: 0 30px 80px rgba(8,32,43,.25); animation: modal-in .25s ease both; }
.modal-backdrop.orientation-warning,
.modal-backdrop.orientation-correction { background: rgba(12,36,47,.18); backdrop-filter: none; }
.orientation-warning .modal-panel,
.orientation-correction .modal-panel { width: min(520px, calc(100vw - 28px)); border-color: #efc48f; background: #fff8ee; box-shadow: 0 20px 54px rgba(83,53,22,.18); }
.orientation-warning .modal-header,
.orientation-correction .modal-header { border-bottom-color: #efd8b9; }
.orientation-warning .modal-header h2,
.orientation-correction .modal-header h2 { color: #7a491d; }
.orientation-warning #modalClose,
.orientation-correction #modalClose { display: none; }
.orientation-knowledge-modal .modal-panel { width: min(720px, 100%); }
.gcsc-notice-modal .modal-panel { width: min(760px, 100%); }
.gcsc-notice-grid { display: grid; gap: 10px; }
.gcsc-notice-grid p { margin: 0; display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 10px; align-items: start; }
.gcsc-notice-grid strong { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: var(--accent-dark); }
.gcsc-notice-grid span { padding-top: 3px; }
.gcsc-notice-features { margin-top: 18px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); }
.gcsc-notice-features > strong { color: var(--navy); }
.gcsc-notice-features ol { margin: 8px 0 0; padding-left: 22px; }
.gcsc-notice-features li + li { margin-top: 4px; }
.orientation-demo-modal .modal-panel { width: min(920px, 100%); }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
.modal-header { padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0; color: var(--navy); font-size: 21px; }
.modal-body { padding: 20px; color: var(--muted); line-height: 1.75; }
.modal-body p:first-child { margin-top: 0; }
.modal-body p:last-child { margin-bottom: 0; }
.demo-steps { display: grid; gap: 10px; }
.demo-steps div { padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.demo-steps strong { display: block; color: var(--navy); margin-bottom: 5px; }
.orientation-demo-player { display: grid; gap: 12px; }
.demo-media-wrap { display: grid; grid-template-columns: minmax(240px,.8fr) minmax(280px,1.2fr); gap: 12px; align-items: stretch; }
.demo-media-wrap video { display: block; width: 100%; min-height: 180px; border-radius: 13px; object-fit: cover; background: #d7e9ef; }
.demo-status { padding: 17px; display: flex; flex-direction: column; justify-content: center; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-blue); }
.demo-status strong { margin-bottom: 7px; color: var(--navy); font-size: 19px; }
.demo-status span { color: var(--muted); line-height: 1.65; }
.demo-progress { height: 5px; overflow: hidden; border-radius: 999px; background: var(--line); }
.demo-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width .45s cubic-bezier(.16,1,.3,1); }
.demo-step-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.demo-step { position: relative; min-height: 88px; padding: 11px 12px; display: grid; grid-template-columns: 27px minmax(0,1fr); gap: 9px; align-items: start; border: 1px solid var(--line); border-radius: 12px; background: #fff; transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.demo-step-index { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; color: var(--accent-dark); background: var(--accent-soft); font-size: 11px; font-weight: 800; }
.demo-step strong { display: block; color: var(--navy); font-size: 13px; }
.demo-step p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.demo-step.active { border-color: var(--accent); background: #f1fafc; transform: translateY(-1px); }
.demo-step.complete { border-color: #8abfa9; background: var(--success-soft); }
.demo-step.complete .demo-step-index { color: #fff; background: var(--success); }
.demo-gesture { position: absolute; right: 9px; top: 8px; padding: 4px 6px; border-radius: 7px; color: #fff; background: var(--accent-dark); font-size: 9px; opacity: 0; transform: translateY(4px); pointer-events: none; }
.demo-step.active .demo-gesture { opacity: 1; transform: translateY(0); }
.modal-actions { padding: 0 20px 20px; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }

.toast-region { position: fixed; top: 82px; right: 24px; z-index: 80; display: grid; gap: 8px; pointer-events: none; }
.toast { max-width: 360px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); box-shadow: var(--shadow-soft); animation: toast-in .28s ease both; }
.toast.success { border-color: #7bb39f; background: var(--success-soft); color: #245f4c; }
.toast.warning { border-color: #e0b988; background: var(--warning-soft); color: #774819; }
.toast.error { border-color: #daa1a6; background: var(--danger-soft); color: #79363b; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.empty-state { min-height: 280px; display: grid; place-items: center; text-align: center; }
.empty-state strong { display: block; margin-bottom: 8px; color: var(--navy); font-size: 22px; }
.empty-state p { margin: 0; color: var(--muted); }
.muted { color: var(--muted); }
.success-text { color: var(--success); }
.danger-text { color: var(--danger); }
.spacer-top { margin-top: 18px; }
.spacer-bottom { margin-bottom: 18px; }
.align-end { display: flex; justify-content: flex-end; }

@media (max-width: 1180px) {
  .intro-layout { grid-template-columns: 1fr; }
  .operation-notes { grid-template-columns: repeat(3,1fr); }
  .intro-overview-page .operation-notes { grid-column: 1; grid-template-columns: 1fr; }
  .gcsc-home-card { grid-column: 1; width: min(520px, 100%); justify-self: end; }
  .visual-grid { grid-template-columns: repeat(3,1fr); }
  .patient-stage { grid-template-columns: 1fr; }
  .patient-video { height: 280px; }
}

@media (max-width: 920px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; width: min(310px, 88vw); transform: translateX(-104%); transition: transform .28s ease; box-shadow: 20px 0 50px rgba(7,29,39,.22); }
  .sidebar.open { transform: translateX(0); }
  .menu-button { display: inline-flex; }
  .page-stage { padding: 24px 18px; }
  .simulation-grid, .scenario-layout, .risk-summary, .emergency-grid { grid-template-columns: 1fr; }
  .toolbox { order: -1; }
  .theory-layout { grid-template-columns: 1fr; }
  .theory-tabs { position: static; display: flex; overflow-x: auto; }
  .theory-tab { flex: 0 0 auto; width: auto; }
  .topbar-actions .speed-control { display: none; }
}

@media (max-width: 680px) {
  .topbar { height: 64px; padding: 0 12px; }
  .topbar-actions { gap: 5px; }
  .topbar-actions .control-button { padding: 8px 10px; font-size: 12px; }
  #dataButton { display: none; }
  .page-stage { min-height: calc(100dvh - 64px); }
  .page-heading h1 { font-size: 29px; }
  .intro-copy h1 { font-size: 33px; }
  .operation-notes { grid-template-columns: 1fr; }
  .visual-grid, .fact-grid, .risk-grid, .target-grid, .report-grid, .family-grid, .flow-layout { grid-template-columns: 1fr; }
  .human-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .human-list { padding: 10px; }
  .human-list h2 { font-size: clamp(16px, 4.6vw, 21px); line-height: 1.35; }
  .human-item { padding: 10px; display: grid; align-content: center; gap: 4px; font-size: 13px; }
  .human-item small { font-size: 10px; }
  .visual-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; }
  .visual-card { flex: 0 0 78vw; scroll-snap-align: start; }
  .patient-stage { padding: 12px; }
  .patient-video { height: 220px; }
  .scene-head { align-items: flex-start; flex-direction: column; }
  .mode-strip { align-items: stretch; }
  .mode-button { flex: 1 1 120px; }
  .case-switch { width: 100%; }
  .case-button { flex: 1; }
  .tool-list { grid-template-columns: 1fr 1fr; }
  .severity-grid { grid-template-columns: 1fr; }
  .record-head { flex-direction: column; }
  .orientation-flow-hint { align-items: stretch; flex-direction: column; }
  .orientation-flow-hint .soft-button { width: 100%; }
  .demo-media-wrap, .demo-step-list { grid-template-columns: 1fr; }
  .demo-media-wrap video { min-height: 0; aspect-ratio: 16 / 10; }
  .scenario-audio-player { min-height: 190px; }
  .score-hero { grid-template-columns: 1fr; text-align: center; }
  .total-score { margin: 0 auto; }
  .score-breakdown { overflow-x: auto; }
  .button-row > button { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* 竖屏与窄屏覆盖，桌面端保留病房主场景和右侧评估工具箱双栏布局 */
@media (max-width: 920px) {
  :root {
    --radius: 15px;
    --sidebar: 86vw;
  }

  body {
    min-width: 0;
    overflow-x: hidden;
    background: linear-gradient(180deg, #f7fcfd 0%, #eef7fb 100%);
  }

  button:not(.mobile-audio-button) {
    border-radius: 15px;
  }

  .app-shell {
    display: block;
    min-height: 100dvh;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(86vw, 340px);
    height: 100dvh;
    padding: 18px 14px max(18px, env(safe-area-inset-bottom));
    transform: translateX(-104%);
    transition: transform .28s ease;
    box-shadow: 18px 0 50px rgba(7,29,39,.24);
  }

  .sidebar.open { transform: translateX(0); }
  .brand { padding-bottom: 8px; }
  .course-progress { padding: 12px; }
  #courseNav { gap: 6px; }
  .nav-item {
    min-height: 46px;
    grid-template-columns: 28px minmax(0,1fr) auto;
    padding: 10px;
  }

  .main-shell {
    width: 100%;
    min-width: 0;
  }

  .topbar {
    height: auto;
    min-height: 58px;
    padding: max(8px, env(safe-area-inset-top)) 10px 8px;
    gap: 8px;
    display: flex;
    align-items: center;
  }

  .menu-button {
    display: inline-flex;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
  }

  .breadcrumb {
    font-size: 14px;
    padding-right: 0;
  }

  .topbar-actions {
    display: none;
  }

  .speed-control {
    display: none;
  }

  .control-button,
  .icon-button {
    min-height: 40px;
    padding: 8px 10px;
    font-size: 12px;
  }

  #dataButton {
    display: none;
  }

  #audioButton {
    display: none !important;
  }

  .mobile-audio-button {
    position: fixed;
    left: calc(min(100vw, 390px) - 70px);
    right: auto;
    bottom: max(14px, env(safe-area-inset-bottom));
    z-index: 90;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    min-height: 48px;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: var(--accent-dark);
    background: transparent;
    box-shadow: none;
  }

  .mobile-audio-button:hover,
  .mobile-audio-button:active {
    border: 0;
    background: transparent;
  }

  .mobile-audio-button .speaker-icon,
  .mobile-audio-button .pause-icon {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
  }

  .mobile-audio-button .pause-icon {
    display: none;
  }

  .mobile-audio-button[data-audio-state="playing"] .speaker-icon {
    display: none;
  }

  .mobile-audio-button[data-audio-state="playing"] .pause-icon {
    display: block;
  }

  .page-stage {
    min-height: calc(100dvh - 58px);
    padding: 16px 12px max(86px, env(safe-area-inset-bottom));
  }

  .page-frame {
    max-width: none;
    width: 100%;
  }

  .page-heading {
    margin-bottom: 16px;
  }

  .page-heading h1,
  .intro-copy h1,
  .intro-brief-card h1 {
    font-size: clamp(25px, 8vw, 34px);
    line-height: 1.18;
  }

  .intro-brief-card {
    order: -2;
    padding: 18px;
    border-radius: 20px;
  }

  .intro-brief-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .intro-flow-steps {
    grid-template-columns: 1fr;
  }

  .page-heading p,
  .section-copy,
  .intro-script p,
  .intro-brief-card .lead,
  .intro-copy .lead {
    font-size: 14px;
    line-height: 1.72;
  }

  .primary-button,
  .secondary-button,
  .soft-button,
  .danger-button,
  .answer-option,
  .choice-button,
  .measure-button,
  .flow-card,
  .stage-button,
  .search-zone,
  .emergency-tool,
  .tool-item,
  .severity-button,
  .question-action,
  .check-button,
  .case-button {
    min-height: 46px;
    font-size: 14px;
  }

  .button-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .button-row > button,
  .modal-actions > button {
    width: 100%;
  }

  .intro-layout,
  .theory-layout,
  .simulation-grid,
  .risk-summary,
  .scenario-layout,
  .flow-layout,
  .emergency-grid,
  .score-hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .intro-layout {
    min-height: 0;
    align-items: start;
  }

  .intro-media {
    order: -1;
    border-radius: 18px;
    padding: 6px;
  }

  .intro-media video {
    aspect-ratio: 16 / 11;
  }

  .media-controls {
    position: static;
    margin-top: 8px;
    display: grid;
    grid-template-columns: 1fr;
  }

  .media-caption {
    max-width: none;
    color: var(--muted);
    background: rgba(255,255,255,.88);
  }

  .play-chip {
    color: var(--navy);
    background: #fff;
    border-color: var(--line-strong);
  }

  .target-strip,
  .intro-entry-panel,
  .theory-audio-panel,
  .theory-audio-controls,
  .unlock-grid {
    grid-template-columns: 1fr;
  }

  .intro-entry-panel {
    padding: 14px;
  }

  .intro-action-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .section-title-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .pathology-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .operation-notes,
  .fact-grid,
  .risk-grid,
  .target-grid,
  .report-grid,
  .family-grid,
  .choice-buttons,
  .check-row,
  .tool-list,
  .severity-grid {
    grid-template-columns: 1fr;
  }

  .gcsc-home-card {
    width: 100%;
    padding: 15px;
  }

  .operation-notes-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .family-card,
  .selected-flow {
    min-height: 0;
  }

  .family-card { padding: 17px; }

  .pathology-progress,
  .risk-dimension-item,
  .gcsc-summary > div {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .pathology-progress p,
  .risk-dimension-item span,
  .gcsc-summary > div span {
    grid-column: 1 / -1;
  }

  .score-breakdown-item {
    grid-template-columns: 1fr 1fr;
  }

  .score-breakdown-item > strong {
    grid-column: 1 / -1;
  }

  .theory-tabs {
    position: static;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px;
    scroll-snap-type: x mandatory;
  }

  .theory-tab {
    flex: 0 0 72vw;
    scroll-snap-align: start;
  }

  .visual-grid {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 4px;
  }

  .visual-card {
    flex: 0 0 82vw;
    min-height: 210px;
    scroll-snap-align: start;
  }

  .pathology-grid {
    display: grid;
    grid-template-columns: 1fr;
    overflow: visible;
    scroll-snap-type: none;
  }

  .pathology-grid .visual-card {
    flex: initial;
  }

  .visual-card img,
  .visual-card video {
    height: 132px;
  }

  .quiz-shell {
    max-width: none;
  }

  .quiz-meta {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .question-panel,
  .panel-pad,
  .task-panel,
  .search-board,
  .toolbox,
  .selected-flow,
  .human-list {
    padding: 15px;
  }

  .patient-stage {
    padding: 10px;
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .patient-video {
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 10;
    object-fit: cover;
  }

  .scene-head {
    flex-direction: column;
    align-items: stretch;
    padding: 13px;
  }

  .case-switch,
  .mode-strip,
  .search-zones {
    display: grid;
    grid-template-columns: 1fr;
  }

  .drop-zone,
  .scenario-drop-zone,
  .emergency-drop,
  .search-order {
    min-height: 76px;
  }

  .mini-score-table,
  .score-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }

  .mini-score-table th,
  .mini-score-table td,
  .score-table th,
  .score-table td {
    padding: 10px 7px;
    overflow-wrap: anywhere;
  }

  .orientation-records,
  .score-breakdown,
  .modal-body {
    overflow-x: auto;
  }

  .comparison-grid {
    grid-template-columns: 1fr;
  }

  .mnemonic-poster {
    padding: 26px 16px;
    border-radius: 18px;
  }

  .mnemonic-line {
    font-size: clamp(22px, 7vw, 31px);
    line-height: 1.65;
  }

  .total-score {
    width: 136px;
    height: 136px;
    margin: 0 auto;
  }

  .total-score strong {
    font-size: 44px;
  }

  .modal-backdrop {
    padding: 10px;
    align-items: end;
  }

  .modal-panel {
    width: 100%;
    max-height: 88dvh;
    border-radius: 18px 18px 0 0;
  }

  .modal-header {
    padding: 14px;
  }

  .modal-body {
    padding: 16px;
  }

  .modal-actions {
    padding: 0 16px 16px;
    display: grid;
    grid-template-columns: 1fr;
  }

  .toast-region {
    top: auto;
    right: 10px;
    left: 10px;
    bottom: max(82px, env(safe-area-inset-bottom));
  }

  .toast {
    max-width: none;
    width: 100%;
  }
}

@media (max-width: 720px) {
  .human-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .human-list { min-width: 0; padding: 10px; }
  .human-list h2 { font-size: clamp(16px, 4.6vw, 21px); line-height: 1.35; }
  .human-item { min-width: 0; padding: 10px; display: grid; align-content: center; gap: 4px; font-size: 13px; }
  .human-item span { overflow-wrap: anywhere; }
  .human-item small { font-size: 10px; }
  .scenario-assessment-strip,
  .scenario-animation-grid { grid-template-columns: 1fr; }
  .scenario-assessment-strip { gap: 7px; }
  .scenario-assessment-strip > div { grid-template-columns: minmax(76px,.7fr) minmax(0,1fr); align-items: center; }
  .scenario-assessment-strip small { grid-column: 2; }
  .scenario-comparison-summary { display: grid; }
  .scenario-comparison-summary span { text-align: left; }
  .scenario-animation-stage { height: 190px; }
  .scenario-red-alert { inset: 16px 72px 16px 14px; }
}

@media print {
  body { background: #fff; }
  .sidebar, .topbar, .toast-region, .button-row, .modal-backdrop { display: none !important; }
  .app-shell { display: block; }
  .page-stage { padding: 0; }
  .panel { box-shadow: none; break-inside: avoid; }
}
