/* Shared layout scale: consistent page edges, bounded media and a compact rhythm. */
:root {
  --layout-max: 90rem;
  --layout-gutter: clamp(1.25rem, 4.5vw, 4.5rem);
  --layout-width: min(calc(100% - 2 * var(--layout-gutter)), var(--layout-max));
  --layout-section: clamp(2.5rem, 4vw, 4rem);
  --type-display: clamp(2.25rem, 3.6vw, 3.75rem);
  --type-section: clamp(1.875rem, 2.9vw, 2.75rem);
  --type-subheading: clamp(1.25rem, 1.8vw, 1.75rem);
  --type-card: 1.125rem;
  --type-body: 1rem;
  --type-detail: .875rem;
  --plan-emblem-width: clamp(16.25rem, 25vw, 22.5rem);
}
*, *::before, *::after { box-sizing: border-box; }
.site-header, .page-shell, .explore-shell, .explore-footer,
.landing-page .hero, .destination-footer__inner {
  width: var(--layout-width);
  max-width: none;
  margin-inline: auto;
}
.site-header {
  padding: 1.25rem 0;
  gap: 1rem;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
}
.site-header .main-nav { width: 100%; min-width: 0; }
.site-header .main-nav a,
.site-header :is(.search, .search-box),
.site-header .login-button { min-height: 3.25rem; height: 3.25rem; }
.site-header .main-nav a { font-size: var(--type-nav); }
.section-heading { gap: clamp(.875rem, 1.5vw, 1.5rem); }
.section-heading img, .section-heading-map img, .section-heading-stories img,
.start-title-icon, .icon-start-plan {
  width: clamp(3rem, 4.2vw, 4rem);
  height: clamp(3rem, 4.2vw, 4rem);
  object-fit: contain;
}
.section-heading h1, .explore-shell h1, .hero-copy h1,
.profile-hero h1 { font-size: var(--type-display); line-height: 1.15; }
.section-heading h2, .explore-shell h2 { font-size: var(--type-section); line-height: 1.2; }
.category-card h2 { font-size: var(--type-subheading); line-height: 1.25; }
.lead-story h3, .story-card h3, .route-card__heading h4,
.explore-shell h3, .destination-footer__column h2 {
  font-size: var(--type-card);
  line-height: 1.4;
}
.explore-shell p, .story-description, .hero-copy p,
.destination-footer__column a { line-height: 1.65; }
.map-section { padding-top: 1.25rem; }

/* Destinations: preserve the alternating framed galleries at a readable scale. */
.map-list { margin-top: 2rem; gap: 2rem; }
.map-row { grid-template-columns: clamp(10rem, 16vw, 13rem) minmax(0, 1fr); gap: 1.75rem; }
.map-row-reverse { grid-template-columns: minmax(0, 1fr) clamp(10rem, 16vw, 13rem); }
.category-card img { height: clamp(7.5rem, 11vw, 10.5rem); }
.category-card h2 { margin-top: .75rem; }
.photo-frame { padding: 1.25rem; border-width: .375rem; }
.photo-frame::before, .photo-frame::after { width: 1.25rem; }
.photo-grid { gap: 1rem; }
.stories-section { padding-block: var(--layout-section); }
.stories-layout { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 2rem; margin-top: 1.5rem; }
.story-list { gap: 1.5rem; }
.story-card { gap: 1.25rem; }
.story-card > img { height: clamp(8rem, 10vw, 10rem); }
.story-category { margin-top: 1rem; margin-bottom: .5rem; }
.story-meta { margin-top: 1rem; }
.destination-subscribe { min-height: 25rem; padding-block: 3rem; }
.destination-subscribe__content { width: min(48rem, var(--layout-width)); margin-top: 2rem; }
.destination-subscribe__form { grid-template-columns: minmax(0, 1fr) 10rem; gap: 1rem; }
.destination-subscribe__form input, .destination-subscribe__form button { height: 3.5rem; }
.destination-footer { min-height: 0; padding: 3rem 0; }
.destination-footer__inner { gap: 2rem; }
.destination-footer__follow { margin: 2rem 0 1rem; }
.destination-footer__column h2 { margin-bottom: 1.25rem; }

