/* Build 158–159 (Eric, Nov 5, 2026, from his 1324 x 856 window).
   158: "4-5 panels that extend up from the bottom of the screen, but not too tall. When closed, they are a thin
   layer along the entire bottom width of the screen. Each one extends up."
   159: "Make the controls logical, accessible, consistent, and organized visually so they preserve as much open
   screen as possible for viewing the action."

   Desktop (wider than 700 px):
   - Five drawers share the bottom edge: Contact | Tactical | Flight | Navigate | Sensors (Build 162, Eric's mockup,
     Nov 6: "Better layout, more logical and best for the viewer screen"), all the same width.
     Closed, each is a 28 px bar, and together they make one thin strip across the whole width. Open, a drawer
     grows up from its own bar, which stays put.
   - One rule for all of them: click a bar to open or close it; an open drawer also closes from the grip along its
     top edge (and from its title: the contact's name, Flight's readings). Clicks on a drawer's contents never fold
     it. Status follows the same rule from the top edge, opening downward.
   - View sits at the top right under the Menu; the scan reading or tip under the ship's name.
   - Flight is one decision, in plain rows: Stop ¼ ½ Full Auto; − + and Back away; the four Turbo levels, with
     the reason when Turbo is unavailable; the zone and its limit; the course. The speed slider, the Cruise row and
     the separate Turbo hold, lock and factor controls are gone (Eric, Nov 5: remove them).
   Every element id and handler is unchanged; the drawer wiring lives in controls-layout.js. Phones keep their
   stacked layout, minus the controls removed for everyone. */

html[data-controls="new"] body #sim #helmDock .helm-group{display:contents}
html[data-controls="new"] body #sim .drawer-grip{display:none}
/* Removed for every layout (Build 159): the slider, Cruise, and the hold/lock/factor Turbo controls. */
#sim #helmDock :is(.speed-scale-bands,.speed-scale-track,.speed-scale-ticks,#localImpulseLabel,.speed-advanced-turbo,#throttleMenu,.cruise-row){display:none!important}
#sim #helmDock #turboReason:empty{display:none}
#sim #helmDock .speed-turbo-presets{grid-template-columns:auto repeat(4,minmax(0,1fr));align-items:center;height:auto!important;row-gap:3px}
#sim #helmDock .turbo-chip-label{padding-right:3px;font-size:9px;letter-spacing:1px;text-transform:uppercase;color:var(--amber,#f2c46d)}
#sim #helmDock #turboReason{grid-column:1/-1;font-size:10.5px;line-height:13px;color:#f0b68a}
/* Phones keep their restore buttons; the summary reads after the title there. */
html[data-controls="new"] body #sim .drawer-summary:not(:empty)::before{content:'\00B7  '}
/* Build 162 (Eric, Nov 6: "The accent colors in Navigate and Sensors are both blue... you know what to do."): one colour
   per drawer, so no two neighbours share one: Contact amber | Tactical red | Flight lilac | Navigate green | Sensors
   blue. Only colours change; every border keeps its width, so nothing moves. */
