:root{--bg:#20292e;--panel:#232e33;--border:#425159;--teal:#a6c9bf;color:#d7e2df;background:var(--bg)}
body{background:var(--bg)}
#explorer-shell{display:grid;grid-template-rows:56px minmax(0,1fr) 28px;min-height:720px;height:100dvh}
.header{width:100%;max-width:none;height:56px;min-height:0;margin:0;padding:0 22px;gap:22px;border-color:#3a484e}
.brand{font-size:20px;gap:10px;white-space:nowrap;letter-spacing:-.4px;min-width:0}
.brand svg{width:30px;height:34px;flex-shrink:0}.brand span,.header-tag{display:none}
.header nav{gap:18px;flex-wrap:nowrap}.header nav a{display:inline-flex;font-size:12px}.nav-active:after{bottom:-19px}
.header #toggle-fullscreen{display:inline-flex;align-items:center;gap:7px;padding:7px 10px;border:1px solid #52666e;border-radius:6px;font-size:11px;white-space:nowrap}
#toggle-fullscreen svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round}
#toggle-fullscreen[aria-pressed=true]{background:#3a5553;color:#e3f3ed}
#explore{width:100%;max-width:none;min-height:0;margin:0;padding:10px 20px 12px;display:grid;grid-template-rows:28px minmax(0,1fr);gap:7px}
.workspace-intro{display:flex;align-items:center;justify-content:space-between;gap:16px}
.workspace-intro h1{font-size:14px;font-weight:450;letter-spacing:0;margin:0;line-height:1.4;color:#b6c8ca}.workspace-intro h1 span{color:#718d92;padding:0 5px}
.workspace{min-height:0;display:grid;grid-template-columns:minmax(0,35fr) minmax(0,36fr) minmax(0,29fr);grid-template-rows:minmax(0,1fr);gap:14px;align-items:stretch}
.panel{min-width:0;min-height:0;background:var(--panel);border:1px solid #415159;border-radius:8px;overflow:visible;padding:0 12px}
.panel-head{padding:0;min-height:36px;display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid #3a4a52;flex-shrink:0}
.panel-head h2{font-size:13px;font-weight:550;letter-spacing:0}.panel-head .text-button{font-size:10px;white-space:nowrap}
.small-badge{max-width:none;font-size:9px;white-space:nowrap;background:#2c3f44;color:#adc9c6;padding:4px 6px;line-height:1.3}
.text-button{font-size:11px;color:#b0d1c9}.live-label{font-size:9px;letter-spacing:1px;color:#b4d0c5}
.anatomy-panel{display:grid;grid-template-rows:36px auto 32px minmax(0,1fr) 26px}
.anatomy-tools{padding:9px 0 3px;display:grid;gap:10px;min-height:70px}
.toggle-set{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px}.toggle-set label{display:flex;gap:5px;align-items:center;font-size:11px;white-space:nowrap}
input[type=checkbox]{width:13px;height:13px;flex-shrink:0}
.opacity-label{display:flex;align-items:center;gap:9px;font-size:10px;white-space:nowrap}.opacity-label input{flex:1;min-width:30px;width:auto;height:18px;accent-color:var(--teal);margin:0}.opacity-label output{min-width:29px;font-size:10px;text-align:right}
.observer-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0}.observer-actions button{font-size:10px;line-height:1.4}
.anatomy-stage{position:relative;isolation:isolate;min-height:0;height:100%;overflow:hidden;background:radial-gradient(ellipse at 50% 44%,#314147,#202c32 75%);border-radius:5px}
#model-canvas{position:absolute;inset:12px 5px 26px;z-index:2}#model-labels{position:absolute;inset:0;z-index:3;pointer-events:none}
.anatomy-view-label{position:absolute;left:12px;top:12px;color:#90a9b2;font-size:8px;letter-spacing:1.2px;z-index:4;pointer-events:none}
.heart-legend{position:absolute;bottom:11px;right:10px;display:flex;gap:11px;z-index:4;font-size:9px;pointer-events:none}.heart-legend span{display:flex;align-items:center;gap:4px}.heart-legend i{width:5px;height:5px;border-radius:50%}
.zoom-controls{left:auto;right:9px;top:37px;bottom:auto;gap:5px}.zoom-controls button{width:30px;height:30px;font-size:19px;background:#2c4149;border-color:#627b83;opacity:1;padding:0}
#patient-axes{width:76px;height:64px;left:4px;bottom:5px}#patient-axes text{font-size:10px;fill:#c1d6d9}#patient-axes line{stroke:#88a6ad;stroke-width:1.6}
#orientation-note{left:9px;right:auto;bottom:69px;font-size:8px;color:#9db5bc}.vessel-label{font-size:10px;padding:2px 4px;background:#253941df;border-color:#6a8388;color:#e6efea}
.panel-hint{align-self:center;text-align:center;color:#9eb2b9;font-size:10px;line-height:1.4}
.projection-panel{display:grid;grid-template-rows:36px 105px minmax(0,1fr) 25px 126px 61px}
.projection-toolbar{display:grid;grid-template-rows:34px 66px;gap:4px;padding:0 0 3px}
.projection-tabs{padding:0;gap:19px;background:transparent;display:flex;align-items:stretch}
.projection-tabs button{padding:7px 0 5px;font-size:11px}.projection-tabs button.active{color:#e1ede8;border-color:var(--teal)}
.projection-options{display:flex;align-items:center;justify-content:space-between;gap:9px}.segmented{padding:2px;gap:2px;border:1px solid #4b6169;border-radius:6px;background:#1d2a30;display:flex}
.segmented button{font-size:11px;min-width:0;padding:5px 10px;border-radius:4px;line-height:1.4}.segmented button.active{background:#3a5554;color:#e4f0e9}.color-switch{font-size:10px;display:flex;align-items:center;gap:5px;white-space:nowrap}
.image-workspace{position:relative;min-height:0;border-radius:5px}
.projection-stage{position:absolute;inset:0;height:auto;min-height:0;background:#c8cece;border:1px solid #9aabad;border-radius:5px;overflow:hidden}
#projection{width:100%;height:100%;display:block}.image-meta{position:absolute;inset:12px 12px auto;display:flex;justify-content:space-between;gap:8px;color:#31484e;font:10px ui-monospace,monospace;z-index:2}
.image-footer{position:absolute;bottom:8px;left:6px;right:6px;text-align:center;font-size:9px;line-height:1.4;color:#3b5259}
.projection-path{stroke:none;fill:#26363b;opacity:.88;cursor:pointer}.projection-path:hover{stroke:#945b49;stroke-width:.6px}.projection-hit{stroke:transparent;stroke-width:7;fill:transparent;pointer-events:stroke}.projection-label{fill:#294751;stroke:#c8cece;stroke-width:4px;paint-order:stroke;font:14px ui-sans-serif,sans-serif}
.film-stage:not([hidden]){position:absolute;inset:0;min-height:0;padding:0;background:transparent;display:grid;grid-template-rows:minmax(0,1fr) auto auto auto auto;gap:5px}
.cine-viewport{position:relative;min-height:0;background:#05090b;border:1px solid #526168;border-radius:5px;overflow:hidden}.film-stage video{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain;background:#05090b}
.cine-meta{position:absolute;top:9px;left:10px;right:10px;display:flex;justify-content:space-between;gap:8px;font:9px ui-monospace,monospace;color:#d4dcdb;z-index:2;pointer-events:none;text-shadow:0 1px 4px #000}.cine-meta span{background:#0610167a;padding:3px;border-radius:2px}
.film-picker{display:flex;align-items:center;gap:8px;font-size:10px;margin:0}.film-picker label{white-space:nowrap}.film-picker select{width:100%;min-width:0;padding:4px 6px;font-size:10px;height:27px}
#film-caption,#film-match{font-size:9px;line-height:1.4;margin:0;color:#a8bec4}#film-match{color:#d2c5a4}.film-credit{font-size:8px!important;line-height:1.4;margin:0;color:#94acb5}
#film-unavailable{position:absolute;inset:0;height:auto;padding:30px 20px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;font-size:12px;background:#15252e;text-align:center}#film-unavailable p{font-size:10px;line-height:1.5;margin:0}#film-unavailable button{font-size:10px}
.projection-foot{display:flex;align-items:center;justify-content:space-between;gap:5px;padding:3px 0;border:0;font-size:9px;color:#9fb5bc;flex-wrap:nowrap}.projection-foot button{font-size:9px;white-space:nowrap}
.angle-map-section{padding-top:7px;border-top:1px solid #415159;min-height:0}.map-heading{display:flex;justify-content:space-between;align-items:center;font-size:9px;color:#a0b6bd;gap:8px;line-height:1.4}.map-heading>span:first-child{letter-spacing:1px}
#angle-map{display:block;width:100%;height:106px;touch-action:none;user-select:none;cursor:crosshair;overflow:visible}#angle-map text{font:10px ui-sans-serif,sans-serif;fill:#9db5be;pointer-events:none}.map-field{fill:#1c2930;stroke:#455e68;stroke-width:1}.map-grid{stroke:#3d525b;fill:none;stroke-width:1;stroke-dasharray:2 3}
#map-cross-x,#map-cross-y{stroke:#9ec9be;stroke-width:1;opacity:.4;pointer-events:none}.map-preset{fill:#7a979d;stroke:#bdcfcc;stroke-width:1;cursor:pointer}.map-preset:hover,.map-preset[aria-pressed=true]{fill:#e0b88e;stroke:#ffe5c5}.map-preset:focus{outline:none;stroke:#fff;stroke-width:3}
#map-marker{fill:#b6e1d0;stroke:#182a30;stroke-width:2;cursor:grab}.dragging #map-marker{cursor:grabbing}
.current-view{min-height:0;padding:7px 0;border-top:1px solid #415159}.current-view>div{display:flex;justify-content:space-between;align-items:baseline;gap:6px}.current-view strong{font-size:11px;font-weight:550;color:#d7e7df}.current-view span{font:9px ui-monospace,monospace;color:#a5c0c4;white-space:nowrap}.current-view p{font-size:10px;line-height:1.5;color:#a3b7bd;margin-top:4px}
.acquisition-panel{display:flex;flex-direction:column}.controls-top{flex-shrink:0}.angle-fields{padding:9px 0 3px;display:grid;gap:9px}
.angle-control-head{display:flex;align-items:center;gap:6px;font-size:10px}.angle-control-head>label{flex:1;white-space:nowrap;font-weight:500}.angle-control-head>output{font-size:10px;color:#c8dcd2;white-space:nowrap}
.number-control{display:flex;align-items:center;border:1px solid #4b626c;border-radius:5px;padding:3px 5px;gap:1px;background:#1b2930;font:11px ui-monospace,monospace}.number-control input{width:42px;padding:0;background:none;border:0;font:inherit;color:#dfebe5;text-align:right;appearance:textfield}.number-control input::-webkit-inner-spin-button{display:none}
.angle-control>input[type=range]{width:100%;height:22px;margin:2px 0 0;accent-color:var(--teal);cursor:pointer;display:block}.range-labels{display:flex;justify-content:space-between;font-size:9px;line-height:1.3;color:#99b0ba;margin:0}
.preset-section{margin-top:5px;border-top:1px solid #415159;padding-top:7px}.preset-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:6px}.preset-heading h3{font-size:11px;font-weight:500}.preset-heading button{font-size:10px}
#preset-map{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.preset{position:static;transform:none!important;max-width:none;width:auto;min-height:65px;display:grid;grid-template-columns:30px minmax(0,1fr);grid-template-rows:auto auto;column-gap:4px;padding:5px;background:#26363d;border:1px solid #4d626b;border-radius:5px;text-align:left;box-shadow:none;transition:background .15s,border-color .15s}
.preset svg,.preset.n svg,.preset.s svg{display:block;grid-column:1;grid-row:1/3;width:30px;height:49px;align-self:center;margin:0;opacity:1}.preset strong{grid-column:2;grid-row:1;align-self:end;font-size:10px;font-weight:500;line-height:1.3;margin:0 0 3px}.preset span{grid-column:2;grid-row:2;font-size:8px;line-height:1.3;color:#a7bec4;font-family:inherit}.preset.active{background:#35504d;border-color:#afd3c5}.preset:hover{background:#32464b;border-color:#acc3c7}.preset.active:after{display:none}.preset .mini-vessel-label{display:none}
.preset.n,.preset.s{width:auto;padding:5px}.preset:focus-visible{outline:2px solid #d0ebe1;outline-offset:2px}
.carm-panel{display:flex;flex-direction:column;min-height:0;flex:1;margin-top:9px;padding:8px 0 9px;border-top:1px solid #415159}
.carm-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.carm-heading h3{font-size:11px;font-weight:550}.carm-heading output{font:9px ui-monospace,monospace;color:#c4d9d1;white-space:nowrap}
.detector-toolbar{display:flex;justify-content:space-between;align-items:center;gap:6px;margin-top:5px;font-size:9px;color:#9fb5bd}.detector-toolbar>span{color:#b2ccca}.detector-toolbar label{white-space:nowrap}.detector-toolbar select{padding:3px 4px;font-size:9px;color:#d4e7dd;background:#26383f;border:1px solid #4c636c;border-radius:4px;max-width:145px}
.carm-visual{flex:1;min-height:140px;position:relative;margin:2px -8px 0}#carm-scene{width:100%;height:100%;display:block;overflow:visible}
.detector-handle{cursor:grab;touch-action:none}.detector-halo{opacity:.65;animation:detector-halo-pulse 1.8s ease-in-out infinite;transition:opacity .15s}.detector-grip{opacity:.7;pointer-events:none}.detector-handle:hover .detector-halo,.detector-handle:focus .detector-halo,.dragging .detector-halo{animation:none;opacity:1;stroke-width:2.4}.detector-handle:focus{outline:none}.dragging .detector-handle{cursor:grabbing}.acquisition-dragging,.acquisition-dragging *{user-select:none!important;-webkit-user-select:none!important}
@keyframes detector-halo-pulse{0%,100%{opacity:.25}50%{opacity:1}}
.detector-hint{text-align:center;font-size:11px;line-height:1.5;color:#c2ddd1}.drag-axis-hint{display:flex;justify-content:center;gap:13px;font-size:9px;color:#99b4be;line-height:1.5;margin-top:2px}.carm-legend{display:flex;justify-content:center;gap:11px;font-size:8px;line-height:1.5;color:#95afb8;margin-top:5px}.carm-legend span{display:flex;align-items:center;gap:4px;white-space:nowrap}.carm-legend i{width:5px;height:5px;border-radius:2px}.detector-dot{background:#94cbbc}.source-dot{background:#d7b58a}
footer{width:100%;max-width:none;min-height:0;margin:0;padding:4px 20px;display:flex;align-items:center;flex-wrap:nowrap;gap:20px;font-size:8px;line-height:1.4;border-color:#3b4d55}footer>span{white-space:nowrap}footer p{order:0;font-size:8px;max-width:none}footer #download-source{margin-left:auto;font-size:8px}footer a{font-size:8px}
.fit-view #explorer-shell{height:var(--viewport-height,100dvh)}
@media(min-width:1180px) and (min-height:720px){body{overflow:hidden}.fit-view body{overflow:hidden}}
@media(min-width:1180px) and (max-height:820px){#explorer-shell{grid-template-rows:48px minmax(0,1fr) 24px}.header{height:48px}#explore{padding-top:8px;padding-bottom:8px;grid-template-rows:22px minmax(0,1fr);gap:5px}.workspace-intro h1{font-size:12px}.preset{min-height:55px;grid-template-columns:25px minmax(0,1fr);padding:4px}.preset.n,.preset.s{padding:4px}.preset svg,.preset.n svg,.preset.s svg{width:25px;height:40px}.preset-heading{margin-bottom:5px}.preset-section{padding-top:5px}.carm-panel{margin-top:7px}.nav-active:after{bottom:-15px}}
@media(min-width:1550px){.workspace{gap:18px}.panel{padding:0 16px}.panel-head h2{font-size:14px}.preset{grid-template-columns:42px minmax(0,1fr);min-height:72px;column-gap:6px}.preset svg,.preset.n svg,.preset.s svg{width:42px;height:57px}.preset strong{font-size:11px}.preset span{font-size:9px}.observer-actions button,.toggle-set label{font-size:11px}.current-view p{font-size:11px}.detector-hint{font-size:12px}}
@media(max-width:1179px){#explorer-shell{height:auto;min-height:100dvh;grid-template-rows:auto 1fr auto}.header{height:auto;min-height:60px;flex-wrap:wrap;padding:13px 20px;gap:12px}.header nav{flex-wrap:wrap;gap:14px}.nav-active:after{display:none}#explore{display:block;padding:12px 18px}.workspace-intro{margin-bottom:12px}.workspace{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:650px auto;gap:14px}.acquisition-panel{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:36px minmax(345px,auto);column-gap:24px}.acquisition-panel>.panel-head{grid-column:1/-1}.controls-top{grid-column:1;padding-bottom:15px}.carm-panel{grid-column:2;border-top:0;margin:0;min-height:345px}.angle-fields{gap:15px;padding-top:18px}.preset-section{margin-top:17px}#preset-map{gap:7px}.preset{min-height:74px;grid-template-columns:40px minmax(0,1fr)}.preset svg,.preset.n svg,.preset.s svg{width:40px;height:57px}.carm-visual{min-height:230px}.fit-view #explorer-shell{height:auto}.fit-view body{overflow:auto}footer{padding:10px 18px;flex-wrap:wrap;gap:10px 18px}}
@media(max-width:760px){.header{padding:12px 15px}.brand{font-size:18px;white-space:normal}.brand svg{width:27px}.header nav{width:100%;gap:12px;justify-content:space-between}.header nav a{font-size:10px}.header #toggle-fullscreen{font-size:10px;padding:6px 8px}.workspace-intro{align-items:flex-start;gap:10px}.workspace-intro h1{font-size:12px;max-width:270px}.anatomy-menu{font-size:10px}#explore{padding:10px 12px}.workspace{grid-template-columns:minmax(0,1fr);grid-template-rows:580px 700px auto;gap:14px}.anatomy-panel{grid-row:1}.projection-panel{grid-row:2}.acquisition-panel{grid-column:1;grid-row:3;display:flex;min-height:680px}.panel{padding:0 12px}.controls-top{padding:0}.carm-panel{border-top:1px solid #415159;margin-top:12px;min-height:330px}.carm-visual{min-height:210px}.angle-fields{padding-top:12px;gap:12px}.preset-section{margin-top:9px}.preset{min-height:68px;grid-template-columns:34px minmax(0,1fr)}.preset svg,.preset.n svg,.preset.s svg{width:34px;height:50px}.preset strong{font-size:11px}.projection-toolbar{grid-template-rows:34px 66px}.projection-panel{grid-template-rows:36px 105px minmax(0,1fr) 25px 126px 65px}.current-view p{font-size:11px}.carm-heading h3{font-size:12px}footer>span{white-space:normal}footer{font-size:8px}footer p{font-size:8px}.carm-legend{font-size:9px}.detector-hint{font-size:12px}.drag-axis-hint{font-size:10px}}
@media(prefers-reduced-motion:reduce){.preset,.detector-halo{transition:none}.detector-halo{animation:none}}

.rib-cage-status{position:absolute;left:12px;right:50px;top:27px;font-size:9px;line-height:1.4;color:#b6c8c7;z-index:5;pointer-events:none}

/* Four anatomy choices remain together; future modules use brief anchored bubbles. */
.projection-options{display:block;min-width:0}.projection-options .segmented{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;height:64px;gap:2px}
.projection-options .segmented button{padding:4px 7px;width:100%;height:100%;font-size:11px;line-height:1.3;white-space:normal}
.projection-tabs .color-switch{margin-left:auto;align-self:center}
.coming-soon-option{position:relative;display:block;min-width:0}.coming-soon-option>button{color:#a9bebe;background:transparent}
.coming-soon-option>button[aria-expanded=true]{background:#314948;color:#e0eee6}
.coming-soon-bubble{position:absolute;bottom:calc(100% + 9px);left:50%;transform:translateX(-50%);padding:8px 12px;border:1px solid #a8c9bb;border-radius:12px;background:#d2e5da;color:#203a35;font-size:11px;font-weight:500;line-height:1.3;white-space:nowrap;box-shadow:0 4px 14px #14212360;z-index:20;pointer-events:none}
.coming-soon-bubble:after{content:"";position:absolute;bottom:-5px;left:calc(50% - 4px);width:8px;height:8px;background:#d2e5da;border-right:1px solid #a8c9bb;border-bottom:1px solid #a8c9bb;transform:rotate(45deg)}
@media(max-width:760px){.projection-tabs{gap:12px}.projection-tabs .color-switch{font-size:9px}.projection-options .segmented button{font-size:10px}}
