/* ==========================================================================
   MẠCH SÁNG VIỆT NAM (V1.4 VISUAL POLISH) — Editorial · Phẳng · Tối giản
   Font nội bộ Be Vietnam Pro WOFF2 (không gọi CDN ngoài)
   Bảng màu chính thức Wattellers:
     - Kem: #FAF6EE
     - Xanh đậm: #13463A
     - Xanh nhạt: #E4EFEA
     - Vàng: #F2C955
     - Cam: #E07A47
   ========================================================================== */

@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/font_10.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/font_11.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/font_12.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/font_13.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/font_14.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/font_15.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/font_16.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/font_17.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/font_18.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('assets/fonts/font_19.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('assets/fonts/font_20.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('assets/fonts/font_21.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --cream: #FAF6EE;
  --cream-tint: #F3EEE3;
  --green: #13463A;
  --green-night: #082019;
  --sea-bg: #0D2E25;
  --land-base: #256854;
  --mint: #E4EFEA;
  --yellow: #F2C955;
  --yellow-hover: #E6BB42;
  --orange: #E07A47;
  --orange-ink: #B54F1E;
  --text-dark: #10382E;
  --text-muted: #4A6A60;
  --hairline: rgba(19, 70, 58, 0.14);
  --hairline-dark: rgba(228, 239, 234, 0.18);
  --danger: #B91C1C;
  --radius-md: 10px;
  --radius-sm: 8px;
  --radius-sheet: 12px;
  --shadow-float: 0 14px 36px rgba(8, 32, 25, 0.22);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html, body {
  min-height: 100vh;
  background-color: var(--cream);
  color: var(--text-dark);
  font-family: 'Be Vietnam Pro', "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
}

body.modal-open {
  overflow: hidden;
  overscroll-behavior: none;
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

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

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--yellow);
  color: var(--green-night);
  padding: 10px 16px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  z-index: 1000;
  text-decoration: none;
}
.skip-link:focus {
  top: 16px;
}

/* ============ EDITORIAL MASTHEAD HEADER ============ */
.site-header {
  background: var(--cream);
  border-bottom: 1px solid var(--hairline);
}

.header-inner {
  max-width: 1380px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.brand-logo {
  height: 30px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.brand-titles {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-left: 1px solid var(--hairline);
  padding-left: 14px;
}

.campaign-kicker {
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange-ink);
  font-weight: 700;
  line-height: 1.2;
}

.site-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--green);
  line-height: 1.2;
  margin: 0;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.demo-badge {
  color: #9A3412;
  background: #FFEDD5;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  white-space: nowrap;
}
.demo-badge[hidden] {
  display: none;
}

.btn-nav {
  background: transparent;
  color: var(--text-muted);
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.btn-nav:hover,
.btn-nav:focus-visible {
  color: var(--green);
  outline: none;
}
.btn-nav.active {
  color: var(--green);
  font-weight: 800;
  border-bottom-color: var(--green);
}

/* ============ MAIN LAYOUT (Desktop: balanced two-column) ============ */
.app-layout {
  display: grid;
  grid-template-columns: minmax(380px, 455px) minmax(0, 1fr);
  gap: 32px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 18px 24px 30px;
  align-items: start;
}

.story-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}
.app-layout[data-screen="intro"] .story-column {
  position: sticky;
  top: 84px;
}
.app-layout[data-screen="about"] {
  grid-template-columns: minmax(0, 780px);
  justify-content: center;
}
.app-layout[data-screen="about"] .map-column {
  display: none;
}

.map-column {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ============ EDITORIAL CONTENT SECTIONS (NO CARD SOUP) ============ */
.editorial-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-eyebrow,
.status-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--orange-ink);
  text-transform: uppercase;
}

.hero-headline {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.015em;
  color: var(--green);
}
.hero-headline span {
  color: var(--orange-ink);
}

.hero-lead {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}

.stats-summary-strip {
  display: flex;
  align-items: stretch;
  gap: 20px;
  padding: 16px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.stat-entry {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.stat-divider {
  width: 1px;
  background: var(--hairline);
  flex-shrink: 0;
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--green);
  line-height: 1.15;
}
.stat-value.accent {
  color: var(--orange-ink);
}
.stat-value small {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
}

.stat-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.hero-cta-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.hero-action-guide {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-dark);
  margin: 0;
}

