/* style */

:root {
  --bg-ivory: #f2ede1;
  --bg-ivory-soft: #f4f0e5;
  --bg-ivory-vignette: #eae3d4;

  --ink-primary: #26231e;
  --ink-secondary: #676157;
  --ink-muted: #928a7d;

  --surface-pill: rgba(252, 249, 243, 0.78);
  --surface-pill-hover: rgba(255, 253, 249, 0.94);
  --surface-pill-active: #27241f;
  --text-pill-active: #faf7f0;
  --surface-card: rgba(253, 250, 244, 0.91);

  --border-hairline: rgba(38, 35, 30, 0.085);
  --border-strong: rgba(38, 35, 30, 0.17);
  --shadow-pill: 0 10px 28px rgba(48, 39, 24, 0.065), 0 1px 2px rgba(48, 39, 24, 0.04);
  --shadow-card: 0 22px 54px rgba(48, 39, 24, 0.115), 0 2px 8px rgba(48, 39, 24, 0.045);

  --accent: #b5883d;
  --accent-soft: rgba(181, 136, 61, 0.13);
  --accent-ring: rgba(181, 136, 61, 0.38);

  --artery: #c97872;
  --vein: #5c7a99;
  --meridian-gold: #b5883d;
  --meridian-teal: #4c9184;
  --pathology-terra: #d49a6a;
  --aging-slate: #7c93a3;

  --track-fill: #b5883d;
  --split-left-color: #cfa045;
  --split-right-color: #268472;
  --leader-stroke: rgba(54, 49, 41, 0.44);
  --leader-stroke-active: rgba(181, 136, 61, 0.92);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--ink-primary);
  background: radial-gradient(
    ellipse 78% 76% at 50% 45%,
    var(--bg-ivory) 0%,
    var(--bg-ivory) 62%,
    var(--bg-ivory-vignette) 100%
  );
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

body.turntable-active:not(.split-active) .museum-stage {
  cursor: grab;
  touch-action: none;
}

body.is-zoomed:not(.turntable-active) .museum-stage {
  cursor: grab;
  touch-action: none;
}

body.is-dragging-turntable .museum-stage,
body.is-dragging-turntable,
body.is-panning-stage .museum-stage,
body.is-panning-stage {
  cursor: grabbing !important;
}

/* style */
.museum-stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.specimen-camera {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: 50% 50%;
  will-change: transform;
}

.specimen-plane {
  position: relative;
  width: var(--plane-w, 540px);
  height: var(--plane-h, 723px);
  flex-shrink: 0;
  overflow: visible;
}

.media-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 10%, #000 90%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 6%, #000 94%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0%, #000 10%, #000 90%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 6%, #000 94%, transparent 100%);
  mask-composite: intersect;
}

.video-mount {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.media-item {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.media-item.is-visible {
  opacity: 1;
}

.fallback-blend {
  z-index: 2;
  transition: none;
}

.scrub-video {
  z-index: 3;
  background: transparent;
}

.split-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

body.split-active .split-layer {
  opacity: 1;
}

.split-img-left {
  opacity: 1;
  z-index: 1;
}

.split-img-right {
  opacity: 1;
  z-index: 2;
  clip-path: inset(0 0 0 calc(var(--split-pos, 0.5) * 100%));
  -webkit-clip-path: inset(0 0 0 calc(var(--split-pos, 0.5) * 100%));
}

/* style */
.overlay-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 6;
}

.vessels-svg,
.mechanism-svg,
.leader-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

/* style */
.mech-path-glow {
  fill: none;
  stroke-width: 5.5;
  stroke-linecap: round;
  opacity: 0.22;
}

.mech-path-line {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

.mech-path-line.is-dashed {
  stroke-dasharray: 8 6;
}

.mech-path-line.is-animated {
  stroke-dasharray: 9 7;
  animation: v2FlowDash 1.75s linear infinite;
}

.mech-break-x {
  fill: none;
  stroke: #b84a3c;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.mech-break-halo {
  fill: rgba(253, 248, 244, 0.92);
  stroke: rgba(184, 74, 60, 0.55);
  stroke-width: 1.4;
}

.mech-leader {
  fill: none;
  stroke: rgba(68, 56, 44, 0.48);
  stroke-width: 1;
  stroke-linecap: round;
}

.mechanism-callout-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.28s ease;
}

.mechanism-callout-layer.is-visible {
  opacity: 1;
}

.mech-anchor-dot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fffdf9;
  border: 2px solid var(--mech-color, #d49a6a);
  box-shadow: 0 0 0 4px rgba(212, 154, 106, 0.22), 0 2px 8px rgba(38, 35, 30, 0.16);
}

.mech-anchor-dot.is-block,
.mech-anchor-dot.is-break {
  width: 13px;
  height: 13px;
  background: rgba(253, 245, 242, 0.96);
  border-color: #c95c4e;
  box-shadow: 0 0 0 5px rgba(201, 92, 78, 0.22);
}

.mech-callout-pill {
  position: absolute;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4.5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(38, 35, 30, 0.10);
  background: rgba(253, 250, 244, 0.90);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 22px rgba(48, 39, 24, 0.085);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--ink-primary);
  white-space: nowrap;
}

