:root {
  --bg: #0b0c0e;
  --fg: #f4f1ea;
  --muted: rgba(244,241,234,.72);
  --accent: #c9a46a;
  --glass: rgba(12,14,18,.42);
  --glass-strong: rgba(12,14,18,.62);
  --safe: max(16px, env(safe-area-inset-top));
  --safe-b: max(16px, env(safe-area-inset-bottom));
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%;
  background: var(--bg); color: var(--fg);
  font-family: var(--font);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.app { position: relative; width: 100vw; height: 100dvh; overflow: hidden; background: #000; }
.app.is-flying .chrome > *:not(.topbar) { opacity: 0; pointer-events: none; transition: opacity .25s; }
.app.is-flying .hot-layer { opacity: 0 !important; pointer-events: none !important; }
.app.is-landing .hot-layer .hotspot { opacity: 0; pointer-events: none; }
.app.is-flying .back { opacity: 0 !important; visibility: hidden !important; }
.app.is-flying { cursor: wait; }

.stage { position: absolute; inset: 0; background: #000; }
.still, .flight {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.still { z-index: 1; opacity: 1; transition: opacity .35s ease; }
.flight {
  z-index: 2; opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
.flight.is-on { opacity: 1; }
.still.is-dim { opacity: 0; }
.vignette {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0,0,0,.42) 0%, transparent 18%, transparent 66%, rgba(0,0,0,.52) 100%),
    radial-gradient(ellipse at center, transparent 48%, rgba(0,0,0,.3) 100%);
}

.loadgate {
  position: absolute; inset: 0; z-index: 20;
  display: grid; place-items: center;
  background: #0b0c0e;
  transition: opacity .6s ease, visibility .6s;
}
.loadgate.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.loadgate-card { width: min(360px, 86vw); text-align: center; }
.loadgate-kicker { font-size: 11px; letter-spacing: .22em; color: var(--accent); margin-bottom: 10px; }
.loadgate-title { font-size: 18px; margin-bottom: 18px; }
.loadgate-bar {
  height: 3px; border-radius: 999px; background: rgba(255,255,255,.1); overflow: hidden;
}
.loadgate-bar i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, #c9a46a, #fff2d0);
  transition: width .2s ease;
}
.loadgate-pct { margin-top: 10px; font-size: 12px; color: var(--muted); letter-spacing: .08em; }

.chrome { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.chrome > * { pointer-events: auto; }
.hot-layer { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.hot-layer .hotspot { pointer-events: auto; }

.topbar {
  position: absolute; top: var(--safe); left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px;
}
.back {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 999px;
  background: var(--glass); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.12); font-size: 14px;
  opacity: 0; transform: translateY(-6px); visibility: hidden;
  transition: opacity .35s, transform .35s;
}
.back.is-visible { opacity: 1; transform: none; visibility: visible; }
.back svg { width: 16px; height: 16px; }
.brand {
  position: absolute; left: 50%; top: var(--safe); transform: translateX(-50%);
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--muted); padding: 10px 14px; pointer-events: none;
}
.cta {
  padding: 10px 18px; border-radius: 999px;
  background: rgba(255,255,255,.92); color: #111;
  font-size: 13px; font-weight: 600;
}

.copy {
  position: absolute; left: 22px; bottom: calc(var(--safe-b) + 88px);
  max-width: min(420px, 72vw);
  text-shadow: 0 2px 18px rgba(0,0,0,.55);
}
.copy .kicker {
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 8px;
}
.copy h1 {
  margin: 0 0 8px; font-size: clamp(22px, 3.2vw, 34px);
  font-weight: 560; line-height: 1.15;
}
.copy p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--muted); max-width: 38ch; }

.info-card {
  position: absolute; right: 22px; bottom: calc(var(--safe-b) + 88px);
  width: min(300px, 86vw); padding: 16px 18px; border-radius: 16px;
  background: var(--glass-strong); backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.14);
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity .35s, transform .35s;
}
.info-card.is-open { opacity: 1; transform: none; pointer-events: auto; }
.info-card .label { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.info-card h2 { margin: 0 0 8px; font-size: 18px; font-weight: 600; }
.info-card p { margin: 0 0 14px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.info-card .row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-size: 11px; padding: 5px 9px; border-radius: 999px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); color: var(--muted);
}
.info-card .close-x {
  position: absolute; top: 10px; right: 12px; width: 28px; height: 28px;
  border-radius: 50%; display: grid; place-items: center; color: var(--muted); font-size: 18px;
}

