/* NETWAR — world.html styles, part 5 of 9: Packet feed, toolbar, actions, desktop band layout.
   Moved out of world.html's <style> block unchanged (2026-10-03); the files load in this
   order, which is the old cascade order — a later file still overrides an earlier one. */
/* Packed strip under the action tiles — same width as buttons, 4 rows. */
#panel:not(.feed-full) #feed { height: calc(4 * 1.55em); }
/* FULL: promote ops stack; hide map + other toolbar chrome. */
#panel.feed-full #viewport { display: none !important; }
#panel.feed-full #toolbar {
  display: flex !important; flex: 1 1 auto; min-height: 0; flex-direction: column;
}
#panel.feed-full #attack-cost-bar,
#panel.feed-full #bulletin,
#panel.feed-full #toolbar-main > :not(#toolbar-ops),
#panel.feed-full #toolbar-actions { display: none !important; }
/* Column, and nothing but the feed scrolls (playtest 2026-09-29): as a row the ops stack grew
   to the whole log's height, so the wheel missed the feed and DOCK scrolled out of view. */
#panel.feed-full #toolbar { overflow: hidden; }
#panel.feed-full #toolbar-main {
  flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding: 8px 10px;
}
#panel.feed-full #toolbar-ops {
  flex: 1 1 auto; min-height: 0; width: 100%; max-width: none;
}
#panel.feed-full #feed-wrap {
  flex: 1 1 auto; min-height: 0; border-top: none;
}
#panel.feed-full #feed { flex: 1 1 auto; height: auto; min-height: 0; }

/* Actions + packet feed = one stacked block (mockup: buttons on top, feed under). */
#toolbar-ops {
  display: flex; flex-direction: column; align-items: stretch;
  flex: 0 0 auto; min-width: 0; gap: 4px;
}
#feed-wrap[data-feed-filter="init"] #feed > :not(.init),
#feed-wrap[data-feed-filter="ok"] #feed > :not(.ok),
#feed-wrap[data-feed-filter="warn"] #feed > :not(.warn),
#feed-wrap[data-feed-filter="err"] #feed > :not(.err),
#feed-wrap[data-feed-filter="battle"] #feed > :not(.battle) { display: none; }
#feed .init { color: #6a6088; } #feed .ok { color: var(--chrome-ok); }
#feed .warn { color: var(--chrome-warn); }
#feed .err { color: var(--chrome-alert); } #feed .battle { color: var(--chrome-cyan); }

/* Toolbar — reference layout: stats | MODULES | flat actions */
#toolbar { display: flex; flex-direction: column; gap: 0; flex-shrink: 0;
           border-top: 1px solid #3a2170; background: #08050f; font-size: 12px;
           min-width: 0; overflow-x: hidden; }
#toolbar-main {
  display: flex; flex-wrap: wrap; align-items: stretch; gap: 0;
  padding: 8px 10px; min-width: 0;
}
#toolbar button {
  background: #0c0814; color: var(--chrome-secondary); border: 1px solid #2a1a48;
  font: inherit; cursor: pointer; letter-spacing: 0.1em; font-size: 10px;
  white-space: nowrap; text-transform: uppercase;
  transition: border-color 0.15s, color 0.15s, box-shadow 0.15s, background 0.15s;
}
#toolbar button:disabled { cursor: not-allowed; opacity: 0.45; }
#toolbar button:hover:not(:disabled) {
  border-color: var(--chrome-cyan);
  color: var(--chrome-cyan);
  background: rgba(8, 22, 36, 0.95);
  box-shadow: 0 0 12px rgba(55, 213, 245, 0.22);
}