.mech-pill-dot {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  background: var(--mech-color, #d49a6a);
  flex-shrink: 0;
}

/* style */
.vessel-artery-glow {
  fill: none;
  stroke: rgba(201, 120, 114, 0.25);
  stroke-width: 6.5;
  stroke-linecap: round;
}

.vessel-artery-flow {
  fill: none;
  stroke: var(--artery);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 10 8;
  animation: v2FlowDash 1.6s linear infinite;
}

.vessel-vein-glow {
  fill: none;
  stroke: rgba(92, 122, 153, 0.24);
  stroke-width: 6;
  stroke-linecap: round;
}

.vessel-vein-flow {
  fill: none;
  stroke: var(--vein);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 9 9;
  animation: v2FlowDash 2.0s linear infinite;
}

.vessel-meridian-glow {
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
  opacity: 0.20;
}

.vessel-meridian-flow {
  fill: none;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-dasharray: 6 6;
  animation: v2FlowDash 2.5s linear infinite;
}

@keyframes v2FlowDash {
  from { stroke-dashoffset: 36; }
  to { stroke-dashoffset: 0; }
}

.leader-line {
  fill: none;
  stroke: var(--leader-stroke);
  stroke-width: 1;
  stroke-linecap: round;
  transition: stroke 0.25s ease, stroke-width 0.25s ease, opacity 0.3s ease;
}

.leader-line.is-active {
  stroke: var(--leader-stroke-active);
  stroke-width: 1.35;
}

/* style */
.pathology-ring-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pathology-ring-layer.is-visible {
  opacity: 1;
}

.pathology-focus-ring {
  position: absolute;
  transform: translate(-50%, -50%);
  width: var(--ring-size, 76px);
  height: var(--ring-size, 76px);
  border-radius: 50%;
  border: 2px solid rgba(212, 154, 106, 0.88);
  background: radial-gradient(circle, rgba(212, 154, 106, 0.16) 0%, rgba(212, 154, 106, 0.03) 68%, transparent 100%);
  box-shadow: 0 0 24px rgba(212, 154, 106, 0.26);
}

.pathology-focus-ring::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px solid rgba(212, 154, 106, 0.65);
  animation: pathologyPulse 2.4s cubic-bezier(0.22, 0.61, 0.36, 1) infinite;
}

.pathology-focus-tag {
  position: absolute;
  left: 50%;
  top: -28px;
  transform: translateX(-50%);
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(253, 249, 243, 0.92);
  border: 1px solid rgba(212, 154, 106, 0.48);
  box-shadow: 0 6px 18px rgba(48, 39, 24, 0.08);
  font-size: 11px;
  font-weight: 500;
  color: #824d30;
  white-space: nowrap;
  letter-spacing: 0.04em;
}

@keyframes pathologyPulse {
  0% { transform: scale(0.92); opacity: 0.85; }
  75% { transform: scale(1.38); opacity: 0; }
  100% { transform: scale(1.38); opacity: 0; }
}

.anatomy-layer,
.acupoint-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.34s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.34s ease;
}

.anatomy-layer.is-visible,
.acupoint-layer.is-visible {
  opacity: 1;
  visibility: visible;
}

.anatomy-layer:not(.is-visible) button,
.acupoint-layer:not(.is-visible) button {
  pointer-events: none !important;
}

/* style */
.anatomy-anchor-dot {
  position: absolute;
  width: 24px;
  height: 24px;
  transform: translate(-50%, -50%);
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.anatomy-anchor-dot::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fffdf9;
  border: 1.5px solid rgba(48, 43, 36, 0.68);
  box-shadow: 0 2px 8px rgba(38, 35, 30, 0.18), 0 0 0 2.5px rgba(255, 253, 249, 0.58);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.24s ease, box-shadow 0.24s ease;
}

.anatomy-anchor-dot:hover::before,
.anatomy-anchor-dot.is-active::before {
  transform: scale(1.26);
  border-color: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft), 0 2px 10px rgba(181, 136, 61, 0.35);
}

.anatomy-label-btn {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--border-hairline);
  background: var(--surface-pill);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-pill);
  color: var(--ink-primary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.anatomy-label-btn .dot-mini {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fffdf9;
  border: 1.5px solid var(--ink-secondary);
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.anatomy-label-btn:hover,
.anatomy-label-btn.is-active {
  background: var(--surface-pill-hover);
  border-color: rgba(181, 136, 61, 0.55);
  box-shadow: 0 10px 26px rgba(181, 136, 61, 0.16), 0 1px 2px rgba(48, 39, 24, 0.05);
  transform: translate(-50%, -50%) translateY(-1px);
}

.anatomy-label-btn.is-active .dot-mini {
  background: var(--accent);
  border-color: var(--accent);
}

/* style */
.acupoint-halo {
  position: absolute;
  width: 28px;
  height: 28px;
  transform: translate(-50%, -50%);
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.acupoint-halo .halo-ring {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--bead-color, var(--accent));
  opacity: 0.72;
  animation: museumPulse 2.6s cubic-bezier(0.22, 0.61, 0.36, 1) infinite;
}

.acupoint-halo .halo-core {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fffdf9;
  border: 2px solid var(--bead-color, var(--accent));
  box-shadow: 0 0 10px rgba(181, 136, 61, 0.32);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), background 0.22s ease;
}

.acupoint-halo:hover .halo-core,
.acupoint-halo.is-active .halo-core {
  transform: scale(1.32);
  background: var(--bead-color, var(--accent));
  box-shadow: 0 0 0 4px rgba(255, 253, 249, 0.8), 0 0 16px rgba(181, 136, 61, 0.55);
}

.acupoint-halo.is-active .halo-ring {
  width: 24px;
  height: 24px;
  border-width: 1.75px;
  opacity: 0.95;
}

@keyframes museumPulse {
  0% { transform: scale(0.76); opacity: 0.85; }
  70% { transform: scale(1.68); opacity: 0; }
  100% { transform: scale(1.68); opacity: 0; }
}

.acupoint-pill {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-hairline);
  background: rgba(253, 250, 244, 0.84);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-pill);
  color: var(--ink-primary);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.acupoint-pill .ap-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bead-color, var(--accent));
  flex-shrink: 0;
}

