:root {
  --bg: #f6f1e8;
  --surface: rgba(255, 251, 245, 0.8);
  --surface-strong: #fffdf8;
  --ink: #1f1a17;
  --muted: #6d635b;
  --line: rgba(86, 62, 38, 0.14);
  --red: #b6462f;
  --brown: #8a5a3b;
  --green: #6c7a73;
  --gold: #d6a24a;
  --shadow: 0 20px 50px rgba(73, 45, 24, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(214, 162, 74, 0.18), transparent 24%),
    radial-gradient(circle at 82% 14%, rgba(182, 70, 47, 0.14), transparent 18%),
    linear-gradient(180deg, #fbf7f0 0%, var(--bg) 100%);
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-grain {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.24;
  pointer-events: none;
  z-index: -3;
}

.glow {
  position: fixed;
  border-radius: 999px;
  filter: blur(12px);
  pointer-events: none;
  z-index: -2;
  animation: float 10s ease-in-out infinite;
}

.glow-a {
  width: 360px;
  height: 360px;
  left: -60px;
  top: -40px;
  background: rgba(214, 162, 74, 0.18);
}

.glow-b {
  width: 320px;
  height: 320px;
  right: -80px;
  top: 120px;
  background: rgba(182, 70, 47, 0.16);
  animation-delay: 1.5s;
}

.glow-c {
  width: 280px;
  height: 280px;
  left: 28%;
  bottom: 4%;
  background: rgba(108, 122, 115, 0.14);
  animation-delay: 2.8s;
}

#app {
  width: min(1440px, calc(100vw - 28px));
  margin: 14px auto 28px;
}

.site-shell {
  display: grid;
  gap: 22px;
}

.hero,
.section-grid,
.story-sections,
.site-footer {
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: var(--surface);
  backdrop-filter: blur(10px);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: 22px;
  padding: 26px;
}

.hero-copy h1,
.section-head h2,
.detail-hero h2 {
  margin: 0;
  font-family: "Noto Serif SC", "Songti SC", "STSong", serif;
  line-height: 1.08;
  letter-spacing: 0.01em;
}

.hero-copy h1 {
  font-size: clamp(2.4rem, 6vw, 4.75rem);
  max-width: 11ch;
}

.hero-kicker,
.eyebrow {
  margin: 0 0 10px;
  color: var(--red);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.hero-text,
.section-note,
.food-summary,
.story-card p,
.feature-card p,
.detail-story,
.site-footer p {
  color: var(--muted);
  line-height: 1.75;
}

.hero-text {
  max-width: 54ch;
  margin: 16px 0 0;
  font-size: 1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.primary-link,
.secondary-link {
  border-radius: 999px;
  padding: 12px 18px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.primary-link {
  background: linear-gradient(135deg, var(--red), #cf6b47);
  color: #fffaf5;
  box-shadow: 0 14px 28px rgba(182, 70, 47, 0.18);
}

.secondary-link {
  background: rgba(255, 255, 255, 0.65);
  border-color: var(--line);
  color: var(--ink);
}

.primary-link:hover,
.secondary-link:hover,
.food-card:hover {
  transform: translateY(-2px);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0 0;
}

.stats-grid div,
.feature-card,
.filters-card,
.map-card,
.list-column,
.detail-card,
.story-card {
  border: 1px solid var(--line);
  background: rgba(255, 252, 247, 0.88);
  border-radius: 22px;
}

.stats-grid div {
  padding: 16px;
}

.stats-grid dt {
  color: var(--muted);
  font-size: 0.86rem;
}

.stats-grid dd {
  margin: 10px 0 0;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 700;
}

.hero-panel {
  display: grid;
  gap: 14px;
}

.hero-panel-head h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2.8vw, 2rem);
}

.feature-grid,
.story-grid {
  display: grid;
  gap: 14px;
}

.feature-card,
.story-card {
  display: grid;
  grid-template-rows: minmax(28px, auto) minmax(72px, auto) 1fr;
  gap: 8px;
  padding: 18px;
  cursor: default;
}

.feature-card h3,
.story-card h3,
.food-card h3,
.list-head h3,
.detail-card h3 {
  margin: 0;
}

.feature-card h3,
.story-card h3 {
  font-size: 1.16rem;
  line-height: 1.45;
}

.feature-card .eyebrow,
.story-card .eyebrow,
.feature-card p,
.story-card p {
  margin: 0;
}

.section-grid {
  padding: 22px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 16px;
}

.section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
}

.section-head.compact {
  margin-bottom: 14px;
}

.section-note {
  max-width: 46ch;
  margin: 0;
  font-size: 0.92rem;
}

.filters-card {
  display: grid;
  grid-template-columns: 1.5fr repeat(7, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.status-banner {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(214, 162, 74, 0.28);
  background: rgba(214, 162, 74, 0.12);
  color: var(--brown);
}

.status-banner.error {
  border-color: rgba(182, 70, 47, 0.22);
  background: rgba(182, 70, 47, 0.1);
  color: var(--red);
}

.filters-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.85rem;
}

.filters-card input,
.filters-card select {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fffefb;
  padding: 11px 13px;
  color: var(--ink);
}

.filters-card input:focus,
.filters-card select:focus {
  outline: none;
  border-color: rgba(182, 70, 47, 0.48);
  box-shadow: 0 0 0 3px rgba(182, 70, 47, 0.1);
}

.atlas-layout {
  display: grid;
  grid-template-columns: minmax(340px, 1.05fr) minmax(280px, 0.9fr) minmax(320px, 0.85fr);
  gap: 16px;
  align-items: start;
}

.map-card,
.list-column,
.detail-card {
  padding: 16px;
}

.map-stage {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 46%, rgba(214, 162, 74, 0.17), transparent 28%),
    linear-gradient(180deg, rgba(255, 247, 235, 0.94), rgba(248, 241, 231, 0.92));
  border: 1px solid rgba(138, 90, 59, 0.16);
}

.map-outline {
  position: absolute;
  inset: 10% 8% 10% 8%;
  background:
    radial-gradient(circle at 18% 28%, rgba(182, 70, 47, 0.1), transparent 14%),
    radial-gradient(circle at 68% 40%, rgba(214, 162, 74, 0.15), transparent 18%),
    radial-gradient(circle at 58% 78%, rgba(108, 122, 115, 0.12), transparent 18%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.55), rgba(246, 233, 210, 0.4));
  clip-path: polygon(14% 27%, 27% 16%, 45% 12%, 57% 20%, 74% 17%, 88% 27%, 84% 45%, 92% 61%, 83% 71%, 76% 81%, 64% 88%, 50% 78%, 39% 80%, 24% 72%, 15% 62%, 9% 43%);
  opacity: 0.94;
}

.map-ridge {
  position: absolute;
  border-radius: 999px;
  border: 1px dashed rgba(108, 122, 115, 0.35);
}

.ridge-a {
  inset: 28% 24% 40% 22%;
}

.ridge-b {
  inset: 18% 12% 54% 42%;
}

.ridge-c {
  inset: 50% 36% 16% 18%;
}

.map-region {
  position: absolute;
  color: rgba(86, 62, 38, 0.58);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

.north {
  left: 59%;
  top: 21%;
}

.northwest {
  left: 20%;
  top: 29%;
}

.east {
  left: 71%;
  top: 43%;
}

.south {
  left: 58%;
  top: 72%;
}

.west {
  left: 27%;
  top: 61%;
}

.northeast {
  left: 77%;
  top: 12%;
}

.map-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 0;
  background: transparent;
  cursor: pointer;
}

.map-marker::before,
.map-marker::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
}

