/* Tông đen – vàng theo trang chủ CB Family (cb-family.io.vn) */
:root {
  --bg: #0a0908;
  --bg-2: #0f0e0c;
  --surface: #151311;
  --surface-2: #1b1815;
  --line: #262220;
  --line-strong: #3a342e;
  --text: #efe8dc;
  --text-2: #a9a094;
  --text-3: #6f685e;
  --gold: #c9a35c;
  --gold-2: #e8cb8e;
  --gold-dim: rgba(201, 163, 92, .12);
  --ok: #a3c48f;
  --warn: #dbad62;
  --bad: #e08a74;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --on-gold: #1a140b;
  --top-bg: rgba(10, 9, 8, .82);
  --glow: rgba(201, 163, 92, .16);
  --grain: .05;
  /* Màu hình minh họa thai nhi */
  --sac-1: #2a2017;
  --sac-2: #15110d;
  --sac-3: #0d0b09;
  --sac-line: rgba(201, 163, 92, .35);
  --sac-dust: #e8cb8e;
  color-scheme: dark;
}

/* Chế độ ban ngày: ngà – vàng đồng */
:root[data-theme=light] {
  --bg: #f6f1e8;
  --bg-2: #efe8dc;
  --surface: #fffcf6;
  --surface-2: #f8f2e8;
  --line: #e7dccb;
  --line-strong: #d2c3ab;
  --text: #1f1a14;
  --text-2: #5c5145;
  --text-3: #8d8070;
  --gold: #9a7330;
  --gold-2: #7d5a1f;
  --gold-dim: rgba(154, 115, 48, .1);
  --ok: #4c8a3f;
  --warn: #a8731c;
  --bad: #b04d38;
  --on-gold: #fff;
  --top-bg: rgba(246, 241, 232, .86);
  --glow: rgba(201, 163, 92, .22);
  --grain: .035;
  --sac-1: #fffaf0;
  --sac-2: #f6ecda;
  --sac-3: #eadcc3;
  --sac-line: rgba(154, 115, 48, .45);
  --sac-dust: #b8914c;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; touch-action: manipulation; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 300 16px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
  overflow-x: hidden;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 45% at 50% -8%, var(--glow), transparent 70%),
    radial-gradient(40% 30% at 100% 100%, rgba(201, 163, 92, .05), transparent 70%);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; }
b, strong { font-weight: 500; color: var(--text); }
em { font-style: italic; color: var(--gold-2); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 1px solid var(--gold); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0; letter-spacing: .005em; }
p { margin: 0; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding-left: clamp(16px, 4vw, 36px); padding-right: clamp(16px, 4vw, 36px); }

.eyebrow {
  color: var(--gold); font-size: 10.5px; font-weight: 500; letter-spacing: .3em; text-transform: uppercase;
}
.muted { color: var(--text-2); }
.small { font-size: 13px; }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 30;
  background: var(--top-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 10px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.monogram {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--gold); border-radius: 50%;
  color: var(--gold-2); font: 600 13px/1 var(--serif); letter-spacing: .04em;
}
.brand-name { font: 500 21px/1 var(--serif); }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: transparent; color: var(--text-2); cursor: pointer;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.icon-btn:hover { color: var(--gold-2); border-color: var(--gold); }

.nav { display: flex; gap: 26px; overflow-x: auto; scrollbar-width: none; padding-bottom: 12px; }
.nav::-webkit-scrollbar { display: none; }
.nav button {
  position: relative; flex: 0 0 auto; border: 0; background: none; padding: 6px 0; cursor: pointer;
  color: var(--text-3); font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; white-space: nowrap;
  transition: color .3s var(--ease);
}
.nav button::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease);
}
.nav button:hover { color: var(--text-2); }
.nav button.active { color: var(--gold-2); }
.nav button.active::after { transform: scaleX(1); }

