:root {
  --ink: #172233;
  --muted: #667485;
  --paper: #f6fbfb;
  --white: #ffffff;
  --porcelain: #fff9ef;
  --line: #dce8ea;
  --red: #e45d48;
  --jade: #149b8e;
  --gold: #f1b84b;
  --blue: #2f7edb;
  --charcoal: #18313f;
  --sky: #dff3f6;
  --mint: #e7f7f1;
  --shadow: 0 18px 48px rgba(23, 42, 58, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--paper);
  background-image:
    linear-gradient(90deg, rgba(47, 126, 219, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(20, 155, 142, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
}

body > * {
  max-width: 100%;
}

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

a {
  color: inherit;
}

.hero,
.detail-hero {
  min-height: 84vh;
  position: relative;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(90deg, rgba(18, 31, 43, 0.68), rgba(18, 31, 43, 0.42) 46%, rgba(18, 31, 43, 0.14)),
    linear-gradient(0deg, rgba(18, 31, 43, 0.68), rgba(18, 31, 43, 0.06) 46%),
    url("./assets/beijing-dining-hero.jpg") center / cover no-repeat;
  color: var(--white);
}

.detail-hero {
  min-height: 54vh;
}

.compact-hero {
  min-height: 44vh;
}

.nav {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  z-index: 2;
}

.brand,
.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-group {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand {
  flex: 0 1 auto;
  min-width: 0;
  text-decoration: none;
  font-weight: 800;
}

.page-switch {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  font-size: 0.86rem;
  font-weight: 900;
  text-decoration: none;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: var(--red);
  color: var(--white);
  font-weight: 900;
}

.nav-links {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
  font-size: 0.95rem;
}

.hero-content,
.detail-heading {
  width: min(1180px, calc(100% - 40px));
  margin: auto auto 9vh;
  padding: 80px 0 42px;
  position: relative;
  z-index: 2;
}

.hero-content::before,
.detail-heading::before {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.86);
  content: "BEIJING TASTE MAP / 北京";
  font-size: 0.72rem;
  font-weight: 900;
}

.detail-heading {
  margin-bottom: 6vh;
}

.eyebrow,
.kicker {
  margin: 0 0 12px;
  color: var(--red);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow {
  color: #f3c36d;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 790px;
  margin: 0 0 22px;
  font-size: clamp(2.75rem, 6.2vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4.8vw, 3.25rem);
  line-height: 1.05;
}

h3 {
  margin: 0 0 10px;
  font-size: 1.22rem;
  line-height: 1.15;
}

.hero-copy {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.16rem;
}

.hero-actions,
.toolbar,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button,
.filter,
.text-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 15px;
  border: 1px solid transparent;
  text-decoration: none;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  border-radius: 8px;
}

.button.primary {
  background: var(--red);
  color: var(--white);
}

.button.ghost {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.08);
}

.button.ghost.dark {
  color: var(--ink);
  border-color: var(--line);
  background: var(--white);
}

.section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 76px 0;
}

.intro-band,
.route-band,
.source-band,
.map-section {
  width: 100%;
  padding-left: max(20px, calc((100% - 1180px) / 2));
  padding-right: max(20px, calc((100% - 1180px) / 2));
}

.intro-band,
.source-band {
  background: var(--white);
}

.section-grid,
.section-heading,
.source-band {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(300px, 1fr);
  gap: 48px;
  align-items: end;
}

.section-heading {
  position: relative;
  margin-bottom: 30px;
  padding-left: 18px;
  border-left: 5px solid var(--red);
}

.section-heading p,
.section-grid p,
.source-band p,
.source-band li {
  color: var(--muted);
  font-size: 1.02rem;
}

.signal-grid {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.signal {
  min-height: 118px;
  padding: 22px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.signal span {
  display: block;
  color: var(--blue);
  font-size: 2rem;
  font-weight: 900;
}

.signal p {
  margin: 2px 0 0;
  color: var(--muted);
}

.toolbar {
  margin-bottom: 26px;
}

.filter {
  background: var(--white);
  color: var(--ink);
  border-color: var(--line);
}

.filter.is-active {
  background: var(--jade);
  color: var(--white);
  border-color: var(--jade);
}

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

.restaurant,
.detail-card,
.briefing article,
.route {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(23, 32, 42, 0.06);
}

.restaurant {
  position: relative;
  min-height: 430px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 5px solid var(--jade);
}

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

.tier-label {
  margin: 0 0 5px;
  color: var(--red);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.restaurant .cn {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.badge {
  flex: 0 0 auto;
  min-width: max-content;
  padding: 5px 8px;
  text-align: center;
  color: var(--white);
  background: var(--red);
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: rgba(46, 125, 107, 0.08);
  color: #21433e;
  border-radius: 6px;
  font-size: 0.84rem;
  font-weight: 700;
}

.why {
  color: #343638;
}

.rating-line {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.rating-line span {
  display: block;
  color: var(--gold);
  font-size: 1.05rem;
}

.rating-line small {
  color: var(--muted);
}

.text-link {
  align-self: flex-start;
  min-height: 38px;
  padding-left: 0;
  color: var(--blue);
}

.map-section {
  background:
    linear-gradient(135deg, rgba(223, 243, 246, 0.96), rgba(255, 246, 230, 0.96)),
    repeating-linear-gradient(45deg, rgba(47, 126, 219, 0.07) 0 1px, transparent 1px 18px);
}

.map-access {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 18px 48px rgba(45, 78, 96, 0.16);
}

.map-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(231, 247, 241, 0.92)),
    linear-gradient(90deg, rgba(47, 126, 219, 0.08) 1px, transparent 1px);
  background-size: auto, 32px 32px;
}

.map-actions strong {
  display: block;
  margin-bottom: 4px;
}

.map-actions p {
  margin: 0;
  color: var(--muted);
}

.map-buttons {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.tier-value {
  background: var(--jade);
}

.tier-general {
  background: var(--blue);
}

.tier-luxury {
  background: var(--red);
}

.map-legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.legend-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 2px 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  text-decoration: none;
}

.legend-item span {
  grid-row: span 2;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--jade);
  color: var(--white);
  font-weight: 900;
}

.legend-item.tier-general span {
  background: var(--blue);
}

.legend-item.tier-luxury span {
  background: var(--red);
}

.legend-item strong,
.legend-item small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.legend-item small {
  color: var(--muted);
}

.route-band {
  background:
    linear-gradient(135deg, rgba(24, 49, 63, 0.96), rgba(32, 87, 105, 0.94)),
    repeating-linear-gradient(90deg, transparent 0 44px, rgba(255, 255, 255, 0.08) 44px 46px);
  color: var(--white);
}

.route-band .kicker {
  color: #f3c36d;
}

.route-band .section-heading p {
  color: rgba(255, 255, 255, 0.75);
}

.route-grid,
.briefing-grid,
.media-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.route-grid.three {
  grid-template-columns: repeat(3, 1fr);
}

.route,
.briefing article {
  padding: 22px;
}

.route {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.22);
}

.route p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.76);
}

