:root {
  color-scheme: dark;
  --ink: #0a1714;
  --ink-deep: #06100e;
  --panel: #10201c;
  --panel-light: #142722;
  --line: rgba(191, 224, 213, 0.14);
  --line-strong: rgba(191, 224, 213, 0.24);
  --mint: #84dbc6;
  --mint-bright: #b7f6e5;
  --mint-deep: #2e927d;
  --ivory: #f0eee6;
  --warm: #c7a477;
  --muted: #8ea39c;
  --text: #e7f0ec;
  --danger: #e6b3a6;
  --point-main: #f2c66d;
  --point-supplementary: #82b9ff;
  --header-height: 66px;
  --left-width: 276px;
  --right-width: 352px;
  font-family: "Noto Sans SC", system-ui, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body [hidden] { display: none !important; }

.point-detail-content { display: contents; }

.directory-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 3px;
  margin: -3px 0 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.directory-switch button {
  min-height: 33px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

.directory-switch button.is-active {
  background: rgba(132, 219, 198, 0.12);
  color: var(--mint-bright);
}

.directory-status,
.directory-result-heading {
  margin: 0;
  padding: 6px 4px 10px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

.directory-result-heading {
  grid-column: 1 / -1;
  padding-top: 14px;
  color: var(--warm);
  letter-spacing: .5px;
}

.condition-item-mark { font-family: inherit; font-size: 10px; }

.condition-retry,
.condition-exit,
.condition-return {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: transparent;
  color: var(--mint);
  font-size: 10px;
  cursor: pointer;
}

.condition-retry:hover,
.condition-exit:hover,
.condition-return:hover { background: rgba(132, 219, 198, .08); }
.condition-exit { min-height: 30px; color: #a3b7af; }
.condition-exit svg,
.condition-return svg { width: 13px; height: 13px; }
.condition-return { justify-content: flex-start; grid-column: 1 / -1; margin-bottom: 17px; }
.condition-detail { min-width: 0; grid-column: 1 / -1; }
.detail-panel.is-condition-detail { display: block; }

.condition-detail-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 10px;
}

.condition-detail h2 {
  margin: 8px 0 0;
  font-family: "Newsreader", "Noto Serif SC", serif;
  font-size: 34px;
  font-weight: 500;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.condition-aliases,
.condition-learning-note,
.condition-plan-note,
.condition-pairing-note,
.condition-muted,
.condition-point-note {
  margin: 8px 0 0;
  color: #91a79e;
  font-size: 10px;
  line-height: 1.75;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.condition-learning-note { margin-bottom: 21px; color: #748b81; }
.condition-selection-note { margin: 12px 0 0; padding: 9px 10px; border-left: 2px solid var(--point-main); background: rgba(242, 198, 109, .05); color: #cfb98a; font-size: 10px; line-height: 1.75; }
.condition-fold { border-top: 1px solid var(--line); }
.condition-fold:last-child { border-bottom: 1px solid var(--line); }
.condition-fold summary,
.condition-group-text summary {
  padding: 12px 0;
  color: #becfc7;
  font-size: 11px;
  line-height: 1.6;
  cursor: pointer;
}
.condition-fold summary:focus-visible,
.condition-group-text summary:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
.condition-fold p,
.condition-group-text p {
  margin: 0 0 15px;
  color: #9db3a9;
  font-size: 11px;
  line-height: 1.85;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.condition-treatment-heading {
  display: grid;
  gap: 8px;
  margin-top: 23px;
  color: var(--warm);
  font-size: 10px;
}
.condition-treatment-heading strong { color: var(--text); font-size: 13px; font-weight: 500; }
.condition-treatment-heading select,
.condition-supplementary-filter select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: #0c1b17;
  color: var(--text);
  font-size: 11px;
  cursor: pointer;
}
.condition-points-section { margin: 23px 0; }
.condition-points-section h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 500;
}
.role-label { display: inline-flex; align-items: center; gap: 6px; }
.role-label::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
[data-role="main"] { --point-role-color: var(--point-main); }
[data-role="supplementary"] { --point-role-color: var(--point-supplementary); }
.role-label { color: var(--point-role-color); }
.condition-heading-note { color: #81998e; font-size: 10px; font-weight: 400; }
.condition-point-list { display: grid; gap: 7px; }
.condition-point {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-height: 37px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--point-role-color);
  border-radius: 2px;
  background: rgba(0, 0, 0, .08);
  color: var(--point-role-color);
  text-align: left;
  font-size: 10px;
}
button.condition-point { cursor: pointer; }
button.condition-point:hover { background: rgba(255, 255, 255, .045); border-color: var(--point-role-color); }
.condition-point small { color: var(--point-role-color); font-size: 9px; }
.condition-point strong { font-size: 12px; font-weight: 500; }
.condition-point > span { color: #91a99c; font-size: 9px; }
.condition-point .condition-point-arrow { margin-left: auto; color: var(--point-role-color); font-size: 12px; }
.condition-point.is-local > span { flex-basis: 100%; margin-left: 26px; color: #b6a88a; }
.condition-point-note { margin: 4px 2px 0; font-size: 9px; }
.condition-pairing-note { margin-bottom: 12px; }
.condition-supplementary-filter { display: grid; gap: 6px; margin-bottom: 14px; color: #8ca498; font-size: 10px; }
.condition-supplementary-group { margin-top: 16px; }
.condition-supplementary-group h4 { margin: 0 0 8px; color: #a1c3e8; font-size: 11px; font-weight: 500; line-height: 1.75; }
.condition-group-text summary { padding: 7px 0; color: #7e998b; font-size: 9px; }
.condition-group-text p { font-size: 10px; }
.condition-source-page { margin: 0 0 18px; }
.condition-source-page img { display: block; width: 100%; height: auto; border: 1px solid var(--line-strong); }
.condition-source-page figcaption { margin-top: 7px; color: #90a69b; font-size: 9px; line-height: 1.7; }
.condition-source a { color: var(--mint); text-underline-offset: 3px; }
.condition-source-error { padding: 14px; border: 1px solid var(--line); }
.condition-stage-context { color: var(--point-main); font-size: 11px; line-height: 1.5; }
.condition-mode .overview-toolbar { align-items: flex-start; }
.condition-mode .overview-toolbar > p { max-width: 64%; line-height: 1.6; text-align: right; }
.legend-dot.main { color: var(--point-main); background: var(--point-main); }
.legend-dot.supplementary { color: var(--point-supplementary); background: var(--point-supplementary); }

.condition-local-notice {
  position: absolute;
  z-index: 5;
  top: 22%;
  left: 50%;
  width: min(280px, calc(100% - 40px));
  padding: 14px 16px;
  border: 1px solid rgba(242, 198, 109, .42);
  border-left: 2px solid var(--point-main);
  border-radius: 3px;
  background: rgba(8, 25, 18, .94);
  color: var(--point-main);
  transform: translateX(-50%);
  pointer-events: none;
}
.condition-local-notice strong { font-size: 14px; font-weight: 500; }
.condition-local-notice p { margin: 6px 0 0; color: #b9b198; font-size: 11px; line-height: 1.7; }

.condition-callout-pager {
  position: absolute;
  z-index: 7;
  bottom: 56px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: calc(100% - 24px);
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: rgba(8, 25, 18, .96);
  color: #b3c5bb;
  transform: translateX(-50%);
  pointer-events: auto;
}
.condition-callout-pager span { font-size: 9px; white-space: nowrap; }
.condition-callout-pager button { flex: 0 0 auto; min-width: 50px; min-height: 32px; padding-inline: 7px; white-space: nowrap; border: 1px solid var(--line); border-radius: 2px; background: transparent; color: var(--mint); font-size: 12px; cursor: pointer; }
.condition-callout-pager button:hover { background: rgba(132, 219, 198, .1); }
.condition-callout-pager button:disabled { opacity: .4; cursor: default; }

html {
  min-width: 320px;
  background: var(--ink-deep);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: var(--ink-deep);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}

.app-shell {
  min-height: 100svh;
  background: var(--ink);
}

.topbar {
  height: var(--header-height);
  display: grid;
  grid-template-columns: var(--left-width) 1fr var(--right-width);
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 16, 14, 0.96);
  position: relative;
  z-index: 20;
}

.brand {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 22px;
  color: var(--text);
  text-decoration: none;
  border-right: 1px solid var(--line);
}

.brand-mark {
  position: relative;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(132, 219, 198, 0.45);
  border-radius: 50%;
}

.brand-mark::before,
.brand-mark::after,
.brand-mark span {
  content: "";
  position: absolute;
  height: 1px;
  background: var(--mint);
  transform-origin: center;
}

.brand-mark::before {
  width: 20px;
  transform: rotate(90deg);
}

.brand-mark::after {
  width: 21px;
}

.brand-mark span:nth-child(1) {
  width: 17px;
  transform: rotate(45deg);
}

.brand-mark span:nth-child(2) {
  width: 17px;
  transform: rotate(-45deg);
}

.brand-mark span:nth-child(3) {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mint-bright);
  box-shadow: 0 0 12px var(--mint);
}

.brand-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-copy strong {
  font-family: "Newsreader", "Noto Serif SC", serif;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0;
}

.brand-copy small {
  font-size: 8px;
  letter-spacing: 1.7px;
  color: var(--muted);
  white-space: nowrap;
}

.topbar-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #9eb1ab;
  font-size: 12px;
}

.status-dot,
.live-mark {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 12px rgba(132, 219, 198, 0.8);
}

.divider {
  height: 12px;
  width: 1px;
  background: var(--line-strong);
  margin: 0 4px;
}

.topbar-actions {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 18px;
  border-left: 1px solid var(--line);
}

.icon-button {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, transform 180ms ease;
}

.icon-button:hover {
  color: var(--mint-bright);
  border-color: rgba(132, 219, 198, 0.5);
  background: rgba(132, 219, 198, 0.08);
}

.icon-button:active {
  transform: scale(0.96);
}

.icon-button svg,
.session-button svg,
.vr-primary svg,
.catalog-footer svg,
.stage-meta svg,
.availability svg,
.detail-note svg,
.medical-note svg,
.vr-text-button svg,
.vr-hint svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.7;
}

[data-tip] {
  position: relative;
}

[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translate(-50%, -2px);
  padding: 5px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: #172a25;
  color: var(--text);
  font-size: 10px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: 150ms ease;
  z-index: 100;
}

[data-tip]:hover::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.session-button {
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid rgba(132, 219, 198, 0.42);
  border-radius: 4px;
  background: var(--mint);
  color: #092018;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}

.session-button:hover {
  background: var(--mint-bright);
}

.session-button:active {
  transform: translateY(1px);
}

.workspace {
  height: calc(100svh - var(--header-height));
  display: grid;
  grid-template-columns: var(--left-width) minmax(420px, 1fr) var(--right-width);
  overflow: hidden;
}

.catalog-panel,
.detail-panel {
  background: var(--panel);
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(132, 219, 198, 0.2) transparent;
}

.catalog-panel {
  display: flex;
  flex-direction: column;
  padding: 26px 18px 18px;
  border-right: 1px solid var(--line);
}

.panel-heading {
  padding: 0 4px;
  margin-bottom: 19px;
}

.eyebrow,
.stage-index {
  margin: 0 0 5px;
  color: var(--warm);
  font-size: 9px;
  letter-spacing: 1.8px;
  font-weight: 700;
}

.panel-heading h1,
.stage-toolbar h2,
.point-title-wrap h2,
.help-content h2 {
  margin: 0;
  font-family: "Newsreader", "Noto Serif SC", serif;
  font-weight: 500;
  letter-spacing: 0;
}

.panel-heading h1 {
  font-size: 25px;
}

.search-box {
  height: 41px;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.12);
  color: var(--muted);
  transition: border-color 180ms ease;
}

.search-box:focus-within {
  border-color: rgba(132, 219, 198, 0.55);
}

.search-box svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 12px;
}

.search-box input::placeholder {
  color: #6f837d;
}

.search-box kbd {
  min-width: 20px;
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: #758b84;
  font: 10px/1.2 system-ui, sans-serif;
  text-align: center;
}

.channel-select-wrap {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
  color: #70867e;
  font-size: 9px;
  letter-spacing: 1.2px;
}

.channel-select-control {
  position: relative;
  display: block;
}

.channel-select-control select {
  width: 100%;
  height: 38px;
  padding: 0 34px 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  appearance: none;
  background: #0c1b17;
  color: #c8d7d2;
  font-size: 11px;
  letter-spacing: 0;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease;
}

.channel-select-control select:hover {
  border-color: rgba(132, 219, 198, 0.42);
  background: #10231e;
}

.channel-select-control svg {
  position: absolute;
  top: 50%;
  right: 11px;
  width: 14px;
  height: 14px;
  color: var(--mint);
  transform: translateY(-50%);
  pointer-events: none;
}

.view-switch button {
  height: 28px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #82968f;
  font-size: 10px;
  cursor: pointer;
  transition: 160ms ease;
}

.view-switch button:hover {
  color: var(--text);
}

.view-switch button.is-active {
  background: rgba(132, 219, 198, 0.13);
  color: var(--mint-bright);
}

.point-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  margin-right: -5px;
  padding-right: 5px;
}

.point-item {
  width: 100%;
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 10px;
  padding: 11px 8px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 170ms ease, padding 170ms ease;
}

.point-item:last-child {
  border-bottom: 1px solid var(--line);
}

.point-item:hover {
  background: rgba(255, 255, 255, 0.025);
}

.point-item.is-active {
  background: rgba(132, 219, 198, 0.08);
  padding-left: 12px;
}

.point-number {
  color: #5d756d;
  font-family: "Newsreader", serif;
  font-size: 15px;
}

.point-item.is-active .point-number {
  color: var(--mint);
}

.point-item-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.point-item-copy strong {
  font-size: 13px;
  font-weight: 600;
}

.point-item-copy small {
  overflow: hidden;
  color: #748a82;
  font-size: 9px;
  letter-spacing: 0.7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.point-item svg {
  width: 14px;
  height: 14px;
  color: #5f746d;
  opacity: 0;
  transform: translateX(-4px);
  transition: 170ms ease;
}

.point-item:hover svg,
.point-item.is-active svg {
  opacity: 1;
  transform: translateX(0);
}

.list-chevron {
  color: #5f746d;
  font-size: 17px;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 170ms ease, transform 170ms ease;
}

.point-item:hover .list-chevron,
.point-item.is-active .list-chevron {
  opacity: 1;
  transform: translateX(0);
}

.empty-state {
  margin: 18px 4px;
  color: #70867e;
  font-size: 11px;
  line-height: 1.7;
}

.catalog-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 4px 0;
  color: #71857e;
  font-size: 10px;
}

.body-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 22px 26px 16px;
  overflow: hidden;
  background:
    linear-gradient(rgba(132, 219, 198, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(132, 219, 198, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 50% 47%, rgba(35, 99, 82, 0.26), transparent 43%),
    #091713;
  background-size: 36px 36px, 36px 36px, auto, auto;
}

.stage-toolbar {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.stage-toolbar h2 {
  font-size: 23px;
}

.stage-switches {
  display: grid;
  grid-template-columns: 174px;
  gap: 5px 8px;
}

.view-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(5, 13, 11, 0.52);
}

.view-switch {
  width: 174px;
}


.view-switch button {
  height: 27px;
}

.point-placement,
.textbook-anatomy {
  margin: 12px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.textbook-anatomy summary { cursor: pointer; }
.textbook-anatomy p { margin: 8px 0 0; }
.textbook-scans figure { margin: 14px 0; }
.textbook-scans img { display: block; width: 100%; height: auto; background: #fff; }
.textbook-scans figcaption { margin-top: 6px; font-size: 10px; }
.textbook-scans figcaption a { display: inline-block; padding-block: 4px; color: var(--mint); text-decoration: underline; }

.textbook-reference { margin: 14px 0; }
.textbook-reference[hidden] { display: none; }
.textbook-reference img {
  display: block;
  width: min(100%, 220px);
  height: auto;
  border-radius: 4px;
  background: #fff;
}
.textbook-reference figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.figure-workspace {
  position: relative;
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
}

.overview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 1px 0 12px;
  min-height: 32px;
}
.overview-switch { display: inline-flex; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.overview-switch button { border: 0; border-bottom: 2px solid transparent; padding: 8px 10px; background: transparent; color: var(--muted); font-size: 11px; cursor: pointer; }
.overview-switch button.is-active { color: #f4de9c; border-bottom-color: #d4b96f; }
.overview-switch button:hover { color: var(--ivory); }
.overview-toolbar p { margin: 0; color: #92a69b; font-size: 10px; line-height: 1.5; }

@media (max-width: 1180px) and (min-width: 901px) {
  .overview-toolbar p { max-width: 130px; font-size: 9px; }
}
@media (max-width: 520px) {
  .overview-toolbar { align-items: center; gap: 10px; margin-bottom: 5px; }
  .overview-toolbar p { max-width: 143px; font-size: 9px; }
  .overview-switch button { padding-inline: 9px; }
}

.three-stage {
  position: absolute;
  inset: 0 0 31px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  animation: figure-enter 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

#bodyCanvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
  transition: opacity 180ms ease, filter 180ms ease;
}

.three-stage.is-switching #bodyCanvas {
  opacity: 0.46;
  filter: saturate(0.65);
}

#bodyCanvas:active {
  cursor: grabbing;
}

.three-loading {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 13px;
  background: rgba(7, 21, 17, 0.92);
  color: #8ca099;
  font-size: 11px;
  transition: opacity 320ms ease, visibility 320ms ease;
}

.three-loading p {
  margin: 0;
}

.three-loading.is-hidden {
  visibility: hidden;
  opacity: 0;
}

.three-loading.is-error {
  color: var(--danger);
}

.three-loading.is-error .loading-ring {
  border-color: rgba(230, 179, 166, 0.22);
  border-top-color: var(--danger);
  animation-duration: 1.8s;
}

.model-callout-lines,
.model-callouts {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  pointer-events: none;
}

.model-callout-lines { z-index: 3; overflow: hidden; }
.model-callout-lines path {
  fill: none;
  stroke: rgba(220, 197, 140, 0.68);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.model-callout-lines circle {
  fill: #f0d997;
  stroke: #0b211b;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}
.model-callout-lines .is-active path { stroke: #f9df9d; stroke-width: 1.4; }
.model-callout-lines .is-active circle { fill: #fff1c7; }

.model-callout {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 3px 7px;
  border: 0;
  border-bottom: 1px solid rgba(220, 197, 140, 0.24);
  border-radius: 0;
  background: rgba(7, 23, 18, 0.88);
  text-align: left;
  color: #efe8ce;
  cursor: pointer;
  pointer-events: auto;
  transition: background 160ms ease, color 160ms ease;
}
.model-callout[hidden] { display: none; }
.model-callout[data-side="left"] { text-align: right; align-items: flex-end; }
.model-callout strong { font-size: 14px; font-weight: 500; line-height: 1.25; white-space: nowrap; }
.model-callout span { font: 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; color: #9cae9f; letter-spacing: .3px; }
.model-callout:hover,
.model-callout:focus-visible { background: #193c30; color: #fff4c8; }
.model-callout.is-active { color: #fff2be; border-color: #ecd090; background: #203d30; }
.model-callout.is-active span { color: #e0c88f; }

.model-callout[data-role] {
  color: var(--point-role-color);
  border-color: var(--point-role-color);
}
.model-callout[data-role] span { color: var(--point-role-color); }
.model-callout[data-role]:hover,
.model-callout[data-role]:focus-visible,
.model-callout[data-role].is-active { color: var(--point-role-color); border-color: var(--point-role-color); }
.model-callout[data-role].is-active { box-shadow: inset 0 -1px var(--point-role-color); }
.model-callout-lines g[data-role] path { stroke: var(--point-role-color); }
.model-callout-lines g[data-role] circle { fill: var(--point-role-color); }
.model-callout-lines g[data-role].is-active path { stroke: var(--point-role-color); stroke-width: 1.8; }
.model-callout-lines g[data-role].is-active circle { fill: var(--point-role-color); }

.scene-tools {
  position: absolute;
  z-index: 6;
  bottom: 9px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
}

.scene-tools .icon-button {
  background: rgba(5, 18, 14, 0.78);
  backdrop-filter: blur(7px);
}

.scene-tools .icon-button.is-active {
  border-color: rgba(132, 219, 198, 0.52);
  background: rgba(132, 219, 198, 0.13);
  color: var(--mint-bright);
}

.scene-tools [data-tip]::after {
  top: auto;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translate(-50%, 2px);
}

.scene-tools [data-tip]:hover::after {
  transform: translate(-50%, 0);
}

.model-legend {
  position: absolute;
  z-index: 5;
  left: 0;
  bottom: 42px;
  display: flex;
  align-items: center;
  gap: 13px;
  color: #70867e;
  font-size: 8px;
}

.model-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  box-shadow: 0 0 9px currentColor;
}

.legend-line {
  width: 13px;
  height: 1px;
}

.legend-dot.mint { color: var(--mint); background: var(--mint); }
.legend-dot.warm { color: #ffd889; background: #ffd889; }
.legend-line.gold { background: #e9b96f; }

.stage-meta {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: #71877f;
  font-size: 9px;
}

.stage-meta span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.stage-meta .coordinate {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.8px;
}

.detail-panel {
  padding: 25px 26px 22px;
  border-left: 1px solid var(--line);
}

.detail-topline,
.progress-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #72877f;
  font-size: 9px;
  letter-spacing: 1.2px;
}

.availability {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--mint);
  letter-spacing: 0;
}

.availability.is-location-only {
  color: var(--warm);
}

.availability svg {
  width: 13px;
  height: 13px;
}

.point-title-wrap {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
}

.point-code {
  margin: 0 0 5px;
  color: var(--warm);
  font-size: 9px;
  letter-spacing: 1.4px;
}

.point-title-wrap h2 {
  font-size: 44px;
  line-height: 1;
}

.point-pinyin {
  margin: 7px 0 0;
  color: #7f938c;
  font-family: "Newsreader", serif;
  font-size: 13px;
  letter-spacing: 0.8px;
}

.channel-badge {
  margin-top: 17px;
  padding: 5px 8px;
  border: 1px solid rgba(199, 164, 119, 0.34);
  border-radius: 3px;
  color: #d4ba91;
  background: rgba(199, 164, 119, 0.06);
  font-size: 10px;
  white-space: nowrap;
}

.detail-rule {
  height: 1px;
  margin: 24px 0;
  background: linear-gradient(90deg, var(--mint-deep), var(--line) 45%, transparent);
}

.point-facts {
  display: grid;
  gap: 15px;
  margin: 0;
}

.point-facts div {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 12px;
}

.point-facts dt {
  color: #6e847c;
  font-size: 10px;
}

.point-facts dd {
  margin: 0;
  color: #c7d4d0;
  font-size: 11px;
  line-height: 1.65;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.detail-note {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  margin-top: 23px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.detail-note svg {
  margin-top: 2px;
  color: var(--mint);
}

.detail-note p {
  margin: 0;
  color: #93a8a1;
  font-size: 11px;
  line-height: 1.75;
}

.speech-guide {
  min-height: 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.speech-guide-copy {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.speech-guide-copy > span:last-child {
  min-width: 0;
}

.speech-guide-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: #789088;
  background: rgba(255, 255, 255, 0.025);
  transition: color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.speech-guide.is-active .speech-guide-mark {
  color: var(--mint-bright);
  border-color: rgba(132, 219, 198, 0.5);
  box-shadow: 0 0 18px rgba(132, 219, 198, 0.14);
}

.speech-guide.is-paused .speech-guide-mark {
  color: var(--warm);
  border-color: rgba(199, 164, 119, 0.42);
  box-shadow: none;
}

.speech-guide-mark svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.7;
}

.speech-guide-copy strong,
.speech-guide-copy small {
  display: block;
}

.speech-guide-copy strong {
  color: #cbd8d4;
  font-size: 11px;
  font-weight: 600;
}

.speech-guide-copy small {
  margin-top: 3px;
  overflow: hidden;
  color: #6f847d;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.speech-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.speech-control {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.025);
  color: #879b94;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.speech-control:hover:not(:disabled),
.speech-control.is-primary {
  color: var(--mint-bright);
  border-color: rgba(132, 219, 198, 0.46);
  background: rgba(132, 219, 198, 0.08);
}

.speech-control:disabled {
  color: #52655f;
  border-color: rgba(191, 224, 213, 0.1);
  background: transparent;
  cursor: not-allowed;
  opacity: 0.68;
}

.speech-control svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.8;
}

.speech-actions [data-tip]::after {
  top: auto;
  bottom: calc(100% + 8px);
}

.vr-primary {
  position: relative;
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  padding: 12px 14px;
  border: 1px solid rgba(132, 219, 198, 0.5);
  border-radius: 4px;
  overflow: hidden;
  background: var(--mint);
  color: #0a201a;
  text-align: left;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.vr-primary[hidden] {
  display: none;
}

.vr-primary::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 45%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.32), transparent);
  transform: skewX(-18deg);
  transition: left 480ms ease;
}

.vr-primary:hover {
  background: var(--mint-bright);
  box-shadow: 0 12px 35px rgba(26, 91, 74, 0.25);
  transform: translateY(-1px);
}

.vr-primary:hover::before {
  left: 130%;
}

.vr-primary:disabled {
  background: #6f8d84;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
}

.vr-primary:disabled::before {
  display: none;
}

.vr-primary > svg {
  justify-self: end;
}

.vr-primary-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(10, 32, 26, 0.22);
  border-radius: 50%;
}

.vr-primary-icon svg {
  width: 20px;
  height: 20px;
}

.vr-primary strong,
.vr-primary small {
  display: block;
}

.vr-primary strong {
  font-size: 13px;
}

.vr-primary small {
  margin-top: 3px;
  color: rgba(10, 32, 26, 0.64);
  font-size: 9px;
}

.progress-section {
  margin-top: 28px;
}

.progress-heading {
  color: #738a82;
  letter-spacing: 0;
  font-size: 10px;
}

.progress-heading strong {
  color: #a9bbb5;
  font-weight: 500;
}

.progress-track {
  height: 2px;
  margin-top: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.progress-track span {
  display: block;
  width: 12.5%;
  height: 100%;
  background: var(--mint);
  transition: width 400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.progress-section p {
  margin: 9px 0 0;
  color: #60756e;
  font-size: 9px;
  line-height: 1.6;
}

.medical-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 28px 0 0;
  color: #5f736c;
  font-size: 9px;
  line-height: 1.55;
}

.medical-note svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  margin-top: 1px;
}

.help-drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  grid-template-columns: 1fr minmax(320px, 420px);
  visibility: hidden;
  pointer-events: none;
}

.help-drawer.is-open {
  visibility: visible;
  pointer-events: auto;
}

.help-backdrop {
  border: 0;
  background: rgba(1, 8, 6, 0.58);
  opacity: 0;
  transition: opacity 260ms ease;
  cursor: default;
}

.help-content {
  position: relative;
  padding: 48px 40px;
  border-left: 1px solid var(--line-strong);
  background: #10201c;
  transform: translateX(100%);
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.help-drawer.is-open .help-backdrop { opacity: 1; }
.help-drawer.is-open .help-content { transform: translateX(0); }

.help-close {
  position: absolute;
  top: 20px;
  right: 20px;
}

.help-content h2 {
  font-size: 31px;
}

.help-content ol {
  list-style: none;
  margin: 38px 0 0;
  padding: 0;
}

.help-content li {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.help-content li > span {
  color: var(--warm);
  font-family: "Newsreader", serif;
  font-size: 16px;
}

.help-content li p {
  margin: 0;
  color: #899e97;
  font-size: 12px;
  line-height: 1.7;
}

.help-content li strong {
  display: block;
  color: var(--text);
  font-size: 13px;
}

.vr-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-rows: 68px minmax(0, 1fr) 62px;
  visibility: hidden;
  opacity: 0;
  background: #050b09;
  transform: scale(1.02);
  transition: opacity 260ms ease, transform 360ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0s 360ms;
}

.vr-layer.is-open {
  visibility: visible;
  opacity: 1;
  transform: scale(1);
  transition: opacity 260ms ease, transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.vr-header,
.vr-controls {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 22px;
  background: rgba(5, 13, 11, 0.95);
}

.vr-header {
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.vr-title {
  display: flex;
  align-items: center;
  gap: 13px;
}

.vr-title > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vr-title small {
  color: var(--warm);
  font-size: 8px;
  letter-spacing: 1.6px;
}

.vr-title strong {
  font-size: 13px;
  font-weight: 600;
}

.vr-header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.vr-text-button {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: transparent;
  color: #afc0bb;
  font-size: 10px;
  cursor: pointer;
}

.vr-close {
  color: #ddc2b9;
}

.vr-viewport {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: #07100e;
}

.vr-viewport a-scene,
.vr-viewport .a-canvas,
.fallback-video {
  width: 100% !important;
  height: 100% !important;
}

.fallback-video {
  display: none;
  object-fit: contain;
  background: #050807;
}

.vr-viewport.standard-mode a-scene {
  display: none;
}

.vr-viewport.standard-mode .fallback-video {
  display: block;
}

.vr-loading {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 13px;
  background: #07110e;
  color: #8ca099;
  font-size: 11px;
  transition: opacity 300ms ease, visibility 300ms ease;
}

.vr-loading.is-hidden {
  visibility: hidden;
  opacity: 0;
}

.loading-ring {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(132, 219, 198, 0.2);
  border-top-color: var(--mint);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.vr-hint {
  position: absolute;
  z-index: 7;
  left: 50%;
  bottom: 23px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 3px;
  background: rgba(4, 11, 9, 0.72);
  color: #c3d1cc;
  font-size: 10px;
  transform: translateX(-50%);
  backdrop-filter: blur(7px);
  transition: opacity 300ms ease;
}

.vr-controls {
  border-top: 1px solid var(--line);
}

.vr-play {
  color: var(--mint-bright);
}

.vr-timeline {
  flex: 1;
  height: 3px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.11);
}

.vr-timeline span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--mint);
}

.vr-time {
  min-width: 92px;
  color: #899b95;
  font: 10px ui-monospace, SFMono-Regular, Menlo, monospace;
  text-align: center;
}

.toast {
  position: fixed;
  z-index: 200;
  left: 50%;
  bottom: 24px;
  max-width: calc(100vw - 32px);
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #183028;
  color: var(--text);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: 220ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes figure-enter {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes hotspot-pulse {
  0% { opacity: 0.9; transform: scale(0.55); }
  70%, 100% { opacity: 0; transform: scale(1.7); }
}

@keyframes scan {
  0%, 100% { top: 17%; opacity: 0; }
  12% { opacity: 1; }
  50% { top: 76%; opacity: 0.7; }
  88% { opacity: 1; }
}

@keyframes slow-spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1120px) {
  :root {
    --left-width: 238px;
    --right-width: 310px;
  }

  .catalog-panel { padding-inline: 14px; }
  .detail-panel { padding-inline: 20px; }
  .body-stage { padding-inline: 18px; }
  .point-title-wrap h2 { font-size: 38px; }
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .app-shell {
    min-height: 100svh;
  }

  .topbar {
    position: sticky;
    top: 0;
    grid-template-columns: 1fr auto;
    padding-right: 10px;
  }

  .brand {
    border-right: 0;
  }

  .topbar-center,
  .session-button span {
    display: none;
  }

  .session-button {
    width: 38px;
    padding: 0;
    justify-content: center;
  }

  .topbar-actions {
    border-left: 0;
    padding: 0;
  }

  .workspace {
    height: auto;
    min-height: calc(100svh - var(--header-height));
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    overflow: visible;
  }

  .body-stage {
    order: 1;
    min-height: calc(100svh - var(--header-height));
    padding: 18px 18px 12px;
  }

  .catalog-panel {
    order: 3;
    padding: 24px 18px;
    border-top: 1px solid var(--line);
    border-right: 0;
  }

  .detail-panel {
    order: 2;
    padding: 28px 20px 36px;
    border-top: 1px solid var(--line);
    border-left: 0;
    scroll-margin-top: var(--header-height);
  }

  .point-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .point-item:nth-child(2) {
    border-top-color: var(--line);
  }

  .figure-workspace {
    min-height: 560px;
  }

  .detail-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
    column-gap: 32px;
  }

  .detail-topline,
  .point-title-wrap,
  .detail-rule,
  .point-facts,
  .point-placement,
  .textbook-reference,
  .textbook-anatomy,
  .detail-note,
  .speech-guide {
    grid-column: 1;
  }

  .vr-primary,
  .progress-section,
  .medical-note {
    grid-column: 2;
  }

  .vr-primary { grid-row: 1 / span 2; align-self: end; }
  .progress-section { grid-row: 3 / span 2; }
  .vr-primary[hidden] + .progress-section { grid-row: 1 / span 2; align-self: start; }
  .medical-note { grid-row: 5; }
}

@media (max-width: 640px) {
  :root {
    --header-height: 60px;
  }

  .brand {
    padding-left: 14px;
    gap: 9px;
  }

  .brand-mark {
    width: 27px;
    height: 27px;
  }

  .brand-copy strong {
    font-size: 17px;
  }

  .brand-copy small {
    font-size: 7px;
    letter-spacing: 1.1px;
  }

  .topbar-actions {
    gap: 7px;
  }

  .icon-button,
  .session-button {
    width: 35px;
    height: 35px;
    flex-basis: 35px;
  }

  .body-stage {
    min-height: calc(100svh - var(--header-height));
    padding-inline: 13px;
  }

  .stage-toolbar h2 {
    font-size: 20px;
  }

  .stage-toolbar {
    gap: 10px;
  }

  .stage-switches {
    grid-template-columns: 144px;
    justify-items: end;
    gap: 5px;
  }

  .view-switch {
    width: 144px;
  }



  .figure-workspace {
    margin-top: 2px;
  }

  .figure-workspace {
    min-height: min(72svh, 620px);
  }

  .stage-meta {
    font-size: 8px;
  }

  .stage-meta .coordinate {
    display: none;
  }

  .scene-tools { bottom: 8px; }

  .scene-tools [data-tip]::after {
    display: none;
  }

  .model-legend {
    left: 2px;
    gap: 9px;
  }

  .model-callout { padding-inline: 5px; }
  .model-callout strong { font-size: 13px; }
  .model-callout span { font-size: 9px; }

  .point-list {
    grid-template-columns: 1fr;
  }

  .detail-panel {
    display: block;
  }

  .point-title-wrap h2 {
    font-size: 40px;
  }

  .vr-primary,
  .progress-section,
  .medical-note {
    margin-top: 22px;
  }

  .speech-control {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .help-drawer {
    grid-template-columns: 1fr;
  }

  .help-backdrop {
    display: none;
  }

  .help-content {
    padding: 56px 24px 32px;
  }

  .vr-layer {
    grid-template-rows: 60px minmax(0, 1fr) 58px;
  }

  .vr-header,
  .vr-controls {
    padding-inline: 11px;
    gap: 7px;
  }

  .vr-title small,
  .vr-text-button span {
    display: none;
  }

  .vr-text-button {
    width: 35px;
    padding: 0;
    justify-content: center;
  }

  .vr-time {
    min-width: 72px;
    font-size: 8px;
  }
}

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