:root {
  --ink: #16243a;
  --muted: #5b6b7c;
  --accent: #ff7b00;
  --sun: #ffc23d;
  --ok: #1f9d7a;
  --warn: #e76f51;
  --sea-1: #0d3a63;
  --sea-2: #0a2647;
  --glass: rgba(255, 255, 255, 0.93);
  --shadow: 0 12px 34px rgba(3, 18, 38, 0.35);
  --font-display: "Fredoka", "Nunito", "Segoe UI", system-ui, sans-serif;
  --font-body: "Nunito", "Segoe UI", system-ui, sans-serif;
  --font-mono: "Space Mono", ui-monospace, Consolas, monospace;
  --panel-w: 370px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--sea-2); color: var(--ink); font-family: var(--font-body); overflow: hidden; }
button { font-family: inherit; cursor: pointer; }
[hidden] { display: none !important; }
.card { background: var(--glass); border-radius: 20px; box-shadow: var(--shadow); backdrop-filter: blur(6px); }

/* ---------- kartan ---------- */
.map-wrap { position: fixed; inset: 0; overflow: hidden; background: radial-gradient(ellipse at 40% 45%, #15507f 0, var(--sea-1) 45%, var(--sea-2) 100%); }
.map-wrap::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(3, 15, 32, 0.45) 100%); }
#map { width: 100%; height: 100%; display: block; }
#map.zoom-in { animation: mapIn 1.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes mapIn { from { transform: scale(1.35); filter: blur(6px); opacity: 0.2; } }
.land { fill: #f4ead6; stroke: #d8c9a9; stroke-width: 0.6; vector-effect: non-scaling-stroke; transition: fill 1.5s; }
.land.visited { fill: #ffe0ad; }
.graticule { fill: none; stroke: rgba(255, 255, 255, 0.07); stroke-width: 1; vector-effect: non-scaling-stroke; }
.route-ahead { fill: none; stroke: rgba(255, 255, 255, 0.8); stroke-width: 2.5; stroke-dasharray: 2 10; stroke-linecap: round; vector-effect: non-scaling-stroke; animation: march 1.6s linear infinite; }
@keyframes march { to { stroke-dashoffset: -24; } }
.trail-glow { fill: none; stroke: rgba(255, 166, 0, 0.45); stroke-width: 14; stroke-linecap: round; filter: blur(5px); vector-effect: non-scaling-stroke; }
.trail { fill: none; stroke: url(#trailGrad); stroke-width: 4.5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.city-dot { fill: #fff; stroke: var(--ink); stroke-width: 2; }
.wp-dot { fill: rgba(255, 255, 255, 0.6); stroke: rgba(22, 36, 58, 0.5); stroke-width: 1.2; }
.wp.passed .wp-dot { fill: var(--sun); stroke: #8a5a00; }
.wp text { font: 700 12px var(--font-body); fill: rgba(22, 36, 58, 0.6); paint-order: stroke; stroke: rgba(255, 255, 255, 0.85); stroke-width: 3px; }
.wp.passed text { fill: #5a3a00; }
.city-label { font: 800 15px var(--font-display); fill: var(--ink); paint-order: stroke; stroke: #fff; stroke-width: 4px; }
.dest-label { font: 700 20px var(--font-display); fill: #0b2440; paint-order: stroke; stroke: #fff; stroke-width: 5px; }
.dest-ring { fill: none; stroke: var(--accent); stroke-width: 3; animation: ring 2.4s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.dest-ring.r2 { animation-delay: 1.2s; }
@keyframes ring { from { transform: scale(0.4); opacity: 1; } to { transform: scale(2.8); opacity: 0; } }
.plane-shadow { fill: rgba(0, 0, 0, 0.22); filter: blur(2.5px); }
.plane-body { fill: url(#planeGrad); stroke: #1b2b44; stroke-width: 1.1; stroke-linejoin: round; }
.plane-wing { fill: #dfe6ef; stroke: #1b2b44; stroke-width: 1; stroke-linejoin: round; }
.plane-engine { fill: #b9c4d2; stroke: #1b2b44; stroke-width: 0.9; }
.plane-accent { fill: var(--accent); }
.plane-window { fill: #1b2b44; }
.nav-red { fill: #ff3b3b; } .nav-green { fill: #2bd96b; }
.beacon { fill: #ff3b3b; animation: blink 1.2s steps(1) infinite; }
.strobe { fill: #fff; animation: strobe 1.6s linear infinite; }
@keyframes blink { 50% { opacity: 0; } }
@keyframes strobe { 0%, 6% { opacity: 1; } 7%, 100% { opacity: 0; } }
.puff { fill: #fff; }
.wind line { stroke: rgba(255, 255, 255, 0.9); stroke-width: 2.5; stroke-linecap: round; animation: wind 0.9s linear infinite; }
@keyframes wind { from { stroke-dashoffset: 0; opacity: 0; } 30% { opacity: 1; } to { stroke-dashoffset: -60; opacity: 0; } }
.km-pop { font: 900 24px var(--font-display); fill: var(--sun); paint-order: stroke; stroke: #0b2440; stroke-width: 5px; animation: kmPop 2.8s ease-out forwards; }
@keyframes kmPop { from { transform: translateY(0) scale(0.6); opacity: 0; } 12% { transform: translateY(-6px) scale(1.15); opacity: 1; } to { transform: translateY(-60px) scale(1); opacity: 0; } }

.clouds i { position: absolute; display: block; width: 280px; height: 90px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); filter: blur(16px); animation: drift linear infinite; pointer-events: none; }
.clouds i:nth-child(1) { top: 12%; animation-duration: 95s; animation-delay: -10s; }
.clouds i:nth-child(2) { top: 38%; width: 360px; animation-duration: 130s; animation-delay: -60s; }
.clouds i:nth-child(3) { top: 62%; animation-duration: 110s; animation-delay: -30s; }
.clouds i:nth-child(4) { top: 80%; width: 220px; animation-duration: 85s; animation-delay: -70s; }
.clouds i:nth-child(5) { top: 25%; width: 200px; animation-duration: 150s; animation-delay: -100s; }
.clouds i:nth-child(6) { top: 50%; width: 300px; animation-duration: 120s; animation-delay: -20s; background: rgba(255, 255, 255, 0.1); }
@keyframes drift { from { transform: translateX(-420px); } to { transform: translateX(calc(100vw + 420px)); } }

/* ---------- cockpit ---------- */
.cockpit { position: absolute; left: 16px; bottom: 16px; display: flex; gap: 8px; z-index: 4; }
.gauge { background: rgba(8, 22, 42, 0.82); border: 1px solid rgba(120, 220, 255, 0.35); border-radius: 12px; padding: 7px 12px 6px; min-width: 94px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), inset 0 0 16px rgba(80, 200, 255, 0.12); }
.gauge small { display: block; font: 700 10px var(--font-body); letter-spacing: 0.12em; text-transform: uppercase; color: rgba(150, 220, 255, 0.8); }
.gauge b { font: 700 18px var(--font-mono); color: #7ff0c8; text-shadow: 0 0 8px rgba(127, 240, 200, 0.6); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- HUD ---------- */
.hud { position: fixed; top: 16px; left: 16px; right: calc(var(--panel-w) + 32px); display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; pointer-events: none; z-index: 5; }
.hud > * { pointer-events: auto; }
.hud-main { padding: 16px 20px 14px; width: min(560px, 100%); }
.route-title { display: flex; align-items: center; gap: 10px; font: 700 15px var(--font-display); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.route-title .arrow { color: var(--accent); font-size: 18px; animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(4px); } }
.route-title .flightno { margin-left: auto; font: 700 12px var(--font-mono); color: #fff; background: var(--ink); padding: 3px 8px; border-radius: 6px; letter-spacing: 0.08em; }
.big { display: flex; gap: 26px; margin: 6px 0 10px; }
.big b { display: block; font: 700 clamp(26px, 3.2vw, 42px) var(--font-display); line-height: 1.05; font-variant-numeric: tabular-nums; }
.big small { font-weight: 800; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.big b.tick { animation: tick 0.5s ease-out; }
@keyframes tick { 40% { color: var(--accent); transform: scale(1.04); } }
.bar { position: relative; height: 14px; background: #e3e9f1; border-radius: 999px; }
.bar i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 999px; background: linear-gradient(90deg, #ffb703, var(--accent)); transition: width 2.8s cubic-bezier(0.3, 0.8, 0.3, 1); overflow: hidden; }
.bar i::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent); transform: translateX(-100%); animation: shine 2.8s ease-in-out infinite; }
@keyframes shine { to { transform: translateX(100%); } }
.bar-plane { position: absolute; top: 50%; left: 0; transform: translate(-50%, -54%); font-size: 22px; color: var(--ink); transition: left 2.8s cubic-bezier(0.3, 0.8, 0.3, 1); text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); }
.bar-legend { display: flex; justify-content: space-between; font-size: 12px; font-weight: 800; color: var(--muted); margin-top: 6px; }
.bar-legend #pct { color: var(--accent); font-variant-numeric: tabular-nums; }
.figures { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--muted); }
.figures b { color: var(--ink); font-variant-numeric: tabular-nums; }
.hud-side { display: flex; gap: 8px; align-items: center; }
.status { background: var(--ink); color: #fff; font: 700 15px var(--font-display); padding: 10px 16px; border-radius: 999px; box-shadow: var(--shadow); white-space: nowrap; }
.status.wind { background: #3a6ea5; animation: wobble 1.2s ease-in-out infinite; }
.status.landed { background: var(--ok); }
.status.holding { background: #7b4fa3; }
@keyframes wobble { 50% { transform: translateX(-3px); } }
.icon-btn, .me-btn { border: 0; background: var(--glass); color: var(--ink); border-radius: 999px; height: 42px; font-size: 18px; box-shadow: var(--shadow); }
.icon-btn { width: 42px; }
.icon-btn.off { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(255, 123, 0, 0.35), var(--shadow); } }
.me-btn { padding: 0 14px; font-weight: 800; font-size: 14px; }

/* ---------- panelen ---------- */
.panel { position: fixed; top: 16px; right: 16px; bottom: 16px; width: var(--panel-w); display: flex; flex-direction: column; gap: 12px; overflow-y: auto; z-index: 5; scrollbar-width: thin; }
.panel .card { padding: 14px 16px; flex: none; }
.panel h2 { font: 600 17px var(--font-display); margin: 0 0 8px; }
.panel h2 small { font: 700 11px var(--font-body); color: var(--muted); margin-left: 4px; }
.postcard-card { padding: 0 !important; overflow: hidden; }
.postcards { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #0d3a63; }
.pc { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 1.4s ease; }
.pc img { width: 100%; height: 100%; object-fit: cover; display: block; transform-origin: var(--ox, 50%) var(--oy, 50%); }
.pc.on { opacity: 1; }
.pc.on img { animation: kenburns 9s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1.02); } to { transform: scale(1.16); } }
.pc-title { position: absolute; top: 10px; left: 10px; font: 700 12px var(--font-display); letter-spacing: 0.08em; text-transform: uppercase; color: #fff; background: rgba(10, 30, 60, 0.6); padding: 4px 10px; border-radius: 999px; }
.pc-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 12px; color: #fff; font: 700 17px var(--font-display); background: linear-gradient(transparent, rgba(5, 20, 40, 0.75)); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); }
.pc-cap.in { animation: capIn 0.8s ease-out; }
@keyframes capIn { from { transform: translateY(10px); opacity: 0; } }
.pc-dots { position: absolute; right: 12px; bottom: 14px; display: flex; gap: 5px; }
.pc-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, 0.45); }
.pc-dots i.on { background: #fff; }
.weather { padding: 10px 14px; font-size: 14px; font-weight: 700; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.weather .t { font: 700 19px var(--font-display); font-variant-numeric: tabular-nums; }
.weather .hot { color: #e76f51; } .weather .cold { color: #3a6ea5; }
.weather .diff { flex-basis: 100%; font-size: 12px; color: var(--muted); }
.pace-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pace-grid small { display: block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.pace-grid b { font: 700 22px var(--font-display); font-variant-numeric: tabular-nums; }
.pace-grid b.good { color: var(--ok); } .pace-grid b.bad { color: var(--warn); }
.eta { margin-top: 8px; font-weight: 800; font-size: 14px; }
.eta.good { color: var(--ok); } .eta.bad { color: var(--warn); }
.league, .feed { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.league li { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px solid #eef2f6; }
.league li:last-child, .feed li:last-child { border-bottom: 0; }
.league .who { font-weight: 800; }
.league .who small { display: block; font-weight: 700; color: var(--muted); font-size: 11px; }
.league .km { font: 700 16px var(--font-display); font-variant-numeric: tabular-nums; }
.league .rank { font-weight: 900; text-align: center; }
.feed li { display: flex; gap: 8px; padding: 6px 0; border-bottom: 1px solid #eef2f6; line-height: 1.35; }
.feed .ico { width: 22px; flex: none; text-align: center; }
.feed .txt { flex: 1; }
.feed .when { color: var(--muted); font-size: 11px; white-space: nowrap; }
.feed li.fresh { animation: fresh 1.5s ease-out; }
@keyframes fresh { from { background: #fff3cd; } }
.empty { color: var(--muted); font-size: 13px; }
.league li.empty { display: block; border: 0; }
.rules p { margin: 0 0 8px; font-size: 13px; line-height: 1.45; }
.replay.demo { background: linear-gradient(135deg, #ff8a00, #ffb703); color: #1b1300; }
.replay { border: 0; background: var(--ink); color: #fff; font-weight: 800; border-radius: 999px; padding: 8px 14px; font-size: 13px; }
.old-game { display: block; text-align: center; font-size: 12px; font-weight: 800; color: var(--muted); text-decoration: none; margin-top: 8px; }

/* ---------- boardingkortet ---------- */
.bpass-wrap { position: fixed; bottom: 92px; left: calc((100vw - var(--panel-w)) / 2); transform: translateX(-50%); z-index: 25; pointer-events: none; }
.bpass { display: grid; grid-template-columns: 1fr 120px; width: min(560px, calc(100vw - var(--panel-w) - 60px)); background: #fff; border-radius: 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45); overflow: hidden; animation: bpIn 0.7s cubic-bezier(0.2, 1.3, 0.4, 1); }
.bpass.out { animation: bpOut 0.5s ease-in forwards; }
@keyframes bpIn { from { transform: translateY(160%) rotate(3deg); } }
@keyframes bpOut { to { transform: translateY(-40px) scale(0.9); opacity: 0; } }
.bp-main { padding: 12px 18px 14px; border-right: 2px dashed #d5dde7; position: relative; }
.bp-head { display: flex; justify-content: space-between; align-items: center; font: 700 12px var(--font-mono); letter-spacing: 0.12em; color: #fff; background: linear-gradient(90deg, #16305a, #1f4d8a); margin: -12px -18px 10px; padding: 8px 18px; }
.bp-head .air { font-family: var(--font-display); letter-spacing: 0.05em; font-size: 14px; }
.bp-row { display: flex; gap: 18px; align-items: flex-end; }
.bp-field small { display: block; font: 700 10px var(--font-body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.bp-field b { font: 700 22px var(--font-display); color: var(--ink); white-space: nowrap; }
.bp-name b { font-size: 30px; }
.bp-route { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.bp-route b { font: 700 28px var(--font-mono); }
.bp-route .mid { flex: 1; height: 2px; background: repeating-linear-gradient(90deg, #c4ceda 0 6px, transparent 6px 12px); position: relative; }
.bp-route .mid::after { content: '✈'; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -55%); color: var(--accent); font-size: 18px; background: #fff; padding: 0 4px; }
.bp-gain { color: var(--accent) !important; }
.bp-stub { padding: 12px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; background: #f6f8fb; }
.bp-stub .seat { font: 700 13px var(--font-mono); text-align: center; color: var(--ink); }
.bp-stub .code { width: 88px; height: 56px; background: repeating-linear-gradient(90deg, #16243a 0 2px, transparent 2px 4px, #16243a 4px 5px, transparent 5px 8px, #16243a 8px 11px, transparent 11px 12px); }
.bp-turbo { position: absolute; right: 12px; top: 48px; font: 900 22px var(--font-display); color: #e63946; border: 3px solid #e63946; border-radius: 8px; padding: 0 8px; transform: rotate(-12deg); animation: stamp 0.5s 0.4s cubic-bezier(0.2, 1.6, 0.4, 1) both; }
@keyframes stamp { from { transform: rotate(-12deg) scale(2.5); opacity: 0; } }

/* ---------- banner, toasts, konfetti ---------- */
.banner { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; pointer-events: none; padding: 20px; padding-right: calc(var(--panel-w) + 20px); }
.banner-inner { background: #fff; border-radius: 26px; padding: 22px 36px; text-align: center; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45); animation: bannerIn 0.5s cubic-bezier(0.2, 1.4, 0.4, 1); max-width: 680px; }
.banner-inner .flag { font-size: 54px; line-height: 1; }
.banner-inner .capt { font: 700 12px var(--font-mono); letter-spacing: 0.14em; color: var(--muted); text-transform: uppercase; margin-top: 6px; }
.banner-inner h2 { font: 700 clamp(26px, 5vw, 44px) var(--font-display); margin: 4px 0 4px; }
.banner-inner p { margin: 0; font-size: 18px; font-weight: 700; color: var(--muted); }
@keyframes bannerIn { from { transform: scale(0.6) translateY(20px); opacity: 0; } }
.toast-wrap { position: fixed; left: calc((100vw - var(--panel-w)) / 2); bottom: 22px; transform: translateX(-50%); z-index: 31; display: grid; gap: 8px; justify-items: center; width: max-content; max-width: calc(100vw - var(--panel-w) - 40px); }
.toast { background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 999px; font-weight: 800; font-size: 16px; box-shadow: var(--shadow); animation: toastIn 0.35s ease-out; text-align: center; }
.toast.good { background: linear-gradient(135deg, #ff8a00, #ffb703); color: #1b1300; }
.toast.wind { background: #3a6ea5; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } }
.confetti { position: fixed; top: -20px; width: 10px; height: 16px; z-index: 60; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translate(var(--drift), 110vh) rotate(var(--spin)); } }

/* ---------- intro och välkomst ---------- */
.intro { position: fixed; inset: 0; z-index: 50; background: #0d1f45; transition: opacity 0.2s; }
.intro canvas { display: block; }
.intro-text { position: absolute; left: 0; right: 0; top: 9%; text-align: center; color: #fff; pointer-events: none; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.5); }
.intro-text span { display: inline-block !important; background: rgba(10, 30, 70, 0.45); padding: 4px 14px; border-radius: 999px; }
.intro-text b { display: block; font: 700 clamp(30px, 5.4vw, 72px) var(--font-display); letter-spacing: 0.01em; }
.intro-text span { display: block; font: 800 clamp(16px, 2vw, 26px) var(--font-body); opacity: 0.92; margin-top: 6px; }
.intro-text.show b { animation: introIn 0.9s cubic-bezier(0.2, 1.2, 0.3, 1); }
.intro-text.show span { animation: introIn 0.9s 0.15s cubic-bezier(0.2, 1.2, 0.3, 1) both; }
@keyframes introIn { from { transform: translateY(24px); opacity: 0; letter-spacing: 0.12em; } }
.intro-skip { position: absolute; right: 22px; bottom: 22px; border: 0; background: rgba(255, 255, 255, 0.18); color: #fff; font-weight: 800; padding: 10px 18px; border-radius: 999px; backdrop-filter: blur(4px); }
.welcome { position: fixed; inset: 0; z-index: 55; background: #000; overflow: hidden; }
.welcome-slides .pc { position: absolute; inset: 0; }
.welcome-slides .pc img { animation: none; }
.welcome-slides .pc.on img { animation: kenburns 9s ease-out forwards; }
.welcome-text { position: absolute; left: 0; right: 0; bottom: 10%; text-align: center; color: #fff; text-shadow: 0 4px 24px rgba(0, 0, 0, 0.6); }
.welcome-text .w1 { font: 800 clamp(20px, 3vw, 34px) var(--font-body); }
.welcome-text .w2 { font: 700 clamp(40px, 8vw, 110px) var(--font-display); line-height: 1; animation: introIn 1.4s cubic-bezier(0.2, 1.2, 0.3, 1); }
.welcome-text .w3 { font: 800 clamp(18px, 2.4vw, 28px) var(--font-body); margin-top: 10px; }

/* ---------- inloggning ---------- */
.gate { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(5, 20, 40, 0.65); backdrop-filter: blur(6px); }
.gate-card { background: #fff; border-radius: 24px; padding: 30px 34px; width: min(400px, 100%); text-align: center; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4); }
.gate-icon { font-size: 46px; line-height: 1; }
.gate-card h1 { font: 700 30px var(--font-display); margin: 6px 0 2px; }
.gate-card .muted { color: var(--muted); margin: 4px 0 12px; }
.gate-card form { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.gate-card input { font-size: 22px; padding: 11px 14px; border-radius: 12px; border: 2px solid rgba(0, 0, 0, 0.15); width: 170px; letter-spacing: 6px; text-align: center; font-family: inherit; }
.gate-card input:focus { outline: none; border-color: var(--accent); }
.btn { border: 0; border-radius: 999px; padding: 11px 20px; font-weight: 800; font-size: 15px; background: var(--ink); color: #fff; }
.gate .error { min-height: 20px; color: #c0392b; font-weight: 800; font-size: 14px; margin-top: 8px; }

/* ---------- mobil ---------- */
@media (max-width: 900px) {
  html, body { overflow: auto; height: auto; }
  .map-wrap { position: relative; height: 66vh; }
  .hud { position: absolute; top: 10px; left: 10px; right: 10px; }
  .hud-main { padding: 12px 14px 10px; }
  .big { gap: 16px; }
  .figures, .route-title .flightno { display: none; }
  .hud-side { flex-direction: column; align-items: flex-end; }
  .status { font-size: 13px; padding: 8px 12px; }
  .panel { position: static; width: auto; padding: 12px; overflow: visible; }
  .toast-wrap, .bpass-wrap { left: 50%; }
  .bpass-wrap { bottom: auto; top: 8px; }
  .toast-wrap { max-width: calc(100vw - 24px); }
  .bpass { width: calc(100vw - 24px); grid-template-columns: 1fr 86px; }
  .bp-name b { font-size: 24px; } .bp-route b { font-size: 22px; }
  .banner { padding-right: 20px; }
  .toast { font-size: 14px; }
  .cockpit { left: 10px; right: 10px; bottom: 10px; gap: 6px; }
  .gauge { min-width: 0; flex: 1; padding: 6px 8px; }
  .gauge b { font-size: 14px; }
}
@media (max-width: 560px) {
  .hud { flex-direction: column; }
  .hud-side { flex-direction: row; align-self: flex-end; position: absolute; top: 0; right: 0; }
  .hud-main { width: 100%; margin-top: 50px; }
  .route-title { font-size: 12px; }
  .me-btn { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .gauge:nth-child(4) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .clouds i, .dest-ring, .status.wind, .route-ahead, .bar i::after { animation: none; }
}
