.preflight-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0a1520;
  display: none;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.preflight-overlay.active { opacity: 1; }

/* Two-column layout */
.pf-layout {
  display: flex;
  width: 1920px;
  height: 100%;
}

/* Left half: Story timeline */
.pf-timeline-half {
  width: 960px;
  display: flex;
  align-items: center;
  padding: 60px 60px 120px 80px;
}
.pf-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}
.pf-step {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 14px 0 14px 40px;
  position: relative;
}
/* Timeline dot */
.pf-step::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 22px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(168,214,240,0.2);
  background: transparent;
  transition: background 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
  z-index: 2;
}
.pf-step.active::before {
  background: var(--accent2);
  border-color: var(--accent2);
  box-shadow: 0 0 8px rgba(168,214,240,0.3);
}
/* Timeline connector line — always visible */
.pf-step::after {
  content: '';
  position: absolute;
  left: 11px;
  top: 38px;
  width: 2px;
  bottom: -4px;
  background: rgba(168,214,240,0.1);
}
.pf-step:last-child::after {
  display: none;
}
/* Left: title area */
.pf-step-left {
  flex-shrink: 0;
  width: 340px;
  cursor: pointer;
}
.pf-step-label {
  font-size: 22px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent2);
  margin-bottom: 4px;
  opacity: 0.2;
  transition: opacity 0.6s ease;
}
.pf-step.active .pf-step-label {
  opacity: 1;
}
.pf-step-title {
  font-size: 32px;
  font-weight: 200;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.2;
  opacity: 0.15;
  transition: opacity 0.6s ease;
}
.pf-step.active .pf-step-title {
  opacity: 1;
}
/* Right: description — always takes space, just fades */
.pf-step-desc {
  font-size: 20px;
  font-weight: 300;
  color: rgba(238,247,247,0.5);
  line-height: 1.5;
  flex: 1;
  padding-top: 8px;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.pf-step.active .pf-step-desc {
  opacity: 1;
}

/* Right half: Phone wrapper */
.pf-phone-wrap {
  width: 960px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Context label above phone */
.preflight-context {
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  text-align: center;
  opacity: 0;
  transition: opacity 1s ease;
}
.preflight-context.visible { opacity: 1; }
.preflight-context-label {
  font-size: 22px;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent2);
  opacity: 0.7;
}
.preflight-context-title {
  font-size: 24px;
  font-weight: 200;
  color: rgba(238,247,247,0.85);
  margin-top: 8px;
  letter-spacing: 0.01em;
}

/* iPhone frame — bird's eye view */
.preflight-phone {
  width: 360px;
  height: 740px;
  border-radius: 52px;
  border: 2.5px solid rgba(238,247,247,0.15);
  background: var(--bg);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 120px rgba(0,0,0,0.5), 0 0 0 1px rgba(238,247,247,0.03);
  transform: scale(0.95);
  opacity: 0;
  transition: opacity 1.2s ease, transform 1.2s cubic-bezier(0.16,1,0.3,1);
}
.preflight-phone.visible {
  opacity: 1;
  transform: scale(1);
}

/* Dynamic island */
.preflight-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 28px;
  border-radius: 14px;
  background: #000;
  z-index: 10;
}

/* Phone screen content */
.preflight-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 64px 24px 24px;
  opacity: 0;
  transition: opacity 1s ease;
}
.preflight-screen.visible { opacity: 1; }

/* Screen content styles — matches seatback design system */
.pf-airline-logo {
  font-size: 15px;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  text-align: center;
  margin-bottom: 20px;
  opacity: 0.6;
}
.pf-card {
  background: rgba(48,61,64,0.45);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 8px;
  border: 1px solid rgba(238,247,247,0.08);
}
.pf-card-label {
  font-size: 16px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(238,247,247,0.55);
  margin-bottom: 6px;
}
.pf-card-value {
  font-size: 22px;
  font-weight: 200;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.pf-card-value-sm {
  font-size: 15px;
  font-weight: 300;
  color: rgba(238,247,247,0.6);
  margin-top: 2px;
}
.pf-route {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
}
.pf-route-code {
  font-size: 34px;
  font-weight: 200;
  color: var(--text-primary);
  letter-spacing: 0.04em;
}
.pf-route-arrow {
  font-size: 22px;
  color: var(--accent);
  opacity: 0.5;
}
.pf-route-city {
  font-size: 16px;
  font-weight: 300;
  color: rgba(238,247,247,0.5);
  text-align: center;
  margin-top: 3px;
}
.pf-btn {
  background: var(--pill-bg);
  border: 1px solid rgba(238,247,247,0.08);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  font-size: 15px;
  font-weight: 300;
  color: rgba(238,247,247,0.7);
  letter-spacing: 0.03em;
  margin-top: 6px;
}
.pf-barcode {
  margin-top: 14px;
  height: 44px;
  background: repeating-linear-gradient(
    90deg,
    rgba(238,247,247,0.5) 0px,
    rgba(238,247,247,0.5) 2px,
    transparent 2px,
    transparent 5px
  );
  border-radius: 4px;
  opacity: 0.3;
}
.pf-gate-large {
  font-size: 56px;
  font-weight: 100;
  color: var(--text-primary);
  text-align: center;
  letter-spacing: 0.04em;
  margin: 12px 0 4px;
}
.pf-notification {
  background: var(--pill-bg);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  border: 1px solid rgba(238,247,247,0.03);
}
.pf-notif-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pf-notif-text {
  font-size: 14px;
  font-weight: 300;
  color: rgba(238,247,247,0.6);
  line-height: 1.4;
}
.pf-notif-time {
  font-size: 15px;
  color: rgba(238,247,247,0.25);
  margin-left: auto;
  flex-shrink: 0;
}

/* Detail rows */
.pf-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(238,247,247,0.04);
}
.pf-detail-row:last-child { border-bottom: none; }
.pf-detail-k {
  font-size: 15px;
  font-weight: 300;
  color: rgba(238,247,247,0.5);
}
.pf-detail-v {
  font-size: 15px;
  font-weight: 400;
  color: rgba(238,247,247,0.85);
}