main { padding-top: clamp(20px, 4vw, 40px); padding-bottom: 60px; }
.tab { animation: rise .7s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- Khối chung ---------- */
.section-head {
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 6px 20px;
  padding-bottom: 18px; margin: 0 0 24px; border-bottom: 1px solid var(--line);
}
.section-head .eyebrow { grid-column: 1 / -1; }
.section-head h2 { font-size: clamp(32px, 5vw, 46px); }
.count { color: var(--text-3); font-size: 10.5px; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; white-space: nowrap; }
.panel { background: var(--surface); border: 1px solid var(--line); padding: clamp(18px, 3vw, 28px); }
.panel h2 { font-size: clamp(24px, 3vw, 30px); margin: 8px 0 14px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--line-strong); background: transparent;
  color: var(--text-2); padding: 9px 16px; cursor: pointer; text-decoration: none;
  font-size: 11px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
  transition: color .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.btn:hover { color: var(--gold-2); border-color: var(--gold); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.btn.gold:hover { background: var(--gold-2); color: var(--on-gold); }
.link {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; padding: 14px 0 0; width: 100%;
  border: 0; border-top: 1px solid var(--line); background: none; cursor: pointer; text-align: left;
  color: var(--text-3); font-size: 11px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
  transition: color .3s var(--ease);
}
.link svg { margin-left: auto; transition: transform .4s var(--ease); }
.link:hover { color: var(--gold-2); }
.link:hover svg { transform: translateX(5px); }

/* ---------- Tuần này ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(20px, 5vw, 64px);
}
.orb { position: relative; width: min(100%, 440px); margin: 0 auto; aspect-ratio: 1; }
.orb::before {
  content: ""; position: absolute; inset: -8%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(201, 163, 92, .16), transparent 75%);
}
.orb svg { position: relative; width: 100%; height: 100%; display: block; }
.fetus .beat { transform-box: fill-box; transform-origin: center; animation: beat 1.1s ease-in-out infinite; }
@keyframes beat { 0%, 100% { transform: scale(.7); opacity: .5; } 20% { transform: scale(1.25); opacity: 1; } 40% { transform: scale(.85); opacity: .7; } }

.wk { display: flex; align-items: flex-end; gap: 14px; margin-top: 14px; }
.wk-num { font: 500 clamp(110px, 17vw, 168px)/.8 var(--serif); color: var(--text); letter-spacing: -.02em; }
.wk-unit { display: grid; padding-bottom: 8px; font: 500 clamp(26px, 3.4vw, 34px)/1.05 var(--serif); }
.wk-unit em { font-size: .7em; }
.wk-sub { margin-top: 24px; color: var(--text-2); font-size: 14px; }
.due-edit {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 8px; padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--text-2); font-size: 13px;
}
.due-edit span { color: var(--gold); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.due-edit:hover span { color: var(--gold-2); }
.due-hist { list-style: none; margin: 0 0 16px; padding: 0; font-size: 13.5px; }
.due-hist li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.due-hist small { color: var(--text-3); }
.fruit {
  display: flex; align-items: center; gap: 14px; margin-top: 22px; padding: 14px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.fruit .emo { font-size: 34px; line-height: 1; width: 40px; text-align: center; }
.fruit .dot { width: 40px; display: grid; place-items: center; }
.fruit .dot i { display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--gold-2); box-shadow: 0 0 10px var(--gold); }
.fruit p { font: 500 22px/1.2 var(--serif); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 6px; }
.stats > div { padding: 14px 0 0; }
.stats > div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.stats b { font: 500 34px/1 var(--serif); color: var(--gold-2); }
.stats span { margin-left: 4px; color: var(--text-2); font-size: 13px; }
.stats small { display: block; margin-top: 6px; color: var(--text-3); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; }

.scrub { margin: clamp(24px, 4vw, 40px) 0 0; }
.scrub-row { display: flex; align-items: center; gap: 14px; }
.scrub input[type=range] { flex: 1; -webkit-appearance: none; appearance: none; height: 28px; background: transparent; cursor: pointer; }
.scrub input[type=range]::-webkit-slider-runnable-track { height: 1px; background: linear-gradient(90deg, var(--gold) var(--p, 0%), var(--line-strong) var(--p, 0%)); }
.scrub input[type=range]::-moz-range-track { height: 1px; background: var(--line-strong); }
.scrub input[type=range]::-moz-range-progress { height: 1px; background: var(--gold); }
.scrub input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; margin-top: -8.5px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--gold-2); box-shadow: 0 0 0 4px var(--gold-dim), 0 0 16px rgba(201, 163, 92, .45);
}
.scrub input[type=range]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 1px solid var(--gold-2);
  box-shadow: 0 0 0 4px var(--gold-dim), 0 0 16px rgba(201, 163, 92, .45);
}
.scrub-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; color: var(--text-3); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.scrub-meta .now { color: var(--gold-2); }
.ticks { display: flex; justify-content: space-between; margin: 2px 52px 0; }
.ticks span { width: 1px; height: 6px; background: var(--line-strong); }
.ticks span.t { height: 10px; background: var(--gold); opacity: .6; }
.reset { border: 0; background: none; color: var(--gold); cursor: pointer; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; padding: 0; }

.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1px; margin-top: clamp(24px, 4vw, 40px); background: var(--line); border: 1px solid var(--line); }
.note { display: flex; gap: 16px; align-items: flex-start; background: var(--surface); padding: 22px; }
.note-ic { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 auto; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--gold-2); }
.note p:last-child { margin-top: 6px; font-size: 15.5px; color: var(--text); }

.split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; margin-top: 20px; }
.keys { list-style: none; margin: 0; padding: 0; counter-reset: k; }
.keys li { counter-increment: k; display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.keys li:last-child { border-bottom: 0; }
.keys li::before { content: "0" counter(k); color: var(--gold); font: italic 500 19px/1.3 var(--serif); }
.bar { height: 2px; background: var(--line-strong); margin-top: 16px; }
.bar i { display: block; height: 100%; background: var(--gold); transition: width .6s var(--ease); }
.bar-label { display: flex; justify-content: space-between; margin-top: 8px; color: var(--text-3); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }

.next-list { list-style: none; margin: 10px 0 0; padding: 0; }
.next-list li { display: grid; grid-template-columns: 76px 1fr; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.next-list li:last-child { border-bottom: 0; }
.days { text-align: center; }
.days b { display: block; font: 500 36px/1 var(--serif); color: var(--gold-2); }
.days small { color: var(--text-3); font-size: 9.5px; letter-spacing: .22em; text-transform: uppercase; }
.next-list p { font-size: 14.5px; line-height: 1.5; }
.next-list small { color: var(--text-3); font-size: 12px; }
.urgent { color: var(--bad); }

.tri { margin-top: 20px; }
.tri-bar { display: grid; grid-template-columns: 16fr 12fr 13fr; gap: 4px; position: relative; }
.tri-bar span { height: 3px; background: var(--line-strong); }
.tri-bar span.on { background: var(--gold); }
.tri-bar span.part { background: linear-gradient(90deg, var(--gold) var(--p), var(--line-strong) var(--p)); }
.tri-labels { display: grid; grid-template-columns: 16fr 12fr 13fr; gap: 4px; margin-top: 8px; color: var(--text-3); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; }
.tri-labels .on { color: var(--gold-2); }

/* ---------- Lộ trình ---------- */
.milestones { margin-bottom: 28px; }
.milestones summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; }
.milestones summary::-webkit-details-marker { display: none; }
.milestones summary h3 { font-size: 24px; }
.milestones summary .chev { margin-left: auto; transition: transform .3s var(--ease); color: var(--gold); }
.milestones[open] summary .chev { transform: rotate(180deg); }
.ms-list { list-style: none; margin: 16px 0 0; padding: 0; }
.ms-list li { display: grid; grid-template-columns: 130px 1fr auto; gap: 4px 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; align-items: baseline; }
.ms-list .d { color: var(--text-2); font-variant-numeric: tabular-nums; font-size: 13px; }
.ms-list .l { color: var(--gold); font-size: 11px; letter-spacing: .1em; white-space: nowrap; }
.ms-list li.past { opacity: .4; }
.ms-list li.next { color: var(--gold-2); }
.ms-list li.deadline .t::before { content: "◆ "; color: var(--gold); font-size: 9px; vertical-align: 2px; }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 35px; top: 10px; bottom: 10px; width: 1px; background: linear-gradient(var(--gold), var(--line) 30%, var(--line) 70%, var(--gold)); opacity: .5; }
.tl { scroll-margin-top: 120px; position: relative; display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 18px; padding-bottom: 18px; }
.tl-node { position: relative; z-index: 1; width: 72px; height: 72px; border-radius: 50%; background: var(--bg); }
.tl-node svg { width: 100%; height: 100%; display: block; }
.tl-node .ic { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--gold-2); }
.tl-node .ic svg { width: 26px; height: 26px; }
.tl.current .tl-node { box-shadow: 0 0 0 1px var(--gold), 0 0 28px rgba(201, 163, 92, .35); }
.tl.past .tl-node { opacity: .55; }
.tl-card { background: var(--surface); border: 1px solid var(--line); padding: 18px 20px; cursor: pointer; transition: border-color .4s var(--ease), transform .4s var(--ease); }
.tl-card:hover { border-color: var(--line-strong); }
.tl-card:hover .toggle { color: var(--gold-2); }
.tl-card:active { transform: scale(.995); }
.tl.current .tl-card { border-color: var(--line-strong); box-shadow: 0 0 0 1px rgba(201, 163, 92, .12); }
.tl-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; color: var(--text-3); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; }
.tl-meta .badge { color: var(--on-gold); background: var(--gold); padding: 2px 8px; letter-spacing: .16em; }
.tl-card h3 { font-size: clamp(22px, 2.6vw, 27px); margin: 8px 0 6px; }
.tl-card .keys li { font-size: 14.5px; padding: 8px 0; }
.tl-foot { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.tl-foot .bar { flex: 1; margin: 0; }
.tl-foot .cnt { color: var(--text-3); font-size: 11px; letter-spacing: .12em; white-space: nowrap; }
.tl-foot .cnt.done { color: var(--ok); }
.toggle {
  display: inline-flex; align-items: center; gap: 4px; color: var(--gold); white-space: nowrap;
  font-size: 10.5px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; transition: color .3s var(--ease);
}
.toggle svg { width: 14px; height: 14px; }

/* ---------- Bảng chi tiết giai đoạn ---------- */
dialog.sheet {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: 100%; max-height: 100%;
  margin: 0; padding: 0; border: 0; background: transparent; color: var(--text); overflow: hidden;
}
dialog.sheet::backdrop { background: rgba(0, 0, 0, .6); backdrop-filter: blur(3px); }
body:has(dialog[open]) { overflow: hidden; }
.sh-wrap {
  position: absolute; left: 0; right: 0; bottom: 0; height: 92dvh; max-height: 92vh;
  display: flex; flex-direction: column; background: var(--surface);
  border-top: 1px solid var(--line-strong); border-radius: 18px 18px 0 0;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .35); animation: sheet-up .35s var(--ease);
}
@keyframes sheet-up { from { transform: translateY(48px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sheet-in { from { transform: translateX(48px); opacity: 0; } to { transform: none; opacity: 1; } }
.sh-head { flex: 0 0 auto; padding: 8px 18px 0; border-bottom: 1px solid var(--line); }
.grab { display: block; width: 40px; height: 4px; margin: 0 auto 10px; border-radius: 99px; background: var(--line-strong); }
.sh-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sh-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--text-3); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; }
.sh-meta .badge { color: var(--on-gold); background: var(--gold); padding: 2px 8px; }
.sh-head h3 { font-size: 26px; margin: 4px 0 10px; }
.sh-prog { display: flex; align-items: center; gap: 12px; }
.sh-prog .bar { flex: 1; margin: 0; }
.sh-prog .cnt { color: var(--text-3); font-size: 12px; letter-spacing: .1em; }
.sh-prog .cnt.done { color: var(--ok); }
.sh-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 10px; }
.sh-tabs button {
  display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 2px 11px;
  border: 0; border-bottom: 2px solid transparent; background: none; color: var(--text-3); cursor: pointer;
  font-size: 11.5px; line-height: 1.2; text-align: center; transition: color .3s var(--ease);
}
.sh-tabs button svg { width: 21px; height: 21px; }
.sh-tabs button:hover { color: var(--text-2); }
.sh-tabs button.on { color: var(--gold-2); border-bottom-color: var(--gold); }
.sh-body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 0 18px 28px; overflow-wrap: anywhere; }
.sh-body .checklist label { padding: 13px 0; font-size: 15.5px; }
.sh-body .checklist input { width: 22px; height: 22px; margin-top: 1px; }
.sh-foot {
  flex: 0 0 auto; display: flex; justify-content: space-between; gap: 10px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line);
}
.sh-nav { display: flex; align-items: center; gap: 8px; padding: 8px; border: 0; background: none; color: var(--text-2); cursor: pointer; text-align: left; font-size: 13.5px; }
.sh-nav small { display: block; color: var(--text-3); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; }
.sh-nav.next { text-align: right; }
.sh-nav:hover { color: var(--gold-2); }

.blk { padding: 18px 0 14px; border-bottom: 1px solid var(--line); }
.blk:last-child { border-bottom: 0; }
.blk-title { margin: 0 0 4px; font: 500 11px/1.4 var(--sans); color: var(--gold); letter-spacing: .2em; text-transform: uppercase; }
.blk .items li { font-size: 15px; padding: 10px 0 10px 22px; }
.baby-head { display: flex; align-items: center; gap: 14px; margin: 6px 0 4px; }
.blk-art { width: 76px; height: 76px; flex: 0 0 auto; }
.blk-art svg { width: 100%; height: 100%; display: block; }
.lead-line { font: 500 21px/1.35 var(--serif); color: var(--gold-2); }
.tasks-hint { margin: 16px 0 2px; color: var(--text-2); font-size: 14px; }
.warn-box { margin-top: 10px; padding: 2px 16px; border: 1px solid var(--line-strong); border-left: 3px solid var(--bad); }
.warn-box .items li { font-size: 15px; }
.call-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.call { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 10px; border: 1px solid var(--line-strong); text-decoration: none; color: var(--text); text-align: center; }
.call b { font: 200 30px/1 var(--sans); color: var(--bad); }
.call b svg { width: 28px; height: 28px; }
.call span { font-size: 12.5px; color: var(--text-2); }

