/* Trang kể chuyện "Nguyên nhân gây nám da" (beauty-nam-da.php). Mọi bộ chọn nằm trong .nd để không đụng CSS chung.
   Nền cảnh: nâu cacao đêm; phần cuối: nền kem của thương hiệu. */

/* Trang dài ~20 màn hình: nhảy thẳng tới cảnh thay vì cuộn mượt qua mọi hình động. */
html:has(body.page-template-beauty-nam-da) { scroll-behavior: auto; scroll-padding-top: 72px; }
/* Header chung của site cuộn đi bình thường (không dính), để sân khấu dính top:0 không bị che. */
.page-template-beauty-nam-da .site-header { position: relative; }
/* Thanh liên hệ mobile: ẩn khi đang trong các cảnh (đã có nút đặt lịch trên thanh tiến trình), hiện lại ở phần cuối. */
.page-template-beauty-nam-da:not(.nd-in-outro) .contact-bar { display: none; }

.nd {
  --ink: #17100e; --ink-2: #231714; --ink-3: #2e1f1b;
  --accent: #e9946b; --cure: #5cc8b8; --warn: #ff8a73;
  --text: #f7ece4; --muted: #c4ad9f; --line: rgba(247, 236, 228, .14);
  --data: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  position: relative; background: var(--ink); color: var(--text); font-family: var(--sans); font-size: 17px; line-height: 1.6;
  overflow-x: clip;
}
.nd h1, .nd h2, .nd h3 { font-family: var(--sans); font-weight: 600; line-height: 1.12; letter-spacing: -.02em; text-wrap: balance; margin: 0; color: inherit; }
.nd h1 { font-size: clamp(1.95rem, 4.6vw, 3.6rem); }
.nd h2 { font-size: clamp(1.6rem, 3.6vw, 2.6rem); }
.nd h3 { font-size: 1.15rem; line-height: 1.25; letter-spacing: -.01em; }
.nd p { margin: 0; text-wrap: pretty; }
.nd sup { font-family: var(--data); font-size: .62em; color: var(--accent); margin-left: 1px; }
.nd .eyebrow { font-family: var(--data); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0; }
.nd b { font-weight: 600; }
.nd a { color: inherit; }

/* ---------- Khung cảnh ---------- */
.nd .scene { position: relative; }
.nd .stage { position: sticky; top: 0; height: 100svh; overflow: hidden; isolation: isolate; }
.nd .layer { position: absolute; inset: 0;
  transform: translate(calc(var(--p, 0) * var(--dx, 0) * 1px), calc(var(--p, 0) * var(--dy, 0) * 1px)) scale(calc(1 + var(--p, 0) * var(--dz, 0)));
  transform-origin: var(--ox, 50%) var(--oy, 50%); }
.nd .layer > picture { display: contents; }
.nd .layer svg, .nd .layer > img, .nd .layer > picture > img { position: absolute; inset: 0; width: 100%; height: 100%; }
.nd .layer > img, .nd .layer > picture > img { object-fit: contain; object-position: 50% 100%; }
.nd .beam-img { object-fit: cover !important; object-position: 100% 0 !important; mix-blend-mode: screen; opacity: .9; }
.nd .zoom-cv { display: block; width: 100%; height: 100%; }
.nd .art { left: 34vw; top: 64px; }
@media (max-aspect-ratio: 4/5) { .nd .art { left: 0; top: 7svh; bottom: auto; height: 56svh; } }
.nd .illus { position: absolute; z-index: 15; right: max(16px, env(safe-area-inset-right, 0px)); top: 76px; font: 500 .66rem/1 var(--data); letter-spacing: .08em; color: rgba(247, 236, 228, .55); text-transform: uppercase; }
@media (min-width: 901px) { .nd .illus { right: 64px; } }
@media (max-width: 640px) { .nd .illus { top: auto; bottom: 8px; } }

