:root {
  color-scheme: light;
  --ink: #233238;
  --muted: #607079;
  --paper: #fbfaf5;
  --panel: #ffffff;
  --line: #d9d2c3;
  --teal: #2f7f89;
  --red: #c84f3d;
  --yellow: #d89a22;
  --green: #5f7d47;
  --blue: #315d68;
  --shadow: 0 18px 40px rgba(35, 50, 56, 0.12);
  --topbar-height: 58px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    "Noto Sans TC",
    "PingFang TC",
    "Microsoft JhengHei",
    system-ui,
    sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  gap: 8px;
  padding: 12px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(217, 210, 195, 0.72);
  background: rgba(251, 250, 245, 0.92);
  backdrop-filter: blur(14px);
}

.topbar-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.topbar[data-nav-collapsed="true"] .nav {
  display: none;
}

.date-switcher {
  position: sticky;
  top: var(--topbar-height);
  z-index: 29;
  display: grid;
  gap: 8px;
  padding: 8px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(217, 210, 195, 0.78);
  background: rgba(251, 250, 245, 0.95);
  backdrop-filter: blur(14px);
}

.date-switcher[data-collapsed="true"] .day-tabs.compact {
  display: none;
}

.nav-toggle,
.date-switcher-toggle {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.nav-toggle {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 7px 12px;
}

.date-switcher-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 38px;
  padding: 7px 12px;
  text-align: left;
}

.nav-toggle:hover,
.nav-toggle:focus-visible,
.date-switcher-toggle:hover,
.date-switcher-toggle:focus-visible {
  border-color: var(--teal);
  outline: none;
}

.active-day-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.date-toggle-action {
  flex: 0 0 auto;
  color: var(--teal);
}

.brand {
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  font-size: 0.95rem;
}

.nav a {
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
}

.nav a:hover,
.nav a:focus-visible {
  background: #ede7da;
  color: var(--ink);
  outline: none;
}

.hero {
  min-height: min(700px, 72vh);
  display: grid;
  align-items: end;
  padding: clamp(48px, 9vw, 96px) clamp(20px, 5vw, 72px);
  background:
    linear-gradient(90deg, rgba(20, 30, 34, 0.76), rgba(20, 30, 34, 0.38) 48%, rgba(20, 30, 34, 0.05)),
    url("./assets/route-map.png") center / cover no-repeat;
}

.hero-copy {
  max-width: 850px;
  color: #fffdf6;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.34);
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--yellow);
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 10ch;
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5.9rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.lead {
  max-width: 720px;
  margin: 20px 0 0;
  font-size: clamp(1rem, 2vw, 1.24rem);
  color: #fff7df;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
  text-shadow: none;
}

.button.primary {
  background: var(--yellow);
  color: #1e2528;
}

.button.secondary {
  border-color: rgba(255, 255, 255, 0.76);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.section {
  padding: clamp(44px, 7vw, 76px) clamp(18px, 5vw, 72px);
}

.band {
  background: #eef4f1;
}

.section-heading {
  max-width: 900px;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: 0;
}

.overview-grid,
.card-grid,
.restaurant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.overview-card,
.market-card,
.restaurant-card,
.info-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.overview-card {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.overview-card h3,
.market-card h3,
.restaurant-card h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.35;
}

.overview-card p,
.market-card p,
.restaurant-card p,
.info-item p {
  margin: 0;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e8f0ef;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
}

.day-tabs {
  display: flex;
  gap: 8px;
  padding-bottom: 14px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.day-tabs.compact {
  padding-bottom: 0;
}

.day-tab {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 10px 14px;
}

.day-tabs.compact .day-tab {
  min-width: 76px;
  min-height: 38px;
  padding: 8px 12px;
}

.day-tab[aria-selected="true"] {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.day-panel {
  display: grid;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

#days {
  scroll-margin-top: calc(var(--topbar-height) + 66px);
}

.day-heading {
  display: grid;
  gap: 8px;
}

.day-heading h3 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  padding: 5px 9px;
  border-radius: 999px;
  background: #f2ead6;
  color: #7a5710;
  font-size: 0.82rem;
  font-weight: 800;
}

.day-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.75fr);
  gap: 18px;
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-row {
  display: grid;
  grid-template-columns: minmax(100px, 150px) minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid #e5dece;
  border-radius: 8px;
  background: #fbfaf6;
}

.time {
  color: var(--red);
  font-weight: 900;
}

.timeline-row h4 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.timeline-row p {
  margin: 0;
  color: var(--muted);
}

.side-box {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px;
  border: 1px solid #d9d2c3;
  border-radius: 8px;
  background: #f7fbfb;
}

.side-box h4 {
  margin: 0;
}

.side-box ul,
.checklist ul {
  margin: 0;
  padding-left: 1.2rem;
}

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 5vw, 48px);
  align-items: start;
}

.stack-list {
  display: grid;
  gap: 10px;
}

.info-item {
  padding: 14px;
}

.info-item strong {
  display: block;
  margin-bottom: 4px;
}

.market-card,
.restaurant-card {
  padding: 16px;
}

.table-wrap {
  margin: 24px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid #e5dece;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f6ecd5;
  color: #523b11;
}

tr:last-child td {
  border-bottom: 0;
}

.checklist,
.link-list {
  display: grid;
  gap: 12px;
}

.link-list a {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.link-list a:hover,
.link-list a:focus-visible {
  border-color: var(--teal);
  outline: none;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 22px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 860px) {
  .topbar {
    gap: 8px;
  }

  .nav {
    justify-content: flex-start;
  }

  .hero {
    min-height: 620px;
    align-items: end;
    background-position: center;
  }

  .hero h1 {
    max-width: 8ch;
  }

  .day-grid,
  .split {
    grid-template-columns: 1fr;
  }

  .timeline-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .section,
  .hero {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .button {
    min-height: 46px;
  }
}
