:root {
  color-scheme: light;
  --ink: #17201c;
  --muted: #60706a;
  --paper: #fbf7ef;
  --panel: #fffdf8;
  --jade: #34776b;
  --jade-dark: #20564d;
  --cinnabar: #b84d35;
  --gold: #c79038;
  --sky: #d9e9ee;
  --line: rgba(23, 32, 28, 0.12);
  --shadow: 0 22px 70px rgba(31, 42, 36, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 12% 8%, rgba(52, 119, 107, 0.16), transparent 32rem),
    linear-gradient(135deg, #f8efe2 0%, #e7eff0 48%, #f7f0e4 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
}

.shell {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  padding: 24px 0 34px;
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 6vh, 76px);
}

.topbar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px 0 28px;
}

.topbar a,
.ghost-button,
.language-toggle {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.72);
  color: var(--ink);
  text-decoration: none;
  padding: 9px 15px;
  box-shadow: 0 8px 24px rgba(31, 42, 36, 0.06);
  cursor: pointer;
}

.topbar a:hover,
.ghost-button:hover,
.language-toggle:hover {
  border-color: rgba(184, 77, 53, 0.42);
  transform: translateY(-1px);
}

.language-toggle[aria-pressed="true"] {
  border-color: rgba(52, 119, 107, 0.38);
  background: rgba(52, 119, 107, 0.12);
  color: var(--jade-dark);
  font-weight: 800;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(460px, 1.15fr);
  align-items: center;
  gap: 32px;
}

.hero-copy {
  padding: 28px 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--cinnabar);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 8ch;
  margin-bottom: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4.2rem, 11vw, 9rem);
  line-height: 0.88;
  font-weight: 500;
}

h2 {
  margin-bottom: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1;
  font-weight: 500;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.15rem;
}

.lede {
  margin-bottom: 30px;
  color: var(--muted);
  font-size: clamp(1.3rem, 2.6vw, 2rem);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 520px;
}

.hero-stats div,
.panel-inner,
.route-board,
.controls,
.calendar-section,
.photos,
.notes {
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 253, 248, 0.76);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-stats div {
  min-height: 94px;
  border-radius: 8px;
  padding: 16px;
}

.hero-stats strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.4rem;
  line-height: 0.95;
}

.hero-stats span,
.route-header,
.card-meta,
figcaption {
  color: var(--muted);
  font-size: 0.86rem;
}

.route-board {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.92), rgba(217, 233, 238, 0.84));
  isolation: isolate;
}

.route-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.travel-list {
  display: grid;
  gap: 9px;
  margin-top: 18px;
}

.travel-card {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(32, 86, 77, 0.1);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.72);
  padding: 12px;
}

.travel-card.featured {
  border-color: rgba(184, 77, 53, 0.28);
  background: rgba(184, 77, 53, 0.08);
}

.travel-card strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 1rem;
}

.travel-card p,
.travel-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.travel-card p {
  font-size: 0.9rem;
}

.travel-leg {
  color: var(--cinnabar);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.travel-note {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  font-size: 0.86rem;
}

.controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 190px 170px;
  gap: 12px;
  align-items: end;
  margin: 12px 0 26px;
  border-radius: 8px;
  padding: 14px;
}

.field label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.field input,
.field select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  padding: 10px 12px;
  outline: none;
}

.field input:focus,
.field select:focus {
  border-color: rgba(52, 119, 107, 0.72);
  box-shadow: 0 0 0 4px rgba(52, 119, 107, 0.12);
}

.layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.summary-panel {
  position: sticky;
  top: 18px;
}

.panel-inner {
  border-radius: 8px;
  padding: 24px;
}

#detailDate,
#detailText {
  color: var(--muted);
  line-height: 1.6;
}

.detail-travel,
.card-travel {
  border-radius: 8px;
  background: rgba(52, 119, 107, 0.1);
  color: var(--jade-dark);
  font-weight: 800;
  line-height: 1.45;
}

.detail-travel {
  margin-bottom: 16px;
  padding: 10px 12px;
}