@media (min-width: 761px) {
  .sh-wrap {
    top: 0; left: auto; height: 100%; max-height: none; width: min(580px, 100%);
    border-radius: 0; border-top: 0; border-left: 1px solid var(--line-strong);
    box-shadow: -20px 0 60px rgba(0, 0, 0, .35); animation-name: sheet-in;
  }
  .grab { display: none; }
  .sh-head { padding: 22px 26px 0; }
  .sh-body { padding: 0 26px 32px; }
  .sh-head h3 { font-size: 30px; }
}
.items { list-style: none; margin: 0; padding: 0; }
.items li { position: relative; padding: 8px 0 8px 22px; border-bottom: 1px solid var(--line); line-height: 1.6; }
.items li:last-child { border-bottom: 0; }
.items li::before { content: ""; position: absolute; left: 4px; top: 18px; width: 6px; height: 1px; background: var(--gold); }
.items.yes li::before { content: "✓"; width: auto; height: auto; background: none; top: 8px; left: 2px; color: var(--ok); font-size: 13px; }
.items.no li::before { content: "✕"; width: auto; height: auto; background: none; top: 8px; left: 2px; color: var(--bad); font-size: 12px; }
.items.alert li::before { background: var(--bad); }
.why { display: block; color: var(--text-3); font-size: 13.5px; }
.sub-label { margin: 14px 0 4px; color: var(--text-3); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; }

/* Checkbox */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist label { display: flex; gap: 14px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 15px; }
.checklist li:last-child label { border-bottom: 0; }
.checklist input {
  -webkit-appearance: none; appearance: none; flex: 0 0 auto; width: 18px; height: 18px; margin: 3px 0 0;
  border: 1px solid var(--line-strong); background: transparent; cursor: pointer; display: grid; place-items: center;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.checklist input::after { content: ""; width: 9px; height: 5px; border: solid var(--on-gold); border-width: 0 0 1.6px 1.6px; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.checklist input:checked { background: var(--gold); border-color: var(--gold); }
.checklist input:checked::after { opacity: 1; }
.checklist input:checked + span { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--line-strong); }

/* ---------- Quyền lợi ---------- */
.leave { margin-bottom: 20px; }
.leave-bar { display: flex; gap: 3px; margin: 18px 0 10px; }
.leave-bar span { height: 32px; display: flex; align-items: center; padding: 0 10px; font-size: 10.5px; letter-spacing: .14em; color: #1a140b; font-weight: 500; white-space: nowrap; overflow: hidden; }
.leave-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 18px; }
.leave-tiles div { background: var(--surface); padding: 16px; }
.leave-tiles b { display: block; font: 500 30px/1 var(--serif); color: var(--gold-2); margin-top: 8px; }
.leave-tiles small { display: block; color: var(--text-3); font-size: 12px; margin-top: 6px; }
.note-line { margin-top: 14px; color: var(--text-3); font-size: 13px; }

.estimate { margin-bottom: 36px; }
.salary { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; }
.salary input {
  width: 200px; padding: 10px 14px; background: var(--bg); border: 1px solid var(--line-strong); color: var(--text);
  font: 500 22px var(--serif); letter-spacing: .02em;
}
.salary input:focus { outline: none; border-color: var(--gold); }
.est-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 18px; }
.est-grid div { background: var(--bg-2); padding: 18px; }
.est-grid b { display: block; font: 500 clamp(28px, 3.4vw, 38px)/1 var(--serif); color: var(--gold-2); margin: 10px 0 6px; }
.est-grid small { color: var(--text-3); font-size: 12.5px; }

.group-title { display: flex; align-items: baseline; gap: 12px; margin: 30px 0 14px; }
.group-title h3 { font-size: 26px; }
.group-title span { color: var(--text-3); font-size: 13px; }
.benefits { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; align-items: start; }
details.ben { background: var(--surface); border: 1px solid var(--line); transition: border-color .4s var(--ease); }
details.ben:hover, details.ben[open] { border-color: var(--line-strong); }
details.ben summary { list-style: none; cursor: pointer; padding: 20px; }
details.ben summary::-webkit-details-marker { display: none; }
.ben-big { font: 500 46px/1 var(--serif); color: var(--gold-2); }
.ben-unit { display: block; margin-top: 6px; color: var(--text-2); font-size: 13px; }
.ben-name { display: block; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 15px; color: var(--text); }
.ben-jp { display: block; color: var(--text-3); font-size: 12px; margin-top: 2px; }
.ben-more { display: flex; justify-content: space-between; margin-top: 12px; color: var(--text-3); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; }
details.ben[open] .ben-more .plus { transform: rotate(45deg); }
.ben-more .plus { transition: transform .3s var(--ease); color: var(--gold); }
.ben-body { padding: 0 20px 20px; font-size: 14px; }
.ben-body dl { margin: 0; display: grid; gap: 10px; }
.ben-body dt { color: var(--gold); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; }
.ben-body dd { margin: 2px 0 0; color: var(--text-2); }

/* ---------- Ăn uống ---------- */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 30px; }
.facts div { background: var(--surface); padding: 18px; }
.facts b { display: block; font: 500 34px/1 var(--serif); color: var(--gold-2); margin: 10px 0 6px; }
.facts small { color: var(--text-3); font-size: 12.5px; line-height: 1.5; display: block; }
.food-group { margin-bottom: 26px; }
.food-group h3 { display: flex; align-items: center; gap: 10px; font-size: 26px; margin-bottom: 12px; }
.food-group h3 i { width: 8px; height: 8px; border-radius: 50%; }
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; align-items: start; }
details.chip { background: var(--surface); border: 1px solid var(--line); transition: border-color .3s var(--ease); }
details.chip[open], details.chip:hover { border-color: var(--line-strong); }
details.chip summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 12px 14px; font-size: 15px; }
details.chip summary::-webkit-details-marker { display: none; }
details.chip .emo { font-size: 22px; width: 28px; text-align: center; }
details.chip .plus { margin-left: auto; color: var(--text-3); transition: transform .3s var(--ease); }
details.chip[open] .plus { transform: rotate(45deg); color: var(--gold); }
details.chip > div { padding: 0 14px 14px 54px; font-size: 13.5px; color: var(--text-2); }
details.chip > div b { display: block; color: var(--text); font-weight: 400; margin-bottom: 4px; }
.g-avoid h3 i { background: var(--bad); }
.g-limit h3 i { background: var(--warn); }
.g-good h3 i { background: var(--ok); }

