:root {
  color-scheme: light;
  --ink: #30483a;
  --muted: #677168;
  --paper: #faf8f2;
  --cream: #fffefa;
  --line: #d8dbd2;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 system-ui,sans-serif; }
button, a { font: inherit; touch-action: manipulation; }
.tp-page { width: min(100%,940px); margin: auto; padding: 22px 18px 150px; }
.back-link, .lesson-link { display: inline-block; color: #365a49; text-underline-offset: 4px; margin-bottom: 16px; }
.eyebrow { margin: 0 0 5px; color: #5e715e; font-size: 13px; font-weight: 750; letter-spacing: .12em; }
h1 { font: clamp(32px,6vw,48px)/1.08 Georgia,serif; margin: 5px 0 10px; }
.intro { max-width: 70ch; color: var(--muted); font-size: 18px; margin: 0 0 18px; }
.view-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin: 0 0 12px; }
.view-tabs button, .view-controls button, .landmark-list button { min-height: 45px; border: 1px solid #c6cec1; border-radius: 11px; padding: 8px 12px; background: #f4f6f0; color: var(--ink); cursor: pointer; }
.view-tabs button[aria-pressed="true"], .landmark-list button[aria-pressed="true"] { border-color: #536b59; background: #e7eee3; box-shadow: 0 0 0 2px #8a9b7e30; font-weight: 700; }
.viewer-card { background: var(--cream); border: 1px solid var(--line); border-left: 6px solid #8a9a86; border-radius: 20px; padding: clamp(14px,3vw,24px); box-shadow: 0 8px 26px #273e3010; }
.viewer-topline { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 14px; font-weight: 650; }
.viewer-topline[hidden] { display: none; }
.animation-figure { margin: 8px 0 0; }
.storyboard-control-row { display: grid; grid-template-columns: 44px minmax(0,1fr) 44px; align-items: center; gap: 8px; width: min(100%,480px); margin: 0 auto; }
.storyboard-control-row[hidden] { display: none; }
.storyboard-window { position: relative; width: min(100%,380px); aspect-ratio: 440/740; margin: 0 auto; overflow: hidden; border-radius: 15px; background: #f8f3ea; box-shadow: inset 0 0 0 1px #dedfd8; }
.storyboard-window.single-frame { aspect-ratio: 1156/1361; }
.storyboard-window.lateral-view { aspect-ratio: 1308/1194; }
.storyboard-window.face-view { width: min(100%,240px); aspect-ratio: 1/2; }
.storyboard-window img { position: absolute; left: 0; top: 0; width: 500%; height: 100%; max-width: none; object-fit: fill; transition: transform .55s cubic-bezier(.2,.8,.25,1); }
.storyboard-window img.single-frame { width: 100%; object-fit: fill; }
.anatomy-leader { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 2; }
.anatomy-leader line { stroke: #39483f; stroke-width: 2; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.anatomy-leader #target-halo { fill: #fffefa; stroke: #bd4742; stroke-width: 4; vector-effect: non-scaling-stroke; }
.anatomy-leader #target-dot { fill: #d34d46; stroke: #fffefa; stroke-width: 2; vector-effect: non-scaling-stroke; }
.anatomy-callout { position: absolute; z-index: 3; max-width: 46%; padding: 6px 10px; border: 1px solid #9eaa9b; border-radius: 10px; background: #fffefaef; color: #30483a; box-shadow: 0 2px 8px #263d3024; font: 700 clamp(12px,2.9vw,15px)/1.2 system-ui,sans-serif; text-align: center; pointer-events: none; }
.step-detail { margin: 10px 0 0; padding: 0; }
.step-heading-card { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 8px 11px; background: #f2f4ed; border-left: 3px solid #8a9a86; border-radius: 9px; }
.step-kicker { margin: 0; color: #607362; font-size: 10px; font-weight: 750; letter-spacing: .08em; }
.step-detail h2 { margin: 0; font: clamp(18px,3.4vw,23px)/1.15 Georgia,serif; }
#step-description { margin: 7px 2px 8px; color: #525d54; font-size: 14px; line-height: 1.4; }
.detail-pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
.detail-pair p { margin: 0; padding: 7px 9px; background: #fffefa; border: 1px solid #eceee7; border-radius: 8px; font-size: 12px; line-height: 1.35; }
.detail-pair strong, .detail-pair span { display: block; }
.detail-pair strong { font-size: 11px; color: #637162; margin-bottom: 2px; }
.view-controls { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 12px; }
.view-controls[hidden] { display: none; }
.view-controls .play-control { flex: 1; max-width: 260px; background: #e4ecdf; font-weight: 700; }
.image-arrow { position: static; display: grid; place-items: center; width: 44px; height: 44px; min-height: 44px; padding: 0; border: 1px solid #aeb8aa; border-radius: 50%; background: #f2f4ed; color: var(--ink); box-shadow: 0 2px 6px #1d30251f; font: 32px/1 Georgia,serif; cursor: pointer; }
.image-arrow:focus-visible { outline: 3px solid #536b59; outline-offset: 2px; }
.muscle-overview { margin-top: 14px; padding: 14px; border: 1px solid #d9ddcf; border-left: 4px solid #8a9a86; border-radius: 12px; background: #f7f7f1; }
.muscle-overview[hidden] { display: none; }
.muscle-overview h3 { margin: 0; font: 700 17px/1.3 system-ui,sans-serif; }
.muscle-intro { margin: 5px 0 10px; color: var(--muted); font-size: 14px; }
.muscle-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.muscle-facts > div { padding: 9px 10px; border: 1px solid #e5e8df; border-radius: 8px; background: #fffefa; font-size: 13px; line-height: 1.4; }
.muscle-facts strong, .muscle-facts span { display: block; }
.muscle-facts strong { margin-bottom: 3px; color: #526451; font-size: 12px; }
.muscle-objectives, .muscle-reading { margin: 10px 0 0; color: #58635a; font-size: 13px; line-height: 1.4; }
.landmark-panel { margin-top: 14px; padding: 15px 16px; background: #f8f8f3; border: 1px solid #e0e3da; border-radius: 13px; }
.landmark-panel h3 { font: 700 16px/1.3 system-ui,sans-serif; margin: 0; }
.label-help { color: var(--muted); margin: 4px 0 10px; font-size: 14px; }
.landmark-list { display: flex; flex-wrap: wrap; gap: 6px; }
.landmark-list button { min-height: 29px; padding: 3px 8px; border-radius: 9px; font-size: 13px; line-height: 1.2; }
.landmark-detail { margin-top: 11px; padding: 11px 13px; background: #fffefa; border-radius: 9px; border-left: 4px solid #8a9a86; }
.landmark-detail strong { display: block; }
.landmark-detail p { margin: 3px 0 0; color: #525d54; }
.landmark-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; margin: 7px 0 0; }
.landmark-facts[hidden] { display: none; }
.landmark-facts > div { min-width: 0; padding: 6px 8px; border: 1px solid #eceee7; border-radius: 7px; background: #f8f8f3; }
.landmark-facts dt { color: #637162; font-size: 10px; font-weight: 750; line-height: 1.2; }
.landmark-facts dd { margin: 2px 0 0; color: #34473a; font-size: 12px; line-height: 1.3; }
.landmark-facts .landmark-cue { grid-column: 1 / -1; border-color: #e5d5a5; background: #fbf5df; }
.landmark-cue dt { color: #806b32; }
.origin-insertion-note { grid-column: 1 / -1; margin: 0; padding: 2px 2px 0; color: #667168; font-size: 11px; line-height: 1.35; }
.study-note { color: var(--muted); font-size: 14px; margin: 14px 2px; }
.lesson-link { margin-top: 3px; font-weight: 650; }
.tongue-nerve-panel[hidden] { display: none; }
.inn-viewer-head { display:flex; justify-content:space-between; gap:8px; color:var(--muted); font-size:14px; font-weight:650; }
.inn-art-row { display:grid; grid-template-columns:44px minmax(0,1fr) 44px; align-items:center; gap:8px; width:min(100%,620px); margin:8px auto 0; }
.inn-stage { position:relative; width:min(100%,520px); aspect-ratio:2/3; margin:0 auto; overflow:hidden; border-radius:15px; background:#f8f3ea; box-shadow:inset 0 0 0 1px #dedfd8; }
.inn-stage img { display:block; width:100%; height:100%; object-fit:contain; }
.inn-overlay { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; overflow:visible; }
.inn-zone { fill:#dfe8d5; fill-opacity:.04; stroke:#fffdf7; stroke-opacity:0; stroke-width:6; transition:fill-opacity .35s,stroke-opacity .35s; }
.inn-zone-front { fill:#62a58f; }.inn-zone-back { fill:#a888b3; }
.inn-terminal-sulcus { fill:none; stroke:#fffdf7; stroke-opacity:.05; stroke-width:8; stroke-dasharray:13 10; filter:url(#inn-glow); transition:stroke-opacity .3s; }
.inn-foramen { fill:#fffefa; stroke:#b59450; stroke-width:4; opacity:.1; transition:opacity .3s; }
.inn-route { fill:none; opacity:.08; transition:opacity .35s; }
.inn-route path { fill:none; stroke:currentColor; stroke-width:12; stroke-linecap:round; stroke-linejoin:round; filter:url(#inn-glow); }
.inn-route circle { fill:#fff6c5; stroke:currentColor; stroke-width:6; filter:url(#inn-glow); }
.inn-route .inn-join-dot { fill:#fffefa; stroke-dasharray:5 4; }
.inn-route-v3 { color:#138488; }.inn-route-vii { color:#9564a0; }.inn-route-ix { color:#c38c2f; }.inn-route-x { color:#527a9d; }.inn-route-xii { color:#527958; }.inn-route-xii path:not(:first-child) { stroke-width:8; }
.inn-marker { font:700 24px system-ui,sans-serif; fill:#30483a; paint-order:stroke; stroke:#fffefa; stroke-width:8; stroke-linejoin:round; opacity:0; transition:opacity .25s; }
.inn-label-terminal,.inn-label-epiglottis { text-anchor:middle; }.inn-label-join { text-anchor:start; }
.inn-stage.scene-0 .inn-zone { fill-opacity:.22; stroke-opacity:.9; }.inn-stage.scene-0 .inn-terminal-sulcus { stroke-opacity:.95; }.inn-stage.scene-0 .inn-foramen { opacity:1; }.inn-stage.scene-0 .inn-label-terminal,.inn-stage.scene-0 .inn-label-epiglottis { opacity:1; }
.inn-stage.scene-1 .inn-zone-front { fill-opacity:.23; stroke-opacity:.8; }.inn-stage.scene-1 .inn-route-v3 { opacity:1; }
.inn-stage.scene-2 .inn-zone-front { fill-opacity:.2; stroke-opacity:.65; }.inn-stage.scene-2 .inn-route-vii { opacity:1; }.inn-stage.scene-2 .inn-route-v3 { opacity:.6; }.inn-stage.scene-2 .inn-label-join { opacity:1; }
.inn-stage.scene-3 .inn-zone-back { fill-opacity:.3; stroke-opacity:.8; }.inn-stage.scene-3 .inn-route-ix { opacity:1; }
.inn-stage.scene-4 .inn-zone-back { fill-opacity:.12; }.inn-stage.scene-4 .inn-route-x { opacity:1; }.inn-stage.scene-4 .inn-label-epiglottis { opacity:1; }
.inn-stage.scene-5 .inn-zone { fill-opacity:.08; stroke-opacity:.25; }.inn-stage.scene-5 .inn-route-xii { opacity:1; }
.inn-copy { margin:10px 0 0; text-align:center; }.inn-step-count { margin:0; color:var(--muted); font-size:11px; font-weight:750; letter-spacing:.09em; }
.inn-copy h2 { margin:4px 0; font:clamp(20px,4vw,28px)/1.15 Georgia,serif; }.inn-copy>p:not(.inn-step-count) { max-width:64ch; margin:6px auto 0; color:#525d54; font-size:14px; }
.inn-exam-cue { padding:8px 10px; border:1px solid #eee2bf; border-radius:9px; background:#fbf5e4; }
.inn-legend { display:flex; flex-wrap:wrap; justify-content:center; gap:6px; margin:12px 0; }.inn-legend span { padding:4px 8px; border:1px solid #d6ded2; border-radius:999px; background:#f2f4ed; color:#46564b; font-size:11px; font-weight:700; }
.inn-legend .v3 { border-color:#13848866; }.inn-legend .vii { border-color:#9564a066; }.inn-legend .ix { border-color:#c38c2f66; }.inn-legend .x { border-color:#527a9d66; }.inn-legend .xii { border-color:#52795866; }
.inn-steps { display:flex; justify-content:center; gap:7px; margin-top:8px; }.inn-steps button { width:28px; height:30px; border:1px solid #c6cec1; border-radius:8px; background:#e9efe7; cursor:pointer; }.inn-steps button[aria-current=step] { background:#526b57; border-color:#526b57; box-shadow:inset 0 0 0 7px #e9efe7; }
.inn-accuracy-note { margin:10px 0 0; color:#69736a; font-size:11px; line-height:1.4; text-align:center; }
.view-controls button:focus-visible, .view-tabs button:focus-visible, .landmark-list button:focus-visible { outline: 3px solid #536b59; outline-offset: 2px; }
@media (max-width:560px) {
  .tp-page { padding: 18px 14px 145px; }
  .view-tabs { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
  .view-tabs button { min-height: 40px; padding: 6px 5px; font-size: 12px; line-height: 1.2; }
  .storyboard-control-row { grid-template-columns: 40px minmax(0,1fr) 40px; gap: 5px; width: 100%; }
  .storyboard-window { width: min(100%,280px); }
  .storyboard-window.face-view { width: min(100%,190px); }
  .inn-art-row { grid-template-columns:38px minmax(0,1fr) 38px; gap:4px; width:100%; }
  .inn-stage { width:100%; }
  .inn-marker { font-size:21px; }
  .inn-copy>p:not(.inn-step-count) { font-size:13px; }
  .inn-legend { gap:5px; }.inn-legend span { font-size:10px; }
  .inn-steps { gap:5px; }.inn-steps button { width:26px; height:28px; }
  .image-arrow { width: 40px; height: 40px; min-height: 40px; }
  .muscle-overview { padding: 11px; }
  .muscle-facts { grid-template-columns: 1fr; gap: 5px; }
  .muscle-facts > div { padding: 8px; }
  .detail-pair { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; }
  #step-description { font-size: 13px; }
  .step-heading-card { gap: 3px 8px; padding: 7px 9px; }
  .landmark-panel { padding: 11px; }
  .landmark-list { gap: 5px; }
  .landmark-list button { min-height: 27px; padding: 3px 7px; font-size: 12px; }
  .landmark-detail { padding: 9px 10px; }
  .landmark-facts { gap: 4px; }
  .landmark-facts > div { padding: 5px 6px; }
  .landmark-facts dd { font-size: 11px; }
}
@media (prefers-reduced-motion:reduce) { .storyboard-window img { transition: none; } }
@media (prefers-reduced-motion:reduce) { .inn-route circle { display:none; } }
