/* Flights redesign prototype — GAIA blue branding + Arrivals/Departures toggle. */

.fx-html {
  color-scheme: light;
  background: #eef4fa;
}

.fx-html.dark {
  color-scheme: dark;
  background: #0a1018;
}

.fx-body {
  --fx-brand: #005eb8;
  --fx-brand-dark: #00386e;
  --fx-accent: #00a3e0;
  --fx-teal: #2dd4bf;
  --fx-gold: #f5b942;
  --fx-coral: #ff6b4a;
  --fx-surface: #e4eef8;
  --fx-panel: #f3f8fc;
  --fx-text: #0f172a;
  --fx-muted: #64748b;
  --fx-line: #e2e8f0;
  --fx-shadow: 0 4px 14px -2px rgb(15 23 42 / 0.08), 0 2px 6px -2px rgb(15 23 42 / 0.04);
  --fx-shadow-hover: 0 16px 32px -8px rgb(0 94 184 / 0.18);
  --fx-gradient: linear-gradient(135deg, #005eb8 0%, #00a3e0 55%, #2dd4bf 100%);
  --fx-display: "Outfit", Inter, system-ui, sans-serif;
  --fx-sans: "Inter", system-ui, sans-serif;
  --fx-mono: "Inter", ui-monospace, monospace;
  background: var(--fx-surface) !important;
  color: var(--fx-text) !important;
  font-family: var(--fx-sans);
}

.fx-html.dark .fx-body {
  --fx-surface: #0a1018;
  --fx-panel: #111827;
  --fx-text: #f1f5f9;
  --fx-muted: #94a3b8;
  --fx-line: #1e293b;
  --fx-shadow: 0 4px 14px -2px rgb(0 0 0 / 0.35);
  --fx-shadow-hover: 0 16px 32px -8px rgb(0 163 224 / 0.15);
}

/* Keep site header/footer on brand — do not override to sunset theme */
.fx-body #site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background-color: rgb(255 255 255 / 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.fx-html.dark .fx-body #site-header {
  background-color: rgb(2 6 23 / 0.95);
}

.fx-body #site-header .header-accent-line {
  background: var(--fx-gradient);
}

.fx-body .btn-primary {
  background: var(--fx-gradient) !important;
  color: #fff !important;
  border: 0 !important;
}

.fx-main {
  position: relative;
  z-index: 0;
  isolation: isolate;
  overflow: hidden;
}

/* Avoid view-transition layers painting over the sticky header on this page */
.fx-html #site-header,
.fx-html #main-content,
.fx-html #site-footer {
  view-transition-name: none;
}

.fx-atmosphere {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgb(0 163 224 / 0.14), transparent 50%),
    radial-gradient(ellipse 60% 40% at 90% 8%, rgb(245 185 66 / 0.1), transparent 45%),
    radial-gradient(ellipse 50% 30% at 50% 100%, rgb(0 94 184 / 0.08), transparent 50%),
    linear-gradient(180deg, #dbeafe 0%, var(--fx-surface) 38%, #eef4fa 100%);
}

.fx-html.dark .fx-atmosphere {
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgb(0 163 224 / 0.1), transparent 50%),
    radial-gradient(ellipse 60% 40% at 90% 8%, rgb(245 185 66 / 0.06), transparent 45%),
    radial-gradient(ellipse 50% 30% at 50% 100%, rgb(0 94 184 / 0.08), transparent 50%),
    linear-gradient(180deg, #0c1624 0%, var(--fx-surface) 45%, #0a1018 100%);
}

.fx-atmosphere__sun {
  position: absolute;
  right: 6%;
  top: 3.5rem;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(0 163 224 / 0.35) 0%, rgb(0 94 184 / 0.12) 45%, transparent 70%);
  filter: blur(6px);
  animation: fx-pulse 8s ease-in-out infinite;
}

.fx-atmosphere__haze {
  position: absolute;
  inset: auto 0 0;
  height: 36%;
  background: linear-gradient(180deg, transparent, rgb(238 244 250 / 0.9));
}

.fx-html.dark .fx-atmosphere__haze {
  background: linear-gradient(180deg, transparent, rgb(10 16 24 / 0.9));
}

.fx-atmosphere__grain {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.fx-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1536px; /* same as .page-container / max-w-screen-2xl */
  margin: 0 auto;
  padding: 1.25rem 1rem 4rem;
}