/* Plan: contain the full map in the viewport and reduce the gaps between days. */
.map-display {
  width: 100%;
  height: clamp(17rem, calc(100svh - 17.5rem), 38rem);
  min-height: 0;
  margin: 1rem auto 0;
  display: grid;
  place-items: center;
}
.map-display > .changsha-map-image {
  width: auto;
  height: 100%;
  max-width: 100%;
  min-height: 0;
  object-fit: contain;
}
.map-effect-actions { margin-top: 1rem; }
.plan-section { padding-top: var(--layout-section); }
.travel-days { margin-top: 2rem; gap: 3.5rem; padding-bottom: var(--layout-section); }
.day-row, .day-row--reverse { gap: 2rem; }
.route-grid { gap: clamp(.75rem, 1.2vw, 1.25rem); }
.route-description { margin: .625rem 0 .75rem; min-height: 2.75rem; line-height: 1.45; }
.transport { min-height: 3.75rem; padding: .5rem; line-height: 1.45; }
.food-section { gap: 2rem; padding-bottom: var(--layout-section); }
.food-list { gap: 1rem; }

/* Recommendation, hotels and profile follow the same section rhythm. */
.explore-shell { margin-top: 1rem; margin-bottom: 3rem; }
.editorial-hero { min-height: clamp(22rem, 48svh, 30rem); }
.editorial-hero .hero-copy { max-width: 48rem; padding: clamp(1.5rem, 3.5vw, 3rem); }
.editorial-hero .hero-copy h1 { font-size: var(--type-display); }
.hero-copy p { margin-block: 1.25rem; }
.section-top { margin: var(--layout-section) 0 1.5rem; align-items: end; }
.experience-grid { gap: 2rem 1.5rem; margin-top: 1.5rem; }
.experience-card > img { height: clamp(12rem, 16vw, 17rem); }
.experience-card .card-copy { padding: 1rem .15rem; }
.card-copy p { margin: .5rem 0 1rem; }
.editorial-note { padding: 2rem; margin-top: var(--layout-section); gap: 2rem; }
.hotel-hero { gap: 2rem; padding-bottom: 0; }
.hotel-hero img { height: clamp(18rem, 37svh, 24rem); }
.intro { margin-top: 1.25rem; }
.search-panel { margin: 1.5rem 0; padding: 1.25rem; gap: .875rem; }
.stay-layout { margin-top: 2rem; gap: 1.5rem; }
.stay-grid { gap: 2rem 1.5rem; }
.stay-card > img { height: clamp(13rem, 17vw, 17rem); }
.stay-toolbar { margin: 0 0 1.25rem; }
.profile-hero { padding: 2rem; gap: 1.5rem; }
.avatar { width: 5rem; height: 5rem; margin-bottom: .75rem; }
.stats { margin-top: 1.5rem; gap: 2rem; }
.mine-tabs { margin: 2rem 0 1.5rem; }
.empty-state { padding: 2rem; }
.ink-panorama { height: 20rem; }
.ink-panorama-copy p { line-height: 1.4; }
.district-section { margin-top: var(--layout-section); }
.district-illustration { height: 20rem; }
.stay-guide { margin-top: var(--layout-section); padding: 2rem; gap: 2rem; }
.flavor-card, .district-card, .theme-route { padding: 1.5rem; }
.travel-desk .section-top { margin-top: var(--layout-section); }
.travel-journal { gap: 1.25rem; }
.explore-footer { margin-block: 2rem; padding: 1.5rem 0; }
dialog p { line-height: 1.65; }