#stats {
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
  min-width: 168px; max-width: 220px; flex: 0 1 200px;
  padding: 3px 12px 3px 10px; margin-right: 10px;
  border-right: 1px solid #1e1435; color: var(--chrome-secondary);
  position: relative;
}
/* Corner HUD brackets — frames the primary readout panel (Crimson accent) */
#stats::before, #stats::after {
  content: ''; position: absolute; width: 8px; height: 8px; border-color: #ff3860; opacity: 0.85;
}
#stats::before { top: -1px; left: -1px; border-top: 2px solid; border-left: 2px solid; }
#stats::after { top: -1px; right: 6px; border-top: 2px solid; border-right: 2px solid; }
#stats .stats-metrics {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; line-height: 1.25;
}
#stats .stat-chip {
  display: inline-flex; align-items: baseline; gap: 4px; white-space: nowrap;
  letter-spacing: 0.08em; font-size: 12px;
}
#stats .stat-chip.ram { color: #ff3860; }
#stats .stat-chip.ram b { color: #ff3860; text-shadow: 0 0 8px rgba(255,56,96,0.45); }
#stats .stat-chip.nrg { color: var(--chrome-ok); }
#stats .stat-chip.nrg b { color: var(--chrome-ok); text-shadow: 0 0 8px rgba(55,245,163,0.35); }
#stats .stat-chip.cr { color: var(--chrome-warn); }
#stats .stat-chip.cr b { color: var(--chrome-warn); text-shadow: 0 0 8px rgba(245,163,55,0.3); }
#stats .stat-chip.heat { cursor: pointer; color: var(--chrome-muted); }
#stats .stat-chip.heat b { color: var(--chrome-muted); }
#stats .stat-chip.heat.tier-low b { color: #8fd08f; }
#stats .stat-chip.heat.tier-high b { color: var(--chrome-warn); text-shadow: 0 0 8px rgba(245,163,55,0.35); }
#stats .stat-chip.heat.tier-crit b { color: var(--chrome-alert); text-shadow: 0 0 8px rgba(245,88,88,0.45); animation: heat-chip-pulse 1.1s ease-in-out infinite; }
#stats .stat-chip.heat.bountied { color: var(--chrome-alert); }
@keyframes heat-chip-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
#stats .stat-chip.nemesis { cursor: default; color: #b98fff; }
#stats .stat-chip.nemesis b { color: #b98fff; text-shadow: 0 0 8px rgba(185,143,255,0.4); }
#stats .stat-chip.nemesis.agency b { color: #9a9ab9; text-shadow: 0 0 8px rgba(154,154,185,0.3); }
#st-energy-hint { font-size: 10px; color: var(--chrome-ok); letter-spacing: 0.04em; }
#st-credits-hint { font-size: 10px; color: var(--chrome-ok); letter-spacing: 0.04em; cursor: help; }
#st-credits-hint.off { color: var(--chrome-muted); }
#ram-meter-wrap { width: 100%; max-width: 200px; }
#ram-meter-label { font-size: 9px; color: var(--chrome-muted); letter-spacing: 0.08em; margin-top: 2px; }
#ram-meter {
  display: flex; height: 6px; border: 1px solid #2c1a55; background: #0a0612; overflow: hidden;
}
#ram-seg-free { background: linear-gradient(90deg, #4a0e1a, #ff3860 55%, #ff9fb3); transition: flex 0.25s; min-width: 0; }
#ram-seg-overhead { background: linear-gradient(90deg, #5a2020, #f55858); transition: flex 0.25s; min-width: 0; }
#ram-seg-breach { background: linear-gradient(90deg, #1e5a44, #37f5a3); transition: flex 0.25s; min-width: 0; }
/* Round 10 overrides these three to a cyan/warn/green pip pattern further below,
   matching the reference's segmented-tick vitals bars (see the Round 10 block). */
#ram-meter-hint { font-size: 8px; color: #f55858; min-height: 0; }
#st-name {
  /* Operator name is player-chosen and sector count grows with progress, so this
     line's length isn't bounded — wrap instead of ellipsis-truncating real info. */
  font-size: 9px; letter-spacing: 0.1em; color: var(--chrome-muted);
  white-space: normal; overflow-wrap: anywhere; max-width: 100%; line-height: 1.35;
}
.patron-callsign { color: #E6B800; }
.patron-tag {
  display: inline-block; margin-left: 6px; padding: 0 5px;
  font-size: 8px; letter-spacing: 0.12em; font-weight: 700; vertical-align: 1px;
  color: #120c00; background: #E6B800;
}
#feed .patron-callsign { color: #E6B800; }

#software-zone {
  display: flex; align-items: flex-start; gap: 8px;
  flex: 1 1 280px; min-width: 0; max-width: 360px;
  padding: 0 12px; margin-right: 8px;
  border-right: 1px solid #1e1435;
}
/* Round 14b: was max-width:480px (Round 10) — but #software-picker itself
   is capped at 300px (Round 9, below), so on any wide screen the panel's
   header/TRACE rows stretched to fill the full 480px while the module
   list sat capped at 300px, left-aligned, leaving a growing block of
   empty background to its right the wider the window got. User: "стесни
   малко този контейнер няма нужда да има толкова свободно място".
   360px matches what the ≤1400px breakpoint already used below (already
   the right ballpark — 300px module list + 24px zone padding + a little
   slack), just applied at all widths instead of only past that breakpoint. */
