/* Controls stay outside the clinical image. Native page zoom is never disabled. */
.codex-touch-surface{touch-action:pan-y;overflow:hidden!important;position:relative;overscroll-behavior-x:contain}
.codex-touch-surface.codex-touch-zoomed{touch-action:none;cursor:grab}
.codex-touch-media{transform-origin:center!important;transition:none!important;user-select:none;-webkit-user-select:none;-webkit-user-drag:none}
.codex-plate-nav{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:8px 12px;background:var(--codex-soft,#eaf4ee);border-bottom:1px solid var(--codex-line,#d5e2da);color:var(--codex-track,#0b4a3d)}
.codex-plate-nav button,.codex-image-tools button{min-height:44px;border:1px solid var(--codex-line,#ccdcd4);border-radius:9px;padding:8px 12px;background:var(--codex-surface,#fff);color:var(--codex-track,#0b4a3d);font:600 12px/1.3 var(--codex-sans,Arial,sans-serif);touch-action:manipulation}
.codex-plate-nav button:disabled{opacity:.45;cursor:default}
.codex-plate-nav button:focus-visible,.codex-image-tools button:focus-visible{outline:3px solid var(--codex-track,#0b4a3d);outline-offset:2px}
.codex-touch-hint{font:400 11px/1.4 var(--codex-sans,Arial,sans-serif);margin-left:auto}
.codex-image-tools{display:flex;padding:8px 12px;gap:8px;background:#11262d}
body[data-codex-family='library'] .stage.codex-touch-surface img,body[data-codex-family='library'] .stage.codex-touch-surface.zoom img{width:100%;height:100%;max-width:100%;max-height:100%;flex-shrink:1}
body[data-codex-family='step1'] .view.codex-touch-surface{place-items:center}
body[data-codex-family='step1'] .view.codex-touch-surface img{width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain}
body[data-codex-family='step1'] .view.codex-touch-surface .svgbox{min-width:0;margin:0;flex:none}
body[data-codex-family='step1'] .md .sheet{bottom:calc(var(--codex-controls-height,111px) + 8px);max-height:min(200px,calc(var(--codex-panel-height,334px) - var(--codex-controls-height,111px) - 16px));overflow:auto;overscroll-behavior:contain}
.codex-fact-close{float:right;position:sticky;top:0;min-width:44px;min-height:44px;margin:0 0 6px 10px;border:1px solid #ffffff55;border-radius:50%;background:#fff;color:var(--codex-track,#0b4a3d);font-size:22px;cursor:pointer;touch-action:manipulation}
body[data-codex-family='library'] .viewer-tools>.codex-plate-nav{flex:1 0 100%;padding:8px 0 0;background:none;color:#dbece6;border-color:#ffffff25}
body[data-codex-family='library'] .viewer-tools>.codex-plate-nav .codex-touch-hint{margin-left:0;flex-basis:100%;color:#dbece6}
.asset-media.codex-touch-surface{height:clamp(240px,60svh,650px);min-height:0}
.asset-media.codex-touch-surface img{width:100%;height:100%;max-height:100%;object-fit:contain}
.canvasview.codex-touch-surface{display:grid;place-items:center;height:clamp(340px,65svh,800px);min-height:0;flex:0 0 auto}
.canvasview.codex-touch-surface .vector{min-width:0;margin:0}
@media(max-width:800px),(pointer:coarse){.codex-touch-hint{flex-basis:100%;margin-left:0}.controls button{min-width:44px;min-height:44px;touch-action:manipulation}.codex-plate-nav{justify-content:space-between}body[data-codex-family='step1'] .md::before{content:'';display:block;flex:0 0 60px;background:var(--codex-surface,#f8f7f3);border-bottom:1px solid var(--codex-line,#d5e2da)}}
@media print{.codex-plate-nav,.codex-image-tools{display:none}.codex-touch-surface{height:auto!important;overflow:visible!important}.codex-touch-media{transform:none!important}}