.fx-shell--top {
  padding-bottom: 0.85rem;
}

.fx-shell--board {
  padding-top: 1.35rem;
}

.fx-proto {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 1rem;
  margin: 0;
  padding: 0.7rem 1rem;
  border: 1px solid rgb(0 163 224 / 0.28);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.72);
  color: var(--fx-muted);
  font-size: 0.8rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.fx-html.dark .fx-proto {
  background: rgb(15 23 42 / 0.72);
}

.fx-proto__kicker {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--fx-gradient);
  color: #fff;
  font-weight: 800;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fx-proto a {
  margin-left: auto;
  color: var(--fx-brand);
  font-weight: 700;
  text-decoration: none;
}

.fx-html.dark .fx-proto a {
  color: var(--fx-accent);
}

.fx-proto a:hover {
  text-decoration: underline;
}

@media (max-width: 639px) {
  .fx-proto {
    border-radius: 1.1rem;
  }

  .fx-proto a {
    margin-left: 0;
  }
}

/* Full-bleed hero — same terminal exterior as homepage */
.fx-hero-band.hero-cinematic {
  /* Above .fx-atmosphere so the photo is not covered */
  position: relative;
  z-index: 1;
  /* Shorter than homepage hero — heading + clock only */
  min-height: clamp(18rem, 42vw, 26rem);
  margin: 0 0 0.25rem;
  color: #fff;
}

.fx-hero-band .hero-cinematic__media-wrap,
.fx-hero-band .hero-cinematic__overlay,
.fx-hero-band .hero-cinematic__orb,
.fx-hero-band .hero-cinematic__grain {
  z-index: 0;
}

.fx-hero-band .hero-cinematic__content {
  z-index: 1;
}

.fx-hero-band__content {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 1536px;
  min-height: inherit;
  margin: 0 auto;
  padding: 2rem 1rem 2.35rem;
}

.fx-hero {
  display: grid;
  gap: 1.25rem;
  margin: 0;
  width: 100%;
}

.fx-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
  color: rgb(186 230 253);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow: 0 1px 12px rgb(0 0 0 / 0.35);
}

.fx-html.dark .fx-kicker {
  color: rgb(186 230 253);
}

.fx-live {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgb(16 185 129 / 0.55);
  animation: fx-live 1.8s ease-out infinite;
}

.fx-hero__title {
  margin: 0;
  max-width: 14ch;
  font-family: var(--fx-display);
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: #fff;
  text-wrap: balance;
  text-shadow: 0 2px 28px rgb(0 0 0 / 0.45);
}

.fx-html.dark .fx-hero__title {
  color: #fff;
}

.fx-hero__lead {
  margin: 0.9rem 0 0;
  max-width: 38rem;
  color: rgb(226 232 240 / 0.92);
  font-size: 1.02rem;
  line-height: 1.55;
  text-shadow: 0 1px 14px rgb(0 0 0 / 0.4);
}