.acupoint-pill .ap-code {
  font-size: 10px;
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0.03em;
}

.acupoint-pill:hover,
.acupoint-pill.is-active {
  background: rgba(255, 254, 251, 0.96);
  border-color: var(--bead-color, var(--accent));
  box-shadow: 0 8px 24px rgba(181, 136, 61, 0.20);
  transform: translate(-50%, -50%) scale(1.05);
}

.acupoint-pill.is-active .ap-code {
  color: var(--accent);
}

/* style */
.split-curtain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

body.split-active .split-curtain {
  opacity: 1;
  visibility: visible;
}

body:not(.split-active) .split-divider-line {
  pointer-events: none;
}

.split-divider-line {
  position: absolute;
  top: var(--split-top, 10%);
  height: var(--split-height, 74%);
  left: var(--split-x, 50%);
  width: 36px;
  transform: translateX(-50%);
  pointer-events: auto;
  cursor: ew-resize;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
}

.split-divider-line::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1.5px;
  transform: translateX(-50%);
  background: linear-gradient(
    to bottom,
    rgba(255, 253, 249, 0) 0%,
    rgba(255, 253, 249, 0.92) 12%,
    rgba(255, 253, 249, 0.96) 88%,
    rgba(255, 253, 249, 0) 100%
  );
  box-shadow: 0 0 10px rgba(38, 35, 30, 0.22);
}

.split-handle {
  position: relative;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 253, 249, 0.94);
  border: 1.5px solid rgba(181, 136, 61, 0.55);
  box-shadow: 0 10px 28px rgba(38, 35, 30, 0.16), 0 0 0 4px rgba(255, 253, 249, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-primary);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s ease, box-shadow 0.2s ease;
}

.split-divider-line:hover .split-handle,
.split-divider-line.is-dragging .split-handle {
  transform: scale(1.08);
  border-color: var(--accent);
  box-shadow: 0 12px 32px rgba(38, 35, 30, 0.20), 0 0 0 6px rgba(181, 136, 61, 0.16);
}

.split-handle svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.split-badge {
  position: absolute;
  top: var(--split-badge-top, 14%);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-hairline);
  background: rgba(252, 249, 243, 0.84);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-pill);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-primary);
  white-space: nowrap;
  transition: opacity 0.22s ease;
}

.split-badge-left {
  left: var(--split-left-badge-x, 22%);
  transform: translateX(-50%);
}

.split-badge-right {
  left: var(--split-right-badge-x, 78%);
  transform: translateX(-50%);
}

.split-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.split-dot-day {
  background: var(--split-left-color);
  box-shadow: 0 0 0 2.5px rgba(207, 160, 69, 0.22);
}

.split-dot-night {
  background: var(--split-right-color);
  box-shadow: 0 0 0 2.5px rgba(38, 132, 114, 0.22);
}

/* style */
.museum-brand {
  position: fixed;
  top: 22px;
  left: 34px;
  z-index: 12;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: opacity 0.32s ease, transform 0.32s ease;
}

.brand-top-row {
  display: flex;
  align-items: center;
  margin-bottom: 2px;
}

.hub-back-link {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px 3px 7px;
  border-radius: 999px;
  border: 1px solid var(--border-hairline);
  background: rgba(252, 249, 243, 0.68);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--ink-secondary);
  text-decoration: none;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.hub-back-link:hover {
  background: var(--surface-pill-hover);
  border-color: var(--border-strong);
  color: var(--ink-primary);
}

.hub-back-link svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-title {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.brand-gem {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  flex-shrink: 0;
}

.brand-title h1 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.13em;
  color: var(--ink-primary);
  line-height: 1.25;
}

.brand-subtitle {
  padding-left: 16px;
  max-width: 340px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--ink-secondary);
}

/* style */
.dimension-dock {
  position: fixed;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 14;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

body.has-v2-dims .dimension-dock {
  display: flex;
}

.dimension-bar {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--border-hairline);
  background: rgba(253, 250, 244, 0.84);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-pill);
}