.hotspot {
  position: absolute; width: 18px; height: 18px;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: rgba(255,255,255,.95);
  box-shadow: 0 0 0 8px rgba(255,255,255,.18), 0 4px 18px rgba(0,0,0,.35);
  opacity: 0; pointer-events: none; transition: opacity .35s;
}
.hotspot.is-shown { opacity: 1; pointer-events: auto; }
.hotspot::after {
  content: ""; position: absolute; inset: -10px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.55);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(.7); opacity: .8; }
  100% { transform: scale(1.7); opacity: 0; }
}
.hotspot .tag {
  position: absolute; left: 28px; top: 50%; transform: translateY(-50%);
  white-space: nowrap; padding: 6px 12px; border-radius: 999px;
  background: var(--glass-strong); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.14); font-size: 12px;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.hotspot:hover .tag, .hotspot.is-active .tag { opacity: 1; }
.hotspot.tag-left .tag { left: auto; right: 28px; }

.bay-bar {
  position: absolute; left: 50%; bottom: calc(var(--safe-b) + 22px);
  transform: translateX(-50%); width: min(560px, 92vw);
  padding: 14px 18px 16px; border-radius: 18px;
  background: var(--glass); backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.12);
  display: none; flex-direction: column; gap: 10px;
}
.bay-bar.is-visible { display: flex; }
.bay-bar .title-row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12px; color: var(--muted); letter-spacing: .08em;
}
.bay-bar .title-row strong { color: var(--fg); font-weight: 600; font-size: 13px; }
.bay-pills { display: flex; gap: 8px; width: 100%; }
.bay-pill {
  flex: 1; height: 36px; border-radius: 10px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  font-size: 12px; color: var(--muted);
}
.bay-pill:hover, .bay-pill.is-hot {
  background: rgba(201,164,106,.22); border-color: rgba(201,164,106,.55); color: #fff;
}
.bay-enter {
  align-self: flex-end; padding: 8px 14px; border-radius: 999px;
  background: rgba(255,255,255,.9); color: #111; font-size: 12px; font-weight: 600;
}
.bay-enter:disabled { opacity: .45; cursor: not-allowed; }

.hint {
  position: absolute; left: 50%; bottom: calc(var(--safe-b) + 22px);
  transform: translateX(-50%);
  font-size: 12px; color: var(--muted); letter-spacing: .06em;
  padding: 8px 14px; border-radius: 999px;
  background: var(--glass); border: 1px solid rgba(255,255,255,.1);
  display: none;
}
.hint.is-visible { display: block; }

.watermark {
  position: absolute; right: 14px; bottom: 10px; z-index: 6;
  font-size: 10px; letter-spacing: .12em; color: rgba(255,255,255,.35);
  pointer-events: none;
}

@media (max-width: 720px) {
  .copy { bottom: calc(var(--safe-b) + 130px); max-width: 88vw; }
  .info-card { left: 14px; right: 14px; width: auto; bottom: calc(var(--safe-b) + 120px); }
  .brand { display: none; }
}

/* Flight HUD — path caption + ticks */
.flight-hud {
  position: absolute; left: 50%; bottom: calc(var(--safe-b) + 36px);
  transform: translateX(-50%);
  z-index: 8; width: min(520px, 92vw);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  opacity: 0; pointer-events: none;
  transition: opacity .35s ease;
}
.app.is-flying .flight-hud { opacity: 1; }
.flight-caption {
  padding: 10px 18px; border-radius: 999px;
  background: rgba(8,10,14,.72); backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.16);
  font-size: 14px; font-weight: 560; letter-spacing: .04em;
  text-shadow: 0 1px 8px rgba(0,0,0,.45);
  white-space: nowrap;
}
.flight-progress {
  display: flex; gap: 6px; flex-wrap: wrap; justify-content: center;
}
.flight-progress .tick {
  font-size: 11px; letter-spacing: .06em;
  padding: 5px 10px; border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  color: rgba(244,241,234,.45);
  transition: background .3s, color .3s, border-color .3s;
}
.flight-progress .tick.is-done {
  color: rgba(244,241,234,.75);
  border-color: rgba(201,164,106,.35);
}
.flight-progress .tick.is-now {
  color: #fff;
  background: rgba(201,164,106,.28);
  border-color: rgba(201,164,106,.7);
}