html[data-controls="new"] body{--pane-green:#86d9a8;--pane-red:#f28b82;--deck-green:#8fe0b2;--deck-red:#f6978d}
html[data-controls="new"] body #sim #tacticalDock{border-top-color:var(--pane-red)}
html[data-controls="new"] body #sim #tacticalDock #tacticalToggle{color:var(--deck-red)}
html[data-controls="new"] body #sim #helmDock #navigateDock .deck-heading-toggle{color:var(--deck-green)}

@media(min-width:701px){
 html[data-controls="new"] body{--c-strip:52px;--d-gap:6px;--d-bar:28px;
  /* Build 162 (Eric, Nov 6): "Flight and (especially) Tactical should be wider. Take the extra from reducing the
     Navigate menu width ... It would be ideal to make all the control menu widths consistent." One width for all five. */
  --d-u:calc((100vw - 2 * var(--c-edge) - 4 * var(--d-gap)) / 5);
  --d-contact-w:var(--d-u);--d-tac-w:var(--d-u);--d-flight-w:var(--d-u);--d-nav-w:var(--d-u);--d-sensors-w:var(--d-u);
  --d-contact-x:var(--c-edge);
  --d-tac-x:calc(var(--d-contact-x) + var(--d-contact-w) + var(--d-gap));
  --d-flight-x:calc(var(--d-tac-x) + var(--d-tac-w) + var(--d-gap));
  --d-nav-x:calc(var(--d-flight-x) + var(--d-flight-w) + var(--d-gap));
  --d-sensors-x:calc(var(--d-nav-x) + var(--d-nav-w) + var(--d-gap));
  --d-bottom:max(var(--c-edge),env(safe-area-inset-bottom));
  --d-top-reserve:calc(var(--c-top) + var(--d-bar) + var(--c-strip) + 8px);
  --d-open-max:calc(100vh - var(--d-top-reserve) - var(--d-bottom) - var(--d-bar) - 6px);
  --d-radius:var(--pane-radius);--d-line:#83b3ca33}

 /* ---- Bars: one look for every drawer ---- */
 html[data-controls="new"] body #sim :is(#showTarget,#showSensors,#showBridge){position:absolute;right:auto;transform:none;display:flex!important;align-items:center;gap:6px;box-sizing:border-box;height:var(--d-bar);min-height:var(--d-bar);margin:0;padding:0 9px;border:1px solid var(--pane-edge);border-radius:var(--d-radius);background:var(--pane-fill);box-shadow:var(--pane-shadow);backdrop-filter:var(--pane-blur);-webkit-backdrop-filter:var(--pane-blur);font-size:0;line-height:1;text-align:left;white-space:nowrap;overflow:hidden;z-index:4;opacity:1;visibility:visible;pointer-events:auto;cursor:pointer}
 html[data-controls="new"] body #sim :is(#showTarget,#showSensors){top:auto;bottom:var(--d-bottom)}
 html[data-controls="new"] body #sim #showTarget{left:var(--d-contact-x);width:var(--d-contact-w);border-top:var(--pane-accent) solid var(--pane-amber)}
 html[data-controls="new"] body #sim #showSensors{left:var(--d-sensors-x);width:var(--d-sensors-w);border-top:var(--pane-accent) solid var(--pane-blue)}
 html[data-controls="new"] body #sim .drawer-title{flex:none;font-size:9.5px;font-weight:600;letter-spacing:1px;text-transform:uppercase;color:var(--amber)}
 html[data-controls="new"] body #sim :is(#showSensors,#showBridge) .drawer-title{color:var(--blue)}
 html[data-controls="new"] body #sim .drawer-title::after{content:' \25B4';font-size:9px}
 html[data-controls="new"] body #sim :is(#showTarget,#showSensors)[hidden] .drawer-title::after{content:' \25BE'}
 html[data-controls="new"] body #sim .drawer-summary::before{content:none!important}
 html[data-controls="new"] body #sim .drawer-summary{min-width:0;overflow:hidden;text-overflow:ellipsis;font-size:10.5px;color:#cfe3f0;font-weight:400;letter-spacing:0;text-transform:none}
 /* Open, the bar stays and the drawer's body stands on it as one piece. */
 html[data-controls="new"] body #sim :is(#showTarget,#showSensors)[hidden]{border-top-left-radius:0;border-top-right-radius:0;border-top-width:1px;border-top-color:var(--d-line)}

 /* The grip along the top edge of an open drawer closes it. */
 /* Build 164 (Eric, Nov 6: "the Sensors menu to the far right needs more margin above the buttons for me to click more easily. I
    don't have the hand-eye coordination of a surgeon here!"): every grip is taller (12 -> 16 px) and Sensors', above its tabs, 22 px. */
 html[data-controls="new"] body #sim .drawer-grip{display:block;position:relative;flex:none;height:16px;min-height:16px;margin:0;cursor:pointer;grid-column:1/-1}
 html[data-controls="new"] body #sim .drawer-grip[data-drawer="sensors"]{height:22px;min-height:22px}
 html[data-controls="new"] body #sim .drawer-grip::before{content:'';position:absolute;left:50%;top:6px;width:30px;height:3px;margin-left:-15px;border-radius:2px;background:#9fc3d666}
 html[data-controls="new"] body #sim .drawer-grip[data-drawer="sensors"]::before{top:9px}
 html[data-controls="new"] body #sim .drawer-grip:hover::before{background:#cfe3f0}
 /* Build 164 (Eric, Nov 6: "When both the Flight and Navigate menus are open, the Navigate menu has more space across the top for
    me to click. But when the Flight menu closes, that space gets smaller > keep that space ... check this logic across all these
    menus"): a closed Flight hid every grip inside #helmDock, Navigate's included (Navigate's group lives there). Each drawer's grip
    now follows its own drawer only (> picks Flight's own grip). */
 html[data-controls="new"] body #sim :is(#helmDock[data-expanded="false"],#tacticalDock[data-expanded="false"])>.drawer-grip,html[data-controls="new"] body #sim #helmDock .helm-group-navigate:has(#navigateDock[data-expanded="false"])>.drawer-grip{display:none}

 /* ---- Status: a bar on the top edge; the strip opens below it ---- */
 html[data-controls="new"] body #sim #showBridge{top:var(--c-top);bottom:auto;left:calc(var(--c-edge) + 236px);right:calc(var(--c-edge) + var(--c-menu) + 12px);width:auto;border-bottom:var(--pane-accent) solid var(--pane-blue)}
 html[data-controls="new"] body #sim #showBridge .drawer-title::after{content:' \25BE'}
 html[data-controls="new"] body #sim #showBridge[hidden] .drawer-title::after{content:' \25B4'}
 html[data-controls="new"] body #sim #showBridge[hidden]{border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-width:1px;border-bottom-color:var(--d-line)}
 html[data-controls="new"].red-alert body #sim #showBridge{border-color:#ff9a80;box-shadow:inset 3px 0 #ff9a80,0 0 20px #eb5a371c}
 html[data-controls="new"].red-alert body #sim #showBridge .drawer-title{color:#ffb39a}
 html[data-controls="new"] body #sim #bridgePanel{top:calc(var(--c-top) + var(--d-bar) - 1px);border-top-left-radius:0;border-top-right-radius:0;border-top-width:0;padding-top:3px;padding-bottom:3px;row-gap:0;padding-right:8px}
 html[data-controls="new"] body #sim #bridgePanel :is(#bridgeToggle,.panel-dismiss){display:none}
 html[data-controls="new"] body #sim #bridgePanel #alertBanner{gap:0}
 html[data-controls="new"] body #sim #bridgePanel #alertBanner strong{font-size:9.5px;line-height:12px}
 html[data-controls="new"] body #sim #bridgePanel #enterpriseStatus .ship-status{margin:0;gap:1px}
 html[data-controls="new"] body #sim #bridgePanel #enterpriseStatus label{font-size:9.5px;line-height:11px;margin:0 0 1px}
 /* Build 205 (Eric, Nov 23, his arrow beside RED ALERT: "what looks like the very edge of text that's cut off ... a line of noise"):
    the strip has room for two lines, so the condition's detail ("Hostiles in range · Shields raised") was squeezed to a 3 px
    sliver under the title. It now follows the title on the same line. */
 html[data-controls="new"] body #sim #bridgePanel #alertBanner{display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:8px;align-content:center}
 html[data-controls="new"] body #sim #bridgePanel #alertBanner #alertTitle{grid-column:1;grid-row:1}
 html[data-controls="new"] body #sim #bridgePanel #alertBanner #alertDetail{grid-column:2;grid-row:1;min-width:0;font-size:9.5px;line-height:12px;opacity:.8}
 html[data-controls="new"] body #sim #bridgePanel #alertBanner #enterpriseStatus{grid-column:1 / -1;grid-row:2;min-width:0}
 html[data-controls="new"] body #sim #bridgePanel .task-heading{height:11px;margin:0}
 html[data-controls="new"] body #sim #bridgePanel #taskName{font-size:12.5px;line-height:15px}
 html[data-controls="new"] body #sim #bridgePanel #taskDetail{-webkit-line-clamp:1;line-clamp:1;font-size:10.5px;line-height:13px;margin:0}
 html[data-controls="new"] body #sim #bridgePanel #taskChoice{margin-top:1px}
 html[data-controls="new"] body #sim #bridgePanel #taskChoice button{height:19px}
 html[data-controls="new"] body #sim #bridgePanel .bridge-updates{max-height:46px;gap:1px}
 html[data-controls="new"] body #sim #bridgePanel .bridge-updates #message{font-size:11.5px;line-height:14px;max-height:28px}
 html[data-controls="new"] body #sim #bridgePanel .bridge-log-link{height:12px;line-height:12px}

 /* ---- The scan reading or tip: under the ship's name, only when it has something to say ---- */
 html[data-controls="new"] body #sim #scanNote{top:calc(var(--c-top) + 56px);height:auto;max-height:min(var(--c-scan-h),28vh)}
 html[data-controls="new"] body #sim #scanNote[data-state="standby"]{display:none}
 html[data-controls="new"] body #sim #scanNote[data-state="watch"]{height:var(--c-scan-h)}
 /* Build 178 revision 4 (Eric, Nov 15: "the Capt's tips buttons can get cut off sometimes toward the bottom ... when there are buttons on 2 rows"): a tip card grows to hold its text and a second row of buttons (it was held to 128 px, so the second row was cut by 5 to 19 px at his 1324 x 856 window). Which buttons show is unchanged. */
 html[data-controls="new"] body #sim #scanNote[data-state="tip"]{max-height:min(calc(var(--c-scan-h) + 56px),40vh)}

 /* ---- Contact and Sensors: their bodies grow up from their bars ---- */
 html[data-controls="new"] body #sim :is(#targetPanel,#sensorsPanel){top:auto!important;bottom:calc(var(--d-bottom) + var(--d-bar) - 1px)!important;right:auto;max-height:min(var(--d-open-max),560px);border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-width:0}
 html[data-controls="new"] body #sim #targetPanel{left:var(--d-contact-x);width:var(--d-contact-w)}
 html[data-controls="new"] body #sim #sensorsPanel{left:var(--d-sensors-x);width:var(--d-sensors-w);max-height:min(var(--d-open-max),480px)}
 html[data-controls="new"] body #sim #targetPanel #targetCommandStrip{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
 html[data-controls="new"] body #sim #targetPanel :is(.pane-tools .pane-fold,#targetPanelHide),html[data-controls="new"] body #sim #sensorsPanel .rail-tabs .pane-fold{display:none}
 html[data-controls="new"] body #sim #targetPanel #targetName{cursor:pointer}
 html[data-controls="new"] body #sim #sensorsPanel .rail-tabs{grid-template-columns:repeat(3,minmax(0,1fr));margin-top:0}
 /* An open drawer always shows its content: an older saved fold cannot leave it empty. */
 html[data-controls="new"] body #sim #sensorsPanel[data-collapsed="true"] #sensorBody{max-height:100vh;min-height:0;opacity:1;overflow-y:auto;pointer-events:auto;padding:0 6px}
 html[data-controls="new"] body #sim #targetPanel[data-collapsed="true"] .target-command-strip{max-height:420px;opacity:1;overflow-y:auto;padding-top:4px;pointer-events:auto}

 /* ---- Flight ---- */
 html[data-controls="new"] body #sim .control-deck{left:var(--c-edge);right:var(--c-edge);bottom:var(--d-bottom)}
 html[data-controls="new"] body #sim .deck-port{left:calc(var(--d-flight-x) - var(--c-edge));right:auto;width:var(--d-flight-w);bottom:0;gap:0}
 html[data-controls="new"] body #sim #helmDock{position:relative;box-sizing:border-box;width:100%;min-height:var(--d-bar);max-height:none;overflow:visible;cursor:auto}
 html[data-controls="new"] body #sim #helmDock :is(.speed-main-actions,.speed-scale-console,.impulse-presets,.speed-fine-presets){display:contents!important}
 html[data-controls="new"] body #sim #helmDock #helmDetails{display:none!important}
 /* Open: readings; Stop ¼ ½ Full Auto; − + Back away; Turbo; zone and limit; course; the bar. */
 html[data-controls="new"] body #sim #helmDock[data-expanded="true"]{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-items:center;column-gap:3px;row-gap:4px;padding:0 6px;max-height:min(var(--d-open-max),420px)}
 html[data-controls="new"] body #sim #helmDock[data-expanded="true"] .drawer-grip{grid-row:1}
 html[data-controls="new"] body #sim #helmDock[data-expanded="true"] .flight-strip{grid-row:2;grid-column:1/-1;margin:0;cursor:pointer}
 html[data-controls="new"] body #sim #helmDock[data-expanded="true"] :is(#stop,#impulse25,#impulse50,#impulse100,#throttle){grid-row:3}
 html[data-controls="new"] body #sim #helmDock[data-expanded="true"] #stop{grid-column:1}
 html[data-controls="new"] body #sim #helmDock[data-expanded="true"] #impulse25{grid-column:2}
 html[data-controls="new"] body #sim #helmDock[data-expanded="true"] #impulse50{grid-column:3}
 html[data-controls="new"] body #sim #helmDock[data-expanded="true"] #impulse100{grid-column:4}
 html[data-controls="new"] body #sim #helmDock[data-expanded="true"] #throttle{grid-column:5}
 html[data-controls="new"] body #sim #helmDock[data-expanded="true"] :is(#speedDown,#speedUp,#backAway){grid-row:4}
 html[data-controls="new"] body #sim #helmDock[data-expanded="true"] #speedDown{grid-column:1}
 html[data-controls="new"] body #sim #helmDock[data-expanded="true"] #speedUp{grid-column:2}
 html[data-controls="new"] body #sim #helmDock[data-expanded="true"] #backAway{grid-column:3/-1}
 html[data-controls="new"] body #sim #helmDock[data-expanded="true"] .speed-turbo-presets{grid-row:5;grid-column:1/-1}
 html[data-controls="new"] body #sim #helmDock[data-expanded="true"] .speed-zone-line{grid-row:6;grid-column:1/-1}
 html[data-controls="new"] body #sim #helmDock[data-expanded="true"] .course-eta{grid-row:7;grid-column:1/-1}
 html[data-controls="new"] body #sim #helmDock[data-expanded="true"] #helmHeader{grid-row:8;grid-column:1/-1;height:var(--d-bar);min-height:var(--d-bar);margin:0 -6px;padding:0 9px;border-top:1px solid var(--d-line);display:flex;align-items:center;justify-content:space-between;cursor:pointer}
 html[data-controls="new"] body #sim #helmDock :is(#stop,#impulse25,#impulse50,#impulse100,#throttle,#speedDown,#speedUp,#backAway){box-sizing:border-box;width:100%;min-width:0;height:30px;min-height:30px;max-height:30px;margin:0;padding:0 2px;font-size:11.5px;line-height:28px;border-radius:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 html[data-controls="new"] body #sim #helmDock[data-expanded="true"] #stop{font-size:0}
 html[data-controls="new"] body #sim #helmDock[data-expanded="true"] #stop::before{content:'Stop';font-size:11.5px}
 html[data-controls="new"] body #sim #helmDock[data-expanded="true"] #stop{background:var(--pane-button,rgba(18,35,51,.78));color:#ddd2ff;border:1px solid #b9a5e0aa}
 html[data-controls="new"] body #sim #helmDock :is(#impulse25,#impulse50,#impulse100,#throttle)[aria-pressed="true"]{background:#2f6a5c;color:#e6fff6;border-color:#8edfc3}
 html[data-controls="new"] body #sim #helmDock :is(#speedDown,#speedUp){font-size:15px;line-height:28px}
 html[data-controls="new"] body #sim #helmDock .flight-strip{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:auto auto;gap:0 6px;height:auto;min-height:0;max-height:none;padding:0}
 html[data-controls="new"] body #sim #helmDock .flight-strip output{font-size:13px;height:17px;line-height:17px}
 html[data-controls="new"] body #sim #helmDock .flight-strip .flight-limit{grid-column:1/-1;font-size:10px;height:13px;line-height:13px;color:#a8d8cf}
 html[data-controls="new"] body #sim #helmDock .speed-turbo-presets{display:grid;grid-template-columns:auto repeat(4,minmax(0,1fr));gap:3px;align-items:center;height:auto;margin:0}
 html[data-controls="new"] body #sim #helmDock .turbo-chip-label{padding-right:3px;font-size:9px;letter-spacing:1px;text-transform:uppercase;color:var(--amber)}
 html[data-controls="new"] body #sim #helmDock .speed-turbo-presets>button{height:26px;min-height:26px;max-height:26px;line-height:24px;padding:0 1px;font-size:11px}
 html[data-controls="new"] body #sim #helmDock .speed-turbo-presets>button[aria-pressed="true"]{background:#7a5a1e;color:#fff2d6;border-color:#f2c46d}
 html[data-controls="new"] body #sim #helmDock #turboReason{grid-column:1/-1;font-size:10px;line-height:13px;color:#f0b68a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 html[data-controls="new"] body #sim #helmDock .speed-zone-line{height:16px;min-height:16px;max-height:16px;margin:0}
 html[data-controls="new"] body #sim #helmDock .course-eta{margin:0;height:14px;line-height:14px;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 /* Closed: one bar with the speed reading and All stop, always in reach. */
 html[data-controls="new"] body #sim #helmDock[data-expanded="false"]{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;column-gap:8px;height:var(--d-bar);padding:0 3px 0 9px;cursor:pointer}
 html[data-controls="new"] body #sim #helmDock[data-expanded="false"]>:not(.helm-group),html[data-controls="new"] body #sim #helmDock[data-expanded="false"] :is(.helm-group-scale,#throttle,#backAway,#flightSection,.flight-limit){display:none!important}
 html[data-controls="new"] body #sim #helmDock[data-expanded="false"] #helmHeader{grid-row:1;grid-column:1;height:auto;min-height:0;margin:0}
 html[data-controls="new"] body #sim #helmDock[data-expanded="false"] .flight-strip{grid-row:1;grid-column:2;display:flex;align-items:baseline;gap:6px;overflow:hidden;white-space:nowrap}
 html[data-controls="new"] body #sim #helmDock[data-expanded="false"] .flight-strip>div{display:flex;align-items:baseline;gap:3px;flex:none}
 html[data-controls="new"] body #sim #helmDock[data-expanded="false"] .flight-strip span{display:none}
 html[data-controls="new"] body #sim #helmDock[data-expanded="false"] .flight-strip>div+div output::before{content:'\2192  ';color:#9cb6c7}
 html[data-controls="new"] body #sim #helmDock[data-expanded="false"] .flight-strip output{height:auto;line-height:14px;font-size:11px}
 html[data-controls="new"] body #sim #helmDock[data-expanded="false"] #stop{grid-row:1;grid-column:3;height:22px;min-height:22px;max-height:22px;width:auto;padding:0 8px;font-size:10px;line-height:20px}

 /* ---- Navigate: its own drawer beside Flight (it lives inside Flight in the page, and keeps doing so) ---- */
 html[data-controls="new"] body #sim #helmDock .helm-group-navigate{position:absolute;left:calc(100% + var(--d-gap) + 1px);bottom:-1px;width:var(--d-nav-w);box-sizing:border-box;display:flex;flex-direction:column;justify-content:flex-end;padding:0 8px;border:1px solid var(--pane-edge);border-top:var(--pane-accent) solid var(--pane-green);border-radius:var(--d-radius);background:var(--pane-fill);box-shadow:var(--pane-shadow);backdrop-filter:var(--pane-blur);-webkit-backdrop-filter:var(--pane-blur);cursor:auto;max-height:min(var(--d-open-max),420px)}
 html[data-controls="new"] body #sim #helmDock #sector{margin:0 0 4px;height:12px;line-height:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}
 html[data-controls="new"] body #sim #helmDock #navigateDock{display:flex;flex-direction:column;margin:0}
 html[data-controls="new"] body #sim #helmDock #navigateDock .deck-heading{order:99;height:var(--d-bar);min-height:var(--d-bar);max-height:var(--d-bar);margin:0 -8px;padding:0 9px;display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--d-line);cursor:pointer}
 html[data-controls="new"] body #sim #helmDock #navigateDock .deck-navigation-controls{margin-bottom:4px;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr) 44px}
 html[data-controls="new"] body #sim #helmDock #navigateDock #navSignal{padding:0 4px}
 html[data-controls="new"] body #sim #helmDock #navigateDock[data-expanded="true"] #destination{height:min(170px,calc(100vh - 360px))!important;min-height:96px!important;max-height:170px!important}
 html[data-controls="new"] body #sim #helmDock #routeInfo{margin:0 0 3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 html[data-controls="new"] body #sim #helmDock .helm-group-navigate:has(#navigateDock[data-expanded="false"]) #sector,html[data-controls="new"] body #sim #helmDock #navigateDock[data-expanded="false"]>:not(.deck-heading){display:none!important}
 html[data-controls="new"] body #sim #helmDock #navigateDock[data-expanded="false"] .deck-heading{border-top:0}

 /* ---- Tactical: details above its bar; Auto target and the torpedo refit share one line ---- */
 html[data-controls="new"] body #sim #tacticalDock{left:calc(var(--d-tac-x) - var(--c-edge));right:auto;bottom:0;width:var(--d-tac-w);box-sizing:border-box;display:grid!important;grid-template-columns:auto minmax(0,1fr);column-gap:6px;row-gap:4px;align-items:center;padding:0 5px;max-height:min(var(--d-open-max),360px);overflow-y:auto;scrollbar-width:thin}
 html[data-controls="new"] body #sim #tacticalDock .drawer-grip{grid-row:1}
 html[data-controls="new"] body #sim #tacticalDock #tacticalDetails{grid-row:2;grid-column:1/-1;margin-top:0;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
 html[data-controls="new"] body #sim #tacticalDock #tacticalDetails>*{grid-column:1/-1}
 html[data-controls="new"] body #sim #tacticalDock #tacticalDetails>#autoTarget{grid-column:1;grid-row:3}
 html[data-controls="new"] body #sim #tacticalDock #tacticalDetails>.deck-cargo-actions{grid-column:2;grid-row:3;margin:0}
 html[data-controls="new"] body #sim #tacticalDock #tacticalDetails>.deck-cargo-actions #refine{width:100%;min-width:0;height:24px;min-height:24px}
 html[data-controls="new"] body #sim #tacticalDock #tacticalDetails>#tacticalPower{grid-row:1}
 html[data-controls="new"] body #sim #tacticalDock #tacticalDetails>.deck-weapons{grid-row:2}
 html[data-controls="new"] body #sim #tacticalDock #tacticalDetails>.deck-combat-actions{grid-row:4}
 html[data-controls="new"] body #sim #tacticalDock #tacticalDetails>.shield-controls{grid-row:5}
 html[data-controls="new"] body #sim #tacticalDock #tacticalToggle{grid-row:3;grid-column:1;height:var(--d-bar)}
 /* Build 162: the cargo readout is an ordinary cell of the bar in every look; Compact and Bridge pinned it absolutely
    and squeezed it to "0…". The title is a plain label, as on every other drawer (those looks drew a button box). */
 html[data-controls="new"] body #sim #tacticalDock #cargo{grid-row:3;grid-column:2;height:22px;min-height:22px;margin:3px 0;width:auto;position:static;left:auto;right:auto;bottom:auto}
 html[data-controls="new"] body #sim #tacticalDock #tacticalToggle{background:transparent;border:0;box-shadow:none}
 html[data-controls="new"] body #sim #tacticalDock[data-expanded="false"]{row-gap:0;min-height:var(--d-bar);height:var(--d-bar);border-top-width:var(--pane-accent);overflow:hidden;cursor:pointer}
 html[data-controls="new"] body #sim #tacticalDock[data-expanded="false"] :is(#tacticalToggle,#cargo){grid-row:1}
 html[data-controls="new"] body #sim #tacticalDock #tacticalToggle{min-height:0;padding-top:0;padding-bottom:0}

 /* ---- View: top right, under the Menu; its camera choices open below it ---- */
 html[data-controls="new"] body #sim #viewDock{top:calc(var(--c-top) + 56px);bottom:auto;left:auto;right:var(--c-edge);transform:none;width:auto;min-width:84px;max-width:none;box-sizing:border-box;height:var(--d-bar);min-height:var(--d-bar);padding:0 4px;display:block}
 html[data-controls="new"] body #sim #viewDock .deck-view-heading{height:calc(var(--d-bar) - 2px);display:flex;align-items:center;justify-content:center}
 html[data-controls="new"] body #sim #viewDock #viewDetails{position:absolute;right:-1px;top:calc(100% + 4px);width:260px;box-sizing:border-box;margin:0;padding:6px;border:1px solid var(--pane-edge);border-radius:var(--d-radius);background:rgba(10,19,32,.92);box-shadow:var(--pane-shadow),0 6px 20px #0007}
 /* ---- Transporter: a fixed slot at the right end of the Status bar ----
    Build 160 (Eric, Nov 5: "the transporter status should move to the blank portion of the always-visible (collapsed)
    portion of the new status bar at the top ... The transporter progress bar doesn't need to be 10 cm across the screen.
    Put it in a fixed spot so other messages don't interfere with it. Remember my cardinal stylesheet rule: I don't like
    buttons to jump around."): label, phase, a short meter and the percentage sit in fixed columns inside the bar's right
    end, so a longer phase name or a changing percentage never moves anything. Clicks pass through to the bar. While a
    transfer shows, the bar's own summary stops short of the slot (its text is cut, nothing moves). Crew view and phones
    keep their own placement. */
 html[data-controls="new"] body{--d-transport-w:330px}
 html[data-controls="new"].crew-mode body #sim #transportPanel{top:calc(var(--c-top) + 56px + var(--d-bar) + 6px)}
 html[data-controls="new"]:not(.crew-mode) body #sim #transportPanel{position:absolute;top:var(--c-top);bottom:auto;left:auto;right:calc(var(--c-edge) + var(--c-menu) + 12px + 8px);width:var(--d-transport-w);min-width:0;max-width:none;height:var(--d-bar);max-height:none;margin:0;padding:0 0 0 10px;box-sizing:border-box;display:grid;grid-template-columns:auto minmax(0,1fr) 64px 36px;grid-template-rows:var(--d-bar);align-items:center;gap:0 8px;border:0;border-left:1px solid var(--d-line);border-radius:0;background:none;backdrop-filter:none;-webkit-backdrop-filter:none;box-shadow:none;transform:none;text-align:left;z-index:5;pointer-events:none}
 html[data-controls="new"]:not(.crew-mode) body #sim #transportPanel::before{content:'Transporter';grid-column:1;grid-row:1;font-size:9.5px;font-weight:600;letter-spacing:1px;text-transform:uppercase;color:var(--blue);white-space:nowrap}
 html[data-controls="new"]:not(.crew-mode) body #sim #transportPanel .transport-heading{display:contents;position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}
 html[data-controls="new"]:not(.crew-mode) body #sim #transportPanel .transport-heading>span{display:none}
 html[data-controls="new"]:not(.crew-mode) body #sim #transportPhase{grid-column:2;grid-row:1;display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10.5px;font-weight:500;line-height:1;letter-spacing:0;text-transform:lowercase;color:#e3faff;text-shadow:none}
 html[data-controls="new"]:not(.crew-mode) body #sim #transportPhase::first-letter{text-transform:uppercase}
 html[data-controls="new"]:not(.crew-mode) body #sim #transportPanel .transport-meter{grid-column:3;grid-row:1;width:64px;height:4px;margin:0;border:0;border-radius:2px;background:#294155;overflow:hidden;box-shadow:none}
 html[data-controls="new"]:not(.crew-mode) body #sim #transportPanel .transport-meter i{box-shadow:none}
 html[data-controls="new"]:not(.crew-mode) body #sim #transportPercent{grid-column:4;grid-row:1;justify-self:stretch;text-align:right;font-size:10.5px;line-height:1;font-variant-numeric:tabular-nums;color:#ddfaff;text-shadow:none}
 html[data-controls="new"]:not(.crew-mode) body #sim #transportPanel[data-status="complete"] #transportPhase{color:#9ce3cd}
 html[data-controls="new"]:not(.crew-mode) body #sim #transportPanel[data-status="interrupted"] #transportPhase{color:#f5c791}
 html[data-controls="new"]:not(.crew-mode) body #sim:has(#transportPanel:not([hidden])) #showBridge{padding-right:calc(var(--d-transport-w) + 16px)}

 /* Every chevron says which way its drawer will move. */
 html[data-controls="new"] body #sim :is(#helmToggle,#navigateToggle,#tacticalToggle) .deck-chevron{display:inline-block;transform:none;transition:transform .15s ease}
 html[data-controls="new"] body #sim :is(#helmToggle,#navigateToggle,#tacticalToggle)[aria-expanded="true"] .deck-chevron{transform:rotate(180deg)}

 html[data-controls="new"] body #sim .viewscreen-frame{top:calc(var(--c-top) + var(--d-bar) + 8px);bottom:calc(var(--d-bottom) + var(--d-bar) + 8px)}
}
/* A narrower Status bar keeps the slot but drops its label. */
@media(min-width:701px) and (max-width:1199px){
 html[data-controls="new"] body{--d-transport-w:240px}
 html[data-controls="new"]:not(.crew-mode) body #sim #transportPanel{grid-template-columns:0 minmax(0,1fr) 56px 36px;gap:0 6px}
 html[data-controls="new"]:not(.crew-mode) body #sim #transportPanel::before{content:none}
 html[data-controls="new"]:not(.crew-mode) body #sim #transportPanel .transport-meter{width:56px}
}

/* Build 164 (Eric, Nov 6: "I need additional or more prominent info on display - i.e., torpedo count and what system I'm in";
   "Both of those can be utilized more for helpful messages"): the Status bar names the system, keeps the torpedo count at its
   right end (amber when low, red when critical), and shows a fresh bridge message in place of its summary for a few seconds.
   Hostiles in the sector but none in range is Condition yellow. */
html[data-controls="new"] body #sim #showBridge .status-where{flex:none;max-width:34%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0 8px 0 2px;border-right:1px solid var(--d-line);font-size:9.5px;font-weight:600;letter-spacing:.9px;text-transform:uppercase;color:#cfeaff}
html[data-controls="new"] body #sim #showBridge .status-where:empty{display:none}
html[data-controls="new"] body #sim #showBridge .status-notice{display:none}
html[data-controls="new"] body #sim #showBridge[data-notice] .drawer-summary{display:none}
html[data-controls="new"] body #sim #showBridge[data-notice] .status-notice{display:block;flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10.5px;font-weight:500;color:#f2fbff;animation:statusNoticeIn .35s ease-out both}
html[data-controls="new"] body #sim #showBridge[data-notice="amber"] .status-notice{color:#ffd58f}
html[data-controls="new"] body #sim #showBridge[data-notice="red"] .status-notice{color:#ffb6a0}
html[data-controls="new"] body #sim #showBridge .status-torpedoes{flex:none;margin-left:auto;padding-left:9px;border-left:1px solid var(--d-line);white-space:nowrap;font-size:10px;color:#a9c7d9}
html[data-controls="new"] body #sim #showBridge .status-torpedoes b{font-size:11.5px;font-weight:600;font-variant-numeric:tabular-nums;color:#eef8ff}
html[data-controls="new"] body #sim #showBridge .status-torpedoes[data-level="low"],html[data-controls="new"] body #sim #showBridge .status-torpedoes[data-level="low"] b{color:#ffc46b}
html[data-controls="new"] body #sim #showBridge .status-torpedoes[data-level="critical"],html[data-controls="new"] body #sim #showBridge .status-torpedoes[data-level="critical"] b{color:#ff8f7a}
html[data-controls="new"] body #sim #showBridge .status-torpedoes[data-level="critical"]{animation:torpedoCritical 1.6s ease-in-out infinite}
html[data-controls="new"] body #sim.yellow-alert #showBridge{border-color:#e7b55a;box-shadow:inset 3px 0 #e7b55a,var(--pane-shadow)}
html[data-controls="new"] body #sim.yellow-alert #showBridge .drawer-title{color:#ffd58f}
/* Build 186: the Enterprise-E's quantum count beside the photon count, blue where the photons are white. */
html[data-controls="new"] body #sim #showBridge .status-quantum{flex:none;margin-left:9px;padding-left:9px;border-left:1px solid var(--d-line);white-space:nowrap;font-size:10px;color:#9fcdf0}
html[data-controls="new"] body #sim #showBridge .status-quantum[hidden]{display:none}
html[data-controls="new"] body #sim #showBridge .status-quantum b{font-size:11.5px;font-weight:600;font-variant-numeric:tabular-nums;color:#d9f0ff}
html[data-controls="new"] body #sim #showBridge .status-quantum[data-level="empty"],html[data-controls="new"] body #sim #showBridge .status-quantum[data-level="empty"] b{color:#8ea3b3}
/* Build 205: a held quantum shot, for a few seconds after the press (amber, as a low photon count). */
html[data-controls="new"] body #sim #showBridge .status-quantum[data-level="held"],html[data-controls="new"] body #sim #showBridge .status-quantum[data-level="held"] b{color:#ffc46b}
html[data-controls="new"] body #sim #showBridge .status-quantum .quantum-held[hidden]{display:none}
@media (max-width:1180px){html[data-controls="new"] body #sim #showBridge .status-quantum .torp-word{display:none}html[data-controls="new"] body #sim #showBridge .status-quantum b::after{content:' Q';font-size:9.5px;font-weight:400;color:inherit}}
@media (max-width:1180px){html[data-controls="new"] body #sim #showBridge .status-torpedoes .torp-word{display:none}html[data-controls="new"] body #sim #showBridge .status-torpedoes b::after{content:' torp.';font-size:9.5px;font-weight:400;color:inherit}}
@keyframes statusNoticeIn{from{opacity:0;transform:translateY(-3px)}to{opacity:1;transform:none}}
@keyframes torpedoCritical{0%,100%{opacity:1}50%{opacity:.55}}
/* The Tactical bar's count reads at a glance, coloured like the Status bar's. */
html[data-controls="new"] body #sim #tacticalCount{font-size:10.5px!important;font-weight:600;color:#e3f2fb}
html[data-controls="new"] body #sim #tacticalCount[data-level="low"]{color:#ffc46b}
html[data-controls="new"] body #sim #tacticalCount[data-level="critical"]{color:#ff8f7a}
/* The tip slot: two answers side by side (Refill now · Resupply), a red edge when the magazine is critical, a blue one on arrival. */
html[data-controls="new"] body #sim #scanNote .scan-note-actions{display:flex;flex-wrap:wrap;gap:5px;margin-top:4px}
html[data-controls="new"] body #sim #scanNote .scan-note-actions #scanNoteAction{margin-top:0}
html[data-controls="new"] body #sim #scanNote #scanNoteAction2,html[data-controls="new"] body #sim #scanNote #scanNoteAction3,html[data-controls="new"] body #sim #scanNote #scanNoteAction4{display:block;height:20px;min-height:0;max-width:100%;padding:0 8px;font-size:10.5px;line-height:18px;border-radius:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html[data-controls="new"] body #sim #scanNote #scanNoteAction2[hidden],html[data-controls="new"] body #sim #scanNote #scanNoteAction3[hidden],html[data-controls="new"] body #sim #scanNote #scanNoteAction4[hidden]{display:none}
html[data-controls="new"] body #sim #scanNote[data-state="tip"][data-tip="torpedoes"]{border-left-color:#ffb35c}
html[data-controls="new"] body #sim #scanNote[data-state="tip"][data-tip="arrival"]{border-left-color:#7fd3ff}
html[data-controls="new"] body #sim #scanNote[data-state="tip"][data-urgent="true"]{border-left-color:#ff7f6a;box-shadow:inset 3px 0 #ff7f6a33}
html[data-controls="new"] body #sim #scanNote[data-state="tip"][data-urgent="true"] #scanNoteName{color:#ffab98}
html[data-controls="new"] body #sim #scanNote[data-state="tip"][data-tip="arrival"] #scanNoteName{color:#bfe9ff}
/* Arrival title: the system (or Sol world) the ship has just reached, for five seconds under the Status bar. */
#sim #systemTitle{position:absolute;left:50%;top:64px;z-index:6;transform:translateX(-50%);max-width:80vw;text-align:center;pointer-events:none;color:#eef8ff;text-shadow:0 2px 14px #000c,0 0 2px #000}
#sim #systemTitle[hidden]{display:none}
/* Build 164 (Eric, Nov 6: "I had the status box open - so either lower the message in this case or close the status bar"): with the
   Status strip open (it ends 89 px down) the title sits below it. */
#sim:has(#bridgePanel:not([hidden])) #systemTitle{top:104px}
#sim #systemTitle small{display:block;font-size:10px;font-weight:600;letter-spacing:3px;text-transform:uppercase;color:#9fd6f5}
#sim #systemTitle b{display:block;margin:2px 0;font-size:30px;font-weight:600;letter-spacing:7px;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#sim #systemTitle span{display:block;font-size:11px;letter-spacing:1.5px;text-transform:uppercase;color:#bcd8ea}
#sim #systemTitle span:empty{display:none}
#sim #systemTitle.show{animation:systemTitle 5s ease both}
@keyframes systemTitle{0%{opacity:0;transform:translate(-50%,-8px)}10%{opacity:1;transform:translate(-50%,0)}78%{opacity:1}100%{opacity:0}}
@media (prefers-reduced-motion:reduce){#sim #systemTitle.show,html[data-controls="new"] body #sim #showBridge .status-torpedoes[data-level="critical"],html[data-controls="new"] body #sim #showBridge[data-notice] .status-notice{animation:none}}