.dim-pill {
  appearance: none;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6.5px 14px;
  border-radius: 999px;
  color: var(--ink-secondary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.24s cubic-bezier(0.22, 1, 0.36, 1), color 0.2s ease, box-shadow 0.24s ease;
}

.dim-pill:hover {
  color: var(--ink-primary);
  background: var(--accent-soft);
}

.dim-pill.is-active {
  background: #27241f;
  color: #faf7f0;
  box-shadow: 0 5px 15px rgba(38, 35, 30, 0.15);
}

.dim-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dim-dot-hunter { background: var(--accent); }
.dim-dot-pathology { background: var(--pathology-terra); }
.dim-dot-aging { background: var(--aging-slate); }
.dim-dot-vessels_meridians { background: linear-gradient(135deg, var(--artery) 50%, var(--vein) 50%); }

.hunter-facts-pill {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 4px 13px;
  border-radius: 999px;
  border: 1px solid rgba(181, 136, 61, 0.20);
  background: rgba(253, 250, 244, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: #6b5328;
  white-space: nowrap;
}

.hunter-facts-pill.is-visible {
  display: inline-flex;
}

body.split-active .hunter-facts-pill {
  display: none !important;
}

/* style */
.museum-actions {
  position: fixed;
  top: 24px;
  right: 34px;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: opacity 0.32s ease, transform 0.32s ease;
}

.action-pill {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border-hairline);
  background: var(--surface-pill);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-pill);
  color: var(--ink-primary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.22s ease, border-color 0.22s ease, color 0.22s ease, transform 0.2s ease, box-shadow 0.22s ease;
}

.action-pill.is-hidden {
  display: none;
}

.action-pill:hover {
  background: var(--surface-pill-hover);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.action-pill:active {
  transform: translateY(0);
}

.action-pill.is-active {
  background: var(--surface-pill-active);
  color: var(--text-pill-active);
  border-color: transparent;
  box-shadow: 0 8px 22px rgba(38, 35, 30, 0.16);
}

.action-pill svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.88;
}

/* style */
.info-card {
  position: fixed;
  right: 34px;
  bottom: 142px;
  z-index: 15;
  width: 294px;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid var(--border-hairline);
  background: var(--surface-card);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: var(--shadow-card);
  color: var(--ink-primary);
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1), transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.info-card.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.info-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.info-card-titles {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.info-card-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--ink-primary);
}

.info-card-badge {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  white-space: nowrap;
}

.info-card-close {
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border-hairline);
  background: transparent;
  color: var(--ink-secondary);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease;
}

.info-card-close:hover {
  background: var(--accent-soft);
  color: var(--ink-primary);
}

.info-card-sub {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: 10px;
}

.info-card-body {
  font-size: 12.5px;
  line-height: 1.62;
  color: var(--ink-secondary);
}

.info-card-extra {
  font-size: 12px;
  line-height: 1.58;
  color: var(--ink-primary);
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid var(--border-hairline);
}

.info-card-extra:empty {
  display: none;
}

.info-card-note {
  margin-top: 9px;
  padding: 8px 10px;
  border-radius: 11px;
  background: rgba(181, 136, 61, 0.08);
  font-size: 11.5px;
  line-height: 1.52;
  color: #6b5328;
}

.info-card-note:empty {
  display: none;
}

/* style */
.v2-side-card {
  position: fixed;
  right: 30px;
  top: 50%;
  transform: translateY(-50%) translateX(12px);
  z-index: 14;
  width: 356px;
  max-height: calc(100vh - 186px);
  overflow-y: auto;
  padding: 16px 18px 18px;
  border-radius: 22px;
  border: 1px solid var(--border-hairline);
  background: var(--surface-card);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: var(--shadow-card);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.28s ease;
}

.v2-side-card.is-visible {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
  pointer-events: auto;
  visibility: visible;
}

.pathology-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.pathology-top-row .v2-card-kicker {
  margin-bottom: 0;
}

.compare-mode-toggle {
  display: inline-flex;
  align-items: center;
  padding: 2.5px;
  border-radius: 999px;
  border: 1px solid var(--border-hairline);
  background: rgba(242, 237, 225, 0.85);
}

.compare-seg-btn {
  appearance: none;
  border: none;
  background: transparent;
  padding: 3.5px 9px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ink-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.compare-seg-btn.is-active {
  background: #27241f;
  color: #faf7f0;
}

.v2-module-block {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--border-hairline);
}

.related-chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #6f5327;
  background: rgba(181, 136, 61, 0.11);
  border-radius: 8px;
  padding: 3px 9px;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.related-chip:empty {
  display: none;
}

.care-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4.5px;
}

.care-list li {
  position: relative;
  padding-left: 13px;
  font-size: 11.8px;
  line-height: 1.54;
  color: var(--ink-secondary);
}

.care-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.acupoint-boundary-box {
  margin-top: 8px;
  padding: 8.5px 10.5px;
  border-radius: 11px;
  background: rgba(184, 74, 60, 0.09);
  border: 1px solid rgba(184, 74, 60, 0.28);
  font-size: 11.4px;
  line-height: 1.54;
  color: #7c2d24;
}

.acupoint-boundary-box:empty {
  display: none;
}

/* style */
.emergency-redline-box {
  margin-bottom: 10px;
  padding: 8.5px 11px;
  border-radius: 12px;
  background: rgba(184, 74, 60, 0.11);
  border: 1px solid rgba(184, 74, 60, 0.36);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.52;
  color: #8b261b;
}

.emergency-redline-box:empty {
  display: none;
}

/* style */
.taboo-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.taboo-list li {
  position: relative;
  padding-left: 14px;
  font-size: 11.8px;
  line-height: 1.54;
  color: #6b3029;
}

.taboo-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 5.5px;
  height: 5.5px;
  border-radius: 50%;
  background: #b84a3c;
}

/* style */
.safety-tier-row {
  margin-bottom: 7px;
}

.safety-tier-row:empty {
  display: none;
}

.safety-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.safety-badge.is-forbidden {
  background: rgba(184, 74, 60, 0.14);
  border: 1px solid rgba(184, 74, 60, 0.38);
  color: #8b261b;
}

.safety-badge.is-caution {
  background: rgba(212, 154, 106, 0.18);
  border: 1px solid rgba(212, 154, 106, 0.42);
  color: #7d471f;
}

.safety-badge.is-info {
  background: rgba(38, 132, 114, 0.12);
  border: 1px solid rgba(38, 132, 114, 0.28);
  color: #216658;
}

