:root {
  --bg: #f4efe4;
  --bg-card: #fffcf7;
  --ink: #2c2419;
  --ink-muted: #6b5f52;
  --accent: #c45c26;
  --accent-soft: #e8a574;
  --sky: #3d6b8c;
  --sky-light: #7ba7c4;
  --line: rgba(44, 36, 25, 0.12);
  --shadow: 0 12px 40px rgba(44, 36, 25, 0.08);
  --radius: 18px;
  --nav-h: 64px;
  --font-serif: "Noto Serif SC", "Songti SC", "STSong", serif;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  background-image:
    radial-gradient(circle at 10% 0%, rgba(196, 92, 38, 0.06), transparent 40%),
    radial-gradient(circle at 90% 10%, rgba(61, 107, 140, 0.08), transparent 35%);
}

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

a {
  color: var(--sky);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

/* Nav */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  backdrop-filter: blur(12px);
  background: rgba(255, 252, 247, 0.88);
  border-bottom: 1px solid var(--line);
}

.site-nav .inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  color: var(--ink-muted);
  font-size: 0.92rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(196, 92, 38, 0.12);
  color: var(--accent);
  text-decoration: none;
}

/* Hero */
.hero {
  padding: 3rem 0 2rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(61, 107, 140, 0.12);
  color: var(--sky);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  margin: 0 0 0.75rem;
}

.hero-lead {
  color: var(--ink-muted);
  font-size: 1.05rem;
  max-width: 38ch;
  margin-bottom: 1.25rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.stat-pill {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.65rem 1rem;
  min-width: 120px;
}

.stat-pill strong {
  display: block;
  font-size: 1.1rem;
  color: var(--accent);
}

.stat-pill span {
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.hero-map {
  display: block;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 6px solid #fff;
  transform: rotate(-0.5deg);
  text-decoration: none;
  color: inherit;
}

.hero-map-link:hover {
  transform: rotate(0deg) scale(1.01);
  transition: transform 0.2s ease;
}

.hero-map img {
  width: 100%;
  display: block;
}

.hero-map-cta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.65rem 1rem;
  background: linear-gradient(transparent, rgba(20, 28, 40, 0.82));
  color: #fff;
  font-size: 0.85rem;
  text-align: center;
}

.route-box {
  margin-top: 1.5rem;
  background: var(--bg-card);
  border: 1px dashed var(--accent-soft);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre-wrap;
  color: var(--ink-muted);
}

.osrm-ref {
  margin-top: 1.5rem;
}

.osrm-ref-card {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 1.25rem;
  padding: 1.25rem;
  align-items: stretch;
}

.osrm-ref-badge {
  display: inline-block;
  margin: 0 0 0.5rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(196, 112, 58, 0.12);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
}

.osrm-ref-text h3 {
  margin: 0 0 0.65rem;
  font-family: "Noto Serif SC", serif;
  font-size: 1.25rem;
}

.osrm-ref-lead {
  margin: 0 0 0.85rem;
  color: var(--ink-muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.osrm-ref-points {
  margin: 0 0 1.1rem;
  padding-left: 1.1rem;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.7;
}

.osrm-ref-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.osrm-ref-preview {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: calc(var(--radius) - 4px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #f3f0ea;
  text-decoration: none;
}

.osrm-ref-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 260px;
}

.osrm-ref-preview-cta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.7rem 1rem;
  background: linear-gradient(transparent, rgba(20, 28, 40, 0.78));
  color: #fff;
  font-size: 0.85rem;
  text-align: center;
}

@media (max-width: 860px) {
  .osrm-ref-card {
    grid-template-columns: 1fr;
  }

  .osrm-ref-preview img {
    min-height: 220px;
  }
}

/* Sections */
section {
  padding: 3rem 0;
}

.section-head {
  margin-bottom: 1.75rem;
}

.section-head h2 {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  margin: 0 0 0.35rem;
}

.section-head p {
  margin: 0;
  color: var(--ink-muted);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Overview table */
.table-wrap {
  overflow-x: auto;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

table.data-table th,
table.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

table.data-table th {
  background: rgba(61, 107, 140, 0.08);
  font-weight: 600;
  white-space: nowrap;
}

table.data-table tr:hover td {
  background: rgba(196, 92, 38, 0.04);
}

/* Day nav pills */
.day-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.day-pill {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--ink);
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
}

.day-pill:hover,
.day-pill.active {
  border-color: var(--accent);
  background: rgba(196, 92, 38, 0.1);
  color: var(--accent);
}

/* Day switcher */
.day-switcher {
  padding: 1.25rem;
  overflow: hidden;
}

.day-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  background: rgba(61, 107, 140, 0.06);
}

.day-counter {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--sky);
  text-align: center;
  flex: 1;
}

.day-arrow {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--ink);
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.day-arrow:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(196, 92, 38, 0.08);
}