@media (max-width: 1100px) {
  .site-header { grid-template-columns: minmax(0, 1fr) auto; }
  .site-header .header-actions { grid-column: 2; grid-row: 1; }
  .site-header .main-nav { grid-column: 1 / -1; grid-row: 2; }
  .landing-page .hero { grid-template-columns: minmax(0, .95fr) minmax(0, 1fr); }
  .map-display { height: clamp(17rem, calc(100svh - 21rem), 34rem); }
}
@media (min-width: 901px) and (max-width: 1200px) {
  .map-row, .map-row-reverse { grid-template-columns: 11rem minmax(0, 1fr); }
  .map-row-reverse .category-card { grid-column: 1; }
  .map-row-reverse .photo-frame { grid-column: 2; }
  .photo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .day-title, .food-heading { width: min(30rem, 100%); }
}
@media (max-width: 900px) {
  .landing-page .hero { grid-template-columns: 1fr; gap: 0; min-height: 0; }
  .landing-page .hero-copy { padding-top: 2rem; }
  .landing-page .city-journey { grid-column: 1; grid-row: 2; width: min(100%, 36rem); height: 28rem; min-height: 0; margin-inline: auto; }
  .map-row, .map-row-reverse { grid-template-columns: 1fr; gap: 1.25rem; }
  .map-row-reverse .category-card, .map-row-reverse .photo-frame { grid-column: 1; }
  .map-row-reverse .category-card { grid-row: 1; }
  .map-row-reverse .photo-frame { grid-row: 2; }
  .category-card { grid-template-columns: 6rem auto; justify-content: start; gap: 1rem; }
  .category-card img { height: 6rem; }
  .category-card h2 { margin: 0; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stories-layout { grid-template-columns: 1fr; }
  .day-title, .food-heading { width: min(30rem, 100%); }
  .destination-footer__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .destination-footer__brand { grid-column: 1 / -1; }
  .profile-hero { gap: 1.25rem; }
}
@media (max-width: 700px) {
  :root { --layout-gutter: 1.25rem; }
  .site-header { gap: .75rem; padding-block: 1rem; }
  .site-header .main-nav { grid-row: 2; }
  .site-header .header-actions { grid-column: 2; grid-row: 1; }
  .site-header .search-box, .site-header .search { width: 8rem; }
  .site-header .login-button { width: 4.5rem; }
  .landing-page .hero-copy { padding-block: 1.5rem; }
  .landing-page .hero h1 { font-size: clamp(2rem, 7.4vw, 3.5rem); }
  .landing-page .flower-outline { width: 7rem; top: 8rem; }
  .map-display { height: auto; aspect-ratio: 4 / 3; }
  .map-display > .changsha-map-image { width: 100%; height: auto; }
  .travel-days { gap: 2.5rem; }
  .route-grid { gap: 1.25rem; }
  .route-description { min-height: 0; }
  .food-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .food-card:nth-child(even) { transform: none; }
  .hotel-hero { gap: 1.5rem; }
  .hotel-hero img { height: 18rem; }
  .profile-hero, .editorial-note, .stay-guide { padding: 1.5rem; }
  .section-top { align-items: start; }
  .stay-grid { gap: 1.75rem; }
  .district-illustration, .ink-panorama { height: 18rem; }
  .destination-subscribe__form { grid-template-columns: 1fr; }
  .destination-subscribe { min-height: 22rem; }
  .destination-footer__inner { gap: 1.75rem; }
}
@media (max-width: 420px) {
  .site-header .search-box, .site-header .search { width: 7rem; }
  .site-header .login-button { width: 4rem; }
  .site-header .brand { font-size: 1.125rem; }
  .site-header .header-actions { gap: .5rem; }
  .site-header .main-nav a { font-size: .875rem; }
}
@media (max-width: 512px) {
  .site-header { grid-template-columns: minmax(0, 1fr) auto; }
  .site-header .header-actions { display: contents; }
  .site-header .login-button { grid-column: 2; grid-row: 1; width: 4.5rem; }
  .site-header :is(.search, .search-box) { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  .site-header .main-nav { grid-column: 1 / -1; grid-row: 3; }
  .site-header .main-nav a, .site-header :is(.search, .search-box),
  .site-header .login-button { height: 3rem; min-height: 3rem; }
}

/* Use the exact same image coordinate space for the map and its pop-up layer. */
.map-display { --map-height: clamp(17rem, calc(100svh - 17.5rem), 38rem); height: var(--map-height); }
.map-canvas { position: relative; isolation: isolate; width: min(100%, calc(var(--map-height) * 4 / 3)); aspect-ratio: 4 / 3; }
.map-canvas > .changsha-map-image { display: block; width: 100%; height: auto; }
@media (max-width: 1100px) { .map-display { --map-height: clamp(17rem, calc(100svh - 21rem), 34rem); } }
@media (max-width: 700px) { .map-display { height: auto; aspect-ratio: auto; } .map-canvas { width: 100%; } }