.info-card-disclaimer {
  margin-top: 9px;
  font-size: 10.2px;
  line-height: 1.46;
  color: var(--ink-muted);
}

.info-card-disclaimer:empty {
  display: none;
}

/* style */
.acupoint-halo.is-forbidden .halo-ring {
  border-color: #b84a3c;
  border-style: dashed;
}

.acupoint-halo.is-forbidden .halo-core {
  background: #b84a3c;
  box-shadow: 0 0 0 3px rgba(184, 74, 60, 0.24);
}

.acupoint-pill.is-forbidden {
  border-color: rgba(184, 74, 60, 0.42);
  background: rgba(254, 246, 244, 0.94);
  color: #8b261b;
}

.acupoint-pill.is-forbidden .ap-dot {
  background: #b84a3c;
}

.acupoint-pill.is-forbidden .ap-code {
  color: #a33a2d;
}

/* style */
.ecg-panel {
  position: fixed;
  left: 30px;
  bottom: 72px;
  z-index: 13;
  width: 362px;
  padding: 12px 14px 11px;
  border-radius: 18px;
  border: 1px solid var(--border-hairline);
  background: var(--surface-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-pill);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s ease;
}

.ecg-panel.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
}

.ecg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.ecg-title-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--ink-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}

.ecg-dot {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  background: #268472;
  box-shadow: 0 0 0 3px rgba(38, 132, 114, 0.18);
  flex-shrink: 0;
}

.ecg-panel.is-afib .ecg-dot {
  background: #c97872;
  box-shadow: 0 0 0 3px rgba(201, 120, 114, 0.22);
}

.ecg-mode-switch {
  display: inline-flex;
  padding: 2px;
  border-radius: 999px;
  border: 1px solid var(--border-hairline);
  background: rgba(242, 237, 225, 0.86);
  flex-shrink: 0;
}

.ecg-seg-btn {
  appearance: none;
  border: none;
  background: transparent;
  padding: 3px 9px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ink-secondary);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.18s ease, color 0.18s ease;
}

.ecg-seg-btn.is-active {
  background: #27241f;
  color: #faf7f0;
}

.ecg-wave-svg {
  width: 100%;
  height: 58px;
  display: block;
  border-radius: 10px;
  background: rgba(242, 237, 225, 0.56);
  border: 1px solid rgba(38, 35, 30, 0.055);
}

.ecg-grid {
  stroke: rgba(38, 35, 30, 0.10);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.ecg-wave-path {
  fill: none;
  stroke: #268472;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ecg-panel.is-afib .ecg-wave-path {
  stroke: #c46a5c;
}

.ecg-cursor-line {
  stroke: rgba(181, 136, 61, 0.45);
  stroke-width: 1.2;
}

.ecg-cursor-dot {
  fill: #b5883d;
  stroke: #fffdf9;
  stroke-width: 1.5;
}

.ecg-phase-text {
  margin-top: 7px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--ink-primary);
  letter-spacing: 0.02em;
}

/* style */
.layer-quick-bar {
  pointer-events: auto;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.layer-quick-bar.is-visible {
  display: inline-flex;
}

.layer-quick-btn {
  appearance: none;
  border: 1px solid var(--border-hairline);
  background: var(--surface-pill);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 5px 12px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-secondary);
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(48, 39, 24, 0.05);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.layer-quick-btn:hover {
  color: var(--ink-primary);
  border-color: var(--border-strong);
}

.layer-quick-btn.is-active {
  background: #27241f;
  color: #faf7f0;
  border-color: transparent;
}

body.clean-mode .ecg-panel,
body.clean-mode .layer-quick-bar {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden;
}

body.portrait-mode .ecg-panel {
  left: 14px;
  right: 14px;
  width: auto;
  bottom: 138px;
  padding: 9px 12px;
}

body.portrait-mode .ecg-wave-svg {
  height: 44px;
}

/* style */
.zoom-controls {
  position: fixed;
  left: 34px;
  bottom: 24px;
  z-index: 13;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 6px;
  border-radius: 999px;
  border: 1px solid var(--border-hairline);
  background: var(--surface-pill);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-pill);
  transition: opacity 0.3s ease;
}

.zoom-btn {
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--ink-primary);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease, color 0.18s ease;
}

.zoom-btn:hover {
  background: var(--accent-soft);
}

.zoom-readout {
  min-width: 42px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--ink-primary);
  font-variant-numeric: tabular-nums;
}

.zoom-reset-btn {
  appearance: none;
  border: none;
  border-left: 1px solid var(--border-hairline);
  margin-left: 2px;
  padding: 4px 9px 4px 10px;
  border-radius: 0 999px 999px 0;
  background: transparent;
  color: var(--ink-secondary);
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.18s ease, background 0.18s ease;
}

.zoom-reset-btn:hover {
  color: var(--ink-primary);
}

.zoom-reset-btn.is-highlighted {
  color: var(--accent);
  font-weight: 600;
}

.v2-card-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: 10px;
}

.kicker-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.kicker-dot-warn { background: var(--pathology-terra); }
.kicker-dot-aging { background: var(--aging-slate); }

.v2-pill-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 14px;
}

.v2-tab-btn {
  appearance: none;
  border: 1px solid var(--border-hairline);
  background: rgba(242, 237, 225, 0.72);
  color: var(--ink-secondary);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.v2-tab-btn:hover {
  color: var(--ink-primary);
  border-color: var(--border-strong);
}

.v2-tab-btn.is-active {
  background: #27241f;
  color: #faf7f0;
  border-color: transparent;
}

.pathology-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 11px;
  flex-wrap: wrap;
}

