:root {
    --night: #03131D;
    --panel: rgba(4, 18, 27, 0.9);
    --panel-solid: #071C28;
    --cyan: #35D9FF;
    --green: #62E6A7;
    --gold: #F0CC6E;
    --rose: #E85C91;
    --white: #F7FBFD;
    --muted: #91A9B5;
    --danger: #FF6577;
    --line: rgba(255, 255, 255, 0.14);
}

* { box-sizing: border-box; letter-spacing: 0; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { background: var(--night); color: var(--white); font-family: 'Montserrat', sans-serif; }
button, input { font: inherit; letter-spacing: 0; }
button { color: inherit; }

.flight-app { position: relative; width: 100%; height: 100%; isolation: isolate; overflow: hidden; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.flight-app input { user-select: text; -webkit-user-select: text; }
.flight-canvas { position: absolute; inset: 0; z-index: 0; }
.flight-canvas canvas { display: block; width: 100%; height: 100%; }
.sky-loading { position: absolute; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; gap: 12px; background: var(--night); color: var(--gold); font-size: 0.82rem; font-weight: 700; transition: opacity 0.35s; }
.sky-loading i { animation: loading-flight 1.5s ease-in-out infinite; }
.sky-loading.hidden { opacity: 0; pointer-events: none; }
@keyframes loading-flight { 50% { transform: translateX(18px); } }

.game-topbar { position: absolute; z-index: 12; top: 0; left: 0; right: 0; height: 62px; padding: 0 18px; display: flex; align-items: center; gap: 18px; background: rgba(2, 12, 19, 0.88); border-bottom: 1px solid rgba(53, 217, 255, 0.2); backdrop-filter: blur(14px); transition: transform 0.3s ease; }
.flight-app.briefing .game-topbar { transform: translateY(-105%); }
.game-brand { display: flex; align-items: baseline; gap: 8px; color: var(--cyan); font-family: 'Playfair Display', serif; font-size: 1.45rem; font-weight: 900; text-decoration: none; white-space: nowrap; }
.game-brand span { color: var(--white); font-family: 'Montserrat', sans-serif; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; }
.mission-chip { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.72rem; font-weight: 700; }
.mission-chip i { color: var(--green); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 7px; }
.icon-button, .pilot-button { height: 38px; border: 1px solid var(--line); border-radius: 6px; background: rgba(6, 27, 39, 0.72); cursor: pointer; transition: 0.18s ease; }
.icon-button { width: 38px; display: grid; place-items: center; }
.pilot-button { padding: 0 12px; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.72rem; font-weight: 700; }
.pilot-button i { color: var(--gold); }
.icon-button:hover, .pilot-button:hover { border-color: var(--cyan); color: var(--white); background: rgba(14, 57, 72, 0.86); }
.coffee-button { display: none; }
.flight-app.playing .coffee-button { display: grid; }
.coffee-button i { color: var(--gold); }
.coffee-button.active { border-color: var(--gold); background: rgba(240, 204, 110, 0.2); box-shadow: 0 0 20px rgba(240, 204, 110, 0.22); }
.coffee-button:disabled { cursor: default; opacity: 1; }

.flight-instruments { position: absolute; z-index: 8; top: 80px; left: 18px; right: 18px; display: none; align-items: stretch; justify-content: space-between; gap: 16px; pointer-events: none; }
.flight-app.playing .flight-instruments { display: flex; }
.hud { display: grid; grid-template-columns: repeat(5, 84px); border: 1px solid rgba(53, 217, 255, 0.24); background: rgba(2, 15, 24, 0.76); backdrop-filter: blur(10px); }
.hud-instrument { min-height: 72px; padding: 9px 11px; border-right: 1px solid var(--line); }
.hud-instrument:last-child { border-right: 0; }
.hud-instrument span, .hud-instrument small { display: block; color: var(--muted); font-size: 0.55rem; font-weight: 700; }
.hud-instrument strong { display: block; margin: 4px 0 1px; color: var(--white); font-size: 1.18rem; line-height: 1; font-variant-numeric: tabular-nums; }
.hud-instrument.throttle strong { color: var(--green); }

.flight-progress { width: min(330px, calc(100vw - 36px)); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid rgba(240, 204, 110, 0.24); background: rgba(2, 15, 24, 0.78); backdrop-filter: blur(10px); }
.progress-copy span { display: block; color: var(--muted); font-size: 0.55rem; font-weight: 700; text-transform: uppercase; }
.progress-copy strong { display: block; margin-top: 2px; font-size: 0.72rem; }
.progress-track { height: 4px; background: rgba(255,255,255,0.12); overflow: hidden; }
.progress-track span { display: block; width: 0; height: 100%; background: var(--gold); transition: width 0.3s ease; }
.score-live { display: flex; align-items: center; gap: 5px; color: var(--gold); font-size: 0.76rem; }
.score-live strong { font-variant-numeric: tabular-nums; }

.rene-comms { position: absolute; z-index: 10; left: 18px; bottom: 18px; width: min(380px, calc(100vw - 36px)); min-height: 78px; display: none; grid-template-columns: 62px 1fr; align-items: center; border: 1px solid rgba(240, 204, 110, 0.42); border-left: 3px solid var(--gold); background: rgba(2, 15, 24, 0.9); box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28); backdrop-filter: blur(10px); overflow: hidden; transform: translateY(140%); transition: transform 0.35s ease; pointer-events: none; }
.flight-app.playing .rene-comms { display: grid; }
.rene-comms.visible { transform: translateY(0); }
.rene-comms img { width: 62px; height: 78px; object-fit: cover; object-position: 40% center; border-right: 1px solid rgba(240, 204, 110, 0.25); }
.rene-comms div { padding: 9px 11px; }
.rene-comms span { color: var(--gold); font-size: 0.56rem; font-weight: 800; }
.rene-comms p { margin: 4px 0 0; color: var(--white); font-size: 0.72rem; line-height: 1.45; }

.coffee-cameo { position: absolute; z-index: 7; left: clamp(-85px, -4vw, -28px); bottom: 0; width: min(58vw, 760px); height: calc(100% - 62px); display: flex; align-items: flex-end; justify-content: flex-start; opacity: 0; visibility: hidden; transform: translate3d(-24%, 3%, 0) scale(0.97); transform-origin: left bottom; transition: opacity 1.35s ease, transform 1.65s cubic-bezier(0.22, 0.72, 0.24, 1), visibility 0s linear 1.65s; pointer-events: none; }
.coffee-cameo.active { opacity: 1; visibility: visible; transform: translate3d(0, 0, 0) scale(1); transition-delay: 0s; }
.coffee-cameo img { display: block; width: auto; max-width: 100%; height: min(88vh, 930px); object-fit: contain; object-position: left bottom; filter: drop-shadow(22px 18px 30px rgba(0, 0, 0, 0.42)); }

.gear-status { position: absolute; z-index: 8; right: 18px; bottom: 18px; display: none; padding: 9px 12px; border: 1px solid rgba(98, 230, 167, 0.35); background: rgba(4, 35, 29, 0.82); color: var(--green); font-size: 0.65rem; font-weight: 800; }
.flight-app.playing .gear-status { display: block; }
.gear-status.up { color: var(--muted); border-color: var(--line); background: rgba(2, 15, 24, 0.72); }
.warning-strip { position: absolute; z-index: 9; left: 50%; bottom: 28px; transform: translateX(-50%); min-width: 220px; display: none; padding: 10px 15px; border: 1px solid rgba(255, 101, 119, 0.5); background: rgba(71, 11, 23, 0.88); color: white; text-align: center; font-size: 0.68rem; font-weight: 800; }
.warning-strip.visible { display: block; animation: warning-pulse 0.8s ease-in-out infinite alternate; }
@keyframes warning-pulse { to { border-color: var(--danger); box-shadow: 0 0 22px rgba(255,101,119,0.22); } }

.hangar-overlay { position: absolute; z-index: 10; inset: 62px 0 0; display: none; grid-template-columns: minmax(0, 1fr) 360px; gap: 30px; align-items: end; padding: clamp(30px, 6vw, 82px); background: linear-gradient(90deg, rgba(1,12,20,0.96) 0%, rgba(1,12,20,0.72) 48%, rgba(1,12,20,0.18) 100%); overflow-y: auto; }
.hangar-overlay.active { display: grid; }
.hangar-main { width: min(720px, 100%); }
.hangar-kicker { color: var(--green); font-size: 0.7rem; font-weight: 800; text-transform: uppercase; }
.hangar-main h1 { margin: 7px 0 0; color: var(--white); font-family: 'Playfair Display', serif; font-size: clamp(3.6rem, 8vw, 7.5rem); line-height: 0.85; }
.hangar-subtitle { margin: 14px 0 28px; color: var(--gold); font-weight: 700; font-size: clamp(0.9rem, 2vw, 1.35rem); }
.pilot-name-field { display: block; max-width: 390px; }
.pilot-name-field span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 0.62rem; font-weight: 700; text-transform: uppercase; }
.pilot-name-field input { width: 100%; height: 46px; padding: 0 13px; border: 1px solid rgba(53,217,255,0.3); border-radius: 5px; outline: none; background: rgba(2,15,24,0.78); color: var(--white); font-size: 0.9rem; }
.pilot-name-field input:focus { border-color: var(--cyan); }