/* ---------- Chuẩn bị ---------- */
.pack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; align-items: start; }
.pack-head { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.pack-head h3 { font-size: 24px; }
.ring { flex: 0 0 auto; width: 54px; height: 54px; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring span { position: absolute; inset: 0; display: grid; place-items: center; font: 500 16px var(--serif); color: var(--gold-2); }

/* ---------- Liên hệ ---------- */
.sos { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 20px; }
.sos a { display: block; background: var(--surface); padding: 20px; text-decoration: none; transition: background .3s var(--ease); }
.sos a:hover { background: var(--surface-2); }
.sos b { display: block; font: 500 40px/1 var(--serif); color: var(--gold-2); }
.sos span { display: block; margin-top: 10px; font-size: 14px; }
.sos small { display: block; margin-top: 4px; color: var(--text-3); font-size: 12px; }
.help-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.my-contact { display: grid; gap: 4px; margin-top: 14px; }
.my-contact label { color: var(--text-3); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; }
.my-contact div { display: flex; gap: 8px; }
.field {
  flex: 1; min-width: 0; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line-strong); color: var(--text); font: 300 15px var(--sans);
}
.field:focus { outline: none; border-color: var(--gold); }
.phrase { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.phrase:last-child { border-bottom: 0; }
.phrase .jp { font-size: 16.5px; color: var(--text); font-weight: 400; }
.phrase .vi { grid-column: 1; color: var(--text-3); font-size: 13px; }
.phrase .icon-btn { grid-row: 1 / span 2; grid-column: 2; align-self: center; width: 34px; height: 34px; }
.ph-group { margin: 20px 0 2px; }
table.gloss { width: 100%; border-collapse: collapse; font-size: 14px; }
table.gloss td { padding: 9px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.gloss td:first-child { color: var(--text); font-weight: 400; white-space: nowrap; }
table.gloss .kana { display: block; color: var(--text-3); font-size: 11.5px; }
table.gloss td:last-child { color: var(--text-2); }

/* Phóng to câu tiếng Nhật */
.overlay { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: 28px; text-align: center; background: var(--bg); cursor: pointer; }
.overlay .big { font-size: clamp(28px, 7vw, 56px); line-height: 1.5; color: var(--text); font-weight: 400; }
.overlay .sub { color: var(--text-2); }

/* ---------- Cài đặt ---------- */
dialog {
  width: min(520px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 0; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text);
}
dialog::backdrop { background: rgba(0, 0, 0, .7); backdrop-filter: blur(4px); }
.dlg { padding: 26px; }
.dlg h2 { font-size: 32px; margin: 8px 0 18px; }
.dlg label { display: block; margin-bottom: 16px; color: var(--text-3); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; }
.dlg label .field { display: block; width: 100%; margin-top: 6px; color-scheme: dark; letter-spacing: 0; text-transform: none; }
.dlg .hint { margin: -8px 0 16px; color: var(--text-3); font-size: 12.5px; }
.dlg .row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.dlg hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

footer { padding-top: 30px; padding-bottom: 40px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 12.5px; text-align: center; }
footer .family { margin-top: 14px; letter-spacing: .2em; text-transform: uppercase; font-size: 10.5px; }
footer .family a { text-decoration: none; color: var(--text-2); }
footer .family a:hover { color: var(--gold-2); }

/* ---------- Điện thoại ---------- */
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 6px; }
  .orb { width: min(70vw, 300px); }
  .hero-text { text-align: left; }
  .duo, .split, .help-grid { grid-template-columns: 1fr; }
  .leave-tiles, .facts { grid-template-columns: 1fr 1fr; }
  .est-grid { grid-template-columns: 1fr; }
  .timeline::before { left: 23px; }
  .tl { grid-template-columns: 48px minmax(0, 1fr); gap: 12px; }
  .tl-node { width: 48px; height: 48px; }
  .tl-node .ic svg { width: 20px; height: 20px; }
  .tl-card { padding: 16px; }
  .ms-list li { grid-template-columns: 1fr auto; }
  .ms-list .t { grid-column: 1 / -1; }
  .ticks { margin: 2px 50px 0; }
}
/* Con số lớn: sans nét mảnh, số thẳng hàng (Cormorant chỉ có số kiểu cổ, dễ đọc nhầm) */
.wk-num, .stats b, .days b, .leave-tiles b, .est-grid b, .ben-big, .facts b, .sos b, .ring span, .salary input {
  font-family: var(--sans); font-weight: 200; letter-spacing: -.02em;
}
.wk-num { font-size: clamp(96px, 15vw, 150px); line-height: .82; }
.stats b, .days b { font-size: 30px; }
.ben-big { font-size: 40px; }
.leave-tiles b, .facts b, .sos b { font-size: 30px; }
.est-grid b { font-size: clamp(24px, 3vw, 32px); }
.ring span { font-size: 13px; font-weight: 300; }

@media (prefers-reduced-motion: reduce) {
  .tab, .fetus .beat { animation: none; }
}

/* ---------- Nhắc nhở ở trang Tuần này ---------- */
.alert-strip {
  display: flex; align-items: center; gap: 14px; width: 100%; margin-top: clamp(20px, 3vw, 30px); padding: 14px 18px;
  border: 1px solid var(--line-strong); border-left: 2px solid var(--gold); background: var(--gold-dim); color: var(--text);
  text-align: left; cursor: pointer; font-size: 14.5px; transition: border-color .3s var(--ease);
}
.alert-strip + .alert-strip { margin-top: 8px; }
.alert-strip:hover { border-color: var(--gold); }
.alert-strip .dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.alert-strip .go { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--gold); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; }
.alert-strip + .duo { margin-top: 12px; }