/* chiều cao cảnh: điện thoại ngắn hơn */
.nd #s1 { height: 260vh; } .nd #s2 { height: 340vh; } .nd #s3 { height: 440vh; } .nd #s4 { height: 300vh; } .nd #s5 { height: 300vh; } .nd #s6 { height: 340vh; }
@media (max-width: 820px) { .nd #s1 { height: 220vh; } .nd #s2 { height: 280vh; } .nd #s3 { height: 360vh; } .nd #s4 { height: 250vh; } .nd #s5 { height: 250vh; } .nd #s6 { height: 280vh; } }

/* ---------- Nhịp chữ (chỉ ẩn khi JS chạy: .nd.ready) ---------- */
.nd .beats { position: absolute; z-index: 20; inset: 0; pointer-events: none; }
.nd .beat { position: absolute; left: max(20px, env(safe-area-inset-left, 0px)); right: max(20px, env(safe-area-inset-right, 0px)); bottom: max(9vh, 36px);
  max-width: 31rem; display: grid; gap: .6rem; transition: opacity .5s ease, transform .5s ease; }
@media (min-width: 900px) { .nd .beat { left: 4.5vw; } }
.nd.ready .beat { opacity: 0; transform: translateY(22px); }
.nd.ready .beat.on { opacity: 1; transform: none; }
/* bàn phím: chip đang ẩn nhận focus → hiện nhịp chữ chứa nó */
.nd.ready .beat:focus-within { opacity: 1; transform: none; }
.nd.ready .beat:focus-within .ask { pointer-events: auto; }
.nd .beat .lede { font-size: 1.06rem; line-height: 1.55; }
.nd .card { background: rgba(35, 23, 20, .8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--line); border-radius: 16px; padding: 1.05rem 1.25rem; }
.nd .beat.on .ask { pointer-events: auto; }
.nd .ask-q { margin: .4rem 0 .8rem; }
.nd .ask-note { margin-top: .7rem; color: #e0cdbf; }
@media (max-width: 640px) { .nd .beat .lede { font-size: 1rem; } .nd .beat { bottom: max(5svh, 24px); } }

/* ---------- Thanh tiến trình (cố định, hiện khi đã cuộn qua header chung) ---------- */
.nd-hdr { position: fixed; z-index: 60; left: 0; right: 0; top: 0;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px));
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; background: linear-gradient(rgba(23, 16, 14, .9), rgba(23, 16, 14, 0));
  opacity: 0; transform: translateY(-100%); pointer-events: none; transition: opacity .3s, transform .3s; }
