:root {
  color-scheme: light;
  --ink: #13201d;
  --muted: #5b6f69;
  --line: #d8e5e0;
  --paper: #fbf8ef;
  --panel: #ffffff;
  --teal: #0f766e;
  --teal-dark: #115e59;
  --sand: #f2d9a0;
  --coral: #e76f51;
  --sky: #d9eef2;
  --shadow: 0 20px 50px rgba(18, 32, 29, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

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

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.section {
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto;
  padding: 58px 0;
}

.view-panel {
  display: none;
}

.view-panel:not(.active) {
  display: none !important;
}

.view-panel.active {
  display: grid;
}

#itinerary.view-panel.active,
#transport.view-panel.active,
#booking.view-panel.active {
  display: block;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: 100vh;
}

.hero-copy h1 {
  margin: 8px 0 18px;
  font-size: clamp(42px, 8vw, 88px);
  line-height: 1;
}

.eyebrow,
.label {
  margin: 0;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lead {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(18px, 2.2vw, 22px);
}

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

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--teal);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 900;
}

.button.primary {
  background: var(--teal);
  color: #fff;
}

.button.ghost {
  color: var(--teal-dark);
}

.trip-card,
.panel,
.booking-card,
.day-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.trip-card {
  overflow: hidden;
}

.trip-card::before {
  display: block;
  height: 220px;
  background:
    linear-gradient(rgba(15, 118, 110, 0.15), rgba(19, 32, 29, 0.36)),
    url("./assets/fukuoka-momochi.jpg") center/cover;
  content: "";
}

.trip-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 0;
  color: var(--muted);
}

.trip-card-head strong {
  color: var(--ink);
  font-size: 20px;
}

.quick-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 20px 0 0;
  background: var(--line);
}

.quick-facts div {
  min-height: 100px;
  padding: 18px;
  background: #fff;
}

.quick-facts dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.quick-facts dd {
  margin: 4px 0 0;
  font-size: 18px;
  font-weight: 900;
}

.grid-two,
.transport-grid,
.booking-grid {
  display: grid;
  gap: 18px;
}

.grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.transport-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.booking-grid {
  grid-template-columns: 1.1fr 0.9fr;
}

.panel {
  padding: 24px;
}

.panel h2,
.panel h3,
.booking-card h3 {
  margin: 6px 0 10px;
  line-height: 1.25;
}

.panel p,
.booking-card p {
  margin: 0;
  color: var(--muted);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.section-head h2 {
  margin: 4px 0 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.1;
}

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

.filter {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  padding: 8px 14px;
}

.filter.active {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.days {
  display: grid;
  gap: 16px;
}

.day-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  overflow: hidden;
}

.day-meta {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
  background: var(--teal);
  color: #fff;
}

.day-meta .date {
  font-size: 30px;
  font-weight: 950;
  line-height: 1;
}

.day-meta .weekday {
  opacity: 0.8;
  font-weight: 800;
}

.tag {
  align-self: flex-start;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 900;
}

.day-body {
  padding: 22px;
}

.day-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.day-title h3 {
  margin: 0;
  font-size: 25px;
  line-height: 1.2;
}

.route {
  border-radius: 8px;
  background: var(--sky);
  color: var(--teal-dark);
  font-size: 14px;
  font-weight: 900;
  padding: 7px 10px;
  white-space: nowrap;
}

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

.timeline li {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.map-item {
  display: grid;
  grid-template-columns: 116px 76px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border-radius: 8px;
  padding: 10px;
  margin: -10px;
}

.map-item:hover,
.map-item:focus-visible {
  background: #f4faf8;
  outline: none;
}

.place-thumb {
  width: 116px;
  height: 82px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  background: var(--sky);
}

.time {
  color: var(--coral);
  font-weight: 950;
}

.item strong {
  display: block;
}

.item span {
  display: block;
  color: var(--muted);
}

.item .transfer {
  margin-top: 7px;
  color: var(--teal-dark);
  font-size: 14px;
  font-weight: 800;
}

.item .transfer::before {
  content: "交通 ";
  color: var(--coral);
  font-weight: 950;
}

.map-hint {
  align-self: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  padding: 3px 7px;
}

.booking-card {
  display: grid;
  align-content: start;
  gap: 18px;
  overflow: hidden;
  padding: 22px;
}

.booking-card img {
  width: 100%;
  max-height: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  object-position: top left;
}

.notes {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 18px;
}

.notes ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.notes li + li {
  margin-top: 8px;
}

.source-panel {
  display: grid;
  align-content: start;
  gap: 10px;
}

.source-panel a {
  color: var(--teal-dark);
  font-weight: 900;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 26px clamp(18px, 4vw, 56px) 110px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.bottom-nav {
  position: fixed;
  right: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  width: min(420px, calc(100% - 36px));
  margin: 0 auto;
  border: 1px solid rgba(216, 229, 224, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 40px rgba(18, 32, 29, 0.16);
  backdrop-filter: blur(14px);
  padding: 6px;
}

.bottom-nav a {
  display: grid;
  min-height: 48px;
  place-items: center;
  border-radius: 6px;
  color: var(--muted);
}

.bottom-nav a:hover,
.bottom-nav a:focus-visible,
.bottom-nav a.active {
  background: var(--sky);
  color: var(--teal-dark);
  outline: none;
}

.bottom-nav svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
}

@media (max-width: 900px) {
  .hero,
  .grid-two,
  .transport-grid,
  .booking-grid,
  .notes,
  .day-card {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 44px;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .day-meta {
    flex-direction: row;
    align-items: center;
  }
}

@media (max-width: 640px) {
  .section {
    width: min(100% - 24px, 1160px);
    padding: 42px 0;
  }

  .quick-facts,
  .map-item {
    grid-template-columns: 1fr;
  }

  .place-thumb {
    width: 100%;
    height: 170px;
  }

  .map-hint {
    justify-self: start;
  }

  .route {
    white-space: normal;
  }

  .footer {
    flex-direction: column;
  }

  .bottom-nav {
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: calc(100% - 24px);
  }

  .bottom-nav a {
    min-height: 46px;
  }
}
