:root {
  --sky-top: #1a3a5c;
  --sky-mid: #4a7ea8;
  --sky-low: #c4a882;
  --ink: #0e1620;
  --ink-soft: #3a4a5c;
  --paper: #f2ebe0;
  --paper-dim: rgba(242, 235, 224, 0.72);
  --accent: #c45c26;
  --accent-hot: #e8722a;
  --metal: #8a9aab;
  --line: rgba(14, 22, 32, 0.14);
  --panel: rgba(242, 235, 224, 0.92);
  --shadow: 0 24px 60px rgba(8, 16, 28, 0.35);
  --font-display: "Bebas Neue", Impact, sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--sky-top);
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

#app {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
}

/* ——— Sky atmosphere ——— */
.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.sky__gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    var(--sky-top) 0%,
    var(--sky-mid) 42%,
    #8fb4c9 68%,
    var(--sky-low) 100%
  );
}

.sky__haze {
  position: absolute;
  inset: 55% 0 0;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(242, 235, 224, 0.25) 40%,
    rgba(196, 168, 130, 0.55)
  );
}

.sky__cloud {
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  filter: blur(2px);
  animation: drift 48s linear infinite;
}

.sky__cloud--a {
  width: 42vw;
  height: 7vh;
  top: 18%;
  left: -10%;
  animation-duration: 55s;
}

.sky__cloud--b {
  width: 28vw;
  height: 5vh;
  top: 28%;
  left: 40%;
  opacity: 0.7;
  animation-duration: 70s;
  animation-direction: reverse;
}

.sky__cloud--c {
  width: 36vw;
  height: 6vh;
  top: 12%;
  left: 55%;
  opacity: 0.55;
  animation-duration: 62s;
}

@keyframes drift {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(30vw);
  }
}

/* ——— Screens ——— */
.screen {
  min-height: 100vh;
  padding: clamp(1.25rem, 4vw, 3rem);
}

.screen[hidden] {
  display: none !important;
}

.screen--menu {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  max-width: 720px;
  margin: 0 auto;
  animation: rise-in 0.7s ease-out both;
}

.screen--panel {
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.screen--play {
  display: flex;
  flex-direction: column;
  padding: 0;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ——— Brand ——— */
.brand {
  padding-top: clamp(2rem, 8vh, 5rem);
}

.brand__eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(242, 235, 224, 0.72);
}

.brand__title {
  margin: 0;
  line-height: 0.92;
  color: var(--paper);
  text-shadow: 0 8px 40px rgba(8, 16, 28, 0.35);
}

.brand__plane {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(4.2rem, 14vw, 7.5rem);
  letter-spacing: 0.02em;
  animation: title-settle 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.brand__sim {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 8vw, 4.2rem);
  letter-spacing: 0.18em;
  color: var(--accent-hot);
  animation: title-settle 0.9s 0.08s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.brand__tagline {
  margin: 1rem 0 0;
  max-width: 22rem;
  font-size: 1.05rem;
  color: rgba(242, 235, 224, 0.85);
  animation: rise-in 0.8s 0.2s ease-out both;
}

@keyframes title-settle {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ——— Menu actions ——— */
.menu-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: min(100%, 280px);
  margin: 2rem 0;
  animation: rise-in 0.8s 0.28s ease-out both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.1rem;
  padding: 0.75rem 1.4rem;
  border-radius: 2px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition:
    transform 0.15s ease,
    background 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--accent);
  color: var(--paper);
  box-shadow: 0 10px 28px rgba(196, 92, 38, 0.35);
}

.btn--primary:hover {
  background: var(--accent-hot);
}

.btn--ghost {
  background: rgba(242, 235, 224, 0.12);
  color: var(--paper);
  outline: 1px solid rgba(242, 235, 224, 0.35);
}

.btn--ghost:hover {
  background: rgba(242, 235, 224, 0.22);
}

.btn--sm {
  min-height: 2.4rem;
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.menu-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  padding-bottom: 0.5rem;
  color: rgba(242, 235, 224, 0.8);
  font-size: 0.9rem;
  animation: rise-in 0.8s 0.35s ease-out both;
}

.save-warning {
  margin: 0.35rem 0 0;
  max-width: 34rem;
  font-size: 0.82rem;
  line-height: 1.4;
  color: #e8b060;
}

.currency {
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--paper);
}

