/* ============================================================
   CHÙA XANH — Design System
   Thẩm mỹ: thiền editorial · giấy ngà · mực rừng · vàng kim
   ============================================================ */
:root {
  --paper: #F6F1E5;
  --paper-warm: #FDFAF2;
  --paper-deep: #EDE5D2;
  --ink: #12291C;
  --ink-soft: #2C4636;
  --moss: #2F6B4A;
  --moss-deep: #1C4A31;
  --leaf: #7FB98F;
  --leaf-pale: #D8E8D6;
  --gold: #B98A2F;
  --gold-soft: #D9B15C;
  --gold-text: #8A6420; /* vàng đậm cho chữ nhỏ — đạt tương phản WCAG AA trên nền giấy */
  --terra: #A85B34;
  --lotus: #C77B8E;
  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-body: 'Be Vietnam Pro', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --shadow-soft: 0 2px 24px rgba(18, 41, 28, .08);
  --shadow-lift: 0 12px 40px rgba(18, 41, 28, .14);
  --radius: 18px;
  --radius-organic: 58% 42% 45% 55% / 52% 48% 52% 48%;
  --maxw: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Vân giấy — grain tinh tế phủ toàn trang */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 9999;
  opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.07 0 0 0 0 0.16 0 0 0 0 0.11 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { max-width: 100%; display: block; }
a { color: var(--moss); text-decoration: none; }

h1, h2, h3, .display { font-family: var(--font-display); font-weight: 600; line-height: 1.12; color: var(--ink); }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); letter-spacing: -.01em; }
h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
h3 { font-size: 1.5rem; }
.kicker {
  font-family: var(--font-body); font-size: .78rem; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase; color: var(--gold-text);
  display: inline-flex; align-items: center; gap: .7em;
}
.bg-forest .kicker, .hero .kicker, .app-hero .kicker, .auth-side .kicker, .cta-final .kicker { color: var(--gold-soft); }
.kicker::before { content: ''; width: 34px; height: 1.5px; background: var(--gold); }
.lede { font-size: 1.14rem; color: var(--ink-soft); max-width: 62ch; }
.serif-i { font-family: var(--font-display); font-style: italic; font-weight: 500; }
.mono { font-family: var(--font-mono); letter-spacing: .04em; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
section { position: relative; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  font-family: var(--font-body); font-weight: 600; font-size: .95rem;
  padding: .85em 1.9em; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; transition: transform .25s ease, box-shadow .25s ease, background .25s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.btn:active { transform: translateY(0); }
.btn-green { background: var(--moss-deep); color: var(--paper-warm); }
.btn-green:hover { background: var(--moss); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: #A47B28; }
.btn-outline { border-color: var(--moss-deep); color: var(--moss-deep); background: transparent; }
.btn-outline:hover { background: var(--moss-deep); color: var(--paper-warm); }
.btn-ghost { color: var(--paper-warm); border-color: rgba(255,255,255,.55); }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-lg { font-size: 1.05rem; padding: 1em 2.4em; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- Nav ---------- */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .35s, box-shadow .35s, backdrop-filter .35s;
}
.site-nav.scrolled {
  background: rgba(246, 241, 229, .88);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(18,41,28,.09);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 11px; }
.logo-leaf { width: 38px; height: 38px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--font-display); font-size: 1.28rem; letter-spacing: .06em; color: var(--ink); }
.brand-text small { font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a:not(.btn) {
  font-size: .92rem; font-weight: 500; color: var(--ink-soft);
  position: relative; padding: 4px 0; white-space: nowrap;
}
.nav-links a:not(.btn)::after {
  content: ''; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--gold); transition: width .3s;
}
.nav-links a:not(.btn):hover::after, .nav-links a.active:not(.btn)::after { width: 100%; }
.nav-cta { padding: .6em 1.4em; font-size: .88rem; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .3s; }

/* Nav trên nền tối (hero) */
.nav-dark-hero .site-nav:not(.scrolled) .brand-text strong,
.nav-dark-hero .site-nav:not(.scrolled) .nav-links a:not(.btn) { color: var(--paper-warm); }
.nav-dark-hero .site-nav:not(.scrolled) .brand-text small { color: var(--gold-soft); }
.nav-dark-hero .site-nav:not(.scrolled) .nav-toggle span { background: var(--paper-warm); }

/* ---------- Hero (landing) ---------- */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  background:
    radial-gradient(ellipse 90% 60% at 70% 20%, rgba(127,185,143,.22), transparent 60%),
    radial-gradient(ellipse 70% 50% at 20% 90%, rgba(185,138,47,.16), transparent 55%),
    linear-gradient(168deg, #0E241A 0%, #163524 50%, #1C4A31 100%);
  background-color: #12301F;
  color: var(--paper-warm);
  overflow: hidden;
  padding: 120px 0 0;
}
.hero-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; position: relative; z-index: 2; }
.hero h1 { color: var(--paper-warm); max-width: 13ch; }
.hero h1 em { font-style: italic; color: var(--gold-soft); }
.hero .lede { color: rgba(246,241,229,.82); margin: 26px 0 38px; }
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-scroll {
  margin-top: 64px; font-size: .78rem; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(246,241,229,.55); display: inline-flex; align-items: center; gap: 12px;
}
.hero-scroll::after { content: ''; width: 1px; height: 48px; background: linear-gradient(rgba(246,241,229,.6), transparent); }

/* Vòng đồng tâm — sóng chuông */
.hero-rings { position: absolute; right: -12%; top: 50%; transform: translateY(-50%); width: 58vw; max-width: 780px; aspect-ratio: 1; z-index: 1; opacity: .6; }
.hero-rings circle { fill: none; stroke: rgba(217,177,92,.35); stroke-width: 1; transform-origin: center; animation: ringPulse 7s ease-in-out infinite; }
.hero-rings circle:nth-child(2) { animation-delay: 1.2s; stroke: rgba(127,185,143,.3); }
.hero-rings circle:nth-child(3) { animation-delay: 2.4s; }
.hero-rings circle:nth-child(4) { animation-delay: 3.6s; stroke: rgba(127,185,143,.25); }
@keyframes ringPulse { 0%,100% { transform: scale(.96); opacity: .5; } 50% { transform: scale(1.03); opacity: 1; } }

/* Lá rơi */
.falling-leaf { position: absolute; z-index: 1; opacity: 0; animation: leafFall linear infinite; pointer-events: none; }
@keyframes leafFall {
  0% { transform: translateY(-6vh) rotate(0deg) translateX(0); opacity: 0; }
  8% { opacity: .75; }
  90% { opacity: .6; }
  100% { transform: translateY(106vh) rotate(340deg) translateX(60px); opacity: 0; }
}

/* Dải thống kê */
.stat-band { background: var(--paper-warm); border-block: 1px solid rgba(18,41,28,.09); }
.stat-band .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat-cell { padding: 40px 20px; text-align: center; position: relative; }
.stat-cell + .stat-cell::before { content: ''; position: absolute; left: 0; top: 26%; height: 48%; width: 1px; background: rgba(18,41,28,.12); }
.stat-num { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 4vw, 3rem); color: var(--moss-deep); line-height: 1; }
.stat-num small { font-size: .55em; color: var(--gold); }
.stat-label { font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); margin-top: 8px; font-weight: 500; }

