:root { color-scheme: light; --paper: #eeeae1; --ink: #243a3c; --muted: #78827b; --line: #d7d9ce; --orange: #df6845; --green: #487563; --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace; }
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, select, input[type="range"], .toggle-row { cursor: pointer; }
button { color: inherit; }
button, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, select:focus-visible, canvas:focus-visible, input:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; }
button { transition: background .15s ease, color .15s ease; }
.app { max-width: 1512px; margin: auto; padding: 0 48px; }
.masthead { min-height: 105px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid #ccd0c5; }
.brand { display: flex; align-items: center; gap: 15px; }
.brand-mark { width: 46px; height: 46px; padding: 6px; background: var(--orange); border-radius: 9px; transform: rotate(-5deg); }
.brand-mark svg { stroke: #fff5da; stroke-width: 3; fill: none; }
.wordmark { font-size: 15px; letter-spacing: 2.6px; font-weight: 800; }
.wordmark span { color: #a3aa9d; margin: 0 5px; font-weight: 400; }
.brand p { font-size: 12px; margin: 7px 0 0; color: #737e77; }
.build-label { display: flex; align-items: center; gap: 9px; font: 10px var(--mono); letter-spacing: 1px; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.build-label > .dot { color: var(--green); }
.header-actions { display: flex; align-items: center; gap: 24px; }
.lobby-link { color: var(--green); font-size: 11px; text-decoration: none; white-space: nowrap; }
.lobby-link:hover { text-decoration: underline; }
@media (max-width: 520px) { .header-actions { gap: 10px; } .lobby-link { font-size: 10px; } }
.version { margin-left: 7px; padding: 5px 7px; border: 1px solid #c7cec1; border-radius: 4px; color: #6b786e; }
.intro { display: flex; align-items: end; justify-content: space-between; padding: 34px 0 27px; gap: 20px; }
.eyebrow { font: 9px var(--mono); font-weight: 600; letter-spacing: 1.6px; color: #728074; }
h1 { font-size: clamp(32px, 3.2vw, 46px); font-weight: 600; letter-spacing: -1.8px; margin: 10px 0 9px; line-height: 1; }
.intro p { margin: 0; color: #748078; font-size: 13px; }
.scenario-control { width: 224px; flex-shrink: 0; }
.scenario-control label { font: 9px var(--mono); letter-spacing: 1.3px; display: block; margin-bottom: 10px; color: #737e74; }
.select-wrap { position: relative; }
.select-wrap > span { position: absolute; right: 15px; top: 8px; pointer-events: none; font-size: 19px; }
select { appearance: none; width: 100%; padding: 11px 38px 11px 13px; font-size: 12px; border: 1px solid #c9cec1; border-radius: 5px; background: #f7f4ec; color: var(--ink); }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 292px; align-items: start; gap: 22px; }
.flight-panel { border-radius: 8px; overflow: hidden; border: 1px solid #cbd1c5; background: #f7f5ec; }
.panel-toolbar { min-height: 49px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel-toolbar h2 { font: 9px var(--mono); letter-spacing: 1.5px; margin: 0; display: flex; gap: 8px; align-items: center; }
.crosshair { font-size: 20px; color: #7b8a7d; }
.toolbar-actions { display: flex; align-items: center; gap: 15px; }
.run-status { display: flex; align-items: center; gap: 6px; font: 9px var(--mono); letter-spacing: 1px; color: var(--green); }
.icon-button { background: transparent; padding: 5px 0; border: 0; display: flex; align-items: center; gap: 6px; font-size: 10px; }
.icon-button:hover { color: var(--orange); }
.icon-button > span:first-child { font: 17px var(--mono); }
.canvas-wrap { position: relative; background: #163c48; aspect-ratio: 16 / 9; }
canvas { display: block; width: 100%; height: 100%; touch-action: none; }
canvas, .touch-controls button { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.canvas-overlay { position: absolute; inset: 0; background: #122e39bd; display: flex; justify-content: center; align-items: center; flex-direction: column; color: #fff5df; backdrop-filter: blur(3px); padding: 20px; text-align: center; }
[hidden] { display: none !important; }
.canvas-overlay .eyebrow { color: #d9b987; font-size: 10px; }
.canvas-overlay h2 { font-size: clamp(24px, 3vw, 38px); letter-spacing: -1px; margin: 14px 0 10px; font-weight: 600; }
.canvas-overlay p { font-size: 13px; color: #b8cac7; margin: 0 0 24px; }
.primary-button { border: 0; background: var(--orange); color: #fff9e9; padding: 12px 20px; border-radius: 4px; font-size: 12px; }
.primary-button:hover { background: #c85434; }
.primary-button span { margin-left: 15px; }
.flight-status { min-height: 41px; display: flex; align-items: center; gap: 14px; padding: 9px 18px; border-bottom: 1px solid var(--line); }
.state-label { color: var(--green); display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.state-label strong { font: 9px var(--mono); font-weight: 600; letter-spacing: .7px; }
.state-label[data-state="stalled"], .state-label[data-state="crashed"] { color: #bc5936; }
.flight-status p { font: 10px var(--mono); color: #7b8478; margin: 0; }
.flight-time { font: 10px var(--mono); color: #7b8478; margin-left: auto; }
.telemetry { display: grid; grid-template-columns: repeat(4, 1fr); padding: 20px 0; }
.metric { padding: 0 18px; border-right: 1px solid var(--line); min-width: 0; }
.metric:last-child { border-right: 0; }
.metric > span:first-child { display: block; font: 8px var(--mono); letter-spacing: 1px; white-space: nowrap; color: #748175; }
.metric abbr { text-decoration: none; font-size: 7px; opacity: .7; }
.metric > div:not(.meter) { margin: 7px 0 9px; display: flex; align-items: baseline; gap: 5px; }
.metric strong { font: 28px var(--mono); letter-spacing: -1.5px; }
.metric small { font: 9px var(--mono); color: #829082; }
.meter { height: 3px; width: 100%; background: #e0e3d7; border-radius: 2px; overflow: hidden; }
.meter i { display: block; width: 0; height: 100%; background: #698776; }
.metric-note { font: 7px var(--mono); color: #7c8979; letter-spacing: .7px; }
.tuning-panel { background: #f7f5ed; border: 1px solid #cdd2c7; border-radius: 8px; padding: 24px 23px 19px; }
.tuning-heading { display: flex; justify-content: space-between; align-items: center; }
.tuning-heading .eyebrow { font-size: 8px; letter-spacing: 1.1px; }
.tuning-heading h2 { font-size: 23px; letter-spacing: -.6px; font-weight: 600; margin: 7px 0 0; }
.tuning-icon { font-size: 26px; color: #8b9887; }
.panel-description { font-size: 11px; color: #86907f; margin: 11px 0 27px; }
.tuning-control { margin-bottom: 22px; }
.tuning-control:last-child { margin-bottom: 0; }
.slider-label { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; gap: 8px; }
.slider-label label { font-size: 11px; font-weight: 500; }
.slider-label output { font: 11px var(--mono); }
.slider-label output small { color: #8b9585; font: 8px var(--mono); }
input[type="range"] { display: block; width: 100%; height: 4px; margin: 0; appearance: none; border-radius: 2px; background: linear-gradient(to right, #617f6b 0%, #617f6b var(--fill), #dce1d4 var(--fill), #dce1d4 100%); }
input[type="range"]::-webkit-slider-thumb { appearance: none; height: 12px; width: 12px; border-radius: 50%; background: #496d58; border: 2px solid #f7f5ed; box-shadow: 0 0 0 1px #496d58; }
input[type="range"]::-moz-range-thumb { height: 9px; width: 9px; border-radius: 50%; background: #496d58; border: 2px solid #f7f5ed; box-shadow: 0 0 0 1px #496d58; }
.slider-extents { margin-top: 9px; display: flex; justify-content: space-between; color: #97a08e; font: 8px var(--mono); }
.slider-hint { margin: 9px 0 0; color: #7b8874; font-size: 9px; line-height: 1.5; }
.recovery-note { display: flex; flex-wrap: wrap; gap: 4px; font-size: 9px; color: #85907d; margin: 19px 0 22px; line-height: 1.5; }
.recovery-note > span { color: #859b77; margin-right: 2px; }
.recovery-note strong { font-weight: 500; color: #657862; }
.display-options { padding-top: 18px; border-top: 1px solid var(--line); }
.cloud-options { padding: 18px 0; border-top: 1px solid var(--line); }
.cloud-options h3 { font: 8px var(--mono); letter-spacing: 1.1px; font-weight: 500; margin: 0 0 18px; }
.display-options h3, .guide h2 { font: 8px var(--mono); letter-spacing: 1.1px; font-weight: 500; margin: 0 0 15px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; font-size: 11px; margin-bottom: 14px; position: relative; }
.toggle-row input { position: absolute; opacity: 0; right: 0; width: 30px; height: 18px; margin: 0; }
.switch { width: 28px; height: 16px; border-radius: 20px; background: #d7ddd1; padding: 3px; transition: background .15s; }
.switch:after { content: ''; display: block; height: 10px; width: 10px; border-radius: 50%; background: #fffef4; transition: transform .15s; }
.toggle-row input:checked + .switch { background: #587c65; }
.toggle-row input:checked + .switch:after { transform: translateX(12px); }
.toggle-row input:focus-visible + .switch { outline: 3px solid var(--orange); outline-offset: 3px; }
.restore-button { background: transparent; width: 100%; border: 1px solid #cbd1c4; border-radius: 4px; padding: 10px; font-size: 10px; margin-top: 4px; }
.restore-button:hover { background: #e9eddf; }
.restore-button span { margin-right: 5px; }
.tuning-footnote { font-size: 9px; color: #909887; text-align: center; line-height: 1.6; margin: 11px 0 0; }
.guide { display: grid; grid-template-columns: minmax(0, 1fr) 292px; gap: 22px; margin: 24px 0 26px; }
.controls-guide { padding: 0 0 0 2px; }
.guide h2 { color: #63725f; margin-bottom: 12px; }
.key-controls { display: flex; gap: 22px; flex-wrap: wrap; }
.key-controls > span { display: flex; align-items: center; gap: 4px; }
.key-controls > span > span { font-size: 10px; margin-left: 4px; color: #6e7b6a; }
kbd { font: 9px var(--mono); min-width: 23px; padding: 6px; background: #f9f7ed; border: 1px solid #cbd2c2; border-bottom-width: 2px; border-radius: 4px; text-align: center; }
.controls-guide p { font-size: 9px; color: #8b9683; margin: 12px 0 0; }
.stall-guide { display: flex; gap: 13px; padding-left: 1px; }
.stall-guide h2 { margin-top: 2px; margin-bottom: 8px; }
.stall-symbol { color: var(--orange); font-size: 27px; line-height: 1; }
.stall-guide p { font-size: 10px; color: #7d8775; line-height: 1.7; margin: 0; }
.touch-controls { display: none; gap: 10px; padding: 12px; border-bottom: 1px solid var(--line); }
.touch-controls button { border: 1px solid #cbd2c2; background: #f7f5ec; border-radius: 5px; flex: 1; padding: 14px 3px; touch-action: none; user-select: none; }
.touch-controls button span { font-size: 10px; margin-left: 3px; }
.touch-controls .takeoff-button { background: var(--orange); color: white; border-color: var(--orange); }
.touch-controls button.pressed { background: #496d58; color: white; }
footer { display: flex; justify-content: space-between; gap: 16px; padding: 18px 0 22px; border-top: 1px solid #cdd3c4; color: #8d9783; font: 8px var(--mono); letter-spacing: 1px; }
footer b { padding: 0 5px; font-weight: normal; }
@media (min-width: 1500px) { .workspace, .guide { grid-template-columns: minmax(0, 1fr) 310px; } .tuning-panel { padding: 28px; } .tuning-control { margin-bottom: 26px; } }
@media (max-width: 1100px) { .app { padding: 0 26px; } .workspace, .guide { grid-template-columns: minmax(0, 1fr) 254px; gap: 16px; } .tuning-panel { padding: 20px 17px; } .metric { padding: 0 12px; } .metric strong { font-size: 24px; } .metric > span:first-child { font-size: 7px; letter-spacing: .5px; } .metric-note { font-size: 6px; } .key-controls { gap: 13px; } .flight-status p { font-size: 8px; } }
@media (max-width: 820px) { .app { padding: 0 20px; } .masthead { min-height: 90px; } .build-label { font-size: 8px; letter-spacing: .5px; } .version { display: none; } .wordmark { font-size: 12px; letter-spacing: 1.4px; } .brand p { font-size: 10px; } .brand-mark { width: 38px; height: 38px; } .workspace { grid-template-columns: 1fr; } .tuning-panel { padding: 23px; } .tuning-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; } .tuning-control { margin-bottom: 0; } .panel-description { margin-bottom: 24px; } .display-options { display: flex; gap: 25px; align-items: center; flex-wrap: wrap; } .display-options h3 { margin-right: auto; } .toggle-row { min-width: 130px; } .guide { grid-template-columns: 1fr 1fr; gap: 24px; } .key-controls { gap: 10px; } .metric strong { font-size: 30px; } .metric-note { font-size: 7px; } .touch-controls { display: flex; } }
@media (max-width: 520px) { .app { padding: 0 14px; } .masthead { min-height: 80px; gap: 8px; } .brand { gap: 10px; } .brand-mark { width: 33px; height: 33px; border-radius: 6px; } .wordmark { font-size: 10px; letter-spacing: 1px; } .wordmark span { margin: 0; } .brand p { font-size: 9px; } .build-label { font-size: 0; gap: 0; } .build-label .dot { width: 7px; height: 7px; } .intro { padding: 27px 0 20px; flex-direction: column; align-items: start; gap: 23px; } .intro h1 { font-size: 37px; } .intro .eyebrow { font-size: 8px; } .scenario-control { width: 100%; } .scenario-control label { font-size: 8px; margin-bottom: 7px; } .panel-toolbar { min-height: 45px; padding: 0 10px; } .panel-toolbar h2 { font-size: 8px; letter-spacing: .5px; gap: 4px; } .toolbar-actions { gap: 12px; } .toolbar-actions .button-label { display: none; } .run-status { font-size: 8px; } .flight-status { gap: 8px; padding: 10px; flex-wrap: wrap; } .state-label strong { font-size: 8px; } .flight-status p { max-width: 180px; line-height: 1.5; } .flight-time { font-size: 8px; } .telemetry { padding: 15px 0; } .metric { padding: 0 9px; } .metric strong { font-size: 21px; letter-spacing: -1px; } .metric small { font-size: 7px; } .metric > span:first-child { font-size: 6px; letter-spacing: .2px; } .metric abbr { display: none; } .metric-note { font-size: 5px; letter-spacing: .2px; } .tuning-panel { padding: 20px; } .tuning-controls { gap: 23px 20px; } .slider-label { flex-wrap: wrap; gap: 6px; } .slider-label label { font-size: 10px; } .slider-label output { font-size: 10px; } .slider-label output small { font-size: 7px; } .display-options { gap: 15px; } .display-options h3 { width: 100%; margin: 0; } .toggle-row { flex: 1; min-width: 100px; } .guide { grid-template-columns: 1fr; margin-top: 23px; gap: 23px; } footer { font-size: 7px; line-height: 1.8; flex-direction: column; gap: 5px; } .canvas-overlay h2 { margin: 7px 0; font-size: 24px; } .canvas-overlay p { font-size: 10px; margin-bottom: 14px; } .canvas-overlay .eyebrow { font-size: 8px; } .primary-button { padding: 9px 15px; font-size: 10px; } }
@media (pointer: coarse) { .touch-controls { display: flex; } }
@media (prefers-reduced-motion: reduce) { *, *:before, *:after { transition: none !important; } }

/* Local combat shares the flight lab's layout and tuning controls. */
.session-controls { display: flex; gap: 12px; }
.session-controls .scenario-control { width: 185px; }
.match-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 11px 18px; border-bottom: 1px solid var(--line); font: 8px var(--mono); letter-spacing: 1px; color: #6c7e6d; }
#balloon-status { color: #89612e; }
.controls-guide .balloon-help { font-size: 10px; line-height: 1.7; color: #7b7254; max-width: 600px; }
.scoreboard { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.red-pilot { --pilot-color: #c45d3c; }
.blue-pilot { --pilot-color: #367f99; }
.pilot-card { padding: 13px 18px 11px; border-top: 3px solid var(--pilot-color); }
.pilot-card + .pilot-card { border-left: 1px solid var(--line); }
.pilot-top { display: flex; align-items: center; justify-content: space-between; }
.pilot-top h3 { display: flex; align-items: center; gap: 7px; color: var(--pilot-color); margin: 0; font: 11px var(--mono); letter-spacing: 1px; }
.pilot-top strong { font: 27px var(--mono); color: var(--pilot-color); }
.pilot-readouts { display: flex; gap: 10px; flex-wrap: wrap; font: 8px var(--mono); color: #71816f; margin-top: 7px; }
.pilot-card[data-state="crashed"] .pilot-readouts > :first-child, .pilot-card[data-state="stalled"] .pilot-readouts > :first-child { color: #bd5436; }
.pilot-card p { font: 9px var(--mono); color: #7b8676; margin: 11px 0 0; }
.tracking { display: flex; align-items: center; justify-content: space-between; padding: 8px 18px; border-bottom: 1px solid var(--line); }
.tracking label { font: 8px var(--mono); letter-spacing: 1px; color: #748175; }
.tracking select { width: auto; padding: 5px 12px; appearance: auto; font-size: 10px; }
.touch-pilot { display: flex; align-items: center; color: var(--pilot-color); font: 10px var(--mono); }
.touch-controls .fire-button { background: var(--pilot-color); color: #fffaf0; border-color: var(--pilot-color); }
.controls-guide .combat-help { font-size: 11px; line-height: 1.7; color: #6b7b69; max-width: 600px; }
body[data-mode="practice"] .scoreboard { grid-template-columns: 1fr; }
body[data-mode="practice"] .combat-help { display: none; }
@media (max-width: 1100px) { .intro { align-items: start; } .session-controls { flex-direction: column; } .session-controls .scenario-control { width: 210px; } .intro .scenario-control label { margin-bottom: 5px; } .pilot-card { padding: 10px 12px; } }
@media (max-width: 820px) { .session-controls { flex-direction: row; } .session-controls .scenario-control { width: 155px; } .intro { flex-wrap: wrap; } }
@media (max-width: 520px) { .session-controls { width: 100%; gap: 10px; } .session-controls .scenario-control { width: 50%; min-width: 0; } .session-controls select { padding-left: 9px; font-size: 11px; } .match-heading { padding: 10px; font-size: 6px; letter-spacing: .5px; } .pilot-top h3 { font-size: 9px; } .pilot-top strong { font-size: 24px; } .pilot-readouts { gap: 5px 8px; font-size: 7px; } .pilot-card p { font-size: 7px; line-height: 1.6; } .touch-controls { gap: 7px; padding: 9px; } .touch-controls button { padding: 10px 2px; } .touch-controls button span { font-size: 9px; } .tracking { padding: 7px 10px; } .flight-status p { max-width: 195px; } }
