/* Atlas 0.10: quiet surfaces, one accent, the anatomy owns the screen. */
body{--surface:#fff;--surface-alt:#f0f3f5;--text:#22313a;--muted:#586874;--line:#d5dfe4;--accent:#bb4612;--selection:#fff0e4;background:var(--surface-alt);color:var(--text);font-family:Arial,sans-serif}
body[data-theme=dark]{color-scheme:dark;--surface:#20262f;--surface-alt:#161b22;--text:#edf1f4;--muted:#adb9c4;--line:#3b4552;--ink:#edf1f4;--accent:#ffad79;--selection:#513525;--orange:#f47d3b}
body .top,body .study,body .study-modes{background:var(--surface);color:var(--text);border-color:var(--line)}
body .top{gap:12px}.brand{letter-spacing:.04em}.brand small{color:var(--muted)}
body button,body #region,body .mobile-tools select,body .search-wrap input{background:var(--surface);color:var(--text);border-color:var(--line)}
body button:hover{background:var(--selection)}body button:focus-visible,body a:focus-visible,body select:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
body button[aria-pressed=true],body .side-control [aria-pressed=true],body .part-picker [aria-pressed=true],body .abdomen-buttons [aria-pressed=true],body .panel-tabs [aria-selected=true],body .card-actions .primary{background:var(--selection);color:var(--accent);border-color:var(--accent)}
body .study-modes [aria-pressed=true]{background:#d9571b;color:#fff;border-color:#d9571b}
body .stage-wrap{background:radial-gradient(ellipse at 50% 40%,#f8fbfc,#dce6eb);border:0;border-radius:20px}
body[data-theme=dark] .stage-wrap{background:radial-gradient(ellipse at 50% 42%,#38414c,#1a2029 85%)}
body .side-mark,body .stage-label,body .cutaway-label{color:var(--muted)}body .cutaway-label{background:var(--surface)}
body .selection-label{background:var(--surface);color:var(--text);border:1px solid var(--line);border-left:3px solid var(--orange);max-width:calc(100% - 24px);font-weight:500;z-index:2;box-shadow:0 5px 20px #0003}
#selection-leader{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:1;visibility:hidden}#selection-leader path{fill:none;stroke:var(--text);stroke-width:1;opacity:.8}#selection-leader circle{fill:var(--orange);stroke:var(--text);stroke-width:1}
#theme-toggle{min-width:44px;width:44px;padding:0;font-size:23px;border:0;flex-shrink:0}body #install-open{color:var(--text);background:var(--surface);border:0}
.sheet-handle{display:none}.atlas-layout{gap:16px}.study{border-radius:20px}.panel-tabs{border-color:var(--line)}.panel-content{padding:18px}
body .family,body .structure-row{border-color:var(--line)}body .navigation-family{border:0;border-bottom:1px solid var(--line);padding:0;border-radius:0;margin:0}
body .family[open] summary,body .facts dt{color:var(--accent)}body .navigation-muscle{border:0;border-radius:7px;padding:12px;margin:0;min-height:48px}
body .navigation-muscle[aria-pressed=true],body .structure-open[aria-pressed=true]{background:var(--selection);color:var(--accent);box-shadow:inset 3px 0 var(--orange)}
.selection-brief{padding:8px 12px 14px;border-left:3px solid var(--orange);background:var(--selection);border-radius:0 0 8px 8px;margin-bottom:8px;font-size:.875rem;line-height:1.5}.selection-brief small{color:var(--muted);font-style:italic}.selection-brief p{margin:8px 0}.selection-brief button{border:0;background:none;font-size:.8125rem;padding:8px;min-height:44px;margin-right:4px;color:var(--accent)}
body .note,body .coverage-note,body .abdomen-study{background:var(--surface-alt);border-color:var(--line);color:var(--muted)}body .tag{background:var(--selection);color:var(--accent);border-color:var(--line)}
body #loading{background:var(--surface-alt);color:var(--text)}body .search-wrap input{color:var(--text)}body .visibility-toggle{background:var(--surface-alt)}
#region{display:none}.search-label[for=region]{display:none}#regions-toggle{width:100%;text-align:left;border:0;padding:10px 0;color:var(--accent);font-size:.875rem}
#region-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-bottom:18px}.region-card{padding:0 3px 8px;min-width:0;border:1px solid transparent;overflow:hidden;font-size:.72rem;line-height:1.3;font-weight:500;display:flex;flex-direction:column;align-items:center;justify-content:space-between}.region-card canvas{width:100%;height:86px;object-fit:contain;display:block;pointer-events:none}.region-card span{min-height:30px;display:grid;place-items:center}
body .install-dialog{background:var(--surface);color:var(--text);border-color:var(--line)}body .install-dialog header,body .install-dialog section{background:var(--surface);color:var(--text)}body .install-network{color:var(--muted)}
@media(max-width:760px) and (orientation:portrait){
 html,body{height:100%;overflow:hidden}.top{height:calc(54px + env(safe-area-inset-top));padding:env(safe-area-inset-top) 10px 0;gap:5px!important}.top .brand{gap:7px;font-size:11px}.brand small{font-size:10px}.brand-mark{width:30px;height:30px}.top .about-link{font-size:11px;margin-left:auto}.top #install-open{margin:0!important;min-width:44px;width:44px}.top #install-open span{display:none}
 #theme-toggle{margin-left:auto}.atlas-layout, .study-expanded .atlas-layout{height:calc(100dvh - 54px - env(safe-area-inset-top));padding:6px 8px max(0px,env(safe-area-inset-bottom));grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) 152px;gap:6px;min-height:0}
 body[data-sheet=medium] .atlas-layout{grid-template-rows:minmax(0,1fr) min(46%,400px)}
 body[data-sheet=full] .atlas-layout{grid-template-rows:minmax(0,1fr) min(64%,590px)}
 .heading{height:42px;padding:0 2px 4px;flex-shrink:0}.heading h1{font-size:1.125rem}.heading button{min-height:44px;border:0;font-size:11px;padding:5px 8px}.stage-wrap{min-height:40px;border-radius:14px}.side-mark{font-size:8px;opacity:.75}.stage-label{font-size:9px}.cutaway-label{max-width:48%;font-size:8px}
 .mobile-tools{grid-template-columns:minmax(48px,1fr) repeat(5,44px);gap:2px;height:44px;margin-top:3px}.mobile-tools button{border:0}.mobile-tools small{font-size:9px}.mobile-tools select{font-size:11px;border:0!important}.selection-label{font-size:12px;line-height:1.3;min-height:44px;padding:7px 9px}
 .study{border:0;border-radius:18px 18px 0 0;box-shadow:0 -3px 15px #0001}.sheet-handle{display:flex;align-items:center;justify-content:space-between;flex-shrink:0;height:44px;padding:0 6px;border-bottom:1px solid var(--line)}#sheet-grip{flex:1;border:0;min-height:44px;touch-action:none;padding:0;cursor:ns-resize;display:grid;place-items:center}#sheet-grip span{height:4px;width:40px;background:var(--muted);opacity:.6;border-radius:8px}.sheet-sizes{display:flex}.sheet-sizes button{min-width:44px;min-height:44px;border:0;font-size:19px;padding:0}.sheet-sizes button[aria-pressed=true]{background:var(--selection)}
 .study-modes{grid-template-columns:1fr 1fr;padding:3px 6px;gap:4px;border:0}.study-modes button{min-height:44px;font-size:12px;border:0}#study-toggle{display:none}.panel-tabs{padding:2px 6px;gap:4px;min-height:48px}.panel-tabs button{min-height:44px;padding:6px 4px;font-size:12px;border-radius:8px}
 body[data-sheet=compact] .study .panel-content{display:none}body[data-sheet=medium] .study .panel-content,body[data-sheet=full] .study .panel-content{display:block}.panel-content{padding:10px 12px;scrollbar-gutter:auto;scroll-padding:10px}.panel-heading{margin-bottom:4px}.panel-heading h2{font-size:15px}.panel-footer{display:none!important}
 .region-card canvas{height:72px}.region-card{font-size:11px}.region-card span{min-height:28px}#region-cards{gap:4px}.family summary{padding:12px 3px;min-height:48px}.navigation-muscle{font-size:14px!important}#card h2{font-size:1.3rem}.facts dd{font-size:.9375rem;line-height:1.6}.selection-brief{font-size:.875rem}.selection-brief button{font-size:12px}#restore-notice{line-height:1.4;font-size:11px;margin:0 0 10px}
}
@media(max-width:350px) and (orientation:portrait){.top .brand small{display:none}.top .brand{font-size:10px}.top .about-link{font-size:10px}.atlas-layout{padding-inline:5px}.region-card{font-size:10px}.panel-content{padding-inline:10px}.mobile-tools select{font-size:10px;padding:0}}
@media(max-height:640px) and (orientation:portrait){body[data-sheet=full] .atlas-layout{grid-template-rows:minmax(0,1fr) 54%}.heading{height:32px}.heading h1{font-size:1rem}.heading button{font-size:10px}}
/* 0.11: one navigation strip, then only the selected anatomy. */
.sheet-handle,.panel-tabs{display:none!important}
.focus-dock{display:flex;gap:3px;align-items:center;flex-shrink:0;min-height:44px;padding:0 8px;border-bottom:1px solid var(--line)}
.focus-dock button{border:0;background:transparent!important;min-height:44px;font-size:.8125rem;padding:6px 8px;font-weight:500}
#focus-search,#focus-collapse{min-width:44px;width:44px;font-size:22px;padding:0}#focus-collapse{display:none}#sheet-grip{display:none}
#focus-return{margin-left:auto;color:var(--accent)}body[data-panel=info]:not([data-sheet=compact]) #focus-return{display:none}
#panel-layers .study-modes{padding:0 0 10px;margin:0 0 10px;background:transparent;border:0;grid-template-columns:1fr 1fr}#panel-layers .study-modes button{font-weight:500;font-size:.8125rem}
#study-toggle,.panel-heading,.coverage-note,#layer-note,#restore-notice{display:none!important}
.library-about{display:inline-flex;align-items:center;min-height:44px;margin-top:14px;font-size:.75rem;color:var(--muted)}
.focus-dock~.panel-content{padding:12px 16px}.panel-footer{font-size:10px}
#card .card-index{display:block;font-size:.6875rem;line-height:1.4;color:var(--muted)}
#card h2{font-size:1.25rem;margin:5px 0 2px;line-height:1.2;outline:none}
#card .latin{font-size:.75rem!important;margin:3px 0 10px;line-height:1.3}
.selected-heading{position:sticky;top:-9px;background:var(--surface);z-index:3;padding:5px 0 2px;border-bottom:1px solid var(--line)}
#card .selected-function{font-size:.875rem;line-height:1.5;margin:8px 0 12px}
.compact-fields{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 12px}.compact-field{display:flex;flex-direction:column;gap:3px;flex:1 1 130px;min-width:0;font-size:.6875rem;color:var(--muted)}
.compact-field select{min-width:0;max-width:100%;width:100%;height:44px;font:inherit;font-size:.8125rem;color:var(--text);background:var(--surface-alt);border:1px solid var(--line);border-radius:7px;padding:5px 7px}
.compact-fields .compact-field:first-child{flex:0 1 88px}.compact-fields .compact-field:only-child{flex:1 1 auto}
.card-disclosure{border-top:1px solid var(--line);margin:0}.card-disclosure>summary{cursor:pointer;min-height:44px;padding:12px 0;font-size:.8125rem;font-weight:500;color:var(--accent);line-height:1.4}
.card-disclosure .facts{margin:0 0 12px}.card-disclosure .facts dt{font-size:.75rem;margin-top:10px}.card-disclosure .facts dd{font-size:.875rem;line-height:1.5;margin-top:3px}
.card-disclosure .note{margin:6px 0 12px;padding:8px 10px;font-size:.8125rem!important;line-height:1.5}.card-disclosure .compact-field{margin-bottom:10px}
.card-disclosure .card-actions{gap:4px;margin:8px 0}.card-disclosure button{font-size:.75rem;padding:6px 8px;font-weight:500}
.cutaway-warning{font-size:.75rem!important;line-height:1.4!important;color:var(--accent);margin:6px 0!important}
@media(max-width:760px) and (orientation:portrait){
 .top{height:calc(48px + env(safe-area-inset-top));padding-inline:8px}.brand-mark{width:27px;height:27px}.top .brand{font-size:10px}.top .brand small{font-size:9px}
 .atlas-layout,.study-expanded .atlas-layout{height:calc(100dvh - 48px - env(safe-area-inset-top));grid-template-rows:minmax(0,1fr) 48px;padding:4px 6px max(0px,env(safe-area-inset-bottom));gap:4px;min-height:0}
 body[data-sheet=medium] .atlas-layout{grid-template-rows:minmax(0,1fr) clamp(190px,36%,320px)}
 body[data-sheet=full] .atlas-layout{grid-template-rows:minmax(0,1fr) clamp(210px,44%,380px)}
 .heading{height:44px;padding:0 2px 2px}.heading h1{font-size:1rem}.heading button{font-size:10px;padding:0 5px}.study{border-radius:12px 12px 0 0}
 .focus-dock{min-height:44px;height:44px;padding:0 5px;gap:0}.focus-dock button{font-size:12px;padding:0 6px}.focus-dock #focus-search,.focus-dock #focus-collapse{font-size:20px;padding:0}
 .focus-dock #sheet-grip{display:grid;flex:1;min-width:44px;place-items:center;touch-action:none;cursor:ns-resize}.focus-dock #sheet-grip span{width:28px;height:3px;border-radius:4px;background:var(--muted);opacity:.6}.focus-dock #focus-collapse{display:block}
 body[data-sheet=compact] #focus-collapse{transform:rotate(180deg)}#focus-return{margin:0;white-space:nowrap}
 .focus-dock~.panel-content{padding:9px 12px}.study-modes{display:grid}.mobile-tools{gap:2px;margin-top:2px}.mobile-tools button,.mobile-tools select{background:transparent!important;border:0!important}.mobile-tools small{font-size:8px}.mobile-tools button{font-size:19px}.mobile-tools #mobile-pan[aria-pressed=true]{color:var(--accent)}
 .selection-label{font-size:11px;line-height:1.25;max-width:74%;padding:5px 8px;min-height:44px;border-radius:7px}
 #card h2{font-size:1.125rem}#card .selected-function{font-size:.8125rem;line-height:1.45}#card .latin{margin-bottom:7px}
 .compact-fields{gap:6px;margin:7px 0 9px}.compact-field select,.mobile-tools select{font-size:16px}.card-disclosure>summary{font-size:.75rem}.card-disclosure .facts dd{font-size:.8125rem}
 .stage-label{font-size:9px}.side-mark{display:none}.cutaway-label{font-size:8px}
}
@media(max-height:620px) and (orientation:portrait){body[data-sheet=medium] .atlas-layout{grid-template-rows:minmax(0,1fr) 190px}body[data-sheet=full] .atlas-layout{grid-template-rows:minmax(0,1fr) 210px}}
#panel-layers .study-modes{grid-template-columns:repeat(3,minmax(0,1fr))}
.study-modes button{padding-left:5px;padding-right:5px;font-size:13px;min-height:44px}
body[data-study-mode=organs] #region,body[data-study-mode=organs] label[for=region]{display:none}
body[data-study-mode=organs] .display-options label:has(#context),body[data-study-mode=organs] .display-options .opacity{display:none}
/* One compact row; the range retains a 44px touch target. */
.depth-control{display:flex;align-items:center;gap:12px;min-height:44px;flex-shrink:0;padding:0 10px;border-bottom:1px solid var(--line)}
.depth-control[hidden]{display:none}
.depth-control label{display:flex;flex-direction:column;gap:2px;font-size:10px;color:var(--muted);min-width:116px;line-height:1.2}
.depth-control output{font-size:12px;color:var(--text);font-weight:500}
.depth-control input{flex:1;min-width:0;width:100%;height:44px;margin:0;accent-color:var(--accent);cursor:pointer;touch-action:pan-y}
.depth-control input:focus-visible{outline:2px solid var(--accent);outline-offset:0}
.depth-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
@media(max-width:760px){.depth-control{gap:8px;padding:0 6px}.depth-control label{min-width:108px}.depth-control output{font-size:11px}}
