*{box-sizing:border-box}html,body{margin:0;color:#29463f;font-family:"Microsoft YaHei",system-ui,sans-serif}button,select{font:inherit}button{cursor:pointer}a{color:#327e6d}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.model-stage{display:grid;grid-template-rows:36px minmax(0,1fr) auto;position:relative;background:#fcfcf8;min-width:0}.compare-meta{display:flex;align-items:center;gap:20px;padding:0 18px;color:#71847b;font-size:11px;border-bottom:1px solid #e8eeea}.layout-options{margin-left:auto;display:flex;gap:5px}.layout-options button[aria-pressed=true]{background:#eaf6f0;border-color:#64ad96}
.compare-panels{position:relative;min-height:0;min-width:0;overflow:hidden}.compare-foreground{position:absolute;inset:0;display:grid;grid-template-columns:1fr 1fr;gap:0;z-index:1}.cell-panel{min-width:0;min-height:0;display:grid;grid-template-rows:56px minmax(0,1fr) 40px;position:relative}.cell-panel+ .cell-panel{border-left:1px solid #dce5dc}.panel-heading{display:flex;align-items:center;gap:10px;padding:10px 20px}.side-letter{color:#6d9c89;font:600 12px Georgia,serif}.panel-heading label{min-width:0}.cell-select{font-size:18px;font-weight:650;color:#344f42;border:0;background:transparent;padding:5px 22px 5px 0;max-width:100%;cursor:pointer}.identity-badge{white-space:nowrap;background:#f1f0e7;color:#6c795f;padding:4px 9px;border:1px solid #dfe3d6;border-radius:20px;font-size:11px}.cell-fit{margin-left:auto}.cell-viewport{position:relative;overflow:hidden;min-width:0;min-height:0;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;outline-offset:-3px}.science-plane{position:absolute;left:0;top:0;transform-origin:0 0;will-change:auto}.science-plane svg{display:block;overflow:visible}.cell-art{pointer-events:none}.structure-contour{fill:none;stroke:#b86b51;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke;opacity:.88;pointer-events:none;filter:drop-shadow(0 0 1px #fff)}.structure-contour.secondary{stroke:#609b8a;stroke-width:2;opacity:.75}.structure-contour[data-structure=nucleoid]{stroke-width:3;opacity:.6}.structure-contour[data-structure=cytoplasm]{stroke-dasharray:4 5;stroke-width:2}.label-lines{position:absolute;inset:0;width:100%;height:100%;overflow:hidden;pointer-events:none;z-index:4}.label-lines path{fill:none;stroke:#995a44;stroke-width:1.3}.label-lines circle{fill:#a76a52;stroke:#fff;stroke-width:1.1}.label-layer{position:absolute;inset:0;pointer-events:none;z-index:5}.structure-label{position:absolute;border:1px solid #c6d7cd;border-radius:6px;background:#fffffff2;padding:6px 10px;color:#345347;font-size:13px;box-shadow:0 2px 7px #29463f10;white-space:nowrap;max-width:95%}.structure-label .label-index{display:inline-grid;place-items:center;margin-right:5px;border:1px solid #b46e57;color:#a96149;border-radius:50%;width:16px;height:16px;font-size:10px;font-weight:bold}.structure-label em{display:block;margin:3px 0 0 21px;color:#738578;font-style:normal;font-size:9px}.cell-status{font-size:12px;color:#607568;display:flex;align-items:center;justify-content:center;padding:4px 20px;text-align:center;min-width:0;border-top:1px solid #e9eee6;background:#ffffff78}.cell-status[data-status=absent]{color:#996d50}.cell-status[data-status=not-illustrated]{color:#77808d}.missing-note{position:absolute;right:14px;top:14px;z-index:6;padding:9px 12px;border:1px solid #d5bd9f;border-radius:7px;background:#fffaf0eb;font-size:13px;color:#876447;box-shadow:0 2px 8px #806b4b10;max-width:85%}.missing-note small{display:block;font-size:11px;margin-top:3px;line-height:1.6}.missing-note[data-status=not-illustrated]{border-color:#bac4d0;color:#647488;background:#f7f9fdec}.zoom-hint{position:absolute;right:12px;bottom:6px;font-size:10px;color:#7c8f82;pointer-events:none}.structure-controls{background:#f6f9f5;border-top:1px solid #dce6dc;position:relative;z-index:6}.structure-row{display:flex;align-items:center;justify-content:center;gap:12px;padding:10px 14px 7px;min-width:0}.structure-row>strong{font-size:12px;white-space:nowrap;color:#627b6c}.quick-structures{display:flex;gap:6px;min-width:0;overflow:auto;scrollbar-width:thin}.quick-structures .shell-action{white-space:nowrap;flex:0 0 auto}.quick-structures .shell-action[aria-pressed=true]{background:#e8f3ec;border-color:#70a68e;color:#2b6a50;box-shadow:inset 0 -2px #609578}.more-structure-label{min-width:0}.more-structure-label select{border:1px solid #cddfdc;border-radius:7px;background:#fff;color:#446151;padding:6px;font-size:12px;width:107px}.comparison-result{margin:0;padding:2px 16px 10px;min-height:27px;font-size:12px;text-align:center;color:#647b6b}.compare-panels[data-layout=left] .cell-panel[data-side=right],.compare-panels[data-layout=right] .cell-panel[data-side=left]{grid-template-rows:56px 0 40px}.compare-panels[data-layout=left] .compare-foreground{grid-template-columns:minmax(0,1fr) 230px}.compare-panels[data-layout=right] .compare-foreground{grid-template-columns:230px minmax(0,1fr)}.compare-panels:not([data-layout=compare]) .panel-heading{flex-wrap:wrap;align-content:center}.compare-panels:not([data-layout=compare]) .cell-select{font-size:15px}.compare-panels:not([data-layout=compare]) .identity-badge{display:none}.compare-panels:not([data-layout=compare]) .cell-status{align-self:start;line-height:1.5}.compare-panels:not([data-layout=compare]) .cell-viewport[aria-hidden=true]{visibility:hidden}
@media(max-width:600px) and (orientation:portrait){.model-stage{grid-template-rows:32px minmax(0,1fr) auto}.compare-meta{padding:0 8px;gap:7px;font-size:9px}.compare-meta>span:first-child{display:none}.layout-options{gap:3px}.layout-options .shell-action{font-size:10px;padding:5px 6px}.compare-foreground{grid-template-columns:1fr;grid-template-rows:1fr 1fr}.cell-panel{grid-template-rows:40px minmax(0,1fr) 30px}.cell-panel+.cell-panel{border-left:0;border-top:1px solid #dce5dc}.panel-heading{padding:3px 10px;gap:7px}.cell-select{font-size:15px;padding:3px 10px 3px 0}.identity-badge{font-size:10px;padding:3px 7px}.cell-fit{font-size:10px}.cell-status{font-size:10px;padding:3px 8px;line-height:1.35}.structure-label{font-size:11px;padding:4px 6px}.structure-label em{display:none}.structure-label .label-index{width:14px;height:14px;font-size:9px;margin-right:3px}.structure-row{padding:7px 8px 4px;gap:5px;justify-content:flex-start}.structure-row>strong{display:none}.quick-structures{gap:4px;flex:1}.quick-structures .shell-action{font-size:11px;padding:6px 8px}.more-structure-label select{font-size:10px;width:86px;padding:6px 3px}.comparison-result{font-size:10px;min-height:31px;padding:5px 8px 7px}.missing-note{font-size:11px;right:8px;top:6px;padding:6px 8px}.missing-note small{font-size:10px}.zoom-hint{font-size:9px;bottom:3px}.compare-panels[data-layout=left] .compare-foreground,.compare-panels[data-layout=right] .compare-foreground{grid-template-columns:1fr}.compare-panels[data-layout=left] .compare-foreground{grid-template-rows:minmax(0,1fr) 73px}.compare-panels[data-layout=right] .compare-foreground{grid-template-rows:73px minmax(0,1fr)}.compare-panels[data-layout=left] .cell-panel[data-side=right],.compare-panels[data-layout=right] .cell-panel[data-side=left]{grid-template-rows:40px 0 30px}}
@media(min-width:560px) and (max-height:520px) and (min-aspect-ratio:1.35){.model-stage{grid-template-rows:23px minmax(0,1fr) auto}.compare-meta{font-size:9px;padding:0 10px}.layout-options .shell-action{font-size:10px;padding:2px 6px;min-height:19px}.cell-panel{grid-template-rows:32px minmax(0,1fr) 23px}.panel-heading{padding:2px 12px;gap:7px}.cell-select{font-size:14px;padding:3px 12px 3px 0}.identity-badge{font-size:9px;padding:2px 6px}.cell-fit{font-size:9px;padding:3px 7px}.cell-status{font-size:10px;padding:2px 6px}.structure-row{padding:5px 10px;gap:8px}.structure-row>strong{font-size:10px}.quick-structures .shell-action{font-size:10px;padding:4px 8px}.more-structure-label select{font-size:10px;padding:4px;width:97px}.comparison-result{display:none}.structure-label{font-size:10px;padding:3px 5px}.structure-label em{display:none}.structure-label .label-index{width:13px;height:13px;font-size:8px;margin-right:3px}.missing-note{font-size:10px;padding:5px 7px;right:8px;top:5px}.missing-note small{font-size:9px;margin-top:1px}.zoom-hint{font-size:9px;bottom:3px}.compare-panels[data-layout=left] .cell-panel[data-side=right],.compare-panels[data-layout=right] .cell-panel[data-side=left]{grid-template-rows:35px 0 23px}}
@media(max-width:340px){.layout-options .shell-action{font-size:9px;padding:4px}.compare-meta>span:nth-child(2){font-size:8px}.cell-select{font-size:13px}.side-letter{display:none}.identity-badge{font-size:9px}}
@media(prefers-reduced-motion:no-preference){.structure-contour{transition:opacity .18s ease}}
.model-stage{grid-template-rows:48px minmax(0,1fr) auto}.label-switch{flex:0 0 auto}.label-switch[aria-pressed=true]{background:#eaf6f0;border-color:#70a68e}
@media(max-width:600px) and (orientation:portrait){.model-stage{grid-template-rows:44px minmax(0,1fr) auto}.cell-panel{grid-template-rows:44px minmax(0,1fr) 30px}.label-switch{font-size:10px;padding:6px}.compare-panels[data-layout=left] .cell-panel[data-side=right],.compare-panels[data-layout=right] .cell-panel[data-side=left]{grid-template-rows:44px 0 30px}.compare-panels[data-layout=left] .compare-foreground{grid-template-rows:minmax(0,1fr) 77px}.compare-panels[data-layout=right] .compare-foreground{grid-template-rows:77px minmax(0,1fr)}}
@media(min-width:560px) and (max-height:520px) and (min-aspect-ratio:1.35){.model-stage{grid-template-rows:24px minmax(0,1fr) auto}.label-switch{font-size:10px;padding:4px 8px;min-height:30px}}
/* v2: selected anatomy keeps original color; the remaining anatomy is faded by RGB filter. */
.structure-contour{stroke-width:1.6;stroke:#a8774d;opacity:.72;filter:none}
.structure-contour[data-structure=ribosome]{stroke:#5b9690;stroke-width:1;opacity:.35}
.structure-contour[data-structure=flagellum]{stroke:#f3fcf6;stroke-width:1;opacity:.55}
.structure-contour[data-structure=nucleoid]{stroke-width:1.4;stroke-dasharray:3 5;opacity:.55}
.focused-anatomy{pointer-events:none}
.structure-detail{position:absolute;bottom:15px;left:14px;display:flex;gap:8px;align-items:center;background:#fffffff2;border:1px solid #bad1c7;border-radius:9px;padding:8px 11px;z-index:5;color:#446c5d;box-shadow:0 2px 9px #4164590c;pointer-events:none}
.structure-detail[hidden]{display:none}.structure-detail strong{font-size:11px;display:block;margin-bottom:4px}.structure-detail span{display:block;font-size:10px;line-height:1.65}.structure-detail svg{flex:none}
.cell-panel[data-side=left] .structure-detail{left:98px}
.compare-panels[data-layout=right] .cell-panel[data-side=left] .panel-heading,.compare-panels[data-layout=left] .cell-panel[data-side=right] .panel-heading{flex-wrap:nowrap;padding:8px 12px}
.compare-panels[data-layout=right] .cell-panel[data-side=left] .cell-fit,.compare-panels[data-layout=left] .cell-panel[data-side=right] .cell-fit{display:none}
@media(max-width:600px) and (orientation:portrait){.structure-detail{bottom:6px;left:7px;padding:4px 7px;gap:4px}.structure-detail svg{width:36px;height:39px}.structure-detail strong{font-size:9px;margin:0}.structure-detail span{font-size:9px;line-height:1.4}}
@media(max-width:600px) and (orientation:portrait){.cell-panel .structure-detail{left:70px}}
@media(min-width:560px) and (max-height:520px) and (min-aspect-ratio:1.35){.structure-detail{bottom:4px;left:5px;padding:3px 6px;gap:4px}.structure-detail svg{width:35px;height:35px}.structure-detail strong{font-size:9px;margin:0}.structure-detail span{font-size:9px;line-height:1.3}}

.structure-hit-regions{cursor:pointer}.structure-hit-regions>*{opacity:0}.cell-status{overflow:auto;line-height:1.4}.cell-select{max-width:100%}.panel-heading label{flex:1}.panel-heading .cell-fit{flex:none}.structure-detail{max-width:calc(100% - 102px)}
@media(max-width:600px) and (orientation:portrait){.identity-badge{padding:3px 5px}.structure-detail{max-width:calc(100% - 78px)}}
.model-stage{grid-template-columns:minmax(0,1fr)}.compare-meta,.structure-controls{min-width:0}
@media(max-width:600px) and (max-height:560px) and (orientation:portrait){
 .cell-panel{grid-template-rows:44px minmax(0,1fr) 0}.cell-status{visibility:hidden;padding:0;border:0;min-height:0}
 .comparison-result{display:none}.structure-row{padding-top:4px;padding-bottom:4px}.zoom-hint{display:none}
 .structure-detail{bottom:2px;padding:2px 4px}.structure-detail strong{display:none}.structure-detail svg{width:27px;height:28px}.structure-detail span{font-size:8px}
 .structure-label{font-size:9px;padding:2px 4px}.missing-note{padding:3px 5px;font-size:10px}.missing-note small{display:none}
 .compare-panels[data-layout=left] .compare-foreground{grid-template-rows:minmax(0,1fr) 44px}.compare-panels[data-layout=right] .compare-foreground{grid-template-rows:44px minmax(0,1fr)}
 .compare-panels[data-layout=left] .cell-panel[data-side=right],.compare-panels[data-layout=right] .cell-panel[data-side=left]{grid-template-rows:44px 0 0}
}
/* Content controls join the standard immersive lifecycle without changing its skin. */
.model-area[data-immersive=true] .model-stage{display:block}
.model-area[data-immersive=true] .compare-panels{position:absolute;inset:0}
.model-area[data-immersive=true] .cell-panel{display:block}
.model-area[data-immersive=true] .cell-viewport{position:absolute;inset:0}
.model-area[data-immersive=true] .compare-meta{position:absolute;top:44px;left:0;right:0;height:44px;z-index:8;background:#fcfcf8f2}
.model-area[data-immersive=true] .panel-heading{position:absolute;top:88px;left:0;right:0;height:44px;z-index:8;background:#fcfcf8ed}
.model-area[data-immersive=true] .structure-controls{position:absolute;left:0;right:0;bottom:var(--shell-dock-height,60px);z-index:8}
.model-area[data-immersive=true] .cell-status{position:absolute;left:76px;right:8px;bottom:6px;height:auto;max-height:34px;padding:3px;border:0;visibility:visible;background:#fcfcf8d9;z-index:5}
.model-area[data-immersive=true] .structure-detail{bottom:46px}
.model-area[data-immersive=true][data-chrome=hidden] :is(.compare-meta,.structure-controls,.panel-heading){opacity:0;visibility:hidden;pointer-events:none}

/* Screen labels keep stable nodes; camera and leaders update in the same frame. */
.structure-label{left:0;top:0;will-change:transform}
/* Isolate moving scientific paint from page chrome; keep native SVG resolution. */
.cell-viewport{contain:strict}
/* Keep SVG mask/filter painting in its native coordinate space when the parent camera resizes. */
.science-plane>svg{width:100%;height:100%;transform:none}
.label-lines,.label-layer{contain:strict;transform:translateZ(0)}
