/* ConnectomeFlight interface. Media and scientific color scales stay in the display assets. */
:root {
  --bg:#0a1118; --panel:#121e28; --panel-raised:#182630; --line:#29404b;
  --muted:#9bb0bd; --text:#e8f1f4; --mint:#b9e8d3; --lime:#b9e8d3;
  --surface-border:#a2c6d122; --surface-shadow:0 4px 18px #0000001c;
  --header-height:64px; --footer-height:30px;
}
html { scroll-behavior:smooth; scrollbar-color:#3d5864 #0a1118; scrollbar-width:thin; }
body { background:var(--bg); -webkit-font-smoothing:antialiased; }
[hidden], .hidden { display:none !important; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
.skip-link { position:fixed; left:16px; top:-80px; z-index:100; padding:12px 18px; border-radius:8px; background:var(--mint); color:#123b2e; }
.skip-link:focus { top:12px; }
button, select, input { -webkit-tap-highlight-color:transparent; }
button, select { transition:background .16s ease,border-color .16s ease,color .16s ease; }
button { background:#172731; border:1px solid #aecad126; border-radius:8px; font-weight:500; }
button:hover:not(:disabled) { color:#edf8f2; background:#233d43; border-color:#b9e8d357; }
button:disabled { cursor:default; opacity:.42; }
button:active:not(:disabled) { background:#304c4e; }
:focus-visible { outline:2px solid var(--mint); outline-offset:3px; }
#flight-panel:focus { outline:none; }
a { text-underline-offset:4px; }
.ui-icon { width:16px; height:16px; flex:0 0 16px; fill:none; stroke:currentColor; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round; }
.quiet-button { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:36px; padding:7px 11px; color:#bfd0d9; background:transparent; font-size:11px; }
.topbar { height:var(--header-height); padding:0 18px; gap:16px; background:#101b24; border-bottom:1px solid #a2c6d11c; }
.brand { gap:10px; flex-shrink:0; }
.brand strong { font-size:20px; font-weight:650; letter-spacing:-.045em; line-height:1.15; }
.brand-mark img { display:block; width:31px; height:31px; border:1px solid #b9e8d32b; border-radius:9px; }
.brand-subtitle { margin-left:5px; padding-left:14px; border-left:1px solid #aecad124; color:#91aab9; font-size:11px; letter-spacing:.035em; white-space:nowrap; }
.task-switcher.difficulty-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); flex:0 0 318px; padding:4px; gap:4px; background:#09131b; border:1px solid #abc5cf1c; border-radius:11px; }
.task-switcher .difficulty { min-height:34px; padding:7px 12px; background:transparent; border:1px solid transparent; border-radius:7px; color:#a1b7c4; white-space:nowrap; }
.task-switcher .difficulty strong { font-size:12px; font-weight:550; }
.task-switcher .difficulty.active { background:#254339; border-color:#b9e8d33b; color:#d8f3e6; box-shadow:inset 0 1px #d9ffe511; }
.top-status { gap:7px; color:#a6bcc7; margin-left:auto; min-width:0; }
#playback-status { display:inline; }
.live-dot { width:5px; height:5px; flex:0 0 5px; background:#a8b8c3; box-shadow:0 0 0 3px #a8b8c30b; }
.top-status[data-state=playing] .live-dot { background:#b9e8d3; box-shadow:0 0 0 3px #b9e8d318; }
.top-status[data-state=loading] .live-dot, .top-status[data-state=buffering] .live-dot { background:#e1c48c; }
.top-status[data-state=error] .live-dot { background:#e6b6a6; }
.model-tag { color:#a7bfcc; padding-left:11px; margin-left:4px; border-left:1px solid #aecad127; overflow:hidden; text-overflow:ellipsis; font-size:10px; }
#share-open, #info-open { flex-shrink:0; }
.column-heading h2, .section-heading h2, .right-head h2, .network-heading h2 { display:flex; align-items:center; gap:7px; font-size:13px; font-weight:600; letter-spacing:.01em; }
.column-heading { min-height:26px; padding:0 2px; }
.column-heading > span, .right-head > span { color:#9ab0bd; font-size:10px; }
.column-heading .ui-icon { color:#9acddd; }
.section-heading .ui-icon, .right-head .ui-icon { color:#acc8d1; }
.network-heading .ui-icon { color:#b9e8d3; }
.workspace {
  --workspace-gap:12px; --workspace-x:14px; --workspace-y:12px;
  --usable-height:calc(100dvh - var(--header-height) - var(--footer-height) - var(--workspace-y) * 2);
  --network-min:min(clamp(278px,calc(var(--usable-height) * .47),430px),calc(var(--usable-height) - 248px - var(--workspace-gap)));
  --flight-height:min(calc((var(--center-width) - 10px) * 9 / 32 + 116px),calc(var(--usable-height) - var(--workspace-gap) - var(--network-min)));
  height:calc(100dvh - var(--header-height) - var(--footer-height));
}
.input-column { grid-template-rows:26px minmax(0,.9fr) minmax(0,1fr) minmax(0,1.36fr); gap:9px; }
.multimodal .input-column { grid-template-rows:26px minmax(104px,.88fr) minmax(112px,1fr) minmax(176px,1.38fr) 104px; }
.readout-card, .trajectory-card, .output-card, .model-network-card { background:var(--panel); border:1px solid var(--surface-border); border-radius:12px; box-shadow:var(--surface-shadow),inset 0 1px #ffffff03; }
.readout-card { padding:10px; gap:7px; }
.card-head { gap:7px; }
.card-head h2 { font-size:12px; font-weight:550; color:#dae7ec; }
.eye-card { --accent:#a2d2e5; }
.hex-card { --accent:#b2dfc4; }
.t4-card { --accent:#e5c893; }
.odor-card { --accent:#cdbce6; }
.card-index { display:grid; place-items:center; width:18px; height:18px; flex:0 0 18px; border-radius:5px; background:color-mix(in srgb,var(--accent) 12%,transparent); color:var(--accent); font-size:9px; }
.card-tag { font-variant-numeric:tabular-nums; color:#93adbd; }
.eye-pair canvas { border:1px solid #a2c6d128; border-radius:6px; background:#0b151e; }
.hex-pair canvas { border-radius:6px; }
figcaption, .readout-caption { color:#a4b9c5; line-height:1.4; }
.readout-caption { font-size:10px; }
.multimodal .eye-card .readout-caption { display:none; }
.scale-line { color:#a4bac4; font-size:9px; }
.scale-line i { height:3px; }
.cell-controls { gap:4px; }
.cell-controls button { min-height:25px; padding:4px 0; font-size:10px; background:#0c1720; border-color:#abc5cf19; color:#b1c8d3; border-radius:5px; }
.cell-controls button.selected { color:#123d2d; background:var(--mint); border-color:var(--mint); font-weight:650; }
.odor-card { gap:6px; }
.odor-row { display:flex; align-items:center; gap:8px; color:#b0c5d1; font-size:10px; }
.odor-row meter { flex:1; min-width:20px; height:10px; accent-color:#cdbce6; }
.odor-row meter::-webkit-meter-bar { background:#293842; border:0; border-radius:4px; }
.odor-row meter::-webkit-meter-optimum-value { background:#c9b8e0; border-radius:4px; }
.odor-row meter::-moz-meter-bar { background:#c9b8e0; border-radius:4px; }
.odor-row strong { color:#d7cbe6; font:10px ui-monospace,monospace; font-variant-numeric:tabular-nums; }
.flight-panel { position:relative; grid-template-rows:56px minmax(0,1fr) 52px; gap:4px; border-radius:12px; background:#101b24; box-shadow:inset 0 0 0 1px #aecad11a; }
.flight-panel > .section-heading { display:grid; grid-template-columns:minmax(105px,1fr) minmax(275px,1.8fr) auto; gap:12px; padding:0 10px; }
.flight-panel > .section-heading h2 { white-space:nowrap; }
#scene-id { display:none; }
.scene-choices { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:5px; min-width:0; }
.scene-choice { position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; min-height:42px; min-width:0; padding:6px 8px; background:#0b161e; border-color:#abc5cf1a; border-radius:8px; line-height:1.1; }
.scene-name { color:#b0c5d0; font-size:11px; font-weight:550; font-variant-numeric:tabular-nums; }
.scene-detail { color:#92acbb; font-size:10px; white-space:nowrap; }
.scene-choice.active { background:#254139; border-color:#b9e8d34f; }
.scene-choice.active .scene-name { color:#e0f4e8; }
.scene-choice.active .scene-detail { color:#b9dccb; }
.scene-choice.active::after { content:""; position:absolute; bottom:-1px; left:28%; right:28%; height:2px; border-radius:2px; background:var(--mint); }
#frame-label { display:block; color:#bed2db; font:10px ui-monospace,monospace; padding:5px 7px; background:#1a2a34; border:1px solid #b3d1d61c; border-radius:6px; font-variant-numeric:tabular-nums; }
.camera-pair { gap:8px; }
.camera-card { border:1px solid #abc5cf2b; border-radius:9px; box-shadow:none; background:#08131a; }
.camera-overlay { left:9px; right:9px; }
.badge, .camera-overlay-bottom span { border:1px solid #cfdee52b; border-radius:5px; background:#07121bd4; color:#edf5f5; backdrop-filter:blur(6px); }
.badge { padding:5px 7px; font-size:9px; letter-spacing:.025em; }
.camera-overlay-bottom span { padding:4px 5px; }
.camera-zoom-button { display:grid; place-items:center; width:30px; height:30px; color:#dbeee8; background:#07121bcc; border-color:#cfdee552; border-radius:7px; }
.transport { gap:5px; padding:4px 7px; border:1px solid #abc5cf1c; background:#182832; border-radius:9px; }
.play-button, .step-button { display:grid; place-items:center; width:32px; height:34px; flex:0 0 32px; }
.play-button { background:var(--mint); border-color:var(--mint); color:#133d2d; font-size:0; }
.play-button::before { content:""; width:9px; height:11px; margin-left:2px; background:currentColor; clip-path:polygon(0 0,100% 50%,0 100%); }
.play-button[aria-label="暂停"]::before { width:9px; height:11px; margin-left:0; clip-path:none; background:linear-gradient(to right,currentColor 0 35%,transparent 35% 65%,currentColor 65% 100%); }
.play-button:hover:not(:disabled) { background:#d3f4e3; border-color:#d3f4e3; color:#133d2d; }
.step-button { border-color:transparent; background:transparent; color:#b8ccd5; }
.step-button .ui-icon { width:15px; height:15px; }
#loop-button[aria-pressed=true] { background:#b9e8d31a; border-color:#b9e8d35c; color:var(--mint); }
.timeline-control { flex:1; min-width:0; margin:0 7px; }
#timeline { display:block; width:100%; margin:0; }
.timeline-meta { display:flex; align-items:center; justify-content:space-between; gap:8px; color:#a3bdc9; font-size:9px; line-height:1.3; white-space:nowrap; }
.timeline-meta strong { font:9px ui-monospace,monospace; color:#cedfe5; font-variant-numeric:tabular-nums; }
.speed-control { gap:5px; }
.speed-control > span { display:none; }
.speed-control select { min-height:32px; padding:4px 6px; background:#0d1923; border-color:#abc5cf29; color:#c1d5e0; border-radius:6px; font-size:11px; }
input[type=range] { appearance:none; -webkit-appearance:none; height:22px; background:transparent; accent-color:var(--mint); }
input[type=range]::-webkit-slider-runnable-track { height:3px; border-radius:4px; background:linear-gradient(to right,var(--mint) var(--progress,0%),#3b515d var(--progress,0%)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance:none; width:12px; height:12px; margin-top:-4.5px; border:2px solid var(--mint); border-radius:50%; background:var(--mint); box-shadow:0 0 0 3px #b9e8d314; }
input[type=range]::-moz-range-track { height:3px; background:#3b515d; border-radius:4px; }
input[type=range]::-moz-range-progress { height:3px; background:var(--mint); }
input[type=range]::-moz-range-thumb { width:9px; height:9px; background:var(--mint); border:2px solid var(--mint); border-radius:50%; }
.panel-divider { position:absolute; z-index:3; left:12px; right:12px; bottom:calc(-1 * var(--workspace-gap)); height:var(--workspace-gap); display:flex; align-items:center; justify-content:center; cursor:row-resize; touch-action:none; border-radius:4px; }
.panel-divider::before { content:""; width:44px; height:3px; border-radius:4px; background:#789b8b66; transition:width .15s,background .15s; }
.panel-divider:hover::before, .panel-divider:focus-visible::before, .is-resizing .panel-divider::before { width:64px; background:var(--mint); }
.panel-divider:focus-visible { outline:1px solid #b9e8d370; outline-offset:0; }
.is-resizing { cursor:row-resize; user-select:none; }
.right-column { gap:10px; }
.trajectory-card, .output-card { padding:12px; }
.trajectory-card { gap:11px; }
.task-summary { min-height:28px; color:#a4bcc8; font-size:11px; line-height:1.6; }
.trajectory-map { border:1px solid #abc5cf1b; background:#0d1820; border-radius:8px; }
.map-legend { color:#a5bac7; font-size:10px; gap:8px 4px; }
.legend-line, .legend-fly { background:#a9dfc7; }
.legend-pending { border-color:#617b84; }
.legend-obstacle { background:#2b414b; border:1px solid #728b96; }
.legend-start { border-color:#a9dfc7; }
.legend-target { border-color:#dfbb83; }
.position-readout { padding-top:10px; border-color:#a2c6d11c; }
.position-readout small { color:#a1b6c3; }
.position-readout strong { font-size:11px; color:#e1edf1; font-variant-numeric:tabular-nums; }
.output-card .right-head { margin-bottom:14px; }
.output-card .right-head > span { font-size:9px; }
.network-action-summary { gap:11px; }
.network-action-summary span { font-size:11px; color:#aac1cd; }
.network-action-summary strong { color:#cce7da; font-size:17px; font-weight:500; font-variant-numeric:tabular-nums; }
.network-action-summary i { height:3px; background:#334953; }
.network-action-summary i::after { background:#8eabba; }
.network-action-summary b { background:#a9dfc7; }
.network-action-summary .negative b { background:#8fb6d5; }
.output-caption { margin-top:12px; color:#9cb2c0; font-size:9px; line-height:1.6; }
.model-network-card { grid-template-rows:30px minmax(0,1fr) 25px; padding:10px; gap:6px; border-color:#aacbd232; background:#121f28; }
.network-heading { padding:0 2px; }
.network-heading-actions { gap:5px; }
.network-heading-actions button { display:inline-flex; align-items:center; justify-content:center; gap:5px; min-height:30px; padding:4px 9px; border-radius:7px; color:#c1d5df; background:#1b2d37; border-color:#a2c6d127; }
.network-heading-actions .ui-icon { width:13px; height:13px; flex-basis:13px; }
.network-flow-note { margin-left:auto; margin-right:12px; color:#96aebb; font-size:10px; }
.flow-odor { display:none; }
.multimodal .flow-odor { display:inline; }
.network-canvas-shell { border:1px solid #abc5cf1a; background:#0d1720; border-radius:8px; }
.network-legend { font-size:9px; gap:8px; color:#a8c0c9; }
.network-color-scale i { width:44px; height:3px; }
.network-help { margin-right:auto; margin-left:5px; color:#9ab2c0; }
.network-mobile-help { display:none; }
.network-pan-hint { display:none; }
#network-sync { color:#a9c8bd; font-size:9px; }
.network-inspector { color:#b6cdd6; background:#142630; }
#network-inspector { display:none; position:absolute; bottom:7px; left:7px; right:7px; padding:7px 9px; max-height:64px; border:1px solid #b9e8d33b; border-radius:6px; background:#162b36f5; color:#d3e7e7; box-shadow:0 4px 15px #0005; pointer-events:none; font-size:11px; }
.has-inspection #network-inspector { display:block; }
.network-load { z-index:1; background:#101d27f5; color:#c9e0d8; }
.footer { height:var(--footer-height); padding:0 16px 4px; color:#94adbc; font-size:9px; }
dialog { color:var(--text); background:#13212c; border:1px solid #b3cfd23b; border-radius:15px; padding:0; box-shadow:0 28px 100px #000a; }
dialog[open] { animation:dialog-enter .16s ease-out; }
body:has(dialog[open]) { overflow:hidden; }
dialog::backdrop { background:#030b13ce; backdrop-filter:blur(6px); }
.dialog-head { padding:16px 18px; gap:14px; border-color:#a2c6d124; flex-shrink:0; }
.dialog-head h2 { font-size:16px; font-weight:600; line-height:1.5; letter-spacing:-.01em; }
.dialog-head p { color:#a6bfcc; font-size:11px; line-height:1.6; }
.dialog-head button { display:grid; place-items:center; width:36px; height:36px; flex:0 0 36px; border-radius:8px; color:#c0d5e0; background:#20343f; border-color:#aecad129; font-size:24px; }
.info-dialog { width:690px; }
.info-dialog .dialog-head { background:#13212c; }
.info-content { padding:20px 24px; color:#b2c8d4; font-size:13px; line-height:1.85; }
.info-content p { color:#b2c8d4; }
.info-section { padding-bottom:20px; margin-bottom:20px; border-bottom:1px solid #a2c6d120; }
.info-section:last-child { margin-bottom:0; padding-bottom:0; border:0; }
.info-section h3 { margin:0 0 10px; color:#e0eee9; font-size:13px; font-weight:600; }
.info-section p + p { margin-top:10px; }
.info-content a { color:var(--mint); text-decoration:underline; text-decoration-color:#b9e8d360; }
.shortcut-list { display:flex; flex-wrap:wrap; gap:10px 18px; margin-bottom:12px; font-size:12px; }
.shortcut-list > span { display:inline-flex; align-items:center; gap:7px; }
kbd { display:inline-flex; justify-content:center; align-items:center; min-width:25px; min-height:25px; padding:2px 6px; background:#20333e; border:1px solid #a7c2cd36; border-bottom-width:2px; border-radius:5px; color:#d7ece2; font:11px ui-monospace,monospace; }
.network-details summary { padding:10px 0; color:var(--mint); }
.network-cell-types { gap:6px; }
.network-cell-types button { min-height:34px; padding:6px 9px; background:#1b303c; border-color:#a2c6d12c; color:#c0d5df; }
.network-cell-types button[aria-pressed=true] { color:#123d2d; background:var(--mint); border-color:var(--mint); }
.dialog-transport { display:flex; align-items:center; gap:12px; padding:12px 16px; flex-shrink:0; border-block:1px solid #a2c6d11c; background:#10202b; }
.dialog-transport input, .network-dialog-foot input { flex:1; min-width:0; }
.dialog-transport [data-playback-time] { font:11px ui-monospace,monospace; color:#bfd6e1; white-space:nowrap; }
.dialog-transport .network-play, .network-dialog-foot .network-play { min-height:36px; padding:6px 12px; color:#123d2d; background:var(--mint); border-color:var(--mint); border-radius:7px; }
.camera-dialog[open] { display:flex; flex-direction:column; }
.camera-dialog-foot { flex-shrink:0; padding:12px 16px; color:#aec4d0; font-size:11px; }
.camera-dialog-foot a { color:var(--mint); text-decoration:underline; }
.network-dialog { background:#11202a; }
.network-dialog-scroll { margin:0 12px; border:1px solid #a2c6d11c; border-radius:9px; background:#0d1720; overscroll-behavior-x:contain; }
.multimodal .network-dialog-scroll canvas { min-width:960px; }
.network-dialog .network-inspector { margin:10px 16px 0; padding:6px 10px; border-left:2px solid #b9e8d36b; border-radius:0; background:transparent; color:#abc4d0; }
.network-dialog-foot { padding:12px 16px; gap:12px; }
.share-dialog { width:560px; }
.share-content { display:flex; flex-direction:column; gap:15px; padding:22px; color:#afc6d3; font-size:12px; line-height:1.7; }
.share-option { display:flex; align-items:center; gap:8px; color:#d8e8e6; }
.share-option input { accent-color:var(--mint); width:16px; height:16px; }
.share-link-row { display:flex; align-items:stretch; gap:8px; }
#share-url { min-width:0; flex:1; padding:11px; border:1px solid #a2c6d138; border-radius:7px; background:#0a1822; color:#c3d9e2; font:11px ui-monospace,monospace; }
#share-copy { min-height:42px; padding:8px 14px; flex-shrink:0; color:#123d2d; background:var(--mint); border-color:var(--mint); }
#share-feedback { color:#a9c2cf; font-size:11px; }
.toast { position:fixed; z-index:20; bottom:24px; left:50%; transform:translateX(-50%); max-width:calc(100vw - 32px); padding:11px 18px; border:1px solid #b9e8d34d; border-radius:10px; background:#1b3733; color:#e2f3e9; box-shadow:0 8px 28px #0005; text-align:center; font-size:12px; }
.loading { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; padding:22px; background:#0e1c27f7; color:#c9e3d8; border-radius:9px; line-height:1.6; }
.loading p { max-width:360px; text-align:center; font-size:12px; }
.loading small { color:#a1bdca; font-size:10px; }
.loading-orbit { display:block; width:27px; height:27px; border:1px solid #b9e8d32b; border-top-color:var(--mint); border-radius:50%; animation:observatory-loading 1.1s linear infinite; }
.loading-steps { display:flex; align-items:center; gap:10px; color:#a4bdca; font-size:10px; }
.loading-steps span::before { content:""; display:inline-block; width:5px; height:5px; margin-right:6px; border-radius:50%; background:#68828c; vertical-align:middle; }
.loading-steps .complete { color:var(--mint); }
.loading-steps .complete::before { background:var(--mint); }
.loading-steps i { width:22px; border-top:1px solid #a2c6d138; }
.load-failed .loading-orbit { animation:none; border-color:#e0bd896b; border-top-color:#e0bd89; }
#retry-load { min-height:40px; padding:8px 16px; background:#28483d; border-color:#b9e8d357; color:#d8f0e3; }
.noscript-message { position:fixed; inset:25% 15%; z-index:30; display:grid; place-content:center; padding:30px; background:#152d38; border:1px solid #b9e8d3; border-radius:12px; }
@keyframes observatory-loading { to { transform:rotate(360deg); } }
@keyframes dialog-enter { from { opacity:0; transform:translateY(5px); } to { opacity:1; transform:translateY(0); } }
@media (max-width:1490px) { .brand-subtitle { display:none; } }
@media (max-width:1190px) { .model-tag { max-width:220px; } .network-help, .network-flow-note { display:none; } .topbar { gap:10px; } }
@media (max-width:1024px) { .multimodal .network-pan-hint { display:inline; } }
@media (max-width:1099px) {
  .topbar { height:auto; min-height:112px; padding:12px 16px; display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:10px; }
  .brand { grid-column:1; grid-row:1; }
  #share-open { grid-column:2; grid-row:1; }
  #info-open { grid-column:3; grid-row:1; }
  .task-switcher.difficulty-list { grid-column:1; grid-row:2; width:min(440px,100%); }
  .task-switcher .difficulty { min-height:36px; }
  .top-status { grid-column:2/-1; grid-row:2; margin:0; justify-content:flex-end; }
  .model-tag { padding-left:7px; font-size:10px; }
}
@media (max-width:1099px) {
  .workspace { height:auto; padding:14px; gap:14px; grid-template-columns:minmax(0,1.18fr) minmax(260px,.82fr); grid-template-rows:auto; grid-template-areas:"flight flight" "network network" "inputs trajectory"; }
  .flight-panel { grid-template-rows:56px auto 52px; }
  .camera-card { height:auto; width:100%; aspect-ratio:16/9; }
  .model-network-card { height:390px; min-height:390px; }
  .panel-divider { display:none !important; }
  .input-column, .multimodal .input-column { grid-template-columns:repeat(2,minmax(0,1fr)); grid-template-rows:26px; grid-auto-rows:auto; gap:10px; }
  .column-heading { grid-column:1/-1; }
  .readout-card, .multimodal .readout-card { min-height:0; height:210px; padding:12px; gap:8px; }
  .t4-card { grid-column:1/-1; height:250px; }
  .t4-card .cell-controls { grid-template-columns:repeat(8,minmax(0,1fr)); }
  .t4-card .hex-pair { max-width:380px; width:100%; margin:auto; }
  .cell-controls button { min-height:32px; }
  .odor-card { grid-column:1/-1; height:142px; }
  .odor-row { font-size:11px; gap:10px; }
  .odor-row strong { font-size:11px; }
  .odor-row meter { height:14px; }
  .hex-pair canvas { max-height:130px; }
  .eye-pair canvas { max-height:125px; width:100%; }
  .multimodal .eye-card .readout-caption { display:block; }
  .right-column { display:flex; align-items:stretch; gap:12px; }
  .trajectory-card { flex:1; height:auto; min-height:340px; }
  .output-card { flex-shrink:0; }
  .output-caption { display:block; }
  .footer { height:auto; min-height:34px; padding:10px 16px 14px; }
}
@media (max-width:759px) {
  .topbar { padding:12px; grid-template-columns:minmax(0,1fr) 44px 44px; gap:10px 8px; }
  .brand strong { font-size:20px; }
  #share-open, #info-open { width:44px; height:44px; padding:0; }
  #share-open span, #info-open .button-label { display:none; }
  #share-open .ui-icon, #info-open .ui-icon { display:block; width:17px; height:17px; flex-basis:17px; }
  .task-switcher.difficulty-list { grid-column:1/-1; grid-row:2; width:100%; }
  .task-switcher .difficulty { min-height:44px; }
  .task-switcher .difficulty strong { font-size:13px; }
  .top-status { grid-column:1/-1; grid-row:3; justify-content:center; min-height:17px; }
  .model-tag { display:block !important; max-width:none; padding-left:8px; margin-left:0; border-color:#aecad124; }
  .workspace { grid-template-columns:1fr; grid-template-areas:"flight" "network" "inputs" "trajectory"; padding:10px; gap:14px; }
  .flight-panel { grid-template-rows:84px auto 104px; }
  .flight-panel > .section-heading { grid-template-columns:minmax(0,1fr) auto; grid-template-rows:27px 46px; gap:4px 10px; padding:3px 7px; }
  .flight-panel > .section-heading h2 { grid-column:1; grid-row:1; }
  .section-meta { grid-column:2; grid-row:1; }
  .scene-choices { grid-column:1/-1; grid-row:2; gap:6px; }
  .scene-choice { min-height:44px; }
  .scene-name { font-size:12px; }
  .scene-detail { font-size:10px; }
  .transport { display:grid; grid-template-columns:repeat(5,minmax(40px,1fr)) 50px; grid-template-rows:44px 44px; gap:2px; padding:5px; }
  .play-button, .step-button { width:100%; height:44px; min-width:40px; }
  .play-button { grid-column:1; grid-row:1; }
  #restart-button { grid-column:2; grid-row:1; }
  #step-back { grid-column:3; grid-row:1; }
  #step-forward { grid-column:4; grid-row:1; }
  #loop-button { grid-column:5; grid-row:1; }
  .speed-control { grid-column:6; grid-row:1; justify-content:flex-end; }
  .speed-control select { min-height:44px; width:50px; font-size:12px; }
  .timeline-control { grid-column:1/-1; grid-row:2; margin:0 5px; }
  .timeline-meta, .timeline-meta strong { font-size:10px; }
  input[type=range] { height:28px; }
  input[type=range]::-webkit-slider-thumb { width:17px; height:17px; margin-top:-7px; }
  input[type=range]::-moz-range-thumb { width:14px; height:14px; }
  .camera-pair { grid-template-columns:1fr; }
  .camera-zoom-button { width:44px; height:44px; }
  .camera-overlay { left:10px; right:10px; }
  .camera-overlay-top { top:10px; }
  .camera-overlay-bottom { bottom:10px; font-size:9px; }
  .camera-overlay-bottom span:last-child { font-size:9px; }
  .model-network-card { height:410px; min-height:410px; padding:10px; grid-template-rows:40px minmax(0,1fr) 36px; gap:7px; }
  .network-heading-actions button { min-height:38px; padding:7px 10px; font-size:11px; }
  .network-canvas-shell { overflow-x:auto; overscroll-behavior-x:contain; scrollbar-width:thin; scrollbar-color:#42635f #0d1720; }
  .network-canvas-shell canvas { min-width:760px; touch-action:pan-x pan-y; }
  .network-mobile-help { display:block; color:#a9c6d0; }
  .network-legend { display:grid; grid-template-columns:auto 1fr; gap:5px 10px; align-items:center; }
  .network-color-scale { grid-column:1; grid-row:1; }
  .network-color-scale i { width:32px; }
  .network-mobile-help { grid-column:2; grid-row:1; text-align:right; font-size:10px; }
  #network-sync { grid-column:1/-1; grid-row:2; font-size:9px; }
  .readout-card, .multimodal .readout-card { height:210px; padding:11px; gap:8px; }
  .card-tag { display:block; }
  .eye-pair canvas { max-height:115px; }
  .t4-card, .multimodal .t4-card { height:260px; }
  .t4-card .cell-controls { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .cell-controls button { min-height:44px; font-size:11px; }
  .odor-card, .multimodal .odor-card { height:145px; }
  .trajectory-card { height:400px; min-height:400px; padding:14px; }
  .output-card { padding:15px; }
  .network-action-summary span { font-size:12px; }
  .network-action-summary strong { font-size:18px; }
  .output-caption { font-size:10px; }
  .footer { padding:5px 12px 16px; font-size:10px; line-height:1.5; }
  .footer span:last-child { display:none; }
  dialog { max-width:calc(100vw - 16px); max-height:calc(100dvh - 16px); border-radius:13px; }
  .dialog-head { padding:12px; gap:10px; }
  .dialog-head h2 { font-size:14px; }
  .dialog-head button { width:42px; height:42px; flex-basis:42px; }
  .info-content { padding:18px; font-size:12px; }
  .network-cell-types button { min-height:44px; min-width:44px; }
  .dialog-transport { padding:10px; gap:10px; flex-wrap:wrap; }
  .dialog-transport .network-play, .network-dialog-foot .network-play { min-height:42px; padding:8px 12px; }
  .dialog-transport input { min-width:90px; }
  .dialog-transport [data-playback-time] { font-size:10px; }
  .network-dialog-foot { padding:10px; gap:8px; flex-wrap:wrap; }
  #network-dialog-status { width:100%; font-size:10px; }
  .network-dialog-foot input { min-width:100px; }
  .network-dialog .dialog-head { padding:12px; }
  .network-dialog .dialog-head h2 { font-size:13px; }
  .network-pan-hint { display:inline; }
  .network-dialog-scroll { margin:0 8px; }
  .camera-dialog-foot { padding:12px; font-size:10px; }
  .share-content { padding:18px; }
  .share-link-row { flex-direction:column; }
  #share-url { min-height:44px; }
  #share-copy, #retry-load { min-height:44px; }
}
@media (max-width:520px) { .input-column, .multimodal .input-column { grid-template-columns:1fr; } .card-tag { display:block; } }
@media (max-width:359px) { .brand strong { font-size:18px; } .brand-mark img { width:27px; height:27px; } .brand { gap:7px; } .top-status { font-size:9px; gap:5px; } .model-tag { font-size:9px; } .flight-panel > .section-heading { gap:4px 6px; } }
@media (prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } *, *::before, *::after { animation:none !important; transition:none !important; } .loading-orbit { border-right-color:var(--mint); } }


/* Keep the complete desktop observatory inside one viewport. */
@media (min-width:1100px) {
  html, body { height:100%; }
}
@media (min-width:1100px) and (max-height:800px) {
  .workspace {
    --workspace-gap:8px;
    --workspace-x:10px;
    --workspace-y:8px;
    --network-min:min(clamp(210px,34dvh,330px),calc(var(--usable-height) - 200px - var(--workspace-gap)));
    --flight-height:min(calc((var(--center-width) - 8px) * 9 / 32 + 92px),calc(var(--usable-height) - var(--workspace-gap) - var(--network-min)));
  }
  .flight-panel { grid-template-rows:46px minmax(0,1fr) 44px; }
  .flight-panel > .section-heading { padding:0 8px; gap:8px; }
  .transport { padding:3px 6px; }
  .input-column { grid-template-rows:22px minmax(0,.9fr) minmax(0,1fr) minmax(0,1.3fr); gap:6px; }
  .readout-card { padding:8px; gap:5px; }
  .readout-caption { display:none; }
  .card-head h2 { font-size:11px; }
  .model-network-card { padding:8px; grid-template-rows:26px minmax(0,1fr) 20px; gap:5px; }
  .trajectory-card, .output-card { padding:9px; }
  .trajectory-card { gap:7px; }
  .output-card .right-head { margin-bottom:9px; }
  .output-caption { display:none; }
}