.currency.is-moula {
  color: #e8c86a;
  letter-spacing: 0.08em;
}

.currency--panel {
  position: absolute;
  top: 1.35rem;
  right: 1.5rem;
  color: var(--ink);
}

.loadout-chip {
  padding: 0.3rem 0.65rem;
  border: 1px solid rgba(242, 235, 224, 0.28);
  border-radius: 2px;
  font-size: 0.82rem;
}

/* ——— Panels (Hangar / Shop) ——— */
.panel {
  position: relative;
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--panel);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  border-radius: 4px;
  animation: rise-in 0.45s ease-out both;
}

.panel__header {
  margin-bottom: 1.5rem;
  padding-right: 5rem;
}

.panel__title {
  margin: 0.35rem 0 0.25rem;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  letter-spacing: 0.06em;
  line-height: 1;
}

.panel__subtitle {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.back-btn {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

.back-btn:hover {
  color: var(--accent);
}

/* ——— Hangar ——— */
.hangar-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.5rem;
  min-height: 420px;
}

@media (max-width: 720px) {
  .hangar-layout {
    grid-template-columns: 1fr;
  }

  .currency--panel {
    position: static;
    display: inline-block;
    margin-top: 0.75rem;
  }

  .panel__header {
    padding-right: 0;
  }
}

.fleet-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-right: 1px solid var(--line);
  padding-right: 1rem;
}

@media (max-width: 720px) {
  .fleet-list {
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 0 0 1rem;
  }
}

.fleet-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: 100%;
  padding: 0.85rem 0.9rem;
  text-align: left;
  border-radius: 2px;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.fleet-item:hover,
.fleet-item.is-active {
  background: rgba(196, 92, 38, 0.1);
  border-color: rgba(196, 92, 38, 0.35);
}

.fleet-item__name {
  font-weight: 600;
  font-size: 0.95rem;
}

.fleet-item__meta {
  font-size: 0.75rem;
  color: var(--ink-soft);
}

.hangar-stage {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.plane-preview {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 1.5rem;
  background:
    linear-gradient(180deg, rgba(74, 126, 168, 0.2), rgba(196, 168, 130, 0.25)),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 24px,
      rgba(14, 22, 32, 0.04) 24px,
      rgba(14, 22, 32, 0.04) 25px
    );
  border-radius: 2px;
  overflow: hidden;
}

.plane-svg {
  width: min(100%, 560px);
  height: auto;
  filter: drop-shadow(0 18px 24px rgba(14, 22, 32, 0.28));
  animation: taxi 4.5s ease-in-out infinite;
}

@keyframes taxi {
  0%,
  100% {
    transform: translateX(-4px);
  }
  50% {
    transform: translateX(6px);
  }
}

.selection-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--line);
}

.selection-card__info h3 {
  margin: 0;
  font-size: 1.2rem;
}

.selection-card__info p {
  margin: 0.2rem 0 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.livery-row__label {
  margin: 0 0 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.livery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.65rem;
}

.livery-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.7rem;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 2px;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    transform 0.15s ease;
}

.livery-card:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(196, 92, 38, 0.45);
}

.livery-card.is-active {
  border-color: var(--accent);
  background: rgba(196, 92, 38, 0.08);
}

.livery-card.is-locked {
  opacity: 0.55;
}

.livery-card.is-rare:not(.is-locked) {
  box-shadow: inset 0 0 0 1px rgba(212, 160, 23, 0.55);
}

.livery-card.is-rare .livery-card__status {
  color: #d4a017;
}

.livery-swatch {
  height: 36px;
  border-radius: 2px;
  border: 1px solid rgba(14, 22, 32, 0.12);
}

.livery-card__name {
  font-size: 0.88rem;
  font-weight: 600;
}

.livery-card__status {
  font-size: 0.72rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ——— Shop ——— */
.shop-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
}

.shop-tab {
  padding: 0.55rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
}