.fx-clock-card {
  display: grid;
  gap: 1rem;
  padding: 1.1rem 1.2rem 1.15rem;
  border: 1px solid rgb(255 255 255 / 0.22);
  border-radius: 1.35rem;
  background: rgb(255 255 255 / 0.12);
  box-shadow: 0 18px 40px rgb(0 0 0 / 0.28);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.fx-clock-card__label {
  margin: 0;
  color: rgb(186 230 253);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.fx-html.dark .fx-clock-card__label {
  color: rgb(186 230 253);
}

.fx-clock-card__time {
  margin: 0.2rem 0 0;
  font-family: var(--fx-display);
  font-size: clamp(1.65rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #fff;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
}

.fx-html.dark .fx-clock-card__time {
  color: #fff;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
}

.fx-clock-card__date,
.fx-clock-card__updated {
  margin: 0.45rem 0 0;
  color: rgb(226 232 240 / 0.82);
  font-size: 0.78rem;
}

.fx-clock-card__weather {
  padding-top: 0.85rem;
  border-top: 1px solid rgb(255 255 255 / 0.18);
}

.fx-clock-card__weather-top {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.fx-clock-card__weather-icon {
  flex: none;
  color: rgb(186 230 253);
}

.fx-html.dark .fx-clock-card__weather-icon {
  color: rgb(186 230 253);
}

.fx-clock-card__weather-temp {
  margin: 0;
  font-family: var(--fx-display);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
}

.fx-clock-card__weather-cond {
  margin: 0.25rem 0 0;
  color: rgb(226 232 240 / 0.88);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
}

.fx-clock-card__weather-loc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0.55rem 0 0;
  color: rgb(226 232 240 / 0.78);
  font-size: 0.72rem;
  font-weight: 600;
}

.fx-clock-card__live {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: rgb(16 185 129 / 0.28);
  color: #a7f3d0;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fx-html.dark .fx-clock-card__live {
  background: rgb(16 185 129 / 0.28);
  color: #a7f3d0;
}

.fx-clock-card__weather-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0.7rem 0 0;
}

.fx-clock-card__weather-meta div {
  min-width: 0;
  text-align: center;
}

.fx-clock-card__weather-meta dt {
  margin: 0;
  color: rgb(186 230 253 / 0.85);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fx-clock-card__weather-meta dd {
  margin: 0.2rem 0 0;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
}
.fx-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.fx-toolbar__search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.fx-search {
  position: relative;
  flex: 1;
  min-width: 0;
}

.fx-search svg {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  width: 0.95rem;
  height: 0.95rem;
  transform: translateY(-50%);
  color: var(--fx-muted);
}

.fx-search input {
  width: 100%;
  padding: 0.65rem 0.9rem 0.65rem 2.35rem;
  border: 1px solid var(--fx-line);
  border-radius: 999px;
  background: var(--fx-panel);
  color: var(--fx-text);
  font: inherit;
  font-size: 0.9rem;
  outline: none;
  box-shadow: var(--fx-shadow);
}

.fx-search input::placeholder {
  color: #94a3b8;
}

.fx-search input:focus {
  border-color: var(--fx-accent);
  box-shadow: 0 0 0 4px rgb(0 163 224 / 0.18);
}

.fx-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex: none;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--fx-line);
  border-radius: 999px;
  background: var(--fx-panel);
  color: var(--fx-brand);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--fx-shadow);
}

.fx-refresh:hover,
.fx-refresh:focus-visible {
  border-color: var(--fx-accent);
  color: var(--fx-brand-dark);
}

.fx-refresh.is-loading .fx-refresh__icon {
  animation: fx-spin 0.8s linear infinite;
}

.fx-refresh__icon {
  width: 0.95rem;
  height: 0.95rem;
}

.fx-refresh__label {
  display: none;
}

.fx-boarding {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  padding: 0.2rem 0 0.85rem;
  scrollbar-width: thin;
}

.fx-ticker {
  margin-bottom: 1rem;
}

.fx-boarding__label {
  flex: none;
  align-self: center;
  color: var(--fx-brand);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fx-boarding__chip {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid rgb(0 94 184 / 0.25);
  border-radius: 999px;
  background: rgb(0 94 184 / 0.08);
  animation: fx-glow 2.4s ease-in-out infinite;
}

.fx-boarding__flight {
  font-family: var(--fx-mono);
  font-weight: 600;
  color: var(--fx-brand-dark);
}

.fx-html.dark .fx-boarding__flight {
  color: #e2e8f0;
}

.fx-boarding__meta {
  color: var(--fx-muted);
  font-size: 0.8rem;
}

.fx-spotlights {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1.15rem;
}

.fx-spot {
  position: relative;
  overflow: hidden;
  min-height: 9.5rem;
  padding: 1.15rem 1.2rem 1.2rem;
  border: 1px solid var(--fx-line);
  border-radius: 1.5rem;
  background: var(--fx-panel);
  box-shadow: var(--fx-shadow);
}

.fx-spot--arr {
  background:
    linear-gradient(135deg, rgb(0 163 224 / 0.12), transparent 48%),
    var(--fx-panel);
}

.fx-spot--dep {
  background:
    linear-gradient(135deg, rgb(0 94 184 / 0.12), transparent 48%),
    var(--fx-panel);
}

.fx-spot__watermark {
  position: absolute;
  right: -0.2rem;
  bottom: -0.85rem;
  font-family: var(--fx-display);
  font-size: 5.6rem;
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.8;
  color: rgb(0 94 184 / 0.2);
  user-select: none;
  pointer-events: none;
}

.fx-html.dark .fx-spot__watermark {
  color: rgb(248 250 252 / 0.12);
}

.fx-spot__label {
  margin: 0;
  color: var(--fx-muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.fx-spot__city {
  position: relative;
  margin: 0.35rem 0 0;
  font-family: var(--fx-display);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--fx-brand-dark);
}

.fx-html.dark .fx-spot__city {
  color: #f8fafc;
}

.fx-spot__row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem 1rem;
  margin-top: 0.7rem;
}

.fx-spot__flight {
  font-family: var(--fx-mono);
  font-weight: 600;
}

.fx-spot__time {
  font-family: var(--fx-mono);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--fx-brand);
}