.v2-card-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-primary);
}

.urgency-badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.urgency-badge.is-emergency {
  background: rgba(196, 98, 82, 0.15);
  color: #9b3f32;
  border: 1px solid rgba(196, 98, 82, 0.28);
}

.urgency-badge.is-urgent {
  background: rgba(212, 154, 106, 0.20);
  color: #8c5228;
  border: 1px solid rgba(212, 154, 106, 0.34);
}

.urgency-badge.is-check {
  background: rgba(181, 136, 61, 0.14);
  color: #6d5324;
  border: 1px solid rgba(181, 136, 61, 0.26);
}

.aging-age-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(124, 147, 163, 0.15);
  color: #465f70;
  font-variant-numeric: tabular-nums;
}

.v2-section-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: 6px;
  margin-top: 10px;
}

.signal-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 4px;
}

.signal-list li {
  position: relative;
  padding-left: 14px;
  font-size: 12px;
  line-height: 1.54;
  color: var(--ink-primary);
}

.signal-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 5.5px;
  height: 5.5px;
  border-radius: 50%;
  background: var(--pathology-terra);
}

.v2-card-text {
  font-size: 12.2px;
  line-height: 1.62;
  color: var(--ink-secondary);
}

.v2-card-note {
  margin-top: 11px;
  padding: 9px 11px;
  border-radius: 12px;
  background: rgba(181, 136, 61, 0.09);
  font-size: 11.5px;
  line-height: 1.54;
  color: #685026;
}

.v2-card-note:empty {
  display: none;
}

.v2-disclaimer {
  margin-top: 10px;
  font-size: 10.5px;
  line-height: 1.48;
  color: var(--ink-muted);
}

.v2-disclaimer:empty {
  display: none;
}

/* style */
.museum-dock {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  width: min(692px, calc(100vw - 32px));
  pointer-events: none;
  transition: opacity 0.32s ease, transform 0.32s ease;
}

.dock-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
  width: 100%;
  pointer-events: none;
}

.telemetry-row {
  display: none;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(252, 249, 243, 0.80);
  border: 1px solid var(--border-hairline);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 6px 20px rgba(48, 39, 24, 0.05);
  font-variant-numeric: tabular-nums;
}

.telemetry-row.is-visible {
  display: inline-flex;
}

.telemetry-chip {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-primary);
}

.telemetry-chip-accent {
  color: var(--track-fill);
  padding-left: 6px;
  border-left: 1px solid var(--border-hairline);
}

.telemetry-chip-accent:empty {
  display: none;
}

.telemetry-state {
  font-size: 11px;
  font-weight: 400;
  color: var(--ink-secondary);
  padding-left: 6px;
  border-left: 1px solid var(--border-hairline);
}

.telemetry-state:empty {
  display: none;
}

.caption-text {
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.05em;
  line-height: 1.48;
  color: var(--ink-secondary);
  text-shadow: 0 1px 10px rgba(242, 237, 225, 0.92);
  padding: 0 10px;
}

.medical-notice {
  display: none;
  max-width: 560px;
  font-size: 11px;
  line-height: 1.45;
  letter-spacing: 0.03em;
  color: #7c524b;
  background: rgba(253, 248, 246, 0.84);
  border: 1px solid rgba(179, 115, 107, 0.22);
  padding: 4px 12px;
  border-radius: 999px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.medical-notice.is-visible {
  display: inline-block;
}

/* style */
.vessel-controls {
  pointer-events: auto;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 7px 18px;
  border-radius: 999px;
  border: 1px solid var(--border-hairline);
  background: var(--surface-pill);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-pill);
  flex-wrap: wrap;
}

.vessel-controls.is-visible {
  display: inline-flex;
}

.vessel-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-primary);
  cursor: pointer;
}

.vessel-check input {
  accent-color: #27241f;
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.vc-swatch {
  width: 12px;
  height: 3px;
  border-radius: 2px;
}

.vc-swatch-artery { background: var(--artery); }
.vc-swatch-vein { background: var(--vein); }
.vc-swatch-meridian { background: linear-gradient(90deg, var(--meridian-gold), var(--meridian-teal)); }

/* style */
.scrub-panel {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  height: 44px;
  padding: 0 14px 0 8px;
  border-radius: 999px;
  border: 1px solid var(--border-hairline);
  background: var(--surface-pill);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: var(--shadow-pill);
}

.scrub-panel.is-hidden {
  display: none;
}

.play-btn {
  appearance: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border-hairline);
  background: #27241f;
  color: #faf7f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s ease;
}

.play-btn:hover {
  transform: scale(1.06);
  background: #3a352e;
}

.play-btn:active {
  transform: scale(0.96);
}

.play-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.play-btn .icon-pause {
  display: none;
}

.play-btn.is-playing .icon-play {
  display: none;
}

.play-btn.is-playing .icon-pause {
  display: block;
}

.scrub-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--ink-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}

.scrub-track-wrap {
  position: relative;
  flex: 1;
  min-width: 100px;
  height: 28px;
  display: flex;
  align-items: center;
}

.scrub-rail {
  position: relative;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(38, 35, 30, 0.11);
  overflow: hidden;
  pointer-events: none;
}

.scrub-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: var(--track-fill);
  transition: background 0.25s ease;
}

.scrub-mid-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  display: none;
  flex-direction: column;
  align-items: center;
}

.scrub-mid-mark.is-visible {
  display: flex;
}