.shop-tab.is-active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.shop-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.35);
}

.shop-card__preview {
  height: 88px;
  border-radius: 2px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.shop-card__preview .plane-svg {
  width: 90%;
  animation: none;
  filter: drop-shadow(0 8px 12px rgba(14, 22, 32, 0.2));
}

.shop-card__title {
  margin: 0;
  font-size: 1.05rem;
}

.shop-card__desc {
  margin: 0;
  flex: 1;
  font-size: 0.85rem;
  color: var(--ink-soft);
  line-height: 1.4;
}

.shop-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.shop-card__price {
  font-weight: 600;
  letter-spacing: 0.03em;
}

.shop-card__owned {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2f6b45;
}

.shop-empty {
  grid-column: 1 / -1;
  padding: 2rem 1rem;
  text-align: center;
  color: var(--ink-soft);
}

/* ——— Play / flight ——— */
.play-hud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  padding: 0.65rem clamp(0.75rem, 2vw, 1.5rem);
  color: var(--paper);
  background: rgba(14, 22, 32, 0.72);
  position: relative;
  z-index: 3;
  flex-shrink: 0;
}

.scenario-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.scenario-btn {
  min-height: 2rem;
  padding: 0.35rem 0.75rem;
  border-radius: 2px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(242, 235, 224, 0.8);
  background: rgba(242, 235, 224, 0.08);
  outline: 1px solid rgba(242, 235, 224, 0.22);
  transition: background 0.15s ease, color 0.15s ease, outline-color 0.15s ease;
}

.scenario-btn:hover {
  background: rgba(242, 235, 224, 0.16);
  color: var(--paper);
}

.scenario-btn.is-active {
  background: rgba(196, 92, 38, 0.85);
  color: var(--paper);
  outline-color: transparent;
}

.hazard-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.hazard-btn {
  min-height: 2rem;
  padding: 0.35rem 0.7rem;
  border-radius: 2px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f2d4c4;
  background: rgba(140, 40, 20, 0.45);
  outline: 1px solid rgba(255, 120, 80, 0.35);
  transition: background 0.15s ease, opacity 0.15s ease;
}

.hazard-btn:hover:not(:disabled) {
  background: rgba(180, 50, 25, 0.65);
}

.hazard-btn.is-active,
.hazard-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.play-hud .back-btn {
  color: rgba(242, 235, 224, 0.85);
}

.play-hud .back-btn:hover {
  color: var(--paper);
}

.play-hud__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.08em;
}

.play-hud__livery {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.8;
}

.play-hud__keys {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.7;
  justify-content: flex-end;
  max-width: 16rem;
}

.screen--play {
  display: flex;
  flex-direction: column;
  padding: 0;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

.flight-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  background: #16324f;
}

#flight-canvas {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.flight-plane {
  position: absolute;
  left: 22%;
  top: 0;
  bottom: auto;
  width: min(42vw, 420px);
  transform-origin: 55% 76%;
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 14px 18px rgba(8, 16, 28, 0.45));
  transition: filter 0.15s ease;
}

.flight-plane.is-airborne {
  filter: drop-shadow(0 22px 28px rgba(8, 16, 28, 0.35));
}