/* ---------- Sections chung ---------- */
.section { padding: 110px 0; }
.section-head { max-width: 720px; margin-bottom: 60px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .kicker { justify-content: center; }
.section-head.center .kicker::before { display: none; }
.section-head h2 { margin: 18px 0 16px; }
.bg-deep { background: var(--paper-deep); }
.bg-forest { background: linear-gradient(170deg, #12301F, #1C4A31); color: var(--paper-warm); }
.bg-forest h2, .bg-forest h3 { color: var(--paper-warm); }
.bg-forest .lede { color: rgba(246,241,229,.8); }

/* Reveal khi cuộn — chỉ ẩn khi có JS (html.js); không JS thì nội dung hiện sẵn */
.reveal { transition: opacity .8s ease, transform .8s cubic-bezier(.22,1,.36,1); }
html.js .reveal { opacity: 0; transform: translateY(34px); }
html.js .reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .12s; } .reveal-d2 { transition-delay: .24s; } .reveal-d3 { transition-delay: .36s; }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .falling-leaf, .hero-rings circle, .phone, .float-chip { animation: none !important; }
  html { scroll-behavior: auto; }
}
/* Điều hướng bàn phím */
:focus-visible { outline: 2.5px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

/* ---------- Trụ cột ---------- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.pillar {
  background: var(--paper-warm); border-radius: var(--radius);
  padding: 42px 34px; position: relative; overflow: hidden;
  border: 1px solid rgba(18,41,28,.07);
  transition: transform .35s ease, box-shadow .35s ease;
}
.pillar:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.pillar-index {
  font-family: var(--font-display); font-style: italic; font-size: 4.4rem; line-height: 1;
  color: var(--leaf-pale); position: absolute; top: 18px; right: 24px; font-weight: 600;
}
.pillar-icon { width: 58px; height: 58px; margin-bottom: 22px; display: grid; place-items: center;
  background: var(--leaf-pale); border-radius: var(--radius-organic); font-size: 1.7rem; }
.pillar h3 { margin-bottom: 12px; }
.pillar p { color: var(--ink-soft); font-size: .96rem; }
.pillar ul { margin-top: 16px; list-style: none; }
.pillar li { font-size: .92rem; color: var(--ink-soft); padding: 5px 0 5px 24px; position: relative; }
.pillar li::before { content: '☘'; position: absolute; left: 0; color: var(--moss); font-size: .85em; }
.pillar:nth-child(2) .pillar-icon { background: #F3E3C6; }
.pillar:nth-child(3) .pillar-icon { background: #EFDBDF; }

/* ---------- Các bước (how it works) ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step { position: relative; padding: 34px 26px 30px; background: rgba(253,250,242,.06);
  border: 1px solid rgba(246,241,229,.16); border-radius: var(--radius); }
.step-num { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--gold-soft);
  letter-spacing: .18em; margin-bottom: 14px; display: block; }
.step h3 { font-size: 1.32rem; margin-bottom: 10px; }
.step p { font-size: .92rem; color: rgba(246,241,229,.78); }
.step::after { content: '→'; position: absolute; right: -17px; top: 50%; transform: translateY(-50%);
  color: var(--gold-soft); font-size: 1.3rem; z-index: 2; }
.step:last-child::after { display: none; }

/* ---------- Thẻ loài cây ---------- */
.species-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.species-card {
  background: var(--paper-warm); border-radius: var(--radius); overflow: hidden;
  border: 1px solid rgba(18,41,28,.08); transition: transform .3s, box-shadow .3s;
  display: flex; flex-direction: column;
}
.species-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }
.species-visual { height: 140px; display: grid; place-items: center; font-size: 3.2rem; position: relative; overflow: hidden; }
.species-visual::before { content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.5), transparent 60%); }
.sv-bieu-tuong { background: linear-gradient(135deg, #E9DFC8, #D9B15C66); }
.sv-thuoc-nam { background: linear-gradient(135deg, #D8E8D6, #7FB98F66); }
.sv-bong-mat { background: linear-gradient(135deg, #D6E4E8, #7FA8B966); }
.sv-ban-dia { background: linear-gradient(135deg, #E5DCD0, #A85B3444); }
.species-body { padding: 20px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.species-tag { font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-text); }
.species-body h3 { font-size: 1.35rem; margin: 6px 0 2px; }
.species-sci { font-style: italic; font-size: .82rem; color: var(--ink-soft); opacity: .75; margin-bottom: 10px; }
.species-body p { font-size: .88rem; color: var(--ink-soft); flex: 1; }
.species-price { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; }
.species-price strong { font-family: var(--font-display); font-size: 1.25rem; color: var(--moss-deep); }
.species-price a { font-size: .85rem; font-weight: 600; }

/* ---------- Mô hình (Cây Tri Ân...) ---------- */
.models { display: grid; grid-template-columns: 1.15fr .95fr .95fr; gap: 24px; }
.model-card {
  border-radius: var(--radius); padding: 44px 36px; min-height: 350px;
  display: flex; flex-direction: column; justify-content: flex-end;
  position: relative; overflow: hidden; color: var(--paper-warm);
}
.model-card h3 { color: var(--paper-warm); font-size: 1.8rem; margin-bottom: 10px; }
.model-card p { font-size: .95rem; color: rgba(246,241,229,.85); }
.model-card .btn { margin-top: 20px; align-self: flex-start; }
.model-emblem { position: absolute; top: 26px; right: 28px; font-size: 2.6rem; opacity: .9; }
.mc-trian { background: linear-gradient(160deg, #1C4A31, #2F6B4A); }
.mc-vulan { background: linear-gradient(160deg, #7A3B2E, #A85B34); }
.mc-hoabun { background: linear-gradient(160deg, #8A6420, #B98A2F); }
.model-card::before { content: ''; position: absolute; inset: 0; opacity: .14;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cpath d='M60 10C35 32 24 52 24 68c0 15 16 26 36 26s36-11 36-26c0-16-11-36-36-58Z' fill='none' stroke='%23fff' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 120px; }

/* ---------- Lộ trình ---------- */
.timeline { position: relative; margin-top: 70px; }
.timeline::before { content: ''; position: absolute; left: 0; right: 0; top: 9px; height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--moss) 70%, transparent); }
.timeline-items { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.tl-item { padding-top: 34px; position: relative; }
.tl-item::before { content: ''; position: absolute; top: 0; left: 0; width: 20px; height: 20px;
  border-radius: 50%; background: var(--paper); border: 3px solid var(--gold); }
.tl-year { font-family: var(--font-display); font-weight: 700; font-size: 1.7rem; color: var(--moss-deep); }
.tl-item p { font-size: .9rem; color: var(--ink-soft); margin-top: 6px; }

/* ---------- Trích dẫn lớn ---------- */
.big-quote { text-align: center; max-width: 860px; margin: 0 auto; }
.big-quote blockquote { font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: clamp(1.6rem, 3.4vw, 2.5rem); line-height: 1.35; color: var(--ink); }
.big-quote blockquote strong { color: var(--moss-deep); font-style: normal; }
.big-quote cite { display: block; margin-top: 26px; font-family: var(--font-body); font-style: normal;
  font-size: .84rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); font-weight: 600; }

/* ---------- CTA cuối ---------- */
.cta-final { text-align: center; padding: 130px 24px; position: relative; overflow: hidden; }
.cta-final h2 { max-width: 21ch; margin: 18px auto 20px; }
.cta-final .lede { margin: 0 auto 40px; }

/* ---------- Forms ---------- */
.field { margin-bottom: 20px; }
.field label { display: block; font-size: .86rem; font-weight: 600; margin-bottom: 7px; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%; padding: .8em 1em; font: inherit; font-size: .95rem;
  border: 1.5px solid rgba(18,41,28,.18); border-radius: 12px; background: var(--paper-warm);
  color: var(--ink); transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--moss); box-shadow: 0 0 0 3px rgba(47,107,74,.14);
}
.field-hint { font-size: .78rem; color: var(--ink-soft); opacity: .8; margin-top: 5px; }
.form-error { background: #F8E4E0; border: 1px solid #E0B4AA; color: #7A3B2E;
  padding: 12px 16px; border-radius: 12px; font-size: .9rem; margin-bottom: 18px; }
.form-success { background: var(--leaf-pale); border: 1px solid var(--leaf); color: var(--moss-deep);
  padding: 12px 16px; border-radius: 12px; font-size: .9rem; margin-bottom: 18px; }

/* ---------- Wizard phát nguyện ---------- */
.wizard-page { padding: 140px 0 100px; min-height: 100vh;
  background: radial-gradient(ellipse 80% 40% at 50% 0%, rgba(127,185,143,.16), transparent 60%), var(--paper); }
.wizard-shell { max-width: 880px; margin: 0 auto; padding: 0 24px; }
.wizard-progress { display: flex; gap: 8px; margin: 34px 0 44px; }
.wizard-progress span { flex: 1; height: 4px; border-radius: 4px; background: rgba(18,41,28,.12); transition: background .4s; }
.wizard-progress span.done { background: var(--gold); }
.wizard-step-label { font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-text); font-weight: 700; }
.wizard-card { background: var(--paper-warm); border-radius: 22px; border: 1px solid rgba(18,41,28,.08);
  padding: 46px 48px; box-shadow: var(--shadow-soft); }
.wizard-card h2 { font-size: 1.9rem; margin: 8px 0 26px; }
.wizard-nav { display: flex; justify-content: space-between; margin-top: 36px; gap: 14px; }

.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.choice-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.choice {
  border: 1.5px solid rgba(18,41,28,.14); border-radius: 14px; padding: 18px;
  cursor: pointer; transition: all .22s; background: var(--paper-warm);
  display: flex; gap: 14px; align-items: flex-start;
}
.choice:hover { border-color: var(--moss); transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.choice.selected { border-color: var(--moss-deep); background: var(--leaf-pale); box-shadow: inset 0 0 0 1px var(--moss-deep); }
.choice-icon { font-size: 1.6rem; line-height: 1; }
.choice-body strong { display: block; font-size: .96rem; }
.choice-body small { color: var(--ink-soft); font-size: .8rem; line-height: 1.4; display: block; margin-top: 3px; }
.choice-price { margin-left: auto; font-family: var(--font-display); font-weight: 700; color: var(--moss-deep); white-space: nowrap; }

.qty-row { display: flex; align-items: center; gap: 18px; margin: 10px 0 6px; }
.qty-btn { width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--moss-deep);
  background: none; font-size: 1.4rem; color: var(--moss-deep); cursor: pointer; transition: .2s; }
.qty-btn:hover { background: var(--moss-deep); color: var(--paper-warm); }
.qty-val { font-family: var(--font-display); font-size: 2.2rem; font-weight: 700; min-width: 70px; text-align: center; }

.summary-box { background: var(--paper-deep); border-radius: 14px; padding: 22px 26px; margin-top: 8px; }
.summary-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: .93rem; }
.summary-row + .summary-row { border-top: 1px dashed rgba(18,41,28,.15); }
.summary-row.total { font-weight: 700; font-size: 1.05rem; }
.summary-row.total span:last-child { font-family: var(--font-display); font-size: 1.4rem; color: var(--moss-deep); white-space: nowrap; }

/* ---------- Hồ sơ cây ---------- */
.tree-hero { padding: 140px 0 60px; background: linear-gradient(170deg, #12301F, #1C4A31); color: var(--paper-warm); }
.tree-hero-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 50px; align-items: center; }
.tree-code-chip { display: inline-flex; align-items: center; gap: 10px; background: rgba(217,177,92,.16);
  border: 1px solid rgba(217,177,92,.5); color: var(--gold-soft);
  font-family: var(--font-mono); font-size: .95rem; padding: 8px 18px; border-radius: 999px; }
.tree-hero h1 { color: var(--paper-warm); font-size: clamp(2.2rem, 4.6vw, 3.6rem); margin: 20px 0 8px; }
.tree-hero .sci { font-style: italic; opacity: .7; }
.tree-status { display: inline-block; margin-top: 18px; padding: 6px 16px; border-radius: 999px;
  font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.st-cho-trong { background: rgba(217,177,92,.2); color: var(--gold-soft); border: 1px solid rgba(217,177,92,.5); }
.st-da-trong { background: rgba(127,185,143,.18); color: var(--leaf); border: 1px solid rgba(127,185,143,.5); }
.st-phat-trien { background: rgba(127,185,143,.3); color: #B8E6C4; border: 1px solid var(--leaf); }
.qr-card { background: var(--paper-warm); border-radius: 20px; padding: 26px; text-align: center; color: var(--ink);
  box-shadow: var(--shadow-lift); max-width: 260px; margin-left: auto; }
.qr-card img { margin: 0 auto 12px; border-radius: 10px; }
.qr-card .mono { font-size: .78rem; color: var(--ink-soft); }

.tree-detail { padding: 70px 0 100px; }
.tree-detail-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; }
.info-list { list-style: none; }
.info-list li { display: flex; justify-content: space-between; gap: 20px; padding: 13px 0;
  border-bottom: 1px dashed rgba(18,41,28,.15); font-size: .95rem; }
.info-list li span:first-child { color: var(--ink-soft); }
.info-list li span:last-child { font-weight: 600; text-align: right; }
.dedication-card { background: var(--paper-warm); border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 28px 30px; margin: 30px 0; box-shadow: var(--shadow-soft); }
.dedication-card .serif-i { font-size: 1.25rem; line-height: 1.5; }
.dedication-card footer { margin-top: 14px; font-size: .85rem; color: var(--ink-soft); }

/* Nhật ký cây */
.diary-feed { position: relative; padding-left: 30px; }
.diary-feed::before { content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(var(--leaf), var(--leaf-pale)); }
.diary-entry { position: relative; padding-bottom: 30px; }
.diary-entry::before { content: ''; position: absolute; left: -30px; top: 6px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--paper); border: 3px solid var(--moss); }
.diary-entry time { font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-text); font-weight: 700; }
.diary-entry h4 { font-family: var(--font-display); font-size: 1.25rem; margin: 4px 0 6px; }
.diary-entry p { font-size: .92rem; color: var(--ink-soft); }

/* ---------- Dashboard ---------- */
.dash-page { padding: 130px 0 90px; min-height: 90vh; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }
.tree-table-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tree-tile { background: var(--paper-warm); border: 1px solid rgba(18,41,28,.09); border-radius: var(--radius);
  padding: 24px; transition: transform .25s, box-shadow .25s; position: relative; }
.tree-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.tree-tile .mono { font-size: .78rem; color: var(--gold-text); }
.tree-tile h3 { font-size: 1.3rem; margin: 6px 0 2px; }
.tree-tile .temple { font-size: .85rem; color: var(--ink-soft); }
.tree-tile .tree-status { margin-top: 12px; font-size: .68rem; padding: 4px 12px; }
.tree-tile .st-cho-trong { background: #F3E8CD; color: #8A6420; border-color: #D9B15C; }
.tree-tile .st-da-trong { background: var(--leaf-pale); color: var(--moss-deep); border-color: var(--leaf); }
.tree-tile .st-phat-trien { background: var(--moss); color: #fff; border-color: var(--moss-deep); }

/* ---------- Auth ---------- */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: linear-gradient(170deg, #12301F, #2F6B4A); color: var(--paper-warm);
  display: flex; flex-direction: column; justify-content: center; padding: 60px; position: relative; overflow: hidden; }
.auth-side h2 { color: var(--paper-warm); font-size: 2.2rem; max-width: 15ch; }
.auth-side p { margin-top: 16px; color: rgba(246,241,229,.8); max-width: 40ch; }
.auth-main { display: flex; flex-direction: column; justify-content: center; padding: 120px 60px 60px; max-width: 560px; margin: 0 auto; width: 100%; }
.auth-tabs { display: flex; gap: 0; margin-bottom: 30px; border-bottom: 1.5px solid rgba(18,41,28,.12); }
.auth-tabs button { flex: 1; padding: 14px; background: none; border: 0; font: inherit; font-weight: 600;
  color: var(--ink-soft); cursor: pointer; border-bottom: 2.5px solid transparent; margin-bottom: -1.5px; }
.auth-tabs button.active { color: var(--moss-deep); border-bottom-color: var(--gold); }

/* ---------- Bản đồ ---------- */
.map-page { padding-top: 76px; }
.map-layout { display: grid; grid-template-columns: 380px 1fr; height: calc(100vh - 76px); }
.map-sidebar { overflow-y: auto; background: var(--paper-warm); border-right: 1px solid rgba(18,41,28,.1); padding: 28px; }
.map-sidebar h1 { font-size: 1.8rem; }
.temple-item { padding: 16px; border-radius: 14px; cursor: pointer; transition: background .2s; border: 1px solid transparent; }
.temple-item:hover { background: var(--leaf-pale); }
.temple-item.active { background: var(--leaf-pale); border-color: var(--leaf); }
.temple-item h3 { font-size: 1.12rem; }
.temple-item p { font-size: .8rem; color: var(--ink-soft); }
.temple-item .badge { display: inline-block; margin-top: 6px; font-size: .72rem; font-weight: 700;
  background: var(--moss-deep); color: #fff; padding: 2px 10px; border-radius: 999px; }
#mapCanvas { height: 100%; background: #DCE8DC; }
.leaflet-popup-content-wrapper { border-radius: 14px; font-family: var(--font-body); }

/* ---------- Chứng nhận ---------- */
.cert-page { padding: 130px 24px 80px; background: var(--paper-deep); min-height: 100vh; }
.certificate {
  max-width: 820px; margin: 0 auto; background: var(--paper-warm);
  border: 2px solid var(--gold); outline: 8px solid var(--paper-warm); outline-offset: -14px;
  padding: 70px 60px; text-align: center; position: relative; box-shadow: var(--shadow-lift);
}
.certificate::before, .certificate::after { content: '🪷'; position: absolute; font-size: 1.4rem; opacity: .8; }
.certificate::before { top: 26px; left: 30px; }
.certificate::after { top: 26px; right: 30px; }
.cert-org { font-size: .8rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; }
.cert-title { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3rem); color: var(--moss-deep); margin: 22px 0 4px; }
.cert-sub { font-family: var(--font-display); font-style: italic; font-size: 1.2rem; color: var(--gold); }
.cert-name { font-family: var(--font-display); font-size: 2.3rem; font-weight: 700; margin: 34px 0 6px; color: var(--ink); }
.cert-body { max-width: 54ch; margin: 0 auto; font-size: .98rem; color: var(--ink-soft); }
.cert-code { font-family: var(--font-mono); font-size: 1.05rem; color: var(--moss-deep); background: var(--leaf-pale);
  display: inline-block; padding: 8px 22px; border-radius: 999px; margin: 26px 0; }
.cert-footer { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 46px; gap: 30px; }
.cert-footer .qr img { margin: 0 auto; }
.cert-sign { text-align: center; }
.cert-sign .line { width: 200px; border-top: 1px solid var(--ink-soft); margin: 46px auto 8px; }
.cert-actions { text-align: center; margin-top: 34px; display: flex; gap: 14px; justify-content: center; }
@media print {
  .site-nav, .site-footer, .cert-actions, body::before { display: none !important; }
  .cert-page { padding: 0; background: #fff; }
  .certificate { box-shadow: none; }
}

/* ---------- App landing ---------- */
.app-hero { min-height: 92svh; display: flex; align-items: center; padding: 140px 0 80px;
  background: radial-gradient(ellipse 70% 55% at 78% 30%, rgba(185,138,47,.14), transparent 60%),
    linear-gradient(165deg, #0E241A, #1C4A31 70%, #2F6B4A); color: var(--paper-warm); overflow: hidden; }
.app-hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 60px; align-items: center; }
.app-hero h1 { color: var(--paper-warm); font-size: clamp(2.4rem, 5vw, 3.8rem); }
.app-hero h1 em { color: var(--gold-soft); }
.store-badges { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.store-badge { display: flex; align-items: center; gap: 12px; background: rgba(253,250,242,.08);
  border: 1px solid rgba(246,241,229,.35); border-radius: 14px; padding: 12px 22px; color: var(--paper-warm);
  transition: background .25s, transform .25s; }
.store-badge:hover { background: rgba(253,250,242,.16); transform: translateY(-2px); }
.store-badge .sb-icon { font-size: 1.7rem; }
.store-badge small { display: block; font-size: .66rem; opacity: .75; letter-spacing: .06em; text-transform: uppercase; }
.store-badge strong { font-size: 1.02rem; }

/* Phone mockup thuần CSS */
.phone { width: 300px; height: 610px; margin: 0 auto; background: #0B1F15; border-radius: 44px;
  border: 3px solid rgba(217,177,92,.45); box-shadow: 0 30px 80px rgba(0,0,0,.45), inset 0 0 0 8px #0B1F15;
  position: relative; overflow: hidden; animation: phoneFloat 6s ease-in-out infinite; }
@keyframes phoneFloat { 0%,100% { transform: translateY(0) rotate(-1.2deg); } 50% { transform: translateY(-14px) rotate(1.2deg); } }
.phone-notch { position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 24px; background: #0B1F15; border-radius: 999px; z-index: 3; }
.phone-screen { position: absolute; inset: 8px; border-radius: 36px; background: var(--paper); overflow: hidden;
  display: flex; flex-direction: column; }
.ps-head { background: linear-gradient(150deg, #1C4A31, #2F6B4A); color: var(--paper-warm); padding: 44px 20px 18px; }
.ps-head small { font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.ps-head h4 { font-family: var(--font-display); font-size: 1.25rem; margin-top: 2px; }
.ps-stats { display: flex; gap: 8px; padding: 14px 16px 4px; }
.ps-stat { flex: 1; background: var(--paper-warm); border-radius: 12px; padding: 10px; text-align: center;
  border: 1px solid rgba(18,41,28,.08); }
.ps-stat strong { display: block; font-family: var(--font-display); font-size: 1.15rem; color: var(--moss-deep); }
.ps-stat span { font-size: .56rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.ps-tree { margin: 10px 16px; background: var(--paper-warm); border-radius: 14px; padding: 12px 14px;
  display: flex; gap: 12px; align-items: center; border: 1px solid rgba(18,41,28,.08); }
.ps-tree-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--leaf-pale); display: grid; place-items: center; font-size: 1.2rem; }
.ps-tree strong { font-size: .8rem; display: block; }
.ps-tree small { font-size: .62rem; color: var(--ink-soft); font-family: var(--font-mono); }
.ps-bar { margin-top: auto; display: flex; justify-content: space-around; padding: 12px 10px 22px;
  background: var(--paper-warm); border-top: 1px solid rgba(18,41,28,.08); font-size: 1.1rem; }
.ps-bar span { opacity: .45; } .ps-bar span.on { opacity: 1; }

/* Feature rows app */
.feature-rows { display: flex; flex-direction: column; gap: 90px; }
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.feature-row:nth-child(even) .feature-media { order: 2; }
.feature-media { border-radius: 26px; min-height: 340px; display: grid; place-items: center;
  position: relative; overflow: hidden; }
.fm-a { background: linear-gradient(150deg, var(--leaf-pale), #BFDCC4); }
.fm-b { background: linear-gradient(150deg, #F3E3C6, #E6CD96); }
.fm-c { background: linear-gradient(150deg, #DCE8E5, #B9D2CC); }
.fm-d { background: linear-gradient(150deg, #EFDBDF, #DFBCC5); }
.feature-media .big-ic { font-size: 5rem; filter: drop-shadow(0 10px 24px rgba(18,41,28,.25)); }
.feature-copy .kicker { margin-bottom: 14px; }
.feature-copy h3 { font-size: 1.9rem; margin-bottom: 14px; }
.feature-copy p { color: var(--ink-soft); }
.feature-copy ul { list-style: none; margin-top: 18px; }
.feature-copy li { padding: 7px 0 7px 30px; position: relative; font-size: .95rem; color: var(--ink-soft); }
.feature-copy li::before { content: '✓'; position: absolute; left: 0; top: 7px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--leaf-pale); color: var(--moss-deep); font-size: .7rem;
  display: grid; place-items: center; font-weight: 700; }

/* Mock UI mini-cards nổi trên feature media */
.float-chip { position: absolute; background: var(--paper-warm); border-radius: 14px; padding: 12px 16px;
  box-shadow: var(--shadow-lift); font-size: .78rem; border: 1px solid rgba(18,41,28,.08); }
.float-chip strong { display: block; font-size: .85rem; }
.float-chip.tl { top: 12%; left: 8%; animation: chipFloat 5s ease-in-out infinite; }
.float-chip.br { bottom: 12%; right: 8%; animation: chipFloat 5s ease-in-out 1.4s infinite; }
@keyframes chipFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- Tra cứu ---------- */
.lookup-hero { padding: 170px 0 90px; text-align: center;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(127,185,143,.18), transparent 65%), var(--paper); }
.lookup-box { max-width: 560px; margin: 36px auto 0; display: flex; gap: 10px; }
.lookup-box input { flex: 1; padding: 1em 1.3em; font: inherit; font-family: var(--font-mono); font-size: 1rem;
  border: 2px solid rgba(18,41,28,.2); border-radius: 999px; background: var(--paper-warm); text-transform: uppercase; }
.lookup-box input:focus { outline: none; border-color: var(--moss); }

/* ---------- Admin ---------- */
.admin-table { width: 100%; border-collapse: collapse; background: var(--paper-warm);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-soft); font-size: .88rem; }
.admin-table th { background: var(--moss-deep); color: var(--paper-warm); text-align: left;
  padding: 12px 16px; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; }
.admin-table td { padding: 11px 16px; border-top: 1px solid rgba(18,41,28,.07); }
.admin-table tr:hover td { background: var(--leaf-pale); }

/* ---------- Footer ---------- */
.site-footer {
  background: linear-gradient(175deg, #0E241A, #12301F);
  color: rgba(246,241,229,.78); position: relative; overflow: hidden;
  margin-top: 0;
}
.footer-motif {
  position: absolute; inset: 0; opacity: .06; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cpath d='M70 14C42 39 30 61 30 79c0 17 18 29 40 29s40-12 40-29c0-18-12-40-40-65Z' fill='none' stroke='%23D9B15C' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 140px;
}
.footer-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 72px 24px 50px;
  display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.3fr; gap: 40px;
  position: relative;
}
.footer-col h3 { color: var(--paper-warm); font-size: 1.5rem; letter-spacing: .06em; margin: 12px 0 2px; }
.footer-col h4 {
  font-family: var(--font-body); font-size: .74rem; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase; color: var(--gold-soft); margin-bottom: 16px;
}
.footer-col a { display: block; color: rgba(246,241,229,.78); font-size: .92rem; padding: 5px 0; transition: color .2s, transform .2s; }
.footer-col a:hover { color: var(--gold-soft); transform: translateX(4px); }
.footer-col p { font-size: .88rem; line-height: 1.7; }
.footer-brand .logo-leaf { --leaf-fill: #7FB98F; --leaf-vein: #12301F; }
.footer-tagline { color: var(--gold-soft); font-size: .78rem !important; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; margin-bottom: 14px; }
.footer-quote { font-family: var(--font-display); font-style: italic; font-size: 1.05rem !important; line-height: 1.6 !important; color: rgba(246,241,229,.85); }
.footer-bottom {
  max-width: var(--maxw); margin: 0 auto; padding: 22px 24px;
  border-top: 1px solid rgba(246,241,229,.14);
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-size: .8rem; color: rgba(246,241,229,.55); position: relative;
}

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .steps, .timeline-items { grid-template-columns: repeat(2, 1fr); }
  .step::after { display: none; }
  .species-grid { grid-template-columns: repeat(2, 1fr); }
  .models { grid-template-columns: 1fr; }
  .tree-hero-grid, .tree-detail-grid, .feature-row, .app-hero-grid { grid-template-columns: 1fr; }
  .feature-row:nth-child(even) .feature-media { order: 0; }
  .qr-card { margin: 30px auto 0; }
  .tree-table-grid { grid-template-columns: repeat(2, 1fr); }
  .map-layout { grid-template-columns: 1fr; grid-template-rows: 42vh 1fr; }
  .map-sidebar { order: 2; border-right: 0; border-top: 1px solid rgba(18,41,28,.1); }
  .auth-page { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav-links { position: fixed; inset: 0; top: 66px; background: var(--paper);
    flex-direction: column; padding: 40px 24px; gap: 22px; display: none; z-index: 99; }
  .nav-links.open { display: flex; }
  body.nav-open .site-nav { background: var(--paper); }
  body.nav-open .brand-text strong { color: var(--ink) !important; }
  body.nav-open .nav-toggle span { background: var(--ink) !important; }
  .nav-links a:not(.btn) { font-size: 1.2rem; color: var(--ink) !important; }
  .nav-toggle { display: block; }
  .stat-band .wrap { grid-template-columns: repeat(2, 1fr); }
  .stat-cell:nth-child(3)::before { display: none; }
  .pillars, .species-grid, .choice-grid, .choice-grid.cols-3, .tree-table-grid, .steps, .timeline-items { grid-template-columns: 1fr; }
  .section { padding: 70px 0; }
  .wizard-card { padding: 32px 24px; }
  /* Nút wizard xếp dọc, full-width — không tràn viewport hẹp */
  .wizard-nav { flex-direction: column-reverse; }
  .wizard-nav .btn { width: 100%; }
  .footer-inner { grid-template-columns: 1fr; gap: 30px; padding: 54px 24px 40px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .certificate { padding: 46px 26px; }
  .cert-footer { flex-direction: column; align-items: center; }
  .hero-rings { display: none; }
  .auth-main { padding: 110px 24px 40px; }
}
