:root {
  color-scheme: light;
  --bg: #F7F4EE;
  --surface: #FFFFFF;
  --surface-2: #EFEAE1;
  --border: #E4DCD1;
  --text: #1C1917;
  --muted: #5E574F;
  --primary: #C45243;
  --primary-dark: #A53F32;
  --primary-soft: #FBECE9;
  --mint: #2D7563;
  --mint-dark: #21594B;
  --mint-soft: #E7F3EF;
  --cobalt: #36557C;
  --cobalt-soft: #EBF0F6;
  --amber: #9E5E1A;
  --amber-soft: #FBF1E3;
  --shadow-sm: 0 1px 2px rgba(28, 25, 23, 0.04), 0 4px 12px rgba(28, 25, 23, 0.035);
  --shadow: 0 2px 6px rgba(28, 25, 23, 0.04), 0 14px 34px rgba(28, 25, 23, 0.06);
  --font-serif: 'Lora', Georgia, 'Times New Roman', serif;
  --font-sans: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
}

body.dark {
  color-scheme: dark;
  --bg: #141210;
  --surface: #1D1A17;
  --surface-2: #27221E;
  --border: #38312B;
  --text: #F4EFE8;
  --muted: #B3A89C;
  --primary: #DF7566;
  --primary-dark: #CE6557;
  --primary-soft: rgba(223, 117, 102, 0.16);
  --mint: #5FB09A;
  --mint-dark: #489782;
  --mint-soft: rgba(95, 176, 154, 0.15);
  --cobalt: #82A4D1;
  --cobalt-soft: rgba(130, 164, 209, 0.15);
  --amber: #E2A959;
  --amber-soft: rgba(226, 169, 89, 0.15);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow: 0 10px 34px rgba(0, 0, 0, 0.48);
}

* { box-sizing: border-box; }
[id] { scroll-margin-top: 84px; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
::selection {
  background: rgba(196, 82, 67, 0.18);
  color: var(--text);
}
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.64;
  caret-color: var(--primary);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.tabular { font-variant-numeric: tabular-nums; }

.ico { width: 18px; height: 18px; flex-shrink: 0; display: inline-block; vertical-align: middle; }
.ico-sm { width: 16px; height: 16px; }
.ico-xs { width: 14px; height: 14px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(247, 244, 238, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}
body.dark .site-header {
  background: rgba(20, 18, 16, 0.88);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.14rem;
  letter-spacing: -0.02em;
}
.brand-mark {
  border-radius: 8px;
  display: block;
  box-shadow: 0 1px 3px rgba(28, 25, 23, 0.12);
}
.site-nav { display: flex; gap: 22px; align-items: center; }
.site-nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.16s ease;
}
.site-nav a:hover { color: var(--text); }
.header-actions { display: flex; gap: 8px; align-items: center; }

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.icon-btn:hover {
  color: var(--text);
  background: var(--surface-2);
}

/* Unified Button System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: 11px;
  text-decoration: none;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.14s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; border-radius: 10px; }
.btn-lg { padding: 13px 22px; font-size: 0.96rem; border-radius: 12px; }
.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 1px 2px rgba(196, 82, 67, 0.25);
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-mint {
  background: var(--mint);
  color: #FFFFFF;
}
.btn-mint:hover { background: var(--mint-dark); }
body.dark .btn-primary { color: #191210; font-weight: 700; }
body.dark .btn-mint { color: #0B1915; font-weight: 700; }
.btn-outline {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.btn-outline:hover {
  background: var(--surface-2);
  border-color: #D4C8BA;
}
body.dark .btn-outline:hover { border-color: #4D443C; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Hero */
.hero { padding: 64px 0 60px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 44px;
  align-items: center;
}
.hero-copy h1 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(2.15rem, 3.8vw, 3.2rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
  text-wrap: balance;
}
.hero-copy h1 em {
  font-style: italic;
  color: var(--primary);
  font-weight: 600;
}
.lead {
  font-size: 1.02rem;
  color: var(--muted);
  margin: 0 0 26px;
  max-width: 56ch;
}
.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.hero-trust {
  list-style: none;
  margin: 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--muted);
}
.hero-trust li {
  display: flex;
  align-items: center;
  gap: 9px;
}
.hero-trust svg { color: var(--mint); }

/* Hero Interactive Explorer — Flattened Hairline Sheet */
.hero-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
}
.hw-head { margin-bottom: 16px; }
.hw-title {
  font-family: var(--font-serif);
  font-size: 1.18rem;
  font-weight: 600;
  margin: 0 0 4px;
  letter-spacing: -0.015em;
}
.hw-sub {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.age-pills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}
.age-pill-btn {
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.81rem;
  cursor: pointer;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.age-pill-btn:hover {
  color: var(--text);
  border-color: #CFC3B5;
}
.age-pill-btn.active {
  background: var(--text);
  color: var(--surface);
  border-color: var(--text);
}

.age-preview-card {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.apc-title {
  font-weight: 700;
  font-size: 0.98rem;
  margin-bottom: 12px;
  color: var(--text);
}
.apc-rows {
  display: grid;
  gap: 0;
  margin-bottom: 16px;
}
.apc-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
.apc-row:last-child { border-bottom: none; }
.apc-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--muted);
  font-size: 0.82rem;
}
.apc-label svg { color: var(--primary); }

