:root {
  color-scheme: dark;
  --ink: #eaf7ff;
  --muted: #8ba7b7;
  --deep: #06131f;
  --panel: rgba(11, 30, 45, 0.94);
  --panel-2: #0d2638;
  --line: rgba(148, 195, 217, 0.18);
  --cyan: #61e4ff;
  --cyan-2: #1bb6df;
  --green: #5ee89a;
  --amber: #ffc861;
  --red: #ff6b73;
  --purple: #a98bff;
  --cell: clamp(42px, 5.2vw, 72px);
  --radius: 18px;
  --font-scale: 1;
  --ambient-glow: rgba(38, 144, 183, 0.28);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-font-size="small"] { --font-scale: .9; }
html[data-font-size="normal"] { --font-scale: 1; }
html[data-font-size="large"] { --font-scale: 1.15; }
html[data-font-size="xlarge"] { --font-scale: 1.3; }

* { box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #04101a;
  color: var(--ink);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

button, select { font: inherit; }
button { color: inherit; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% -20%, var(--ambient-glow), transparent 45%),
    linear-gradient(rgba(75, 140, 166, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(75, 140, 166, 0.025) 1px, transparent 1px);
  background-size: auto, 28px 28px, 28px 28px;
}

body[data-career-tier="3"], body[data-career-tier="4"] { --ambient-glow: rgba(38, 169, 143, .29); }
body[data-career-tier="5"], body[data-career-tier="6"] { --ambient-glow: rgba(118, 83, 190, .3); }
body[data-career-tier="7"], body[data-career-tier="8"] { --ambient-glow: rgba(190, 108, 51, .3); }
body[data-career-tier="9"], body[data-career-tier="10"] { --ambient-glow: rgba(125, 84, 166, .32); }

.is-hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-content: center;
  justify-items: center;
  background:
    radial-gradient(circle at 50% 44%, rgba(43, 175, 214, 0.16), transparent 30%),
    #05131f;
  letter-spacing: .08em;
}

.loading-screen h1 { margin: 30px 0 6px; font-size: clamp(30px, 5vw, 56px); }
.loading-screen p { margin: 0 0 22px; color: var(--muted); letter-spacing: .03em; }
.loading-track { width: min(360px, 68vw); height: 5px; overflow: hidden; border-radius: 99px; background: #102b3c; }
.loading-track span { display: block; width: 16%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cyan-2), var(--cyan)); transition: width .5s ease; }

.loading-plane { position: relative; width: 120px; height: 38px; animation: float 1.8s ease-in-out infinite; }
.plane-body { position: absolute; inset: 15px 0 auto; height: 11px; border-radius: 60% 20% 20% 60%; background: var(--cyan); box-shadow: 0 0 28px rgba(97, 228, 255, .35); }
.plane-body::after { content: ""; position: absolute; right: -7px; top: -7px; border-left: 18px solid var(--cyan); border-top: 12px solid transparent; }
.plane-wing { position: absolute; left: 48px; top: 2px; width: 34px; height: 34px; background: #21afd2; clip-path: polygon(40% 0, 65% 0, 100% 100%, 0 100%); transform: rotate(90deg); }
@keyframes float { 50% { transform: translateY(-8px); } }

.app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: 68px minmax(0, 1fr) 38px;
  width: 100%;
  height: 100%;
  min-width: 760px;
  min-height: 450px;
}

.topbar, .footerbar {
  display: flex;
  align-items: center;
  border-color: var(--line);
  background: rgba(5, 18, 29, .9);
  backdrop-filter: blur(16px);
}

.topbar { justify-content: space-between; padding: 0 20px; border-bottom: 1px solid var(--line); }
.footerbar { justify-content: space-between; padding: 0 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }

.brand-button { display: flex; align-items: center; gap: 10px; padding: 0; border: 0; background: transparent; cursor: pointer; text-align: left; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(97, 228, 255, .5); border-radius: 11px; color: #04131d; background: linear-gradient(135deg, #8af0ff, #20bce3); font-weight: 900; box-shadow: 0 0 25px rgba(37, 194, 230, .2); }
.brand-copy { display: grid; line-height: 1.05; }
.brand-copy strong { font-size: 15px; letter-spacing: .12em; }
.brand-copy small { margin-top: 4px; color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }

.flight-strip { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(15, 42, 60, .65); }
.flight-label { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.route-arrow { color: var(--cyan); }
.level-chip, .move-chip { padding: 5px 8px; border-radius: 7px; color: var(--cyan); background: rgba(50, 188, 223, .12); font-size: 11px; font-weight: 800; }
.timer-chip { display: flex; align-items: center; gap: 5px; min-width: 86px; padding: 5px 7px; border: 1px solid rgba(94,232,154,.25); border-radius: 8px; color: var(--green); background: rgba(20, 77, 54, .22); font-size: 10px; }
.timer-chip strong { min-width: 34px; font-variant-numeric: tabular-nums; letter-spacing: .03em; }
.timer-icon { font-size: 13px; }
.timer-track { width: 22px; height: 3px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.14); }
.timer-track span { display: block; width: 100%; height: 100%; border-radius: inherit; background: currentColor; transition: width .25s linear; }
.timer-chip.warning { color: var(--amber); border-color: rgba(255,200,97,.4); background: rgba(99,69,17,.26); }
.timer-chip.critical { color: #fff; border-color: rgba(255,107,115,.65); background: rgba(139,27,38,.65); animation: timer-pulse .75s ease-in-out infinite alternate; }
@keyframes timer-pulse { to { box-shadow: 0 0 16px rgba(255,107,115,.38); transform: scale(1.025); } }
.top-actions { display: flex; align-items: center; gap: 9px; }
.language-control select, .font-size-control select, .icon-button { height: 36px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--panel-2); cursor: pointer; }
.language-control select { min-width: 112px; padding: 0 28px 0 10px; }
.font-size-control select { width: 84px; padding: 0 6px; font-size: 10px; font-weight: 800; }
.icon-button { width: 38px; padding: 0; }

.game-layout {
  display: grid;
  grid-template-columns: minmax(205px, 250px) minmax(450px, 1fr) minmax(215px, 270px);
  gap: 12px;
  min-height: 0;
  padding: 12px;
}

.panel { min-height: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(150deg, rgba(14, 39, 56, .98), rgba(7, 25, 38, .98)); box-shadow: 0 18px 50px rgba(0, 0, 0, .2); }
.mission-panel, .queue-panel { display: flex; flex-direction: column; padding: 18px; }
.mission-panel { overflow-x: hidden; overflow-y: auto; scrollbar-color: rgba(139,167,183,.55) transparent; scrollbar-width: thin; }
.hold-panel { display: flex; flex-direction: column; padding: 18px; }
.panel-heading { flex: 0 0 auto; margin-bottom: 10px; }
.panel-heading h2, .hold-header h2 { margin: 4px 0 0; font-size: clamp(16px, 1.5vw, 22px); }
.eyebrow { color: var(--cyan); font-size: 10px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }

.operation-card { display: grid; flex: 0 0 auto; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 7px 10px; min-height: 84px; margin-bottom: 8px; padding: 9px 11px; border: 1px solid rgba(97,228,255,.22); border-radius: 13px; background: linear-gradient(135deg, rgba(34,122,154,.23), rgba(5,23,35,.48)); box-shadow: inset 0 1px rgba(255,255,255,.04); }
.operation-card[data-operation="cold"] { border-color: rgba(88,216,255,.45); background: linear-gradient(135deg, rgba(32,146,193,.32), rgba(5,29,46,.5)); }
.operation-card[data-operation="express"] { border-color: rgba(255,200,97,.42); background: linear-gradient(135deg, rgba(125,83,24,.34), rgba(34,27,17,.46)); }
.operation-card[data-operation="fragile"] { border-color: rgba(255,143,184,.4); }
.operation-card[data-operation="hazmat"] { border-color: rgba(255,137,79,.48); background: repeating-linear-gradient(135deg, rgba(156,77,31,.22) 0 9px, rgba(25,27,28,.34) 9px 18px); }
.operation-card[data-operation="restricted"] { border-color: rgba(169,139,255,.48); background: linear-gradient(135deg, rgba(87,68,147,.28), rgba(20,22,42,.45)); }
.operation-card[data-operation="heavy"] { border-color: rgba(174,204,219,.45); background: linear-gradient(135deg, rgba(72,94,108,.34), rgba(16,29,38,.52)); }
.operation-card.tutorial-focus { animation: soft-focus 1.4s ease-in-out infinite alternate; }
.operation-icon { display: grid; flex: 0 0 auto; place-items: center; width: 32px; height: 32px; border: 1px solid currentColor; border-radius: 9px; color: var(--cyan); background: rgba(4,19,30,.62); font-size: 17px; font-weight: 950; }
.operation-copy { display: grid; min-width: 0; gap: 3px; }
.operation-card small { overflow: hidden; color: var(--cyan); font-size: 8px; font-weight: 950; letter-spacing: .12em; text-overflow: ellipsis; white-space: nowrap; }
.operation-card strong { color: var(--ink); font-size: 10px; line-height: 1.25; }
.career-track { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "rank progress" "title title" "meter meter"; align-items: center; gap: 4px 8px; min-width: 0; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.1); }
.career-track .career-rank { grid-area: rank; padding: 3px 6px; border: 1px solid rgba(255,200,97,.36); border-radius: 6px; color: var(--amber); background: rgba(255,200,97,.08); font-size: 10px; font-weight: 950; letter-spacing: .08em; white-space: nowrap; }
.career-track strong { grid-area: title; min-width: 0; overflow-wrap: anywhere; font-size: 11px; line-height: 1.18; white-space: normal; }
.career-track > span:nth-child(3) { grid-area: progress; min-width: 0; overflow: hidden; color: var(--muted); font-size: 9px; font-weight: 850; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.career-meter { grid-area: meter; height: 3px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.1); }
.career-meter > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--green)); box-shadow: 0 0 8px rgba(94,232,154,.4); transition: width .35s ease; }