.sw-rail-label {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-family: var(--chrome-display); font-size: 9px; font-weight: 700;
  letter-spacing: 0.22em; color: var(--chrome-muted); flex-shrink: 0;
}
#software-picker { display: flex; gap: 6px; align-items: stretch; flex-shrink: 0; padding: 0; background: transparent; border: none; box-shadow: none; }
.sw-mod {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  gap: 3px; min-width: 88px; padding: 7px 9px; cursor: pointer;
  border: 1px solid #2a1a48; background: #0a0612; color: var(--chrome-secondary);
}
.sw-mod:hover { border-color: #4a3080; color: var(--chrome-text); }
.sw-mod.on {
  border-color: var(--chrome-cyan); color: var(--chrome-cyan);
  box-shadow: 0 0 12px rgba(55,213,245,0.28); background: rgba(8,24,36,0.9);
}
.sw-mod-name { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; line-height: 1.1; }
.sw-mod-ram { font-size: 8px; letter-spacing: 0.06em; color: var(--chrome-muted); }
.sw-mod.on .sw-mod-ram { color: rgba(55,213,245,0.75); }
#software-preview[hidden] { display: none !important; }

#attack-cost-bar {
  /* Moved above #toolbar-main (was below it, right where #bulletin now
     lives) so the strip under the action buttons is #bulletin's alone —
     the two used to visually collide there. See the #bulletin comment
     further down for the full story. */
  display: none; flex-wrap: wrap; gap: 8px 14px; align-items: center;
  padding: 6px 12px 4px; font-size: 9px; line-height: 1.35;
  border-bottom: 1px solid #1a1028; color: var(--chrome-muted);
}
#attack-cost-bar.show { display: flex; }
#attack-cost-bar .formula { color: var(--chrome-cyan); letter-spacing: 0.06em; }
#attack-cost-bar .detail { color: var(--chrome-muted); }
#attack-cost-bar .warn { color: var(--chrome-alert); }
#attack-cost-bar .ok { color: var(--chrome-ok); }

#btn-home-core { flex-shrink: 0; }
#toolbar-actions {
  display: flex; flex-wrap: wrap; align-items: stretch; gap: 5px;
  flex: 1 1 420px; min-width: 0; justify-content: flex-start;
}
#toolbar-actions button {
  position: relative; overflow: hidden;
  min-width: 72px; min-height: 36px; padding: 0;
  display: flex; flex-direction: column; align-items: stretch;
}
/* Groups the 8 actions into 4 readable clusters (nav / mode / recon / commit)
   instead of one undifferentiated strip — thin hairline, not a hard wall. */
#toolbar-actions .tbar-divider {
  align-self: stretch; width: 1px; margin: 5px 2px;
  background: rgba(148,138,184,0.22); flex-shrink: 0;
}
@media (max-width: 640px) { #toolbar-actions .tbar-divider { display: none; } }
/* Commit actions (CAPTURE/RAID) read as the "real" decision — slightly wider
   than the rest so the cluster carries a bit more visual weight. */
#toolbar-actions button[data-act="capture"],
#toolbar-actions button[data-act="raid"] { min-width: 86px; }
#toolbar-actions button[data-act="capture"] .act-btn-inner,
#toolbar-actions button[data-act="raid"] .act-btn-inner { padding: 6px 12px; }
#toolbar-actions .act-btn-inner {
  position: relative; z-index: 1; flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; padding: 4px 8px; min-height: 36px; box-sizing: border-box;
}
#toolbar-actions .act-btn-fill {
  position: absolute; left: 0; bottom: 0; width: 100%; height: 0%;
  pointer-events: none; transition: height 0.2s linear;
}
#toolbar-actions .act-btn-fill.cd-active {
  background: linear-gradient(180deg, rgba(245,163,55,0.18), rgba(245,88,88,0.55));
}
#toolbar-actions .act-btn-row {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
}
#toolbar-actions .act-btn-icon { font-size: 11px; line-height: 1; opacity: 0.9; }
#toolbar-actions .act-btn-label { letter-spacing: 0.1em; line-height: 1.1; font-weight: 700; font-size: 10px; }
#toolbar-actions .act-btn-meta {
  font-size: 8px; font-weight: normal; letter-spacing: 0.06em;
  color: var(--chrome-muted); line-height: 1.1; min-height: 10px;
}
#toolbar-actions button.on {
  border-color: var(--chrome-cyan); color: var(--chrome-cyan);
  box-shadow: 0 0 12px rgba(55,213,245,0.28); background: rgba(8,22,36,0.95);
}
#toolbar-actions button.on:hover:not(:disabled) {
  border-color: #7aeeff; color: #e8fbff;
  box-shadow: 0 0 16px rgba(55,213,245,0.38);
}
#btn-home-core:hover:not(:disabled) {
  border-color: var(--chrome-ok); color: var(--chrome-ok);
  box-shadow: 0 0 12px rgba(55,245,163,0.28);
}
#toolbar-actions button[data-act="scan"]:hover:not(:disabled),
#toolbar-actions button[data-act="deepscan"]:hover:not(:disabled) {
  border-color: var(--chrome-cyan); color: var(--chrome-cyan);
  box-shadow: 0 0 12px rgba(55,213,245,0.28);
}
#toolbar-actions button[data-act="fortify"]:hover:not(:disabled) {
  border-color: var(--chrome-ok); color: var(--chrome-ok);
  box-shadow: 0 0 10px rgba(55,245,163,0.28);
}
/* Nomadic Frontier — RELEASE sits next to FORTIFY (both act on your own
   hexes) but in the amber warning tone shared with #map-confirm-dialog and
   the SITREP #btn-abandon-sector button, matching that action's palette. */