.scrub-mid-mark::before {
  content: "";
  width: 1.5px;
  height: 10px;
  background: rgba(38, 35, 30, 0.22);
  border-radius: 1px;
}

.scrub-mid-mark::after {
  content: attr(data-label);
  position: absolute;
  top: 12px;
  font-size: 9.5px;
  color: var(--ink-muted);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.scrub-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
  margin: 0;
  outline: none;
}

.scrub-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fffdf9;
  border: 2px solid var(--track-fill);
  box-shadow: 0 2px 8px rgba(38, 35, 30, 0.20);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.25s ease;
}

.scrub-range:hover::-webkit-slider-thumb,
.scrub-range:active::-webkit-slider-thumb {
  transform: scale(1.15);
  box-shadow: 0 0 0 5px rgba(181, 136, 61, 0.15), 0 3px 10px rgba(38, 35, 30, 0.22);
}

.scrub-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fffdf9;
  border: 2px solid var(--track-fill);
  box-shadow: 0 2px 8px rgba(38, 35, 30, 0.20);
}

.chapter-bar {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  border: 1px solid var(--border-hairline);
  background: var(--surface-pill);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: var(--shadow-pill);
}

.chapter-bar.is-hidden {
  display: none !important;
}

.chapter-pill {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-secondary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.24s cubic-bezier(0.22, 1, 0.36, 1), color 0.2s ease, box-shadow 0.24s ease;
}

.chapter-pill .chapter-num {
  font-size: 10.5px;
  font-weight: 600;
  opacity: 0.62;
  font-variant-numeric: tabular-nums;
}

.chapter-pill:hover {
  color: var(--ink-primary);
  background: var(--accent-soft);
}

.chapter-pill.is-active {
  background: var(--surface-pill-active);
  color: var(--text-pill-active);
  box-shadow: 0 4px 14px rgba(38, 35, 30, 0.14);
}

.chapter-pill.is-active .chapter-num {
  opacity: 0.78;
}

.error-banner {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 30;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 26px 32px;
  border-radius: 22px;
  border: 1px solid var(--border-hairline);
  background: var(--surface-card);
  box-shadow: var(--shadow-card);
  text-align: center;
  max-width: 420px;
}

.error-banner.is-visible {
  display: flex;
}

.error-banner p {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-secondary);
}

.error-back-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--surface-pill-active);
  color: var(--text-pill-active);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
}

/* style */
body.clean-mode .museum-brand,
body.clean-mode .museum-actions,
body.clean-mode .dimension-dock,
body.clean-mode .museum-dock,
body.clean-mode .zoom-controls,
body.clean-mode .info-card,
body.clean-mode .v2-side-card {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden;
}

.clean-exit-btn {
  position: fixed;
  top: 20px;
  right: 22px;
  z-index: 20;
  display: none;
  appearance: none;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border-hairline);
  background: var(--surface-pill);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--ink-secondary);
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.06em;
  cursor: pointer;
  opacity: 0.34;
  transition: opacity 0.22s ease, color 0.22s ease;
}

.clean-exit-btn:hover {
  opacity: 0.94;
  color: var(--ink-primary);
}

body.clean-mode:not(.clean-url-locked) .clean-exit-btn {
  display: inline-flex;
  align-items: center;
}

/* style */
body.portrait-mode .museum-brand {
  top: 14px;
  left: 16px;
}

body.portrait-mode .hub-back-link {
  font-size: 10px;
  padding: 2.5px 8px 2.5px 6px;
}

body.portrait-mode .brand-title h1 {
  font-size: 13px;
  letter-spacing: 0.10em;
}