.aircraft-card { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: radial-gradient(circle at 50% 25%, rgba(71,184,219,.13), transparent 62%), rgba(5, 19, 29, .5); }
.aircraft-card > div:not(.aircraft-illustration) { display: grid; }
.aircraft-card small { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.aircraft-card strong { margin-top: 3px; font-size: 13px; }
.aircraft-illustration { position: relative; grid-column: 1 / -1; height: 66px; opacity: .98; }
.aircraft-illustration svg { display: block; width: 100%; height: 100%; overflow: visible; }
.aircraft-tier-badge { position: absolute; z-index: 2; right: 9px; top: 9px; padding: 3px 6px; border: 1px solid rgba(97,228,255,.32); border-radius: 7px; color: var(--cyan); background: rgba(3,20,30,.8); font-size: 8px; font-weight: 950; letter-spacing: .08em; }
.aircraft-shadow { fill: rgba(0,0,0,.38); transform: translateY(3px); }
.aircraft-wing-stripe { fill: none; stroke-width: 4; opacity: .66; }
.aircraft-center-stripe { fill: none; stroke-width: 2; opacity: .75; }
.aircraft-cockpit { fill: #09243a; opacity: .88; }
.aircraft-engine { stroke-width: 1.5; }
.aircraft-window { fill: #06304a; }
.aircraft-door-mark { fill: rgba(4,24,35,.38); stroke-width: 2; }

.balance-card, .rules-card { margin-top: 14px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: rgba(5, 19, 29, .42); }
.section-title-row { display: flex; align-items: center; justify-content: space-between; }
.balance-card h3, .rules-card h3 { margin: 0; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.status-pill { padding: 4px 7px; border-radius: 99px; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.status-pill.neutral { color: var(--muted); background: rgba(139, 167, 183, .12); }
.status-pill.good { color: #082417; background: var(--green); }
.status-pill.bad { color: #32080c; background: var(--red); }
.gauge-block { margin-top: 12px; }
.gauge-label { display: flex; justify-content: space-between; margin-bottom: 6px; color: var(--muted); font-size: 10px; }
.gauge-label strong { color: var(--ink); }
.balance-gauge { position: relative; height: 9px; border-radius: 99px; background: linear-gradient(90deg, rgba(255,107,115,.7), rgba(255,200,97,.55), rgba(94,232,154,.45), rgba(255,200,97,.55), rgba(255,107,115,.7)); }
.safe-zone { position: absolute; left: 38%; width: 24%; inset-block: 0; border: 1px solid rgba(255,255,255,.5); border-radius: inherit; }
.gauge-marker { position: absolute; left: 50%; top: -4px; width: 3px; height: 17px; border-radius: 3px; background: white; box-shadow: 0 0 8px white; transform: translateX(-50%); transition: left .25s ease; }

.rules-card { flex: 1; min-height: 120px; overflow: auto; }
.rules-card ul { display: grid; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.rules-card li { display: flex; gap: 8px; color: var(--muted); font-size: 11px; line-height: 1.3; }
.rules-card li::before { content: "◆"; color: var(--cyan); font-size: 8px; transform: translateY(2px); }
.rules-card li.satisfied { color: var(--green); }
.rules-card li.satisfied::before { content: "✓"; color: var(--green); font-size: 11px; }

.hold-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 12px; }
.load-counter { display: grid; justify-items: end; color: var(--muted); font-size: 10px; }
.load-counter strong { margin-top: 2px; color: var(--ink); font-size: 14px; }
.plane-deck { --deck-accent:#61e4ff; --deck-surface-a:#153f57; --deck-surface-b:#091f2d; --deck-rib:rgba(118,193,220,.14); --deck-glow:rgba(68,176,211,.1); position: relative; display: grid; flex: 1; min-height: 0; isolation: isolate; place-items: center; padding: 22px 50px 34px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--deck-accent) 38%, transparent); border-radius: 50% 18% 18% 50% / 18% 35% 35% 18%; background: linear-gradient(180deg, rgba(255,255,255,.055), transparent 22%, rgba(0,0,0,.17) 75%), radial-gradient(ellipse at 48% 40%, var(--deck-glow), transparent 58%), linear-gradient(100deg, var(--deck-surface-a), var(--deck-surface-b)); box-shadow: inset 0 12px 24px rgba(255,255,255,.035), inset 0 -24px 38px rgba(0,0,0,.22), inset 0 0 68px var(--deck-glow), 0 10px 28px rgba(0,0,0,.13); transition: background .35s ease, border-color .35s ease; }
.plane-deck[data-balance="warning"] { border-color: rgba(255,107,115,.55); box-shadow: inset calc(var(--cg-x, 0) * 28px) calc(var(--cg-y, 0) * 18px) 58px rgba(255,77,91,.2), 0 10px 28px rgba(0,0,0,.2); }
.plane-deck[data-balance="safe"] { border-color: rgba(94,232,154,.46); box-shadow: inset 0 0 74px rgba(69,231,148,.1), 0 10px 28px rgba(0,0,0,.16); }
.plane-deck::before { content: ""; position: absolute; z-index: 0; inset: 10px 18px; pointer-events: none; border: 1px dashed color-mix(in srgb, var(--deck-accent) 25%, transparent); border-radius: inherit; }
.plane-deck::after { content: ""; position: absolute; z-index: 0; inset: 0 30px; pointer-events: none; background: repeating-linear-gradient(90deg, transparent 0, transparent 8.5%, var(--deck-rib) 8.7%, transparent 9.2%), repeating-linear-gradient(0deg, transparent 0 52px, rgba(255,255,255,.035) 53px 55px); opacity: .95; }
.deck-tier-1 { --deck-accent:#61e4ff; --deck-surface-a:#153f57; --deck-surface-b:#091f2d; }
.deck-tier-2 { --deck-accent:#78eaff; --deck-surface-a:#174b63; --deck-surface-b:#092433; --deck-glow:rgba(77,202,240,.14); }
.deck-tier-3 { --deck-accent:#74f0df; --deck-surface-a:#164b51; --deck-surface-b:#092a31; --deck-glow:rgba(61,222,203,.14); }
.deck-tier-4 { --deck-accent:#85efb8; --deck-surface-a:#174c40; --deck-surface-b:#0b2a28; --deck-glow:rgba(78,229,154,.14); }
.deck-tier-5 { --deck-accent:#a9a3ff; --deck-surface-a:#303f67; --deck-surface-b:#171f3d; --deck-glow:rgba(137,125,255,.17); }
.deck-tier-6 { --deck-accent:#c395ff; --deck-surface-a:#493c66; --deck-surface-b:#241d3b; --deck-glow:rgba(190,129,255,.17); }
.deck-tier-7 { --deck-accent:#ffca72; --deck-surface-a:#5a4935; --deck-surface-b:#2d2725; --deck-glow:rgba(255,190,82,.18); }
.deck-tier-8 { --deck-accent:#ff9c74; --deck-surface-a:#5c3d3c; --deck-surface-b:#302326; --deck-glow:rgba(255,123,93,.18); }
.deck-tier-9 { --deck-accent:#ff83be; --deck-surface-a:#58364f; --deck-surface-b:#2e2031; --deck-glow:rgba(255,94,179,.19); }
.deck-tier-10 { --deck-accent:#e2f6ff; --deck-surface-a:#334d67; --deck-surface-b:#152539; --deck-rib:rgba(220,246,255,.22); --deck-glow:rgba(151,219,255,.25); }
.deck-nose { position: absolute; left: 12px; top: 50%; width: 26px; height: 70%; max-height: 270px; border-left: 2px solid rgba(105, 197, 224, .2); border-radius: 50%; transform: translateY(-50%); }
.deck-door { position: absolute; z-index: 5; right: 8px; top: 50%; display: grid; place-items: center; width: 40px; height: 58%; border: 3px solid #ffd06e; border-radius: 8px; color: #fff4c9; background: repeating-linear-gradient(135deg, rgba(255,194,60,.34) 0 9px, rgba(21,28,31,.72) 9px 18px); box-shadow: 0 0 0 3px rgba(255,196,76,.12), 0 0 24px rgba(255,190,65,.42), inset 0 0 20px rgba(0,0,0,.42); font-size: 10px; font-weight: 950; letter-spacing: .12em; text-shadow: 0 2px 4px #000; writing-mode: vertical-rl; transform: translateY(-50%); }
.deck-door::before, .deck-door::after { content: ""; position: absolute; left: 50%; width: 8px; height: 8px; border-radius: 50%; background: #ff5e66; box-shadow: 0 0 12px #ff5e66; transform: translateX(-50%); animation: door-beacon 1s ease-in-out infinite alternate; }
.deck-door::before { top: 8px; }
.deck-door::after { bottom: 8px; animation-delay: -.5s; }
.deck-nose { z-index: 2; }

.hold-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(var(--cols), var(--grid-cell)); grid-template-rows: repeat(var(--rows), var(--grid-cell)); width: calc(var(--cols) * var(--grid-cell)); height: calc(var(--rows) * var(--grid-cell)); max-width: 100%; outline: 2px solid rgba(235, 248, 255, .82); outline-offset: -2px; touch-action: none; }
.grid-cell { border-right: 1px solid rgba(103, 163, 188, .14); border-bottom: 1px solid rgba(103, 163, 188, .14); background: rgba(22, 57, 75, .34); cursor: crosshair; }
.grid-cell:nth-child(odd) { background: rgba(26, 64, 84, .3); }
.grid-cell.zone-cold { background: repeating-linear-gradient(135deg, rgba(67, 194, 244, .3), rgba(67, 194, 244, .3) 8px, rgba(33, 132, 184, .21) 8px, rgba(33, 132, 184, .21) 16px); box-shadow: inset 0 0 0 1px rgba(119, 225, 255, .38); }
.grid-cell.zone-hazmat { background: repeating-linear-gradient(135deg, rgba(255,177,56,.15), rgba(255,177,56,.15) 5px, rgba(29,49,56,.2) 5px, rgba(29,49,56,.2) 10px); }
.grid-cell.zone-reinforced { background: repeating-linear-gradient(90deg, rgba(178,209,222,.24) 0 4px, rgba(54,80,92,.2) 4px 9px); box-shadow: inset 0 0 0 1px rgba(205,235,245,.3); }
.grid-cell.zone-door { box-shadow: inset -3px 0 rgba(255, 200, 97, .24); }
.grid-cell.blocked-cell { cursor: not-allowed; background: repeating-linear-gradient(135deg, rgba(255,91,101,.28) 0 5px, rgba(30,36,41,.72) 5px 10px); box-shadow: inset 0 0 0 2px rgba(255,112,120,.38); opacity: .95; }
.grid-cell.blocked-cell::after { content: "×"; display: grid; height: 100%; place-items: center; color: rgba(255,210,214,.78); font-size: 16px; font-weight: 950; }
.grid-cell.tutorial-target-cell { position: relative; z-index: 4; background: rgba(94,232,154,.38); box-shadow: inset 0 0 0 3px #d9ffe8, 0 0 18px rgba(94,232,154,.78); animation: target-cell 1s ease-in-out infinite alternate; }
.grid-cell.drop-preview { background: rgba(94, 232, 154, .2); }
.grid-cell.drop-invalid { background: rgba(255, 107, 115, .22); }

.zone-overlay { position: absolute; z-index: 2; pointer-events: none; }
.zone-overlay-cold { border: 3px solid rgba(101, 225, 255, .94); border-radius: 10px; background: rgba(37, 166, 225, .11); box-shadow: inset 0 0 28px rgba(71, 204, 255, .18), 0 0 18px rgba(71, 204, 255, .24); }
.zone-overlay-reinforced { border: 3px solid rgba(214,239,248,.88); border-radius: 8px; background: rgba(150,191,207,.1); box-shadow: inset 0 0 20px rgba(198,231,244,.16), 0 0 16px rgba(164,210,229,.18); }
.zone-overlay-label { position: absolute; left: 7px; top: 7px; padding: 4px 7px; border: 1px solid rgba(191, 243, 255, .65); border-radius: 6px; color: #ecfbff; background: rgba(8, 99, 142, .9); box-shadow: 0 4px 12px rgba(0, 32, 52, .35); font-size: 9px; font-weight: 950; letter-spacing: .08em; line-height: 1; text-transform: uppercase; white-space: nowrap; }

.cargo-piece { position: relative; display: grid; min-width: 64px; min-height: 50px; overflow: visible; border: 1px solid rgba(255,255,255,.42); border-radius: 8px; color: #fff; background: linear-gradient(135deg, rgba(255,255,255,.24), transparent 22%), linear-gradient(180deg, rgba(255,255,255,.08), rgba(2,16,23,.38)), var(--cargo-color, #30769b); box-shadow: inset 3px 3px 0 rgba(255,255,255,.13), inset -5px -7px 0 rgba(0,0,0,.16), 0 9px 0 color-mix(in srgb, var(--cargo-color, #30769b) 58%, #06151d), 0 13px 19px rgba(0,0,0,.3); cursor: pointer; touch-action: none; transform: translateY(-4px); transform-style: preserve-3d; transition: transform .16s ease, box-shadow .16s ease, opacity .18s ease; }
.cargo-piece::before { content: ""; position: absolute; z-index: 1; inset: 5px; pointer-events: none; border: 1px solid rgba(255,255,255,.14); border-radius: 6px; }
.cargo-piece::after { content: ""; position: absolute; z-index: 0; left: 8px; right: -1px; bottom: -10px; height: 9px; pointer-events: none; border-radius: 0 0 7px 6px; background: linear-gradient(90deg, rgba(0,0,0,.28), rgba(255,255,255,.08)); transform: skewX(-34deg); transform-origin: top; }
.cargo-piece:hover { transform: translateY(-8px); box-shadow: inset 3px 3px 0 rgba(255,255,255,.16), inset -5px -7px 0 rgba(0,0,0,.16), 0 10px 0 color-mix(in srgb, var(--cargo-color, #30769b) 58%, #06151d), 0 18px 26px rgba(0,0,0,.35); }
.cargo-piece.selected { outline: 3px solid var(--cyan); outline-offset: 2px; box-shadow: 0 0 22px rgba(97,228,255,.35); }
.cargo-piece.tutorial-target-cargo { z-index: 5; outline: 3px solid #d9ffe8; outline-offset: 3px; box-shadow: 0 0 0 5px rgba(94,232,154,.2), 0 0 30px rgba(94,232,154,.62); animation: target-cargo 1s ease-in-out infinite alternate; }
.cargo-piece.landed { animation: cargo-land .48s cubic-bezier(.2,1.7,.3,1); }
.cargo-piece.placed { position: absolute; z-index: 3; margin: 2px; min-width: 0; min-height: 0; border-radius: 8px; transform: translateY(-5px); transition: left .2s ease, top .2s ease, width .2s ease, height .2s ease, transform .16s ease; }
.cargo-piece.dragging-source { opacity: .24; filter: saturate(.45); }
.cargo-piece.cargo-drag-ghost { position: fixed !important; z-index: 95 !important; margin: 0 !important; min-width: 0; min-height: 0; pointer-events: none; opacity: .94; transform: rotate(-2deg) scale(1.04) !important; transition: box-shadow .12s ease,filter .12s ease !important; }
.cargo-piece.cargo-drag-ghost.drop-valid { filter: brightness(1.18); outline: 3px solid var(--green); box-shadow: inset 3px 3px rgba(255,255,255,.14),inset -5px -7px rgba(0,0,0,.16),0 9px 0 color-mix(in srgb,var(--cargo-color) 58%,#06151d),0 0 28px rgba(94,232,154,.8); }
.cargo-piece.cargo-drag-ghost.drop-invalid { filter: grayscale(.35) brightness(.9); outline: 3px solid var(--red); box-shadow: 0 0 25px rgba(255,107,115,.72); }
.cargo-piece .cargo-id { position: relative; z-index: 3; align-self: start; justify-self: start; margin: 9px 0 0 10px; padding: 2px 4px; border-radius: 4px; color: #fff; background: rgba(1,12,18,.45); font-size: 13px; font-weight: 950; letter-spacing: .08em; }
.cargo-piece .cargo-weight { position: relative; z-index: 3; align-self: end; justify-self: start; margin: 0 0 8px 10px; padding: 2px 4px; border-radius: 4px; color: #fff; background: rgba(1,12,18,.38); font-size: 10px; font-weight: 800; opacity: 1; }
.cargo-piece .cargo-tags { position: absolute; right: 7px; top: 7px; display: flex; gap: 3px; }
.cargo-piece .cargo-tag { display: grid; place-items: center; width: 17px; height: 17px; border-radius: 5px; color: #07202b; background: rgba(255,255,255,.82); font-size: 10px; font-weight: 950; }
.cargo-piece .cargo-tag-cold { width: 25px; height: 25px; border: 2px solid #f3fdff; border-radius: 8px; color: #04364a; background: linear-gradient(145deg, #d6f9ff, #59d8ff); box-shadow: 0 0 0 2px rgba(72, 205, 255, .3), 0 0 14px rgba(71, 211, 255, .9); font-size: 15px; text-shadow: 0 1px rgba(255,255,255,.65); }
.cargo-piece.compact .cargo-id { margin: 6px 0 0 7px; font-size: 10px; }
.cargo-piece.compact .cargo-weight { display: none; }
.cargo-piece.compact .cargo-tags { right: 4px; top: 4px; }
.cargo-piece.compact .cargo-tag { width: 14px; height: 14px; font-size: 8px; }
.cargo-piece.compact .cargo-tag-cold { width: 20px; height: 20px; border-width: 1px; border-radius: 6px; font-size: 12px; }
.cargo-visual { position: absolute; z-index: 0; inset: 0; pointer-events: none; opacity: .72; }
.cargo-visual::before { content: ""; position: absolute; inset: 8px; border: 2px solid rgba(255,255,255,.16); border-radius: 5px; box-shadow: inset 0 0 0 3px rgba(0,0,0,.08); }
.cargo-visual-crate { background: repeating-linear-gradient(90deg, transparent 0 18px, rgba(255,255,255,.09) 18px 21px); }
.cargo-visual-case { background: radial-gradient(circle at 18% 22%, rgba(255,255,255,.2) 0 2px, transparent 3px), radial-gradient(circle at 82% 78%, rgba(255,255,255,.2) 0 2px, transparent 3px); }
.cargo-visual-parcel { background: linear-gradient(25deg, transparent 46%, rgba(255,232,180,.18) 47% 54%, transparent 55%); }
.cargo-visual-equipment { background: repeating-linear-gradient(0deg, transparent 0 11px, rgba(0,0,0,.11) 11px 14px); }
.cargo-visual-cooler { background: linear-gradient(145deg, rgba(211,250,255,.22), transparent 54%), repeating-linear-gradient(90deg, transparent 0 15px, rgba(122,230,255,.15) 15px 17px); }
.cargo-visual-hazmat { background: repeating-linear-gradient(135deg, transparent 0 12px, rgba(255,214,98,.16) 12px 20px); }
.cargo-visual-fragile { background: radial-gradient(circle at 50% 50%, transparent 0 18%, rgba(255,255,255,.13) 19% 22%, transparent 23%); }
.cargo-visual-metal { background: linear-gradient(90deg, rgba(255,255,255,.16), transparent 15% 85%, rgba(0,0,0,.18)); }
.cargo-visual-express { background: linear-gradient(120deg, transparent 0 56%, rgba(255,221,132,.22) 57% 64%, transparent 65%); }
.cargo-handle { position: absolute; left: 50%; top: 5px; width: 24%; height: 7px; border: 2px solid rgba(255,255,255,.25); border-bottom: 0; border-radius: 5px 5px 0 0; transform: translateX(-50%); }
.cargo-strap { position: absolute; background: rgba(255,255,255,.12); }
.cargo-strap-a { left: 27%; inset-block: 0; width: 5px; }
.cargo-strap-b { right: 24%; inset-block: 0; width: 3px; }
.cargo-corner { position: absolute; width: 11px; height: 11px; border-color: rgba(255,255,255,.36); border-style: solid; }
.cargo-corner-a { left: 4px; top: 4px; border-width: 2px 0 0 2px; }
.cargo-corner-b { right: 4px; bottom: 4px; border-width: 0 2px 2px 0; }

.problem-strip { display: flex; align-items: center; gap: 9px; min-height: 38px; margin-top: 10px; padding: 8px 10px; border: 1px solid rgba(97, 228, 255, .12); border-radius: 10px; color: var(--muted); background: rgba(5, 17, 27, .5); font-size: 11px; }
.problem-strip.error { color: #ffd8da; border-color: rgba(255,107,115,.4); background: rgba(83,20,27,.32); }
.problem-strip.success { color: #caffdf; border-color: rgba(94,232,154,.35); background: rgba(15,76,46,.27); }
.problem-icon { display: grid; flex: 0 0 auto; place-items: center; width: 18px; height: 18px; border-radius: 99px; color: #061923; background: var(--cyan); font-size: 11px; font-weight: 900; }

.queue-heading { display: flex; align-items: center; justify-content: space-between; }
.cargo-queue { --queue-cell: 44px; display: flex; flex: 1; min-height: 0; flex-flow: row wrap; align-content: flex-start; align-items: flex-start; gap: 9px; overflow-y: auto; padding: 3px; }
.cargo-queue .cargo-piece { flex: 0 0 auto; width: calc(var(--cargo-w, 2) * var(--queue-cell)); height: calc(var(--cargo-h, 2) * var(--queue-cell)); min-width: 0; min-height: 0; }
.cargo-queue .empty-queue { display: grid; width: 100%; place-items: center; min-height: 120px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); text-align: center; }
.control-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.queue-heading-actions { display: grid; justify-items: end; gap: 4px; }
.queue-page-label { color: var(--muted); font-size: 8px; font-weight: 900; }
.queue-pager { display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; gap: 7px; margin-top: 6px; }
.queue-pager span { color: var(--muted); font-size: 9px; font-weight: 900; text-align: center; }
.queue-page-button { height: 28px; border: 1px solid var(--line); border-radius: 8px; color: var(--cyan); background: rgba(15,45,62,.8); cursor: pointer; }
.queue-page-button:disabled { cursor: default; opacity: .28; }
.secondary-button, .primary-button { min-width: 0; min-height: 40px; border-radius: 11px; font-weight: 850; cursor: pointer; transition: transform .1s ease, filter .1s ease, opacity .1s ease; }
.secondary-button:active, .primary-button:active { transform: translateY(1px); }
.secondary-button:disabled, .primary-button:disabled { cursor: not-allowed; opacity: .38; }
.secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); background: #102d40; font-size: 11px; }
.secondary-button > span:last-child, .primary-button > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.secondary-button:hover:not(:disabled) { border-color: rgba(97,228,255,.45); }
.secondary-button.accent { color: var(--cyan); }
.primary-button { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 9px; padding: 0 15px; border: 0; color: #061922; background: linear-gradient(135deg, #87eeff, #32c7e9); box-shadow: 0 8px 24px rgba(45, 193, 225, .2); }
.primary-button:hover:not(:disabled) { filter: brightness(1.08); }

.legend { display: flex; align-items: center; gap: 14px; }
.legend > span { display: flex; align-items: center; gap: 5px; }
.legend-icon { display: grid; place-items: center; width: 17px; height: 17px; border-radius: 5px; color: #061922; background: #dcecf3; font-style: normal; font-weight: 900; }
.legend-icon.cold { background: #8edcff; }
.legend-icon.priority { background: #ffe082; }
.legend-icon.hazmat { background: #ff9a65; }

.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(0, 8, 14, .72); backdrop-filter: blur(8px); }
.modal { position: relative; width: min(470px, 94vw); padding: 30px; overflow: hidden; border: 1px solid rgba(97,228,255,.25); border-radius: 24px; background: linear-gradient(155deg, #12374d, #071b29 72%); box-shadow: 0 30px 90px rgba(0,0,0,.5); text-align: center; }
.modal::before { content: ""; position: absolute; width: 250px; height: 250px; left: 50%; top: -190px; border-radius: 50%; background: rgba(97,228,255,.16); transform: translateX(-50%); filter: blur(20px); }
.modal-close { position: absolute; right: 12px; top: 10px; width: 32px; height: 32px; border: 0; border-radius: 9px; background: rgba(255,255,255,.06); cursor: pointer; }
.modal-icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 15px; border-radius: 20px; color: #072019; background: var(--green); box-shadow: 0 0 32px rgba(94,232,154,.28); font-size: 30px; font-weight: 950; }
.modal.clear-modal { overflow: hidden; border-color: rgba(94,232,154,.56); background: radial-gradient(circle at 50% 0, rgba(94,232,154,.18), transparent 42%), linear-gradient(180deg, rgba(8,31,39,.98), rgba(3,16,24,.99)); }
.modal.clear-modal::before, .modal.clear-modal::after { content: "✦  ·  ✧  ·  ✦"; position: absolute; left: 50%; top: 18px; color: var(--amber); font-size: 18px; letter-spacing: 9px; opacity: .72; transform: translateX(-50%); animation: celebration-drift 2.2s ease-in-out infinite alternate; }
.modal.clear-modal::after { top: auto; bottom: 18px; color: var(--cyan); animation-delay: -.9s; }
.modal.clear-modal .modal-icon { animation: clearance-pop .68s cubic-bezier(.2,1.6,.4,1) both; }
.modal h2 { margin: 7px 0 9px; font-size: 28px; }
.modal p { margin: 0 auto; max-width: 370px; color: var(--muted); line-height: 1.5; }
.flight-select-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; max-height: 52vh; margin-top: 16px; padding-right: 4px; overflow-y: auto; }
.flight-select-button { display: grid; gap: 2px; min-height: 70px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: rgba(4, 20, 30, .55); cursor: pointer; }
.flight-select-button:hover:not(:disabled) { border-color: var(--cyan); background: rgba(24, 76, 98, .45); }
.flight-select-button:disabled { opacity: .35; cursor: not-allowed; }
.flight-select-button strong { color: var(--cyan); font-size: 16px; }
.flight-select-button span { font-size: 9px; }
.flight-select-button small { min-height: 12px; color: var(--amber); font-size: 9px; }
.star-row { display: flex; justify-content: center; gap: 8px; margin: 20px 0 13px; }
.star { color: #29495a; font-size: 30px; }
.star.earned { color: var(--amber); filter: drop-shadow(0 0 8px rgba(255,200,97,.35)); }
@keyframes clearance-pop { 0% { opacity: 0; transform: scale(.35) rotate(-18deg); } 72% { transform: scale(1.12) rotate(4deg); } 100% { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes celebration-drift { from { transform: translateX(-52%) scale(.96); opacity: .42; } to { transform: translateX(-48%) scale(1.06); opacity: .9; } }

.departure-sequence { --departure-accent: #61e4ff; position: fixed; z-index: 46; inset: 0; overflow: hidden; display: grid; place-items: center; color: #fff; background: radial-gradient(circle at 50% 105%, rgba(255,200,97,.28), transparent 32%), linear-gradient(180deg, #071b32, #123e5c 60%, #1f708a); opacity: 0; transition: opacity .22s ease; }
.preview-play-gate { position:fixed; z-index:70; inset:0; display:grid; place-content:center; justify-items:center; gap:12px; color:#dffaff; background:rgba(3,17,27,.88); backdrop-filter:blur(8px); }
.preview-play-gate button { min-width:220px; padding:16px 28px; border:1px solid rgba(97,228,255,.72); border-radius:14px; color:#052333; background:linear-gradient(135deg,#86efff,#72e8ab); box-shadow:0 12px 36px rgba(0,0,0,.38),0 0 28px rgba(97,228,255,.24); font:inherit; font-size:18px; font-weight:950; cursor:pointer; }
.preview-play-gate span { font-size:12px; font-weight:850; letter-spacing:.12em; }
.departure-sequence.tier-3, .departure-sequence.tier-4 { --departure-accent: #74f0df; background: radial-gradient(circle at 50% 105%, rgba(255,224,125,.3), transparent 32%), linear-gradient(180deg, #082b39, #17636c 62%, #2b8b84); }
.departure-sequence.tier-5, .departure-sequence.tier-6 { --departure-accent: #c395ff; background: radial-gradient(circle at 50% 105%, rgba(255,170,222,.24), transparent 34%), linear-gradient(180deg, #171d42, #3c3f79 62%, #735d94); }
.departure-sequence.tier-7, .departure-sequence.tier-8 { --departure-accent: #ffca72; background: radial-gradient(circle at 50% 105%, rgba(255,214,122,.36), transparent 34%), linear-gradient(180deg, #38233c, #8d4d54 62%, #d38a5b); }
.departure-sequence.tier-9, .departure-sequence.tier-10 { --departure-accent: #ff83be; background: radial-gradient(circle at 50% 105%, rgba(220,246,255,.34), transparent 34%), linear-gradient(180deg, #161b39, #3f527a 62%, #6fa2b9); }
.departure-sequence.scene-coast { background:radial-gradient(circle at 78% 18%,#fff4b2 0 4%,transparent 5%),linear-gradient(180deg,#4aaad2 0 52%,#69d3df 53% 63%,#146d8d 64% 100%); }
.departure-sequence.scene-city { background:radial-gradient(circle at 75% 20%,rgba(255,188,106,.8),transparent 18%),linear-gradient(180deg,#273459,#b86762 63%,#272d42); }
.departure-sequence.scene-mountain { background:linear-gradient(180deg,#2f7b9b,#a9d3cf 59%,#31505b); }
.departure-sequence.scene-desert { background:linear-gradient(180deg,#5ba8ce,#f5c37e 62%,#b66d42); }
.departure-sequence.scene-snow { background:linear-gradient(180deg,#7b9fba,#d7f3f8 65%,#8daeba); }
.departure-sequence.scene-base { background:linear-gradient(180deg,#243c4b,#627660 64%,#26372f); }
.departure-landmark { position:absolute; z-index:0; left:0; right:0; bottom:23%; height:32%; opacity:.72; }
.scene-coast .departure-landmark { background:linear-gradient(165deg,transparent 0 70%,rgba(235,248,235,.9) 71% 74%,transparent 75%),linear-gradient(180deg,transparent 76%,rgba(7,79,105,.68) 77%); }
.scene-city .departure-landmark { background:linear-gradient(90deg,transparent 0 5%,#162535 5% 13%,transparent 13% 16%,#1b2d3e 16% 25%,transparent 25% 29%,#142332 29% 36%,transparent 36% 39%,#1b2b3a 39% 52%,transparent 52% 58%,#122231 58% 66%,transparent 66% 71%,#1a2c3d 71% 87%,transparent 87%); clip-path:polygon(0 100%,0 70%,8% 70%,8% 38%,16% 38%,16% 61%,23% 61%,23% 24%,31% 24%,31% 51%,39% 51%,39% 10%,48% 10%,48% 60%,58% 60%,58% 34%,68% 34%,68% 67%,78% 67%,78% 18%,87% 18%,87% 57%,100% 57%,100% 100%); }
.scene-mountain .departure-landmark { background:#36565d; clip-path:polygon(0 100%,0 74%,15% 25%,26% 66%,39% 5%,55% 72%,70% 28%,83% 65%,94% 20%,100% 56%,100% 100%); }
.scene-desert .departure-landmark { background:#b87346; clip-path:polygon(0 100%,0 72%,15% 58%,30% 75%,48% 52%,65% 72%,82% 55%,100% 68%,100% 100%); }
.scene-snow .departure-landmark { background:#e8faff; clip-path:polygon(0 100%,0 76%,15% 26%,22% 46%,34% 12%,49% 72%,64% 30%,73% 51%,87% 18%,100% 61%,100% 100%); }
.scene-base .departure-landmark { background:#172b2a; clip-path:polygon(0 100%,0 67%,10% 67%,10% 39%,20% 39%,20% 67%,38% 67%,38% 48%,48% 48%,48% 67%,67% 67%,67% 25%,71% 25%,73% 7%,75% 25%,79% 25%,79% 67%,100% 67%,100% 100%); }
.departure-sequence.is-launching { opacity: 1; }
.departure-sequence.is-leaving { opacity: 0; }
.departure-preflight { position:absolute; z-index:8; inset:0; display:grid; place-items:center; align-content:center; gap:22px; background:linear-gradient(180deg,#061722,#123e5c); animation:preflight-scene 2.75s ease both; }
.preflight-hold { position:relative; display:grid; grid-template-columns:repeat(4,72px); gap:8px; padding:28px 40px; border:6px solid #89e8fa; border-radius:70px 16px 16px 70px; background:#173b50; box-shadow:0 20px 50px rgba(0,0,0,.4),inset 0 0 35px rgba(83,212,237,.18); overflow:hidden; }
.preflight-hold i { display:grid; place-items:center; width:72px; height:72px; border:2px solid #ffd69f; border-radius:8px; color:#fff; background:linear-gradient(135deg,#cf824b,#8c4d2d); box-shadow:inset -9px -9px rgba(0,0,0,.18); font-style:normal;font-weight:950; animation:preflight-cargo-lock .5s ease both; }
.preflight-hold i:nth-child(2){animation-delay:.12s}.preflight-hold i:nth-child(3){animation-delay:.24s}.preflight-hold i:nth-child(4){animation-delay:.36s}
.preflight-door { position:absolute; z-index:2; top:-2px; bottom:-2px; width:52%; border:5px solid #f4c552; background:repeating-linear-gradient(135deg,#142833 0 18px,#e2a832 18px 34px); box-shadow:0 0 24px rgba(244,197,82,.35); }
.preflight-door.door-left { left:-53%; border-radius:68px 0 0 68px; animation:preflight-door-left 1s cubic-bezier(.25,.75,.25,1) .75s forwards; }
.preflight-door.door-right { right:-53%; border-radius:0 14px 14px 0; animation:preflight-door-right 1s cubic-bezier(.25,.75,.25,1) .75s forwards; }
.preflight-hold em { position:absolute; z-index:4; left:50%; top:50%; display:grid; place-items:center; width:66px; height:66px; border-radius:50%; color:#082a1a; background:#64ec9c; box-shadow:0 0 0 10px rgba(100,236,156,.15),0 0 34px rgba(100,236,156,.75); font-size:34px;font-style:normal;opacity:0;transform:translate(-50%,-50%) scale(.5);animation:preflight-secured .48s ease 1.75s forwards; }
.preflight-copy { display:grid; justify-items:center; gap:7px; text-shadow:0 4px 18px rgba(0,0,0,.45); }
.preflight-copy span { color:var(--cyan);font-size:12px;font-weight:900;letter-spacing:.16em; }
.preflight-copy strong { font-size:clamp(20px,3vw,34px); }
.departure-sequence::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30%; background: linear-gradient(180deg,rgba(24,50,63,.15),#142934 48%,#0b1b24); clip-path: polygon(0 58%,100% 0,100% 100%,0 100%); }
.departure-runway { position:absolute; z-index:1; left:-8%; right:-8%; bottom:6%; height:24%; background:linear-gradient(180deg,#394852,#192832); clip-path:polygon(0 62%,100% 0,100% 100%,0 100%); overflow:hidden; }
.departure-runway::before,.departure-runway::after { content:""; position:absolute; left:0; right:0; height:4px; background:rgba(255,217,103,.85); box-shadow:0 0 12px rgba(255,217,103,.55); }
.departure-runway::before { top:58%; transform:rotate(-3.5deg); }
.departure-runway::after { bottom:7%; transform:rotate(-3.5deg); }
.departure-runway i { position:absolute; top:48%; width:14%; height:8px; background:#eef7f5; transform:skewX(-30deg) rotate(-3deg); animation:runway-rush .52s linear infinite; }
.departure-runway i:nth-child(1){left:-10%}.departure-runway i:nth-child(2){left:14%}.departure-runway i:nth-child(3){left:38%}.departure-runway i:nth-child(4){left:62%}.departure-runway i:nth-child(5){left:86%}
.departure-shadow { position:absolute; z-index:2; left:12%; top:76%; width:min(310px,28vw); height:24px; border-radius:50%; background:rgba(0,0,0,.42); filter:blur(9px); animation:departure-shadow 5s ease 2.72s both; }
.departure-aircraft { position: absolute; z-index: 2; left: -16%; top: 62%; width: min(400px, 36vw); filter: drop-shadow(0 18px 20px rgba(0,0,0,.35)); transform:translateY(-50%) scale(.72); transform-origin: 62% 52%; }
.departure-aircraft svg { display: block; width: 100%; overflow: visible; }
.departure-aircraft .aircraft-body { fill:url(#none); fill:#eefbff; stroke:var(--departure-accent); stroke-width:4; }
.departure-aircraft .aircraft-tail { fill:#bfeaf4; stroke:var(--departure-accent); stroke-width:3; stroke-linejoin:round; }
.departure-aircraft .aircraft-wing { fill:#d7f5fa; stroke:var(--departure-accent); stroke-width:3; stroke-linejoin:round; }
.departure-aircraft .departure-stripe { fill: none; stroke: var(--departure-accent); stroke-width: 5; }
.departure-aircraft .cargo-door-mark { fill:rgba(97,228,255,.16); stroke:#258ba8; stroke-width:3; stroke-dasharray:7 4; }
.departure-aircraft .cockpit path { fill:#12394f; stroke:#64dff2; stroke-width:2; }
.departure-aircraft .departure-windows circle { fill:#18506a; stroke:#a9f4ff; stroke-width:1.5; }
.departure-aircraft .departure-wheels path { fill:none; stroke:#dcebf0; stroke-width:4; }
.departure-aircraft .departure-wheels circle { fill:#17232d; stroke:#dcebf0; stroke-width:3; }
.departure-aircraft .departure-engines ellipse { fill:#183b50; stroke:var(--departure-accent); stroke-width:3; }
.departure-sequence.tier-1 .engine-2,.departure-sequence.tier-1 .engine-3,.departure-sequence.tier-1 .engine-4,.departure-sequence.tier-2 .engine-3,.departure-sequence.tier-2 .engine-4,.departure-sequence.tier-3 .engine-3,.departure-sequence.tier-3 .engine-4,.departure-sequence.tier-4 .engine-3,.departure-sequence.tier-4 .engine-4,.departure-sequence.tier-5 .engine-4,.departure-sequence.tier-6 .engine-4 { display:none; }
.departure-sequence.tier-1 .departure-aircraft { width:min(330px,31vw); }
.departure-sequence.tier-2 .departure-aircraft,.departure-sequence.tier-3 .departure-aircraft { width:min(360px,33vw); }
.departure-sequence.tier-7 .departure-aircraft,.departure-sequence.tier-8 .departure-aircraft,.departure-sequence.tier-9 .departure-aircraft,.departure-sequence.tier-10 .departure-aircraft { width:min(450px,40vw); }
.departure-trail { position: absolute; right: 87%; top: 50%; width: 55vw; height: 3px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.7)); filter: blur(1px); }
.departure-sequence.is-launching .departure-aircraft { animation:departure-forward 5s cubic-bezier(.18,.56,.25,1) 2.72s both,departure-climb 3.1s cubic-bezier(.3,.66,.27,1) 4.12s both; }
.departure-sequence.is-launching .departure-aircraft svg { animation:departure-nose 3.1s cubic-bezier(.3,.66,.27,1) 4.12s both; transform-origin:62% 52%; }
.departure-sequence.is-launching .departure-wheels { animation: departure-wheels 5s ease 2.72s both; transform-origin:center; }
.departure-sequence.is-launching .departure-runway { animation:runway-drop 3.1s cubic-bezier(.3,.66,.27,1) 4.12s both; }
.departure-sequence.is-launching .departure-landmark { animation:landmark-drop 3.1s cubic-bezier(.3,.66,.27,1) 4.12s both; }
.promotion-reveal { position:absolute; z-index:12; inset:0; display:grid; place-items:center; overflow:hidden; background:#071824; opacity:0; pointer-events:none; }
.promotion-career-map { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; background:#071824; transform:scale(1.035); }
.promotion-reveal-shade { position:absolute; inset:0; background:linear-gradient(180deg,rgba(2,13,22,.12),rgba(2,13,22,.08) 42%,rgba(2,13,22,.82)); }
.promotion-rank-card { position:absolute; z-index:2; left:50%; top:43%; width:min(260px,34vw); aspect-ratio:2/3; overflow:hidden; border:3px solid #ffe08a; border-radius:22px; background:#071824; box-shadow:0 0 0 7px rgba(255,224,138,.16),0 0 48px rgba(255,200,97,.72),0 18px 46px rgba(0,0,0,.55); opacity:0; transform:translate(-50%,-50%) scale(.72); }
.promotion-rank-card img { display:block; width:100%; height:100%; object-fit:cover; }
.promotion-reveal-copy { position:absolute; left:50%; bottom:6%; display:grid; min-width:min(480px,86vw); justify-items:center; gap:5px; padding:14px 24px; border:1px solid rgba(255,220,121,.65); border-radius:16px; color:#fff; background:rgba(4,24,36,.88); box-shadow:0 12px 40px rgba(0,0,0,.45),0 0 32px rgba(255,200,97,.2); transform:translate(-50%,24px) scale(.94); text-align:center; }
.promotion-reveal-copy span { color:var(--amber); font-size:12px; font-weight:950; letter-spacing:.14em; }
.promotion-reveal-copy strong { font-size:clamp(24px,4vw,42px); line-height:1; }
.promotion-reveal-copy b { color:#dffaff; font-size:clamp(14px,2vw,22px); }
.departure-sequence.is-launching .promotion-reveal { animation:promotion-screen 5s ease 7.15s both; }
.departure-sequence.is-launching .promotion-career-map { animation:promotion-image 5s cubic-bezier(.2,.75,.25,1) 7.15s both; }
.departure-sequence.is-launching .promotion-rank-card { animation:promotion-rank-card 3.55s cubic-bezier(.18,.82,.24,1) 8.45s both; }
.departure-sequence.is-launching .promotion-reveal-copy { animation:promotion-copy 3.15s cubic-bezier(.18,.82,.24,1) 8.75s both; }
.departure-cloud { position: absolute; width: 190px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.18); filter: blur(5px); }
.cloud-a { left: 10%; top: 27%; }
.cloud-b { right: 8%; bottom: 22%; transform: scale(.7); }
.departure-copy { position:absolute; z-index:3; left:50%; top:12%; display:grid; justify-items:center; gap:7px; width:min(700px,86vw); text-align:center; text-shadow:0 4px 18px rgba(0,0,0,.5); transform:translateX(-50%); }
.departure-copy span { color: rgba(255,255,255,.78); font-size: 11px; font-weight: 850; letter-spacing: .16em; }
.departure-copy strong { font-size: clamp(24px, 4vw, 46px); letter-spacing: .08em; }
@keyframes departure-forward { from { left:-16%; } to { left:68%; } }
@keyframes departure-climb { from { top:62%; } to { top:14%; } }
@keyframes departure-nose { from { transform:rotate(0deg); } to { transform:rotate(-12deg); } }
@keyframes runway-drop { from { transform:translateY(0); } to { transform:translateY(24vh) scale(1.12); } }
@keyframes landmark-drop { from { transform:translateY(0); } to { transform:translateY(15vh) scale(1.06); } }
@keyframes departure-wheels { 0%,42% { opacity:1; transform:translateY(0); } 58%,100% { opacity:0; transform:translateY(-12px); } }
@keyframes runway-rush { to { transform:translateX(-170%) skewX(-30deg) rotate(-3deg); } }
@keyframes departure-shadow { 0% { opacity:.65; transform:translate(0,0) scale(1); } 42% { opacity:.55; transform:translate(34vw,0) scale(1.12); } 62% { opacity:.24; transform:translate(50vw,5vh) scale(.72); } 100% { opacity:0; transform:translate(78vw,12vh) scale(.25); } }
@keyframes preflight-cargo-lock { 0%{opacity:0;transform:translateY(-30px) scale(.85)} 70%{transform:translateY(3px) scale(.97)} 100%{opacity:1;transform:none} }
@keyframes preflight-door-left { to{left:-2px} }
@keyframes preflight-door-right { to{right:-2px} }
@keyframes preflight-secured { to{opacity:1;transform:translate(-50%,-50%) scale(1)} }
@keyframes preflight-scene { 0%,78%{opacity:1} 100%{opacity:0;visibility:hidden} }
.flight-transition-curtain { position: fixed; z-index: 70; inset: 0; display: grid; grid-template-columns: auto auto; place-content: center; align-items: baseline; gap: 4px 12px; color: #effcff; background: radial-gradient(circle at 50% 55%, rgba(58,205,236,.23), transparent 26%), #061722; opacity: 1; transform: scale(1.025); transition: opacity .3s ease, transform .32s ease; }
.flight-transition-curtain::before { content: ""; grid-column: 1 / -1; justify-self: center; width: 54px; height: 4px; border-radius: 99px; background: linear-gradient(90deg, transparent, var(--cyan), transparent); box-shadow: 0 0 18px var(--cyan); }
.flight-transition-curtain span { color: var(--cyan); font-size: 12px; font-weight: 900; letter-spacing: .16em; }
.flight-transition-curtain strong { font-size: clamp(28px,5vw,56px); letter-spacing: .12em; }
.flight-transition-curtain i { grid-column: 1 / -1; justify-self: center; color: var(--green); font-size: 24px; font-style: normal; }
.flight-transition-curtain.is-covering { opacity: 1; transform: scale(1); }
.flight-transition-curtain.is-opening { opacity: 0; transform: scale(.985); }

.career-intro { position: fixed; z-index: 80; inset: 0; overflow: hidden; display: grid; place-items: center; color: #f2fbff; background: radial-gradient(circle at 50% 72%, rgba(49,201,229,.28), transparent 34%), linear-gradient(180deg,#061522,#0d3550 64%,#18687a); opacity: 0; transition: opacity .35s ease; }
.career-intro.is-playing { opacity: 1; }
.career-intro.is-leaving { opacity: 0; }
.career-intro-sky { position: absolute; inset: 0; overflow: hidden; opacity: .45; }
.career-intro-sky i { position: absolute; width: 210px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.22); filter: blur(7px); animation: intro-cloud 8s linear infinite; }
.career-intro-sky i:nth-child(1) { left: -10%; top: 18%; }
.career-intro-sky i:nth-child(2) { left: 32%; top: 36%; animation-delay: -3s; }
.career-intro-sky i:nth-child(3) { left: 74%; top: 13%; animation-delay: -6s; }
.career-intro-aircraft { position: absolute; left: 8%; bottom: 13%; color: #dffaff; font-size: clamp(72px,12vw,150px); filter: drop-shadow(0 18px 18px rgba(0,0,0,.35)); transform: rotate(-8deg); animation: intro-aircraft 8s ease-in-out both; }
.career-intro-ranks { position: absolute; left: 8%; right: 8%; bottom: 9%; display: grid; grid-template-columns: repeat(10,1fr); gap: 8px; }
.career-intro-ranks::before { content: ""; position: absolute; left: 2%; right: 2%; top: 50%; height: 2px; background: linear-gradient(90deg,var(--cyan),var(--green),var(--amber)); opacity: .7; }
.career-intro-ranks i { position: relative; justify-self: center; width: 13px; height: 13px; border: 2px solid rgba(255,255,255,.75); border-radius: 50%; background: #092335; box-shadow: 0 0 0 rgba(97,228,255,0); animation: intro-rank .55s ease calc(var(--rank) * .13s + 2.5s) forwards; }
.career-intro-copy { position: absolute; z-index: 2; left: 50%; bottom: 12%; display: grid; justify-items: center; width: min(760px,82vw); padding: 25px 40px; border: 1px solid rgba(174,234,250,.25); border-radius: 24px; background: rgba(3,20,31,.7); box-shadow: 0 26px 70px rgba(0,0,0,.28), inset 0 1px rgba(255,255,255,.06); text-align: center; backdrop-filter: blur(10px); transform: translateX(-50%); }
.career-intro-copy > span { color: var(--cyan); font-size: 11px; font-weight: 950; letter-spacing: .22em; }
.career-intro-copy h2 { max-width: 680px; margin: 14px 0 10px; font-size: clamp(28px,4.4vw,54px); line-height: 1.05; }
.career-intro-copy p { max-width: 620px; margin: 0; color: #c7dae5; font-size: clamp(14px,1.6vw,19px); line-height: 1.65; }
.career-intro-progress { display: flex; gap: 8px; margin-top: 24px; }
.career-intro-progress i { width: 24px; height: 4px; border-radius: 9px; background: rgba(255,255,255,.14); transition: background .3s ease, width .3s ease; }
.career-intro-progress i.active { width: 42px; background: var(--cyan); box-shadow: 0 0 12px rgba(97,228,255,.5); }
.career-intro-start { min-width:180px; min-height:50px; margin-top:20px; padding:0 30px; border:1px solid rgba(255,255,255,.82); border-radius:14px; color:#042434; background:linear-gradient(135deg,#8cf1ff,#56d3eb); box-shadow:0 12px 32px rgba(18,190,222,.35),inset 0 1px rgba(255,255,255,.8); font:inherit; font-size:15px; font-weight:950; letter-spacing:.14em; cursor:pointer; transition:transform .2s ease,filter .2s ease; }
.career-intro-start:hover,.career-intro-start:focus-visible { filter:brightness(1.1); outline:3px solid rgba(255,255,255,.5); outline-offset:3px; transform:translateY(-2px) scale(1.02); }
.career-intro .career-intro-start { display:block; }
.career-intro.is-welcome .career-intro-progress { display:none; }
.avatar-choice { display:grid; justify-items:start; gap:7px; margin-top:11px; }
.avatar-choice > strong { color:#d7edf5; font-size:11px; letter-spacing:.08em; }
.avatar-choice > div { display:flex; gap:8px; }
.avatar-choice button { min-width:92px; height:36px; border:1px solid rgba(255,255,255,.4); border-radius:10px; color:#eafaff; background:rgba(7,40,56,.82); font:inherit; font-size:11px; font-weight:900; cursor:pointer; }
.avatar-choice button[aria-pressed="true"] { color:#05283a; background:#82e8fa; border-color:#fff; box-shadow:0 0 0 3px rgba(130,232,250,.22); }
.career-intro:not(.is-welcome) .avatar-choice { display:none; }
.career-intro-start:disabled { opacity:.42; cursor:not-allowed; filter:grayscale(.45); transform:none; }
.career-intro-visual { position: absolute; z-index: 2; left: 50%; top: 3%; width: min(720px,78vw); height: 300px; transform: translateX(-50%); }
.intro-cartoon { position: absolute; inset: 0; opacity: 0; transform: translateY(18px) scale(.96); transition: opacity .45s ease,transform .55s ease; }
.career-intro[data-scene="1"] .intro-cartoon-ground,.career-intro[data-scene="2"] .intro-cartoon-career,.career-intro[data-scene="3"] .intro-cartoon-instructor { opacity: 1; transform: translateY(0) scale(1); }
.cartoon-plane { position: absolute; left: 18%; top: 20%; width: 66%; height: 92px; border: 4px solid #dff8ff; border-radius: 58% 18% 18% 50%; background: linear-gradient(180deg,#e9fbff,#8fd7ea); box-shadow: 0 20px 25px rgba(0,0,0,.28); animation: cartoon-plane-float 2.3s ease-in-out infinite alternate; }
.cartoon-plane::before { content:""; position:absolute; left:35%; top:54%; width:38%; height:62px; border-radius:50%; background:#65bdd7; transform:skewX(-28deg); }
.cartoon-plane::after { content:""; position:absolute; right:8%; top:-35%; width:12%; height:54px; border-radius:8px 20px 0 0; background:#9ce2f3; transform:skewX(-12deg); }
.cartoon-plane i { position:absolute; left:9%; top:22%; width:24px; height:16px; border-radius:50% 15% 15% 50%; background:#123950; }
.cartoon-plane b { position:relative; display:inline-block; left:36%; top:20%; width:12px; height:12px; margin-right:16px; border-radius:50%; background:#17617c; }
.cartoon-loader,.cartoon-career-person,.cartoon-instructor { position:absolute; width:82px; height:118px; }
.cartoon-loader { left:8%; bottom:4%; animation: cartoon-loader-walk 1.8s ease-in-out infinite alternate; }
.cartoon-loader i,.cartoon-career-person i,.cartoon-instructor i { position:absolute; left:24px; top:0; width:34px; height:34px; border:4px solid #ffe6bd; border-radius:50%; background:#825331; }
.cartoon-loader b,.cartoon-career-person b,.cartoon-instructor b { position:absolute; left:15px; top:35px; width:52px; height:55px; border-radius:16px 16px 8px 8px; background:linear-gradient(90deg,#ffb23f 0 42%,#263f52 42% 58%,#ffb23f 58%); }
.cartoon-loader span,.cartoon-career-person span,.cartoon-instructor span { position:absolute; left:24px; top:87px; width:34px; height:30px; border-left:10px solid #24384a; border-right:10px solid #24384a; }
.cartoon-crates { position:absolute; right:8%; bottom:3%; display:flex; align-items:flex-end; gap:8px; }
.cartoon-crates i { display:grid; place-items:center; width:62px; height:58px; border:3px solid #ffd9a1; border-radius:8px; color:#fff; background:#b96c3b; box-shadow:inset -8px -8px rgba(0,0,0,.18),0 10px 16px rgba(0,0,0,.22); font-style:normal; font-weight:950; animation: cartoon-crate-bounce 1.2s ease-in-out infinite alternate; }
.cartoon-crates i:nth-child(2){height:82px;animation-delay:-.4s}.cartoon-crates i:nth-child(3){width:48px;height:45px;background:#4fa6c7;animation-delay:-.8s}
.cartoon-steps { position:absolute; left:8%; right:8%; bottom:10%; display:grid; grid-template-columns:repeat(10,1fr); align-items:end; gap:4px; }
.cartoon-steps i { display:grid; place-items:center; height:calc(20px + var(--step, 1) * 0px); min-height:26px; border:2px solid rgba(255,255,255,.5); border-radius:6px 6px 0 0; color:#07202d; background:linear-gradient(180deg,#a9f1ff,#3dc4df); font-style:normal;font-weight:950; transform:translateY(calc((10 - var(--n,1)) * 0px)); }
.cartoon-steps i:nth-child(1){height:28px}.cartoon-steps i:nth-child(2){height:40px}.cartoon-steps i:nth-child(3){height:52px}.cartoon-steps i:nth-child(4){height:64px}.cartoon-steps i:nth-child(5){height:76px}.cartoon-steps i:nth-child(6){height:88px}.cartoon-steps i:nth-child(7){height:100px}.cartoon-steps i:nth-child(8){height:112px}.cartoon-steps i:nth-child(9){height:124px}.cartoon-steps i:nth-child(10){height:136px;background:linear-gradient(180deg,#fff0a8,#ffb83d)}
.cartoon-career-person { left:11%; bottom:35px; animation: cartoon-career-climb 2.4s ease-in-out infinite alternate; }
.intro-cartoon-career > strong { position:absolute; right:5%; top:1%; color:#ffe87b; font-size:76px; text-shadow:0 0 28px #ffc93d; animation:cartoon-star 1s ease-in-out infinite alternate; }
.cartoon-instructor { left:11%; bottom:10%; transform:scale(1.2); }
.cartoon-instructor b { background:linear-gradient(90deg,#58ddc0 0 42%,#263f52 42% 58%,#58ddc0 58%); }
.cartoon-mini-deck { position:absolute; right:8%; top:16%; display:grid; grid-template-columns:repeat(4,54px); grid-template-rows:repeat(3,44px); padding:12px; border:5px solid #88e9ff; border-radius:36px 10px 10px 36px; background:#123d53; box-shadow:0 16px 30px rgba(0,0,0,.3); }
.cartoon-mini-deck i { border:1px solid rgba(255,255,255,.55); }
.cartoon-mini-deck b { position:absolute; left:67px; top:56px; display:grid; place-items:center; width:104px; height:82px; border:3px solid #ffe0b0; border-radius:7px; color:#fff; background:#b96c3b; box-shadow:inset -8px -8px rgba(0,0,0,.2); animation:cartoon-crate-place 1.8s ease-in-out infinite; }
.cartoon-point-line { position:absolute; left:24%; top:48%; width:30%; height:5px; border-radius:99px; background:linear-gradient(90deg,var(--green),var(--cyan)); box-shadow:0 0 16px var(--cyan); transform:rotate(-8deg); animation:cartoon-point 1s ease-in-out infinite alternate; }
@keyframes cartoon-plane-float{to{transform:translateY(-8px) rotate(-1deg)}}
@keyframes cartoon-loader-walk{to{transform:translateX(34px)}}
@keyframes cartoon-crate-bounce{to{transform:translateY(-9px)}}
@keyframes cartoon-career-climb{to{transform:translate(410px,-105px) scale(.82)}}
@keyframes cartoon-star{to{transform:scale(1.18) rotate(6deg)}}
@keyframes cartoon-crate-place{0%{transform:translate(105px,-48px) scale(.7);opacity:.3}55%,100%{transform:translate(0,0);opacity:1}}
@keyframes cartoon-point{to{filter:brightness(1.45);transform:rotate(-8deg) scaleX(1.12)}}
.career-intro-skip, .tutorial-demo-skip { position: absolute; z-index: 4; right: 24px; top: 22px; min-width: 82px; height: 38px; border: 1px solid rgba(255,255,255,.35); border-radius: 10px; color: #fff; background: rgba(3,20,31,.66); font: inherit; font-size: 11px; font-weight: 900; cursor: pointer; }
.tutorial-demo-layer { position: fixed; z-index: 78; inset: 0; overflow: hidden; background: rgba(1,10,16,.24); opacity: 0; transition: opacity .25s ease; pointer-events: auto; }
.tutorial-demo-layer.is-playing { opacity: 1; }
.tutorial-demo-layer.is-leaving { opacity: 0; }
.tutorial-demo-pointer { position: fixed; z-index: 3; width: 48px; height: 48px; border: 3px solid #fff; border-radius: 50%; color: #071a24; background: var(--cyan); box-shadow: 0 0 0 8px rgba(97,228,255,.18), 0 10px 24px rgba(0,0,0,.34); transform: translate(-50%,-50%); transition: left 1.35s cubic-bezier(.2,.72,.24,1), top 1.35s cubic-bezier(.2,.72,.24,1), background .2s ease; }
.tutorial-demo-pointer i { position: absolute; left: 13px; top: 7px; font-size: 25px; font-style: normal; }
.tutorial-demo-pointer::after { content: ""; position: absolute; inset: -12px; border: 3px solid rgba(255,255,255,.62); border-radius: 50%; animation: demo-click 1s ease-out infinite; }
.tutorial-demo-pointer.is-dragging { background: var(--green); box-shadow: 0 0 0 10px rgba(94,232,154,.2), 0 10px 24px rgba(0,0,0,.34); }
.tutorial-demo-ghost { position: fixed; z-index: 2; display: grid; place-items: center; border: 2px solid rgba(255,255,255,.9); border-radius: 9px; color: #fff; background: linear-gradient(135deg,rgba(255,255,255,.3),transparent 25%),var(--demo-cargo-color,#b96c3b); box-shadow: inset -7px -8px rgba(0,0,0,.18),0 10px 24px rgba(0,0,0,.35); font-size: 14px; font-weight: 950; opacity: 0; transition: left 1.35s cubic-bezier(.2,.72,.24,1),top 1.35s cubic-bezier(.2,.72,.24,1),width 1.35s ease,height 1.35s ease,opacity .2s ease; }
.tutorial-demo-ghost.is-moving { opacity: .94; box-shadow: inset -7px -8px rgba(0,0,0,.18),0 0 0 7px rgba(94,232,154,.2),0 14px 30px rgba(0,0,0,.4); }
.tutorial-demo-ghost.is-resetting { transition:none !important; }
.tutorial-demo-ghost.is-picked { animation:demo-cargo-picked 1.15s ease-out both; }
.tutorial-demo-placed { opacity:.82; transition:none; box-shadow:inset -7px -8px rgba(0,0,0,.18),0 0 0 2px rgba(94,232,154,.72),0 10px 22px rgba(0,0,0,.35); }
.tutorial-demo-caption { position: absolute; z-index: 2; left: 50%; bottom: 48px; display: grid; width: min(620px,78vw); gap: 5px; overflow:hidden; padding: 14px 18px; border: 1px solid rgba(97,228,255,.7); border-radius: 14px; color: #f4fcff; background: rgba(3,20,31,.92); box-shadow: 0 0 0 1px rgba(97,228,255,.18),0 0 28px rgba(97,228,255,.22),0 14px 40px rgba(0,0,0,.38); text-align: center; transform: translateX(-50%); }
.tutorial-demo-caption::before { content:""; position:absolute; z-index:0; top:-40%; bottom:-40%; left:-32%; width:24%; pointer-events:none; background:linear-gradient(90deg,transparent,rgba(168,247,255,.34),transparent); transform:skewX(-18deg); opacity:0; }
.tutorial-demo-caption.is-emphasis { animation:tutorial-caption-glow 1.45s ease-out both; }
.tutorial-demo-caption.is-emphasis::before { animation:tutorial-caption-scan 1.35s ease-out both; }
.tutorial-demo-caption strong,.tutorial-demo-caption span { position:relative; z-index:1; }
.tutorial-demo-caption strong { color:#91f3ff; font-size: 16px; text-shadow:0 0 12px rgba(97,228,255,.75); }
.tutorial-demo-caption span { color: #c6dce7; font-size: 12px; }
.demo-focus { position: relative; z-index: 77 !important; outline: 4px solid #fff !important; outline-offset: 5px !important; box-shadow: 0 0 0 10px rgba(97,228,255,.24),0 0 34px rgba(97,228,255,.72) !important; animation: demo-focus 1s ease-in-out infinite alternate !important; }
.hold-grid .grid-cell.demo-focus { outline:3px solid #c8fff0 !important; outline-offset:-3px !important; background:rgba(94,232,154,.3) !important; box-shadow:inset 0 0 18px rgba(94,232,154,.42),0 0 20px rgba(94,232,154,.58) !important; }
@keyframes intro-cloud { to { transform: translateX(120vw); } }
@keyframes intro-aircraft { 0% { transform: translate(-20vw,8vh) rotate(-2deg) scale(.55); } 38% { transform: translate(22vw,2vh) rotate(-5deg) scale(.82); } 100% { transform: translate(100vw,-35vh) rotate(-12deg) scale(.62); } }
@keyframes intro-rank { to { background: var(--green); border-color: #eafff1; box-shadow: 0 0 16px rgba(94,232,154,.9); transform: scale(1.16); } }
@keyframes promotion-screen { 0% { opacity:0; } 12%,88% { opacity:1; } 100% { opacity:0; } }
@keyframes promotion-image { 0% { transform:scale(1.035); filter:brightness(.7); opacity:1; } 25% { transform:scale(1); filter:brightness(1); opacity:1; } 42%,100% { transform:scale(1); filter:brightness(.35); opacity:.32; } }
@keyframes promotion-rank-card { 0% { opacity:0; transform:translate(-50%,-50%) scale(.72); } 18%,82% { opacity:1; transform:translate(-50%,-50%) scale(1); } 100% { opacity:0; transform:translate(-50%,-53%) scale(1.02); } }
@keyframes promotion-copy { 0% { opacity:0; transform:translate(-50%,24px) scale(.94); } 22%,86% { opacity:1; transform:translate(-50%,0) scale(1); } 100% { opacity:0; transform:translate(-50%,-8px) scale(1); } }
@keyframes demo-click { 0% { opacity: .8; transform: scale(.55); } 100% { opacity: 0; transform: scale(1.3); } }
@keyframes demo-focus { to { filter: brightness(1.28); } }
@keyframes tutorial-caption-glow { 0%{border-color:rgba(255,255,255,.95);box-shadow:0 0 0 5px rgba(97,228,255,.34),0 0 46px rgba(97,228,255,.62),0 14px 40px rgba(0,0,0,.38)} 100%{border-color:rgba(97,228,255,.7);box-shadow:0 0 0 1px rgba(97,228,255,.18),0 0 28px rgba(97,228,255,.22),0 14px 40px rgba(0,0,0,.38)} }
@keyframes tutorial-caption-scan { 0%{left:-32%;opacity:0} 12%{opacity:1} 78%{opacity:.75} 100%{left:112%;opacity:0} }
@keyframes demo-cargo-picked { 0%{filter:brightness(1);box-shadow:inset -7px -8px rgba(0,0,0,.18),0 0 0 0 rgba(255,255,255,0),0 10px 24px rgba(0,0,0,.35)} 38%{filter:brightness(1.32);box-shadow:inset -7px -8px rgba(0,0,0,.12),0 0 0 9px rgba(255,255,255,.32),0 0 34px var(--demo-cargo-color,#b96c3b)} 100%{filter:brightness(1);box-shadow:inset -7px -8px rgba(0,0,0,.18),0 0 0 2px rgba(255,255,255,.18),0 10px 24px rgba(0,0,0,.35)} }

@media (max-height: 610px) {
  .career-intro-copy { bottom: 7%; width: min(700px,82vw); padding: 11px 22px; }
  .career-intro-copy h2 { margin: 8px 0 6px; font-size: clamp(22px,3.6vw,34px); }
  .career-intro-copy p { font-size: 12px; line-height: 1.45; }
  .career-intro-progress { margin-top: 12px; }
  .career-intro-visual { top: 0; height: 180px; transform:translateX(-50%) scale(.72); transform-origin:top center; }
  .career-intro-aircraft { display:none; }
  .career-intro-ranks { bottom: 4%; }
  .career-intro-skip, .tutorial-demo-skip { right: 10px; top: 9px; height: 32px; }
  .tutorial-demo-caption { bottom: 10px; padding: 9px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .departure-sequence.is-launching .departure-aircraft { animation-duration: .01ms; }
  .modal.clear-modal::before, .modal.clear-modal::after, .modal.clear-modal .modal-icon { animation: none; }
}
.modal-stats { display: flex; justify-content: center; gap: 10px; margin: 10px 0 18px; }
.modal-stat { min-width: 105px; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: rgba(3,16,25,.35); }
.modal-stat small { display: block; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.modal-stat strong { display: block; margin-top: 3px; }
.modal-actions { display: flex; gap: 10px; }
.modal-actions .secondary-button, .modal-actions .primary-button { flex: 1; margin: 0; }
.modal-actions.reward-choice .secondary-button,
.modal-actions.reward-choice .primary-button { border: 1px solid rgba(97,228,255,.48); color: var(--ink); background: #12364a; box-shadow: none; font-size: 11px; }
.modal-actions.reward-choice .secondary-button:hover:not(:disabled),
.modal-actions.reward-choice .primary-button:hover:not(:disabled) { border-color: var(--cyan); background: #18465e; filter: none; }

.toast { position: fixed; z-index: 80; left: 50%; bottom: 54px; max-width: min(440px, 90vw); padding: 10px 16px; border: 1px solid rgba(255,255,255,.14); border-radius: 99px; color: white; background: rgba(2,14,22,.9); box-shadow: 0 12px 35px rgba(0,0,0,.35); font-size: 12px; opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: .22s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.tutorial-coach { position: absolute; z-index: 12; left: 50%; top: 64px; display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 9px; width: min(540px, calc(100% - 34px)); padding: 10px 12px; border: 1px solid rgba(203,255,222,.72); border-radius: 13px; color: #effff5; background: rgba(8,39,31,.94); box-shadow: 0 12px 34px rgba(0,0,0,.38), 0 0 22px rgba(94,232,154,.18); transform: translateX(-50%); }
.hold-panel { position: relative; }
.tutorial-step-badge { padding: 4px 6px; border-radius: 6px; color: #082417; background: var(--green); font-size: 9px; font-weight: 950; }
.tutorial-coach-icon { font-size: 20px; }
.tutorial-coach > div { display: grid; gap: 2px; }
.tutorial-coach strong { font-size: 12px; }
.tutorial-coach span:last-child { color: #bfe4ce; font-size: 10px; line-height: 1.3; }
.tutorial-skip { min-height: 30px; padding: 0 10px; border: 1px solid rgba(203,255,222,.4); border-radius: 8px; color: #effff5; background: rgba(255,255,255,.08); font: inherit; font-size: 10px; font-weight: 850; cursor: pointer; }
.tutorial-skip:hover, .tutorial-skip:focus-visible { color: #082417; background: var(--green); outline: none; }
.tutorial-pulse { animation: soft-focus .85s ease-in-out infinite alternate; }
@keyframes target-cell { to { filter: brightness(1.35); transform: scale(.95); } }
@keyframes door-beacon { to { background: #ffd75e; box-shadow: 0 0 18px #ffd75e; } }
@keyframes target-cargo { to { filter: brightness(1.16); transform: translateY(-4px) scale(1.02); } }
@keyframes cargo-land { 0% { filter: brightness(1.8); opacity: .2; transform: translateY(-34px) scale(1.16) rotate(-2deg); } 68% { transform: translateY(1px) scale(.96); } 100% { opacity: 1; transform: translateY(-5px) scale(1); } }
@keyframes soft-focus { to { border-color: rgba(215,255,230,.95); box-shadow: 0 0 0 3px rgba(94,232,154,.14), 0 0 25px rgba(94,232,154,.24); } }

/* Player-controlled readability scale. Dense badges stay fixed so the deck remains playable. */
.panel-heading h2, .hold-header h2 { font-size: clamp(calc(16px * var(--font-scale)), 1.5vw, calc(22px * var(--font-scale))); }
.eyebrow, .aircraft-card small, .load-counter, .gauge-label { font-size: calc(10px * var(--font-scale)); }
.aircraft-card strong { font-size: calc(13px * var(--font-scale)); }
.balance-card h3, .rules-card h3 { font-size: calc(12px * var(--font-scale)); }
.rules-card li, .problem-strip, .secondary-button { font-size: calc(11px * var(--font-scale)); }
.footerbar, .flight-label, .toast { font-size: calc(12px * var(--font-scale)); }
.load-counter strong { font-size: calc(14px * var(--font-scale)); }
.modal p { font-size: calc(14px * var(--font-scale)); }

@media (max-width: 1050px) {
  .game-layout { grid-template-columns: 190px minmax(410px, 1fr) 210px; gap: 8px; padding: 8px; }
  .mission-panel, .queue-panel, .hold-panel { padding: 12px; }
  .aircraft-card { gap: 7px; padding: 10px; }
  .aircraft-illustration { height: 40px; }
  .rules-card li { font-size: 10px; }
  .cargo-queue { --queue-cell: 41px; }
  .footerbar { padding-inline: 12px; }
}

@media (max-height: 610px) {
  .app { grid-template-rows: 56px minmax(0, 1fr) 30px; }
  .game-layout { padding: 7px; }
  .mission-panel, .queue-panel, .hold-panel { padding: 10px; }
  .panel-heading { margin-bottom: 8px; }
  .aircraft-illustration { height: 34px; }
  .aircraft-card { padding-block: 7px; }
  .operation-card { min-height: 55px; margin-bottom: 7px; padding: 5px 7px; }
  .career-track { padding-top: 3px; }
  .operation-icon { width: 26px; height: 26px; font-size: 13px; }
  .operation-card strong { font-size: 8px; }
  .balance-card, .rules-card { margin-top: 8px; padding: 9px; }
  .rules-card { min-height: 70px; }
  .cargo-queue { --queue-cell: 34px; }
  .cargo-queue { overflow: hidden; }
  .tutorial-coach { top: 47px; padding: 7px 9px; }
  .control-grid { margin-top: 7px; }
  .secondary-button, .primary-button { min-height: 34px; }
  .plane-deck { padding-block: 12px 24px; }
  .problem-strip { min-height: 31px; margin-top: 6px; }
}

@media (max-width: 850px) {
  .brand-copy, .flight-label, .footerbar > span { display: none; }
  .flight-strip { gap: 7px; }
  .language-control select { min-width: 94px; }
  .font-size-control select { width: 72px; }
  .cargo-queue { --queue-cell: 38px; }
  .game-layout { grid-template-columns: 168px minmax(360px, 1fr) 190px; }
  .mission-panel, .queue-panel, .hold-panel { padding-inline: 9px; }
  .career-track { grid-template-columns: minmax(0, 1fr); grid-template-areas: "rank" "title" "progress" "meter"; }
  .career-track .career-rank { justify-self: start; }
  .career-track > span:nth-child(3) { overflow: visible; text-align: left; text-overflow: clip; white-space: normal; }
  .plane-deck { padding-inline: 38px; }
  .tutorial-coach { width: calc(100% - 18px); }
}

/* Cinematic first-run story panels. These replace the original shape-only mockups. */
.career-intro-visual { left:50%; top:50%; width:min(100vw,calc(100vh * 16 / 9)); height:min(100vh,calc(100vw * 9 / 16)); transform:translate(-50%,-50%); }
.intro-cinematic { position:absolute; inset:0; margin:0; opacity:0; overflow:hidden; transition:opacity .65s ease; }
.intro-cinematic::after { content:""; position:absolute; inset:0; background:linear-gradient(180deg,rgba(3,15,25,.03) 0 42%,rgba(3,15,25,.42) 66%,rgba(3,15,25,.84) 100%); }
.intro-cinematic img { width:100%; height:100%; object-fit:fill; transform:scale(1.015); animation:cinematic-pan 8s ease-in-out both; }
.career-intro[data-scene="1"] .cinematic-arrival,.career-intro[data-scene="2"] .cinematic-career,.career-intro[data-scene="3"] .cinematic-training { opacity:1; }
.career-intro[data-scene="1"] .cinematic-arrival img { transform-origin:62% 45%; }
.career-intro[data-scene="2"] .cinematic-career img { transform-origin:54% 44%; }
.career-intro[data-scene="3"] .cinematic-training img { transform-origin:66% 50%; }
.career-intro[data-scene="2"] .cinematic-career img { transform:none; animation:none; }
.career-intro-ranks { display:none; }
.career-intro-copy { left:4%; bottom:4%; width:min(510px,44vw); padding:17px 22px; justify-items:start; text-align:left; transform:none; }
.career-intro-copy h2 { margin:8px 0 6px; font-size:clamp(22px,3.15vw,38px); line-height:1.08; }
.career-intro-copy p { font-size:clamp(12px,1.25vw,16px); line-height:1.48; }
.career-intro-copy .career-intro-progress { justify-self:center; margin-top:13px; }
.career-intro-copy .career-intro-start { justify-self:center; min-height:44px; margin-top:13px; }
.career-intro[data-scene="2"] .career-intro-copy,.career-intro[data-scene="3"] .career-intro-copy { left:auto; right:4%; }
@keyframes cinematic-pan { from{transform:scale(1.015)} to{transform:scale(1.045) translate3d(-.4%,-.25%,0)} }

@media (max-height:610px) {
  .career-intro-visual { left:50%; top:50%; width:min(100vw,calc(100vh * 16 / 9)); height:min(100vh,calc(100vw * 9 / 16)); transform:translate(-50%,-50%); }
  .career-intro-copy { bottom:3%; width:min(430px,48vw); padding:10px 15px; }
  .career-intro-copy h2 { margin:5px 0 3px; font-size:clamp(18px,3vw,27px); }
  .career-intro-copy p { font-size:11px; line-height:1.35; }
  .career-intro-copy .career-intro-start { min-width:145px; min-height:36px; margin-top:7px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* V11 visual direction: premium aviation operations console. */
:root {
  --ink: #f3f8fb;
  --muted: #9eb4c0;
  --deep: #030b12;
  --panel: rgba(10, 24, 34, .96);
  --panel-2: #102735;
  --line: rgba(157, 205, 220, .2);
  --cyan: #72e6f5;
  --cyan-2: #29b7cf;
  --green: #73e3a4;
  --amber: #f6c869;
  --radius: 15px;
}

html, body {
  background: #02080d;
}

body::before {
  background:
    radial-gradient(ellipse at 50% -16%, rgba(60, 174, 195, .22), transparent 48%),
    radial-gradient(ellipse at 85% 90%, rgba(24, 89, 108, .12), transparent 36%),
    linear-gradient(115deg, rgba(255,255,255,.025), transparent 28% 72%, rgba(255,255,255,.018)),
    repeating-linear-gradient(0deg, rgba(120,170,185,.022) 0 1px, transparent 1px 4px);
  background-size: auto, auto, auto, 100% 4px;
}

.topbar, .footerbar {
  background: linear-gradient(180deg, rgba(9, 24, 33, .98), rgba(4, 14, 22, .96));
  box-shadow: 0 10px 30px rgba(0,0,0,.22), inset 0 1px rgba(255,255,255,.035);
}

.brand-mark {
  border: 1px solid rgba(183, 245, 250, .7);
  border-radius: 9px;
  background: linear-gradient(145deg, #b4f4f8 0%, #57d8e7 46%, #1c98b0 100%);
  box-shadow: inset 0 1px rgba(255,255,255,.72), inset 0 -5px 12px rgba(0,55,72,.25), 0 7px 18px rgba(0,0,0,.3);
}

.brand-copy strong { color: #f7fbfd; text-shadow: 0 2px 10px rgba(0,0,0,.4); }

.flight-strip {
  border-color: rgba(131, 205, 220, .22);
  background: linear-gradient(180deg, rgba(19, 45, 58, .9), rgba(8, 27, 38, .9));
  box-shadow: inset 0 1px rgba(255,255,255,.06), 0 8px 20px rgba(0,0,0,.22);
}

.language-control select, .font-size-control select, .icon-button {
  border-color: rgba(155, 207, 220, .22);
  background: linear-gradient(180deg, #183444, #0b202d);
  box-shadow: inset 0 1px rgba(255,255,255,.05), 0 5px 12px rgba(0,0,0,.18);
}

.language-control select option, .font-size-control select option {
  color: #102631;
  background: #f4f8fa;
}

.game-layout { gap: 14px; padding: 14px; }

.panel {
  position: relative;
  border-color: rgba(153, 203, 216, .22);
  border-radius: var(--radius);
  background:
    linear-gradient(155deg, rgba(18, 42, 54, .98), rgba(6, 20, 29, .99) 58%),
    var(--panel);
  box-shadow:
    0 18px 44px rgba(0,0,0,.34),
    inset 0 1px rgba(255,255,255,.055),
    inset 0 0 0 1px rgba(0,0,0,.28);
}

.panel::before {
  content: "";
  position: absolute;
  z-index: 8;
  inset: 0 18px auto;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(114,230,245,.58), transparent);
  opacity: .72;
}

.eyebrow { color: #79d8e7; letter-spacing: .17em; }
.panel-heading h2, .hold-header h2 { letter-spacing: -.025em; text-shadow: 0 2px 14px rgba(0,0,0,.45); }

.operation-card, .aircraft-card, .balance-card, .rules-card {
  border-color: rgba(152, 204, 217, .19);
  background:
    linear-gradient(145deg, rgba(255,255,255,.035), transparent 42%),
    linear-gradient(180deg, rgba(11, 31, 42, .92), rgba(5, 18, 27, .92));
  box-shadow: inset 0 1px rgba(255,255,255,.045), 0 8px 20px rgba(0,0,0,.15);
}

.operation-card { border-left: 3px solid color-mix(in srgb, var(--cyan) 72%, transparent); }
.operation-icon { background: linear-gradient(155deg, rgba(30,82,98,.82), rgba(4,20,28,.88)); box-shadow: inset 0 1px rgba(255,255,255,.12); }
.aircraft-illustration { filter: drop-shadow(0 12px 8px rgba(0,0,0,.28)); }

.plane-deck {
  border-color: color-mix(in srgb, var(--deck-accent) 48%, rgba(255,255,255,.08));
  background:
    linear-gradient(180deg, rgba(255,255,255,.075), transparent 18%, rgba(0,0,0,.26) 82%),
    radial-gradient(ellipse at 48% 37%, color-mix(in srgb, var(--deck-accent) 12%, transparent), transparent 56%),
    repeating-linear-gradient(90deg, transparent 0 72px, rgba(255,255,255,.018) 73px 74px),
    linear-gradient(110deg, var(--deck-surface-a), var(--deck-surface-b));
  box-shadow:
    inset 0 2px rgba(255,255,255,.1),
    inset 0 -28px 50px rgba(0,0,0,.35),
    inset 0 0 80px rgba(0,0,0,.18),
    0 16px 32px rgba(0,0,0,.2);
}

.plane-deck::before { border-style: solid; border-color: color-mix(in srgb, var(--deck-accent) 23%, transparent); box-shadow: inset 0 0 24px rgba(0,0,0,.15); }
.plane-deck::after { opacity: .52; }

.hold-grid {
  outline: 1px solid rgba(190, 230, 238, .42);
  outline-offset: 0;
  box-shadow: 0 14px 30px rgba(0,0,0,.2), inset 0 0 20px rgba(0,0,0,.16);
}

.grid-cell {
  border-right-color: rgba(152, 207, 220, .27);
  border-bottom-color: rgba(152, 207, 220, .27);
  background: linear-gradient(145deg, rgba(46, 94, 111, .25), rgba(8, 34, 46, .32));
  box-shadow: inset 0 1px rgba(255,255,255,.02);
}

.grid-cell:nth-child(odd) { background: linear-gradient(145deg, rgba(51, 100, 116, .28), rgba(9, 37, 49, .34)); }

.deck-door {
  border-color: #f4c65f;
  background: repeating-linear-gradient(135deg, rgba(250,192,62,.44) 0 9px, rgba(13,20,24,.88) 9px 18px);
  box-shadow: 0 0 0 2px rgba(255,215,117,.12), 0 12px 26px rgba(0,0,0,.34), inset 0 1px rgba(255,255,255,.22);
}

.cargo-queue {
  margin: 4px -2px 0;
  padding: 10px;
  border: 1px solid rgba(145, 197, 210, .12);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(2, 13, 20, .32), rgba(8, 27, 36, .18));
  box-shadow: inset 0 10px 25px rgba(0,0,0,.12);
}

.cargo-piece {
  border-color: rgba(255,255,255,.52);
  border-radius: 7px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.25), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.32)),
    var(--cargo-color, #30769b);
  box-shadow:
    inset 2px 2px rgba(255,255,255,.14),
    inset -7px -9px rgba(0,0,0,.18),
    0 7px 0 color-mix(in srgb, var(--cargo-color, #30769b) 52%, #02090d),
    0 13px 20px rgba(0,0,0,.4);
}

.cargo-piece::before { inset: 6px; border-width: 2px; border-color: rgba(255,255,255,.16); border-radius: 4px; }
.cargo-piece::after { bottom: -8px; height: 7px; }
.cargo-piece .cargo-id { border: 1px solid rgba(255,255,255,.18); background: rgba(1,8,12,.58); text-shadow: 0 2px 4px rgba(0,0,0,.6); }
.cargo-piece .cargo-weight { background: rgba(1,8,12,.56); }

.problem-strip {
  border-color: rgba(127, 198, 212, .18);
  background: linear-gradient(180deg, rgba(3, 16, 24, .72), rgba(8, 25, 34, .64));
  box-shadow: inset 0 1px rgba(255,255,255,.025);
}

.secondary-button, .primary-button {
  border-radius: 9px;
  letter-spacing: .01em;
  box-shadow: inset 0 1px rgba(255,255,255,.07), 0 7px 16px rgba(0,0,0,.18);
}

.secondary-button { border-color: rgba(147, 202, 215, .2); background: linear-gradient(180deg, #173747, #0b2431); }
.secondary-button:disabled, .primary-button:disabled { filter: saturate(.45); opacity: .42; }
.primary-button { color: #04202a; background: linear-gradient(135deg, #b4f2f5 0%, #59d7e5 48%, #2bb0c8 100%); box-shadow: inset 0 1px rgba(255,255,255,.65), inset 0 -5px 10px rgba(0,91,111,.12), 0 10px 22px rgba(0,0,0,.22); }

.tutorial-coach {
  border-color: rgba(182, 248, 205, .75);
  background: linear-gradient(145deg, rgba(14, 58, 45, .97), rgba(5, 31, 27, .97));
  box-shadow: inset 0 1px rgba(255,255,255,.09), 0 16px 32px rgba(0,0,0,.42), 0 0 28px rgba(94,232,154,.14);
}

.footerbar { color: #8fa8b5; }
.legend-icon { box-shadow: inset 0 1px rgba(255,255,255,.6), 0 3px 8px rgba(0,0,0,.3); }

@media (max-width: 1050px) {
  .game-layout { gap: 9px; padding: 9px; }
}

@media (max-height: 610px) {
  .game-layout { gap: 8px; padding: 7px; }
  .cargo-queue { padding: 6px; }
}

/* Stronger hierarchy and tactile detail. */
:root { font-family: "Bahnschrift", "Segoe UI Variable", "Segoe UI", sans-serif; }

.brand-copy strong, .flight-strip strong, .panel-heading h2, .hold-header h2,
.queue-heading h2, .balance-card h3, .rules-card h3 {
  font-family: "Bahnschrift SemiBold", "Segoe UI Variable Display", "Segoe UI", sans-serif;
}

.mission-panel, .queue-panel { background: linear-gradient(165deg, rgba(17,39,50,.98), rgba(5,18,27,.995) 70%); }
.hold-panel { border-color: rgba(116, 222, 237, .34); background: linear-gradient(155deg, rgba(15,43,55,.99), rgba(4,18,27,.995) 64%); }
.hold-panel::before { height: 3px; background: linear-gradient(90deg, transparent 3%, rgba(114,230,245,.9) 28% 72%, transparent 97%); }

.panel-heading, .hold-header { position: relative; padding-bottom: 10px; }
.panel-heading::after, .hold-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(120,194,208,.3), transparent 86%);
}

.hold-header { margin-bottom: 10px; }
.hold-header h2 { font-size: clamp(19px, 1.7vw, 25px); }
.load-counter strong { color: #dff9fb; font-size: 16px; }

.plane-deck {
  padding-top: 26px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.09), transparent 16%, rgba(0,0,0,.27) 84%),
    radial-gradient(ellipse at 48% 38%, color-mix(in srgb, var(--deck-accent) 17%, transparent), transparent 58%),
    repeating-linear-gradient(90deg, transparent 0 72px, rgba(184,229,236,.035) 73px 74px),
    linear-gradient(110deg, color-mix(in srgb, var(--deck-surface-a) 90%, #28677b), var(--deck-surface-b));
}

.hold-grid::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -12px;
  pointer-events: none;
  border: 1px solid rgba(150, 214, 225, .2);
  border-radius: 5px;
  box-shadow: inset 0 0 18px rgba(0,0,0,.25), 0 0 0 5px rgba(2,15,22,.18);
}

.grid-cell { transition: background .13s ease, box-shadow .13s ease, filter .13s ease; }
.grid-cell:hover:not(.blocked-cell) { background: rgba(83, 164, 182, .26); box-shadow: inset 0 0 0 1px rgba(161,235,243,.34), inset 0 0 18px rgba(80,200,219,.12); }

.cargo-piece {
  background:
    linear-gradient(90deg, transparent 0 12%, rgba(255,255,255,.13) 12% 15%, transparent 15% 85%, rgba(0,0,0,.14) 85% 88%, transparent 88%),
    linear-gradient(145deg, rgba(255,255,255,.27), transparent 27%),
    linear-gradient(180deg, rgba(255,255,255,.07), rgba(0,0,0,.34)),
    var(--cargo-color, #30769b);
}

.cargo-visual::before { inset: 7px; border-color: rgba(255,255,255,.2); box-shadow: inset 0 0 0 3px rgba(0,0,0,.11), 0 0 0 1px rgba(0,0,0,.16); }
.cargo-corner { width: 13px; height: 13px; border-color: rgba(255,255,255,.5); }
.cargo-piece:hover { filter: brightness(1.08) saturate(1.05); }

.queue-heading .move-chip, .level-chip { border: 1px solid rgba(67, 196, 218, .16); box-shadow: inset 0 1px rgba(255,255,255,.04); }
.control-grid { padding-top: 10px; border-top: 1px solid rgba(143,197,210,.12); }

.balance-gauge { height: 10px; box-shadow: inset 0 2px 4px rgba(0,0,0,.32), 0 1px rgba(255,255,255,.04); }
.status-pill { border: 1px solid rgba(255,255,255,.06); }

.problem-icon { box-shadow: inset 0 1px rgba(255,255,255,.55), 0 4px 10px rgba(0,0,0,.28); }
.tutorial-step-badge { box-shadow: inset 0 1px rgba(255,255,255,.55), 0 4px 12px rgba(0,0,0,.3); }

@media (max-height: 610px) {
  .panel-heading, .hold-header { padding-bottom: 6px; }
  .plane-deck { padding-top: 14px; }
  .control-grid { padding-top: 6px; }
}

@media (max-width: 850px) and (max-height: 610px) {
  .cargo-queue { --queue-cell: 32px; overflow-y: auto; }
}

/* Keep native select popups readable and visually consistent with the dark cockpit UI. */
.language-control select,
.font-size-control select {
  color-scheme: dark;
}

.language-control select option,
.font-size-control select option {
  color: #eaf7ff !important;
  background-color: #102735 !important;
}

/* Placement feedback must stay visible above alternating cells and hover states. */
.hold-grid .grid-cell.drop-preview,
.hold-grid .grid-cell.drop-preview:hover:not(.blocked-cell) {
  background: rgba(94, 232, 154, .34);
  box-shadow: inset 0 0 0 2px rgba(185, 255, 214, .78), inset 0 0 18px rgba(94, 232, 154, .24);
}

.hold-grid .grid-cell.drop-invalid,
.hold-grid .grid-cell.drop-invalid:hover {
  background: rgba(255, 107, 115, .32);
  box-shadow: inset 0 0 0 2px rgba(255, 183, 188, .72), inset 0 0 18px rgba(255, 107, 115, .2);
}

/* V17 cinematic gameplay pass: carry the illustrated airport world into play. */
body {
  --operation-accent: #72e6f5;
  --operation-accent-soft: rgba(72, 199, 219, .16);
  --operation-warm: rgba(246, 177, 91, .12);
}

body[data-operation="cold"] { --operation-accent: #92eaff; --operation-accent-soft: rgba(85, 208, 246, .2); --operation-warm: rgba(102, 167, 255, .1); }
body[data-operation="express"] { --operation-accent: #ffd071; --operation-accent-soft: rgba(255, 191, 74, .18); --operation-warm: rgba(255, 132, 58, .16); }
body[data-operation="fragile"] { --operation-accent: #ff9bc6; --operation-accent-soft: rgba(255, 113, 178, .16); --operation-warm: rgba(201, 102, 255, .1); }
body[data-operation="hazmat"] { --operation-accent: #ff9d61; --operation-accent-soft: rgba(255, 119, 56, .19); --operation-warm: rgba(255, 198, 67, .13); }
body[data-operation="restricted"] { --operation-accent: #b9a1ff; --operation-accent-soft: rgba(145, 111, 255, .19); --operation-warm: rgba(255, 90, 170, .09); }
body[data-operation="heavy"] { --operation-accent: #c7e3ec; --operation-accent-soft: rgba(170, 208, 220, .17); --operation-warm: rgba(255, 183, 95, .1); }

body::before {
  background:
    radial-gradient(ellipse at 52% -10%, var(--operation-accent-soft), transparent 43%),
    radial-gradient(ellipse at 8% 112%, var(--operation-warm), transparent 39%),
    radial-gradient(ellipse at 94% 105%, rgba(18, 96, 119, .14), transparent 37%),
    repeating-linear-gradient(0deg, rgba(161, 210, 221, .018) 0 1px, transparent 1px 4px);
}

.topbar {
  border-bottom-color: color-mix(in srgb, var(--operation-accent) 22%, transparent);
  box-shadow: 0 12px 34px rgba(0,0,0,.32), inset 0 -1px rgba(255,255,255,.025);
}

.game-layout { position: relative; }
.game-layout::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(110deg, rgba(246,177,91,.035), transparent 24% 72%, rgba(91,211,231,.035)),
    repeating-linear-gradient(90deg, transparent 0 8.25%, rgba(148,205,216,.018) 8.3% 8.4%);
}

.mission-panel,
.queue-panel {
  transition: filter .24s ease, opacity .24s ease, transform .24s ease, border-color .24s ease;
}

.hold-panel {
  isolation: isolate;
  border-color: color-mix(in srgb, var(--operation-accent) 48%, rgba(255,255,255,.08));
  background:
    radial-gradient(ellipse at 12% 0, var(--operation-warm), transparent 34%),
    radial-gradient(ellipse at 88% 0, var(--operation-accent-soft), transparent 38%),
    linear-gradient(160deg, rgba(15,42,53,.995), rgba(3,15,23,.998) 67%);
  box-shadow:
    0 22px 60px rgba(0,0,0,.42),
    0 0 0 1px rgba(0,0,0,.42),
    inset 0 1px rgba(255,255,255,.07),
    inset 0 0 46px color-mix(in srgb, var(--operation-accent) 5%, transparent);
  transition: border-color .25s ease, box-shadow .25s ease, filter .25s ease;
}

.hold-panel::before {
  background: linear-gradient(90deg, transparent 2%, var(--operation-accent) 27% 73%, transparent 98%);
  box-shadow: 0 0 18px color-mix(in srgb, var(--operation-accent) 42%, transparent);
}

body.cargo-focus .mission-panel { opacity: .74; filter: saturate(.72) brightness(.82); transform: scale(.994); }
body.cargo-focus .hold-panel {
  border-color: color-mix(in srgb, var(--operation-accent) 72%, white 8%);
  box-shadow: 0 24px 66px rgba(0,0,0,.46), 0 0 30px color-mix(in srgb, var(--operation-accent) 13%, transparent), inset 0 1px rgba(255,255,255,.08);
}
body.cargo-dragging .queue-panel { opacity: .7; filter: saturate(.78) brightness(.82); }
body.cargo-dragging .hold-panel { filter: brightness(1.035); }

.plane-deck {
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(255,255,255,.11), transparent 13%, rgba(0,0,0,.3) 88%),
    radial-gradient(ellipse at 18% 18%, var(--operation-warm), transparent 32%),
    radial-gradient(ellipse at 72% 34%, color-mix(in srgb, var(--deck-accent) 22%, transparent), transparent 57%),
    repeating-linear-gradient(90deg, transparent 0 72px, rgba(201,235,240,.045) 73px 74px),
    linear-gradient(110deg, color-mix(in srgb, var(--deck-surface-a) 86%, #36788a), var(--deck-surface-b));
  box-shadow:
    inset 0 3px rgba(255,255,255,.13),
    inset 24px 0 55px rgba(120, 211, 224, .07),
    inset -38px -30px 70px rgba(0,0,0,.38),
    0 20px 42px rgba(0,0,0,.28);
}

.plane-deck::before {
  inset: 11px 19px;
  border-color: color-mix(in srgb, var(--deck-accent) 38%, transparent);
  box-shadow: inset 0 0 36px rgba(0,0,0,.23), 0 0 16px color-mix(in srgb, var(--deck-accent) 9%, transparent);
}

.plane-deck::after {
  background:
    repeating-linear-gradient(90deg, transparent 0, transparent 8.5%, color-mix(in srgb, var(--deck-accent) 15%, transparent) 8.7%, transparent 9.2%),
    linear-gradient(180deg, rgba(255,255,255,.025), transparent 21%),
    repeating-linear-gradient(0deg, transparent 0 52px, rgba(255,255,255,.038) 53px 55px);
  opacity: .76;
}

.deck-atmosphere {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}

.deck-atmosphere::before {
  content: "";
  position: absolute;
  left: 13%;
  right: 11%;
  top: 5%;
  height: 18%;
  opacity: .72;
  background:
    linear-gradient(180deg, rgba(218,249,250,.16), transparent 68%),
    repeating-linear-gradient(90deg, transparent 0 14%, rgba(207,246,248,.34) 14.5% 20%, transparent 20.5% 34%);
  filter: blur(.25px) drop-shadow(0 7px 13px color-mix(in srgb, var(--operation-accent) 22%, transparent));
  clip-path: polygon(3% 0, 97% 0, 87% 100%, 12% 100%);
}

.deck-atmosphere::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34%;
  aspect-ratio: 1;
  border: 3px solid color-mix(in srgb, var(--operation-accent) 82%, white 12%);
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%,-50%) scale(.12);
}

.deck-light {
  position: absolute;
  top: 2%;
  width: 16%;
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(90deg, transparent, rgba(231,253,255,.9), transparent);
  box-shadow: 0 0 12px rgba(192,244,250,.72), 0 13px 34px color-mix(in srgb, var(--operation-accent) 34%, transparent);
}
.deck-light-a { left: 19%; }
.deck-light-b { left: 43%; }
.deck-light-c { left: 67%; }

.deck-centerline {
  position: absolute;
  left: 12%;
  right: 11%;
  bottom: 8%;
  height: 2px;
  opacity: .58;
  background: repeating-linear-gradient(90deg, transparent 0 5%, rgba(246,200,105,.82) 5.2% 8.2%, transparent 8.4% 13.4%);
  filter: drop-shadow(0 0 5px rgba(246,200,105,.38));
}

.deck-balance-beacon {
  position: absolute;
  left: 50%;
  bottom: 3.2%;
  width: 70px;
  height: 8px;
  border: 1px solid rgba(235,249,247,.32);
  border-radius: 99px;
  background: linear-gradient(90deg, rgba(255,107,115,.58), rgba(255,200,97,.44), rgba(94,232,154,.58), rgba(255,200,97,.44), rgba(255,107,115,.58));
  box-shadow: inset 0 1px 3px rgba(0,0,0,.55), 0 0 12px rgba(0,0,0,.35);
  transform: translateX(-50%);
}
.deck-balance-beacon i {
  position: absolute;
  left: calc(50% + var(--cg-x, 0) * 42%);
  top: 50%;
  width: 6px;
  height: 12px;
  border: 1px solid rgba(255,255,255,.85);
  border-radius: 4px;
  background: #f7ffff;
  box-shadow: 0 0 10px #fff;
  transform: translate(-50%,-50%);
  transition: left .28s cubic-bezier(.2,.8,.3,1);
}

.plane-deck[data-balance="warning"] .deck-light {
  background: linear-gradient(90deg, transparent, rgba(255,173,115,.94), transparent);
  box-shadow: 0 0 13px rgba(255,113,89,.68), 0 13px 34px rgba(255,91,71,.18);
}
.plane-deck[data-balance="safe"] .deck-balance-beacon { box-shadow: inset 0 1px 3px rgba(0,0,0,.5), 0 0 18px rgba(94,232,154,.35); }
.plane-deck.is-cargo-focused .deck-light { animation: deck-guidance-light 1.3s ease-in-out infinite alternate; }
.plane-deck.deck-impact .deck-atmosphere::after { animation: deck-impact-ring .52s ease-out both; }
.plane-deck.deck-impact { animation: deck-impact-light .46s ease-out both; }

.hold-grid {
  z-index: 3;
  outline-color: rgba(225,247,249,.82);
  box-shadow:
    0 18px 38px rgba(0,0,0,.34),
    0 0 0 5px rgba(3,17,24,.24),
    inset 0 0 28px rgba(0,0,0,.21);
}

.hold-grid::before {
  border-color: color-mix(in srgb, var(--operation-accent) 27%, transparent);
  box-shadow: inset 0 0 20px rgba(0,0,0,.3), 0 0 0 5px rgba(2,15,22,.25), 0 0 20px color-mix(in srgb, var(--operation-accent) 10%, transparent);
}

.grid-cell {
  background:
    linear-gradient(145deg, rgba(68,124,137,.27), rgba(5,27,37,.38)),
    radial-gradient(circle at 50% 30%, rgba(255,255,255,.03), transparent 62%);
}
.grid-cell:nth-child(odd) { background: linear-gradient(145deg, rgba(74,132,145,.3), rgba(7,31,41,.4)); }

.cargo-piece {
  border-color: rgba(255,248,229,.64);
  box-shadow:
    inset 2px 2px rgba(255,255,255,.18),
    inset -7px -9px rgba(0,0,0,.2),
    0 7px 0 color-mix(in srgb, var(--cargo-color, #30769b) 48%, #02090d),
    0 14px 24px rgba(0,0,0,.45),
    0 0 0 1px rgba(0,0,0,.28);
}
.cargo-piece .cargo-visual::after {
  content: "";
  position: absolute;
  inset: -18% auto -18% -42%;
  width: 28%;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.52), transparent);
  transform: skewX(-15deg);
}
.cargo-piece.selected {
  outline-color: color-mix(in srgb, var(--operation-accent) 78%, white 18%);
  box-shadow:
    inset 2px 2px rgba(255,255,255,.2),
    inset -7px -9px rgba(0,0,0,.18),
    0 8px 0 color-mix(in srgb, var(--cargo-color, #30769b) 45%, #02090d),
    0 18px 28px rgba(0,0,0,.48),
    0 0 28px color-mix(in srgb, var(--operation-accent) 48%, transparent);
  animation: selected-cargo-breathe .9s ease-in-out infinite alternate;
}
.cargo-piece.selected .cargo-visual::after { opacity: .85; animation: cargo-sheen 1.35s ease-in-out infinite; }
.cargo-piece.landed { animation: cinematic-cargo-land .52s cubic-bezier(.18,1.55,.28,1); }
.cargo-drag-ghost { filter: brightness(1.12) saturate(1.08); }

.problem-strip {
  border-left: 3px solid color-mix(in srgb, var(--operation-accent) 64%, transparent);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--operation-accent) 8%, transparent), transparent 42%),
    linear-gradient(180deg, rgba(3,16,24,.78), rgba(8,25,34,.68));
}
.problem-icon { background: var(--operation-accent); }

.primary-button:not(:disabled) {
  background: linear-gradient(135deg, color-mix(in srgb, var(--operation-accent) 46%, white), var(--operation-accent) 56%, color-mix(in srgb, var(--operation-accent) 72%, #08798e));
  box-shadow: inset 0 1px rgba(255,255,255,.72), inset 0 -6px 12px rgba(0,44,58,.16), 0 10px 24px rgba(0,0,0,.28), 0 0 18px color-mix(in srgb, var(--operation-accent) 16%, transparent);
}

.modal.clear-modal {
  border-color: color-mix(in srgb, var(--operation-accent) 60%, var(--green));
  background:
    radial-gradient(circle at 50% -5%, color-mix(in srgb, var(--operation-accent) 24%, transparent), transparent 45%),
    radial-gradient(circle at 15% 105%, var(--operation-warm), transparent 42%),
    linear-gradient(180deg, rgba(8,31,39,.99), rgba(3,14,22,.995));
}

@keyframes deck-guidance-light { to { opacity: .58; filter: brightness(1.32); } }
@keyframes deck-impact-ring { 0% { opacity: .9; transform: translate(-50%,-50%) scale(.12); } 100% { opacity: 0; transform: translate(-50%,-50%) scale(2.8); } }
@keyframes deck-impact-light { 0%,100% { filter: brightness(1); } 38% { filter: brightness(1.16); } }
@keyframes cargo-sheen { 0% { left: -42%; } 55%,100% { left: 118%; } }
@keyframes selected-cargo-breathe { to { transform: translateY(-8px) scale(1.018); } }
@keyframes cinematic-cargo-land {
  0% { filter: brightness(1.85); opacity: .25; transform: translateY(-28px) scale(1.1) rotate(-1deg); }
  62% { transform: translateY(2px) scale(.975); }
  100% { filter: brightness(1); opacity: 1; transform: translateY(-5px) scale(1); }
}

/* Compact landscape: prioritize the deck and cargo, keep rules in the live status strip. */
@media (max-width: 759px) and (orientation: landscape) {
  .app { min-width: 0; }
  .game-layout {
    grid-template-columns: minmax(0, 1fr) minmax(176px, 202px);
    grid-template-areas: "hold queue";
    gap: 7px;
    padding: 7px;
  }
  .mission-panel { display: none; }
  .hold-panel { grid-area: hold; }
  .queue-panel { grid-area: queue; }
  .topbar { padding-inline: 8px; }
  .brand-button { display: none; }
  .flight-strip { margin-right: auto; }
  .language-control select { min-width: 88px; }
  .font-size-control { display: none; }
  .plane-deck { padding-inline: 34px; }
  .tutorial-coach { top: 84px; }
  .footerbar { padding-inline: 9px; }
  .legend { gap: 8px; }
  .legend > span { font-size: 9px; }
}

/* Portrait fallback uses the tap-select flow and scrolls by section instead of shrinking desktop UI. */
@media (max-width: 620px) and (orientation: portrait) {
  html, body { height: auto; min-height: 100%; overflow-x: hidden; overflow-y: auto; }
  .app { grid-template-rows: 58px auto; width: 100%; height: auto; min-width: 0; min-height: 100dvh; }
  .topbar { position: sticky; z-index: 30; top: 0; gap: 6px; padding: 0 7px; }
  .brand-button, .font-size-control { display: none; }
  .flight-strip { flex: 1; min-width: 0; gap: 5px; padding-inline: 8px; }
  .flight-strip strong { font-size: 11px; }
  .language-control select { width: 86px; min-width: 0; }
  .top-actions { gap: 5px; }
  .game-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "queue" "hold" "mission";
    min-height: 0;
    padding: 8px;
    overflow: visible;
  }
  .queue-panel { grid-area: queue; min-height: 285px; }
  .hold-panel { grid-area: hold; min-height: 500px; }
  .mission-panel { grid-area: mission; min-height: 520px; }
  .cargo-queue { --queue-cell: 40px; max-height: 168px; overflow-y: auto; }
  .plane-deck { min-height: 330px; padding-inline: 38px; }
  .tutorial-coach { top: 58px; grid-template-columns: auto auto 1fr; }
  .tutorial-skip { grid-column: 3; justify-self: end; }
  .footerbar { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .plane-deck.is-cargo-focused .deck-light,
  .cargo-piece.selected,
  .cargo-piece.selected .cargo-visual::after,
  .plane-deck.deck-impact,
  .plane-deck.deck-impact .deck-atmosphere::after { animation: none; }
}

/* V18 first-run safety stakes: show why balance matters before teaching controls. */
.intro-safety-simulation {
  position: absolute;
  z-index: 3;
  left: 5%;
  top: 17%;
  display: grid;
  width: min(520px, 43vw);
  height: min(360px, 48vh);
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px) scale(.96);
  transition: opacity .45s ease, transform .55s ease;
}

.career-intro[data-scene="2"] .intro-safety-simulation {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.career-intro[data-scene="2"] .cinematic-career {
  opacity: .2;
  filter: brightness(.42) saturate(.58);
}

.intro-safety-hold {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: end;
  width: 84%;
  height: 54%;
  padding: 30px 34px;
  overflow: hidden;
  border: 5px solid rgba(181,235,245,.86);
  border-radius: 48% 13% 13% 48% / 28% 20% 20% 28%;
  background:
    repeating-linear-gradient(90deg, transparent 0 24%, rgba(176,224,233,.12) 24.5% 25.2%),
    repeating-linear-gradient(0deg, transparent 0 31%, rgba(176,224,233,.1) 31.5% 32.4%),
    linear-gradient(145deg, rgba(24,74,91,.96), rgba(5,24,34,.98));
  box-shadow: inset 0 0 50px rgba(0,0,0,.42), 0 22px 55px rgba(0,0,0,.48), 0 0 28px rgba(255,98,92,.18);
  transform-origin: 50% 70%;
  animation: intro-hold-unstable 1.55s ease-in-out infinite alternate;
}

.intro-safety-hold::before,
.intro-safety-hold::after {
  content: "";
  position: absolute;
  z-index: 3;
  top: 10px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff6b68;
  box-shadow: 0 0 18px #ff524f, 0 0 34px rgba(255,82,79,.58);
  animation: intro-warning-beacon .58s steps(2,end) infinite;
}
.intro-safety-hold::before { left: 29%; }
.intro-safety-hold::after { right: 20%; animation-delay: -.29s; }

.intro-safety-hold > i {
  position: relative;
  z-index: 2;
  display: block;
  width: 78px;
  height: 62px;
  margin-left: -28px;
  border: 2px solid rgba(255,241,212,.82);
  border-radius: 7px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.22), transparent 28%),
    repeating-linear-gradient(90deg, transparent 0 21px, rgba(255,255,255,.13) 22px 24px),
    linear-gradient(180deg, #c27642, #754226);
  box-shadow: inset -7px -8px rgba(0,0,0,.2), 0 8px 14px rgba(0,0,0,.42);
  animation: intro-cargo-shift 1.55s cubic-bezier(.45,.05,.55,.95) infinite alternate;
}
.intro-safety-hold > i:nth-child(2) { height: 78px; background-color: #785cc2; animation-delay: -.16s; }
.intro-safety-hold > i:nth-child(3) { width: 66px; background-color: #2f829e; animation-delay: -.3s; }
.intro-safety-hold > i:nth-child(4) { height: 70px; background-color: #32846e; animation-delay: -.08s; }

.intro-safety-hold > span {
  position: absolute;
  left: 9%;
  right: 9%;
  bottom: 19px;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, #ff6467, #ffc561 42%, #73e3a4 50%, #ffc561 58%, #ff6467);
  box-shadow: 0 0 12px rgba(255,91,91,.42);
}

.intro-safety-status {
  position: absolute;
  z-index: 5;
  left: 8%;
  top: 1%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border: 1px solid rgba(255,130,124,.7);
  border-radius: 12px;
  color: #fff;
  background: rgba(90,19,25,.88);
  box-shadow: 0 10px 25px rgba(0,0,0,.35), 0 0 22px rgba(255,77,77,.2);
}
.intro-safety-status i {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: #40080c;
  background: #ff716f;
  box-shadow: 0 0 16px rgba(255,98,95,.72);
  font-size: 20px;
  font-style: normal;
  font-weight: 950;
}
.intro-safety-status span { color: #ffd2cf; font-size: 22px; font-weight: 950; letter-spacing: .15em; }

.intro-safety-gauge {
  position: absolute;
  left: 17%;
  right: 17%;
  bottom: 3%;
  height: 16px;
  overflow: visible;
  border: 2px solid rgba(255,255,255,.44);
  border-radius: 99px;
  background: linear-gradient(90deg, #e45660, #eeb45c 31%, #58cb8b 43% 57%, #eeb45c 69%, #e45660);
  box-shadow: inset 0 3px 6px rgba(0,0,0,.45), 0 0 22px rgba(255,94,94,.24);
}
.intro-safety-gauge span {
  position: absolute;
  left: 48%;
  top: -7px;
  width: 8px;
  height: 28px;
  border-radius: 6px;
  background: white;
  box-shadow: 0 0 13px white;
  animation: intro-gauge-danger 1.55s ease-in-out infinite alternate;
}
.intro-safety-gauge i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 38%;
  height: 34px;
  border: 2px solid rgba(255,255,255,.16);
  border-top: 0;
  border-radius: 0 0 18px 18px;
  transform: translate(-50%,-50%);
}

@keyframes intro-hold-unstable {
  from { transform: rotate(2.2deg) translateY(-2px); }
  to { transform: rotate(-5deg) translateY(5px); }
}
@keyframes intro-cargo-shift {
  from { transform: translateX(8px) rotate(1deg); }
  to { transform: translateX(-54px) rotate(-4deg); }
}
@keyframes intro-warning-beacon { 50% { opacity: .28; filter: brightness(.7); } }
@keyframes intro-gauge-danger {
  from { left: 66%; }
  to { left: 9%; }
}

@media (max-height: 610px) {
  .intro-safety-simulation { left: 3%; top: 8%; width: 44vw; height: 62vh; transform-origin: left center; }
  .intro-safety-hold { width: 88%; height: 50%; padding: 20px 26px; }
  .intro-safety-hold > i { width: 58px; height: 46px; }
  .intro-safety-hold > i:nth-child(2) { height: 58px; }
  .intro-safety-hold > i:nth-child(3) { width: 50px; }
  .intro-safety-hold > i:nth-child(4) { height: 52px; }
}

@media (max-width: 620px) and (orientation: portrait) {
  .intro-safety-simulation { left: 4%; top: 9%; width: 92vw; height: 38vh; }
  .career-intro[data-scene="2"] .career-intro-copy { left: 4%; right: auto; bottom: 5%; width: 92vw; }
  .intro-safety-hold { width: 92%; height: 56%; }
}

@media (prefers-reduced-motion: reduce) {
  .intro-safety-hold,
  .intro-safety-hold > i,
  .intro-safety-hold::before,
  .intro-safety-hold::after,
  .intro-safety-gauge span { animation: none; }
  .intro-safety-hold { transform: rotate(-3deg); }
  .intro-safety-hold > i { transform: translateX(-28px); }
  .intro-safety-gauge span { left: 15%; }
}

@media (max-width: 759px) and (orientation: landscape) {
  .career-intro[data-scene="2"] .career-intro-copy {
    left: 4%;
    right: auto;
    bottom: 2.5%;
    width: 92vw;
    padding: 10px 15px;
    border-color: rgba(255,125,120,.36);
    background: linear-gradient(110deg, rgba(42,10,17,.94), rgba(3,20,31,.93) 72%);
    box-shadow: 0 18px 42px rgba(0,0,0,.48), 0 0 28px rgba(255,83,80,.12), inset 0 1px rgba(255,255,255,.07);
  }
  .career-intro[data-scene="2"] .career-intro-copy > span {
    color: #ff9791;
    font-size: 9px;
    letter-spacing: .16em;
  }
  .career-intro[data-scene="2"] .career-intro-copy h2 {
    margin: 4px 0 2px;
    font-size: clamp(19px, 4.2vw, 25px);
    line-height: 1.06;
  }
  .career-intro[data-scene="2"] .career-intro-copy p {
    max-width: none;
    font-size: 10px;
    line-height: 1.35;
  }
  .career-intro[data-scene="2"] .career-intro-progress { margin-top: 6px; }
  .intro-safety-simulation {
    left: 4%;
    top: 1.5%;
    width: 92vw;
    height: 57vh;
  }
  .intro-safety-hold {
    width: 72%;
    height: 54%;
    padding: 18px 28px;
  }
  .intro-safety-hold > i { width: 60px; height: 47px; }
  .intro-safety-hold > i:nth-child(2) { height: 58px; }
  .intro-safety-hold > i:nth-child(3) { width: 52px; }
  .intro-safety-hold > i:nth-child(4) { height: 54px; }
  .intro-safety-status { left: 8%; top: 1%; padding: 7px 11px; }
  .intro-safety-status i { width: 26px; height: 26px; font-size: 17px; }
  .intro-safety-status span { font-size: 18px; }
  .intro-safety-gauge { left: 22%; right: 22%; bottom: 2%; }
}