.detail-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag {
  border-radius: 999px;
  background: rgba(184, 77, 53, 0.1);
  color: #7c3527;
  padding: 6px 9px;
  font-size: 0.78rem;
  font-weight: 800;
}

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

#resultCount {
  color: var(--muted);
  font-weight: 800;
}

.cards {
  display: grid;
  gap: 12px;
}

.card {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.82);
  padding: 14px;
  box-shadow: 0 14px 40px rgba(31, 42, 36, 0.08);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.card:hover,
.card.is-active {
  border-color: rgba(52, 119, 107, 0.42);
  background: rgba(255, 253, 248, 0.98);
  transform: translateY(-2px);
}

.date-box {
  min-height: 70px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--panel);
  display: grid;
  place-items: center;
  text-align: center;
  line-height: 1;
}

.date-box strong {
  display: block;
  margin-top: 2px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.9rem;
  font-weight: 500;
}

.date-box span {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.card-copy {
  min-width: 0;
}

.card-copy p {
  margin-bottom: 10px;
  color: var(--muted);
  line-height: 1.5;
}

.card-copy .card-travel {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 7px 10px;
  color: var(--jade-dark);
  font-size: 0.88rem;
}

.card-meta {
  margin-bottom: 7px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.calendar-section {
  margin: 10px 0 26px;
  border-radius: 8px;
  padding: 22px;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0 0 18px;
}

.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.swatch {
  width: 13px;
  height: 13px;
  border: 1px solid var(--day-line);
  border-radius: 999px;
  background: var(--day-bg);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.month-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.66);
  padding: 14px;
}

.month-card h3 {
  margin-bottom: 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-weight: 500;
}

.weekday-row,
.month-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.weekday-row {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.calendar-day {
  --day-bg: rgba(255, 253, 248, 0.72);
  --day-line: rgba(23, 32, 28, 0.14);
  --day-text: var(--ink);
  min-height: 68px;
  border: 1px solid var(--day-line);
  border-radius: 8px;
  background: var(--day-bg);
  color: var(--day-text);
  padding: 8px;
  overflow: hidden;
}

.calendar-day strong {
  display: block;
  margin-bottom: 5px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  line-height: 1;
}

.calendar-day span {
  display: block;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.15;
}

.calendar-day.has-entry {
  cursor: pointer;
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.calendar-day.has-entry:hover,
.calendar-day.has-entry:focus-visible,
.calendar-day.is-active-day {
  box-shadow: inset 0 0 0 2px rgba(23, 32, 28, 0.46), 0 10px 24px rgba(31, 42, 36, 0.12);
  outline: none;
  transform: translateY(-1px);
}

.calendar-day.is-today {
  box-shadow: inset 0 0 0 3px var(--gold), 0 10px 24px rgba(31, 42, 36, 0.14);
}

.calendar-day.is-muted {
  opacity: 0.34;
}

.calendar-day.is-empty {
  border-color: transparent;
  background: transparent;
}

.is-travel {
  --day-bg: #f1ded4;
  --day-line: rgba(184, 77, 53, 0.45);
  --day-text: #4c2218;
}

.is-shanghai {
  --day-bg: #d8eadf;
  --day-line: rgba(52, 119, 107, 0.45);
  --day-text: #143f37;
}

.is-deqing {
  --day-bg: #e5ebc8;
  --day-line: rgba(99, 130, 47, 0.42);
  --day-text: #34451e;
}

.is-hangzhou {
  --day-bg: #d9e9ee;
  --day-line: rgba(78, 136, 151, 0.45);
  --day-text: #234f59;
}

.is-nantong {
  --day-bg: #f2e3bd;
  --day-line: rgba(199, 144, 56, 0.48);
  --day-text: #5a3b0c;
}

.is-beijing {
  --day-bg: #eed2ca;
  --day-line: rgba(151, 63, 47, 0.44);
  --day-text: #552519;
}

.is-hainan {
  --day-bg: #cfe6e3;
  --day-line: rgba(38, 126, 116, 0.42);
  --day-text: #164942;
}

.lightbox[hidden] {
  display: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 28px;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 21, 0.72);
  backdrop-filter: blur(8px);
}

.lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(1040px, 100%);
  max-height: min(86vh, 820px);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
}

.lightbox-panel img {
  width: 100%;
  height: 100%;
  max-height: calc(86vh - 94px);
  display: block;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  background: #101713;
}

.lightbox-panel figcaption {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 14px 18px 16px;
  background: rgba(255, 253, 248, 0.96);
}

.lightbox-panel figcaption strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.6rem;
  color: var(--ink);
}

