:root {
  --paper: #eef1ea;
  --paper-deep: #dce4d9;
  --ink: #123b35;
  --ink-strong: #082d29;
  --ink-muted: #526d67;
  --lacquer: #b7352d;
  --lacquer-dark: #8e251f;
  --turmeric: #e3ab3f;
  --jade: #42786e;
  --river: #347b80;
  --line: rgba(18, 59, 53, 0.16);
  --line-strong: rgba(18, 59, 53, 0.28);
  --white: #fbfbf6;
  --shadow: 0 26px 80px rgba(15, 47, 41, 0.13);
  --shadow-float: 0 18px 48px rgba(15, 47, 41, 0.18);
  --ease-out: cubic-bezier(.2, .78, .24, 1);
  --motion-fast: 160ms;
  --motion-base: 240ms;
  --motion-sheet: 340ms;
  --header-height: 80px;
  --font-display: "Newsreader", Georgia, serif;
  --font-body: "Be Vietnam Pro", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(24, 54, 47, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 54, 47, 0.02) 1px, transparent 1px),
    var(--paper);
  background-size: 28px 28px;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
a { color: inherit; }
button { color: inherit; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  transform: translateY(-150%);
  padding: 10px 16px;
  background: var(--ink);
  color: var(--white);
}
.skip-link:focus { transform: translateY(0); }

:focus-visible {
  outline: 3px solid var(--turmeric);
  outline-offset: 3px;
}

.site-header {
  min-height: 84px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 32px;
  padding: 14px clamp(20px, 4vw, 68px);
  border-bottom: 1px solid var(--line);
  background: rgba(244, 239, 226, 0.9);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.brand {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--white);
  background: var(--lacquer);
  font: 600 26px/1 var(--font-display);
  border-radius: 48% 48% 46% 10%;
  transform: rotate(-3deg);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.22);
}
.brand strong,
.brand small { display: block; }
.brand strong { font: 600 21px/1.1 var(--font-display); }
.brand small { color: var(--ink-muted); font-size: 11px; margin-top: 2px; }

.desktop-nav { display: flex; gap: 8px; }
.desktop-nav a {
  position: relative;
  padding: 12px 14px;
  text-decoration: none;
  color: var(--ink-muted);
  font-size: 14px;
}
.desktop-nav a:hover { color: var(--ink); }
.desktop-nav a.is-current { color: var(--ink); font-weight: 600; }
.desktop-nav a.is-current::after {
  content: "";
  position: absolute;
  height: 3px;
  left: 14px;
  right: 14px;
  bottom: 4px;
  background: var(--lacquer);
  border-radius: 999px;
}

.header-actions { justify-self: end; display: flex; align-items: center; gap: 10px; }
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.icon-button:hover { background: var(--white); }
.icon-button svg,
.save-button svg,
.search svg,
.province-cta svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.contribute-link {
  padding: 11px 17px;
  background: var(--ink);
  color: var(--white);
  text-decoration: none;
  font-size: 13px;
  border: 1px solid var(--ink);
}
.contribute-link:hover { background: #244940; }

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, .5fr);
  align-items: end;
  gap: 56px;
  padding: clamp(38px, 6vw, 80px) clamp(20px, 4vw, 68px) clamp(30px, 4vw, 54px);
}
.kicker {
  margin: 0 0 14px;
  color: var(--lacquer);
  font-size: 13px;
  font-weight: 600;
}
.intro h1 {
  max-width: 760px;
  margin: 0;
  font: 500 clamp(44px, 5.8vw, 82px)/.98 var(--font-display);
  letter-spacing: -0.045em;
}
.intro-note {
  max-width: 420px;
  margin: 0 0 8px;
  padding-left: 22px;
  border-left: 3px solid var(--turmeric);
  color: var(--ink-muted);
  font-size: 14px;
}