/* ---------- Tiêm chủng ---------- */
.vac-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; align-items: start; }
.vac { background: var(--surface); border: 1px solid var(--line); padding: 20px; }
.vac-top { display: flex; align-items: center; justify-content: space-between; }
.vac-top .emo { font-size: 28px; }
.tag { padding: 3px 10px; border: 1px solid currentColor; font-size: 10px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; }
.tag.ok { color: var(--ok); }
.tag.warn { color: var(--warn); }
.tag.bad { color: var(--bad); }
.vac h3 { font-size: 28px; margin-top: 14px; }
.vac-jp { color: var(--text-3); font-size: 12.5px; margin-top: 2px; }
.vac-when { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14.5px; }
.vac-mine { margin-top: 8px; font-size: 13.5px; color: var(--gold-2); }
.vac-mine b { color: var(--gold-2); }
.vac-no { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.vac-more { margin-top: 12px; }
.vac-more summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; color: var(--text-3); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; }
.vac-more summary::-webkit-details-marker { display: none; }
.vac-more .plus { color: var(--gold); transition: transform .3s var(--ease); }
.vac-more[open] .plus { transform: rotate(45deg); }
.vac-more p { margin-top: 8px; font-size: 14px; color: var(--text-2); }
.vs-head { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.vac-sched { list-style: none; margin: 0; padding: 0; }
.vs-row { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.vs-when b { display: block; font: 500 24px/1.1 var(--serif); color: var(--gold-2); }
.vs-when small { display: block; margin-top: 4px; color: var(--text-3); font-size: 12px; }
.vs-row .checklist label { padding: 7px 0; }
.vs-row .why { font-size: 12.5px; }

/* Nút sáng/tối */
.top-actions { display: flex; gap: 8px; }

@media (max-width: 760px) {
  .vs-row { grid-template-columns: 1fr; gap: 4px; }
  .alert-strip { flex-wrap: wrap; }
  .alert-strip .go { margin-left: 22px; }
}

/* ---------- Việc cần làm ---------- */
.nav .n {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 6px; padding: 0 5px;
  border-radius: 99px; background: var(--gold); color: var(--on-gold); font-size: 10px; letter-spacing: 0; vertical-align: 1px;
}
.nav .n:empty { display: none; }

.checklist li.has-pin { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.checklist li.has-pin:last-child { border-bottom: 0; }
.checklist li.has-pin label { flex: 1; min-width: 0; border-bottom: 0; }
.pin {
  flex: 0 0 auto; padding: 6px 11px; border: 1px solid var(--line-strong); border-radius: 99px; background: none;
  color: var(--text-2); font-size: 12px; white-space: nowrap; cursor: pointer; transition: all .3s var(--ease);
}
.pin:hover { border-color: var(--gold); color: var(--gold-2); }
.pin.on { border-color: var(--gold); color: var(--gold-2); background: var(--gold-dim); }
.pin-all { width: 100%; justify-content: center; margin-top: 16px; }

.todo-add { display: grid; grid-template-columns: minmax(0, 1fr) 200px auto; gap: 8px; margin-bottom: 16px; }
.todo-add .field { min-width: 0; font-size: 16px; }
.todo-add .btn { justify-content: center; }
.todo-add .btn svg { width: 16px; height: 16px; }
#tab-todo .alert-strip { margin: 0 0 16px; }
.todo-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.todo-done .todo-list { margin-top: 12px; }
.todo { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.todo-main { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; font-size: 15.5px; line-height: 1.55; }
.todo-main input {
  -webkit-appearance: none; appearance: none; flex: 0 0 auto; width: 22px; height: 22px; margin: 1px 0 0;
  border: 1px solid var(--line-strong); background: transparent; cursor: pointer; display: grid; place-items: center;
}
.todo-main input::after { content: ""; width: 10px; height: 5px; border: solid var(--on-gold); border-width: 0 0 1.6px 1.6px; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.todo-main input:checked { background: var(--gold); border-color: var(--gold); }
.todo-main input:checked::after { opacity: 1; }
.todo.is-done .todo-text { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.todo-meta { grid-column: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding-left: 36px; color: var(--text-3); font-size: 12.5px; }
.chip-src { padding: 1px 9px; border: 1px solid var(--line-strong); border-radius: 99px; background: none; color: var(--text-2); font-size: 11.5px; cursor: pointer; }
button.chip-src:hover { border-color: var(--gold); color: var(--gold-2); }
.todo.overdue .todo-due { color: var(--bad); font-weight: 500; }
.due-pick { position: relative; display: inline-flex; }
.due-btn { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: none; color: var(--gold); font-size: 12px; cursor: pointer; }
.due-btn svg { width: 16px; height: 16px; }
.due-btn { padding: 2px; }
.due-hidden { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.todo-del { grid-column: 2; grid-row: 1 / span 2; align-self: center; width: 34px; height: 34px; border-color: transparent; }
.todo-del:hover { border-color: var(--line-strong); }
.todo-empty { padding: 32px 0; text-align: center; color: var(--text-2); border-top: 1px solid var(--line); }
.todo-empty p + p { margin-top: 6px; }

.toast {
  position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); z-index: 300; transform: translateX(-50%);
  padding: 10px 18px; border-radius: 99px; background: var(--text); color: var(--bg); font-size: 14px; white-space: nowrap;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3); animation: toast-in .3s var(--ease);
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (max-width: 760px) {
  .todo-add { grid-template-columns: minmax(0, 1fr) auto; }
  .todo-add .dmy { grid-column: 1; grid-row: 2; }
  .todo-add .btn { grid-column: 2; grid-row: 1 / span 2; }
  .checklist li.has-pin { align-items: flex-start; }
  .checklist li.has-pin .pin { margin-top: 10px; }
}

/* Nút đưa lên / xuống */
.move { display: inline-flex; gap: 4px; }
.move button {
  display: grid; place-items: center; width: 30px; height: 26px; padding: 0;
  border: 1px solid var(--line-strong); border-radius: 6px; background: none; color: var(--text-2); cursor: pointer;
}
.move button svg { width: 15px; height: 15px; }
.move button:hover:not(:disabled) { border-color: var(--gold); color: var(--gold-2); }
.move button:disabled { opacity: .3; cursor: default; }

/* ---------- Tài khoản ---------- */
.acc-btn { position: relative; }
.sync-dot {
  position: absolute; right: 3px; bottom: 3px; width: 9px; height: 9px; border-radius: 50%;
  border: 2px solid var(--bg); background: var(--text-3); display: none;
}
.sync-dot[data-s=ok] { display: block; background: var(--ok); }
.sync-dot[data-s=pending], .sync-dot[data-s=saving] { display: block; background: var(--gold); animation: blink 1s ease-in-out infinite; }
.sync-dot[data-s=error] { display: block; background: var(--bad); }
@keyframes blink { 50% { opacity: .3; } }
.acc-tabs { display: grid; grid-template-columns: 1fr 1fr; margin: 4px 0 18px; border-bottom: 1px solid var(--line); }
.acc-tabs button {
  padding: 10px 0; border: 0; border-bottom: 2px solid transparent; background: none; cursor: pointer;
  color: var(--text-3); font-size: 11px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
}
.acc-tabs button.on { color: var(--gold-2); border-bottom-color: var(--gold); }
.acc-err { min-height: 1.4em; margin: -6px 0 6px; color: var(--bad); font-size: 13.5px; }
.acc-status { display: flex; align-items: center; gap: 8px; margin: -6px 0 14px; color: var(--text-2); font-size: 13.5px; }
.acc-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.acc-status[data-s=ok] .dot { background: var(--ok); }
.acc-status[data-s=saving] .dot, .acc-status[data-s=pending] .dot { background: var(--gold); }
.acc-status[data-s=error] .dot { background: var(--bad); }
.acc-pw { margin: 4px 0 18px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.acc-pw summary { cursor: pointer; color: var(--gold); font-size: 11px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; }
.acc-pw form { margin-top: 14px; }

/* ---------- Trang quản trị ---------- */
.adm-field { display: grid; gap: 6px; color: var(--text-3); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; }
.adm-field .field { letter-spacing: 0; text-transform: none; font-size: 15px; }
.adm-login { max-width: 440px; display: grid; gap: 14px; }
.adm-add { margin-bottom: 20px; }
.adm-add-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; margin-top: 12px; }
.adm-check { display: inline-flex; align-items: center; gap: 8px; height: 42px; color: var(--text-2); font-size: 14px; white-space: nowrap; }
.adm-check input { width: 18px; height: 18px; accent-color: var(--gold); }
.adm-add .acc-err { margin: 8px 0 0; }
.adm-msg { margin: 0 0 16px; padding: 12px 16px; border-left: 2px solid var(--gold); background: var(--gold-dim); font-size: 14.5px; }
.adm-reveal {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px;
  margin-bottom: 16px; padding: 18px 20px; border: 1px solid var(--gold); background: var(--surface);
}
.adm-pw { margin: 6px 0; font: 300 34px/1.1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .12em; color: var(--gold-2); user-select: all; }
.adm-reveal-actions { display: flex; gap: 8px; }
.adm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.adm-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 20px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); }
.adm-name { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font: 500 26px/1.1 var(--serif); }
.adm-meta { display: grid; grid-template-columns: repeat(5, auto); justify-content: start; gap: 4px 24px; margin: 10px 0 0; }
.adm-meta dt { color: var(--text-3); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; }
.adm-meta dd { margin: 2px 0 0; color: var(--text-2); font-size: 13.5px; }
.adm-actions { display: flex; flex-wrap: wrap; gap: 8px; align-content: start; justify-content: flex-end; }
.adm-actions .btn { padding: 7px 12px; }
.adm-del { color: var(--bad); }
.adm-del:hover { color: var(--bad); border-color: var(--bad); }
.adm-edit { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: end; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.adm-edit .adm-field { flex: 1 1 220px; }
.adm-edit .acc-err, .adm-edit .muted { flex-basis: 100%; margin: 0; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9em; padding: 1px 6px; background: var(--bg-2); border: 1px solid var(--line); }

@media (max-width: 760px) {
  .adm-add-grid { grid-template-columns: 1fr; }
  .adm-row { grid-template-columns: 1fr; }
  .adm-actions { justify-content: flex-start; }
  .adm-meta { grid-template-columns: 1fr 1fr; }
}
.adm-lock { display: flex; align-items: center; gap: 10px; color: var(--text-2); }
.adm-lock svg { color: var(--gold); }

/* Thuộc tính hidden luôn thắng các kiểu display của nút */
[hidden] { display: none !important; }
.top-actions .btn { white-space: nowrap; }
@media (max-width: 480px) {
  .top-actions .btn { padding: 8px 11px; letter-spacing: .1em; }
}

/* Nút ✕ đóng cửa sổ */
dialog:not(.sheet) { position: fixed; }
.dlg-x { position: absolute; top: 14px; right: 14px; z-index: 1; width: 36px; height: 36px; }
.dlg h2 { padding-right: 40px; }

/* ---------- Ăn uống: chuyển Mẹ bầu / Sau sinh ---------- */
.mode-toggle { display: inline-grid; grid-template-columns: 1fr 1fr; margin: -6px 0 24px; border: 1px solid var(--line-strong); }
.mode-toggle button {
  padding: 9px 18px; border: 0; background: none; color: var(--text-3); cursor: pointer;
  font-size: 11px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; white-space: nowrap;
}
.mode-toggle button.on { background: var(--gold); color: var(--on-gold); }
.feed-steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.feed-steps li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.fs-age b { display: block; font: 500 24px/1.1 var(--serif); color: var(--gold-2); }
.fs-age span { display: block; margin-top: 4px; color: var(--text-3); font-size: 12px; }
.fs-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 6px; color: var(--text-2); font-size: 13.5px; }
.fs-body > p:last-child { font-size: 15px; }

/* ---------- Nhà trẻ & trường ---------- */
.school-plan { margin-bottom: 8px; }
.plan-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 14px; }
.plan-grid > div { background: var(--surface); padding: 16px; }
.plan-grid b { display: block; margin: 8px 0 6px; font: 200 32px/1 var(--sans); color: var(--gold-2); letter-spacing: -.02em; }
.plan-grid small { display: block; color: var(--text-3); font-size: 12.5px; line-height: 1.5; }
.hk-steps { list-style: none; margin: 0; padding: 0; counter-reset: hk; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.hk-steps li { counter-increment: hk; position: relative; padding: 16px 16px 16px 52px; background: var(--surface); border: 1px solid var(--line); }
.hk-steps li::before {
  content: counter(hk); position: absolute; left: 14px; top: 14px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--gold); color: var(--gold-2); font: 500 14px var(--serif);
}
.hk-steps b { display: block; font-weight: 500; font-size: 15px; }
.hk-steps p { margin-top: 4px; color: var(--text-2); font-size: 13.5px; line-height: 1.55; }
.school-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; align-items: start; }
.sc-name { display: block; font: 500 24px/1.15 var(--serif); }
.sc-facts { display: grid; gap: 8px; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.sc-facts dt { color: var(--gold); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; }
.sc-facts dd { margin: 2px 0 0; color: var(--text-2); font-size: 13.5px; line-height: 1.5; }

@media (max-width: 760px) {
  .plan-grid { grid-template-columns: 1fr 1fr; }
  .hk-steps { grid-template-columns: 1fr; }
  .feed-steps li { grid-template-columns: 1fr; gap: 6px; }
  .mode-toggle { display: grid; width: 100%; }
}

/* ---------- Giấy tờ cho bé ---------- */
.papers { margin-bottom: 20px; }
.pp-list { list-style: none; margin: 8px 0 0; padding: 0; }
.pp { padding: 12px 0; border-bottom: 1px solid var(--line); }
.pp:last-child { border-bottom: 0; }
.pp-main { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; }
.pp-main input {
  -webkit-appearance: none; appearance: none; flex: 0 0 auto; width: 22px; height: 22px; margin: 2px 0 0;
  border: 1px solid var(--line-strong); background: transparent; cursor: pointer; display: grid; place-items: center;
}
.pp-main input::after { content: ""; width: 10px; height: 5px; border: solid var(--on-gold); border-width: 0 0 1.6px 1.6px; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.pp-main input:checked { background: var(--gold); border-color: var(--gold); }
.pp-main input:checked::after { opacity: 1; }
.pp-main b { font-weight: 500; font-size: 15.5px; }
.pp-n { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 8px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold-2); font: 500 12px var(--serif); vertical-align: 1px; }
.pp-jp { color: var(--text-3); font-size: 12.5px; }
.pp-due { display: block; margin-top: 3px; color: var(--gold); font-size: 12.5px; }
.pp-due.late { color: var(--bad); font-weight: 500; }
.pp.done b { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.pp-more { margin: 6px 0 0 36px; }
.pp-more summary { list-style: none; cursor: pointer; display: inline-flex; gap: 8px; color: var(--text-3); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; }
.pp-more summary::-webkit-details-marker { display: none; }
.pp-more .plus { color: var(--gold); transition: transform .3s var(--ease); }
.pp-more[open] .plus { transform: rotate(45deg); }
.pp-where { margin: 8px 0 2px; color: var(--text); font-size: 14px; }
.pp-more .items li { font-size: 14px; padding: 5px 0 5px 22px; }

/* Ô nhập ngày dd/mm/yyyy */
.dmy { position: relative; display: flex; gap: 6px; align-items: stretch; }
.dlg label .dmy { margin-top: 6px; }
.dmy .dmy-text { flex: 1; min-width: 0; margin-top: 0 !important; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.dmy-btn {
  flex: 0 0 auto; width: 44px; display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--bg); color: var(--gold);
}
.dmy-btn:hover { border-color: var(--gold); color: var(--gold-2); }
.dmy-native { position: absolute; right: 0; bottom: 0; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.todo-add .dmy { min-width: 0; }

/* ===================== Tông hồng (mặc định) ===================== */
:root[data-theme=pink] {
  --bg: #fcf2f4;
  --bg-2: #f8e6ea;
  --surface: #ffffff;
  --surface-2: #fff6f8;
  --line: #f1dde2;
  --line-strong: #e6c2cb;
  --text: #4b3940;
  --text-2: #76646b;
  --text-3: #a5939a;
  --gold: #ec6a84;
  --gold-2: #d44f6b;
  --gold-dim: rgba(236, 106, 132, .1);
  --ok: #3f9e6e;
  --warn: #d9952c;
  --bad: #e0504f;
  --on-gold: #fff;
  --top-bg: rgba(255, 255, 255, .94);
  --glow: rgba(236, 106, 132, .1);
  --grain: 0;
  --sac-1: #ffffff;
  --sac-2: #f3f8fc;
  --sac-3: #e4eef6;
  --sac-line: rgba(236, 106, 132, .45);
  --sac-dust: #f4b3c1;
  --serif: "Nunito", "Be Vietnam Pro", system-ui, sans-serif;
  --sans: "Nunito", "Be Vietnam Pro", system-ui, sans-serif;
  --radius: 18px;
  color-scheme: light;
}
:root[data-theme=pink] body { font-weight: 400; }
:root[data-theme=pink] h1, :root[data-theme=pink] h2, :root[data-theme=pink] h3,
:root[data-theme=pink] .brand-name, :root[data-theme=pink] .st-title, :root[data-theme=pink] .sc-name,
:root[data-theme=pink] .lead-line, :root[data-theme=pink] .fruit p, :root[data-theme=pink] .vs-when b,
:root[data-theme=pink] .fs-age b, :root[data-theme=pink] .group-title h3 { font-weight: 800; letter-spacing: 0; }
:root[data-theme=pink] em { font-style: normal; color: var(--gold); }
:root[data-theme=pink] .eyebrow, :root[data-theme=pink] .count, :root[data-theme=pink] .nav button,
:root[data-theme=pink] .btn, :root[data-theme=pink] .link, :root[data-theme=pink] .toggle { letter-spacing: .06em; font-weight: 700; }
:root[data-theme=pink] .wk-num, :root[data-theme=pink] .stats b, :root[data-theme=pink] .days b,
:root[data-theme=pink] .leave-tiles b, :root[data-theme=pink] .est-grid b, :root[data-theme=pink] .ben-big,
:root[data-theme=pink] .facts b, :root[data-theme=pink] .sos b, :root[data-theme=pink] .plan-grid b { font-weight: 300; }
:root[data-theme=pink] body::before {
  background: radial-gradient(60% 40% at 50% -6%, rgba(236, 106, 132, .12), transparent 70%);
}
/* Bo tròn các khối */
:root[data-theme=pink] :is(.panel, .tl-card, details.ben, details.chip, .vac, .hk-steps li, .adm-row, .alert-strip,
  .duo, .facts, .leave-tiles, .est-grid, .sos, .plan-grid, .todo-empty, .note, .tool-tile, .tool-card) { border-radius: var(--radius); }
:root[data-theme=pink] :is(.duo, .facts, .leave-tiles, .est-grid, .sos, .plan-grid) { overflow: hidden; }
:root[data-theme=pink] :is(.panel, .tl-card, details.ben, details.chip, .vac, .hk-steps li, .tool-tile, .tool-card) {
  border-color: transparent; box-shadow: 0 4px 18px rgba(212, 79, 107, .08);
}
:root[data-theme=pink] :is(.btn, .toggle, .field, .dmy-btn, .pin, .salary input, .mode-toggle, .tag) { border-radius: 99px; }
:root[data-theme=pink] .field { padding-left: 16px; }
:root[data-theme=pink] dialog { border-radius: 22px; border-color: transparent; }
:root[data-theme=pink] .mode-toggle { overflow: hidden; }
:root[data-theme=pink] .checklist input, :root[data-theme=pink] .todo-main input, :root[data-theme=pink] .pp-main input { border-radius: 7px; }
:root[data-theme=pink] .nav button.active { color: var(--gold-2); }
:root[data-theme=pink] .monogram { border-color: var(--gold); color: var(--gold-2); font-family: var(--sans); font-weight: 800; }
:root[data-theme=pink] .tl-meta .badge, :root[data-theme=pink] .sh-meta .badge { border-radius: 99px; }

/* Lựa chọn giao diện trong Cài đặt */
.theme-picker { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 18px; }
.theme-opt {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 8px; cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: 99px; background: var(--surface); color: var(--text-2); font-size: 13.5px;
}
.theme-opt i { width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .12); }
.theme-opt.t-pink i { background: linear-gradient(135deg, #fff 0 45%, #ec6a84 45%); }
.theme-opt.t-light i { background: linear-gradient(135deg, #f6f1e8 0 45%, #9a7330 45%); }
.theme-opt.t-dark i { background: linear-gradient(135deg, #0a0908 0 45%, #c9a35c 45%); }
.theme-opt.on { border-color: var(--gold); color: var(--text); box-shadow: 0 0 0 2px var(--gold-dim); }

/* ===================== Bố cục kiểu app ===================== */
/* Thanh tab dưới đáy: chỉ trên điện thoại */
.bottom-nav { display: none; }
@media (max-width: 760px) {
  .top .nav { display: none; }
  .top-row { padding-bottom: 12px; }
  .bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: grid; grid-template-columns: repeat(5, 1fr);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: var(--top-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
  }
  .bottom-nav button {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px;
    border: 0; background: none; color: var(--text-3); cursor: pointer; font-size: 10.5px; font-weight: 600;
  }
  .bottom-nav button svg { width: 24px; height: 24px; }
  .bottom-nav button.active { color: var(--gold-2); }
  .bottom-nav .n {
    position: absolute; top: 2px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px;
    display: grid; place-items: center; background: var(--gold); color: var(--on-gold); font: 700 10px var(--sans); font-style: normal;
  }
  .bottom-nav .n:empty { display: none; }
  main { padding-bottom: 96px; }
  footer { padding-bottom: 110px; }
  .toast { bottom: calc(86px + env(safe-area-inset-bottom)); }
}

/* Trang chủ: bong bóng thông tin + vòng tròn + đếm ngược */
.bubble {
  position: relative; max-width: 440px; margin: 0 auto 18px; padding: 14px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 4px 18px rgba(0, 0, 0, .05);
}
.bubble::after {
  content: ""; position: absolute; left: 50%; bottom: -8px; width: 14px; height: 14px; transform: translateX(-50%) rotate(45deg);
  background: var(--surface); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.bubble .eyebrow { font-size: 10px; }
.bubble-main { margin-top: 4px; font-size: 16.5px; font-weight: 600; color: var(--text); }
.bubble-sub { margin-top: 2px; font-size: 13.5px; color: var(--text-2); }
:root[data-theme=dark] .bubble { box-shadow: none; }
.orb { position: relative; }
.orb-fruit {
  position: absolute; right: 6%; bottom: 8%; display: grid; place-items: center; width: 22%; aspect-ratio: 1;
  font-size: clamp(30px, 8vw, 54px); background: var(--surface); border-radius: 50%; box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
}
.orb-photo { position: relative; display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; cursor: zoom-in; border: 4px solid var(--surface); box-shadow: 0 8px 30px rgba(0, 0, 0, .15); }
.orb.has-photo::before { display: none; }
.orb-switch { position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%); display: flex; padding: 3px; border-radius: 99px; background: var(--surface); box-shadow: 0 4px 14px rgba(0, 0, 0, .12); }
.orb-switch button { border: 0; background: none; padding: 5px 12px; border-radius: 99px; font-size: 12px; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.orb-switch button.on { background: var(--gold); color: var(--on-gold); }

.count-row { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; }
.count-big { display: grid; grid-template-columns: auto auto; align-items: end; column-gap: 6px; }
.count-big small { grid-column: 1 / -1; color: var(--text-3); font-size: 12px; letter-spacing: .08em; }
.count-big .wk-num { font-size: clamp(72px, 13vw, 120px); line-height: .9; }
.count-big span { padding-bottom: 8px; color: var(--text-2); font-size: 15px; }
.wk-now { padding-bottom: 8px; }
.wk-line { font-size: 17px; color: var(--text); }
.wk-line b { font: 300 30px/1 var(--sans); color: var(--gold-2); }
.wk-now .muted { font-size: 13.5px; margin-top: 4px; }
.viewing { margin-top: 4px; color: var(--gold); font-size: 12.5px; font-weight: 600; }
.hero-text .wk-sub { margin-top: 12px; }
.quick { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.qbtn {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--text-2); font-size: 12px; font-weight: 600;
}
.qbtn { text-align: center; line-height: 1.25; }
.qbtn span {
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line); color: var(--gold); box-shadow: 0 4px 14px rgba(0, 0, 0, .06);
}
.qbtn span svg { width: 24px; height: 24px; }
.qbtn:hover span { border-color: var(--gold); }
.born-btn {
  display: block; width: 100%; margin-top: 16px; padding: 12px 16px; cursor: pointer;
  border: 1px dashed var(--gold); border-radius: 99px; background: var(--surface); color: var(--gold-2); font-size: 14px; font-weight: 600;
}
@media (max-width: 760px) {
  .hero-text { margin-top: 18px; }
  .count-row { justify-content: center; }
  .hero-text .wk-sub, .hero-text .due-edit { text-align: center; width: 100%; justify-content: center; }
}

/* ===================== Tiện ích ===================== */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.tool-tile {
  display: flex; align-items: center; gap: 14px; padding: 16px; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
}
.tool-tile:hover { border-color: var(--gold); }
.tt-ic { flex: 0 0 auto; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); }
.tt-ic svg { width: 26px; height: 26px; }
.tt-txt b { display: block; font-size: 15.5px; font-weight: 700; }
.tt-txt small { display: block; margin-top: 2px; color: var(--text-3); font-size: 12.5px; }
@media (max-width: 760px) { .tool-grid { grid-template-columns: 1fr 1fr; } .tool-tile { flex-direction: column; align-items: flex-start; } }

.tool-back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 10px; padding: 6px 0; border: 0; background: none; color: var(--gold); cursor: pointer; font-size: 14px; font-weight: 600; }
.tool-back svg { width: 18px; height: 18px; }
.tool-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.tool-head h2 { font-size: clamp(26px, 4vw, 34px); }
.tool-form .form-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 10px; }
.tool-form label { display: grid; gap: 5px; flex: 1 1 160px; color: var(--text-3); font-size: 12px; }
.tool-form label.grow { flex: 2 1 220px; }
.tool-form .field { width: 100%; }
.tool-form select.field { appearance: auto; }
.tool-form .btn { flex: 0 0 auto; height: 42px; }
.file-pick input { font-size: 13px; color: var(--text-2); }
.tool-msg { margin: 0 0 14px; padding: 12px 16px; border-radius: 14px; background: var(--gold-dim); font-size: 14.5px; }
.tool-msg.warn { background: color-mix(in srgb, var(--warn) 14%, transparent); }
.tool-msg.danger { display: grid; gap: 8px; background: color-mix(in srgb, var(--bad) 12%, transparent); border: 1px solid var(--bad); }
.tool-msg.danger .btn { justify-self: start; }
.tool-more summary { cursor: pointer; color: var(--gold); font-size: 13px; font-weight: 600; }
.tool-more .panel { margin: 12px 0 0; padding: 0; border: 0; box-shadow: none; }
.panel + .panel, .tool-form + .rec-list, .stat-row + .panel { margin-top: 14px; }

.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat-row > div { padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.stat-row small { display: block; color: var(--text-3); font-size: 11.5px; }
.stat-row b { display: block; margin: 6px 0 2px; font: 300 30px/1 var(--sans); color: var(--gold-2); }
.stat-row span { color: var(--text-2); font-size: 12.5px; }
.stat-row .high b, .stat-row .low b { color: var(--warn); }
@media (max-width: 560px) { .stat-row { grid-template-columns: 1fr 1fr; } .stat-row > div:last-child { grid-column: 1 / -1; } }

.wchart { width: 100%; height: auto; display: block; }
.wchart text { fill: var(--text-3); font-size: 9px; font-family: var(--sans); }
.wchart .g { stroke: var(--line); stroke-width: .6; }
.wchart .band { fill: var(--gold-dim); stroke: var(--gold); stroke-width: .6; stroke-dasharray: 3 3; }
.wchart .line { fill: none; stroke: var(--gold-2); stroke-width: 1.8; }
.wchart .pt { fill: var(--surface); stroke: var(--gold-2); stroke-width: 1.8; }
.wchart .now { stroke: var(--text-3); stroke-width: .8; stroke-dasharray: 2 2; }
.legend { display: flex; gap: 14px; align-items: center; margin-top: 8px; color: var(--text-3); font-size: 12px; }
.legend i { display: inline-block; width: 14px; height: 10px; margin-right: -8px; }
.lg-band { background: var(--gold-dim); border: 1px dashed var(--gold); }
.lg-pt { width: 10px !important; border-radius: 50%; border: 2px solid var(--gold-2); }

.rec-list { list-style: none; margin: 0; padding: 0; }
.rec-list li { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.rec-list li:not(:has(button)) { grid-template-columns: 1fr auto auto; }
.rec-list .icon-btn { width: 30px; height: 30px; border-color: transparent; }
.rec-list .late { color: var(--bad); font-weight: 600; }

.counter { display: grid; justify-items: center; gap: 12px; margin: 6px 0 22px; }
.big-tap {
  display: grid; place-items: center; align-content: center; gap: 6px; width: min(64vw, 240px); aspect-ratio: 1; border-radius: 50%; cursor: pointer;
  border: 0; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--gold) 55%, #fff), var(--gold)); color: var(--on-gold);
  box-shadow: 0 14px 40px color-mix(in srgb, var(--gold) 40%, transparent), inset 0 -6px 18px rgba(0, 0, 0, .08);
  transition: transform .12s;
}
.big-tap:active { transform: scale(.96); }
.big-tap b { font: 300 60px/1 var(--sans); }
.big-tap b small { font-size: 22px; opacity: .8; }
.big-tap span { font-size: 13px; font-weight: 600; max-width: 70%; text-align: center; }
.big-tap.on { background: radial-gradient(circle at 35% 30%, #ff9a9a, var(--bad)); }
.big-tap.on b, #ctr-time { font-size: 48px; }
.counter-time { font: 300 34px/1 var(--sans); color: var(--text-2); letter-spacing: .04em; }
.counter-sum { color: var(--text-2); font-size: 14px; }
.row.center { justify-content: center; }
.ctr-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 14.5px; }
.ctr-table th { text-align: left; color: var(--text-3); font-size: 11.5px; font-weight: 600; padding: 4px 6px 8px; }
.ctr-table td { padding: 8px 6px; border-top: 1px solid var(--line); }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.photo { position: relative; padding: 0; border: 0; border-radius: 14px; overflow: hidden; cursor: zoom-in; aspect-ratio: 1; background: var(--bg-2); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo span { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px; color: #fff; font-size: 11.5px; text-align: left; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); }
.lightbox { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 16px 16px 90px; background: rgba(0, 0, 0, .88); }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.lb-bar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); background: rgba(0, 0, 0, .6); color: #fff; font-size: 14px; }
.lb-bar span { flex: 1; }
.lb-bar .btn { color: #fff; border-color: rgba(255, 255, 255, .4); }

.fund-result { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.fund-result > div { padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.fund-result > div:first-child { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.fund-result > div:first-child small, .fund-result > div:first-child b { color: var(--on-gold); }
.fund-result small { display: block; color: var(--text-3); font-size: 12px; }
.fund-result b { display: block; margin: 6px 0 4px; font: 300 30px/1.1 var(--sans); color: var(--gold-2); }
.fund-result b span { font-size: 14px; margin-left: 2px; }
.fund-result .ok b { color: var(--ok); }
.fund-result .low b { color: var(--bad); }
@media (max-width: 560px) { .fund-result { grid-template-columns: 1fr; } }
.fund-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.seg-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-pick label { position: relative; display: grid; justify-items: center; gap: 1px; padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: 14px; cursor: pointer; font-size: 13.5px; color: var(--text-2); }
.seg-pick label small { color: var(--text-3); font-size: 11px; }
.seg-pick label.on { border-color: var(--gold); background: var(--gold-dim); color: var(--gold-2); font-weight: 700; }
.seg-pick input { position: absolute; opacity: 0; pointer-events: none; }
@media (max-width: 560px) { .fund-row { grid-template-columns: 1fr; } }

.wk-month { margin-bottom: 18px; }
.wk-month h3 { padding: 10px 16px; border-radius: 14px 14px 0 0; background: var(--gold); color: var(--on-gold); font-size: 18px; }
.wk-month h3 span { margin-left: 8px; font-size: 12.5px; font-weight: 600; opacity: .85; }
.wk-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 14px 14px; overflow: hidden; }
.wk-list li + li { border-top: 1px dashed var(--line); }
.wk-list button { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; width: 100%; padding: 12px 14px; border: 0; background: none; text-align: left; cursor: pointer; color: var(--text); }
.wk-list li.cur button { background: var(--gold-dim); }
.wk-tag { display: grid; place-items: center; align-content: center; height: 54px; border-radius: 12px; background: color-mix(in srgb, var(--gold) 16%, transparent); color: var(--gold-2); font: 300 26px/1 var(--sans); }
.wk-tag small { font-size: 10px; font-weight: 700; }
.wk-body b { font-weight: 700; }
.wk-line { display: block; margin-top: 3px; font-size: 13.5px; color: var(--text-2); }

/* ---------- Hỏi đáp & dân gian ---------- */
.faq-list { display: grid; gap: 12px; }
details.faq { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius, 0); }
:root[data-theme=pink] details.faq { border-color: transparent; box-shadow: 0 4px 18px rgba(212, 79, 107, .08); }
details.faq summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 16px 18px; }
details.faq summary::-webkit-details-marker { display: none; }
.faq-ic { font-size: 30px; line-height: 1; }
.faq-q .tag { display: inline-block; margin-bottom: 6px; }
.faq-q b { display: block; font-size: 16.5px; font-weight: 700; }
.faq-a { display: block; margin-top: 6px; color: var(--text-2); font-size: 14.5px; line-height: 1.6; }
details.faq .plus { color: var(--gold); font-size: 20px; transition: transform .3s var(--ease); }
details.faq[open] .plus { transform: rotate(45deg); }
.faq-body { padding: 0 18px 16px 62px; }
.faq-body .items li { font-size: 14.5px; }
.faq-time { list-style: none; margin: 0 0 8px; padding: 0; border-left: 2px solid var(--line-strong); }
.faq-time li { position: relative; padding: 6px 0 6px 16px; }
.faq-time li::before { content: ""; position: absolute; left: -6px; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--gold); }
.faq-time li.now::before { background: var(--gold); }
.faq-time b { display: block; font-size: 13.5px; color: var(--gold-2); }
.faq-time span { font-size: 14px; color: var(--text-2); }
.mini-link { display: block; margin-top: 8px; padding: 0; border: 0; background: none; color: var(--gold); font-size: 13px; font-weight: 600; cursor: pointer; text-align: left; }
@media (max-width: 560px) { .faq-body { padding-left: 18px; } }

/* Ô "Mẹ nên ăn tuần này" — trang chủ có 3 ô */
.duo:has(.note-eat) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.note-why { margin-top: 4px !important; color: var(--text-3); font-size: 13.5px !important; }
.note-eat .note-ic { color: var(--ok); }
@media (max-width: 980px) {
  .duo:has(.note-eat) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .duo .note-eat { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .duo:has(.note-eat) { grid-template-columns: minmax(0, 1fr); }
}

/* ===== Sổ ghi chú khám thai: trang giấy kẻ dòng ===== */
.paper {
  --ln: color-mix(in srgb, var(--gold) 22%, transparent);
  position: relative; margin: 0 0 14px; padding: 16px 16px 16px 30px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 1px 0 var(--line), 0 6px 18px -12px rgba(0, 0, 0, .25);
}
.paper::before { /* lề đỏ như vở */
  content: ""; position: absolute; top: 0; bottom: 0; left: 20px; width: 1px;
  background: color-mix(in srgb, var(--bad) 45%, transparent);
}
.paper-h { margin: 0 0 8px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.np-n { min-width: 22px; padding: 0 7px; border-radius: 99px; background: var(--gold-dim); color: var(--gold-2); font-size: 12.5px; text-align: center; }
.paper-txt {
  width: 100%; resize: vertical; border: 0; outline: 0; padding: 0 2px; color: var(--text);
  font: inherit; font-size: 16px; line-height: 30px; min-height: 92px;
  background: transparent repeating-linear-gradient(to bottom, transparent 0 29px, var(--ln) 29px 30px);
  background-attachment: local;
}
.paper-txt.ans { min-height: 62px; margin-top: 6px; color: var(--text-2); }
.paper-txt::placeholder { color: var(--text-3); }
.np-kinds, .np-ideas { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.np-ideas { margin: 4px 0 0; }
.np-chip {
  padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line-strong); background: none;
  color: var(--text-2); font: inherit; font-size: 13px; cursor: pointer; text-align: left;
}
.np-chip.on { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.np-chip:disabled { opacity: .4; cursor: default; }
.np-list { list-style: none; margin: 0; padding: 0; }
.np-item {
  display: flex; align-items: flex-start; gap: 10px; padding: 7px 0;
  border-bottom: 1px solid var(--ln); line-height: 1.5;
}
.np-item:last-child { border-bottom: 0; }
.np-ic { width: 22px; flex: 0 0 22px; text-align: center; }
.np-check {
  width: 22px; height: 22px; flex: 0 0 22px; margin-top: 1px; border-radius: 6px; cursor: pointer;
  border: 1.5px solid var(--gold); background: none; color: var(--on-gold); font-size: 13px; line-height: 1;
}
.np-item.done .np-check { background: var(--gold); }
.np-item.done .np-txt > p:first-child { color: var(--text-3); text-decoration: line-through; }
.np-txt { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.np-txt p { margin: 0; }
.np-ans { color: var(--text-2); font-size: 14px; margin-top: 2px !important; }
.np-acts { display: flex; gap: 2px; flex: 0 0 auto; }
.np-acts .icon-btn { width: 30px; height: 30px; font-size: 14px; }
.np-hint { margin: 8px 0 0; color: var(--text-3); font-size: 13px; }
.k-a .np-txt > p:first-child { font-weight: 500; }
.paper-line {
  width: 100%; border: 0; border-bottom: 1px solid var(--ln); outline: 0; padding: 0 2px; background: none;
  color: var(--text); font: inherit; font-size: 16px; font-weight: 600; line-height: 30px; height: 31px;
}
.paper-line::placeholder { color: var(--text-3); font-weight: 400; }
.np-meta { color: var(--text-3); font-size: 12.5px; margin-top: 2px !important; }
.np-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.np-toggle {
  height: 26px; padding: 0 10px; border-radius: 99px; border: 1px solid var(--line-strong); background: none;
  color: var(--text-2); font: inherit; font-size: 12.5px; cursor: pointer;
}
.np-item.k-m.done .np-txt b { color: var(--text-3); font-weight: 500; }
.meds-box > summary { margin: 0; cursor: pointer; list-style: none; }
.meds-box > summary::-webkit-details-marker { display: none; }
.meds-box[open] > summary { margin-bottom: 8px; }
.meds-peek { flex: 1; min-width: 0; color: var(--text-3); font-size: 13px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meds-box[open] .meds-peek { visibility: hidden; }
.meds-box .plus { flex: 0 0 auto; color: var(--gold); font-size: 20px; line-height: 1; transition: transform .2s; }
.meds-box[open] .plus { transform: rotate(45deg); }
.vx-list { list-style: none; margin: 0; padding: 0; }
.vx-item { display: flex; align-items: flex-start; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--ln); }
.vx-item label { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.vx-item input { appearance: none; width: 22px; height: 22px; flex: 0 0 22px; margin: 2px 0 0; border: 1.5px solid var(--gold); border-radius: 6px; display: grid; place-items: center; cursor: pointer; }
.vx-item input:checked { background: var(--gold); }
.vx-item input:checked::after { content: "✓"; color: var(--on-gold); font-size: 13px; line-height: 1; }
.vx-txt { display: grid; gap: 1px; min-width: 0; overflow-wrap: anywhere; }
.vx-jp { font-weight: 600; }
.vx-vi { color: var(--text-2); }
.vx-txt small { color: var(--text-3); font-size: 12.5px; line-height: 1.45; }
.vx-item.done .vx-jp, .vx-item.done .vx-vi { color: var(--text-3); text-decoration: line-through; }
.vx-item .icon-btn { width: 30px; height: 30px; flex: 0 0 auto; }
.vx-add { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.vx-add .field { flex: 1 1 140px; width: auto; }
.vx-add .btn { flex: 0 0 auto; height: 42px; }
.np-off { margin-top: 8px; }
.np-off summary { cursor: pointer; color: var(--text-3); font-size: 13px; padding: 4px 0; }

.med-pics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.med-pic {
  width: 56px; height: 56px; padding: 0; border-radius: 10px; overflow: hidden; cursor: zoom-in;
  border: 1px solid var(--line); background: var(--bg-2);
}
.med-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.med-pic.add {
  display: grid; place-content: center; justify-items: center; gap: 2px; cursor: pointer;
  border: 1.5px dashed var(--line-strong); background: none; font-size: 20px; line-height: 1;
}
.med-pic.add span { font-size: 11px; color: var(--text-3); }
.med-pic.add:hover { border-color: var(--gold); }
.tool-form label.med-file { display: flex; align-items: center; gap: 12px; margin-top: 10px; cursor: pointer; flex: none; }
.med-file .med-pic.add { width: 52px; height: 52px; font-size: 18px; }
.med-file-txt { display: grid; color: var(--text-2); font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.med-file-txt small { color: var(--text-3); font-size: 12px; }

/* Điện thoại: chữ trong ô nhập >= 16px để Safari/Chrome không tự phóng to khi chạm vào ô */
@media (max-width: 760px), (pointer: coarse) {
  input, select, textarea, .field { font-size: 16px !important; }
}