.day-arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.days-panel {
  position: relative;
  min-height: 320px;
}

/* Day detail */
.day-card {
  padding: 1.75rem;
  display: none;
  animation: dayFade 0.28s ease;
}

.day-card.is-active {
  display: block;
}

@keyframes dayFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.day-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.day-tag {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  background: var(--sky);
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
}

.day-header h3 {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  margin: 0;
  flex: 1;
}

.day-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.visual-card {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.visual-card img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  display: block;
}

.visual-card figcaption {
  padding: 0.6rem 0.85rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
  background: rgba(255, 255, 255, 0.85);
}

.schedule-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.schedule-list li {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.92rem;
}

.schedule-list li:last-child {
  border-bottom: none;
}

.schedule-list time {
  font-weight: 600;
  color: var(--accent);
  font-size: 0.85rem;
}

.notes {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(196, 92, 38, 0.08);
  font-size: 0.9rem;
}

.notes li {
  margin: 0.25rem 0;
}

/* Attractions */
.attractions-grid {
  display: grid;
  gap: 1.5rem;
}

.attraction {
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr;
  gap: 1.25rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  align-items: start;
}

.attraction-media {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.attraction-photo {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  max-height: 220px;
  background: #eee;
}

.attraction-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

.attraction-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
}

.attraction-photos img {
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  max-height: 72px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid var(--line);
  display: block;
  background: #eee;
}

.attraction-body {
  min-width: 0;
}

.attraction h4 {
  font-family: var(--font-serif);
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.attraction-intro {
  color: var(--ink-muted);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.meta-chip {
  font-size: 0.78rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: rgba(61, 107, 140, 0.1);
  color: var(--sky);
}

.attraction ul {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.9rem;
}

.attraction ul li {
  margin: 0.2rem 0;
}

.photo-credit {
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin-top: 0.5rem;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.85rem;
  grid-auto-flow: dense;
}

.gallery-item {
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.gallery-item.featured {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-item.featured img {
  aspect-ratio: 16/10;
}

.gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.gallery-item img {
  aspect-ratio: 4/3;
  object-fit: cover;
  width: 100%;
  height: 100%;
  min-height: 140px;
}

.gallery-item figcaption {
  padding: 0.55rem 0.65rem 0.65rem;
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.gallery-cat {
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 600;
}

.gallery-name {
  color: var(--ink);
  line-height: 1.35;
}

.gallery-source {
  font-size: 0.72rem;
  color: var(--sky);
  margin-top: 0.15rem;
}

.gallery-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.gallery-spot-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin: -0.35rem 0 1.25rem;
  padding: 0.75rem 0.85rem;
  background: rgba(196, 112, 58, 0.06);
  border: 1px solid rgba(196, 112, 58, 0.15);
  border-radius: var(--radius);
}

.gallery-spot-filter[hidden] {
  display: none;
}

.spot-filter-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  margin-right: 0.25rem;
}

.gallery-spot-filter .spot-pill {
  font-size: 0.78rem;
  padding: 0.28rem 0.65rem;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 16, 12, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-height: 88vh;
  max-width: min(1100px, 96vw);
  border-radius: 8px;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
}

/* Footer */
.site-footer {
  padding: 2rem 0 3rem;
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.88rem;
  border-top: 1px solid var(--line);
}

.map-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: var(--sky);
  color: #fff !important;
  font-size: 0.9rem;
  text-decoration: none !important;
}

.btn:hover {
  background: #2f5672;
}

.btn-outline {
  background: transparent;
  color: var(--sky) !important;
  border: 1px solid var(--sky);
}

.tk-home-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1.15rem 1.35rem;
  text-decoration: none !important;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tk-home-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.tk-home-card h3 {
  font-family: var(--font-serif);
  margin: 0.35rem 0 0.25rem;
  color: var(--ink);
  font-size: 1.15rem;
}

.tk-home-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.tk-home-card-cta {
  flex-shrink: 0;
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}

.subsection-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 1.25rem 0 0.65rem;
  color: var(--sky);
}

@media (max-width: 900px) {
  .hero-grid,
  .day-layout,
  .attraction {
    grid-template-columns: 1fr;
  }

  .attraction-media {
    max-width: 420px;
  }

  .attraction-photo {
    max-height: 240px;
  }

  .gallery-item.featured {
    grid-column: span 1;
    grid-row: span 1;
  }

  .day-controls {
    flex-wrap: wrap;
  }

  .day-counter {
    order: -1;
    width: 100%;
  }

  .schedule-list li {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .nav-links a {
    padding: 0.35rem 0.55rem;
    font-size: 0.82rem;
  }
}
