/* The anatomy stage owns only the map screen; device and system chrome stay intact. */
.screen[data-screen="map"] {
  --anatomy-nav-height: calc(72px + env(safe-area-inset-bottom, 0px));
  padding: 0;
  overflow: hidden;
  display: block;
}
.anatomy-map {
  position: relative;
  width: 100%;
  height: 100%;
  isolation: isolate;
  background: radial-gradient(ellipse at 48% 40%, #fffefb 0, #f7f8f2 65%);
}
.anatomy-map.is-model-pending .anatomy-topline,
.anatomy-map.is-model-pending .anatomy-layers,
.anatomy-map.is-model-pending .anatomy-list,
.anatomy-map.is-model-pending .anatomy-dock,
.anatomy-map.is-model-pending .anatomy-hint { visibility: hidden; }
.anatomy-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  clip: rect(0, 0, 0, 0) !important;
  overflow: hidden !important;
  white-space: nowrap !important;
}
.anatomy-scene { position: absolute; inset: 31px 0 var(--anatomy-nav-height); outline: none; }
.anatomy-scene canvas { display: block; width: 100%; height: 100%; touch-action: none; outline: none; }
.anatomy-map button { -webkit-user-select: none; user-select: none; }
.anatomy-map svg { display: block; width: 20px; height: 20px; flex: none; }
.anatomy-glass {
  background: rgba(255, 255, 253, .72);
  border: 1px solid rgba(255, 255, 255, .92);
  box-shadow: 0 4px 18px #2025220b, inset 0 0 0 1px #d5ddd629;
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  backdrop-filter: blur(16px) saturate(1.15);
}
.anatomy-topline { position: absolute; z-index: 3; left: 17px; top: 7px; right: 106px; display: flex; align-items: center; gap: 10px; pointer-events: none; }
.anatomy-reset { min-height: 35px; display: flex; align-items: center; gap: 5px; border-radius: 99px; color: var(--ink); padding: 7px 11px 7px 9px; font-size: 11px; pointer-events: auto; }
.anatomy-reset svg { width: 17px; height: 17px; }
.anatomy-model-control { min-height: 35px; display: flex; align-items: center; justify-content: center; gap: 3px; border-radius: 99px; color: var(--ink); padding: 7px 9px 7px 11px; font-size: 11px; pointer-events: auto; }
.anatomy-model-control[hidden] { display: none; }
.anatomy-model-control svg { width: 12px; height: 12px; }
.anatomy-focus-name { color: #536159; font-size: 12px; white-space: nowrap; }
.anatomy-layers { position: absolute; z-index: 4; right: 13px; top: 64px; border-radius: 24px; display: flex; flex-direction: column; padding: 4px; gap: 3px; }
.anatomy-layers button { border: 0; border-radius: 20px; width: 44px; min-height: 54px; display: grid; justify-items: center; align-content: center; gap: 4px; padding: 7px 2px; background: transparent; color: #69766d; font-size: 10px; line-height: 1.2; }
.anatomy-layers button[aria-pressed="true"] { background: #41ad49; color: #202522; box-shadow: inset 0 0 0 1px #26743112; }
.anatomy-layers .anatomy-layer-icon { width: 21px; height: 21px; stroke-width: 1.8; }
.anatomy-loading { position: absolute; z-index: 5; top: 42%; left: 50%; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 10px; width: 210px; color: #69766d; font-size: 12px; text-align: center; }
.anatomy-loading[hidden] { display: none; }
.anatomy-loading i { width: 23px; height: 23px; border: 2px solid #dce7d8; border-top-color: #41ad49; border-radius: 50%; animation: anatomy-loading-spin 900ms linear infinite; }
.anatomy-loading.is-error { padding: 19px; background: #f7f8f2eb; border-radius: 20px; }
.anatomy-loading button { border: 0; background: #eaf4e7; color: #267431; border-radius: 8px; font-size: 12px; padding: 8px 13px; min-height: 36px; }
@keyframes anatomy-loading-spin { to { transform: rotate(360deg); } }
.anatomy-hint { position: absolute; z-index: 5; top: 42%; left: 50%; transform: translate(-50%, -40%); display: grid; justify-items: center; gap: 5px; text-align: center; white-space: nowrap; color: #202522; opacity: 0; transition: opacity 450ms ease, transform 450ms ease; pointer-events: none; }
.anatomy-hint.is-visible { opacity: 1; transform: translate(-50%, -50%); }
.anatomy-hint-caption { display: grid; gap: 4px; padding: 11px 17px; border: 1px solid #ffffffd9; border-radius: 15px; background: #fafbf5d9; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 5px 24px #20252209; }
.anatomy-hint-caption span { font-size: 12px; }
.anatomy-hint-caption small { font-size: 10px; color: #69766d; }
.anatomy-hint .anatomy-gesture { width: 112px; height: 86px; overflow: visible; color: #536159; }
.anatomy-gesture-orbit { color: #267431; opacity: .98; stroke-width: 2.15; filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 2px #fafbf6); }
.anatomy-gesture-hand { transform-origin: 52.5px 21px; filter: drop-shadow(0 2px 3px #20252212); }
.anatomy-gesture-ripple { transform-origin: 52.5px 21px; opacity: 0; color: #267431; }
.anatomy-hint.is-visible .anatomy-gesture-hand { animation: anatomy-gesture-tap 1900ms ease-in-out 2 both; }
.anatomy-hint.is-visible .anatomy-gesture-ripple { animation: anatomy-gesture-ring 1900ms ease-out 2 both; }
@keyframes anatomy-gesture-tap {
  0%, 18%, 100% { transform: translate(4px, 5px); }
  36%, 48% { transform: translate(0, 0) scale(.97); }
  65% { transform: translate(0, 0); }
}
@keyframes anatomy-gesture-ring {
  0%, 30%, 100% { opacity: 0; transform: scale(.65); }
  39% { opacity: .42; transform: scale(.8); }
  70% { opacity: 0; transform: scale(1.65); }
}
.anatomy-list { position: absolute; z-index: 6; bottom: calc(var(--anatomy-nav-height) + 21px); left: 15px; width: 42px; min-height: 49px; border-radius: 21px; display: grid; align-content: center; justify-items: center; gap: 3px; color: #536159; font-size: 9px; padding: 7px 3px; }
.anatomy-list svg { width: 17px; height: 17px; }
.anatomy-dock { position: absolute; z-index: 6; bottom: calc(var(--anatomy-nav-height) + 19px); right: 16px; display: flex; align-items: center; gap: 10px; max-width: calc(100% - 82px); }
.anatomy-bubbles { display: flex; align-items: center; padding: 5px 1px; }
.anatomy-bubble { position: relative; width: 51px; height: 51px; border-radius: 50%; padding: 0; display: grid; place-items: center; flex: none; color: #3d4841; transition: transform 180ms ease, background-color 180ms ease; }
.anatomy-bubble + .anatomy-bubble { margin-left: -12px; }
.anatomy-bubble:nth-child(1) { z-index: 4; }
.anatomy-bubble:nth-child(2) { z-index: 3; }
.anatomy-bubble:nth-child(3) { z-index: 2; }
.anatomy-bubble:nth-child(4) { z-index: 1; }
.anatomy-bubble:focus-visible, .anatomy-bubble:hover { z-index: 8; transform: translateY(-3px); }
.anatomy-bubble img { width: 47px; height: 47px; object-fit: cover; border-radius: 50%; mix-blend-mode: multiply; }
.anatomy-bubble-label { position: absolute; left: 6px; right: 6px; bottom: 3px; border-radius: 5px; background: #f7f8f2df; color: #3d4841; font-size: 8px; line-height: 1.4; text-align: center; white-space: nowrap; }
.anatomy-bubble-initial { font-size: 10px; max-width: 36px; line-height: 1.3; text-align: center; }
.anatomy-badge { position: absolute; right: -1px; top: -3px; background: #9a403c; color: #fff; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; display: grid; place-items: center; font: 600 9px/1 Arial, sans-serif; box-shadow: 0 0 0 2px #f7f8f2; }
.anatomy-more { font: 600 12px Arial, sans-serif; background: #f0f4eced; }
.anatomy-continue { height: 47px; width: 47px; border: 0; border-radius: 50%; background: var(--brand); color: #202522; box-shadow: 0 4px 14px #26743121; display: grid; place-items: center; flex: none; }
.anatomy-continue svg { width: 23px; height: 23px; }
.anatomy-continue:disabled { background: #e8ede2; box-shadow: none; color: #a6afa4; }
.anatomy-sheet-host { position: absolute; z-index: 20; inset: 0 0 var(--anatomy-nav-height); pointer-events: none; }
.anatomy-sheet-overlay { position: absolute; inset: 0; background: #20252230; display: flex; align-items: flex-end; pointer-events: auto; }
.anatomy-sheet { width: 100%; max-height: min(76%, 525px); overflow-y: auto; overscroll-behavior: contain; background: #fafbf6; border-radius: 23px 23px 0 0; box-shadow: 0 -12px 40px #2025220d; padding: 20px 20px 22px; scrollbar-width: thin; outline: none; }
.anatomy-sheet-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 17px; }
.anatomy-sheet-heading h2 { font-size: 19px; line-height: 1.3; margin: 1px 0 0; letter-spacing: -.03em; }
.anatomy-sheet-heading p { font-size: 11px; color: #69766d; margin: 5px 0 0; }
.anatomy-close { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; color: #536159; background: #e9eee4; flex: none; }
.anatomy-close svg { width: 16px; height: 16px; }
.anatomy-region-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.anatomy-region-grid button { min-height: 44px; border-radius: 10px; border: 1px solid #dfe6da; background: #fff; padding: 10px 11px; display: flex; align-items: center; justify-content: space-between; gap: 7px; color: #3d4841; font-size: 12px; }
.anatomy-region-grid button.is-selected { background: #eaf4e7; border-color: #c8debf; color: #267431; }
.anatomy-region-grid small { font-size: 10px; }
.anatomy-detail-row { display: flex; align-items: center; gap: 10px; min-height: 65px; border-bottom: 1px solid #e3e9de; }
.anatomy-detail-row > div { flex: 1; }
.anatomy-detail-row b, .anatomy-part-list b { display: block; font-size: 13px; font-weight: 500; }
.anatomy-detail-row small, .anatomy-part-list small { display: block; color: #69766d; font-size: 10px; margin-top: 3px; }
.anatomy-detail-row > button { width: 36px; height: 40px; display: grid; place-items: center; border: 0; background: none; color: #7b8679; }
.anatomy-detail-row > button svg { width: 16px; height: 16px; }
.anatomy-pain-dot { width: 8px; height: 8px; border-radius: 50%; background: #c96052; box-shadow: 0 0 0 4px #cc635310; flex: none; }
.anatomy-sheet-add { border: 0; border-radius: 10px; background: #eef3e9; color: #267431; width: 100%; padding: 12px 14px; min-height: 43px; display: flex; justify-content: space-between; align-items: center; font-size: 12px; margin-top: 17px; }
.anatomy-part-list { display: grid; }
.anatomy-part-list > button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; padding: 12px 2px; min-height: 61px; border: 0; border-bottom: 1px solid #e3e9de; color: #3d4841; background: transparent; }
.anatomy-part-list > button > i { width: 23px; height: 23px; display: grid; place-items: center; border: 1px solid #cdd8c6; border-radius: 50%; flex: none; }
.anatomy-part-list > button > i svg { width: 15px; height: 15px; }
.anatomy-part-list > button[aria-pressed="true"] > i { background: #41ad49; color: #202522; border-color: #41ad49; }
.anatomy-part-list > button:disabled { opacity: .45; }
.anatomy-part-list > .anatomy-broad-choice { margin-top: 8px; }
.anatomy-sheet-done { width: 100%; border: 0; border-radius: 11px; background: #41ad49; color: #202522; min-height: 44px; padding: 11px; font-size: 13px; margin-top: 19px; }
.anatomy-summary-list button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 49px; border: 0; border-bottom: 1px solid #e3e9de; background: none; padding: 10px 1px; text-align: left; font-size: 13px; }
.anatomy-summary-list button > span:first-child { flex: 1; }
.anatomy-summary-list small { color: #69766d; font-size: 11px; }
.anatomy-model-options { display: grid; gap: 8px; }
.anatomy-model-options button { display: flex; justify-content: space-between; align-items: center; gap: 14px; width: 100%; min-height: 49px; border: 1px solid #dfe6da; border-radius: 11px; padding: 12px 15px; background: #fff; color: #3d4841; font-size: 13px; text-align: left; }
.anatomy-model-options button[aria-pressed="true"] { border-color: #c1d9b9; background: #eaf4e7; color: #267431; }
.anatomy-model-options i { width: 21px; height: 21px; display: grid; place-items: center; }
.anatomy-model-options i svg { width: 17px; height: 17px; }
.anatomy-model-choice-overlay { align-items: center; justify-content: center; padding: 24px; background: transparent; }
.anatomy-sheet.anatomy-model-choice { width: min(100%, 280px); max-height: 80%; padding: 0; overflow: visible; background: transparent; border: 0; box-shadow: none; }
.anatomy-first-model-options { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.anatomy-first-model-options button { justify-content: center; min-height: 72px; padding: 20px; border-radius: 16px; font-size: 19px; font-weight: 500; background: #ffffffd9; border-color: #dce5d6; box-shadow: 0 5px 20px #20252207; }
.anatomy-first-model-options button:hover { background: #eaf4e7; border-color: #b7d7ac; }
.anatomy-first-model-options button:active { background: #41ad49; color: #202522; }
.anatomy-source-entry { display: block; border: 0; background: none; color: #69766d; font-size: 10px; min-height: 34px; padding: 10px 2px 2px; margin: 5px auto 0; }
.anatomy-credits { color: #536159; font-size: 12px; line-height: 1.7; }
.anatomy-credits p { margin: 0 0 15px; }
.anatomy-credits b { color: #202522; font-size: 13px; }
.anatomy-credits p > span { font-size: 10px; color: #69766d; }
.anatomy-credits a { color: #267431; text-decoration-color: #26743155; text-underline-offset: 3px; }
.anatomy-credits .anatomy-source-record { display: inline-flex; align-items: center; gap: 7px; padding: 2px 0; font-size: 11px; }
.anatomy-credits a:focus-visible { outline: 2px solid #267431; outline-offset: 3px; border-radius: 2px; }
.map-module-fallback { padding: 48px 20px 100px; height: 100%; overflow-y: auto; }
.map-module-fallback h1 { font-size: 20px; }
@media (max-width: 360px) {
  .anatomy-dock { right: 12px; gap: 8px; max-width: calc(100% - 70px); }
  .anatomy-bubble { width: 47px; height: 47px; }
  .anatomy-bubble img { width: 43px; height: 43px; }
  .anatomy-bubble + .anatomy-bubble { margin-left: -13px; }
  .anatomy-continue { width: 44px; height: 44px; }
  .anatomy-list { left: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .anatomy-hint, .anatomy-bubble { transition: none; }
  .anatomy-loading i { animation: none; }
  .anatomy-hint.is-visible .anatomy-gesture-hand,
  .anatomy-hint.is-visible .anatomy-gesture-ripple { animation: none; transform: none; }
  .anatomy-hint.is-visible .anatomy-gesture-ripple { opacity: .25; }
}