.cloud-account { width: min(680px, 100%); min-height: 58px; margin-top: 12px; padding: 9px 10px; display: flex; align-items: center; gap: 11px; border-left: 3px solid var(--cyan); background: rgba(2,15,24,0.72); }
.cloud-account.connected { border-left-color: var(--green); }
.cloud-account > img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.cloud-account-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid rgba(53,217,255,0.28); border-radius: 50%; color: var(--cyan); }
.cloud-account.connected .cloud-account-icon { border-color: rgba(98,230,167,0.3); color: var(--green); }
.cloud-account-copy { min-width: 0; }
.cloud-account-copy strong, .cloud-account-copy span { display: block; }
.cloud-account-copy strong { color: var(--white); font-size: 0.68rem; }
.cloud-account-copy span { margin-top: 3px; color: var(--muted); font-size: 0.55rem; line-height: 1.35; }
.cloud-account-copy span i { margin-right: 3px; color: var(--green); }
.cloud-login-actions { margin-left: auto; display: flex; gap: 6px; }
.cloud-login { height: 34px; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 5px; color: var(--white); text-decoration: none; font-size: 0.6rem; font-weight: 800; }
.cloud-login.google { background: #f7fbfd; color: #17232b; }
.cloud-login.discord { border-color: #7a83ed; background: #5865f2; }
.cloud-login:hover { filter: brightness(1.08); }
.cloud-logout { width: 34px; height: 34px; margin-left: auto; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); text-decoration: none; }
.cloud-logout:hover { border-color: var(--danger); color: var(--danger); }

.career-line { max-width: 520px; margin: 18px 0; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.career-line div:first-child, .career-line div:last-child { min-width: 50px; }
.career-line span { display: block; color: var(--muted); font-size: 0.52rem; font-weight: 700; }
.career-line strong { display: block; margin-top: 2px; font-size: 0.73rem; font-variant-numeric: tabular-nums; }
.xp-bar { height: 5px; background: rgba(255,255,255,0.13); overflow: hidden; }
.xp-bar span { display: block; width: 0; height: 100%; background: var(--green); }

.aircraft-selector { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(680px, 100%); border: 1px solid var(--line); }
.aircraft-option { position: relative; min-height: 88px; padding: 14px 12px; border: 0; border-right: 1px solid var(--line); background: rgba(2,15,24,0.72); text-align: left; cursor: pointer; }
.aircraft-option:last-child { border-right: 0; }
.aircraft-option i { color: var(--muted); font-size: 1rem; }
.aircraft-option span, .aircraft-option small { display: block; }
.aircraft-option span { margin-top: 9px; font-size: 0.72rem; font-weight: 800; }
.aircraft-option small { margin-top: 3px; color: var(--muted); font-size: 0.57rem; }
.aircraft-option.selected { box-shadow: inset 0 -3px 0 var(--gold); background: rgba(240,204,110,0.1); }
.aircraft-option.selected i { color: var(--gold); }
.aircraft-option.locked { opacity: 0.46; cursor: not-allowed; }

.start-flight, .secondary-button { height: 48px; margin-top: 18px; padding: 0 22px; border-radius: 6px; font-size: 0.75rem; font-weight: 800; cursor: pointer; }
.start-flight { border: 0; background: var(--gold); color: #14202A; }
.start-flight:hover { background: #FFE58F; }
.secondary-button { border: 1px solid var(--line); background: rgba(3,20,30,0.75); color: var(--white); }
.control-icons { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 16px; color: var(--muted); font-size: 0.58rem; font-weight: 700; }
.control-icons i { margin-right: 4px; color: var(--cyan); }

.leaderboard-panel { align-self: center; width: 100%; max-height: min(620px, calc(100vh - 120px)); padding: 20px; border: 1px solid rgba(53,217,255,0.24); background: rgba(2,15,24,0.84); backdrop-filter: blur(13px); overflow: auto; }
.panel-heading, .scores-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.panel-heading span, .scores-heading span { color: var(--green); font-size: 0.55rem; font-weight: 800; }
.panel-heading h2, .scores-heading h2 { margin: 3px 0 0; font-family: 'Playfair Display', serif; font-size: 1.35rem; }
.panel-heading > i { color: var(--gold); font-size: 1.35rem; }
.leaderboard-list { margin: 0; padding: 8px 0 0; list-style: none; counter-reset: scores; }
.leaderboard-list li { counter-increment: scores; display: grid; grid-template-columns: 27px minmax(0, 1fr) auto; align-items: center; gap: 9px; min-height: 45px; border-bottom: 1px solid rgba(255,255,255,0.065); }
.leaderboard-list li::before { content: counter(scores); color: var(--muted); font-size: 0.65rem; font-weight: 800; text-align: center; }
.leaderboard-list li:nth-child(1)::before { color: var(--gold); }
.leaderboard-list li:nth-child(2)::before { color: #D9E2E8; }
.leaderboard-list li:nth-child(3)::before { color: #D6925D; }
.leaderboard-list .score-name { min-width: 0; }
.leaderboard-list .score-name strong { display: block; overflow: hidden; color: var(--white); font-size: 0.68rem; text-overflow: ellipsis; white-space: nowrap; }
.leaderboard-list .score-name small { display: block; margin-top: 2px; color: var(--muted); font-size: 0.53rem; }
.leaderboard-list .score-points { color: var(--gold); font-size: 0.7rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.leaderboard-list li.score-empty { display: block; padding: 18px 0; color: var(--muted); font-size: 0.68rem; }
.leaderboard-list li.score-empty::before { content: none; }

.cockpit-intro { position: absolute; z-index: 15; inset: 0; display: none; overflow: hidden; cursor: grab; touch-action: none; }
.cockpit-intro.active { display: block; }
.cockpit-intro:active { cursor: grabbing; }
.cockpit-intro::before { content: ''; position: absolute; z-index: 1; inset: 0; border: 8px solid rgba(7,25,34,0.76); pointer-events: none; }
.cockpit-intro::after { content: ''; position: absolute; z-index: 1; left: 50%; bottom: 0; width: min(54vw, 760px); height: 9px; transform: translateX(-50%); background: rgba(7,25,34,0.86); pointer-events: none; }
.cockpit-look-hint { position: absolute; z-index: 4; top: 20px; left: 50%; display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 13px; transform: translateX(-50%); border: 1px solid rgba(102,223,242,0.25); border-radius: 5px; background: rgba(2,15,24,0.72); color: #d4edf2; font-size: 0.62rem; font-weight: 800; white-space: nowrap; pointer-events: none; backdrop-filter: blur(8px); }
.cockpit-look-hint i { color: var(--cyan); }
.cockpit-copy { position: absolute; z-index: 4; left: clamp(80px, 7vw, 112px); top: 98px; width: min(390px, 40vw); padding: 17px 18px; border-left: 3px solid var(--cyan); background: rgba(2,15,24,0.78); box-shadow: 0 14px 36px rgba(0,0,0,0.25); backdrop-filter: blur(9px); text-shadow: 0 2px 16px rgba(0,0,0,0.8); pointer-events: none; }
.cockpit-copy.found { border-left-color: var(--gold); }
.cockpit-copy.ready { border-left-color: var(--green); }
.cockpit-copy > span { color: var(--gold); font-size: 0.65rem; font-weight: 800; }
.cockpit-copy h2 { margin: 7px 0 9px; font-family: 'Playfair Display', serif; font-size: clamp(1.65rem, 3vw, 2.7rem); line-height: 1.02; }
.cockpit-copy p { max-width: 470px; margin: 0; color: #eef8fa; font-size: 0.78rem; line-height: 1.55; }
.cockpit-continue { min-height: 42px; margin-top: 14px; padding: 0 15px; border: 1px solid rgba(240,204,110,0.5); border-radius: 5px; background: rgba(240,204,110,0.14); color: var(--gold); font-size: 0.66rem; font-weight: 900; cursor: pointer; pointer-events: auto; }
.cockpit-continue i { margin-right: 6px; }
.cockpit-start { position: absolute; z-index: 6; left: 50%; bottom: 38px; min-width: 178px; height: 52px; padding: 0 20px; transform: translateX(-50%); border: 0; border-radius: 6px; background: var(--gold); color: #10202a; font-size: 0.72rem; font-weight: 900; cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,0.42); }
.cockpit-start:hover { background: #ffe58f; }
.cockpit-start i { margin-right: 7px; }

.result-overlay, .scores-overlay, .settings-overlay { position: absolute; z-index: 20; inset: 0; display: none; place-items: center; padding: 20px; background: rgba(1,10,16,0.82); backdrop-filter: blur(10px); }
.result-overlay.active, .scores-overlay.active, .settings-overlay.active { display: grid; }
.result-dialog, .scores-dialog { position: relative; z-index: 1; width: min(620px, 100%); max-height: calc(100vh - 40px); padding: 28px; border: 1px solid rgba(240,204,110,0.35); background: var(--panel-solid); overflow: auto; text-align: center; }
.result-pilot { position: absolute; z-index: 0; left: max(-80px, calc(50% - 790px)); bottom: 0; height: min(82vh, 780px); opacity: 0; transform: translateY(45px); filter: drop-shadow(18px 20px 32px rgba(0,0,0,0.42)); pointer-events: none; transition: opacity 0.7s ease 0.15s, transform 0.85s cubic-bezier(0.22, 0.72, 0.24, 1) 0.15s; }
.result-overlay.active.landed .result-pilot { opacity: 1; transform: translateY(0); }
.result-icon { width: 52px; height: 52px; margin: 0 auto 14px; display: grid; place-items: center; border: 1px solid rgba(98,230,167,0.4); border-radius: 50%; color: var(--green); font-size: 1.2rem; }
.result-kicker { color: var(--green); font-size: 0.63rem; font-weight: 800; text-transform: uppercase; }
.result-dialog h2 { margin: 7px 0 18px; font-family: 'Playfair Display', serif; font-size: clamp(1.6rem, 5vw, 2.4rem); }
.result-score strong { display: block; color: var(--gold); font-family: 'Playfair Display', serif; font-size: 3.5rem; line-height: 0.9; font-variant-numeric: tabular-nums; }
.result-score span { color: var(--muted); font-size: 0.62rem; }
.result-stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.result-stats div { padding: 15px 8px; border-right: 1px solid var(--line); }
.result-stats div:last-child { border-right: 0; }
.result-stats span { display: block; color: var(--muted); font-size: 0.55rem; }
.result-stats strong { display: block; margin-top: 5px; font-size: 0.78rem; }
.result-actions { display: flex; justify-content: center; gap: 10px; }
.scores-dialog { width: min(680px, 100%); text-align: left; }
.leaderboard-list.expanded li { min-height: 54px; }

.settings-dialog { width: min(520px, 100%); padding: 24px; border: 1px solid rgba(53,217,255,0.3); background: #071c28; box-shadow: 0 24px 80px rgba(0,0,0,0.45); }
.settings-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.settings-heading span { color: var(--green); font-size: 0.55rem; font-weight: 800; }
.settings-heading h2 { margin: 3px 0 0; font-family: 'Playfair Display', serif; font-size: 1.55rem; }
.quality-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.quality-options button { min-height: 142px; padding: 17px; border: 1px solid var(--line); border-radius: 6px; background: rgba(2,15,24,0.78); text-align: left; cursor: pointer; transition: border-color 0.18s ease, background 0.18s ease; }
.quality-options button:hover { border-color: var(--cyan); }
.quality-options button.active { border-color: var(--gold); box-shadow: inset 0 -3px 0 var(--gold); background: rgba(240,204,110,0.1); }
.quality-options i { color: var(--cyan); font-size: 1.1rem; }
.quality-options button.active i { color: var(--gold); }
.quality-options span, .quality-options strong, .quality-options small { display: block; }
.quality-options span { margin-top: 15px; color: var(--muted); font-size: 0.6rem; font-weight: 800; text-transform: uppercase; }
.quality-options strong { margin-top: 3px; font-size: 1rem; }
.quality-options small { margin-top: 4px; color: var(--muted); font-size: 0.56rem; line-height: 1.35; }
.quality-status { min-height: 18px; margin: 13px 0 0; color: var(--green); font-size: 0.6rem; font-weight: 700; }

.mobile-controls { position: absolute; z-index: 9; inset: auto 12px calc(12px + env(safe-area-inset-bottom)); display: none; justify-content: space-between; pointer-events: none; }
.control-pad { width: 138px; height: 138px; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); }
.control-pad button:nth-child(1) { grid-area: 1 / 2; }
.control-pad button:nth-child(2) { grid-area: 2 / 1; }
.control-pad button:nth-child(3) { grid-area: 2 / 3; }
.control-pad button:nth-child(4) { grid-area: 3 / 2; }
.control-pad button, .mobile-actions button { border: 1px solid rgba(255,255,255,0.3); background: rgba(2,15,24,0.8); box-shadow: 0 7px 20px rgba(0,0,0,0.24); backdrop-filter: blur(7px); pointer-events: auto; touch-action: none; }
.control-pad button:active, .mobile-actions button:active { border-color: var(--gold); background: rgba(240,204,110,0.3); transform: scale(0.94); }
.control-pad button { border-radius: 50%; }
.mobile-actions { display: grid; grid-template-columns: repeat(3, 46px); align-items: end; gap: 7px; }
.mobile-actions button { height: 46px; border-radius: 50%; }

@media (max-width: 1050px) {
    .hangar-overlay { grid-template-columns: minmax(0, 1fr) 310px; padding: 42px; }
    .hud { grid-template-columns: repeat(5, 70px); }
}

@media (max-width: 820px) {
    .game-topbar { height: 56px; padding: 0 10px; gap: 8px; }
    .game-brand { font-size: 1.18rem; }
    .mission-chip { display: none; }
    .pilot-button span { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .hangar-overlay { inset: 56px 0 0; grid-template-columns: 1fr; align-items: start; gap: 22px; padding: 28px 18px 40px; overflow-y: auto; background: rgba(1,12,20,0.82); }
    .hangar-main h1 { font-size: clamp(3.7rem, 17vw, 6rem); }
    .leaderboard-panel { align-self: auto; max-height: none; }
    .flight-instruments { top: 67px; left: 10px; right: 10px; flex-direction: column; gap: 0; border: 1px solid rgba(53, 217, 255, 0.24); background: rgba(2, 15, 24, 0.8); backdrop-filter: blur(10px); }
    .hud { width: 100%; grid-template-columns: repeat(5, 1fr); border: 0; background: transparent; backdrop-filter: none; }
    .hud-instrument { min-height: 49px; padding: 6px 9px; }
    .hud-instrument strong { margin-top: 3px; font-size: 0.84rem; }
    .flight-progress { width: 100%; min-height: 43px; padding: 6px 10px; border: 0; border-top: 1px solid rgba(240, 204, 110, 0.24); background: transparent; backdrop-filter: none; }
    .rene-comms { left: 10px; bottom: calc(162px + env(safe-area-inset-bottom)); width: min(380px, calc(100vw - 20px)); }
    .gear-status { right: 10px; bottom: 163px; }
    .flight-app.playing .mobile-controls { display: flex; }
    .result-stats { grid-template-columns: 1fr 1fr; }
    .result-stats div:nth-child(2) { border-right: 0; }
    .result-stats div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
    .cockpit-intro::before { border-width: 5px; }
    .cockpit-look-hint { top: 14px; }
    .cockpit-copy { left: 28px; top: 76px; width: min(72vw, 360px); padding: 14px; }
    .cockpit-copy h2 { font-size: clamp(1.45rem, 7vw, 2.25rem); }
    .cockpit-copy p { font-size: 0.68rem; line-height: 1.45; }
    .cockpit-start { bottom: 34px; height: 48px; }
    .coffee-cameo { left: -8vw; bottom: calc(174px + env(safe-area-inset-bottom)); width: 62vw; height: calc(100% - 230px); }
    .coffee-cameo img { width: 100%; height: auto; max-height: 60vh; }
    .result-pilot { display: none; }
}

@media (max-width: 560px) {
    .pilot-button { width: 38px; padding: 0; justify-content: center; }
    .pilot-button span { display: none; }
    .topbar-actions { gap: 4px; }
    .aircraft-selector { grid-template-columns: 1fr; }
    .aircraft-option { min-height: 64px; border-right: 0; border-bottom: 1px solid var(--line); }
    .aircraft-option:last-child { border-bottom: 0; }
    .aircraft-option i, .aircraft-option span, .aircraft-option small { display: inline-block; margin: 0 8px 0 0; }
    .career-line { grid-template-columns: auto 1fr; }
    .career-line div:last-child { grid-column: 1 / -1; }
    .cloud-account { flex-wrap: wrap; }
    .cloud-account-copy { flex: 1; }
    .cloud-login-actions { width: 100%; margin-left: 49px; }
    .cloud-login { flex: 1; justify-content: center; }
    .control-icons { display: none; }
    .hud-instrument:nth-child(3), .hud-instrument:nth-child(4) { display: none; }
    .hud { grid-template-columns: repeat(3, 1fr); }
    .rene-comms { top: 178px; bottom: auto; width: calc(100vw - 20px); min-height: 62px; grid-template-columns: 48px 1fr; opacity: 0; transform: translateX(calc(-100% - 14px)); transition: transform 0.3s ease, opacity 0.2s ease; }
    .rene-comms.visible { opacity: 1; transform: translateX(0); }
    .rene-comms img { width: 48px; height: 62px; }
    .rene-comms div { min-width: 0; padding: 7px 9px; }
    .rene-comms span { font-size: 0.5rem; }
    .rene-comms p { margin-top: 2px; font-size: 0.61rem; line-height: 1.32; }
    .gear-status { bottom: 304px; }
    .warning-strip { bottom: 312px; }
    .result-dialog, .scores-dialog { padding: 20px 15px; }
    .settings-dialog { padding: 18px 14px; }
    .quality-options { grid-template-columns: 1fr; }
    .quality-options button { min-height: 92px; display: grid; grid-template-columns: 28px 1fr auto; grid-template-rows: auto auto; align-items: center; column-gap: 9px; }
    .quality-options i { grid-row: 1 / 3; }
    .quality-options span { margin: 0; }
    .quality-options strong { margin: 0; text-align: right; }
    .quality-options small { grid-column: 2 / 4; }
    .result-actions { flex-direction: column; }
    .result-actions button { width: 100%; margin-top: 8px; }
    .coffee-cameo { left: -13vw; width: 66vw; }
    .coffee-cameo img { height: auto; max-height: 56vh; }
    .flight-app.coffee-active .rene-comms { opacity: 0; transform: translateX(calc(-100% - 14px)); }
    .flight-app.coffee-active .warning-strip { visibility: hidden; }
}

@media (max-width: 420px) {
    .game-topbar { padding-right: 6px; padding-left: 6px; gap: 6px; }
    .topbar-actions { gap: 3px; }
    .icon-button, .pilot-button { width: 34px; height: 34px; }
}

@media (max-height: 590px) and (max-width: 920px) {
    .cockpit-copy { top: 68px; width: 48vw; padding: 11px 13px; }
    .cockpit-copy h2 { margin-bottom: 5px; font-size: 1.65rem; }
    .cockpit-copy p { font-size: 0.6rem; line-height: 1.35; }
    .cockpit-start { bottom: 28px; height: 44px; }
}

/* Landingschecklist: verschijnt na de laatste luchtpoort en laat per regel zien
   wat er nog moet gebeuren, in plaats van alleen te melden dat de assist aanstaat. */
.landing-panel { position: absolute; z-index: 9; right: 18px; bottom: 92px; width: 264px; display: none; padding: 12px 13px 11px; border: 1px solid rgba(53, 217, 255, 0.28); border-left: 3px solid var(--gold); background: rgba(3, 17, 25, 0.92); backdrop-filter: blur(10px); }
.landing-panel.active { display: block; }
.landing-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.landing-heading span { color: var(--gold); font-size: 0.6rem; font-weight: 800; text-transform: uppercase; }
.landing-heading strong { color: var(--white); font-size: 0.86rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.landing-checks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 7px; }
.landing-checks li { display: grid; grid-template-columns: 15px minmax(0, 1fr) auto; align-items: center; gap: 8px; color: var(--muted); font-size: 0.66rem; font-weight: 700; }
.landing-checks i { font-size: 0.7rem; color: var(--muted); }
.landing-checks .check-hint { color: var(--white); font-size: 0.62rem; font-weight: 800; text-align: right; }
.landing-checks li.ok i { color: var(--green); }
.landing-checks li.ok .check-hint { color: var(--green); }
.landing-checks li.warn i { color: var(--gold); }
.landing-checks li.warn .check-hint { color: var(--gold); }
.landing-checks li.bad i { color: var(--danger); }
.landing-checks li.bad .check-hint { color: var(--danger); }

@media (max-width: 900px) {
    .landing-panel { right: 12px; bottom: 300px; width: 214px; padding: 10px 11px 9px; }
    .landing-checks li { font-size: 0.61rem; }
}