/* ============ FLAT BUTTONS (No glossy gradients) ============ */
.btn-primary-cta {
  background: var(--yellow);
  color: var(--green-night);
  border: 1px solid rgba(19, 70, 58, 0.16);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.03em;
  cursor: pointer;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  transition: background-color 0.15s ease;
}
.btn-primary-cta:hover:not(:disabled) {
  background: var(--yellow-hover);
}
.btn-primary-cta:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
.btn-primary-cta:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn-editorial-link {
  background: transparent;
  border: none;
  padding: 6px 0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--green);
  cursor: pointer;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-bottom: 1px solid rgba(19, 70, 58, 0.3);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.btn-editorial-link:hover,
.btn-editorial-link:focus-visible {
  color: var(--orange-ink);
  border-bottom-color: var(--orange-ink);
  outline: none;
}

.btn-secondary-outline {
  background: transparent;
  color: var(--green);
  border: 1px solid rgba(19, 70, 58, 0.35);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  width: 100%;
}
.btn-secondary-outline:hover {
  background: var(--mint);
  border-color: var(--green);
}

/* ============ TRANSMITTING SECTION ============ */
.transmitting-section {
  padding: 24px 0;
  border-top: 1px solid var(--hairline);
}
.transmitting-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--green);
  line-height: 1.25;
}
.transmitting-desc {
  font-size: 14px;
  color: var(--text-muted);
}
.progress-bar-track {
  width: 100%;
  height: 4px;
  background: rgba(19, 70, 58, 0.12);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.progress-bar-glow {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 40%;
  background: var(--orange);
  animation: indetProgress 1.2s infinite ease-in-out;
}
@keyframes indetProgress {
  0% { left: -40%; width: 40%; }
  100% { left: 100%; width: 35%; }
}

.api-error-box {
  padding: 14px;
  border-radius: var(--radius-sm);
  background: #FEF2F2;
  border: 1px solid #FCA5A5;
}
.api-error-text {
  color: #991B1B;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
}
.api-error-actions {
  display: flex;
  gap: 8px;
}

/* ============ RESULT SECTION ============ */
.result-headline {
  font-size: 24px;
  font-weight: 800;
  color: var(--green);
  line-height: 1.24;
  scroll-margin-top: 24px;
}
.result-count-line {
  font-size: 15px;
  color: var(--text-muted);
}
.result-count-line strong {
  color: var(--orange-ink);
  font-weight: 800;
}
.result-commitment-note {
  border-left: 3px solid var(--green);
  padding: 4px 0 4px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rc-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.rc-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--green);
}
.rc-desc {
  font-size: 13px;
  color: var(--text-muted);
}
.share-preview-wrap {
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--hairline);
}
#share-canvas {
  width: 100%;
  height: auto;
  display: block;
}
.result-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.result-secondary-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.share-status-msg {
  font-size: 12.5px;
  color: var(--green);
  min-height: 18px;
}

.result-fb-follow,
.result-fb-card {
  margin-top: 2px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--mint);
  border: 1.5px solid rgba(19, 70, 58, 0.34);
  border-left: 4px solid var(--orange);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.result-fb-header {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.result-fb-badge {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange-ink);
}
.result-fb-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.28;
  color: var(--green);
}
.result-fb-copy {
  font-size: 14px;
  line-height: 1.52;
  color: var(--text-dark);
}
.btn-fb-follow,
.btn-result-fb-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--green);
  background: var(--green);
  color: var(--cream);
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.btn-fb-follow:hover,
.btn-result-fb-cta:hover {
  background: var(--green-night);
  border-color: var(--green-night);
  color: var(--yellow);
}
.btn-fb-follow:focus-visible,
.btn-result-fb-cta:focus-visible {
  background: var(--green-night);
  border-color: var(--green-night);
  color: var(--yellow);
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}
.btn-fb-follow:active,
.btn-result-fb-cta:active {
  transform: translateY(1px);
}
.result-fb-subnote {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--text-dark);
  font-weight: 600;
  text-align: center;
}
.btn-ext-cue {
  font-size: 14px;
  line-height: 1;
  opacity: 0.92;
}
.fb-icon {
  flex-shrink: 0;
  display: block;
}

/* ============ OVERVIEW SECTION (Editorial Metrics + Index List) ============ */
.overview-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--green);
  line-height: 1.2;
}