.flight-plane.is-wrecked {
  filter:
    drop-shadow(0 0 22px rgba(255, 80, 10, 0.9))
    drop-shadow(0 12px 18px rgba(8, 16, 28, 0.6))
    saturate(0.4)
    brightness(0.65)
    contrast(1.15);
  animation: wreck-lurch 1.2s cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.flight-plane.is-skidding {
  filter:
    drop-shadow(0 8px 14px rgba(8, 16, 28, 0.45))
    brightness(0.9);
  animation: skid-lurch 1.15s ease-out both;
}

.flight-plane.is-wrecked .plane-svg--flight {
  animation: wreck-jitter 0.7s steps(4) both;
}

@keyframes wreck-lurch {
  0% {
    translate: 0 0;
  }
  25% {
    translate: 12px 10px;
  }
  55% {
    translate: -18px 28px;
  }
  100% {
    translate: 6px 34px;
  }
}

@keyframes skid-lurch {
  0% {
    translate: 0 0;
  }
  100% {
    translate: -40px 4px;
  }
}

@keyframes wreck-jitter {
  0% {
    opacity: 1;
  }
  30% {
    opacity: 0.7;
  }
  60% {
    opacity: 1;
  }
  100% {
    opacity: 0.92;
  }
}

.wreck-bits {
  position: absolute;
  inset: 10% 5%;
  pointer-events: none;
  z-index: 5;
}

.wreck-bits[hidden] {
  display: none !important;
}

.wreck-bits i {
  position: absolute;
  width: 16px;
  height: 10px;
  background:
    linear-gradient(135deg, #d0c4b4 0%, #8a7360 40%, #3a2a20 100%);
  border: 1px solid #2a1c14;
  border-radius: 1px;
  box-shadow: inset 2px 0 0 rgba(180, 60, 20, 0.35);
  animation: bit-fling 1.1s ease-out forwards;
}

.wreck-bits i:nth-child(1) { left: 20%; top: 40%; --dx: -70px; --dy: 50px; animation-delay: 0.02s; }
.wreck-bits i:nth-child(2) { left: 45%; top: 30%; width: 22px; --dx: 40px; --dy: -30px; animation-delay: 0.05s; }
.wreck-bits i:nth-child(3) { left: 60%; top: 55%; --dx: 90px; --dy: 70px; animation-delay: 0.08s; }
.wreck-bits i:nth-child(4) { left: 35%; top: 60%; width: 10px; height: 10px; --dx: -40px; --dy: 90px; animation-delay: 0.04s; }
.wreck-bits i:nth-child(5) { left: 70%; top: 35%; --dx: 110px; --dy: 20px; animation-delay: 0.1s; }
.wreck-bits i:nth-child(6) { left: 15%; top: 55%; width: 18px; --dx: -90px; --dy: 40px; animation-delay: 0.06s; }

@keyframes bit-fling {
  0% {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx, 60px), var(--dy, 80px)) rotate(220deg);
  }
}

.plane-svg--flight {
  width: 100%;
  height: auto;
  animation: none;
}

.plane-fire {
  position: absolute;
  left: 12%;
  bottom: 4%;
  width: 76%;
  height: 78%;
  pointer-events: none;
  z-index: 3;
  mix-blend-mode: screen;
  filter: contrast(1.15) saturate(1.25);
}

.plane-fire[hidden] {
  display: none !important;
}

.plane-sparks {
  position: absolute;
  left: 10%;
  bottom: -2%;
  width: 70%;
  height: 28%;
  pointer-events: none;
  z-index: 4;
  overflow: visible;
}

.plane-sparks[hidden] {
  display: none !important;
}