.fx-html.dark .fx-spot__time {
  color: var(--fx-accent);
}

.fx-filters-row {
  margin-bottom: 1rem;
}

.fx-filters-label {
  margin: 0 0 0.5rem;
  color: var(--fx-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fx-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.fx-filter {
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--fx-line);
  border-radius: 999px;
  background: var(--fx-panel);
  color: var(--fx-muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.fx-filter.is-active {
  color: #fff;
  background: var(--fx-brand);
  border-color: var(--fx-brand);
}

.fx-filter--on_time.is-active {
  background: #059669;
  border-color: #059669;
}

.fx-filter--boarding.is-active {
  background: var(--fx-brand);
  border-color: var(--fx-brand);
}

.fx-filter--delayed.is-active {
  background: #d97706;
  border-color: #d97706;
  color: #fff;
}

.fx-filter--landed.is-active,
.fx-filter--departed.is-active {
  background: #64748b;
  border-color: #64748b;
}

.fx-filter--cancelled.is-active {
  background: #e11d48;
  border-color: #e11d48;
}

/* Arrivals / Departures toggle — compact, inline with search */
.fx-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  flex: none;
  width: 100%;
  gap: 0;
  padding: 0.2rem;
  border: 1px solid var(--fx-line);
  border-radius: 999px;
  background: var(--fx-panel);
  box-shadow: var(--fx-shadow);
}

.fx-switch__indicator {
  position: absolute;
  top: 0.2rem;
  left: 0.2rem;
  width: calc(50% - 0.2rem);
  height: calc(100% - 0.4rem);
  border-radius: 999px;
  background: var(--fx-gradient);
  box-shadow: 0 6px 14px -8px rgb(0 94 184 / 0.55);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: 0;
}

.fx-switch[data-active-tab="departure"] .fx-switch__indicator {
  transform: translateX(100%);
}

.fx-switch__btn {
  position: relative;
  z-index: 1;
  padding: 0.45rem 0.7rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--fx-muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s ease;
}

.fx-switch__btn.is-active {
  color: #fff;
}

.fx-error {
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid #fecdd3;
  border-radius: 1rem;
  background: #fff1f2;
  color: #9f1239;
}

.fx-html.dark .fx-error {
  border-color: #881337;
  background: rgb(136 19 55 / 0.25);
  color: #fecdd3;
}

.fx-columns {
  display: grid;
  gap: 1rem;
}

.fx-column {
  display: none;
  min-width: 0;
}

.fx-column.is-active {
  display: block;
}

.fx-column__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--fx-line);
}