.overview-stats-block {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.overview-kpi-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.kpi-cell {
  padding: 14px 12px 14px 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.overview-kpi-pair .kpi-cell:nth-child(2) {
  padding-left: 16px;
  padding-right: 0;
  border-left: 1px solid var(--hairline);
}

.overview-split-section {
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
}
.overview-split-heading {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 0 4px;
  margin: 0;
  border: none;
}
.overview-split-section .kpi-cell {
  padding-top: 4px;
  padding-bottom: 14px;
}

.kpi-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.kpi-num {
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--green);
  line-height: 1.15;
}
.kpi-num.accent {
  color: var(--orange-ink);
}
.kpi-num small {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}
.kpi-unit {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* ============ ABOUT SECTION (Về Wattellers) ============ */
.about-article {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.about-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hairline);
}
.about-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--green);
  line-height: 1.2;
}
.about-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--hairline);
}
.about-block:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.about-block h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--green);
}
.about-block p {
  font-size: 14.5px;
  line-height: 1.62;
  color: var(--text-dark);
}
.about-sources-list {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-dark);
}
.about-link {
  color: var(--green);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.about-link:hover,
.about-link:focus-visible {
  color: var(--orange-ink);
  outline: none;
}
.about-connect-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 4px;
}

.leaderboard-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lb-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}
.lb-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lb-header h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--green);
}
.lb-disclaimer {
  font-size: 12px;
  line-height: 1.42;
  color: var(--text-dark);
}
.btn-text-action {
  background: none;
  border: none;
  color: var(--green);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  white-space: nowrap;
  padding: 6px 0;
  min-height: 44px;
}
.btn-text-action:hover {
  color: var(--orange-ink);
}

.lb-list {
  display: flex;
  flex-direction: column;
  max-height: 360px;
  overflow-y: auto;
  border-top: 1px solid var(--hairline);
}
.lb-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 6px;
  border-bottom: 1px solid var(--hairline);
  border-left: 3px solid transparent;
  cursor: pointer;
  font-size: 13px;
  transition: background-color 0.15s ease;
}
.lb-item:hover,
.lb-item:focus-visible {
  background: var(--mint);
  outline: none;
}
.lb-item.active {
  background: var(--mint);
  border-left-color: var(--orange);
  font-weight: 700;
}
.lb-item-left {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.lb-rank {
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  width: 18px;
  flex-shrink: 0;
}
.lb-name {
  color: var(--green);
  font-weight: 600;
}
.lb-count {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--orange-ink);
  white-space: nowrap;
}
.lb-empty {
  font-size: 13px;
  color: var(--text-muted);
  padding: 10px 0;
}

/* ============ MAP STAGE (CARTROGRAPHIC CENTERPIECE) ============ */
.map-stage {
  position: relative;
  background-color: var(--sea-bg);
  border: 1px solid rgba(19, 70, 58, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--cream);
  min-width: 0;
}

.map-viewport {
  --map-h: clamp(440px, 61vh, 565px);
  --map-w: min(100%, calc(var(--map-h) * 624 / 708));
  position: relative;
  width: 100%;
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.map-canvas-wrap {
  position: relative;
  flex: 0 0 auto;
  width: var(--map-w);
  aspect-ratio: 624 / 708;
  height: auto;
  max-width: 100%;
}

#vietnam-map,
.map-light-points-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
#vietnam-map {
  overflow: visible;
}
.map-light-points-canvas {
  pointer-events: none;
  z-index: 8;
}

/* Đất liền & đảo thật sáng hơn biển rõ rệt (theo đường bờ natural=coastline; không vẽ ranh biển OSM lên giao diện) */
.province-path {
  fill: var(--land-base);
  stroke: rgba(228, 239, 234, 0.52);
  stroke-width: 0.9px;
  vector-effect: non-scaling-stroke;
  fill-rule: evenodd;
  stroke-linejoin: round;
  stroke-linecap: round;
  cursor: pointer;
  transition: fill 0.22s ease, stroke 0.18s ease, stroke-width 0.18s ease;
}
.province-path:hover,
.province-path:focus-visible {
  fill: #2E7B63;
  stroke: rgba(228, 239, 234, 0.92);
  stroke-width: 1.5px;
  outline: none;
}

/* Trạng thái chọn dùng viền kem/ngọc thanh thoát — tách biệt khỏi ánh sáng vàng của cam kết */
.province-path.selected {
  stroke: #FAF6EE !important;
  stroke-width: 2.1px !important;
  filter: drop-shadow(0 0 2.5px rgba(228, 239, 234, 0.45));
}
.province-path.selected[data-lv="0"] {
  fill: #2E745F;
  stroke: #E4EFEA !important;
  stroke-width: 1.9px !important;
  filter: none !important;
}