.plane-sparks span {
  position: absolute;
  bottom: 0;
  width: 3px;
  height: 10px;
  border-radius: 1px;
  background: linear-gradient(to top, #ff9a2a, #ffe9a0);
  box-shadow: 0 0 6px #ffb040;
  animation: spark-shot 0.35s linear infinite;
}

.plane-sparks span:nth-child(1) { left: 18%; animation-delay: 0s; }
.plane-sparks span:nth-child(2) { left: 32%; animation-delay: 0.07s; height: 14px; }
.plane-sparks span:nth-child(3) { left: 48%; animation-delay: 0.14s; }
.plane-sparks span:nth-child(4) { left: 58%; animation-delay: 0.03s; height: 12px; }
.plane-sparks span:nth-child(5) { left: 70%; animation-delay: 0.2s; }

@keyframes spark-shot {
  0% {
    transform: translate(0, 0) scaleY(1);
    opacity: 1;
  }
  100% {
    transform: translate(-18px, -28px) scaleY(0.4);
    opacity: 0;
  }
}

.plane-fire__core {
  position: absolute;
  left: 28%;
  bottom: 0;
  width: 46%;
  height: 90%;
  background:
    radial-gradient(ellipse at 50% 90%, rgba(255, 252, 220, 1) 0%, rgba(255, 200, 80, 0.95) 12%, rgba(255, 110, 20, 0.8) 32%, rgba(180, 30, 0, 0.55) 55%, transparent 72%),
    repeating-linear-gradient(
      180deg,
      transparent 0 6px,
      rgba(255, 140, 40, 0.12) 6px 7px
    ),
    radial-gradient(ellipse at 35% 55%, rgba(255, 180, 60, 0.7), transparent 55%);
  border-radius: 42% 42% 48% 48%;
  animation: flame-lick 0.26s ease-in-out infinite alternate;
  filter: blur(0.6px);
}

.plane-fire__core--b {
  left: 48%;
  width: 36%;
  height: 70%;
  animation-duration: 0.22s;
  animation-delay: -0.1s;
  opacity: 0.85;
}

.plane-fire__core--c {
  left: 12%;
  width: 30%;
  height: 55%;
  animation-duration: 0.34s;
  animation-delay: -0.05s;
  opacity: 0.75;
}

@keyframes flame-lick {
  from {
    transform: scaleY(0.92) scaleX(1.05) translateY(4%);
    filter: blur(1px) hue-rotate(-8deg);
  }
  to {
    transform: scaleY(1.12) scaleX(0.92) translateY(-2%);
    filter: blur(2px) hue-rotate(12deg);
  }
}

.crash-flash {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: radial-gradient(circle at 32% 62%, rgba(255, 230, 180, 0.95), rgba(255, 100, 20, 0.45) 35%, transparent 65%);
  opacity: 0;
}

.crash-flash.is-on {
  animation: crash-blast 0.7s ease-out forwards;
}

@keyframes crash-blast {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.flight-stage.is-crashing {
  animation: stage-shake 0.45s linear;
}

@keyframes stage-shake {
  0%,
  100% {
    transform: translate(0, 0);
  }
  20% {
    transform: translate(-10px, 4px);
  }
  40% {
    transform: translate(12px, -6px);
  }
  60% {
    transform: translate(-8px, -2px);
  }
  80% {
    transform: translate(6px, 5px);
  }
}

.instruments {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, minmax(72px, 1fr));
  gap: 0.45rem;
  padding: 0.65rem;
  background: rgba(14, 22, 32, 0.72);
  border: 1px solid rgba(242, 235, 224, 0.18);
  border-radius: 2px;
  color: var(--paper);
  backdrop-filter: blur(6px);
}

@media (min-width: 900px) {
  .instruments {
    grid-template-columns: repeat(6, auto);
  }
}

.inst {
  display: flex;
  flex-direction: column;
  min-width: 4.5rem;
  padding: 0.2rem 0.35rem;
}

.inst__label {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.65;
}

.inst__value {
  font-family: var(--font-display);
  font-size: 1.55rem;
  letter-spacing: 0.04em;
  line-height: 1;
}

.inst__unit {
  font-size: 0.68rem;
  opacity: 0.6;
}

.flight-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-content: center;
  gap: 0.55rem;
  padding: 2rem;
  text-align: center;
  background:
    radial-gradient(ellipse at 30% 70%, rgba(180, 40, 10, 0.35), transparent 50%),
    rgba(14, 22, 32, 0.62);
  color: var(--paper);
  animation: overlay-in 0.45s ease-out both;
}

.flight-overlay.is-crash {
  background:
    radial-gradient(ellipse at 28% 65%, rgba(255, 80, 10, 0.28), transparent 45%),
    rgba(10, 12, 16, 0.58);
}

.flight-overlay[hidden] {
  display: none !important;
}

@keyframes overlay-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.flight-overlay__eyebrow {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.7;
}

.flight-overlay__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 4rem);
  letter-spacing: 0.08em;
  color: var(--accent-hot);
  text-shadow: 0 0 40px rgba(255, 90, 20, 0.45);
}

.flight-overlay__survivors {
  margin: 0.35rem auto 0.25rem;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  letter-spacing: 0.06em;
  color: var(--paper);
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.55);
  animation: survivors-pop 0.55s 0.15s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.flight-overlay__survivors[data-severity="none"] {
  color: #ff6b3d;
}

.flight-overlay__survivors[data-severity="all"] {
  color: #7dcea0;
}