.apc-bilingual {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  background: var(--mint-soft);
  border: 1px solid rgba(45, 117, 99, 0.22);
  border-radius: 14px;
  padding: 12px 14px;
}
.apc-bilingual .btn {
  white-space: nowrap;
  flex-shrink: 0;
}
.apc-bi-tag {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--mint-dark);
  margin-bottom: 3px;
}
body.dark .apc-bi-tag { color: var(--mint); }
.apc-bi-en {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  font-size: 0.96rem;
  color: var(--text);
}
.apc-bi-vi {
  font-size: 0.84rem;
  color: var(--muted);
  margin-top: 2px;
}

/* Sections */
.section { padding: 68px 0; }
.section-alt {
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.sec-head {
  max-width: 660px;
  margin: 0 0 34px;
}
.sec-head h2 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.65rem, 2.8vw, 2.2rem);
  line-height: 1.22;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  text-wrap: balance;
}
.sec-head p { margin: 0; font-size: 0.98rem; }

/* Asymmetric Editorial Grids */
.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.cards-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.feat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.feat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: #D6CABC;
}
body.dark .feat-card:hover { border-color: #4B423A; }
.feat-spotlight { padding: 28px; }
.feat-spotlight h3 { font-size: 1.28rem; }

.fc-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ico-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ico-badge-coral { background: var(--primary-soft); color: var(--primary); }
.ico-badge-sage { background: var(--mint-soft); color: var(--mint); }
.ico-badge-slate { background: var(--cobalt-soft); color: var(--cobalt); }
.fc-meta {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.feat-card h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  margin: 0;
  font-size: 1.14rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
}
.feat-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.91rem;
  flex: 1;
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  align-self: flex-start;
  transition: gap 0.16s ease, color 0.16s ease;
}
.text-link:hover { gap: 8px; color: var(--primary-dark); }

/* Handbook & Reminder Panels */
.handbook-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.handbook-panel h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.32rem;
  line-height: 1.28;
  margin: 0;
}
.handbook-panel > p { margin: 0; font-size: 0.93rem; }
.handbook-panel .btn { align-self: flex-start; margin-top: auto; }

.cry-handbook-list {
  margin: 4px 0 8px;
  display: grid;
  gap: 0;
}
.cry-handbook-list > div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.89rem;
}
.cry-handbook-list > div:last-child { border-bottom: none; }
.cry-handbook-list dt {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  color: var(--primary);
}
.cry-handbook-list dd { margin: 0; color: var(--muted); }
.cry-handbook-list dd em { font-style: normal; color: var(--text); font-weight: 500; }

.clean-check-list {
  list-style: none;
  margin: 2px 0 10px;
  padding: 0;
  display: grid;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text);
}
.clean-check-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.clean-check-list svg {
  color: var(--mint);
  margin-top: 4px;
}

/* Share Strip */
.editorial-strip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 32px;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
}
.es-copy h2 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.48rem;
  margin: 6px 0 8px;
  line-height: 1.25;
}
.es-copy p { margin: 0; font-size: 0.93rem; }
.es-controls { display: grid; gap: 12px; }
.share-url-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 9px 12px 9px 14px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 0.87rem;
  color: var(--text);
  word-break: break-all;
}
.mono-url { font-weight: 600; color: var(--cobalt); }

/* Donate Panel */
.donate-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow-sm);
  max-width: 860px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}
.donate-qr-col { text-align: center; }
.donate-qr-img {
  width: 214px;
  height: auto;
  max-width: 100%;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #FFFFFF;
  padding: 8px;
  display: block;
  margin: 0 auto;
}
.donate-info-col h2 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.42rem;
  margin: 6px 0 8px;
  line-height: 1.26;
}
.donate-info-col > p { margin: 0 0 14px; font-size: 0.92rem; }
.bank-meta {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: grid;
  gap: 6px;
  font-size: 0.88rem;
}
.bank-meta > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.bank-meta dt { color: var(--muted); font-weight: 500; }
.bank-meta dd { margin: 0; font-weight: 700; color: var(--text); }
.donate-shopee-note { font-size: 0.84rem !important; }

.shopee-gentle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(194, 65, 12, 0.28);
  background: rgba(234, 88, 12, 0.06);
  color: #B44412;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.shopee-gentle-btn:hover {
  background: #C2410C;
  color: #FFFFFF;
  border-color: #C2410C;
}
body.dark .shopee-gentle-btn {
  background: rgba(251, 146, 60, 0.12);
  border-color: rgba(251, 146, 60, 0.34);
  color: #FDBA74;
}
body.dark .shopee-gentle-btn:hover {
  background: #C2410C;
  color: #FFFFFF;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 28px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-copy { display: grid; gap: 4px; max-width: 700px; }
.footer-brand { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inline-link { color: var(--primary); font-weight: 600; text-decoration: none; }
.inline-link:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .site-nav { display: none; }
  .spotlight-grid, .cards-3, .cards-2, .editorial-strip { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 18px; }
  .hero { padding: 34px 0 38px; }
  .section { padding: 44px 0; }
  .donate-panel { grid-template-columns: 1fr; padding: 22px; gap: 20px; }
  .editorial-strip { padding: 22px; gap: 18px; }
  .apc-row { grid-template-columns: 1fr; gap: 3px; }
  .apc-bilingual { flex-direction: column; align-items: flex-start; }
  .cry-handbook-list > div { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 520px) {
  .site-header { padding: 10px 0; }
  .brand { font-size: 1.05rem; }
  .icon-btn { width: 35px; height: 35px; }
  .header-actions .btn-sm { padding: 7px 12px; font-size: 0.82rem; }
  .hero-actions .btn-lg { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