.map-marker::before {
  width: 16px;
  height: 16px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--red);
  box-shadow: 0 0 0 5px rgba(182, 70, 47, 0.12);
}

.map-marker::after {
  width: 34px;
  height: 34px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(182, 70, 47, 0.22);
  opacity: 0;
}

.map-marker span {
  position: relative;
  display: inline-block;
  margin-top: 24px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.94);
  border: 1px solid rgba(138, 90, 59, 0.15);
  color: var(--ink);
  font-size: 0.78rem;
  white-space: nowrap;
}

.map-marker.is-active::before {
  background: var(--gold);
  box-shadow: 0 0 0 8px rgba(214, 162, 74, 0.18);
}

.map-marker.is-active::after {
  opacity: 1;
  animation: pulse 2s infinite;
}

.map-caption {
  margin: 12px 2px 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.list-column,
.detail-column {
  display: grid;
  gap: 12px;
}

.food-list {
  display: grid;
  gap: 10px;
  max-height: 720px;
  overflow: auto;
  padding-right: 2px;
}

.list-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.list-head span {
  color: var(--muted);
  font-size: 0.86rem;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 2px;
}

.pagination-text {
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

.pagination-btn[disabled] {
  cursor: not-allowed;
  opacity: 0.52;
  transform: none;
}

.food-card {
  width: 100%;
  text-align: left;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fffdf9;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.food-card.is-active {
  border-color: rgba(182, 70, 47, 0.42);
  box-shadow: 0 12px 22px rgba(182, 70, 47, 0.12);
}

.food-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.food-card h3 {
  font-size: 1.08rem;
}

.food-scene,
.detail-badges span,
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
}

.food-scene,
.detail-badges span {
  border: 1px solid rgba(182, 70, 47, 0.18);
  background: rgba(182, 70, 47, 0.08);
  color: var(--red);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  border: 1px solid rgba(108, 122, 115, 0.18);
  background: rgba(108, 122, 115, 0.08);
  color: var(--green);
}

.detail-card {
  position: sticky;
  top: 16px;
}

.detail-hero {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}

.detail-hero h2 {
  font-size: clamp(1.8rem, 3.8vw, 2.65rem);
}

.detail-title {
  margin: 10px 0 0;
  color: var(--brown);
  font-size: 1rem;
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 8px;
}

.detail-story {
  margin: 18px 0;
}

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

.detail-grid section,
.detail-card section {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.detail-card h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.place-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.8;
}

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

.story-lane {
  display: grid;
  grid-template-rows: minmax(150px, auto) 1fr;
  gap: 12px;
}

.story-lane .section-head.compact {
  align-content: start;
  min-height: 150px;
}

.site-footer {
  padding: 18px 22px;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 20px;
  color: var(--muted);
  text-align: center;
}

@keyframes float {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -12px, 0);
  }
}

@keyframes pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0.9;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.35);
    opacity: 0;
  }
}

@media (max-width: 1180px) {
  .hero,
  .atlas-layout,
  .story-sections {
    grid-template-columns: 1fr;
  }

  .filters-card {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .detail-card {
    position: static;
  }
}

@media (max-width: 760px) {
  #app {
    width: min(100vw - 16px, 100%);
    margin: 8px auto 18px;
  }

  .hero,
  .section-grid,
  .story-sections,
  .site-footer {
    padding: 16px;
    border-radius: 22px;
  }

  .hero-copy h1 {
    max-width: none;
    font-size: clamp(2rem, 13vw, 3.2rem);
  }

  .stats-grid,
  .filters-card,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .section-head,
  .detail-hero,
  .food-card-head,
  .pagination {
    flex-direction: column;
    align-items: start;
  }

  .detail-badges {
    justify-content: start;
  }

  .map-stage {
    min-height: 420px;
  }

  .food-list {
    max-height: none;
  }
}