.nd-hdr.on { opacity: 1; transform: none; pointer-events: auto; }
.nd .nd-brand { font-weight: 600; font-size: .92rem; letter-spacing: -.01em; white-space: nowrap; color: var(--text); text-decoration: none; }
.nd .nd-brand small { display: block; font: 500 .66rem/1.2 var(--data); letter-spacing: .08em; color: var(--muted); }
.nd .nd-prog { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; max-width: 420px; justify-self: center; width: 100%; }
.nd .nd-prog i { height: 3px; border-radius: 3px; background: rgba(247, 236, 228, .18); overflow: hidden; position: relative; }
.nd .nd-prog i b { position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.nd .nd-hdr-r { display: flex; align-items: center; gap: 12px; justify-self: end; }
.nd .nd-prog-l { font: 500 .7rem/1 var(--data); color: var(--muted); letter-spacing: .06em; white-space: nowrap; }
.nd .nd-ans { font: 500 .7rem/1 var(--data); color: var(--cure); letter-spacing: .04em; white-space: nowrap; border: 1px solid rgba(92, 200, 184, .45); border-radius: 999px; padding: .4rem .6rem; }
.nd .nd-book { appearance: none; border: 0; border-radius: 999px; background: var(--cure); color: #0d2422; font: 600 .86rem/1 var(--sans); padding: .7rem 1rem; cursor: pointer; white-space: nowrap;
  opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .4s, transform .4s; }
.nd .nd-book.on { opacity: 1; transform: none; pointer-events: auto; }
.nd .nd-book:focus-visible, .nd .nd-btn:focus-visible, .nd .chip:focus-visible, .nd .tg button:focus-visible, .nd .q:focus-within { outline: 3px solid var(--text); outline-offset: 3px; }
@media (max-width: 640px) {
  .nd-hdr { grid-template-columns: 1fr auto; row-gap: 8px; }
  .nd .nd-prog { grid-column: 1 / -1; grid-row: 2; max-width: none; }
  .nd .nd-prog-l, .nd .nd-ans, .nd .nd-brand small { display: none; }
  .nd .nd-hdr-r { grid-column: 2; grid-row: 1; }
}
.nd.lighthdr .nd-hdr { background: linear-gradient(rgba(251, 247, 242, .95), rgba(251, 247, 242, 0)); }
.nd.lighthdr .nd-brand { color: #2a1d18; }
.nd.lighthdr .nd-brand small, .nd.lighthdr .nd-prog-l { color: #6f5b50; }
.nd.lighthdr .nd-prog i { background: rgba(42, 29, 24, .16); }
.nd.lighthdr .nd-prog i b { background: #a64f2c; }
.nd.lighthdr .nd-book { background: #1f7f73; color: #fff; }
.nd.lighthdr .nd-rail a { color: #6f5b50; }
.nd.lighthdr .nd-rail a i { border-color: #6f5b50; }

/* ---------- Mở đầu ---------- */
.nd .hero-title { position: absolute; z-index: 20; top: max(13vh, 80px); left: max(20px, env(safe-area-inset-left, 0px)); right: max(20px, env(safe-area-inset-right, 0px));
  display: grid; gap: 1rem; max-width: 40rem; transition: opacity .3s; text-shadow: 0 2px 24px rgba(23, 16, 14, .85); }
@media (min-width: 900px) { .nd .hero-title { left: 4.5vw; } }
.nd .hero-title .lede { font-size: 1.1rem; max-width: 33rem; color: #ecdcd1; }
.nd .hero-links { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.4rem; }
.nd .hero-links a { font-size: .92rem; color: var(--cure); text-underline-offset: 3px; }
.nd .scroll-cue { font-family: var(--data); font-size: .74rem; letter-spacing: .14em; opacity: .85; display: flex; align-items: center; gap: .6rem; }
.nd .scroll-cue::after { content: ""; width: 1px; height: 34px; background: linear-gradient(var(--text), transparent); animation: nd-cue 1.8s infinite; }
@keyframes nd-cue { 0% { transform: scaleY(.2); transform-origin: top; } 50% { transform: scaleY(1); } 100% { transform: scaleY(.2); transform-origin: bottom; } }
@media (max-aspect-ratio: 4/5) { .nd #s1 .art { top: 40svh; height: 60svh; } .nd .hero-title { top: max(10svh, 64px); } }

/* lựa chọn trong hành trình */
.nd .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.nd .chip { appearance: none; border: 1px solid rgba(247, 236, 228, .3); background: rgba(247, 236, 228, .06); color: var(--text); border-radius: 999px; padding: .55rem .85rem;
  font: 500 .9rem/1.2 var(--sans); cursor: pointer; min-height: 44px; text-align: left; }
.nd .chip[aria-pressed=true] { background: var(--cure); border-color: var(--cure); color: #0d2422; font-weight: 600; }
.nd .tg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; background: rgba(247, 236, 228, .06); border: 1px solid var(--line); border-radius: 14px; padding: 5px; }
.nd .tg button { appearance: none; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font: 600 .88rem/1.25 var(--sans); padding: .6rem .5rem; cursor: pointer; min-height: 44px; }
.nd .tg button[aria-pressed=true] { background: var(--text); color: var(--ink); }
.nd .ok-line { font: 500 .8rem/1.4 var(--data); color: var(--cure); min-height: 1.1em; }

/* ---------- Thanh cảnh (desktop) ---------- */
.nd-rail { position: fixed; z-index: 50; right: max(18px, env(safe-area-inset-right, 0px)); top: 50%; transform: translateY(-50%); display: grid; gap: 14px; transition: opacity .3s; }
.nd .nd-rail a { display: flex; align-items: center; gap: 10px; justify-content: flex-end; text-decoration: none; color: var(--muted); font-family: var(--data); font-size: .68rem; letter-spacing: .1em; }
.nd .nd-rail a span { opacity: 0; transition: opacity .3s; }
.nd .nd-rail a:hover span, .nd .nd-rail a:focus-visible span, .nd .nd-rail a.on span { opacity: 1; }
.nd .nd-rail a i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--muted); transition: .3s; }
.nd .nd-rail a.on i { border-color: var(--accent); }
.nd .nd-rail a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.nd .nd-rail-cell { position: absolute; right: 0; top: 0; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); pointer-events: none; }
.nd.in-outro .nd-rail, .nd:not(.in-story) .nd-rail { opacity: 0; pointer-events: none; }
@media (max-width: 900px) { .nd-rail { display: none; } }
#ndDepth { position: absolute; left: 0; top: 0; width: 1px; height: 100%; pointer-events: none; visibility: hidden; }
#ndDepth i { position: absolute; left: 0; width: 1px; height: 1px; }

/* ---------- Cảnh 2, 4, 5, 6 ---------- */
.nd .rb { transition: opacity .6s ease; }
.nd .node .nimg { filter: grayscale(1) brightness(.5); opacity: .75; transition: filter .6s, opacity .6s; }
.nd .node.on .nimg { filter: drop-shadow(0 0 14px rgba(255, 170, 90, .55)); opacity: 1; }
.nd .nl, .nd .wire { transition: fill .5s, stroke .5s, opacity .5s; }
.nd .nl.on { fill: #f7ece4; }
.nd .wire.on { stroke: #e9946b; animation: nd-flow 1.2s linear infinite; }
@keyframes nd-flow { to { stroke-dashoffset: -26; } }
.nd .chartbox { display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 24px 6vw 8vh 0; }
.nd .chartbox #chart { position: relative; flex: 1; min-height: 0; }
.nd .legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .9rem; color: var(--muted); }
.nd .legend span { display: flex; align-items: center; gap: 8px; opacity: .35; transition: opacity .4s; }
.nd .legend span.on { opacity: 1; color: var(--text); }
.nd .legend i { width: 22px; height: 5px; border-radius: 3px; }
.nd .mini { font-size: .78rem; color: var(--muted); }
@media (max-aspect-ratio: 4/5) { .nd .chartbox { top: 0; padding: 88px 14px 0; height: 70svh; gap: 6px; } .nd .legend { display: grid; gap: 4px; font-size: .84rem; } }
@media (max-width: 640px) { .nd #light .nmx { display: none; } }
.nd .stage.day .card { background: rgba(255, 255, 255, .92); color: #2a1d18; border-color: rgba(42, 29, 24, .12); }
.nd .stage.day .eyebrow, .nd .stage.day sup { color: #a64f2c; }
.nd .stage.day .illus { color: rgba(42, 29, 24, .55); }

/* ---------- Phần cuối: nền kem thương hiệu ---------- */
.nd .outro { --ink: #FBF7F2; --ink-2: #ffffff; --ink-3: #f4ece4; --text: #2a1d18; --muted: #6f5b50; --line: rgba(42, 29, 24, .13); --accent: #a64f2c; --cure: #1f7f73;
  position: relative; z-index: 2; background: var(--ink); color: var(--text); padding-block: 12vh 8vh;
  padding-left: max(18px, env(safe-area-inset-left, 0px)); padding-right: max(18px, env(safe-area-inset-right, 0px)); }
.nd .outro-in { max-width: 70rem; margin: 0 auto; display: grid; gap: 4.5rem; }
.nd .block { display: grid; gap: 1.4rem; }
.nd .block > header { display: grid; gap: .8rem; max-width: 46rem; }
.nd .block > header p, .nd .dd p, .nd .tips p { color: #4a3a32; }
.nd .outro a { color: var(--cure); text-underline-offset: 3px; }
.nd .cta { display: flex; flex-direction: column; gap: 1rem; align-items: stretch; }
.nd .nd-btn { display: inline-block; text-align: center; appearance: none; border: 0; background: var(--cure); color: #fff !important; font: 600 1rem/1.2 var(--sans); text-decoration: none; padding: 1rem 1.5rem; border-radius: 999px; cursor: pointer; min-height: 48px; }
.nd .nd-btn:hover { filter: brightness(1.08); }
.nd .nd-btn.ghost { background: transparent; color: var(--text) !important; border: 1.5px solid rgba(42, 29, 24, .35); }
.nd .nd-btn.ghost:hover { border-color: var(--cure); }
.nd .nd-note { color: var(--muted); font-size: .86rem; max-width: 46rem; }
.nd .refs { display: grid; gap: .6rem; max-width: 56rem; border-top: 1px solid var(--line); padding-top: 1.5rem; }
.nd .refs ol { margin: 0; padding-left: 1.4rem; display: grid; gap: .4rem; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.nd .refs a { color: var(--muted); overflow-wrap: anywhere; }

/* tự kiểm tra */
.nd .quiz { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.nd .qs { display: grid; gap: .6rem; }
.nd .q { display: flex; gap: .8rem; align-items: flex-start; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--ink-2); cursor: pointer; line-height: 1.45; margin: 0; }
.nd .q input { appearance: none; -webkit-appearance: none; flex: none; width: 24px; height: 24px; margin: 1px 0 0; border-radius: 7px; border: 2px solid rgba(42, 29, 24, .4); display: grid; place-content: center; cursor: pointer; background: #fff; }
.nd .q input:checked { background: var(--cure); border-color: var(--cure); }
.nd .q input:checked::after { content: ""; width: 10px; height: 6px; border: solid #fff; border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg) translate(1px, -1px); }
.nd .q:has(input:checked) { border-color: rgba(31, 127, 115, .55); background: #f1f8f6; }
.nd .q small { display: block; color: var(--muted); font: 500 .7rem/1.3 var(--data); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 2px; }
.nd .res { position: sticky; top: 84px; display: grid; gap: 1rem; padding: 1.4rem; border-radius: 18px; background: var(--ink-3); border: 1px solid var(--line); }
.nd .res .big { font: 600 3.4rem/1 var(--sans); letter-spacing: -.03em; }
.nd .res .big span { font-size: 1.1rem; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.nd .sw { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.nd .sw i { height: 8px; border-radius: 4px; background: rgba(42, 29, 24, .12); transition: background .3s; }
.nd .sw i.on { background: var(--accent); }
.nd .res ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .5rem; font-size: .95rem; }
.nd .res .flag { font-size: .85rem; color: #8a3b22; border-left: 3px solid #d9663f; padding-left: .8rem; }
@media (max-width: 860px) { .nd .quiz { grid-template-columns: minmax(0, 1fr); } .nd .res { position: relative; top: auto; order: -1; } }

/* tóm tắt */
.nd .sum { margin: 0; padding-left: 1.3rem; list-style: decimal; display: grid; gap: .55rem; max-width: 46rem; color: #4a3a32; }
.nd .sum b { color: var(--text); }

/* phân biệt các đốm nâu */
.nd .ddx { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr)); gap: .9rem; }
.nd .dd-nav { display: none; gap: 8px; justify-self: end; }
.nd .dd-nav button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--ink-2); color: var(--text); font-size: 1.1rem; cursor: pointer; }
@media (max-width: 640px) {
  .nd .dd-nav { display: flex; }
  .nd .ddx { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 80%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: none; }
  .nd .ddx::-webkit-scrollbar { display: none; }
  .nd .dd { scroll-snap-align: start; }
}
.nd .dd { display: grid; gap: .55rem; align-content: start; padding: 1.1rem; border-radius: 16px; background: var(--ink-2); border: 1px solid var(--line); }
.nd .dd img { width: 100%; height: 96px; object-fit: cover; border-radius: 12px; display: block; }
.nd .dd p { font-size: .92rem; }
.nd .dd.me { border-color: rgba(184, 92, 53, .5); }

/* thói quen */
.nd .tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: .9rem; counter-reset: t; margin: 0; padding: 0; list-style: none; }
.nd .tips li { counter-increment: t; display: grid; grid-template-columns: auto 1fr; gap: .9rem; padding: 1.1rem; border-radius: 16px; border: 1px solid var(--line); }
.nd .tips li::before { content: counter(t); font: 600 1.6rem/1 var(--sans); color: var(--accent); min-width: 1.2em; }
.nd .tips p { font-size: .95rem; }
.nd .tips b { color: var(--text); }

/* bác sĩ + đặt lịch */
.nd .doc { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem; align-items: center; padding: clamp(1.3rem, 3vw, 2.2rem); border-radius: 22px;
  background: linear-gradient(135deg, #e5f1ee, #fff 70%); border: 1px solid rgba(31, 127, 115, .3); }
.nd .doc-txt { display: grid; gap: .9rem; }
.nd .doc h2 { font-size: clamp(1.45rem, 3vw, 2.2rem); }
@media (max-width: 760px) { .nd .doc { grid-template-columns: minmax(0, 1fr); } }
.nd .more ul { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: .6rem 1.4rem; }
.nd .more li { border-bottom: 1px solid var(--line); padding: .55rem 0; }
.nd .more a { text-decoration: none; font-weight: 500; }
.nd .more a:hover { text-decoration: underline; }
.nd .meta { display: grid; gap: .3rem; font-size: .84rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 1.4rem; }
.nd .meta b { color: var(--text); font-weight: 600; }

/* ---------- Hộp đặt lịch ---------- */
.nd-dlg { width: min(480px, calc(100vw - 24px)); max-height: calc(100svh - 24px); overflow: auto; padding: 0; border: 1px solid rgba(42, 29, 24, .13); border-radius: 18px;
  background: #fff; color: #2a1d18; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); font-family: var(--sans); }
.nd-dlg::backdrop { background: rgba(10, 6, 5, .7); }
.nd-dlg form, .nd-dlg .done { display: flex; flex-direction: column; gap: 13px; padding: 24px 22px 20px; position: relative; }
.nd-dlg .x { position: absolute; right: 12px; top: 12px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(42, 29, 24, .2); background: transparent; color: inherit; font-size: 18px; cursor: pointer; }
.nd-dlg h3 { padding-right: 46px; font-size: 1.4rem; margin: 0; font-weight: 600; }
.nd-dlg .sub { font-size: .9rem; line-height: 1.55; color: #6f5b50; margin: 0; }
.nd-dlg .sub a { color: #1f7f73; }
.nd-dlg .nw { white-space: nowrap; }
.nd-dlg label { display: flex; flex-direction: column; gap: 6px; font: 500 .8rem/1.3 var(--sans); color: #4a3a32; }
.nd-dlg .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .nd-dlg .row2 { grid-template-columns: 1fr; } }
.nd-dlg input:not([type=checkbox]):not([type=radio]), .nd-dlg select { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(42, 29, 24, .25); background: #fff; color: #2a1d18; font: 400 16px/1.3 var(--sans); }
.nd-dlg input:focus, .nd-dlg select:focus { border-color: #1f7f73; outline: 2px solid rgba(31, 127, 115, .25); }
.nd-dlg [aria-invalid=true] { border-color: var(--danger) !important; }
.nd-dlg .slots { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.nd-dlg .slots legend { font: 500 .8rem/1.3 var(--sans); color: #4a3a32; margin-bottom: 6px; padding: 0; }
.nd-dlg .slots legend span { color: #8a7a70; font-weight: 400; }
.nd-dlg .slot { position: relative; display: block; }
.nd-dlg .slot input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.nd-dlg .slot span { display: block; text-align: center; padding: 10px 0; border: 1px solid rgba(42, 29, 24, .22); border-radius: 10px; font: 500 .92rem/1 var(--sans); color: #2a1d18; }
.nd-dlg .slot input:checked + span { background: #1f7f73; border-color: #1f7f73; color: #fff; }
.nd-dlg .slot input:focus-visible + span { outline: 2px solid #1f7f73; outline-offset: 2px; }
.nd-dlg .slot input:disabled + span { opacity: .35; text-decoration: line-through; }
.nd-dlg label.inline { flex-direction: row; align-items: flex-start; gap: 10px; font-size: .84rem; line-height: 1.45; }
.nd-dlg label.inline input { width: 20px; height: 20px; flex: none; margin-top: 1px; accent-color: #1f7f73; }
.nd-dlg .consent { font-size: .8rem; }
.nd-dlg .send { padding: 15px 20px; border-radius: 999px; border: 0; background: #1f7f73; color: #fff; font: 600 1rem/1 var(--sans); cursor: pointer; }
.nd-dlg .send[aria-busy=true] { opacity: .6; cursor: progress; }
.nd-dlg .hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.nd-dlg .form-msg { margin: 0; font-size: .88rem; line-height: 1.5; color: #6f5b50; min-height: 1.2em; }
.nd-dlg .form-msg.err { color: var(--danger); }

/* ---------- Hiệu năng / chuyển động ---------- */
.nd .scene.live .layer { will-change: transform, opacity; }
.nd.ready .scene:not(.live) *, .nd.ready .scene:not(.live) ::after { animation-play-state: paused; }
.nd.ready .scene:not(.live) .stage { visibility: hidden; }
.nd.lite .card { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(35, 23, 20, .95); }
.nd.lite .stage.day .card { background: #fff; }
@media (prefers-reduced-motion: reduce) { .nd .scroll-cue::after { animation: none; } .nd .beat, .nd.ready .beat { transition: none; } .nd .wire.on { animation: none; } }

/* Phần cuối: thanh tiến trình nền đặc (không đè chữ); điện thoại thì nhường chỗ cho thanh liên hệ chung. */
.nd.in-outro .nd-hdr { background: rgba(251, 247, 242, .97); box-shadow: 0 1px 0 rgba(42, 29, 24, .1); }
@media (max-width: 900px) { .nd.in-outro .nd-hdr { opacity: 0; transform: translateY(-100%); pointer-events: none; } }
.nd-dlg .consent__label { flex-direction: row; align-items: flex-start; gap: 10px; font-size: .8rem; line-height: 1.5; color: #4a3a32; }
.nd-dlg .consent__box { width: 20px; height: 20px; flex: none; margin-top: 1px; accent-color: #1f7f73; }
.nd-dlg .consent .field__error { color: var(--danger); font-size: .8rem; }

/* SEO: nhãn cảnh là H2, ý tóm tắt là H3 (giữ nguyên dáng cũ) */
.nd h2.eyebrow { font-weight: 400; line-height: 1.4; text-wrap: initial; }
.nd .sum-h { display: inline; font: inherit; font-weight: 700; margin: 0; }
.nd .faq-list { display: grid; gap: .45rem; max-width: 46rem; }
.nd .faq-list h3 { font-size: 1.08rem; line-height: 1.35; margin-top: .9rem; color: #2a1d18; }
.nd .faq-list h3:first-child { margin-top: 0; }
.nd .faq-list p { color: #4a3a32; line-height: 1.6; }
