:root {
  --bg: #f3efe6;
  --paper: #fffdf8;
  --ink: #1a2330;
  --muted: #5c6570;
  --line: #e2dcd0;
  --navy: #16365c;
  --navy-2: #0e2744;
  --ok-bg: #e6f4ea;
  --ok-ink: #1b6b3a;
  --full-bg: #f1e4e4;
  --full-ink: #8a3a3a;
  --conf-bg: #e4eef8;
  --conf-ink: #16365c;
  --unk-bg: #f3eedf;
  --unk-ink: #7a6a3e;
  --shadow: 0 1px 2px rgba(22, 54, 92, 0.06), 0 8px 24px rgba(22, 54, 92, 0.06);
  --radius: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", YuGothic, sans-serif;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
}

.hero, main, footer {
  width: min(720px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.hero {
  padding: 36px 0 8px;
}

.kicker {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: none;
  color: var(--navy);
  font-weight: 600;
}

h1 {
  margin: 0 0 6px;
  font-size: clamp(22px, 5.6vw, 30px);
  letter-spacing: 0.02em;
  line-height: 1.25;
  font-weight: 700;
}

.route {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
}

.period, .updated {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.updated {
  margin-top: 10px;
  display: inline-block;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 10px;
}

.card, .board {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 18px 16px;
  margin: 16px 0;
}

.cost-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr 0.9fr;
  gap: 12px;
}

.cost .label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.cost strong {
  display: block;
  margin-top: 2px;
  font-size: 15px;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}

.cost-note {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.dir-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.tab {
  appearance: none;
  border: 1px solid var(--line);
  background: #f7f3ea;
  color: var(--muted);
  border-radius: 999px;
  padding: 10px 8px;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.tab.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.tab:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  font-size: 12px;
  color: var(--muted);
}

.legend li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 12px;
}

.chip.ok, .day.ok { background: var(--ok-bg); color: var(--ok-ink); }
.chip.full, .day.full { background: var(--full-bg); color: var(--full-ink); }
.chip.conf, .day.conf { background: var(--conf-bg); color: var(--conf-ink); }
.chip.unk, .day.unk { background: var(--unk-bg); color: var(--unk-ink); }

.calendars {
  display: grid;
  gap: 22px;
}

.month h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
}

.dow, .grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.dow span {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  padding: 2px 0 6px;
}

.dow span:first-child { color: #b54545; }
.dow span:last-child { color: #2a5fa8; }

.day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
}

.day .n {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.day .m {
  font-size: 10px;
  margin-top: 2px;
  font-weight: 700;
}

.day.empty {
  background: transparent;
  min-height: 48px;
}

.day.sun .n { color: #b54545; }
.day.sat .n { color: #2a5fa8; }
.day.full.sun .n, .day.full.sat .n { color: inherit; opacity: 0.85; }

.day.link {
  cursor: pointer;
}

.day.link:hover,
.day.link:focus-visible {
  border-color: var(--navy);
  outline: none;
}

h2 {
  margin: 0 0 6px;
  font-size: 17px;
}

h3 {
  margin: 16px 0 6px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.flights-lead {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.day-block {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

.day-block:first-child { border-top: 0; padding-top: 0; }

.day-block h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 15px;
  letter-spacing: 0;
}

.count {
  margin-left: 8px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.flight-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.flight-list li {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  align-items: center;
  gap: 8px;
  background: #f7f4ee;
  border-radius: 10px;
  padding: 8px 12px;
  font-variant-numeric: tabular-nums;
}

.fn {
  font-weight: 700;
  letter-spacing: 0.04em;
  font-family: "SFMono-Regular", "Menlo", "Hiragino Sans", monospace;
  font-size: 14px;
}

.tm { color: var(--navy); font-weight: 600; }

.status-ok {
  font-size: 12px;
  font-weight: 700;
  color: var(--ok-ink);
}

.empty-msg {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.notes, .sources {
  margin: 0;
  padding-left: 1.15em;
  font-size: 14px;
}

.notes li, .sources li { margin: 0 0 8px; }

.sources a {
  color: var(--navy);
  text-underline-offset: 3px;
}

footer {
  padding: 8px 0 40px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 560px) {
  .cost-row { grid-template-columns: 1fr; gap: 10px; }
  .hero, main, footer { width: min(720px, calc(100% - 24px)); }
  .day { min-height: 44px; border-radius: 8px; }
  .flight-list li { grid-template-columns: 80px 1fr auto; padding: 8px 10px; }
}
