:root {
  --ground: #000000; --bg: #03060c; --panel: #071224; --panel2: #0b1a33;
  --bevel-light: #3d6fa8; --bevel-dark: #061020; --line: #1c3a5e;
  --text: #a9c6ec; --dim: #5f7ea6; --hi: #58c8ff; --hi2: #cfefff;
  --danger: #ff4747; --ok: #5ee08a; --warn: #ffc447;
  --font: "Lucida Console", Menlo, Consolas, monospace;
}
html, body { margin: 0; height: 100%; background: var(--ground); color: var(--text); font-family: var(--font); font-size: 12px; overflow: hidden; }
#stage { position: absolute; left: 0; top: 0; width: 1280px; height: 720px; transform-origin: top left; background: var(--bg); display: flex; flex-direction: column; gap: 2px; padding: 2px; box-sizing: border-box; }

/* ---- bevel chrome ---- */
#hud, #mapWrap, #routePanel, #screenWrap, #side, #taskbar, #bigMapPane, #bigRoute { border: 2px solid; border-color: var(--bevel-light) var(--bevel-dark) var(--bevel-dark) var(--bevel-light); box-shadow: inset 0 0 0 1px #000; background: var(--panel); box-sizing: border-box; }
button { font: inherit; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text); background: var(--panel2); padding: 2px 8px; cursor: pointer; border: 2px solid; border-color: var(--bevel-light) var(--bevel-dark) var(--bevel-dark) var(--bevel-light); }
button:hover:not(:disabled) { color: var(--hi2); background: #10254a; }
button:active:not(:disabled) { border-color: var(--bevel-dark) var(--bevel-light) var(--bevel-light) var(--bevel-dark); }
button:disabled { opacity: 0.4; cursor: default; }
button.active { background: var(--hi); color: #000; border-color: var(--hi2) #1d6b94 #1d6b94 var(--hi2); }
button.danger { color: #ff9b9b; border-color: #8a2a2a #2a0808 #2a0808 #8a2a2a; }
button.danger:hover:not(:disabled) { color: #fff; background: #3a0c0c; }
input, select { font: inherit; color: var(--text); background: #02050a; padding: 3px 6px; border: 2px solid; border-color: var(--bevel-dark) var(--bevel-light) var(--bevel-light) var(--bevel-dark); }
input:focus, select:focus { outline: none; border-color: var(--hi); }
h1, h2, h3 { font-weight: normal; color: var(--hi); margin: 0 0 10px; text-transform: uppercase; letter-spacing: 1px; }
h2 { font-size: 13px; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
h3 { font-size: 12px; margin-top: 12px; }
table { border-collapse: collapse; width: 100%; }
th { text-align: left; color: var(--dim); font-weight: normal; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--line); padding: 3px 6px; }
td { padding: 3px 6px; border-bottom: 1px solid #0e2240; vertical-align: middle; }
tbody tr:hover td, tr[data-drop]:hover td { background: var(--panel2); }
td button { margin-right: 4px; }
ul, ol { padding-left: 18px; margin: 6px 0; }
pre { white-space: pre-wrap; font: inherit; margin: 8px 0; }
.dim { color: var(--dim); }
.ok { color: var(--ok); }
.danger { color: var(--danger); }
.warn { color: var(--warn); }
.tag { border: 1px solid var(--line); padding: 0 6px; font-size: 10px; text-transform: uppercase; }

/* ---- HUD ---- */
#hud { height: 40px; display: flex; align-items: center; gap: 12px; padding: 0 10px; }
#hud .hud-clock { color: var(--hi); letter-spacing: 1px; }
#hud .hud-speed button { padding: 1px 6px; }
#hud .hud-spacer { flex: 1; }
#hud .hud-toggles { display: flex; gap: 4px; }

/* ---- layout ---- */
#main { flex: 1; display: flex; min-height: 0; gap: 2px; }
#left { order: 2; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
#mapWrap { position: relative; flex: 1; min-height: 280px; overflow: hidden; background: var(--bg); }
#map, #bigMap { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
#map:focus-visible, #bigMap:focus-visible { outline: 1px solid var(--hi); outline-offset: -3px; }
.globe-labels { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.globe-error { position: absolute; inset: 25% 10%; line-height: 1.8; }
#routePanel { flex: none; max-height: 220px; padding: 10px 12px; overflow: auto; }
#bigMapWrap[hidden] { display: none; }
#stage.globe-fullscreen { transform: none !important; left: 0 !important; top: 0 !important; width: 100vw; height: 100vh; }
#stage.globe-fullscreen > #hud, #stage.globe-fullscreen > #taskbar { visibility: hidden; }
#bigMapWrap { position: absolute; inset: 0; display: flex; z-index: 5; }
#bigMapPane { position: relative; flex: 1; min-width: 0; overflow: hidden; background: var(--bg); }
#bigRoute { position: absolute; right: 20px; bottom: 40px; width: 300px; max-width: calc(100% - 40px); max-height: 65%; padding: 12px; overflow: auto; background: rgba(7,18,36,0.94); box-shadow: 0 8px 32px #0008; }
#bigRoute .route-buttons { flex-wrap: wrap; }
.globe-tools { display: flex; gap: 6px; margin-bottom: 8px; }
.route-status { margin-top: 8px; font-size: 10px; line-height: 1.6; }
.route-title { color: var(--hi); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.route-chain { line-height: 1.8; }
.route-node { display: inline-block; max-width: 100%; vertical-align: bottom; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 1px solid var(--line); padding: 0 5px; background: var(--panel2); }
.route-target { border-color: var(--hi); color: var(--hi2); }
.route-arrow { color: var(--dim); }
.route-buttons { margin-top: 8px; display: flex; gap: 6px; }

#screenWrap { order: 1; flex: 0 0 420px; display: flex; flex-direction: column; min-width: 0; background: var(--bg); }
#tracebar { min-height: 0; }
.trace { position: relative; height: 26px; background: repeating-linear-gradient(135deg, #5a0e0e 0 8px, #2a0606 8px 16px); animation: crawl 1s linear infinite; border-bottom: 2px solid var(--danger); overflow: hidden; }
@keyframes crawl { to { background-position: 22.6px 0; } }
.trace-fill { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(138, 20, 20, 0.85); transition: width 0.1s linear; }
.trace span { position: relative; line-height: 26px; padding-left: 12px; color: #ffd0d0; letter-spacing: 1px; text-transform: uppercase; font-size: 11px; }
.trace.alarm span { animation: blink 0.3s steps(2) infinite; }
@keyframes blink { to { opacity: 0.2; } }
#screen { flex: 1; overflow: auto; padding: 12px 16px; }
.sys-head { display: flex; align-items: center; gap: 12px; margin: -12px -16px 10px; padding: 5px 12px; background: var(--panel2); border-bottom: 2px solid var(--bevel-dark); }
.sys-name { font-size: 13px; color: var(--hi); text-transform: uppercase; letter-spacing: 1px; }
.sys-ip { color: var(--dim); margin-left: auto; }
.sys-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.menu { list-style: none; padding: 0; }
.menu li { margin: 4px 0; }
.login { max-width: 320px; display: flex; flex-direction: column; gap: 8px; }
.login label { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.membank { display: grid; gap: 3px; margin: 6px 0 8px; }
.mblock { height: 34px; box-sizing: border-box; display: flex; flex-direction: column; justify-content: center; padding: 0 5px; font-size: 10px; line-height: 13px; overflow: hidden; cursor: pointer; border: 2px solid; border-color: var(--bevel-light) var(--bevel-dark) var(--bevel-dark) var(--bevel-light); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5); }
.mblock .mb-name, .mblock .mb-size { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mblock .mb-name { color: var(--hi2); }
.mblock.free { background: #02050a; border-style: dotted; border-color: var(--line); box-shadow: none; }
.mblock.sw { background: #2b4a6f; }
.mblock.file { background: #3d6b3f; }
.mblock.enc { background: #6f5a2b; }
.mblock.pending { background: repeating-linear-gradient(45deg, #3d6b3f 0 4px, #0b1a33 4px 8px); }
.mblock.selected { outline: 2px solid var(--hi2); outline-offset: -1px; }
.mem-panel { border: 2px solid; border-color: var(--bevel-dark) var(--bevel-light) var(--bevel-light) var(--bevel-dark); padding: 6px 8px; font-size: 12px; display: flex; gap: 12px; align-items: center; min-height: 30px; box-sizing: border-box; }
.sec-strip { display: flex; gap: 8px; margin: 0 0 10px; }
.sec { border: 2px solid; border-color: var(--bevel-light) var(--bevel-dark) var(--bevel-dark) var(--bevel-light); background: var(--panel2); padding: 3px 8px; display: flex; flex-direction: column; font-size: 11px; min-width: 110px; }
.sec-name { color: var(--hi); text-transform: uppercase; letter-spacing: 0.5px; }
.sec.up .sec-state { color: var(--danger); }
.sec.down .sec-state { color: var(--ok); }
.sec.bypassed .sec-state { color: var(--warn); }
tr[data-drop] { cursor: default; }
tr.deleted td { color: var(--dim); font-style: italic; }
.ladder li.active { color: var(--hi2); }
.results { list-style: none; padding: 0; }
.results li { padding: 3px 0; }

/* ---- side panel ---- */
#side { order: 3; width: 264px; flex: none; display: flex; flex-direction: column; }
.side-tabs { display: flex; gap: 2px; padding: 2px; border-bottom: 2px solid var(--bevel-dark); }
.side-tabs button { flex: 1; padding: 5px 0; }
.side-body { flex: 1; overflow: auto; padding: 8px; }
.mail, .missions, .linklist { list-style: none; padding: 0; margin: 0; }
.mail li button { width: 100%; text-align: left; text-transform: none; letter-spacing: 0; font-size: 12px; display: flex; flex-direction: column; gap: 1px; padding: 5px 7px; margin-bottom: 4px; }
.mail li.unread .mail-subject { color: var(--hi2); }
.mail-from { color: var(--dim); font-size: 11px; }
.mail-view h3 { margin-top: 10px; }
.compose { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.missions li, .linklist li { padding: 6px 4px; border-bottom: 1px solid var(--line); }
.linklist li.is-target { border-left: 3px solid var(--hi); }
.linklist li.is-hop { border-left: 3px solid var(--ok); }
.linklist button { margin: 4px 4px 0 0; padding: 1px 6px; font-size: 10px; }

/* ---- dock ---- */
#taskbar { height: 124px; display: flex; }
.dock-software { width: 300px; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 3px; align-content: start; padding: 6px; overflow-y: auto; border-right: 2px solid var(--bevel-dark); }
.dock-sw { text-align: left; text-transform: none; letter-spacing: 0; font-size: 11px; padding: 1px 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dock-sw.open { border-color: var(--hi) var(--bevel-dark) var(--bevel-dark) var(--hi); }
.dock-windows { flex: 1; display: flex; gap: 8px; padding: 8px; overflow-x: auto; align-items: flex-start; }
.dock-empty { align-self: center; margin: auto; }
.pw { width: 200px; flex: none; background: var(--panel2); border: 2px solid; border-color: var(--bevel-light) var(--bevel-dark) var(--bevel-dark) var(--bevel-light); display: flex; flex-direction: column; font-size: 12px; animation: pop 120ms ease-out; }
@keyframes pop { from { transform: scale(0.94); opacity: 0; } }
.pw.running { border-color: var(--hi) var(--bevel-dark) var(--bevel-dark) var(--hi); }
.pw-head { display: flex; justify-content: space-between; align-items: center; padding: 3px 6px; background: #10254a; color: var(--hi); text-transform: uppercase; letter-spacing: 0.5px; font-size: 11px; border-bottom: 1px solid var(--bevel-dark); }
.pw-head button { padding: 0 5px; }
.pw-status { padding: 4px 6px; color: var(--dim); min-height: 28px; }
.pw-status.warn { color: var(--warn); }
.pw-body { display: flex; align-items: center; gap: 8px; padding: 4px 6px 6px; }
.pw.draggable { cursor: grab; touch-action: none; user-select: none; }
.pw-grip { width: 26px; height: 26px; font-size: 16px; line-height: 26px; text-align: center; color: var(--dim); flex: none; }
.pw-grip.active { color: var(--warn); }
.dock-sw.open { cursor: grab; touch-action: none; }
.bar { flex: 1; height: 10px; background: #02050a; border: 1px solid var(--bevel-dark); }
.bar-fill { height: 100%; background: var(--hi); transition: width 100ms linear; }
#carryChip { position: absolute; pointer-events: none; background: var(--warn); color: #000; padding: 2px 8px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; z-index: 7; border: 2px solid; border-color: #ffe08a #8a6a1a #8a6a1a #ffe08a; }
#stage[data-carry] { cursor: crosshair; }
#stage[data-carry="password"] [data-drop="password"], #stage[data-carry="cypher"] [data-drop="cypher"], #stage[data-carry="proxy"] [data-drop="proxy"], #stage[data-carry="firewall"] [data-drop="firewall"],
#stage[data-carry="monitor"] [data-drop="monitor"], #stage[data-carry="file"] [data-drop="file"], #stage[data-carry="log"] [data-drop="log"],
#stage[data-carry="gatewayFile"] [data-drop="gatewayFile"], #stage[data-carry="voice"] [data-drop="voice"] { outline: 2px solid var(--warn); outline-offset: -1px; cursor: copy; }
#stage[data-carry="password"] [data-drop="password"]:hover, #stage[data-carry="cypher"] [data-drop="cypher"]:hover, #stage[data-carry="proxy"] [data-drop="proxy"]:hover, #stage[data-carry="firewall"] [data-drop="firewall"]:hover,
#stage[data-carry="monitor"] [data-drop="monitor"]:hover, #stage[data-carry="file"] [data-drop="file"]:hover, #stage[data-carry="log"] [data-drop="log"]:hover,
#stage[data-carry="gatewayFile"] [data-drop="gatewayFile"]:hover, #stage[data-carry="voice"] [data-drop="voice"]:hover { background: rgba(255, 196, 71, 0.18); }

/* ---- overlays ---- */
#overlay { position: absolute; inset: 0; background: rgba(0, 3, 8, 0.92); display: flex; align-items: center; justify-content: center; z-index: 5; }
#overlay[hidden] { display: none; }
.dialog { background: var(--panel); border: 2px solid; border-color: var(--bevel-light) var(--bevel-dark) var(--bevel-dark) var(--bevel-light); padding: 28px 36px; display: flex; flex-direction: column; gap: 12px; align-items: center; min-width: 320px; }
.dialog h1 { letter-spacing: 10px; color: var(--hi); font-size: 28px; }
.dialog input { width: 240px; text-align: center; }
#flash { position: absolute; left: 50%; bottom: 100px; transform: translateX(-50%); background: var(--panel2); border: 2px solid; border-color: #ffe08a #8a6a1a #8a6a1a #ffe08a; color: var(--warn); padding: 5px 14px; z-index: 6; text-transform: uppercase; letter-spacing: 0.5px; font-size: 11px; animation: rise 150ms ease-out; pointer-events: none; }
@keyframes rise { from { transform: translate(-50%, 8px); opacity: 0; } }
#crt { position: absolute; inset: -2px; pointer-events: none; z-index: 8; background: repeating-linear-gradient(transparent 0 2px, rgba(0, 0, 0, 0.18) 2px 3px), radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, 0.45) 100%); animation: flicker 4s ease-in-out infinite; }
@keyframes flicker { 0%, 100% { opacity: 1; } 50% { opacity: 0.98; } }
#stage[data-crt="off"] #crt { display: none; }

button[data-action="buySoftware"], button[data-action="buyUpgrade"] { text-transform: none; letter-spacing: 0; }

.eth-neg { color: var(--danger); } .eth-pos { color: var(--ok); } .news { list-style: none; padding: 0; } .news-item { padding: 6px 0; border-bottom: 1px solid var(--line); } .news-head { color: var(--hi); text-transform: uppercase; letter-spacing: 0.5px; margin: 2px 0; }

.voicebox { border: 2px solid; border-color: var(--bevel-dark) var(--bevel-light) var(--bevel-light) var(--bevel-dark); background: var(--panel2); padding: 6px 10px; min-height: 28px; display: flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: 1px; }
.voicebox.ok { color: var(--ok); }
.voicebox .bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 28px; }
.voicebox .bars i { display: block; width: 3px; background: currentColor; opacity: .7; }
.voicebox.live .bars i { animation: wave 1.1s ease-in-out infinite alternate; }
@keyframes wave { from { transform: scaleY(.4); } to { transform: scaleY(1); } }
.login.cyphered { max-width: 460px; }
.cypherbox { border: 2px solid; border-color: var(--bevel-dark) var(--bevel-light) var(--bevel-light) var(--bevel-dark); background: #02050a; padding: 6px 10px; font-size: 11px; }
.cy-head { display: flex; justify-content: space-between; gap: 8px; text-transform: uppercase; letter-spacing: 1px; color: var(--hi); margin-bottom: 6px; }
.cypherbox.locked .cy-state { color: var(--danger); }
.cypherbox.running .cy-state { color: var(--warn); }
.cypherbox.done .cy-state { color: var(--ok); }
.cy-grid { display: grid; grid-template-columns: repeat(16, 1fr); gap: 3px 4px; font-size: 12px; }
.cy-grid i { font-style: normal; text-align: center; min-width: 2ch; }
.cy-hidden { color: var(--danger); opacity: 0.8; }
.cy-key { color: var(--dim); }
.cy-plain { color: var(--hi2); }
.cy-mark { color: var(--hi); }
.transcript p { margin: 2px 0; }
.up { color: var(--ok); } .down { color: var(--danger); }
.sparkline { display: block; margin: 8px 0; color: var(--hi); max-width: 100%; }
.trade { display: flex; gap: 8px; align-items: center; }
.pw-note { padding: 0 6px 4px; font-size: 11px; }
.desc { color: var(--dim); font-size: 11px; margin: 2px 0 6px; white-space: normal; line-height: 1.35; }
.shop-item { padding: 8px 0 10px; border-bottom: 1px solid var(--line); }
.shop-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.shop-head b { color: var(--hi2); font-weight: normal; }
.shop-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.mail-tag { font-size: 9px; letter-spacing: 1px; padding: 0 4px; border: 1px solid; margin-right: 2px; vertical-align: 1px; }
.tag-paid { color: var(--ok); border-color: var(--ok); }
.tag-incomplete { color: var(--danger); border-color: var(--danger); }
.tag-job { color: var(--hi); border-color: var(--hi); }
.tag-notice { color: var(--warn); border-color: var(--warn); }

.cases { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 8px; }
.case { border: 1px solid var(--line); padding: 5px 8px; }
.case-chain { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 4px 0; font-size: 11px; }
.hop { padding: 0 5px; border: 1px solid; }
.hop-intact { color: var(--danger); border-color: var(--danger); }
.hop-recoverable { color: var(--warn); border-color: var(--warn); }
.hop-safe, .hop-gone { color: var(--ok); border-color: var(--ok); }
.tag.danger { color: var(--danger); border: 1px solid var(--danger); font-size: 9px; padding: 0 4px; }
.evidence { color: var(--warn); }
.raid { color: #000; background: var(--danger); padding: 0 6px; font-weight: bold; animation: raid-blink 1s steps(2) infinite; }
@keyframes raid-blink { to { visibility: hidden; } }

.mod { font-size: 9px; letter-spacing: 1px; padding: 0 4px; border: 1px solid; vertical-align: 1px; }
.mod-deadline { color: var(--warn); border-color: var(--warn); }
.mod-clean { color: var(--ok); border-color: var(--ok); }
.mod-burn { color: var(--danger); border-color: var(--danger); }
.mail-filters { display: flex; gap: 4px; margin-bottom: 6px; }
.mail-filters button { font-size: 10px; padding: 1px 6px; }
.routines { list-style: none; padding: 0; margin: 4px 0; }
.routines li { margin-bottom: 4px; }
.routine-editor .steps { margin: 4px 0; padding-left: 18px; }
.routine-editor .steps button { padding: 0 4px; font-size: 10px; margin-left: 2px; }
.routine-pick { max-width: 110px; font: inherit; font-size: 11px; background: var(--panel2); color: var(--text); border: 1px solid var(--line); }
#stage[data-font="small"] #screen, #stage[data-font="small"] #side { zoom: 0.9; }
#stage[data-font="large"] #screen, #stage[data-font="large"] #side { zoom: 1.15; }

button:focus-visible { outline: 2px solid var(--hi); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Globe intelligence stays available in both compact and full-screen views. */
.intel-tabs { display: flex; gap: 4px; margin-top: 10px; }
.intel-tabs button { flex: 1; padding: 3px 5px; }
.intel-list { list-style: none; padding: 0; margin: 8px 0 0; }
.intel-list li { padding: 8px 0; border-top: 1px solid var(--line); line-height: 1.6; }
.intel-list button { margin-top: 4px; }
.intel-list select { max-width: 100%; }
.intel-list label { display: block; }
.intel-headline { width: 100%; text-align: left; text-transform: none; letter-spacing: 0; }
.pursuit-alert { border-left: 2px solid currentColor; margin-top: 8px; padding-left: 8px; line-height: 1.5; }
.discovery-notice { color: #79e6c4; margin-top: 8px; font-size: 10px; line-height: 1.6; }
.missions button { margin: 6px 4px 0 0; }

/* Phones use full-size panels instead of a scaled desktop. */
#mobileNav, #mobileConnection { display: none; }
@media (max-width: 900px) {
  #stage, #stage.globe-fullscreen { width: 100%; height: 100dvh; transform: none !important; left: 0 !important; top: 0 !important; padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left); }
  #stage { font-size: 13px; }
  button { min-height: 44px; font-size: 12px; touch-action: manipulation; }
  input, select { font-size: 16px; min-height: 40px; max-width: 100%; box-sizing: border-box; }
  #hud { height: auto; min-height: 52px; flex: none; overflow-x: auto; gap: 10px; padding: 4px 8px; }
  #hud > * { flex-shrink: 0; }
  #hud .hud-speed { display: flex; }
  #hud .hud-clock { font-size: 11px; width: 76px; white-space: normal; }
  #hud .hud-spacer { display: none; }
  #main { overflow: hidden; }
  #left, #screenWrap, #side { display: none; width: 100%; flex: 1; min-height: 0; }
  #stage[data-mobile-panel="globe"] #left { display: flex; }
  #stage[data-mobile-panel="system"] #screenWrap { display: flex; }
  #stage[data-mobile-panel="intel"] #side { display: flex; }
  #mapWrap { min-height: 160px; }
  #routePanel { max-height: 45%; padding: 8px; }
  .route-buttons, .globe-tools { flex-wrap: wrap; }
  #screen { padding: 12px; overflow-wrap: anywhere; }
  .sys-head { margin: -12px -12px 10px; flex-wrap: wrap; gap: 6px; }
  .sys-name, .sys-ip { overflow-wrap: anywhere; }
  .sec-strip, .trade, .mem-panel { flex-wrap: wrap; }
  .sec { min-width: 0; }
  .login label { flex-wrap: wrap; }
  .cy-grid { grid-template-columns: repeat(8, 1fr); }
  #taskbar { display: none; min-height: 0; height: auto; flex: 1; flex-direction: column; overflow: auto; }
  #stage[data-mobile-panel="tools"] #main { display: none; }
  #stage[data-mobile-panel="tools"] #taskbar { display: flex; }
  .dock-software { width: auto; flex: none; overflow: visible; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dock-windows { flex: none; flex-direction: column; overflow: visible; }
  .pw { width: 100%; box-sizing: border-box; }
  .pw-status { font-size: 13px; }
  #mobileConnection:not(:empty) { display: flex; align-items: center; gap: 4px; flex: none; }
  #mobileConnection .trace { flex: 1; }
  #mobileConnection button { margin-left: auto; }
  #stage.globe-fullscreen #mobileConnection { display: none; }
  #mobileNav { display: flex; flex: none; gap: 2px; padding: 4px 2px max(4px, env(safe-area-inset-bottom)); background: var(--panel); }
  #mobileNav button { flex: 1; padding: 4px; font-size: 11px; }
  #stage.globe-fullscreen #mobileNav { visibility: hidden; }
  #bigMapWrap { flex-direction: column; }
  #bigMapPane { min-height: 120px; }
  #bigRoute { position: relative; right: auto; bottom: auto; width: 100%; max-width: none; max-height: 45%; flex: none; padding: 8px 8px max(8px, env(safe-area-inset-bottom)); }
  .dialog { min-width: 0; width: calc(100% - 24px); max-width: 360px; padding: 24px; box-sizing: border-box; }
  .dialog input { width: 100%; }
  #flash { width: calc(100% - 48px); box-sizing: border-box; bottom: 70px; }
  #carryChip { position: fixed; left: 8px !important; top: auto !important; bottom: 62px; max-width: calc(100% - 40px); }
  #crt { opacity: .4; animation: none; }
  #stage[data-font] #side, #stage[data-font] #screen { zoom: 1; }
  .linklist button, .mail-filters button, .intel-tabs button { min-height: 44px; font-size: 12px; }
}