.explorer {
  min-height: 760px;
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(360px, .75fr);
  margin: 0 clamp(0px, 2vw, 32px) 72px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 247, 0.54);
  box-shadow: var(--shadow);
}
.map-column { min-width: 0; padding: 26px clamp(18px, 2.4vw, 38px) 22px; }
.map-toolbar { position: relative; z-index: 10; display: flex; align-items: center; gap: 14px; }
.search { position: relative; flex: 1 1 390px; }
.search > svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-muted);
}
.search input {
  width: 100%;
  height: 50px;
  padding: 0 72px 0 48px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: rgba(255,255,255,.7);
  color: var(--ink);
}
.search input::placeholder { color: #73847f; }
.search input:focus { border-color: var(--jade); outline: 3px solid rgba(79,125,112,.18); }
.search kbd {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  padding: 3px 7px;
  border: 1px solid var(--line);
  color: var(--ink-muted);
  background: var(--paper);
  font: 500 10px var(--font-body);
}
.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: 310px;
  overflow: auto;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 18px 44px rgba(24,54,47,.16);
}
.search-option {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.search-option:hover,
.search-option:focus { background: var(--paper); }
.search-option small { color: var(--ink-muted); }

.region-filter { display: flex; flex: 0 0 auto; gap: 4px; padding: 4px; border: 1px solid var(--line); }
.filter-chip {
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font-size: 12px;
  cursor: pointer;
}
.filter-chip.is-active { background: var(--ink); color: var(--white); }

.map-stage { margin-top: 22px; }
.map-heading,
.map-legend,
.section-heading,
.panel-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.map-heading { min-height: 32px; font-size: 12px; color: var(--ink-muted); }
.text-button { border: 0; padding: 7px 0; background: transparent; color: var(--lacquer); cursor: pointer; }
.text-button:hover { text-decoration: underline; }

.map-shell { min-height: 570px; position: relative; overflow: hidden; }
.map-shell::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  left: 8%;
  top: 12%;
  border: 1px solid rgba(47,116,120,.13);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(47,116,120,.025), 0 0 0 150px rgba(47,116,120,.018);
}
.vietnam-map { display: block; width: 100%; height: 570px; position: relative; z-index: 2; }
.province-shape {
  fill: #b9cdbd;
  stroke: var(--paper);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  transition: fill var(--motion-fast) ease, opacity var(--motion-base) ease, stroke var(--motion-fast) ease;
}
.province-shape:hover,
.province-shape:focus { fill: var(--turmeric); outline: none; }
.province-shape.is-selected { fill: var(--lacquer); stroke: var(--white); stroke-width: 2.2; }
.province-shape.is-muted { opacity: .19; }