body.portrait-mode .brand-subtitle {
  font-size: 10.5px;
  letter-spacing: 0.04em;
  max-width: calc(100vw - 32px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.portrait-mode .dimension-dock {
  top: 76px;
  width: calc(100vw - 24px);
}

body.portrait-mode .dimension-bar {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 3.5px;
  gap: 2px;
}

body.portrait-mode .dim-pill {
  padding: 6px 2px;
  font-size: 10px;
  justify-content: center;
  gap: 3px;
  letter-spacing: 0.01em;
}

body.portrait-mode .hunter-facts-pill {
  font-size: 10px;
  padding: 3px 10px;
}

body.portrait-mode .museum-actions {
  top: 16px;
  right: 16px;
  gap: 7px;
}

body.portrait-mode .action-pill {
  height: 32px;
  padding: 0 11px;
  font-size: 11px;
  gap: 5px;
}

body.portrait-mode .action-pill svg {
  width: 13px;
  height: 13px;
}

body.portrait-mode .museum-dock {
  bottom: 16px;
  width: calc(100vw - 24px);
  gap: 8px;
}

body.portrait-mode .caption-text {
  font-size: 11.5px;
  padding: 0 6px;
}

body.portrait-mode[data-dimension="pathology"] .dock-meta,
body.portrait-mode[data-dimension="aging"] .dock-meta,
body.portrait-mode[data-mode="beat"] .dock-meta,
body.portrait-mode.has-waveform-panel .dock-meta {
  display: none;
}

body.portrait-mode .v2-side-card {
  bottom: 68px;
  max-height: 256px;
}

body.portrait-mode .medical-notice {
  font-size: 10.5px;
  padding: 4px 10px;
  border-radius: 12px;
}

body.portrait-mode .scrub-panel {
  height: 40px;
  padding: 0 11px 0 6px;
  gap: 8px;
}

body.portrait-mode .play-btn {
  width: 28px;
  height: 28px;
}

body.portrait-mode .scrub-label {
  font-size: 10px;
}

body.portrait-mode .chapter-bar {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(var(--portrait-cols, 3), minmax(0, 1fr));
  border-radius: 20px;
  padding: 4px;
  gap: 3px;
}

body.portrait-mode .chapter-pill {
  padding: 7px 4px;
  font-size: 11px;
  gap: 3px;
  letter-spacing: 0.01em;
}

body.portrait-mode .chapter-pill .chapter-num {
  font-size: 9.5px;
}

body.portrait-mode .info-card {
  left: 14px;
  right: 14px;
  bottom: 192px;
  width: auto;
  padding: 14px 16px;
  border-radius: 16px;
}

body.portrait-mode .v2-side-card {
  left: 14px;
  right: 14px;
  top: auto;
  bottom: 94px;
  width: auto;
  max-height: 244px;
  transform: translateY(10px);
  padding: 13px 15px;
  border-radius: 18px;
}

body.portrait-mode .v2-side-card.is-visible {
  transform: translateY(0);
}

body.portrait-mode .zoom-controls {
  left: 14px;
  top: 158px;
  bottom: auto;
  padding: 2.5px 4.5px;
  transform: scale(0.88);
  transform-origin: left top;
}

body.portrait-mode .zoom-reset-btn {
  display: none;
}

body.portrait-mode .mech-callout-pill {
  font-size: 10px;
  padding: 3.5px 8px;
}

body.portrait-mode .split-badge {
  font-size: 10.5px;
  padding: 4px 9px;
}

body.portrait-mode .anatomy-label-btn {
  font-size: 11px;
  padding: 5px 10px;
}

body.portrait-mode .acupoint-pill {
  font-size: 10.5px;
  padding: 3.5px 8px 3.5px 6px;
}

@media (max-width: 1180px) and (min-width: 721px) {
  .zoom-controls {
    left: 22px;
    bottom: 138px;
  }
}

@media (max-width: 1080px) {
  .dimension-dock {
    top: 76px;
  }
}

@media (max-width: 720px) {
  .museum-brand {
    top: 12px;
    left: 14px;
    right: 14px;
    pointer-events: none;
  }

  .brand-top-row {
    min-height: 36px;
    align-items: center;
    pointer-events: auto;
  }

  .hub-back-link {
    font-size: 10px;
    padding: 4px 9px 4px 7px;
  }

  .brand-title {
    margin-top: 2px;
  }

  .brand-title h1 {
    font-size: 13px;
    letter-spacing: 0.06em;
  }

  .brand-subtitle {
    font-size: 10.5px;
    letter-spacing: 0.03em;
  }

  .dimension-dock {
    top: 108px;
    width: calc(100vw - 24px);
  }

  .dimension-bar {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 3.5px;
    gap: 2px;
  }

  .dim-pill {
    padding: 6px 2px;
    font-size: 10px;
    justify-content: center;
    gap: 3px;
    letter-spacing: 0.01em;
  }

  .museum-actions {
    top: 16px;
    right: 16px;
    gap: 6px;
  }

  .action-pill {
    height: 32px;
    padding: 0 10px;
    font-size: 11px;
    gap: 5px;
  }

  .action-pill svg {
    width: 13px;
    height: 13px;
  }

  .museum-dock {
    bottom: 16px;
    width: calc(100vw - 24px);
    gap: 8px;
  }

  .caption-text {
    font-size: 11.5px;
  }

  .medical-notice {
    font-size: 10.5px;
    padding: 4px 10px;
    border-radius: 12px;
  }

  .scrub-panel {
    height: 40px;
    padding: 0 11px 0 6px;
    gap: 8px;
  }

  .play-btn {
    width: 28px;
    height: 28px;
  }

  .scrub-label {
    font-size: 10px;
  }

  .chapter-bar {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(var(--portrait-cols, 3), minmax(0, 1fr));
    border-radius: 20px;
    padding: 4px;
    gap: 3px;
  }

  .chapter-pill {
    padding: 7px 4px;
    font-size: 11px;
    gap: 3px;
    letter-spacing: 0.01em;
  }

  .chapter-pill .chapter-num {
    font-size: 9.5px;
  }

  .info-card {
    left: 14px;
    right: 14px;
    bottom: 192px;
    width: auto;
    padding: 14px 16px;
    border-radius: 16px;
  }

  .v2-side-card {
    left: 14px;
    right: 14px;
    top: auto;
    bottom: 94px;
    width: auto;
    max-height: 244px;
    transform: translateY(10px);
    padding: 13px 15px;
    border-radius: 18px;
  }

  .v2-side-card.is-visible {
    transform: translateY(0);
  }

  .zoom-controls {
    left: 14px;
    top: 158px;
    bottom: auto;
    padding: 2.5px 4.5px;
    transform: scale(0.88);
    transform-origin: left top;
  }

  .zoom-reset-btn {
    display: none;
  }

  .mech-callout-pill {
    font-size: 10px;
    padding: 3.5px 8px;
  }

  .split-badge {
    font-size: 10.5px;
    padding: 4px 9px;
  }

  .anatomy-label-btn {
    font-size: 11px;
    padding: 5px 10px;
  }

  .acupoint-pill {
    font-size: 10.5px;
    padding: 3.5px 8px 3.5px 6px;
  }
}

@media (max-width: 430px) {
  .chapter-pill .chapter-num {
    display: none;
  }

  .chapter-pill {
    font-size: 11px;
    padding: 7px 2px;
  }
}