.lightbox-panel figcaption span {
  color: var(--muted);
}

.lightbox-panel figcaption a {
  width: fit-content;
  color: var(--jade-dark);
  font-size: 0.85rem;
  font-weight: 900;
  text-decoration: none;
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 999px;
  background: rgba(17, 24, 21, 0.78);
  color: white;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

body.is-lightbox-open {
  overflow: hidden;
}

.photos,
.notes {
  margin: 48px 0 70px;
  border-radius: 8px;
  padding: 22px;
}

.photos {
  margin-bottom: 28px;
}

.section-heading {
  margin-bottom: 18px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.hero-photos {
  margin: 0;
  padding: 18px;
}

.hero-photos h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.45rem);
}

.hero-photos .photo-grid {
  gap: 10px;
}

.photo-card {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--sky);
  cursor: zoom-in;
}

.photo-card img {
  height: 100%;
  min-height: 300px;
  border: 0;
  border-radius: 0;
  aspect-ratio: auto;
  transition: transform 180ms ease;
}

.photo-card:hover img {
  transform: scale(1.035);
}

.photo-card:focus-visible {
  box-shadow: 0 0 0 3px rgba(184, 77, 53, 0.35);
  outline: none;
}

.photo-card figcaption {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: grid;
  gap: 3px;
  margin: 0;
  border-radius: 8px;
  padding: 10px 11px;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.86);
  box-shadow: 0 14px 30px rgba(22, 40, 36, 0.12);
  backdrop-filter: blur(16px);
}

.photo-card figcaption strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  line-height: 1;
}

.photo-card figcaption span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.25;
}

.photo-card figcaption a {
  width: fit-content;
  color: var(--jade-dark);
  font-size: 0.78rem;
  font-weight: 900;
  text-decoration: none;
}

.hero-photos .photo-card,
.hero-photos .photo-card img {
  min-height: 180px;
}

.travel-section {
  margin: 48px 0 28px;
}

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

.note-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

figure {
  margin: 0;
}

figure img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--sky);
}

figcaption {
  margin-top: 8px;
  font-weight: 800;
}

.empty {
  border: 1px dashed rgba(23, 32, 28, 0.24);
  border-radius: 8px;
  padding: 28px;
  color: var(--muted);
  background: rgba(255, 253, 248, 0.62);
}

@media (max-width: 920px) {
  .hero {
    min-height: auto;
  }

  .hero-grid,
  .layout,
  .calendar-grid,
  .photo-grid,
  .travel-section .travel-list,
  .note-grid {
    grid-template-columns: 1fr;
  }

  .photo-card,
  .photo-card img {
    min-height: 260px;
  }

  .route-board {
    min-height: auto;
  }

  .summary-panel {
    position: static;
  }

  .controls {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 20px, 1220px);
  }

  .topbar {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 18px;
  }

  .hero-stats,
  .controls,
  .card {
    grid-template-columns: 1fr;
  }

  .calendar-section {
    padding: 16px;
  }

  .month-card {
    padding: 10px;
  }

  .weekday-row,
  .month-days {
    gap: 4px;
  }

  .calendar-day {
    min-height: 54px;
    padding: 6px;
  }

  .calendar-day span {
    font-size: 0.64rem;
  }

  .lightbox {
    padding: 14px;
  }

  .lightbox-panel figcaption {
    padding: 12px;
  }

  .photo-card,
  .photo-card img {
    min-height: 230px;
  }

  .route-board {
    padding: 14px;
  }

  .route-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .timeline-header {
    align-items: start;
    flex-direction: column;
  }

}
