/* ===== 上海 → 昆明 机票参考页 ===== */

html:not(.fl-page-unlocked) .fl-page-main {
  visibility: hidden;
  pointer-events: none;
}

body.fl-page-locked {
  overflow: hidden;
}

.fl-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    linear-gradient(160deg, rgb(2 132 199 / 0.92) 0%, rgb(3 105 161 / 0.96) 100%),
    url('https://images.unsplash.com/photo-1436491865339-9a61bfe807fc?w=1400&q=80') center / cover no-repeat;
}

.fl-gate[hidden] {
  display: none !important;
}

.fl-gate-card {
  width: min(100%, 400px);
  padding: 32px 28px 28px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 60px rgb(15 23 42 / 0.28);
  text-align: center;
}

.fl-gate-icon {
  display: inline-block;
  font-size: 2rem;
  margin-bottom: 8px;
}

.fl-gate-card h1 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  color: var(--text, #0f172a);
}

.fl-gate-desc {
  margin: 0 0 24px;
  color: var(--text-muted, #64748b);
  font-size: 0.95rem;
  line-height: 1.5;
}

.fl-gate-label {
  display: block;
  margin-bottom: 8px;
  text-align: left;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text, #334155);
}

.fl-gate-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 1rem;
  box-sizing: border-box;
}

.fl-gate-input:focus {
  outline: none;
  border-color: var(--fl-accent, #0284c7);
  box-shadow: 0 0 0 3px rgb(2 132 199 / 0.15);
}

.fl-gate-error {
  min-height: 1.25rem;
  margin: 10px 0 0;
  text-align: left;
  color: #dc2626;
  font-size: 0.875rem;
}

.fl-gate-submit {
  width: 100%;
  margin-top: 18px;
}

.fl-gate-back {
  display: inline-block;
  margin-top: 18px;
  color: var(--fl-accent, #0284c7);
  font-size: 0.9rem;
  text-decoration: none;
}

.fl-gate-back:hover {
  text-decoration: underline;
}

.fl-page {
  --fl-accent: #0284c7;
  --fl-accent-soft: #e0f2fe;
  --fl-grad: linear-gradient(135deg, #0ea5e9 0%, #0284c7 45%, #0369a1 100%);
  background: linear-gradient(180deg, #f0f9ff 0%, var(--bg) 280px);
}

.fl-header {
  background: rgb(255 255 255 / 0.9);
  backdrop-filter: blur(14px);
}

.fl-logo-brand {
  text-decoration: none;
  cursor: default;
}

.fl-header .logo-text {
  color: var(--fl-accent);
  font-weight: 800;
}

.fl-hero {
  position: relative;
  padding: 56px 0 40px;
  overflow: hidden;
}

.fl-hero-bg {
  position: absolute;
  inset: 0;
  background:
    var(--fl-grad),
    url('https://images.unsplash.com/photo-1436491865339-9a61bfe807fc?w=1400&q=80') center / cover no-repeat;
  background-blend-mode: overlay, normal;
  opacity: 0.95;
}

.fl-hero-content {
  position: relative;
  z-index: 1;
  color: #fff;
}

.fl-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.18);
  border: 1px solid rgb(255 255 255 / 0.35);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.fl-hero-content h1 {
  font-size: clamp(26px, 5vw, 36px);
  font-weight: 800;
  margin-bottom: 10px;
  text-shadow: 0 2px 16px rgb(0 0 0 / 0.2);
}

.fl-hero-content p {
  max-width: 640px;
  font-size: 15px;
  line-height: 1.6;
  opacity: 0.95;
}

.fl-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 18px;
  font-size: 13px;
}

.fl-hero-meta span {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.16);
  border: 1px solid rgb(255 255 255 / 0.28);
}

.fl-section {
  padding-top: 28px;
  padding-bottom: 28px;
}

.fl-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.fl-section-head .section-title {
  margin-bottom: 0;
}

.fl-desc {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 16px;
}

.fl-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.fl-stat-card {
  padding: 14px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  text-align: center;
}

.fl-stat-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.fl-stat-card strong {
  font-size: 20px;
  color: var(--fl-accent);
}

.fl-chart-wrap {
  position: relative;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  min-height: 220px;
}

#flPriceChart {
  width: 100%;
  height: 200px;
  display: block;
}

.fl-chart-empty {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
  padding: 20px;
  text-align: center;
}

.fl-chart-empty.is-visible {
  display: flex;
}

#flPriceChart.is-hidden {
  visibility: hidden;
  height: 0 !important;
  overflow: hidden;
}

.fl-setup {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: #fffbeb;
  border: 1px solid #fde68a;
  font-size: 14px;
  line-height: 1.6;
}

.fl-setup h3 {
  font-size: 15px;
  margin-bottom: 8px;
  color: #92400e;
}

.fl-setup code {
  font-size: 12px;
  background: rgb(0 0 0 / 0.05);
  padding: 1px 5px;
  border-radius: 4px;
}

.fl-query-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.fl-date-label {
  font-size: 14px;
  font-weight: 600;
}

.fl-date-input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  background: var(--bg-card);
  color: var(--text);
}

.fl-query-hint {
  font-size: 13px;
  color: var(--text-muted);
  min-height: 20px;
  margin-bottom: 12px;
}

.fl-booking-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.fl-booking-links a {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #7dd3fc;
  background: var(--fl-accent-soft);
  color: #0369a1;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.fl-booking-links a:hover {
  background: #bae6fd;
}

.fl-flight-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fl-flight-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 16px;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.fl-flight-main {
  min-width: 0;
}

.fl-flight-airline {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.fl-flight-route {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
}

.fl-flight-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

.fl-flight-price {
  text-align: right;
  white-space: nowrap;
}

.fl-flight-price strong {
  display: block;
  font-size: 22px;
  color: #dc2626;
}

.fl-flight-price span {
  font-size: 11px;
  color: var(--text-muted);
}

.fl-list-empty,
.fl-list-loading,
.fl-list-error {
  padding: 28px 16px;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: rgb(248 250 252 / 0.6);
}

.fl-list-error {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fef2f2;
}

.fl-tips {
  margin: 0;
  padding-left: 20px;
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 14px;
}

.fl-tips strong {
  color: var(--text);
}

.is-mobile .fl-nav {
  display: none;
}

.is-mobile .fl-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.is-mobile .fl-flight-card {
  grid-template-columns: 1fr;
}

.is-mobile .fl-flight-price {
  text-align: left;
}

@media (max-width: 480px) {
  .fl-hero {
    padding: 44px 0 32px;
  }

  .fl-query-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .fl-date-input,
  #flSearchBtn {
    width: 100%;
  }
}