.briefing article p {
  color: var(--muted);
  margin-bottom: 0;
}

.source-band {
  border-top: 1px solid var(--line);
}

.source-band a {
  color: var(--blue);
  font-weight: 800;
}

.footer {
  min-height: 84px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer p {
  margin: 0;
}

.footer a {
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.detail-page {
  background: var(--paper);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.72fr);
  gap: 20px;
}

.detail-card {
  padding: 26px;
}

.detail-card p {
  color: var(--muted);
}

.detail-actions {
  margin-top: 22px;
}

.info-list p {
  margin-bottom: 12px;
}

.media-grid {
  grid-template-columns: repeat(2, 1fr);
}

.media-grid figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
}

.media-grid img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.media-grid figcaption {
  padding: 12px 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.menu-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.72fr);
  gap: 20px;
  align-items: start;
}

.menu-photo-card {
  margin: 0;
  overflow: hidden;
  padding: 8px 8px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(23, 32, 42, 0.06);
}

.menu-photo-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  background: #edf3f2;
}

.menu-photo-card figcaption {
  padding: 12px 8px 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.menu-photo-card a {
  color: var(--blue);
  font-weight: 800;
}

.menu-list {
  margin: 18px 0 0;
  padding-left: 19px;
  color: var(--muted);
}

.menu-list li + li {
  margin-top: 10px;
}

.score-grid {
  display: grid;
  gap: 10px;
}

.score {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.score span {
  color: var(--muted);
}

.score strong {
  color: var(--gold);
  white-space: nowrap;
}

.detail-notes ul {
  margin: 0;
  padding-left: 20px;
}

.page-cross-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 0;
  border: 1px solid rgba(39, 111, 132, 0.18);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(238, 249, 247, 0.95), rgba(255, 255, 255, 0.96));
}

.page-cross-links h2 {
  margin: 5px 0 0;
}

@media (max-width: 980px) {
  h1 {
    font-size: 3.65rem;
  }

  h2 {
    font-size: 2.7rem;
  }

  .section-grid,
  .section-heading,
  .source-band,
  .detail-grid,
  .menu-page-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .restaurant-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .route-grid,
  .route-grid.three,
  .briefing-grid,
  .signal-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .hero {
    min-height: 84vh;
    background:
      linear-gradient(180deg, rgba(18, 31, 43, 0.78), rgba(18, 31, 43, 0.5) 46%, rgba(18, 31, 43, 0.16)),
      url("./assets/beijing-dining-hero.jpg") center / cover no-repeat;
  }

  .nav {
    width: min(100% - 28px, 1180px);
    align-items: flex-start;
    flex-direction: column;
    padding-top: 16px;
  }

  .brand-group {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .brand {
    gap: 8px;
    font-size: 0.92rem;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .page-switch {
    min-height: 32px;
    padding: 5px 7px;
    font-size: 0.8rem;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .hero-content,
  .detail-heading,
  .section,
  .footer {
    width: min(100% - 28px, 1180px);
  }

  .hero-content {
    padding-top: 52px;
    margin-bottom: 4vh;
  }

  h1 {
    font-size: 2.35rem;
  }

  .hero-copy {
    font-size: 1rem;
  }

  .section {
    padding-top: 54px;
    padding-bottom: 54px;
  }

  .restaurant-grid,
  .route-grid,
  .route-grid.three,
  .briefing-grid,
  .signal-grid,
  .media-grid {
    grid-template-columns: 1fr;
  }

  .restaurant {
    min-height: auto;
  }

  .restaurant-top {
    flex-direction: column;
  }

  .badge {
    align-self: flex-start;
    max-width: 100%;
    white-space: normal;
  }

  .button,
  .filter,
  .text-link {
    width: 100%;
  }

  .map-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .map-buttons {
    width: 100%;
    flex-direction: column;
  }

  .map-legend {
    grid-template-columns: 1fr;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
  }

  .page-cross-links {
    align-items: stretch;
    flex-direction: column;
  }
}
