:root {
  color-scheme: light;
  --ink: #17212b;
  --muted: #66717e;
  --line: #d8e0e7;
  --surface: #ffffff;
  --canvas: #f4f7f8;
  --teal: #0f766e;
  --teal-dark: #0b5b55;
  --teal-soft: #dff3ef;
  --blue: #1d5fa7;
  --blue-soft: #e8f1fb;
  --amber: #9a5b00;
  --amber-soft: #fff1ce;
  --red: #b42318;
  --red-soft: #fee4e2;
  --green: #287a45;
  --green-soft: #e5f4e9;
  --shadow: 0 8px 24px rgba(23, 33, 43, 0.08);
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Noto Sans CJK SC", sans-serif;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--canvas);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  padding-bottom: calc(74px + env(safe-area-inset-bottom));
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

button {
  color: inherit;
}

a {
  color: var(--blue);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 750;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 30px;
  place-items: center;
  color: white;
  background: var(--teal);
  border-radius: 6px;
  font-size: 12px;
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
}

.icon-button:hover {
  background: var(--teal-soft);
}

.icon-button svg,
.priority-strip svg,
.search-box svg,
.danger-note svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

main {
  width: min(100%, 1120px);
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: 322px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: url("./assets/kanas.jpg") center 48% / cover no-repeat;
}

.hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background: rgba(6, 26, 31, 0.48);
}

.hero-overlay {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 34px 20px 28px;
  color: white;
}