/* Checklist */
.pf-check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 14px;
  font-weight: 300;
  color: rgba(238,247,247,0.5);
}
.pf-check-row.done { color: rgba(238,247,247,0.7); }
.pf-check-box {
  font-size: 16px;
  width: 16px;
  text-align: center;
  color: var(--accent);
  opacity: 0.7;
}
.pf-check-row:not(.done) .pf-check-box { color: rgba(238,247,247,0.2); }

/* Meal options */
.pf-meal-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--pill-bg);
  margin-bottom: 5px;
  border: 1px solid transparent;
}
.pf-meal-selected {
  background: rgba(232,125,134,0.08);
  border-color: rgba(232,125,134,0.15);
}
.pf-meal-icon { font-size: 18px; }
.pf-meal-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}
.pf-meal-text { flex: 1; }
.pf-meal-name {
  font-size: 15px;
  font-weight: 400;
  color: rgba(238,247,247,0.75);
}
.pf-meal-desc {
  font-size: 15px;
  font-weight: 300;
  color: rgba(238,247,247,0.3);
  margin-top: 1px;
}
.pf-meal-check {
  font-size: 16px;
  color: var(--accent);
  opacity: 0.8;
}

/* Poster grid */
.pf-poster-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
.pf-poster {
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}
.pf-poster-img {
  width: 100%;
  aspect-ratio: 2/3;
}
.pf-poster-heart {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 15px;
  color: rgba(238,247,247,0.2);
}
.pf-poster-faved .pf-poster-heart {
  color: var(--accent);
  opacity: 0.8;
}
.pf-poster-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 22px 6px 6px;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
  font-size: 15px;
  font-weight: 300;
  color: rgba(238,247,247,0.7);
}

/* Now playing / movie player */
.pf-now-playing {
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  background: #050510;
  border: 1px solid rgba(238,247,247,0.04);
}
.pf-player-img {
  width: 100%;
  aspect-ratio: 16/9;
}
.pf-player-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
}
.pf-player-pause {
  font-size: 20px;
  color: rgba(238,247,247,0.7);
  letter-spacing: 3px;
}
.pf-player-info {
  padding: 14px 16px 16px;
}
.pf-player-title {
  font-size: 15px;
  font-weight: 400;
  color: var(--text-primary);
}
.pf-player-meta {
  font-size: 15px;
  font-weight: 300;
  color: rgba(238,247,247,0.35);
  margin-top: 3px;
}
.pf-player-progress {
  margin-top: 8px;
}
.pf-player-bar {
  height: 3px;
  background: rgba(238,247,247,0.1);
  border-radius: 2px;
  overflow: hidden;
}
.pf-player-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
}
.pf-player-time {
  font-size: 15px;
  font-weight: 300;
  color: rgba(238,247,247,0.25);
  margin-top: 4px;
}

/* Narration text below phone */
.preflight-narration {
  position: absolute;
  bottom: 100px;
  left: 0;
  right: 0;
  text-align: center;
  padding: 0 40px;
}
.preflight-narration-text {
  font-size: 20px;
  font-weight: 200;
  color: rgba(238,247,247,0.7);
  letter-spacing: 0.01em;
  line-height: 1.5;
  max-width: 600px;
  margin: 0 auto;
  opacity: 0;
  transition: opacity 1s ease;
}
.preflight-narration-text.visible { opacity: 1; }

/* Advance hint */
.preflight-advance {
  position: absolute;
  bottom: 44px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 16px;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(238,247,247,0.2);
  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none;
}
.preflight-advance.visible { opacity: 1; }

/* Skip button */
.preflight-skip {
  position: absolute;
  bottom: 40px;
  right: 60px;
  font-size: 16px;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(238,247,247,0.3);
  cursor: pointer;
  border: none;
  background: none;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.preflight-skip.visible { opacity: 1; }
