 :root {
  color-scheme: dark;
  --ink: #d3ddd1;
  --muted: #839d98;
  --dim: #587477;
  --deep: #07191b;
  --panel: #0d2528;
  --panel-hi: #163438;
  --line: #244449;
  --amber: #e5a64a;
  --amber-pale: #f4cc7d;
  --green: #85c5a1;
  --warning: #f17b61;
  --font: "Space Mono", "SFMono-Regular", Consolas, monospace;
  font-family: var(--font);
  background: var(--deep);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 340px; min-height: 100vh; color: var(--ink); background: radial-gradient(ellipse at 47% 0%, #183638 0, #0b2124 45%, #071619 100%); }
button { color: inherit; font: inherit; }
button:focus-visible, a:focus-visible, canvas:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.site-shell { width: min(1620px, 100%); min-height: 100vh; margin: 0 auto; padding: 0 28px 15px; display: flex; flex-direction: column; }
.masthead { min-height: 75px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid rgba(118, 158, 157, .18); }
.brand { display: inline-flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; }
.brand-mark { width: 43px; height: 35px; display: grid; place-items: center; border: 1px solid rgba(229,166,74,.48); border-radius: 4px; background: rgba(229,166,74,.06); }
.brand-mark svg { width: 31px; fill: none; stroke: var(--amber); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.brand-mark circle { fill: var(--amber); stroke: none; }
.brand-copy { display: flex; flex-direction: column; gap: 3px; }
.brand-copy strong { letter-spacing: .18em; font-size: 14px; color: #eff2e9; }
.brand-copy small { letter-spacing: .075em; color: var(--muted); font-size: 7px; }
.masthead-right, .strip-actions { display: flex; align-items: center; gap: 12px; }
.seed-chip { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.eyebrow, .seed-chip code { font-size: 9px; letter-spacing: .11em; }
.eyebrow { color: var(--muted); }
.seed-chip code { color: var(--amber-pale); }
.button { border: 1px solid var(--line); border-radius: 4px; cursor: pointer; background: rgba(21,52,56,.6); transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.button:hover:not(:disabled) { border-color: var(--amber); background: rgba(229,166,74,.09); }
.button:active:not(:disabled) { transform: translateY(1px); }
.button:disabled { opacity: .42; cursor: not-allowed; }
.button.quiet { padding: 8px 11px; color: var(--ink); font-size: 9px; }
.button.compact { min-width: 31px; padding: 6px 8px; font-size: 9px; }
kbd { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 4px; border: 1px solid #426064; border-bottom-width: 2px; border-radius: 3px; color: #d5ddcf; background: #163236; font-size: 9px; line-height: 1; }
.button kbd { margin-left: 5px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 286px; gap: 16px; padding: 18px 0 13px; flex: 1; min-height: 0; }
.play-column { min-width: 0; display: flex; flex-direction: column; }
.instrument-strip { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 38px; padding: 0 11px; border: 1px solid var(--line); border-bottom: 0; border-radius: 5px 5px 0 0; background: rgba(12,34,37,.94); color: var(--muted); font-size: 8px; letter-spacing: .065em; }
.strip-title { display: inline-flex; align-items: center; gap: 8px; min-width: 124px; color: #c5d0c7; }
.live-dot, .small-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 9px rgba(229,166,74,.5); }
.strip-coordinates { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.strip-coordinates strong { color: var(--ink); font-weight: 400; }
.divider { color: var(--dim); padding: 0 3px; }
.canvas-shell { position: relative; flex: 1; min-height: 510px; height: min(73vh, 860px); overflow: hidden; isolation: isolate; border: 1px solid #2a5051; border-radius: 0 0 5px 5px; background: #091516; box-shadow: 0 20px 70px rgba(0,0,0,.27), inset 0 0 90px rgba(0,0,0,.2); }
#station { position: absolute; inset: 0; display: block; width: 100%; height: 100%; cursor: crosshair; image-rendering: pixelated; }
.film-grain { position: absolute; z-index: 1; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(5,12,13,.08) 0px, rgba(5,12,13,.08) 1px, transparent 2px, transparent 4px), radial-gradient(ellipse at 50% 50%, transparent 52%, rgba(2,9,10,.24) 100%); opacity: .42; mix-blend-mode: multiply; }
.canvas-shell::before { position: absolute; z-index: 2; inset: 9px; border: 1px solid rgba(185,208,184,.06); content: ""; pointer-events: none; }
.canvas-shell.mouse-locked { cursor: none; }
.canvas-shell.mouse-locked #station { cursor: none; }
.canvas-corner { position: absolute; z-index: 3; display: flex; align-items: center; gap: 7px; color: #a3b8ad; font-size: 8px; letter-spacing: .09em; text-shadow: 0 1px 5px #071315; pointer-events: none; }
.canvas-corner.top-left { left: 19px; top: 17px; }
.canvas-corner.top-right { top: 15px; right: 19px; display: grid; grid-template-columns: auto auto; align-items: center; column-gap: 8px; }
.canvas-corner.top-right strong { color: var(--amber-pale); font-size: 13px; font-weight: 400; }
.oxygen-mini-track { grid-column: 1 / 3; width: 92px; height: 3px; margin-top: 3px; overflow: hidden; background: rgba(5,17,19,.75); }
.oxygen-mini-track i { display: block; width: 100%; height: 100%; background: var(--amber); transition: width .2s linear; }
.canvas-corner.bottom-left { left: 19px; bottom: 17px; color: #d0dacf; font-size: 8px; }
.canvas-corner.bottom-right { right: 19px; bottom: 17px; }
.corner-bracket { width: 8px; height: 8px; border-left: 1px solid var(--amber); border-top: 1px solid var(--amber); }
.signal-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 11px; }
.signal-bars i { width: 2px; background: #7fa29b; opacity: .25; }
.signal-bars i:nth-child(1) { height: 3px; }.signal-bars i:nth-child(2) { height: 5px; }.signal-bars i:nth-child(3) { height: 8px; }.signal-bars i:nth-child(4) { height: 11px; }
.signal-bars.active i { opacity: .95; background: #81ddc0; box-shadow: 0 0 6px #70cab0; }
.touch-controls { display: none; }
.interact-prompt { position: absolute; z-index: 4; left: 50%; bottom: 56px; transform: translateX(-50%); display: flex; gap: 9px; align-items: center; padding: 8px 12px; border: 1px solid rgba(229,166,74,.72); border-radius: 3px; background: rgba(7,22,24,.94); color: var(--amber-pale); font-size: 9px; letter-spacing: .075em; box-shadow: 0 8px 28px rgba(0,0,0,.28); white-space: nowrap; }
.interact-prompt[hidden] { display: none; }
.look-hint { position: absolute; z-index: 3; right: 19px; bottom: 45px; color: rgba(182,202,187,.55); font-size: 7px; letter-spacing: .08em; pointer-events: none; }
.navigation-banner { position: absolute; z-index: 4; top: 43px; left: 50%; display: flex; align-items: center; gap: 6px; max-width: calc(100% - 28px); transform: translateX(-50%); padding: 5px 8px; border: 1px solid rgba(229,166,74,.48); border-radius: 3px; background: rgba(7,22,24,.9); color: var(--amber-pale); font-size: 7px; letter-spacing: .06em; line-height: 1.35; text-align: center; box-shadow: 0 5px 18px rgba(0,0,0,.25); pointer-events: none; }
.navigation-banner > span:first-child { color: var(--amber); font-size: 11px; }
#navigation-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.screen-overlay { position: absolute; z-index: 5; inset: 0; display: grid; place-items: center; padding: 24px; background: linear-gradient(90deg, rgba(4,16,18,.72), rgba(5,20,22,.64) 56%, rgba(6,21,23,.44)), radial-gradient(circle at 75% 50%, rgba(56,123,113,.18), transparent 54%); backdrop-filter: blur(2px); }
.screen-overlay[hidden] { display: none; }
.overlay-card { width: min(460px, 100%); padding: 27px 29px 23px; border: 1px solid rgba(124,162,157,.3); border-left: 2px solid var(--amber); border-radius: 3px; background: rgba(9,30,32,.95); box-shadow: 0 20px 70px rgba(0,0,0,.43); }
.overlay-index { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; border-bottom: 1px solid rgba(130,165,159,.19); color: var(--muted); font-size: 8px; letter-spacing: .1em; }
.overlay-index .small-dot { width: 5px; height: 5px; }
.kicker { margin: 22px 0 10px; color: var(--amber); font-size: 8px; letter-spacing: .1em; }
.overlay-card h1 { margin: 0; color: #eff1e6; font-size: clamp(31px, 4vw, 45px); font-weight: 400; line-height: 1.16; letter-spacing: -.075em; }
.overlay-card h1 em { color: var(--amber-pale); font-style: normal; }
.overlay-copy { max-width: 390px; margin: 14px 0 20px; color: #a6b9ae; font-size: 10px; line-height: 1.9; }
.briefing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding: 12px 0 17px; border-top: 1px solid rgba(130,165,159,.17); }
.briefing-grid div { display: flex; flex-direction: column; gap: 7px; }
.briefing-grid span { color: #78938e; font-size: 7px; letter-spacing: .1em; }
.briefing-grid strong { color: #d0d9ce; font-size: 8px; font-weight: 400; }
.button.primary { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 12px 14px; border-color: #b77c31; background: #bd8235; color: #122b2c; font-size: 10px; font-weight: 700; letter-spacing: .06em; }
.button.primary:hover:not(:disabled) { border-color: var(--amber-pale); background: var(--amber); }
.button.primary b { font-size: 15px; font-weight: 400; }
.text-button { width: 100%; padding: 13px 0 0; border: 0; background: transparent; color: #91a6a0; font-size: 8px; cursor: pointer; letter-spacing: .03em; }
.text-button:hover { color: var(--amber-pale); }.text-button span { font-size: 12px; margin-left: 4px; }
.play-footer { min-height: 40px; display: flex; align-items: center; gap: 13px; padding: 0 10px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 5px 5px; background: rgba(11,34,37,.84); }
.control-hint { display: flex; gap: 4px; align-items: center; color: #829b97; font-size: 7px; letter-spacing: .07em; white-space: nowrap; }
.control-hint span { margin-left: 4px; }
.control-hint kbd { min-width: 17px; height: 17px; font-size: 8px; }
.footer-note { margin-left: auto; color: #718c8d; font-size: 7px; letter-spacing: .07em; text-align: right; }
.systems-column { min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.panel { border: 1px solid var(--line); border-radius: 4px; background: linear-gradient(150deg, rgba(16,42,45,.97), rgba(10,30,33,.97)); }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 6px; color: #86a09b; font-size: 8px; letter-spacing: .08em; }
.tiny-mark { color: var(--amber); font-size: 12px; }
.objective-panel { padding: 13px 13px 9px; }
.objective-panel h2 { margin: 15px 0 7px; color: #ecf0e4; font-size: 16px; line-height: 1.25; font-weight: 400; letter-spacing: -.035em; }
.objective-panel > p { margin: 0 0 13px; color: #93a9a3; font-size: 8px; line-height: 1.8; }
.objective-list { list-style: none; padding: 0; margin: 0; }
.objective-list li { min-height: 29px; display: grid; grid-template-columns: 13px 1fr auto; align-items: center; gap: 7px; border-top: 1px solid rgba(132,164,158,.11); color: #bdc9bf; font-size: 8px; }
.objective-list li small { color: #718c8b; font-size: 7px; }
.check { width: 9px; height: 9px; border: 1px solid #587476; border-radius: 50%; }
.objective-list li.complete .check { position: relative; border-color: var(--green); background: var(--green); }
.objective-list li.complete .check::after { position: absolute; left: 2px; top: -1px; content: "✓"; color: #143239; font-size: 7px; }
.objective-list li.complete > span:nth-child(2) { color: #829995; text-decoration: line-through; text-decoration-color: #567074; }
.meters-panel { padding: 12px 13px 10px; }
.panel-live { color: var(--amber); font-size: 7px; }
.meter-row { padding-top: 11px; }
.meter-label { display: flex; justify-content: space-between; align-items: center; color: #9aaca5; font-size: 7px; letter-spacing: .07em; }
.meter-label strong { color: #cad4c8; font-size: 7px; font-weight: 400; }
.meter-label strong.low, #oxygen-number.low { color: var(--warning); }
.meter-track { height: 4px; margin-top: 7px; overflow: hidden; border-radius: 4px; background: #06171a; }
.meter-track i { display: block; width: 100%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #bf8036, var(--amber-pale)); transition: width .25s ease; }
.meter-track i.low { background: var(--warning); }
.system-track { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: #718c8b; font-size: 7px; letter-spacing: .02em; }
.system-track i { flex: 0 0 auto; width: 5px; height: 5px; border-radius: 50%; background: #4e676a; }
.system-track i.on { background: var(--green); box-shadow: 0 0 8px rgba(120,182,152,.4); }
.system-track i.warning { background: var(--amber); box-shadow: 0 0 8px rgba(229,166,74,.35); }
.chart-panel { padding: 11px 12px 9px; transition: flex .2s ease; }
.scanner-heading { width: 100%; padding: 0; border: 0; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.scanner-heading:hover { color: var(--amber-pale); }
.map-legend { display: inline-flex; align-items: center; gap: 5px; color: #79928d; font-size: 6px; }
.map-legend i { width: 10px; height: 2px; border: 0; background: var(--amber); }
#mini-map { display: block; width: 100%; height: 110px; margin-top: 8px; border: 1px solid rgba(114,151,146,.12); background: rgba(3,17,19,.72); transition: height .2s ease, opacity .2s ease; }
.chart-panel:not(.scanner-expanded) #mini-map { height: 74px; }
.scanner-expanded #mini-map { height: 164px; }
.chart-footer { display: flex; justify-content: space-between; margin-top: 7px; color: #78908e; font-size: 6px; letter-spacing: .07em; }
.log-panel { flex: 1; min-height: 80px; padding: 11px 13px 9px; }
.log-entries { display: flex; flex-direction: column; gap: 6px; margin-top: 9px; }
.log-entries p { margin: 0; color: #c9b783; font-size: 8px; line-height: 1.6; }
.log-entries p::before { content: "// "; color: #7e9990; }
.log-entries .empty-log { color: #78918e; font-size: 7px; }
.page-footer { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0 1px; color: #648083; font-size: 7px; letter-spacing: .07em; }
.page-footer i { color: var(--amber); font-style: normal; }
.toast { position: fixed; z-index: 10; left: 50%; bottom: 23px; transform: translate(-50%, 12px); max-width: calc(100vw - 30px); padding: 9px 14px; border: 1px solid rgba(229,166,74,.58); border-radius: 3px; background: rgba(7,24,26,.97); color: var(--amber-pale); font-size: 8px; letter-spacing: .05em; text-align: center; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
noscript { display: block; padding: 12px; color: var(--warning); text-align: center; }
@media (min-width: 1500px) { .workspace { grid-template-columns: minmax(0,1fr) 306px; } .canvas-shell { height: min(78vh, 900px); } }
@media (max-width: 1150px) { .site-shell { padding: 0 17px 12px; } .workspace { grid-template-columns: minmax(0,1fr) 268px; gap: 10px; } .canvas-shell { min-height: 445px; } .play-footer { gap: 8px; } .footer-note { display: none; } }
@media (max-width: 820px) { .site-shell { padding: 0 12px 12px; } .workspace { grid-template-columns: 1fr; padding-top: 12px; } .canvas-shell { min-height: 390px; height: min(64vh,700px); } .systems-column { display: grid; grid-template-columns: 1fr 1fr; } .objective-panel { grid-row: span 2; } .log-panel { min-height: 100px; } .chart-panel { min-height: 150px; } #mini-map, .chart-panel:not(.scanner-expanded) #mini-map { height: 84px; } .page-footer { font-size: 6px; } }
@media (max-width: 560px) {
  .site-shell { padding: 0 8px 8px; }
  .masthead { min-height: 55px; gap: 8px; }
  .brand { gap: 8px; }
  .brand-mark { width: 35px; height: 30px; }
  .brand-mark svg { width: 26px; }
  .brand-copy strong { font-size: 11px; }
  .brand-copy small { font-size: 5px; }
  .seed-chip { display: none; }
  .button.quiet { padding: 7px 8px; font-size: 7px; }
  .workspace { padding: 7px 0 6px; gap: 7px; }
  .canvas-shell { flex: 0 0 auto; min-height: 320px; height: max(340px, min(58vh, 500px)); height: max(340px, min(58svh, 500px)); }
  .navigation-banner { top: 34px; max-width: calc(100% - 16px); padding: 4px 6px; font-size: 6px; }
  .strip-coordinates { display: none; }
  .instrument-strip { min-height: 33px; padding: 0 8px; }
  .strip-title { min-width: 0; font-size: 7px; }
  .strip-actions { gap: 6px; }
  .button.compact { min-width: 29px; padding: 5px 6px; }
  .screen-overlay { overflow-y: auto; padding: 7px; }
  .overlay-card { width: min(420px, 100%); max-height: 100%; overflow-y: auto; padding: 12px 14px 10px; }
  .overlay-index { padding-bottom: 7px; font-size: 6px; }
  .kicker { margin: 10px 0 5px; font-size: 6px; }
  .overlay-card h1 { font-size: clamp(25px, 7vw, 30px); line-height: 1.03; }
  .overlay-copy { display: -webkit-box; overflow: hidden; margin: 8px 0 10px; font-size: 8px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; }
  .briefing-grid { display: none; }
  .button.primary { padding: 10px 12px; font-size: 9px; }
  .text-button { padding-top: 8px; font-size: 7px; }
  .play-footer { min-height: 31px; gap: 6px; justify-content: space-between; padding: 0 7px; overflow: hidden; }
  .control-hint { gap: 3px; }
  .control-hint span { display: none; }
  .control-hint kbd { min-width: 15px; height: 16px; padding: 0 3px; }
  .footer-note { display: none; }
  .systems-column { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
  .objective-panel { grid-column: 1 / -1; grid-row: auto; padding: 8px 9px 6px; }
  .objective-panel h2 { margin: 7px 0 4px; font-size: 13px; }
  .objective-panel > p { margin: 0 0 6px; font-size: 7px; line-height: 1.45; }
  .objective-list li { min-height: 24px; gap: 5px; font-size: 7px; }
  .objective-list li small { font-size: 6px; }
  .meters-panel { padding: 8px 8px 7px; }
  .meter-row { padding-top: 7px; }
  .meter-label { gap: 4px; font-size: 6px; }
  .meter-label strong, .system-track { font-size: 6px; }
  .system-track { white-space: nowrap; overflow: hidden; }
  .chart-panel { min-height: 0; padding: 8px; }
  .panel-heading { font-size: 6px; }
  .map-legend { font-size: 5px; }
  #mini-map, .chart-panel:not(.scanner-expanded) #mini-map { height: 48px; margin-top: 5px; }
  .scanner-expanded #mini-map { height: 86px; }
  .chart-footer { margin-top: 4px; font-size: 5px; }
  .log-panel { grid-column: 1 / -1; flex: 0 0 auto; min-height: 0; padding: 7px 9px; }
  .log-entries { gap: 4px; margin-top: 5px; }
  .log-entries p { font-size: 7px; }
  .log-entries .empty-log { display: none; }
  .page-footer { padding: 4px 0 0; font-size: 5px; }
  .page-footer span:last-child { display: none; }
  .touch-controls { position: absolute; z-index: 4; right: 12px; bottom: 12px; left: 12px; display: flex; align-items: flex-end; justify-content: space-between; pointer-events: none; }
  .touch-pad { display: grid; grid-template: 36px 36px 36px / 36px 36px 36px; grid-template-areas: ". up ." "left . right" ". down ."; gap: 3px; pointer-events: auto; }
  .touch-key, .touch-actions button { display: grid; place-content: center; border: 1px solid rgba(163,192,175,.47); border-radius: 7px; background: rgba(7,23,25,.75); color: #e4d6af; box-shadow: 0 3px 10px rgba(0,0,0,.28); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); touch-action: none; user-select: none; -webkit-user-select: none; }
  .touch-key { padding: 0; font-size: 14px; }
  .touch-key:active, .touch-actions button:active { border-color: var(--amber); background: rgba(176,119,47,.75); }
  .touch-up { grid-area: up; }.touch-left { grid-area: left; }.touch-down { grid-area: down; }.touch-right { grid-area: right; }
  .touch-actions { display: flex; gap: 7px; pointer-events: auto; }
  .touch-actions button { width: 48px; height: 46px; padding: 5px 3px; font-size: 12px; font-weight: 700; }
  .touch-actions small { color: #b3c0ad; font-size: 5px; font-weight: 400; letter-spacing: .08em; }
  #station { touch-action: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* The visor keeps navigation and oxygen in view as the station shifts. */
body { min-width: 0; }
[hidden] { display: none !important; }
.back-to-hub, #head-wallet { color: var(--ink); text-decoration: none; font-size: .75rem; white-space: nowrap; }
.back-to-hub:hover, #head-wallet:hover { color: var(--amber-pale); }
.brand-copy strong { font-family: "Arial Narrow", Impact, sans-serif; font-size: 1.65rem; letter-spacing: .035em; }
.brand-copy small { font-size: .61rem; }
.instrument-strip { min-height: 45px; font-size: .68rem; }
.button.compact { min-height: 38px; }
#station { touch-action: none; }
.look-hint { font-size: .59rem; }
.navigation-banner { max-width: calc(100% - 125px); font-size: .65rem; }
.bearing { position: absolute; z-index: 4; display: flex; align-items: center; gap: 6px; top: 68px; left: 50%; transform: translateX(-50%); color: #fff5cf; background: #092224e0; border-radius: 4px; padding: 2px 6px; font-size: .64rem; font-weight: 600; pointer-events: none; white-space: nowrap; }
.bearing b { display: inline-block; font-size: 1.05rem; line-height: 1.1; color: var(--amber-pale); }
#radar-map { display: none; }
#air-warning { position: absolute; z-index: 4; left: 50%; top: 105px; transform: translateX(-50%); text-align: center; background: #341f28; border: 1px solid #df7987; padding: 6px 8px; color: #ffd1d6; font-size: .65rem; pointer-events: none; }
.overlay-index, .kicker { font-size: .62rem; }
.overlay-copy { font-size: .87rem; line-height: 1.55; }
.briefing-grid span { font-size: .63rem; }
.briefing-grid strong { font-size: .72rem; }
.button.primary { min-height: 46px; font-size: .81rem; }
.round-utilities { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 5px 14px; }
.round-utilities a, .round-utilities .text-button, #retry-credit { color: var(--amber-pale); font-size: .73rem; min-height: 38px; }
#reward-progress, #result-credit { color: #c6ddd4; font-size: .73rem; line-height: 1.4; margin: 4px 0 0; }
#result-credit:empty { display: none; }
.chart-panel #mini-map { min-height: 86px; }
.meters-panel .meter-label { font-size: .65rem; }
.page-footer { font-size: .66rem; }
.toast { pointer-events: none; }

@media (max-width: 820px), (pointer: coarse) {
  .canvas-shell { height: min(64svh, 690px); min-height: 350px; }
  .touch-controls { position: absolute; z-index: 4; right: 12px; bottom: 15px; left: 12px; display: none; align-items: flex-end; justify-content: space-between; pointer-events: none; }
  .canvas-shell[data-playing="true"] .touch-controls { display: flex; }
  .touch-pad { display: grid; grid-template: repeat(3, 44px) / repeat(3, 44px); grid-template-areas: ". up ." "left . right" ". down ."; gap: 3px; }
  .touch-key, .touch-actions button { display: grid; place-content: center; border: 1px solid #a3c0af99; border-radius: 10px; background: #071719e8; color: #f9e6b9; touch-action: none; user-select: none; box-shadow: 0 3px 8px #071719; }
  .touch-key { font-size: .95rem; padding: 0; }
  .touch-key.held, .touch-actions button:active { border-color: #f4cc7d; background: #775338; }
  .touch-up { grid-area: up; }.touch-left { grid-area: left; }.touch-down { grid-area: down; }.touch-right { grid-area: right; }
  .touch-actions { display: flex; gap: 7px; pointer-events: auto; }
  .touch-actions button { width: 53px; height: 48px; font-size: .88rem; }
  .touch-actions small { font-size: .56rem; letter-spacing: .04em; }
  .touch-pad { pointer-events: none; }
  .touch-key { pointer-events: auto; }
  .look-hint, .canvas-corner.bottom-left, .canvas-corner.bottom-right { display: none; }
  .interact-prompt { bottom: 74px; max-width: 98%; font-size: .63rem; }
  .interact-prompt kbd { display: none; }
  .canvas-shell[data-playing="true"] #radar-map { position: absolute; display: block; z-index: 3; left: 10px; top: 89px; width: 104px; height: 74px; border: 1px solid #a3c0af88; border-radius: 5px; pointer-events: none; }
  .canvas-shell.scanner-open[data-playing="true"] #radar-map { width: min(245px, calc(100% - 23px)); height: 128px; }
}

@media (max-width: 560px) {
  .site-shell { padding-inline: 9px; }
  .masthead { min-height: 58px; }
  .brand-copy strong { font-size: 1.35rem; }
  .brand-copy small { display: none; }
  .masthead-right { gap: 8px; }
  .button.quiet { min-height: 40px; padding-inline: 7px; font-size: .64rem; }
  .back-to-hub, #head-wallet { font-size: .66rem; }
  .canvas-shell { height: clamp(387px, 65svh, 585px); }
  .strip-title, .strip-actions .button { font-size: .65rem; }
  .strip-actions .button { min-width: 45px; min-height: 44px; }
  .canvas-corner.top-left { top: 12px; left: 10px; }
  .canvas-corner.top-right { top: 10px; right: 10px; }
  .navigation-banner { top: 41px; max-width: calc(100% - 24px); font-size: .61rem; }
  .bearing { top: 69px; }
  #air-warning { top: 167px; width: max-content; max-width: 85%; }
  .screen-overlay { padding: 8px; }
  .overlay-card { padding: 14px; }
  .overlay-card h1 { font-size: 2.35rem; }
  .overlay-copy { display: block; overflow: visible; font-size: .83rem; margin: 9px 0 12px; }
  .briefing-grid { display: grid; padding: 8px 0 12px; }
  .briefing-grid strong { font-size: .68rem; }
  .objective-panel h2 { font-size: 1rem; }
  .objective-panel > p, .objective-list li, .log-entries p { font-size: .7rem; }
  .panel-heading, .objective-list li small, .chart-footer, .map-legend { font-size: .59rem; }
  .system-track { white-space: normal; font-size: .61rem; }
  .play-footer { display: none; }
}
@media (max-height: 500px) and (orientation: landscape) and (pointer: coarse) {
  .site-shell { padding-inline: 7px; }
  .masthead { min-height: 43px; }
  .workspace { display: block; padding-top: 5px; }
  .canvas-shell { min-height: 235px; height: calc(100svh - 99px); }
  .systems-column { margin-top: 8px; }
  .touch-pad { grid-template: repeat(3, 38px) / repeat(3, 45px); }
  .overlay-card { padding-block: 8px; }
  .overlay-index, .kicker, .briefing-grid { display: none; }
}