.eyebrow,
.section-kicker {
  margin: 0;
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.eyebrow {
  color: #d7f7ef;
}

h1 {
  margin: 8px 0 8px;
  max-width: 500px;
  font-size: 36px;
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-route {
  max-width: 700px;
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
  line-height: 1.6;
}

.hero-stats {
  display: flex;
  gap: 26px;
  margin-top: 24px;
}

.hero-stats div {
  display: flex;
  flex-direction: column;
  border-left: 2px solid rgba(255, 255, 255, 0.5);
  padding-left: 10px;
}

.hero-stats strong {
  font-size: 22px;
  line-height: 1;
}

.hero-stats span {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

.priority-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 12px 18px;
  background: var(--amber-soft);
  border-bottom: 1px solid #e7c779;
}

.priority-strip svg {
  flex: 0 0 auto;
  color: var(--amber);
}

.priority-strip div {
  min-width: 0;
}

.priority-strip span {
  display: block;
  color: var(--amber);
  font-size: 12px;
  font-weight: 700;
}

.priority-strip strong {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  line-height: 1.45;
}

.route-brief {
  padding: 22px 14px 4px;
  background: var(--canvas);
}

.route-brief-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.route-brief h2 {
  font-size: 22px;
}

.source-button {
  display: inline-flex;
  min-height: 42px;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  color: white;
  background: #17212b;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 750;
}

.source-button svg {
  width: 17px;
  height: 17px;
}

.route-rail {
  display: flex;
  gap: 0;
  margin: 16px -14px 0;
  padding: 2px 14px 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.route-rail::-webkit-scrollbar {
  display: none;
}

.route-stop {
  position: relative;
  display: grid;
  min-width: 88px;
  gap: 6px;
  place-items: center;
  color: #364250;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.route-stop:not(:last-child)::after {
  position: absolute;
  z-index: 0;
  top: 14px;
  right: -20px;
  width: 40px;
  height: 2px;
  content: "";
  background: #a8bcc2;
}

.route-dot {
  position: relative;
  z-index: 1;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: white;
  background: var(--teal);
  border: 3px solid var(--canvas);
  border-radius: 50%;
  font-size: 10px;
}

.correction-note {
  margin-top: 4px;
  overflow: hidden;
  background: #eef3f4;
  border: 1px solid #d5e0e2;
  border-radius: 8px;
}

.correction-note summary {
  padding: 13px 14px;
  cursor: pointer;
  list-style: none;
  font-size: 14px;
  font-weight: 750;
}

.correction-note summary::-webkit-details-marker {
  display: none;
}

.correction-note ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0 16px 15px 32px;
  color: #465461;
  font-size: 13px;
  line-height: 1.6;
}

.view {
  padding: 24px 14px 34px;
}

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

.section-kicker {
  color: var(--teal);
}

h2 {
  margin: 4px 0 0;
  font-size: 25px;
  line-height: 1.2;
  letter-spacing: 0;
}

.verified,
.total-price {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
}

.total-price {
  color: var(--teal-dark);
  font-size: 14px;
  font-weight: 750;
}

.search-row {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.search-box svg {
  color: var(--muted);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 3px;
  background: #e8edef;
  border-radius: 8px;
}

.segment {
  min-height: 38px;
  border: 0;
  background: transparent;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
}

.segment.active {
  color: var(--teal-dark);
  background: white;
  box-shadow: 0 1px 5px rgba(23, 33, 43, 0.12);
  font-weight: 700;
}

.day-list,
.attraction-list,
.stay-list,
.booking-list,
.kit-list {
  display: grid;
  gap: 12px;
}

.day-card,
.attraction-card,
.stay-card,
.booking-card,
.kit-group,
.sources {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(23, 33, 43, 0.04);
}

.day-card summary,
.sources summary {
  cursor: pointer;
  list-style: none;
}

.day-card summary::-webkit-details-marker,
.sources summary::-webkit-details-marker {
  display: none;
}

.day-summary {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 10px;
  min-height: 82px;
  padding: 13px 14px;
}

.day-number {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: white;
  background: var(--teal);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.day-main {
  min-width: 0;
}

.day-date {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.day-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.effort-tag {
  display: inline-flex;
  min-height: 22px;
  flex: 0 0 auto;
  align-items: center;
  padding: 2px 7px;
  color: #68430a;
  background: #fff0c9;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
}

.day-main h3 {
  margin: 4px 0 7px;
  overflow-wrap: anywhere;
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: 0;
}

.day-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.day-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.day-meta svg,
.chevron,
.action-button svg,
.nav-item svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.chevron {
  transition: transform 160ms ease;
}

.day-card[open] .chevron {
  transform: rotate(180deg);
}

.day-photo {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
}

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

.weather-chip {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  margin: 13px 0 0;
  padding: 9px 11px;
  color: #1a4f73;
  background: var(--blue-soft);
  border: 1px solid #c9dcef;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1.45;
}

.weather-chip svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.detail-block {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.detail-block:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.detail-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 9px;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 800;
}

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

.timeline li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px;
  font-size: 14px;
  line-height: 1.55;
}

.timeline time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.plain-list li,
.detail-block p {
  margin: 0;
  color: #364250;
  font-size: 14px;
  line-height: 1.65;
}

.inline-grid {
  display: grid;
  gap: 12px;
}

.inline-item strong {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.inline-item p {
  margin: 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 14px;
}

.action-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  border: 1px solid #b9ddd6;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.status,
.cost-tag,
.route-phase {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
}

.status.required {
  color: var(--red);
  background: var(--red-soft);
}

.status.suggested {
  color: var(--amber);
  background: var(--amber-soft);
}

.status.none {
  color: var(--green);
  background: var(--green-soft);
}

.cost-tag {
  color: var(--blue);
  background: var(--blue-soft);
}

.route-phase {
  color: var(--teal-dark);
  background: var(--teal-soft);
}

.attraction-card,
.stay-card,
.booking-card,
.kit-group {
  padding: 16px;
}

.card-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card-topline h3,
.stay-card h3,
.booking-card h3,
.kit-group h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: 0;
}

.card-date {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.cost-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 13px 0;
}

.route-copy {
  margin: 0;
  color: #364250;
  font-size: 14px;
  line-height: 1.65;
}

.info-pairs {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.info-pairs div {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 10px;
  font-size: 13px;
  line-height: 1.55;
}

.info-pairs dt {
  color: var(--muted);
}

.info-pairs dd {
  margin: 0;
}

.stay-card {
  display: grid;
  gap: 12px;
}

.stay-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.stay-date {
  color: var(--muted);
  font-size: 12px;
}

.stay-section {
  padding-top: 11px;
  border-top: 1px solid var(--line);
}

.stay-section strong {
  display: block;
  margin-bottom: 5px;
  color: var(--teal-dark);
  font-size: 12px;
}

.stay-section p {
  margin: 0;
  color: #364250;
  font-size: 14px;
  line-height: 1.6;
}

.stay-note {
  margin: 0;
  padding: 10px 12px;
  color: #68430a;
  background: var(--amber-soft);
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.55;
}

.action-button.secondary {
  color: #314657;
  background: #eef2f4;
  border-color: #d5dde2;
}

.booking-card {
  border-left: 4px solid var(--teal);
}

.booking-card.urgent {
  border-left-color: var(--red);
}

.booking-card.soon {
  border-left-color: var(--amber);
}

.booking-card p {
  margin: 8px 0 0;
  color: #364250;
  font-size: 14px;
  line-height: 1.6;
}

.booking-deadline {
  color: var(--muted);
  font-size: 12px;
}

.budget-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.budget-item {
  min-height: 88px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.budget-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.budget-item strong {
  display: block;
  margin-top: 8px;
  font-size: 20px;
  line-height: 1;
}

.weather-list {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.weather-card {
  padding: 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.weather-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.weather-card-top span {
  color: var(--muted);
  font-size: 11px;
}

.weather-card h3 {
  margin: 3px 0 0;
  font-size: 16px;
}

.weather-card-top svg {
  width: 22px;
  height: 22px;
  color: var(--blue);
}

.weather-card > strong {
  display: block;
  margin-top: 13px;
  font-size: 19px;
}

.weather-card p {
  margin: 7px 0 0;
  color: #465461;
  font-size: 13px;
  line-height: 1.55;
}

.kit-group ul {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.kit-group li {
  position: relative;
  padding-left: 16px;
  color: #364250;
  font-size: 14px;
  line-height: 1.55;
}

.kit-group li::before {
  position: absolute;
  top: 0.65em;
  left: 0;
  width: 6px;
  height: 6px;
  content: "";
  background: var(--teal);
  border-radius: 50%;
}

.danger-note {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding: 14px;
  color: var(--red);
  background: var(--red-soft);
  border: 1px solid #f4b8b3;
  border-radius: 8px;
}

.danger-note svg {
  flex: 0 0 auto;
}

.danger-note p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
}

.sources {
  margin-top: 14px;
  box-shadow: none;
}

.sources summary {
  padding: 15px;
  font-size: 14px;
  font-weight: 750;
}

.source-links {
  display: grid;
  gap: 9px;
  padding: 0 15px 15px;
}

.source-links a {
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.5;
}

.photo-credit {
  margin: 0;
  padding: 13px 15px 15px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.5;
}

.bottom-nav {
  position: fixed;
  z-index: 50;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  min-height: calc(66px + env(safe-area-inset-bottom));
  padding: 5px 6px env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.nav-item {
  display: flex;
  min-width: 0;
  min-height: 56px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
}

.nav-item.active {
  color: var(--teal-dark);
  background: var(--teal-soft);
  font-weight: 750;
}

.toast {
  position: fixed;
  z-index: 70;
  right: 18px;
  bottom: calc(86px + env(safe-area-inset-bottom));
  left: 18px;
  max-width: 420px;
  margin: auto;
  padding: 12px 15px;
  color: white;
  background: #15232b;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
  text-align: center;
  font-size: 13px;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.empty-state {
  padding: 42px 18px;
  color: var(--muted);
  text-align: center;
}

@media (min-width: 680px) {
  .topbar {
    padding: 0 24px;
  }

  .hero {
    min-height: 380px;
  }

  .hero-overlay {
    padding: 42px 38px 34px;
  }

  h1 {
    font-size: 46px;
  }

  .priority-strip {
    padding-right: 32px;
    padding-left: 32px;
  }

  .route-brief {
    padding: 28px 32px 4px;
  }

  .route-rail {
    margin-right: -32px;
    margin-left: -32px;
    padding-right: 32px;
    padding-left: 32px;
  }

  .view {
    padding: 32px;
  }

  .search-row {
    grid-template-columns: minmax(260px, 1fr) 270px;
  }

  .day-list,
  .attraction-list,
  .stay-list,
  .booking-list,
  .kit-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .day-content {
    min-height: 430px;
  }

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

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

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

@media (min-width: 1120px) {
  body {
    padding-bottom: 84px;
  }

  main {
    margin-top: 18px;
    margin-bottom: 24px;
    overflow: hidden;
    background: var(--canvas);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

  .bottom-nav {
    right: 50%;
    left: auto;
    width: min(700px, calc(100% - 40px));
    transform: translateX(50%);
    bottom: 12px;
    min-height: 64px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 359px) {
  .hero-overlay {
    padding-right: 16px;
    padding-left: 16px;
  }

  h1 {
    font-size: 32px;
  }

  .hero-stats {
    gap: 12px;
  }

  .hero-stats strong {
    font-size: 19px;
  }

  .day-summary {
    grid-template-columns: 44px minmax(0, 1fr) 18px;
    padding-right: 10px;
    padding-left: 10px;
  }

  .day-number {
    width: 42px;
    height: 46px;
    font-size: 11px;
  }

  .info-pairs div {
    grid-template-columns: 54px 1fr;
  }
}