/* 7 cấp độ sáng giữ nền xanh địa lý hài hoà, không phủ kín mảng vàng/cam */
.province-path[data-lv="1"] { fill: #2A715B; }
.province-path[data-lv="2"] { fill: #317C61; }
.province-path[data-lv="3"] { fill: #3B8765; }
.province-path[data-lv="4"] { fill: #479268; }
.province-path[data-lv="5"] { fill: #569E6B; }
.province-path[data-lv="6"] { fill: #68AA6E; }

.province-path.pulse-highlight {
  animation: provincePulse 0.65s ease-out;
}
@keyframes provincePulse {
  0% { filter: brightness(1.0); }
  45% { filter: brightness(1.25) drop-shadow(0 0 4px rgba(242, 201, 85, 0.52)); }
  100% { filter: brightness(1.0); }
}

.light-halo {
  fill: url(#nodeGlowGrad);
  opacity: 0.28;
}
.light-core {
  fill: #FFF9DF;
  opacity: 0.68;
  stroke: none;
}
.tx-beam-path {
  fill: none;
  stroke: url(#energyBeamGrad);
  stroke-width: 3.5px;
  stroke-linecap: round;
  filter: url(#glowFilter);
}
.tx-particle {
  fill: #FFFBEB;
  filter: url(#glowFilter);
}
.tx-burst-ring {
  fill: none;
  stroke: var(--yellow);
  stroke-width: 2px;
  transform-box: fill-box;
  transform-origin: center;
  animation: burstRing 0.55s ease-out forwards;
}
@keyframes burstRing {
  0% { transform: scale(0.4); opacity: 0.95; }
  100% { transform: scale(2.1); opacity: 0; }
}

/* ============ HAI QUẦN ĐẢO & ĐẢO BẠCH LONG VĨ (KHÔNG KHUNG NÉT ĐỨT, TÁCH CHỌN VÀ CAM KẾT) ============ */
.island-cluster {
  cursor: pointer;
}
.island-cluster:focus-visible {
  outline: none;
}
/* Vùng bấm trong suốt hoàn toàn — tuyệt đối không vẽ khung chữ nhật hay nét đứt quanh quần đảo */
.island-locator-frame {
  fill: transparent;
  stroke: transparent;
  stroke-width: 0;
  pointer-events: all;
}

/* Lớp 3A: Quầng sáng đồng bộ dữ liệu cam kết nằm DƯỚI nền địa lý; 0 lượt = luôn tắt hoàn toàn */
.island-sync-halo {
  fill: url(#islandSoftGlowGrad);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.island-sync-halo[data-lv="0"] {
  opacity: 0 !important;
}
.island-sync-halo[data-lv="1"],
.island-sync-halo[data-lv="2"] {
  opacity: 0.28;
}
.island-sync-halo[data-lv="3"],
.island-sync-halo[data-lv="4"] {
  opacity: 0.38;
}
.island-sync-halo[data-lv="5"],
.island-sync-halo[data-lv="6"] {
  opacity: 0.48;
}

/* Lớp 1: Nền địa lý bất biến (phân biệt rõ đảo nổi vs rạn san hô/bãi cạn) */
.archipelago-reef {
  fill: rgba(38, 108, 86, 0.36);
  stroke: rgba(152, 218, 194, 0.85);
  stroke-width: 0.75px;
  stroke-dasharray: 2 1.2;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  transition: stroke 0.18s ease, fill 0.18s ease;
}
.archipelago-island {
  fill: #5CC09A;
  stroke: #FAF6EE;
  stroke-width: 1.0px;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  transition: stroke 0.18s ease, fill 0.18s ease;
}
.island-cluster:hover .archipelago-reef {
  stroke: #BFEFE0;
  stroke-width: 0.95px;
}
.island-cluster:hover .archipelago-island {
  fill: #70D0AB;
  stroke: #FFFFFF;
}
.island-cluster:focus-visible .archipelago-island,
.island-cluster.selected .archipelago-island {
  fill: #7AD9B5;
  stroke: #FFFFFF;
  stroke-width: 1.45px;
}
.island-cluster:focus-visible .archipelago-reef,
.island-cluster.selected .archipelago-reef {
  stroke: #D9F7ED;
  stroke-width: 1.05px;
}

/* Lớp 2: Nhãn địa danh & hành chính (nhẹ nét, rõ chữ, không chồng hình) */
.sea-region-label {
  fill: rgba(196, 224, 213, 0.42);
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 11px;
  font-style: italic;
  font-weight: 600;
  letter-spacing: 0.08em;
  pointer-events: none;
}
.island-pin-label {
  cursor: pointer;
}
.island-pin-label:focus-visible {
  outline: none;
}
.island-leader-line {
  stroke: rgba(228, 239, 234, 0.65);
  stroke-width: 0.85px;
  vector-effect: non-scaling-stroke;
}
.small-island-label {
  fill: #FAF6EE;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 9.8px;
  font-weight: 700;
  paint-order: stroke fill;
  stroke: rgba(13, 46, 37, 0.88);
  stroke-width: 1.8px;
  stroke-linejoin: round;
  transition: fill 0.18s ease;
}
.small-island-sub {
  fill: rgba(228, 239, 234, 0.88);
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 8.4px;
  font-weight: 500;
  paint-order: stroke fill;
  stroke: rgba(13, 46, 37, 0.88);
  stroke-width: 1.5px;
  stroke-linejoin: round;
}
.island-pin-label:hover .small-island-label,
.island-pin-label.selected .small-island-label,
.island-pin-label:focus-visible .small-island-label {
  fill: #9EE6CB;
}
.island-pin-label:focus-visible .small-island-label {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.archipelago-label-group {
  cursor: pointer;
}
.island-pin-hit {
  fill: transparent;
  stroke: transparent;
  cursor: pointer;
}
.island-pin-hit:focus-visible,
.island-pin-hit.selected,
.island-pin-hit.kbd-focused {
  outline: none;
  stroke: rgba(158, 230, 203, 0.85);
  stroke-width: 1.5px;
  stroke-dasharray: 3 2;
}
.island-label-title {
  fill: #FAF6EE;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  paint-order: stroke fill;
  stroke: rgba(13, 46, 37, 0.88);
  stroke-width: 2px;
  stroke-linejoin: round;
  transition: fill 0.18s ease;
}
.island-label-sub {
  fill: rgba(228, 239, 234, 0.86);
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 9.8px;
  font-weight: 500;
  paint-order: stroke fill;
  stroke: rgba(13, 46, 37, 0.88);
  stroke-width: 1.8px;
  stroke-linejoin: round;
  transition: fill 0.18s ease;
}
.archipelago-label-group:hover .island-label-title,
.archipelago-label-group.selected .island-label-title,
.archipelago-label-group.kbd-focused .island-label-title {
  fill: #9EE6CB;
}
.archipelago-label-group.selected .island-label-title,
.archipelago-label-group.kbd-focused .island-label-title {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.archipelago-label-group.selected .island-label-sub,
.archipelago-label-group.kbd-focused .island-label-sub {
  fill: #FAF6EE;
}

/* Tooltip: chỉ desktop, chỉ khi hover hoặc focus bàn phím */
.map-tooltip {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--green-night);
  border: 1px solid rgba(228, 239, 234, 0.42);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--cream);
  pointer-events: none;
  z-index: 20;
  max-width: min(270px, 60%);
  box-shadow: var(--shadow-float);
}
.map-tooltip[hidden] {
  display: none;
}
.map-tooltip .tt-ratio {
  margin-top: 2px;
  color: var(--mint);
}
.map-tooltip .tt-scope-note {
  margin-top: 4px;
  font-size: 11px;
  color: #CFE6DC;
  line-height: 1.35;
}

/* ============ THANH THÔNG TIN TỈNH (Gọn, cân đối, không dấu phân cách thừa) ============ */
.province-info-bar {
  border-top: 1px solid rgba(228, 239, 234, 0.16);
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--cream);
  min-width: 0;
}
.pib-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
}
.pib-name {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--cream);
  margin: 0;
  white-space: normal;
  overflow-wrap: break-word;
}
.pib-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 14px;
  font-size: 13px;
  color: var(--mint);
}
.pib-count-wrap strong {
  color: var(--yellow);
  font-weight: 800;
}
.pib-tier,
.pib-split,
.pib-invite {
  color: rgba(228, 239, 234, 0.88);
}
.pib-split strong {
  color: var(--cream);
  font-weight: 700;
}
.pib-stat-item[hidden],
.pib-scope-note[hidden],
.btn-province-action[hidden] {
  display: none !important;
}
.pib-scope-note {
  margin: 1px 0 0;
  font-size: 12px;
  color: #CFE6DC;
  line-height: 1.4;
}

.btn-province-action {
  background: var(--yellow);
  color: var(--green-night);
  border: 1px solid rgba(250, 246, 238, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 0.15s ease, transform 0.1s ease;
}
.btn-province-action:hover {
  background: var(--yellow-hover);
}
.btn-province-action:focus-visible {
  background: var(--yellow-hover);
  outline: 2px solid #FAF6EE;
  outline-offset: 2px;
}

/* ============ CHÚ GIẢI GỌN & GHI NGUỒN MỘT DÒNG ============ */
.map-legend-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(228, 239, 234, 0.12);
}
.legend-tiers-compact {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  font-size: 12px;
  color: var(--mint);
  min-width: 0;
}
.map-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 14px;
}
.legend-geo-item {
  color: rgba(228, 239, 234, 0.9);
}
.lg-geo-island {
  width: 11px;
  height: 8px;
  border-radius: 2px;
  display: inline-block;
  flex-shrink: 0;
  background: #5CC09A;
  border: 1px solid #FAF6EE;
}
.lg-geo-reef {
  width: 11px;
  height: 8px;
  border-radius: 2px;
  display: inline-block;
  flex-shrink: 0;
  background: rgba(38, 108, 86, 0.36);
  border: 1px dashed rgba(152, 218, 194, 0.88);
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.35;
}
.lg-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.lg-dot.lv0 { background: var(--land-base); border: 1px solid rgba(228, 239, 234, 0.65); }
.lg-dot.lv2 { background: #317C61; border: 1px solid rgba(242, 201, 85, 0.7); }
.lg-dot.lv4 { background: #479268; border: 1.5px solid var(--yellow); }
.lg-dot.lv6 { background: #F2C955; border: 1.5px solid #FFFDF2; }

.map-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.map-attribution-line {
  font-size: 11px;
  line-height: 1.45;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 8px;
  color: rgba(228, 239, 234, 0.78);
}
.map-point-meaning {
  color: rgba(228, 239, 234, 0.85);
}
.map-attr-link {
  color: rgba(250, 246, 238, 0.88);
  text-decoration: none;
  border-bottom: 1px solid rgba(250, 246, 238, 0.35);
  padding-bottom: 1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.map-attr-link:hover,
.map-attr-link:focus-visible {
  color: #FAF6EE;
  border-bottom-color: #FAF6EE;
  outline: none;
}

/* ============ BOTTOM SHEET (CHỈ DÙNG BÓNG ĐỔ CHO THÀNH PHẦN NỔI) ============ */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 32, 25, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  padding: 16px;
}
.sheet-backdrop[hidden] {
  display: none !important;
}
.commitment-sheet {
  background: var(--cream);
  color: var(--text-dark);
  border-radius: var(--radius-sheet);
  max-width: 520px;
  width: 100%;
  max-height: 88vh;
  max-height: 88dvh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-float);
  border: 1px solid var(--hairline);
  overflow: hidden;
}
.sheet-handle {
  width: 44px;
  height: 4px;
  background: rgba(19, 70, 58, 0.22);
  border-radius: 2px;
  margin: 10px auto 4px;
  display: none;
}
.sheet-header {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.sheet-kicker {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--orange-ink);
  text-transform: uppercase;
}
.sheet-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--green);
}
.btn-close-sheet {
  background: transparent;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-close-sheet:hover {
  background: var(--mint);
  color: var(--text-dark);
}

#commitment-form {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
}
.req-star {
  color: var(--danger);
}
.form-help-text {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-dark);
}
.province-search-box {
  position: relative;
  display: flex;
  align-items: center;
}
.form-input {
  width: 100%;
  padding: 11px 36px 11px 12px;
  font-size: 16px;
  font-family: inherit;
  border: 1px solid rgba(19, 70, 58, 0.25);
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  color: var(--text-dark);
  min-height: 44px;
}
.form-input:focus {
  border-color: var(--green);
  outline: 2px solid rgba(19, 70, 58, 0.2);
}
.btn-input-clear[hidden] {
  display: none !important;
}
.btn-input-clear {
  position: absolute;
  right: 4px;
  background: transparent;
  border: none;
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 10px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.selected-province-pill[hidden] {
  display: none !important;
}
.selected-province-pill {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--mint);
  border-left: 3px solid var(--green);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 6px 10px;
  font-size: 12.5px;
}
.spp-tag { color: var(--text-muted); font-size: 11.5px; }
.spp-code { font-weight: 800; color: var(--green); }
.spp-name { color: var(--green); font-weight: 700; }
.spp-mapped { font-size: 11.5px; color: var(--orange-ink); font-weight: 700; }

.province-dropdown-list[hidden] { display: none; }
.province-dropdown-list {
  list-style: none;
  background: #FFFFFF;
  border: 1px solid rgba(19, 70, 58, 0.22);
  border-radius: var(--radius-sm);
  max-height: 210px;
  overflow-y: auto;
}
.province-option-item {
  padding: 9px 12px;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 1px solid rgba(19, 70, 58, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
}
.province-option-item:hover,
.province-option-item:focus,
.province-option-item.active {
  background: var(--mint);
  color: var(--green);
  outline: none;
}
.poi-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.poi-code { color: var(--text-muted); font-weight: 700; font-size: 11.5px; flex-shrink: 0; }
.poi-name { color: var(--green); font-weight: 600; }
.poi-alias-badge { font-size: 11px; color: var(--orange-ink); font-weight: 700; text-align: right; margin-left: 8px; }
.field-error { color: var(--danger); font-size: 11.5px; font-weight: 600; }

.age-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.choice-pill { position: relative; cursor: pointer; }
.choice-pill input { position: absolute; opacity: 0; width: 0; height: 0; }
.choice-box {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 4px;
  background: #FFFFFF;
  border: 1px solid rgba(19, 70, 58, 0.22);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
  min-height: 44px;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.choice-pill input:checked + .choice-box {
  background: var(--green);
  color: #FFFFFF;
  border-color: var(--green);
  font-weight: 800;
}
.choice-pill input:focus-visible + .choice-box {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

.commitment-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.commitment-option-card { position: relative; cursor: pointer; display: flex; }
.commitment-option-card input { position: absolute; opacity: 0; width: 0; height: 0; }
.coc-body {
  width: 100%;
  padding: 12px;
  background: #FFFFFF;
  border: 1px solid rgba(19, 70, 58, 0.22);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 44px;
}
.coc-title { font-size: 13.5px; font-weight: 800; color: var(--green); }
.coc-desc { font-size: 12.5px; color: var(--text-dark); line-height: 1.45; }
.commitment-option-card input:checked + .coc-body {
  border-color: var(--green);
  border-width: 2px;
  background: var(--mint);
}
.commitment-option-card input:focus-visible + .coc-body {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

.sheet-footer {
  position: sticky;
  bottom: -16px;
  margin: 0 -20px -16px;
  padding: 10px 20px calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--cream);
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.full-width { width: 100%; }
.privacy-microcopy { font-size: 12px; line-height: 1.45; color: var(--text-dark); text-align: center; }

.site-footer {
  max-width: 1380px;
  margin: 0 auto;
  padding: 18px 24px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  font-size: 12.5px;
  color: var(--text-dark);
  border-top: 1px solid var(--hairline);
  flex-wrap: wrap;
}
.footer-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
}
.footer-link {
  color: var(--green);
  text-decoration: none;
  border-bottom: 1px solid rgba(19, 70, 58, 0.28);
  padding-bottom: 1px;
  font-weight: 600;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.footer-link:hover,
.footer-link:focus-visible {
  color: var(--orange-ink);
  border-bottom-color: var(--orange-ink);
  outline: none;
}
.footer-campaign-note {
  font-size: 12px;
  color: var(--text-muted);
}
.footer-fb-link,
.btn-footer-fb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: var(--mint);
  border: 1.5px solid rgba(19, 70, 58, 0.38);
  color: var(--green);
  font-size: 13.5px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.footer-fb-link:hover,
.btn-footer-fb:hover {
  background: var(--green);
  border-color: var(--green);
  color: var(--cream);
}
.footer-fb-link:focus-visible,
.btn-footer-fb:focus-visible {
  background: var(--green);
  border-color: var(--green);
  color: var(--cream);
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}
.footer-fb-link:active,
.btn-footer-fb:active {
  transform: translateY(1px);
}
.footer-sep {
  color: rgba(19, 70, 58, 0.35);
}

/* ============ RESPONSIVE (360x800, 390x844, 430x932, 768x1024, 1366x768) ============ */
@media (max-width: 960px) {
  .header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    padding: 8px 14px 10px;
  }
  .brand-logo { height: 24px; }
  .brand-titles { padding-left: 10px; }
  .campaign-kicker { display: none; }
  .site-title { font-size: 15.5px; white-space: normal; }
  .header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 4px 6px;
    border-top: 1px solid var(--hairline);
    padding-top: 4px;
  }
  .btn-nav {
    min-height: 44px;
    padding: 8px 10px;
    font-size: 13px;
  }
  #btn-header-cta {
    margin-left: auto;
  }

  .app-layout {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 10px 12px 24px;
    gap: 12px;
  }

  .app-layout[data-screen="intro"] .story-column,
  .app-layout[data-screen="intro"] #panel-intro {
    display: contents;
  }
  .app-layout[data-screen="intro"] .hero-section {
    order: 1;
    gap: 8px;
  }
  .app-layout[data-screen="intro"] .hero-eyebrow { font-size: 9.5px; }
  .app-layout[data-screen="intro"] .hero-headline { font-size: 22px; }
  .app-layout[data-screen="intro"] .hero-lead { display: none; }
  .app-layout[data-screen="intro"] .stats-summary-strip {
    padding: 8px 0;
    gap: 14px;
  }
  .app-layout[data-screen="intro"] .stat-label { font-size: 9.5px; }
  .app-layout[data-screen="intro"] .stat-value { font-size: 20px; }
  .app-layout[data-screen="intro"] .stat-sub { display: none; }
  .app-layout[data-screen="intro"] #btn-intro-view-map { display: none; }
  .app-layout[data-screen="intro"] .map-column { order: 2; }

  .app-layout[data-screen="overview"] .story-column { order: 1; }
  .app-layout[data-screen="overview"] .map-column { order: 2; }
  .app-layout[data-screen="transmitting"] .map-column,
  .app-layout[data-screen="result"] .map-column { order: 2; }

  .map-stage {
    padding: 10px 10px 12px;
    gap: 10px;
  }
  /* Giữ nguyên tỷ lệ bản đồ thống nhất 1:1 trên mobile, không co kéo méo */
  .map-viewport {
    --map-h: 420px;
    --map-w: min(100%, calc(var(--map-h) * 624 / 708));
  }
  .map-tooltip { display: none !important; }

  .province-info-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .pib-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }
  .pib-stat-item:not([hidden]) + .pib-stat-item:not([hidden])::before {
    content: none;
    margin-right: 0;
  }
  .btn-province-action {
    width: 100%;
  }
  .legend-tiers-compact {
    gap: 6px 12px;
    width: 100%;
  }

  .sheet-backdrop {
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    height: 100%;
    height: 100dvh;
  }
  .commitment-sheet {
    max-width: 100%;
    max-height: calc(100% - 10px);
    max-height: calc(100dvh - 10px);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
  .sheet-handle { display: block; flex-shrink: 0; }
  .sheet-header { padding: 10px 16px; }
  #commitment-form {
    padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    gap: 12px;
  }
  .sheet-footer {
    position: static;
    margin: 4px 0 0;
    padding: 12px 0 4px;
    background: transparent;
  }
  .commitment-cards-grid { grid-template-columns: 1fr; }

  .site-footer { padding: 16px 14px 28px; }
  .footer-right {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 10px;
  }
  .btn-footer-fb {
    width: 100%;
  }
  .footer-sep { display: none; }
}

@media (min-width: 640px) and (max-width: 960px) {
  .footer-right {
    flex-direction: row;
    align-items: center;
    width: auto;
    gap: 8px 14px;
  }
  .btn-footer-fb {
    width: auto;
  }
  .map-viewport {
    --map-h: 520px;
  }
  .province-info-bar {
    flex-direction: row;
    align-items: center;
  }
  .pib-meta {
    flex-direction: row;
    align-items: baseline;
    gap: 3px 14px;
  }
  .btn-province-action { width: auto; }
}

@media (max-width: 560px) {
  .header-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px;
  }
  .demo-badge {
    grid-column: 1 / -1;
    justify-self: start;
    margin-bottom: 2px;
  }
  .demo-badge[hidden] {
    display: none !important;
  }
  .btn-nav {
    padding: 8px 4px;
    font-size: 12.5px;
    text-align: center;
  }
  #btn-header-cta {
    display: none;
  }
  .about-title {
    font-size: 24px;
  }
}

@media (max-width: 380px) {
  .map-viewport { --map-h: 365px; }
  .btn-nav { font-size: 12px; padding: 8px 2px; }
  .age-grid { grid-template-columns: repeat(2, 1fr); }
  .result-secondary-row { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .age-grid { grid-template-columns: repeat(2, 1fr); }
  .result-secondary-row { grid-template-columns: 1fr; }
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .light-pulse-ring { display: none; }
}