.fx-column__eyebrow {
  margin: 0;
  color: var(--fx-muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.fx-column__head h2 {
  margin: 0.1rem 0 0;
  font-family: var(--fx-display);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--fx-brand);
}

.fx-html.dark .fx-column__head h2 {
  color: var(--fx-accent);
}

.fx-column__count {
  margin: 0;
  color: var(--fx-muted);
  font-size: 0.82rem;
}

.fx-column__list {
  display: grid;
  gap: 0.55rem;
}

.fx-list-head,
.fx-ticket {
  display: grid;
  grid-template-columns:
    minmax(11rem, 1.4fr)
    minmax(5.5rem, 0.55fr)
    minmax(8rem, 1.1fr)
    5.5rem
    5.5rem
    minmax(7rem, 0.7fr);
  column-gap: 1rem;
  align-items: center;
}

.fx-list-head {
  padding: 0.35rem 1.15rem 0.55rem 1.2rem;
  color: var(--fx-muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.fx-list-head__sched,
.fx-list-head__eta,
.fx-list-head__status,
.fx-ticket__sched-time,
.fx-ticket__eta,
.fx-ticket__side {
  text-align: right;
  justify-self: end;
}

.fx-ticket {
  position: relative;
  padding: 0.85rem 1.15rem 0.85rem 1.2rem;
  border: 1px solid var(--fx-line);
  border-radius: 1rem;
  background: var(--fx-panel);
  box-shadow: var(--fx-shadow);
  animation: fx-enter 0.45s ease both;
}

.fx-ticket::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65rem;
  bottom: 0.65rem;
  width: 4px;
  border-radius: 999px;
  background: var(--fx-accent);
}

.fx-ticket[data-status="on_time"]::before { background: #10b981; }
.fx-ticket[data-status="boarding"]::before { background: var(--fx-brand); }
.fx-ticket[data-status="delayed"]::before { background: #f59e0b; }
.fx-ticket[data-status="landed"]::before,
.fx-ticket[data-status="departed"]::before { background: #94a3b8; }
.fx-ticket[data-status="cancelled"]::before { background: #e11d48; }

.fx-ticket:hover {
  transform: translateY(-1px);
  box-shadow: var(--fx-shadow-hover);
  border-color: rgb(0 163 224 / 0.35);
}

.fx-ticket.is-done {
  opacity: 0.62;
}

.fx-ticket.is-updated {
  box-shadow: 0 0 0 2px rgb(0 163 224 / 0.35), var(--fx-shadow-hover);
}

.fx-ticket__airline-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  padding-left: 0.15rem;
}

.fx-ticket__logo,
.fx-ticket__mark {
  display: grid;
  place-items: center;
  width: 2.85rem;
  height: 2.85rem;
  flex: none;
  overflow: hidden;
  border-radius: 0.7rem;
  background: #fff;
  border: 1px solid var(--fx-line);
}

.fx-html.dark .fx-ticket__logo,
.fx-html.dark .fx-ticket__mark {
  background: #0f172a;
}

.fx-ticket__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.28rem;
}

.fx-ticket__mark {
  color: var(--fx-brand);
  font-size: 0.72rem;
  font-weight: 800;
}

.fx-ticket__airline-name {
  min-width: 0;
  color: var(--fx-text);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fx-ticket__flight-cell {
  min-width: 0;
}

.fx-ticket__flight-num {
  font-family: var(--fx-mono);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fx-brand);
  white-space: nowrap;
}

.fx-html.dark .fx-ticket__flight-num {
  color: var(--fx-accent);
}

.fx-ticket__place {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.fx-ticket__city {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--fx-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fx-ticket__iata {
  color: var(--fx-muted);
  font-family: var(--fx-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.fx-ticket__sched-time,
.fx-ticket__eta {
  font-family: var(--fx-mono);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--fx-text);
}

.fx-ticket__eta.is-changed {
  color: #d97706;
}

.fx-ticket__side {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  min-width: 0;
}

.fx-gate {
  display: inline-flex;
  min-width: 3.6rem;
  justify-content: center;
  padding: 0.2rem 0.45rem;
  border: 1px dashed rgb(0 94 184 / 0.28);
  border-radius: 0.45rem;
  color: var(--fx-brand);
  font-family: var(--fx-mono);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.fx-gate--empty {
  visibility: hidden;
  border-color: transparent;
}

.fx-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.55rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fx-status::before {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: currentColor;
}

.fx-status--on_time {
  color: #047857;
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.fx-status--boarding {
  color: #005eb8;
  background: #eff6ff;
  border-color: #bfdbfe;
  animation: fx-glow 1.8s ease-in-out infinite;
}

.fx-status--delayed {
  color: #b45309;
  background: #fffbeb;
  border-color: #fde68a;
}

.fx-status--landed,
.fx-status--departed {
  color: #475569;
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.fx-status--cancelled {
  color: #be123c;
  background: #fff1f2;
  border-color: #fecdd3;
  text-decoration: line-through;
}

.fx-html.dark .fx-status--on_time {
  color: #6ee7b7;
  background: rgb(6 78 59 / 0.35);
  border-color: #065f46;
}

.fx-html.dark .fx-status--boarding {
  color: #93c5fd;
  background: rgb(0 56 110 / 0.45);
  border-color: #1e3a8a;
}

.fx-html.dark .fx-status--delayed {
  color: #fcd34d;
  background: rgb(120 53 15 / 0.35);
  border-color: #92400e;
}

.fx-html.dark .fx-status--landed,
.fx-html.dark .fx-status--departed {
  color: #cbd5e1;
  background: #1e293b;
  border-color: #334155;
}

.fx-html.dark .fx-status--cancelled {
  color: #fda4af;
  background: rgb(136 19 55 / 0.35);
  border-color: #9f1239;
}

.fx-empty,
.fx-skel {
  padding: 1.4rem 1rem;
  border: 1px dashed var(--fx-line);
  border-radius: 1.1rem;
  color: var(--fx-muted);
  text-align: center;
  background: var(--fx-panel);
}

.fx-empty {
  grid-column: 1 / -1;
}

.fx-skel {
  height: 5.2rem;
  background: linear-gradient(90deg, #f8fafc, #e2e8f0, #f8fafc);
  background-size: 200% 100%;
  animation: fx-shimmer 1.2s linear infinite;
}

.fx-html.dark .fx-skel {
  background: linear-gradient(90deg, #111827, #1e293b, #111827);
  background-size: 200% 100%;
}

.fx-archive {
  margin-top: 0.4rem;
  border-top: 1px solid var(--fx-line);
  padding-top: 0.6rem;
}

.fx-archive summary {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  cursor: pointer;
  color: var(--fx-muted);
  font-size: 0.82rem;
  font-weight: 700;
  list-style: none;
}

.fx-archive summary::-webkit-details-marker {
  display: none;
}

.fx-archive__body {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.7rem;
}

@media (min-width: 640px) {
  .fx-shell {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .fx-hero-band__content {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .fx-hero {
    grid-template-columns: 1.6fr 0.9fr;
    gap: 1.5rem;
    align-items: center;
  }

  .fx-toolbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }

  .fx-switch {
    width: auto;
    min-width: 13.5rem;
  }

  .fx-toolbar__search {
    flex: 1;
    max-width: none;
    width: min(28rem, 42%);
    margin-left: auto;
  }

  .fx-refresh__label {
    display: inline;
  }

  .fx-ticket__logo,
  .fx-ticket__mark {
    width: 3.1rem;
    height: 3.1rem;
  }
}

/* Mobile: keep left→right order, allow horizontal scroll instead of 2-col cards */
@media (max-width: 900px) {
  .fx-column__list,
  .fx-archive__body {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
  }

  .fx-list-head,
  .fx-ticket {
    width: max(52rem, 100%);
    min-width: 52rem;
  }

  .fx-list-head {
    display: none;
  }
}

@media (min-width: 1024px) {
  .fx-shell {
    padding-top: 1.75rem;
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .fx-list-head,
  .fx-ticket {
    grid-template-columns:
      minmax(14rem, 1.5fr)
      minmax(6rem, 0.55fr)
      minmax(10rem, 1.15fr)
      6rem
      6rem
      minmax(8rem, 0.75fr);
    column-gap: 1.25rem;
  }

  .fx-ticket {
    padding: 0.95rem 1.35rem 0.95rem 1.3rem;
  }

  .fx-ticket__airline-name {
    font-size: 1rem;
  }

  .fx-ticket__city {
    font-size: 1.05rem;
  }

  .fx-ticket__sched-time,
  .fx-ticket__eta {
    font-size: 1.12rem;
  }
}

@keyframes fx-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fx-spin {
  to { transform: rotate(360deg); }
}

@keyframes fx-shimmer {
  to { background-position: -200% 0; }
}

@keyframes fx-live {
  70% { box-shadow: 0 0 0 8px rgb(16 185 129 / 0); }
  100% { box-shadow: 0 0 0 0 rgb(16 185 129 / 0); }
}

@keyframes fx-pulse {
  50% { opacity: 0.45; transform: scale(1.06); }
}

@keyframes fx-glow {
  50% { filter: brightness(1.05); }
}

@media (prefers-reduced-motion: reduce) {
  .fx-ticket,
  .fx-live,
  .fx-atmosphere__sun,
  .fx-refresh.is-loading .fx-refresh__icon,
  .fx-skel,
  .fx-status--boarding,
  .fx-boarding__chip,
  .fx-switch__indicator {
    animation: none !important;
    transition: none !important;
  }
}
