:root {
  color-scheme: light;
  --ink: #14231f;
  --muted: #65736f;
  --paper: #f5f3ed;
  --card: #fffefa;
  --line: #deddd5;
  --forest: #17352d;
  --forest-soft: #315d4f;
  --accent: #df6b3c;
  --accent-soft: #f7e5d9;
  --shadow: 0 16px 50px rgb(23 53 45 / 10%);
  --radius: 22px;
}

* { box-sizing: border-box; }

html {
  background: var(--paper);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 18%, rgb(223 107 60 / 8%), transparent 26rem),
    var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.55;
}

button, a { -webkit-tap-highlight-color: transparent; }

a { color: inherit; }

.skip-link {
  position: fixed;
  z-index: 9999;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  color: white;
  background: var(--forest);
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

:focus-visible {
  outline: 3px solid #f8b84e;
  outline-offset: 3px;
}

.hero {
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(130deg, rgb(23 53 45 / 97%), rgb(34 78 64 / 92%)),
    var(--forest);
  padding: calc(26px + env(safe-area-inset-top)) 18px 25px;
}

.hero__inner { max-width: 1180px; margin: 0 auto; }

.hero__eyebrow,
.section-kicker {
  margin: 0 0 5px;
  color: #e8b799;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-family: "Songti SC", "STSong", Georgia, serif;
  font-size: clamp(1.85rem, 8vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.16;
}

.hero h1 span { color: #e8b799; font-weight: 500; }

.hero__date {
  margin: 7px 0 16px;
  color: rgb(255 255 255 / 73%);
  font-size: 0.84rem;
  font-weight: 650;
  letter-spacing: 0.08em;
}

.hero__date span { margin: 0 5px; color: #e8b799; }

.hero__route {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 3px;
  color: rgb(255 255 255 / 85%);
  font-size: 0.72rem;
  scrollbar-width: none;
  white-space: nowrap;
}

.hero__route::-webkit-scrollbar,
.day-tabs::-webkit-scrollbar { display: none; }

.hero__route i {
  width: 13px;
  height: 1px;
  flex: 0 0 auto;
  background: rgb(232 183 153 / 65%);
}

.day-nav {
  position: sticky;
  z-index: 800;
  top: 0;
  border-bottom: 1px solid rgb(23 53 45 / 10%);
  background: rgb(245 243 237 / 92%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.day-tabs {
  display: flex;
  gap: 8px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

.day-tab {
  min-width: 48px;
  min-height: 44px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 13px;
  color: var(--ink);
  background: rgb(255 254 250 / 78%);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 750;
  cursor: pointer;
  transition: transform 160ms ease, color 160ms ease, background 160ms ease;
}

.day-tab[aria-selected="true"] {
  border-color: var(--tab-color, var(--forest));
  color: white;
  background: var(--tab-color, var(--forest));
  box-shadow: 0 6px 18px color-mix(in srgb, var(--tab-color, var(--forest)) 28%, transparent);
}

.app-shell {
  display: grid;
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 14px 32px;
}

.map-card,
.content-card,
.day-overview {
  overflow: hidden;
  border: 1px solid rgb(23 53 45 / 9%);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.map-card__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 18px 13px;
}

.map-card__heading h2,
.content-header h2,
.content-card h3 { margin: 0; line-height: 1.2; }

.map-card__heading h2 { font-family: "Songti SC", "STSong", Georgia, serif; font-size: 1.3rem; }

.map-legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.7rem;
  white-space: nowrap;
}

.map-legend i,
.route-swatch {
  display: inline-block;
  width: 18px;
  height: 4px;
  border-radius: 999px;
  background: var(--route-color, var(--forest-soft));
}

#map {
  width: 100%;
  height: clamp(340px, 48vh, 500px);
  border-block: 1px solid var(--line);
  background: #dfe9e2;
}

.route-status {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-height: 44px;
  padding: 12px 17px 9px;
  color: var(--forest-soft);
  font-size: 0.8rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-top: 6px;
  border-radius: 50%;
  background: #e49b3e;
  box-shadow: 0 0 0 4px rgb(228 155 62 / 14%);
}

.route-status[data-state="ready"] .status-dot { background: #27845c; }
.route-status[data-state="fallback"] .status-dot { background: #d88825; }
.route-status[data-state="error"] .status-dot { background: #bd3c3c; }

.map-disclaimer {
  margin: 0;
  padding: 0 17px 16px 34px;
  color: var(--muted);
  font-size: 0.72rem;
}

.trip-content {
  min-width: 0;
  scroll-margin-top: 76px;
}

.content-loading {
  display: grid;
  min-height: 180px;
  place-items: center;
  align-content: center;
  color: var(--muted);
}

.loading-mark {
  width: 28px;
  height: 28px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.content-header {
  padding: 4px 3px 14px;
}

.content-header__meta {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.content-header h2 {
  font-family: "Songti SC", "STSong", Georgia, serif;
  font-size: clamp(1.55rem, 6vw, 2.15rem);
  letter-spacing: -0.035em;
}

.content-header__note { margin: 9px 0 0; color: var(--muted); font-size: 0.82rem; }

.content-stack { display: grid; gap: 13px; }

.content-card { padding: 18px; box-shadow: 0 10px 32px rgb(23 53 45 / 7%); }

.content-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 1rem;
}

.card-icon {
  display: grid;
  width: 29px;
  height: 29px;
  border-radius: 9px;
  place-items: center;
  background: var(--accent-soft);
  font-size: 0.88rem;
}

.route-points { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }

.route-point {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

.route-point:not(:last-child)::after { content: "→"; margin-left: 3px; color: var(--muted); }

.timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.timeline::before { content: ""; position: absolute; top: 8px; bottom: 9px; left: 62px; width: 1px; background: var(--line); }

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 53px 1fr;
  gap: 19px;
  padding: 0 0 18px;
}

.timeline li:last-child { padding-bottom: 0; }
.timeline time { color: var(--muted); font-size: 0.7rem; font-weight: 750; line-height: 1.25; }

.timeline__body::before {
  content: "";
  position: absolute;
  left: 58px;
  top: 5px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--card);
  border-radius: 50%;
  background: var(--day-color, var(--accent));
  box-shadow: 0 0 0 2px var(--day-color, var(--accent));
}

.timeline strong { display: block; font-size: 0.88rem; line-height: 1.3; }
.timeline p { margin: 4px 0 0; color: var(--muted); font-size: 0.75rem; }

.item-grid { display: grid; gap: 9px; }

.item-card {
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 13px;
  background: #fff;
}

.item-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.item-card h4 { margin: 0; font-size: 0.9rem; }
.item-card__meta { margin: 2px 0 0; color: var(--muted); font-size: 0.68rem; }
.item-card__desc { margin: 8px 0 0; color: #46534f; font-size: 0.75rem; }

.badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 7px;
  color: var(--forest-soft);
  background: #e9f1ed;
  font-size: 0.62rem;
  font-weight: 750;
}

.badge--pending { color: #8b5a24; background: #fff0d9; }

.link-row,
.navigation-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }

.action-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--forest);
  border-radius: 12px;
  padding: 9px 12px;
  color: var(--forest);
  background: transparent;
  font-size: 0.74rem;
  font-weight: 750;
  text-decoration: none;
}

.action-link--primary { color: white; background: var(--forest); }
.action-link--warm { border-color: #bd5c35; color: #9e4525; background: #fff8f3; }

.notice-box {
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
  padding: 10px 12px;
  color: #594a42;
  background: #fff8f3;
  font-size: 0.75rem;
}

.notice-box p { margin: 0; }

.overview-list { display: grid; gap: 10px; }

.day-overview {
  position: relative;
  display: grid;
  grid-template-columns: 49px 1fr;
  gap: 12px;
  padding: 15px;
  box-shadow: 0 7px 24px rgb(23 53 45 / 6%);
  cursor: pointer;
}

.day-overview::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--day-color);
}

.day-overview__day { color: var(--day-color); font-size: 0.95rem; font-weight: 850; }
.day-overview h3 { margin: 0; font-size: 0.92rem; }
.day-overview p { margin: 4px 0 0; color: var(--muted); font-size: 0.72rem; }

.food-empty,
.empty-note { margin: 0; color: var(--muted); font-size: 0.77rem; }

.warning-text { color: #9d3f2d; font-weight: 750; }

.site-footer {
  padding: 12px 20px calc(28px + env(safe-area-inset-bottom));
  color: var(--muted);
  text-align: center;
  font-size: 0.66rem;
}

.site-footer p { margin: 2px 0; }

.noscript-plan {
  max-width: 760px;
  margin: 20px auto;
  padding: 20px;
  background: white;
}

.leaflet-popup-content { margin: 13px 15px; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; }
.leaflet-popup-content .popup-title { margin: 0 0 4px; font-weight: 800; }
.leaflet-popup-content .popup-meta { color: #65736f; font-size: 0.76rem; }
.leaflet-popup-content .popup-links { margin: 9px 0 0; font-size: 0.76rem; font-weight: 750; }
.leaflet-popup-content .popup-links a { color: #245c4c; }
.leaflet-control-attribution { font-size: 9px; }

.plan-marker-wrap,
.attraction-marker-wrap { background: transparent; border: 0; }

.plan-marker,
.attraction-marker {
  display: grid;
  width: 32px;
  height: 32px;
  border: 3px solid white;
  border-radius: 50%;
  place-items: center;
  color: white;
  background: var(--marker-color, var(--forest));
  box-shadow: 0 4px 12px rgb(20 35 31 / 32%);
  font-size: 0.72rem;
  font-weight: 850;
}

.attraction-marker {
  width: 28px;
  height: 28px;
  color: var(--marker-color, var(--accent));
  background: white;
  font-size: 0.68rem;
}

#map[data-map-unavailable="true"]::after {
  content: "地图暂不可用";
  display: grid;
  height: 100%;
  color: var(--muted);
  background: linear-gradient(135deg, #e2ebe5, #f3eee5);
  place-items: center;
  font-size: 0.85rem;
  font-weight: 750;
}

@media (hover: hover) {
  .day-tab:hover,
  .action-link:hover { transform: translateY(-1px); }
}

@media (min-width: 900px) {
  .hero { padding-inline: 32px; }
  .app-shell {
    grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
    align-items: start;
    gap: 22px;
    padding: 24px 24px 50px;
  }
  .map-card { position: sticky; top: 86px; }
  #map { height: min(64vh, 620px); }
  .item-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