#toolbar-actions button[data-act="release"]:hover:not(:disabled) {
  border-color: #f5a337; color: #f5a337;
  box-shadow: 0 0 10px rgba(245,163,55,0.28);
}
/* Every toolbar action read as the same flat button except CAPTURE/RAID, which carry
   an unconditional tint — everything else only colored on hover or when selected.
   A quiet, always-on tint per action (still weaker than CAPTURE/RAID's) so the row
   reads as distinct actions at rest, not one blurred strip. `.on` (the active tool)
   keeps its stronger cyan highlight and wins over these. */
/* Higher specificity than the generic `#toolbar button` rule (id+type beats a bare
   id), which otherwise wins the border-color and keeps CORE flat. */
#toolbar-main #btn-home-core { border-color: rgba(55,213,245,0.32); color: #86b8c8; }
#toolbar-actions button[data-act="fortify"]:not(.on) { border-color: rgba(55,245,163,0.32); color: #85b89e; }
#toolbar-actions button[data-act="release"]:not(.on) { border-color: rgba(245,163,55,0.32); color: #b89468; }
#toolbar-actions button[data-act="select"]:not(.on) { border-color: rgba(55,213,245,0.28); color: #86a8b0; }
#toolbar-actions button[data-act="scan"]:not(.on) { border-color: rgba(138,127,176,0.35); color: #a396c0; }
#toolbar-actions button[data-act="deepscan"]:not(.on) { border-color: rgba(55,213,245,0.32); color: #6fb8cc; }
#toolbar-actions button[data-act="scan"] .act-btn-fill {
  background: linear-gradient(180deg, rgba(138,127,176,0.12), rgba(138,127,176,0.4));
}
#toolbar-actions button[data-act="deepscan"] .act-btn-fill {
  background: linear-gradient(180deg, rgba(55,213,245,0.12), rgba(55,213,245,0.42));
}
#toolbar-actions button[data-act="capture"] {
  border-color: var(--chrome-ok); color: var(--chrome-ok);
}
#toolbar-actions button[data-act="capture"] .act-btn-fill {
  background: linear-gradient(180deg, rgba(55,245,163,0.12), rgba(55,245,163,0.42));
}
#toolbar-actions button[data-act="capture"].on,
#toolbar-actions button[data-act="capture"]:hover:not(:disabled) {
  box-shadow: 0 0 14px rgba(55,245,163,0.3);
}
#toolbar-actions button[data-act="raid"] {
  border-color: var(--chrome-magenta); color: #ff8ae8;
  background: rgba(28,8,24,0.85);
}
#toolbar-actions button[data-act="raid"] .act-btn-fill {
  background: linear-gradient(180deg, rgba(255,43,214,0.14), rgba(255,43,214,0.45));
}
#toolbar-actions button[data-act="raid"].on,
#toolbar-actions button[data-act="raid"]:hover:not(:disabled) {
  box-shadow: 0 0 16px rgba(255,43,214,0.4); color: #ffe0f7;
}
#toolbar-actions button.on-cooldown { cursor: not-allowed; box-shadow: none !important; }
#toolbar-actions button.on-cooldown:hover {
  border-color: #2a1a48 !important;
  color: var(--chrome-secondary) !important;
  background: #0c0814 !important;
  box-shadow: none !important;
}
#toolbar-actions button.on-cooldown .act-btn-meta { color: var(--chrome-warn); font-weight: bold; }
/* Cooldown timers read as static text at a glance — "looks like a bug" (independent
   list). A live-ticking countdown gets its own chip: bigger, tabular numerals, a
   clock glyph, and a slow pulse, wherever it appears (toolbar, SITREP, HUD). */
