:root {
  color-scheme: light;
  --bg: #f5f6f8; --card: #fff; --text: #16181d; --muted: #6b7280; --line: #e3e6eb;
  --accent: #2563eb; --accent-ink: #fff; --ok: #15803d; --ok-bg: #dcfce7; --warn: #a16207; --warn-bg: #fef3c7;
  --bad: #b91c1c; --bad-bg: #fee2e2; --chip: #eef1f5;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f1115; --card: #171a21; --text: #e6e8ec; --muted: #9aa3af; --line: #2a2f39;
    --accent: #3b82f6; --ok: #4ade80; --ok-bg: #14321f; --warn: #facc15; --warn-bg: #3a300d;
    --bad: #f87171; --bad-bg: #3b1616; --chip: #222733;
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f6f8; --card: #fff; --text: #16181d; --muted: #6b7280; --line: #e3e6eb;
  --accent: #2563eb; --accent-ink: #fff; --ok: #15803d; --ok-bg: #dcfce7; --warn: #a16207; --warn-bg: #fef3c7;
  --bad: #b91c1c; --bad-bg: #fee2e2; --chip: #eef1f5;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1115; --card: #171a21; --text: #e6e8ec; --muted: #9aa3af; --line: #2a2f39;
  --accent: #3b82f6; --ok: #4ade80; --ok-bg: #14321f; --warn: #facc15; --warn-bg: #3a300d;
  --bad: #f87171; --bad-bg: #3b1616; --chip: #222733;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
.top { display: flex; align-items: center; gap: 16px; padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 17px; color: inherit; text-decoration: none; }
.top-tools { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.tool { font: inherit; font-size: 13px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; min-height: 34px; padding: 4px 8px; cursor: pointer; }
select.tool { max-width: 9.5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.tabs { display: flex; gap: 4px; }
.tabs button, .subtabs button { border: 0; background: none; color: var(--muted); padding: 8px 12px; border-radius: 8px; font: inherit; cursor: pointer; }
.tabs button.active, .subtabs button.active { background: var(--chip); color: var(--text); font-weight: 600; }
main { max-width: 1100px; margin: 0 auto; padding: 16px; }
.tab { display: none; } .tab.active { display: block; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.form .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 10px; }
.form .row:last-child { margin-bottom: 0; }
.field { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); min-width: 120px; }
.field.grow { flex: 1 1 200px; }
input, select { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-height: 38px; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.check { display: flex; align-items: center; gap: 6px; font-size: 13px; min-height: 38px; }
.check input { min-height: 0; }
button.primary { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 8px; padding: 9px 18px; font: inherit; font-weight: 600; cursor: pointer; min-height: 38px; }
button.icon { border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 8px; min-height: 38px; width: 38px; cursor: pointer; font-size: 16px; }
button.small { border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 7px; padding: 4px 10px; font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
button.small:hover { border-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 10px; border-top: 1px dashed var(--line); margin-top: 4px; }
.chips { display: block; }
.chips summary { cursor: pointer; font-size: 14px; font-weight: 600; padding: 2px 0; }
.chips summary .muted, .chips summary .exl { font-weight: 400; }
.chips .exl { color: var(--bad); }
.chiplist { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.chip { border: 1px solid var(--line); background: var(--chip); color: var(--text); border-radius: 999px; padding: 3px 10px; font-size: 13px; cursor: pointer; }
.chip.off { background: var(--bad-bg); color: var(--bad); text-decoration: line-through; border-color: transparent; }
.summary { margin: 14px 2px 6px; color: var(--muted); font-size: 14px; }
.summary-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hero { margin: 2px 2px 14px; }
.hero h1 { font-size: 1.45rem; line-height: 1.25; margin: 0 0 6px; }
.hero p { margin: 0; color: var(--muted); }
body:has(#tab-airport.active) .hero, body:has(#tab-status.active) .hero { display: none; }
.seo h2 { font-size: 1.05rem; margin: 16px 0 8px; }
.seo h3 { font-size: .95rem; margin: 12px 0 4px; }
.seo p { margin: 0 0 8px; }
.seo-links { columns: 2; margin: 0; padding-left: 18px; }
.seo-links li { margin: 0 0 4px; break-inside: avoid; }
.seo-links a { text-decoration: none; }
.seo-top { margin: 0 0 8px; padding-left: 18px; }
details.more { margin: 2px 0 8px; }
details.more > summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--text); }
details.more[open] > summary { margin-bottom: 8px; }
.toast { position: fixed; z-index: 40; left: 50%; bottom: 18px; transform: translateX(-50%); background: var(--text); color: var(--bg); border-radius: 999px; padding: 8px 14px; font-size: 13px; }
.subtabs { display: flex; gap: 4px; margin: 6px 0 10px; flex-wrap: wrap; }
.subtabs .n { font-size: 12px; color: var(--muted); margin-left: 4px; }
.list { display: flex; flex-direction: column; gap: 8px; }
.route { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.route .main { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.path { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; flex: 1 1 320px; font-weight: 600; }
.ap { display: inline-flex; align-items: baseline; gap: 4px; }
.ap small { font-weight: 400; color: var(--muted); font-size: 12px; }
.arrow { color: var(--muted); font-weight: 400; }
.meta { display: flex; gap: 14px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.meta b { color: var(--text); font-weight: 600; }
.actions { display: flex; gap: 6px; }
.legs { margin-top: 6px; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: var(--muted); }
.badge { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px; font-weight: 600; white-space: nowrap; }
.b-live { background: var(--ok-bg); color: var(--ok); }
.b-listed { background: var(--warn-bg); color: var(--warn); }
.b-dormant { background: var(--bad-bg); color: var(--bad); }
.b-one { background: var(--chip); color: var(--text); }
.panel { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 13.5px; }
.panel table { width: 100%; border-collapse: collapse; }
.panel td, .panel th, table.board td, table.board th { text-align: left; padding: 5px 8px 5px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.panel th, table.board th { font-size: 12px; color: var(--muted); font-weight: 500; }
.links { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.muted { color: var(--muted); }
.more { margin: 12px auto; display: block; }
.empty { padding: 30px; text-align: center; color: var(--muted); }
table.board { width: 100%; border-collapse: collapse; background: var(--card); font-size: 14px; }
.boardwrap { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 6px 12px; margin-top: 14px; overflow-x: auto; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 24px 16px; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
dl.kv dt { color: var(--muted); }
@media (max-width: 640px) {
  .top { gap: 8px; padding: 8px 12px; }
  .tabs { order: 3; width: 100%; }
  .tabs button { flex: 1; padding: 8px 6px; }
  .field { min-width: calc(50% - 5px); flex: 1 1 calc(50% - 5px); }
  .field.date, button.primary { flex: 1 1 100%; }
  .route .main { gap: 8px; }
  .path { flex-basis: 100%; }
  .actions { width: 100%; }
  .actions .small { flex: 1; }
  .seo-links { columns: 1; }
  .hero h1 { font-size: 1.25rem; }
}

.leg { cursor: pointer; border-radius: 6px; padding: 1px 4px; margin-left: -4px; }
.leg:hover { background: var(--chip); }
.legbtn { color: var(--accent); font-weight: 600; }
.verify { font-size: 13px; color: var(--muted); margin: 0 2px 6px; }
.calhead { margin-bottom: 4px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin: 10px 0 8px; max-width: 560px; }
.cal .wd { font-size: 11px; color: var(--muted); text-align: center; }
.cal .wd.fly { color: var(--ok); font-weight: 700; }
.cal .day { min-height: 44px; border-radius: 8px; background: var(--bg); color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; border: 1px solid transparent; }
.cal .day b { font-weight: 500; }
.cal .day.out { opacity: .35; }
.cal .day.on { background: var(--ok-bg); color: var(--ok); cursor: pointer; font: inherit; font-size: 12px; border-color: transparent; }
.cal .day.on b { font-weight: 700; }
.cal .day.on small { font-size: 10px; }
.cal .day.on:hover { border-color: var(--ok); }
.cal .day.sel { outline: 2px solid var(--accent); }

.pricebox { min-width: 92px; text-align: right; }
.price { font-size: 18px; font-weight: 700; white-space: nowrap; }
.price.partial { color: var(--warn); font-size: 16px; }
.price.none { font-size: 12px; font-weight: 500; color: var(--muted); }
.price.loading { color: transparent; border-radius: 6px; background: linear-gradient(90deg, var(--chip) 25%, var(--line) 50%, var(--chip) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; padding: 2px 10px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.legfare { margin-left: 4px; color: var(--text); }
@media (max-width: 640px) { .pricebox { text-align: left; } }
.price.est { color: var(--text); opacity: .85; }

.combo { position: relative; }
.combo .ctext { width: 100%; }
.combo-list { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; right: 0; max-height: 360px; overflow-y: auto; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.25); padding: 4px; }
.combo-list .opt { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: 7px; cursor: pointer; color: var(--text); font-size: 14px; }
.combo-list .opt.active, .combo-list .opt:hover { background: var(--chip); }
.combo-list .opt.none { color: var(--muted); cursor: default; }
.combo-list .oflag { font-size: 18px; }
.combo-list .otext { flex: 1; min-width: 0; }
.combo-list .otext small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.combo-list .ocode { color: var(--muted); font-size: 12px; font-weight: 600; margin-left: 4px; }