.map-loading {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  background: rgba(244,239,226,.76);
}
.map-loading span {
  width: 34px;
  height: 34px;
  border: 3px solid var(--paper-deep);
  border-top-color: var(--lacquer);
  border-radius: 50%;
  animation: spin .9s linear infinite;
}
.map-loading p { margin: 0; color: var(--ink-muted); font-size: 13px; }
.map-loading[hidden] { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.map-tooltip {
  position: fixed;
  z-index: 60;
  pointer-events: none;
  padding: 9px 12px;
  color: var(--white);
  background: var(--ink);
  font-size: 12px;
  box-shadow: 0 8px 22px rgba(0,0,0,.18);
}

.archipelago-map-card {
  position: absolute;
  z-index: 4;
  top: 22px;
  left: 22px;
  width: min(255px, calc(100% - 44px));
  padding: 14px 16px;
  border: 1px solid rgba(52,123,128,.2);
  border-radius: 16px;
  color: var(--white);
  background: rgba(8,45,41,.92);
  box-shadow: 0 14px 34px rgba(8,45,41,.2);
  pointer-events: none;
  animation: map-card-in 260ms var(--ease-out) both;
}
.archipelago-map-card[hidden] { display: none; }
.archipelago-map-card span,
.archipelago-map-card small { display: block; }
.archipelago-map-card span { color: #e7c56f; font-size: 9px; font-weight: 600; }
.archipelago-map-card strong { display: block; margin: 2px 0 1px; font: 600 25px/1.05 var(--font-display); }
.archipelago-map-card small { color: #c3d5cf; font-size: 10px; }
@keyframes map-card-in {
  from { opacity: 0; transform: translate3d(0, 6px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

.archipelago-marker { cursor: pointer; }
.archipelago-range {
  fill: rgba(47, 116, 120, 0.055);
  stroke: var(--river);
  stroke-width: 1.1;
  stroke-dasharray: 4 5;
  vector-effect: non-scaling-stroke;
  transition: fill 180ms ease, stroke-width 180ms ease;
}
.archipelago-hit { fill: transparent; stroke: transparent; }
.archipelago-center {
  fill: var(--paper);
  stroke: var(--river);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}
.archipelago-center-dot { fill: var(--river); }
.archipelago-leader {
  stroke: var(--river);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.archipelago-name {
  fill: var(--ink);
  font: 600 15px var(--font-display);
  paint-order: stroke;
  stroke: var(--paper);
  stroke-width: 4px;
  stroke-linejoin: round;
  pointer-events: visiblePainted;
}
.archipelago-meta {
  fill: var(--ink-muted);
  font: 500 7px var(--font-body);
  paint-order: stroke;
  stroke: var(--paper);
  stroke-width: 3px;
  stroke-linejoin: round;
  pointer-events: visiblePainted;
}
.archipelago-marker:hover .archipelago-range,
.archipelago-marker:focus .archipelago-range,
.archipelago-marker.is-selected .archipelago-range {
  fill: rgba(168, 45, 38, 0.12);
  stroke: var(--lacquer);
  stroke-width: 1.8;
}
.archipelago-marker:hover .archipelago-center,
.archipelago-marker:focus .archipelago-center,
.archipelago-marker.is-selected .archipelago-center {
  stroke: var(--lacquer);
}
.archipelago-marker:hover .archipelago-center-dot,
.archipelago-marker:focus .archipelago-center-dot,
.archipelago-marker.is-selected .archipelago-center-dot {
  fill: var(--lacquer);
}
.archipelago-marker:focus { outline: none; }
.vietnam-map.is-archipelago-focused .province-shape { opacity: .12; }
.vietnam-map.is-archipelago-focused .archipelago-marker:not(.is-selected) { opacity: .18; }
.vietnam-map.is-archipelago-focused .archipelago-marker.is-selected .archipelago-name,
.vietnam-map.is-archipelago-focused .archipelago-marker.is-selected .archipelago-meta,
.vietnam-map.is-archipelago-focused .archipelago-marker.is-selected .archipelago-leader { opacity: 0; }
.archipelago-marker { transition: opacity var(--motion-base) ease; }


.map-legend {
  gap: 18px;
  min-height: 40px;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 10px;
}
.map-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.legend-swatch { width: 12px; height: 12px; display: inline-block; }
.legend-swatch--default { background: #b9cdbd; }
.legend-swatch--selected { background: var(--lacquer); }
.legend-swatch--island { border: 1px dashed var(--river); background: rgba(47,116,120,.08); }
.map-source { margin-left: auto; text-align: right; }

.accessible-list { margin-top: 12px; border-top: 1px solid var(--line); }
.accessible-list summary { padding: 15px 0 4px; color: var(--ink-muted); font-size: 12px; cursor: pointer; }
.province-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 12px 0; }
.province-list button {
  padding: 7px;
  border: 0;
  background: transparent;
  text-align: left;
  color: var(--ink-muted);
  font-size: 11px;
  cursor: pointer;
}
.province-list button:hover { background: var(--paper-deep); color: var(--ink); }

.detail-panel {
  min-width: 0;
  padding: 28px clamp(24px, 2.8vw, 44px) 34px;
  background: var(--white);
  border-left: 1px solid var(--line);
}
.panel-topline { color: var(--lacquer); font-size: 12px; font-weight: 600; }
.panel-close { display: none; }
.province-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-top: 14px; }
.province-number { margin: 0 0 -3px; color: var(--turmeric); font: 500 16px var(--font-display); }
.province-heading h2 { margin: 0; font: 600 clamp(45px, 4vw, 64px)/.94 var(--font-display); letter-spacing: -.045em; }
.save-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
}
.save-button:hover { border-color: var(--lacquer); }
.save-button[aria-pressed="true"] { color: var(--lacquer); background: #faefeb; border-color: rgba(168,45,38,.25); }
.save-button[aria-pressed="true"] svg { fill: currentColor; }
.province-description { max-width: 530px; margin: 20px 0 22px; color: var(--ink-muted); font: 500 17px/1.62 var(--font-display); }

.feature-image { position: relative; height: 210px; overflow: hidden; background: var(--paper-deep); }
.feature-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(14,32,27,.72));
}
.feature-image img { width: 100%; height: 100%; display: block; object-fit: cover; filter: saturate(.88) contrast(1.04); }
.image-caption { position: absolute; z-index: 2; left: 18px; bottom: 14px; color: var(--white); font: 500 15px var(--font-display); }

.archipelago-detail {
  margin-top: 6px;
  padding-top: 4px;
}
.archipelago-detail[hidden] { display: none; }
.archipelago-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}
.archipelago-section-heading span { color: var(--lacquer); font-size: 10px; font-weight: 600; }
.archipelago-section-heading h3 { margin: 2px 0 0; font: 600 25px/1.15 var(--font-display); }
.archipelago-section-heading svg { width: 36px; height: 36px; color: var(--river); fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.archipelago-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.archipelago-fact {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid rgba(52,123,128,.13);
  border-radius: 13px;
  background: rgba(52,123,128,.055);
}
.archipelago-fact dt { margin-bottom: 4px; color: var(--ink-muted); font-size: 9px; }
.archipelago-fact dd { margin: 0; color: var(--ink); font-size: 12px; font-weight: 600; line-height: 1.45; }
.archipelago-groups,
.archipelago-places { margin-top: 20px; }
.archipelago-groups h4,
.archipelago-places h4 { margin: 0 0 9px; font: 600 16px/1.2 var(--font-display); }
.archipelago-groups ul,
.archipelago-places ul { margin: 0; padding: 0; list-style: none; }
.archipelago-groups ul { display: flex; flex-wrap: wrap; gap: 7px; }
.archipelago-groups li {
  padding: 7px 10px;
  border: 1px solid rgba(18,59,53,.13);
  border-radius: 999px;
  color: var(--ink-muted);
  background: var(--paper);
  font-size: 10px;
}
.archipelago-places ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 14px; }
.archipelago-places li { position: relative; padding-left: 15px; color: var(--ink-muted); font-size: 11px; }
.archipelago-places li::before { content: ""; position: absolute; left: 0; top: .58em; width: 6px; height: 6px; border-radius: 50%; background: var(--lacquer); }
.archipelago-note {
  margin: 20px 0 0;
  padding: 14px 16px;
  border-left: 3px solid var(--turmeric);
  color: var(--ink-muted);
  background: rgba(227,171,63,.075);
  font-size: 11px;
  line-height: 1.6;
}
.archipelago-sources { display: grid; gap: 7px; margin-top: 16px; }
.archipelago-sources a { width: fit-content; color: var(--river); font-size: 10px; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.detail-panel.is-archipelago .province-number { color: var(--river); letter-spacing: .08em; }

.local-sound {
  margin-top: 18px;
  padding: 14px 15px 13px;
  color: var(--white);
  background: var(--ink);
  background-image: radial-gradient(circle at 86% 12%, rgba(231,172,62,.2), transparent 34%);
}
.local-sound[hidden] { display: none; }
.sound-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.sound-heading span { color: #e9c873; font-size: 9px; font-weight: 600; }
.sound-heading a { color: #cbd9d4; font-size: 9px; text-decoration: none; border-bottom: 1px solid currentColor; }
.sound-heading a:hover { color: var(--white); }
.sound-player { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; }
.sound-play {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 50%;
  color: var(--white);
  background: transparent;
  cursor: pointer;
}
.sound-play:hover { color: var(--ink); background: var(--turmeric); border-color: var(--turmeric); }
.sound-play svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sound-copy { min-width: 0; }
.sound-copy h3 { margin: 0; overflow: hidden; color: var(--white); font: 500 18px/1.2 var(--font-display); text-overflow: ellipsis; white-space: nowrap; }
.sound-copy p { margin: 2px 0 8px; overflow: hidden; color: #b9cbc4; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.sound-progress { height: 3px; overflow: hidden; background: rgba(255,255,255,.18); }
.sound-progress span { display: block; width: 100%; height: 100%; background: var(--turmeric); transform: scaleX(0); transform-origin: left center; }
#sound-time { min-width: 30px; color: #b9cbc4; font-size: 9px; text-align: right; }

.specialty-section { margin-top: 25px; }
.section-heading { padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.section-heading h3 { margin: 0; font: 600 22px var(--font-display); }
.section-heading span { color: var(--ink-muted); font-size: 10px; }
.specialty-item {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.specialty-item:hover .specialty-name { color: var(--lacquer); transform: translateX(3px); }
.specialty-index { color: var(--ink-muted); font-size: 10px; }
.specialty-name {
  display: block;
  font: 500 17px var(--font-display);
  transition: color 180ms ease, transform 180ms ease;
}
.specialty-meta { display: block; margin-top: 2px; color: var(--ink-muted); font-size: 9px; }
.specialty-arrow { color: var(--lacquer); }
.province-cta {
  min-height: 60px;
  margin-top: 28px;
  padding: 0 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  color: var(--white);
  background: var(--lacquer);
  text-decoration: none;
  font-size: 12px;
}
.province-cta:hover { background: var(--lacquer-dark); }

.contribution {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  margin: 0 clamp(20px, 6vw, 96px) 80px;
  padding: clamp(36px, 5vw, 70px);
  color: var(--white);
  background: var(--ink);
  background-image: radial-gradient(circle at 85% 15%, rgba(231,172,62,.15), transparent 22%);
}
.contribution .kicker { color: #f2c66f; }
.contribution h2 { max-width: 620px; margin: 0; font: 500 clamp(34px, 4.2vw, 58px)/1.04 var(--font-display); }
.contribution > div:last-child { align-self: end; max-width: 440px; }
.contribution p { color: #c9d8d2; }
.contribution a { display: inline-block; margin-top: 14px; padding-bottom: 4px; color: #f2c66f; text-decoration: none; border-bottom: 1px solid currentColor; }

.mobile-backdrop { display: none; }

@media (max-width: 1100px) {
  .site-header { grid-template-columns: 1fr auto; }
  .desktop-nav { display: none; }
  .explorer { grid-template-columns: minmax(0, 1.25fr) minmax(330px, .75fr); margin-inline: 0; }
  .map-toolbar { align-items: stretch; flex-direction: column; }
  .search { flex-basis: auto; }
  .region-filter { width: max-content; max-width: 100%; overflow-x: auto; }
  .map-shell { min-height: 520px; }
  .vietnam-map { height: 520px; }
  .province-list { grid-template-columns: repeat(3, 1fr); }
  .map-source { display: none !important; }
}

@media (max-width: 760px) {
  body { background-size: 20px 20px; }
  .site-header { min-height: 68px; padding: 10px 16px; }
  .brand-mark { width: 40px; height: 40px; }
  .brand strong { font-size: 19px; }
  .brand small { display: none; }
  .header-actions .icon-button { display: none; }
  .contribute-link { padding: 9px 11px; font-size: 11px; }
  .intro { display: block; padding: 34px 18px 24px; }
  .intro h1 { font-size: clamp(42px, 13vw, 62px); }
  .intro-note { margin-top: 24px; }
  .explorer { display: block; min-height: 0; margin-bottom: 42px; border-inline: 0; box-shadow: none; }
  .map-column { padding: 15px 14px 20px; }
  .map-toolbar { gap: 10px; }
  .search kbd { display: none; }
  .search input { padding-right: 14px; }
  .region-filter { width: 100%; }
  .filter-chip { flex: 1; white-space: nowrap; padding-inline: 9px; }
  .map-stage { margin-top: 10px; }
  .map-shell { min-height: 560px; }
  .vietnam-map { height: 560px; }
  .map-shell::before { width: 330px; height: 330px; left: -4%; }
  .archipelago-name { font-size: 14px; }
  .archipelago-meta { font-size: 6.5px; }
  .map-source { display: none !important; }
  .map-legend { justify-content: flex-start; }
  .accessible-list { margin-bottom: 8px; }
  .province-list { grid-template-columns: repeat(2, 1fr); }

  .detail-panel {
    position: fixed;
    z-index: 55;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: min(86vh, 760px);
    overflow-y: auto;
    padding: 13px 20px calc(24px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -16px 55px rgba(20,39,34,.22);
    transform: translateY(calc(100% - 104px));
    transition: transform 330ms cubic-bezier(.22, .85, .3, 1);
  }
  .detail-panel::before {
    content: "";
    display: block;
    width: 38px;
    height: 4px;
    margin: 0 auto 13px;
    background: var(--paper-deep);
    border-radius: 999px;
  }
  .detail-panel.is-open { transform: translateY(0); }
  .panel-close { display: inline-grid; }
  .province-heading { margin-top: 5px; }
  .province-heading h2 { font-size: 47px; }
  .province-description { font-size: 16px; }
  .feature-image { height: 190px; }
  .local-sound { margin-top: 14px; }
  .mobile-backdrop {
    position: fixed;
    z-index: 50;
    inset: 0;
    display: block;
    visibility: hidden;
    opacity: 0;
    background: rgba(13,28,24,.38);
    transition: opacity 240ms ease, visibility 240ms;
  }
  .mobile-backdrop.is-visible { visibility: visible; opacity: 1; }
  .contribution { grid-template-columns: 1fr; gap: 26px; margin: 0 14px 30px; padding: 35px 24px; }
}

/* 2026 visual polish — a modern lacquer atlas */
body {
  overflow-x: hidden;
  background:
    radial-gradient(circle at 78% 8%, rgba(52, 123, 128, .10), transparent 28rem),
    radial-gradient(circle at 10% 52%, rgba(227, 171, 63, .07), transparent 25rem),
    linear-gradient(rgba(18, 59, 53, .022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 59, 53, .018) 1px, transparent 1px),
    var(--paper);
  background-size: auto, auto, 32px 32px, 32px 32px, auto;
}

.site-header {
  min-height: var(--header-height);
  border-bottom-color: rgba(18, 59, 53, .12);
  background: rgba(238, 241, 234, .82);
  box-shadow: 0 8px 28px rgba(18, 59, 53, .04);
  backdrop-filter: blur(18px) saturate(1.15);
}

.brand-mark {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #c74639, var(--lacquer-dark));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.24), 0 8px 20px rgba(142,37,31,.2);
}
.brand-mark::after {
  content: "";
  position: absolute;
  width: 28px;
  height: 60px;
  left: -15px;
  top: -10px;
  background: rgba(255,255,255,.16);
  transform: rotate(24deg);
}

.desktop-nav a,
.icon-button,
.contribute-link,
.filter-chip,
.save-button,
.province-cta,
.text-button {
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, transform 180ms var(--ease-out), box-shadow 180ms ease;
}

.intro {
  width: min(100%, 1580px);
  margin-inline: auto;
  grid-template-columns: minmax(0, 1.42fr) minmax(290px, .58fr);
  padding-top: clamp(44px, 6vw, 86px);
  padding-bottom: clamp(34px, 4vw, 58px);
}
.intro-copy { max-width: 900px; }
.intro h1 {
  max-width: 900px;
  font-size: clamp(50px, 5.75vw, 88px);
  line-height: .94;
  text-wrap: balance;
}
.intro-aside { align-self: end; }
.intro-note {
  max-width: 390px;
  margin-bottom: 20px;
  padding: 3px 0 3px 24px;
  border-left-width: 2px;
  font-size: 15px;
  line-height: 1.65;
}
.intro-meta {
  display: flex;
  gap: 22px;
  padding-left: 26px;
  color: var(--ink-muted);
  font-size: 11px;
}
.intro-meta span { display: inline-flex; align-items: baseline; gap: 5px; }
.intro-meta strong { color: var(--ink); font: 600 19px/1 var(--font-display); }

.explorer {
  width: min(calc(100% - 40px), 1540px);
  min-height: 790px;
  grid-template-columns: minmax(0, 1.48fr) minmax(390px, .72fr);
  margin: 0 auto 88px;
  overflow: clip;
  border-color: var(--line-strong);
  border-radius: 30px;
  background: rgba(251, 251, 246, .72);
  box-shadow: var(--shadow);
  animation: explorer-enter 720ms var(--ease-out) both;
}
@keyframes explorer-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

.map-column { padding: 30px clamp(22px, 3vw, 44px) 26px; }
.map-toolbar { gap: 12px; }
.search input {
  height: 54px;
  border-color: var(--line-strong);
  border-radius: 15px;
  background: rgba(251, 251, 246, .88);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
.search input:focus {
  border-color: var(--jade);
  outline: 4px solid rgba(66, 120, 110, .15);
}
.search kbd { border-radius: 6px; background: var(--paper-deep); }
.search-results { border-radius: 15px; overflow: hidden; box-shadow: var(--shadow-float); }
.region-filter {
  min-height: 54px;
  align-items: center;
  border-color: var(--line-strong);
  border-radius: 15px;
  background: rgba(251,251,246,.66);
}
.filter-chip {
  min-height: 44px;
  border-radius: 11px;
  transition: color 140ms ease-out, background-color 140ms ease-out, box-shadow 160ms ease-out, transform 120ms ease-out;
}
.filter-chip:active { transform: scale(.97); }
.filter-chip.is-active { background: var(--ink); box-shadow: 0 7px 18px rgba(18,59,53,.16); }

.map-stage { margin-top: 26px; }
.map-heading { min-height: 48px; margin-bottom: 8px; }
.map-heading-copy { display: grid; gap: 1px; }
.map-heading-copy strong { color: var(--ink); font: 600 18px/1.15 var(--font-display); }
.map-heading-copy span { color: var(--ink-muted); font-size: 10px; }
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  text-decoration: none;
}
.text-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.map-shell {
  min-height: 600px;
  border: 1px solid rgba(52,123,128,.13);
  border-radius: 26px;
  background:
    radial-gradient(circle at 48% 45%, rgba(255,255,255,.76), transparent 36%),
    linear-gradient(145deg, rgba(209,225,215,.66), rgba(224,233,226,.28));
  isolation: isolate;
  contain: paint;
  transition: box-shadow 420ms ease, border-color 420ms ease, background-color 420ms ease;
}
.map-viewport { will-change: transform; }
.map-shell.is-animating .province-shape { filter: none !important; }
.map-shell.has-focus {
  border-color: rgba(183,53,45,.28);
  box-shadow: inset 0 0 0 1px rgba(183,53,45,.06), 0 18px 54px rgba(18,59,53,.08);
}
.map-shell::before {
  width: min(58vw, 500px);
  height: min(58vw, 500px);
  left: 7%;
  top: 8%;
  border-color: rgba(52,123,128,.16);
  box-shadow: 0 0 0 78px rgba(52,123,128,.03), 0 0 0 166px rgba(52,123,128,.018);
}
.map-shell::after {
  content: "";
  position: absolute;
  inset: 18px;
  z-index: 1;
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 19px;
  pointer-events: none;
}
.vietnam-map { height: 600px; }
.province-shape {
  fill: #afc8b9;
  stroke-width: 1.35;
  transition: fill var(--motion-fast) ease, opacity var(--motion-base) ease, stroke var(--motion-fast) ease;
}
.province-shape.is-selected {
  fill: var(--lacquer);
  stroke: var(--white);
  stroke-width: 2.2;
}
.vietnam-map[data-camera-mode="province"] .province-shape:not(.is-selected) { opacity: .2; }
.vietnam-map[data-camera-mode="archipelago"] .province-shape { opacity: .12; }
.vietnam-map[data-camera-mode="region"] .province-shape.is-muted { opacity: .14; }

.map-legend { margin-top: 10px; padding-top: 10px; }
.legend-swatch { border-radius: 3px; }
.accessible-list summary { min-height: 44px; }

.detail-panel {
  position: sticky;
  top: var(--header-height);
  align-self: start;
  max-height: calc(100vh - var(--header-height));
  overflow: auto;
  overscroll-behavior: contain;
  padding: 34px clamp(26px, 3vw, 48px) 40px;
  border-left-color: var(--line-strong);
  background:
    radial-gradient(circle at 94% 4%, rgba(227,171,63,.10), transparent 13rem),
    var(--white);
  scrollbar-width: thin;
  scrollbar-color: var(--paper-deep) transparent;
  contain: paint;
}
.sheet-grabber { display: none; }
.panel-topline { letter-spacing: .01em; }
.province-heading { margin-top: 18px; }
.province-heading h2 { font-size: clamp(50px, 4.4vw, 70px); text-wrap: balance; }
.province-number { margin-bottom: -5px; font-size: 18px; }
.save-button { min-height: 44px; border-radius: 13px; background: rgba(251,251,246,.64); }
.province-description { margin-block: 22px 26px; font-size: 18px; line-height: 1.58; }

.feature-image {
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  box-shadow: 0 16px 38px rgba(18,59,53,.13);
}
.feature-image img { backface-visibility: hidden; transition: opacity 220ms ease, transform 480ms var(--ease-out); }
.feature-image.is-loading img { opacity: .32; transform: scale(1.03); }
.feature-image::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.35) 48%, transparent 76%);
  transform: translateX(-100%);
}
.feature-image.is-loading::before { opacity: 1; animation: image-shimmer 1.1s infinite; }
@keyframes image-shimmer { to { transform: translateX(100%); } }
.image-caption { left: 20px; right: 20px; bottom: 16px; font-size: 16px; line-height: 1.2; }

.local-sound {
  margin-top: 16px;
  padding: 16px 17px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px;
  background-color: var(--ink-strong);
  background-image:
    radial-gradient(circle at 92% 0, rgba(227,171,63,.23), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,.03), transparent);
}
.sound-heading span,
.sound-heading a,
.sound-copy p,
#sound-time { font-size: 10px; }
.sound-play { transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, transform 180ms var(--ease-out); }
.sound-copy h3 { font-size: 19px; }
.sound-progress { height: 4px; border-radius: 99px; }
.sound-progress span {
  width: 100%;
  border-radius: inherit;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 120ms linear;
  will-change: transform;
}

.specialty-section { margin-top: 28px; }
.section-heading h3 { font-size: 24px; }
.specialty-item {
  grid-template-columns: 28px 1fr 28px;
  min-height: 66px;
  margin-inline: -10px;
  width: calc(100% + 20px);
  padding: 9px 10px;
  border-radius: 12px;
}
.specialty-name { font-size: 18px; }
.specialty-meta { font-size: 10px; }
.specialty-arrow { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(183,53,45,.08); }
.province-cta { min-height: 64px; border-radius: 16px; box-shadow: 0 12px 28px rgba(142,37,31,.18); }

.contribution {
  width: min(calc(100% - 40px), 1420px);
  margin: 0 auto 88px;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

@media (hover: hover) and (pointer: fine) {
  .icon-button:hover,
  .save-button:hover { transform: translateY(-2px); box-shadow: 0 9px 22px rgba(18,59,53,.10); }
  .contribute-link:hover,
  .province-cta:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(18,59,53,.18); }
  .filter-chip:not(.is-active):hover { color: var(--ink); background: rgba(18,59,53,.07); }
  .text-button:hover { border-color: rgba(183,53,45,.22); background: rgba(183,53,45,.07); text-decoration: none; }
  .province-shape:hover { filter: none; stroke: rgba(18,59,53,.45); stroke-width: 2; }
  .specialty-item:hover { background: rgba(18,59,53,.045); }
  .sound-play:hover { transform: scale(1.06); }
  .feature-image:hover img { transform: scale(1.025); }
}

button:active,
.contribute-link:active,
.province-cta:active {
  transform: scale(.98);
  transition-duration: 80ms;
}

@media (max-width: 1100px) {
  :root { --header-height: 74px; }
  .explorer { width: calc(100% - 24px); grid-template-columns: minmax(0, 1.15fr) minmax(350px, .85fr); margin-inline: auto; }
  .map-shell { min-height: 550px; }
  .vietnam-map { height: 550px; }
  .detail-panel { padding-inline: 28px; }
}

@media (max-width: 900px) {
  :root { --header-height: 68px; }
  .intro { gap: 30px; }
  .intro h1 { font-size: clamp(46px, 8vw, 68px); }
  .explorer { display: block; width: calc(100% - 20px); min-height: 0; margin-bottom: 64px; border-radius: 26px; }
  .map-column { padding: 22px 20px 28px; }
  .map-shell { min-height: clamp(540px, 68svh, 680px); }
  .vietnam-map { height: clamp(540px, 68svh, 680px); }

  .detail-panel {
    position: fixed;
    z-index: 55;
    top: auto;
    left: 8px;
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    max-height: min(88dvh, 790px);
    padding: 8px 22px calc(24px + env(safe-area-inset-bottom));
    border: 1px solid rgba(18,59,53,.16);
    border-radius: 28px;
    box-shadow: 0 -10px 60px rgba(8,45,41,.24);
    backface-visibility: hidden;
    transform: translate3d(0, var(--sheet-offset, calc(100% - 88px)), 0);
    transition: transform 250ms cubic-bezier(.4, 0, 1, 1), box-shadow 220ms ease;
    will-change: transform;
  }
  .detail-panel::before { display: none; }
  .detail-panel.is-open {
    transform: translate3d(0, var(--sheet-offset, 0), 0);
    transition-duration: var(--motion-sheet), 260ms;
    transition-timing-function: var(--ease-out), ease;
  }
  .detail-panel.is-dragging {
    transition: none !important;
    cursor: grabbing;
  }
  .sheet-grabber {
    position: sticky;
    z-index: 4;
    top: -8px;
    width: calc(100% + 44px);
    min-height: 44px;
    margin: 0 -22px 2px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 28px 28px 0 0;
    background: var(--white);
    cursor: grab;
    touch-action: none;
    user-select: none;
  }
  .sheet-grabber > span[aria-hidden="true"] {
    width: 46px;
    height: 5px;
    border-radius: 99px;
    background: #c8d2c9;
    transition: width 180ms ease, background-color 180ms ease;
  }
  .sheet-grabber:hover > span[aria-hidden="true"],
  .detail-panel.is-dragging .sheet-grabber > span[aria-hidden="true"] {
    width: 64px;
    background: var(--jade, #476b8a);
  }
  .panel-close { display: inline-grid; }
  .mobile-backdrop {
    position: fixed;
    z-index: 50;
    inset: 0;
    display: block;
    visibility: hidden;
    opacity: 0;
    background: rgba(8,32,28,.44);
    transition: opacity 170ms ease, visibility 170ms;
  }
  .mobile-backdrop.is-visible { visibility: visible; opacity: 1; }
  .site-header { background: rgba(238, 241, 234, .97); backdrop-filter: none; }
}

@media (max-width: 620px) {
  body { background-size: auto, auto, 24px 24px, 24px 24px, auto; }
  .site-header { padding-inline: 14px; }
  .header-actions { gap: 6px; }
  .contribute-link { padding-inline: 12px; border-radius: 11px; }
  .intro { display: block; padding: 30px 18px 24px; }
  .intro h1 { font-size: clamp(42px, 12.5vw, 59px); line-height: .96; }
  .intro-aside { margin-top: 26px; }
  .intro-note { max-width: none; }
  .intro-meta { padding-left: 24px; gap: 18px; }

  .explorer { width: calc(100% - 12px); border-radius: 22px; }
  .map-column { padding: 14px 12px 24px; }
  .map-toolbar { gap: 9px; }
  .search input { height: 52px; border-radius: 14px; }
  .region-filter { width: 100%; min-height: 50px; border-radius: 14px; overflow: visible; }
  .filter-chip { min-width: 0; padding-inline: 7px; }
  .map-heading { margin-inline: 4px; }
  .map-heading-copy span { max-width: 160px; }
  .text-button { padding-inline: 8px; }
  .text-button span { font-size: 10px; }
  .map-shell { min-height: 540px; border-radius: 20px; }
  .map-shell::after { inset: 10px; border-radius: 14px; }
  .vietnam-map { height: 540px; }
  .archipelago-map-card { top: 12px; left: 12px; width: min(245px, calc(100% - 24px)); padding: 12px 14px; }
  .map-legend { flex-wrap: wrap; gap: 9px 15px; padding-inline: 4px; }
  .map-legend > span { min-height: 24px; }

  .detail-panel { left: 5px; right: 5px; bottom: max(5px, env(safe-area-inset-bottom)); padding-inline: 18px; border-radius: 24px; }
  .sheet-grabber { width: calc(100% + 36px); margin-inline: -18px; border-radius: 24px 24px 0 0; }
  .province-heading h2 { font-size: clamp(44px, 14vw, 58px); }
  .province-description { font-size: 16px; }
  .feature-image { border-radius: 16px; }
  .local-sound { border-radius: 16px; }
  .archipelago-facts { grid-template-columns: 1fr; }
  .archipelago-places ul { grid-template-columns: 1fr; }
  .archipelago-section-heading h3 { font-size: 23px; }
  .specialty-item { min-height: 62px; }
  .contribution { width: calc(100% - 20px); margin-bottom: 108px; border-radius: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (forced-colors: active) {
  .province-shape { fill: CanvasText; stroke: Canvas; }
  .province-shape.is-selected { fill: Highlight; }
  .legend-swatch,
  .sheet-grabber > span[aria-hidden="true"] { border: 1px solid CanvasText; }
}
.dish-browser {
  display: grid;
  gap: .45rem;
  margin: 0 0 1rem;
}

.dish-browser input {
  width: 100%;
  border: 1px solid rgba(18, 42, 70, .2);
  border-radius: 999px;
  padding: .7rem 1rem;
  background: rgba(255, 255, 255, .7);
  color: inherit;
}

#dish-browser-status {
  min-height: 1.2em;
  color: var(--muted, #667085);
  font-size: .82rem;
}

#dish-load-more {
  margin-top: 1rem;
}

#dish-retry {
  margin-top: 1rem;
}