.cd-live {
  display: inline-flex; align-items: center; gap: 3px;
  font-variant-numeric: tabular-nums; font-weight: 800;
  padding: 1px 5px; border-radius: 2px;
  background: rgba(245, 163, 55, 0.14);
  animation: cd-live-pulse 1.6s ease-in-out infinite;
}
.cd-live::before { content: '⏱'; font-size: 0.9em; opacity: 0.85; }
@keyframes cd-live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
#toolbar-actions button.on-cooldown .act-btn-meta .cd-live {
  font-size: 9px;
}
#toolbar-actions button.ready-nrg .act-btn-meta { color: var(--chrome-ok); }
#toolbar-actions button.low-nrg .act-btn-meta { color: var(--chrome-alert); }
/* Bare-ID specificity (1,0,0) loses to `#toolbar button` (1,0,1) — this rule was
   already dead before this pass; the scoped selector is what actually applies it.
   SAFEHOUSE is where the player manages their whole deck/defense — it deserves the
   same always-on colored weight as CAPTURE/RAID, not just a faint border. Its hover
   rule had the same dead-bare-ID bug (lost to `#toolbar button:hover`, which is why
   it flashed cyan instead of its own violet on hover) — fixed with the same
   `#toolbar-main` scoping used for the resting state below. */
#toolbar-main #btn-safehouse {
  color: #c9aeff; border-color: rgba(138,92,246,0.55);
  background: linear-gradient(180deg, rgba(138,92,246,0.10), rgba(138,92,246,0.24));
}
#toolbar-main #btn-safehouse:hover:not(:disabled) {
  border-color: #c9a8ff; color: #f2e8ff;
  box-shadow: 0 0 14px rgba(138,92,246,0.4);
  background: linear-gradient(180deg, rgba(138,92,246,0.16), rgba(138,92,246,0.34));
}
#toolbar-actions button[data-act="fortify"].on {
  border-color: var(--chrome-ok); color: var(--chrome-ok);
  box-shadow: 0 0 10px rgba(55,245,163,0.28);
}
#toolbar-actions button[data-act="release"].on {
  border-color: #f5a337; color: #f5a337;
  box-shadow: 0 0 10px rgba(245,163,55,0.28);
}

#tier-map.hidden { display: none; }
#btn-safehouse { min-width: 88px; }

/* Desktop band 1100–1600: use full width, map-first, no horizontal scroll */
@media (max-width: 1600px) {
  #panel { width: 100%; }
  #inspect { width: clamp(220px, 24vw, 290px); }
  #hud { max-width: min(310px, 30vw); }
}

@media (max-width: 1400px) {
  body { padding: 6px; }
  #panel { max-height: calc(100vh - 12px); }
  #bar { padding: 7px 12px; gap: 10px; }
  #bar .t { font-size: 13px; letter-spacing: 1.2px; }
  #toolbar-main { padding: 6px 8px; }
  #stats { gap: 3px; padding-right: 8px; margin-right: 8px; max-width: 180px; }
  #stats .stats-metrics { gap: 4px 8px; }
  #stats .stat-chip { font-size: 11px; }
  #ram-meter-wrap { max-width: 150px; }
  #software-zone { padding: 0 8px; margin-right: 6px; }
  .sw-mod { min-width: 76px; padding: 6px 7px; }
  .sw-mod-name { font-size: 9px; }
  #toolbar-actions button { min-width: 66px; min-height: 40px; }
  #toolbar-actions .act-btn-label { font-size: 9px; }
  #inspect { width: clamp(190px, 20vw, 240px); font-size: 9px; }
  #inspect-dock { right: 8px; top: 8px; }
  #inspect .sitrep-section:has(.sitrep-notes) { display: none; }
  #inspect .sitrep-section:has(.sitrep-enemy-deck) { display: none; }
  #inspect .sitrep-section:has(.sitrep-ice-row) { display: none; }
  #hud { max-width: min(270px, 28vw); font-size: 10px; padding: 6px 8px; }
  #panel:not(.feed-full) #feed { height: calc(4 * 1.5em); font-size: 10px; padding: 2px 12px; line-height: 1.5; }
  #loot-toast-stack { bottom: 96px; max-width: min(260px, 42vw); }
  #enter-defense-cta { right: 12px; bottom: 16px; width: min(260px, calc(100vw - 28px)); }
}