.flight-overlay__survivors[data-severity="some"] {
  color: #f0c674;
}

.flight-overlay__coins {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  letter-spacing: 0.08em;
  color: #e8c86a;
  text-shadow: 0 0 20px rgba(232, 200, 106, 0.35);
}

.flight-overlay__coins[hidden] {
  display: none !important;
}

@keyframes survivors-pop {
  from {
    opacity: 0;
    transform: scale(0.86) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.flight-overlay__copy {
  margin: 0 auto 0.5rem;
  max-width: 28rem;
  opacity: 0.9;
  line-height: 1.45;
}

.flight-overlay__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.flight-overlay .btn--ghost {
  background: rgba(242, 235, 224, 0.1);
}

.flight-overlay__score {
  margin: 0.15rem 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  color: #c9b08a;
}

.flight-overlay__score[hidden] {
  display: none !important;
}

.flight-overlay__unlock {
  margin: 0.2rem 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: #d4a017;
}

.flight-overlay__unlock[hidden] {
  display: none !important;
}

.replay-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 6;
  padding: 0.35rem 0.75rem;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper);
  background: rgba(14, 22, 32, 0.72);
  border: 1px solid rgba(201, 176, 138, 0.45);
  pointer-events: none;
  animation: replay-pulse 1.2s ease-in-out infinite;
}

.replay-badge[hidden] {
  display: none !important;
}

.flight-stage.is-replay {
  filter: saturate(1.2) contrast(1.08);
}

@keyframes replay-pulse {
  0%,
  100% {
    opacity: 0.75;
  }
  50% {
    opacity: 1;
  }
}

.flight-stage.is-slowmo {
  filter: saturate(1.15) contrast(1.05);
}

.flight-stage.is-slowmo::after {
  content: "SLOW-MO";
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 5;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.22em;
  color: rgba(242, 235, 224, 0.7);
  pointer-events: none;
}

.flight-plane.is-breakup {
  opacity: 0.72;
  filter: contrast(1.2) brightness(0.85);
}

/* Career */
.career-rank {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.65rem 1.25rem;
  margin: 0 0 1.25rem;
  padding: 1rem 1.15rem;
  background: linear-gradient(120deg, rgba(22, 50, 79, 0.85), rgba(74, 90, 70, 0.45));
  border: 1px solid rgba(242, 235, 224, 0.16);
}

.career-rank__label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.65;
}

.career-rank__name {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: 0.06em;
  color: var(--paper);
}

.career-rank__points {
  margin-left: auto;
  font-size: 0.9rem;
  opacity: 0.8;
}

.career-rewards {
  margin: 0 0 1.5rem;
}

.career-reward-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.career-reward {
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  line-height: 1.35;
  color: rgba(242, 235, 224, 0.72);
  background: rgba(14, 22, 32, 0.35);
  border: 1px solid rgba(242, 235, 224, 0.1);
}

.career-reward.is-unlocked {
  color: var(--paper);
  border-color: rgba(212, 160, 23, 0.35);
}

.career-reward strong {
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  font-weight: 400;
}

.career-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.career-stat {
  padding: 0.85rem 0.9rem;
  background: rgba(14, 22, 32, 0.45);
  border-bottom: 2px solid rgba(201, 176, 138, 0.35);
}

.career-stat__value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.75rem;
  letter-spacing: 0.04em;
  color: var(--paper);
  line-height: 1.1;
}

.career-stat__label {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.65;
}

.career-slots-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.08em;
}

.save-slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem;
}

.save-slot {
  padding: 1rem;
  background: rgba(14, 22, 32, 0.5);
  border: 1px solid rgba(242, 235, 224, 0.14);
}

.save-slot--empty {
  border-style: dashed;
  opacity: 0.9;
}

.save-slot__title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.06em;
}

.save-slot__meta {
  margin: 0;
  font-weight: 600;
  color: #c9b08a;
}

.save-slot__detail {
  margin: 0.35rem 0 0.85rem;
  font-size: 0.85rem;
  opacity: 0.7;
  line-height: 1.35;
}

.save-slot__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