@media (max-width: 1280px) {
  #toolbar-actions { justify-content: flex-start; }
  #inspect { width: clamp(180px, 20vw, 230px); }
  #hud { max-width: min(250px, 30vw); }
  #software-zone { max-width: 320px; }
  .sw-mod { min-width: 70px; }
}

@media (max-width: 1200px) {
  #toolbar-main { flex-wrap: wrap; }
  #software-zone {
    flex: 1 1 100%; max-width: 100%;
    border-right: none; margin-right: 0; padding: 4px 0 6px;
    border-bottom: 1px solid #1e1435;
  }
  .sw-mod { min-width: 64px; padding: 5px 6px; }
  #toolbar-ops { flex: 1 1 100%; }
  #toolbar-actions { flex: 1 1 100%; }
  #btn-home-core { flex-shrink: 0; }
  #viewport { min-height: 260px; }
  #toolbar-actions button { min-width: 62px; }
  #btn-safehouse { min-width: 80px; }
  #inspect { width: clamp(170px, 22vw, 220px); }
  #inspect-dock { right: 8px; top: 8px; }
  #hud { max-width: min(230px, 32vw); left: 8px; top: 8px; }
  #inspect .sitrep-intel-grid { grid-template-columns: repeat(2, 1fr); }
  #inspect .sitrep-cost-grid { grid-template-columns: 1fr; }
  #panel:not(.feed-full) #feed { height: calc(4 * 1.5em); font-size: 10px; line-height: 1.5; }
  #loot-toast-stack { bottom: 96px; max-width: min(240px, 40vw); }
  #deploy-banner { max-width: min(520px, 94%); padding: 8px 12px; font-size: 10px; }
  #deploy-banner strong { font-size: 11px; }
  .loot-chip { min-width: 100px; max-width: 140px; }
}

@media (max-width: 1100px) {
  body { padding: 4px; }
  #panel { max-height: calc(100vh - 8px); }
  #viewport { min-height: 240px; }
  #toolbar-main { gap: 8px; }
  #stats { flex: 1 1 140px; max-width: none; border-right: none; margin-right: 0; padding-right: 0; }
  #software-zone { flex: 1 1 240px; max-width: none; border-right: none; margin-right: 0; }
  #toolbar-ops { flex: 1 1 100%; }
  #toolbar-actions { flex: 1 1 100%; justify-content: flex-start; }
  #toolbar-actions button { min-width: 60px; min-height: 38px; }
  #toolbar-actions .act-btn-meta { font-size: 7px; }
  #btn-safehouse { min-width: 80px; }
  #inspect { width: min(200px, 30vw); max-height: min(60vh, calc(100% - 16px - var(--ms-reserve, 0px))); }
  #inspect-dock { right: 6px; top: 6px; }
  #hud { max-width: min(210px, 34vw); font-size: 9px; }
  #hud .syn-chip { margin-left: 4px; font-size: 7px; }
  #bar .t { font-size: 12px; letter-spacing: 1px; }
  #bar .live { font-size: 9px; padding: 2px 6px; }
  #panel:not(.feed-full) #feed { height: calc(4 * 1.5em); padding: 2px 10px; line-height: 1.5; }
  #enter-defense-cta { width: min(240px, calc(100vw - 20px)); font-size: 10px; }
}

@media (max-width: 900px) {
  #toolbar-main { flex-direction: column; align-items: stretch; }
  #stats, #software-zone, #toolbar-ops {
    max-width: none; border-right: none; margin-right: 0; padding-right: 0;
  }
  #software-zone { padding: 4px 0; border-top: 1px solid #1e1435; border-bottom: 1px solid #1e1435; }
  #software-picker { max-width: none; }
  #toolbar-actions { justify-content: flex-start; }
  #inspect { width: min(200px, 42vw); }
  #inspect-dock { right: 6px; top: 6px; }
  #hud { max-width: min(200px, 48vw); }
}

