/* MioCare — hệ thống giao diện. Màu lấy từ logo (docs/RND.md §21) */
:root {
  --jade: #136f63;
  --jade-dark: #0e544b;
  --jade-soft: #e4f1ee;
  --jade-tint: #f1f8f6;
  --gold: #d9a441;
  --gold-dark: #b3832a;
  --gold-soft: #faf0dc;
  --cream: #fbf8f2;
  --paper: #ffffff;
  --ink: #1f2a2a;
  --ink-soft: #4a5857;
  --muted: #7a8786;
  --line: #e6e1d6;
  --line-soft: #f0ece3;
  --sos: #c0392b;
  --sos-soft: #fbe9e7;
  --warn: #b7791f;
  --warn-soft: #fdf3e1;
  --ok: #2f855a;
  --ok-soft: #e6f4ec;
  --info: #2b6cb0;
  --info-soft: #e8f0fa;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(31, 42, 42, 0.04), 0 4px 16px rgba(31, 42, 42, 0.06);
  --shadow-lg: 0 10px 40px rgba(19, 111, 99, 0.12);
  --font: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Lora', Georgia, serif;
}

*,
*::before,
*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--jade); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--jade-dark); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 0.5em; color: var(--ink); }
h1 { font-family: var(--serif); font-size: clamp(1.75rem, 4vw, 2.6rem); font-weight: 600; }
h2 { font-family: var(--serif); font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 600; }
h3 { font-size: 1.15rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }
p { margin: 0 0 1em; }
small, .small { font-size: 0.875rem; }
.muted { color: var(--muted); }
.soft { color: var(--ink-soft); }
.serif { font-family: var(--serif); }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

/* ---------- Bố cục ---------- */
.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.container.narrow { max-width: 760px; }
.container.mid { max-width: 940px; }
.page { padding: 28px 0 64px; }
.section { padding: 64px 0; }
.section.alt { background: var(--paper); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 8px; }
.stack-lg > * + * { margin-top: 28px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.row.top { align-items: flex-start; }
.grow { flex: 1 1 auto; min-width: 0; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.layout-side { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt { margin-top: 16px; }
.mt-lg { margin-top: 32px; }
.mb { margin-bottom: 16px; }
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .layout-side { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 44px 0; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 248, 242, 0.92);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--jade); }
.brand img { width: 40px; height: 40px; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.45rem; letter-spacing: 0.06em; line-height: 1; }
.brand-tag { display: block; font-family: var(--font); font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-dark); font-weight: 600; margin-top: 3px; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a, .nav button.linklike {
  padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--ink-soft); font-weight: 500; font-size: 0.95rem;
}
.nav a:hover, .nav a.active { background: var(--jade-soft); color: var(--jade-dark); }
.nav a.btn, .nav a.btn:hover { background: var(--jade); color: #fff; padding: 9px 18px; margin-left: 6px; }
.nav a.btn:hover { background: var(--jade-dark); }
.nav form { margin: 0; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font: inherit; color: var(--ink); }
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--paper); flex-direction: column; align-items: stretch; padding: 12px 16px 16px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a, .nav .btn { text-align: center; }
}

/* ---------- Nút ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px; border: 1.5px solid transparent;
  font: inherit; font-weight: 600; font-size: 0.97rem; line-height: 1.2;
  cursor: pointer; text-decoration: none; transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.05s;
  background: var(--jade); color: #fff;
}
.btn:hover { background: var(--jade-dark); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-gold { background: var(--gold); color: #2a2109; }
.btn-gold:hover { background: var(--gold-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--jade); border-color: var(--jade); }
.btn-outline:hover { background: var(--jade-soft); color: var(--jade-dark); }
.btn-ghost { background: transparent; color: var(--ink-soft); border-color: var(--line); }
.btn-ghost:hover { background: var(--paper); color: var(--ink); }
.btn-danger { background: var(--sos); }
.btn-danger:hover { background: #a02f23; }
.btn-sm { padding: 7px 14px; font-size: 0.875rem; }
.btn-lg { padding: 15px 28px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
button.linklike { background: none; border: 0; font: inherit; color: var(--jade); cursor: pointer; padding: 0; }

/* ---------- Thẻ ---------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.card.tint { background: var(--jade-tint); border-color: #d5e8e3; }
.card.gold { background: var(--gold-soft); border-color: #f0dcae; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-title h2, .card-title h3 { margin: 0; }
.card + .card { margin-top: 20px; }
.card.link { text-decoration: none; color: inherit; display: block; transition: box-shadow 0.15s, transform 0.15s; }
.card.link:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.stat { padding: 18px 20px; }
.stat .label { color: var(--muted); font-size: 0.85rem; font-weight: 500; }
.stat .value { font-size: 1.7rem; font-weight: 700; color: var(--jade-dark); line-height: 1.2; margin-top: 4px; }
.stat .hint { font-size: 0.8rem; color: var(--muted); }

/* ---------- Huy hiệu ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 600; background: var(--line-soft); color: var(--ink-soft); white-space: nowrap;
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--sos-soft); color: var(--sos); }
.badge.muted { background: var(--line-soft); color: var(--muted); }
.badge.jade { background: var(--jade-soft); color: var(--jade-dark); }
.badge.gold { background: var(--gold-soft); color: #8a6420; }
.verified { color: var(--gold-dark); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 4px 11px; border-radius: 999px; background: var(--jade-tint); border: 1px solid #d5e8e3; font-size: 0.82rem; color: var(--jade-dark); }

/* ---------- Form ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field label, .label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 6px; color: var(--ink); }
.field .hint { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }
input[type='text'], input[type='tel'], input[type='email'], input[type='password'], input[type='number'], input[type='date'], input[type='time'], input[type='search'], select, textarea {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; color: var(--ink); background: #fff; transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--jade); box-shadow: 0 0 0 3px rgba(19, 111, 99, 0.14); }
textarea { min-height: 96px; resize: vertical; }
input[type='file'] { font: inherit; font-size: 0.9rem; max-width: 100%; }
.check { display: flex; align-items: flex-start; gap: 9px; font-weight: 400; cursor: pointer; font-size: 0.95rem; }
.check input { margin-top: 4px; width: 17px; height: 17px; accent-color: var(--jade); flex: none; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 16px; }
.option-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.option-card { position: relative; display: block; cursor: pointer; }
.option-card input { position: absolute; opacity: 0; pointer-events: none; }
.option-card .box { display: block; height: 100%; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: #fff; transition: border-color 0.15s, background 0.15s; }
.option-card input:checked + .box { border-color: var(--jade); background: var(--jade-tint); box-shadow: 0 0 0 3px rgba(19, 111, 99, 0.12); }
.option-card input:focus-visible + .box { outline: 3px solid var(--gold); }
.option-card .box strong { display: block; }
.fieldset { border: 0; padding: 0; margin: 0; }
.fieldset legend { font-weight: 700; font-size: 1.05rem; margin-bottom: 10px; padding: 0; }
.form-section + .form-section { border-top: 1px dashed var(--line); padding-top: 22px; margin-top: 22px; }
.repeat-row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; }
@media (max-width: 640px) { .repeat-row { grid-template-columns: 1fr; } }

/* ---------- Thông báo ---------- */
.flash, .notice { padding: 13px 16px; border-radius: var(--radius-sm); border: 1px solid; margin-bottom: 14px; font-size: 0.95rem; }
.flash.success, .notice.ok { background: var(--ok-soft); border-color: #bfe0cc; color: #22603f; }
.flash.error, .notice.danger { background: var(--sos-soft); border-color: #f2c6c0; color: #8f2a20; }
.flash.info, .notice.info { background: var(--info-soft); border-color: #c8daf1; color: #1f4f82; }
.flash.warn, .notice.warn { background: var(--warn-soft); border-color: #f1d9a9; color: #7a5212; }
.flashes { margin-top: 18px; }

/* ---------- Bảng ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
table.table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.table th, .table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table th { background: var(--jade-tint); color: var(--jade-dark); font-weight: 600; font-size: 0.83rem; text-transform: uppercase; letter-spacing: 0.03em; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; white-space: nowrap; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 16px; margin: 0; }
.kv dt { color: var(--muted); font-size: 0.9rem; }
.kv dd { margin: 0; }
@media (max-width: 520px) { .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 8px; } }

.price-lines { width: 100%; border-collapse: collapse; }
.price-lines td { padding: 6px 0; }
.price-lines td:last-child { text-align: right; white-space: nowrap; }
.price-lines tr.total td { border-top: 1px solid var(--line); padding-top: 12px; font-weight: 700; font-size: 1.15rem; color: var(--jade-dark); }

/* ---------- Avatar ---------- */
.avatar {
  width: 48px; height: 48px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--jade), #1d8a7b); color: #fff; font-weight: 700; letter-spacing: 0.02em;
}
.avatar.lg { width: 76px; height: 76px; font-size: 1.5rem; }
.avatar.sm { width: 36px; height: 36px; font-size: 0.85rem; }
.avatar.gold { background: linear-gradient(135deg, var(--gold), #e8bd6a); color: #3a2c0c; }

/* ---------- Trang chủ ---------- */
.hero { padding: 56px 0 40px; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); margin-bottom: 18px; }
.hero h1 em { font-style: normal; color: var(--jade); }
.hero .lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 560px; }
.hero-art { position: relative; display: flex; justify-content: center; }
.hero-art::before { content: ''; position: absolute; inset: 6% 6%; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #fff 0%, var(--jade-tint) 55%, transparent 72%); }
.hero-art img { position: relative; width: min(360px, 80%); }
.eyebrow { display: inline-block; font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 700; color: var(--gold-dark); margin-bottom: 12px; }
.trust-row { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 26px; color: var(--ink-soft); font-size: 0.92rem; }
.trust-row span::before { content: '✓'; color: var(--gold-dark); font-weight: 700; margin-right: 6px; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero-art { order: -1; } .hero-art img { width: 200px; } }

.pillar { text-align: left; }
.pillar .icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; background: var(--jade-soft); margin-bottom: 14px; }
.pillar.gold .icon { background: var(--gold-soft); }
.pillar .tag { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; color: var(--jade); }
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step { position: relative; padding-top: 52px; }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: 0; left: 0; width: 38px; height: 38px; border-radius: 50%; background: var(--gold); color: #2a2109; font-weight: 700; display: flex; align-items: center; justify-content: center; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

.price-card { display: flex; flex-direction: column; }
.price-card .amount { font-size: 1.9rem; font-weight: 700; color: var(--jade-dark); }
.price-card .per { color: var(--muted); font-size: 0.9rem; }
.price-card.featured { border: 2px solid var(--gold); position: relative; }
.price-card.featured::before { content: 'Phổ biến'; position: absolute; top: -12px; right: 18px; background: var(--gold); color: #2a2109; font-size: 0.75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.price-card .btn { margin-top: auto; }

.quote-block { font-family: var(--serif); font-size: 1.3rem; line-height: 1.5; color: var(--jade-dark); border-left: 4px solid var(--gold); padding-left: 18px; }
.cta-band { background: linear-gradient(135deg, var(--jade) 0%, #0f5a51 100%); color: #fff; border-radius: 22px; padding: 44px 36px; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, 0.85); }

/* ---------- Footer ---------- */
.site-footer { background: #10302b; color: rgba(255, 255, 255, 0.78); padding: 44px 0 30px; font-size: 0.92rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer h4 { color: #fff; margin-bottom: 10px; }
.site-footer .brand-name { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li + li { margin-top: 6px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); margin-top: 30px; padding-top: 18px; font-size: 0.82rem; color: rgba(255, 255, 255, 0.55); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Trang tổng quan ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { margin: 0; font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.subnav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 22px; }
.subnav a { padding: 7px 14px; border-radius: 999px; text-decoration: none; color: var(--ink-soft); border: 1px solid var(--line); background: var(--paper); font-size: 0.9rem; font-weight: 500; }
.subnav a.active, .subnav a:hover { background: var(--jade); color: #fff; border-color: var(--jade); }

.today-card { border-left: 5px solid var(--jade); }
.today-card .who { display: flex; gap: 14px; align-items: center; }
.vitals { display: flex; gap: 10px; flex-wrap: wrap; }
.vital { background: var(--jade-tint); border-radius: 12px; padding: 10px 14px; min-width: 104px; }
.vital .k { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.vital .v { font-size: 1.25rem; font-weight: 700; color: var(--jade-dark); }
.vital .u { font-size: 0.75rem; color: var(--muted); font-weight: 500; }
.vital.bad { background: var(--sos-soft); }
.vital.bad .v { color: var(--sos); }

.alert-banner { display: flex; gap: 14px; align-items: center; padding: 14px 18px; border-radius: var(--radius); background: var(--sos-soft); border: 1.5px solid #efb7af; color: #7f241b; }
.alert-banner .icon { font-size: 1.6rem; }
.alert-banner.critical { background: var(--sos); color: #fff; border-color: var(--sos); animation: pulse 1.6s ease-in-out infinite; }
.alert-banner.critical .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.6); }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(192, 57, 43, 0.5); } 50% { box-shadow: 0 0 0 8px rgba(192, 57, 43, 0); } }
@media (prefers-reduced-motion: reduce) { .alert-banner.critical { animation: none; } html { scroll-behavior: auto; } }

/* Sổ Mio — dòng thời gian */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 22px; }
.tl-item::before { content: ''; position: absolute; left: -23px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 3px solid var(--jade); }
.tl-item.gold::before { border-color: var(--gold); }
.tl-item.red::before { border-color: var(--sos); }
.tl-item:last-child { padding-bottom: 0; }
.tl-meta { font-size: 0.82rem; color: var(--muted); }
.letter { font-family: var(--serif); font-style: italic; background: var(--gold-soft); border-radius: 12px; padding: 12px 16px; color: #6b4f19; margin-top: 10px; }
.letter::before { content: '“'; font-size: 1.6rem; line-height: 0; vertical-align: -0.35em; margin-right: 3px; color: var(--gold-dark); }
.photos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.photos img { width: 120px; height: 120px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }

.status-steps { display: flex; gap: 0; margin: 6px 0 4px; }
.status-steps .s { flex: 1; text-align: center; font-size: 0.75rem; color: var(--muted); position: relative; padding-top: 20px; }
.status-steps .s::before { content: ''; position: absolute; top: 4px; left: 50%; transform: translateX(-50%); width: 12px; height: 12px; border-radius: 50%; background: var(--line); z-index: 1; }
.status-steps .s::after { content: ''; position: absolute; top: 9px; left: -50%; width: 100%; height: 2px; background: var(--line); }
.status-steps .s:first-child::after { display: none; }
.status-steps .s.done { color: var(--jade-dark); font-weight: 600; }
.status-steps .s.done::before, .status-steps .s.done::after { background: var(--jade); }

/* Kết quả Mio Match */
.match-card { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: start; }
.score-ring { --p: 80; width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: conic-gradient(var(--jade) calc(var(--p) * 1%), var(--line-soft) 0); position: relative; flex: none; }
.score-ring::after { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: var(--paper); }
.score-ring span { position: relative; z-index: 1; font-weight: 700; color: var(--jade-dark); font-size: 1.05rem; }
.reasons { list-style: none; padding: 0; margin: 8px 0 0; }
.reasons li { font-size: 0.9rem; color: var(--ink-soft); }
.reasons li::before { content: '✦'; color: var(--gold); margin-right: 7px; }
@media (max-width: 640px) { .match-card { grid-template-columns: 1fr; } }

.code-box { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 2.2rem; letter-spacing: 0.3em; font-weight: 700; color: var(--jade-dark); background: var(--jade-tint); border: 2px dashed var(--jade); border-radius: 14px; padding: 12px 18px; text-align: center; }
.qr { width: 260px; max-width: 100%; border-radius: 12px; border: 1px solid var(--line); background: #fff; margin: 0 auto; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty .icon { font-size: 2.4rem; margin-bottom: 8px; }
details summary { cursor: pointer; font-weight: 600; color: var(--jade); }
.chart-box { position: relative; height: 260px; }

/* ---------- Chế độ Mio Lớn ---------- */
body.elder { background: #f7f3ea; font-size: 22px; line-height: 1.5; }
.elder-wrap { max-width: 720px; margin: 0 auto; padding: 20px 16px 120px; }
.elder-top { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.elder-top img { width: 64px; height: 64px; }
.elder h1 { font-family: var(--serif); font-size: 2rem; margin: 0; }
.elder .greet { font-size: 1.1rem; color: var(--ink-soft); }
.big-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.big-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 170px; border-radius: 24px; text-decoration: none; text-align: center;
  font-size: 1.35rem; font-weight: 700; color: var(--ink); background: #fff; border: 3px solid var(--line);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.06); padding: 16px; cursor: pointer; font-family: inherit; width: 100%;
}
.big-btn .em { font-size: 3.4rem; line-height: 1; }
.big-btn:hover, .big-btn:focus-visible { border-color: var(--jade); color: var(--ink); }
.big-btn.jade { background: var(--jade); color: #fff; border-color: var(--jade); }
.big-btn.gold { background: var(--gold-soft); border-color: var(--gold); }
.big-btn.sos { background: var(--sos); color: #fff; border-color: #a02f23; min-height: 110px; font-size: 1.7rem; }
.sos-fixed { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(247, 243, 234, 0.96); border-top: 1px solid var(--line); }
.sos-fixed .big-btn { max-width: 720px; margin: 0 auto; min-height: 84px; flex-direction: row; font-size: 1.5rem; }
.sos-fixed .big-btn .em { font-size: 2.2rem; }
.elder-card { background: #fff; border-radius: 22px; padding: 22px; border: 2px solid var(--line); }
.elder-card + .elder-card { margin-top: 14px; }
.elder .back { display: inline-block; font-size: 1.15rem; margin-bottom: 14px; font-weight: 600; }
.speak-btn { display: inline-flex; align-items: center; gap: 10px; font-size: 1.2rem; padding: 14px 24px; border-radius: 999px; border: 0; background: var(--jade); color: #fff; font-weight: 700; cursor: pointer; font-family: inherit; }
.keypad input { font-size: 2.6rem; letter-spacing: 0.4em; text-align: center; padding: 16px; border-radius: 18px; border: 3px solid var(--line); width: 100%; font-family: ui-monospace, Menlo, monospace; }
@media (max-width: 420px) { .big-grid { grid-template-columns: 1fr; } .big-btn { min-height: 120px; } }

/* ---------- In ấn & tiện ích ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.divider-text { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 0.85rem; }
.divider-text::before, .divider-text::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.auth-card { max-width: 480px; margin: 36px auto; }
.auth-card .brand { justify-content: center; margin-bottom: 8px; }
.demo-note { font-size: 0.82rem; background: var(--gold-soft); border: 1px dashed var(--gold); border-radius: 10px; padding: 10px 12px; color: #6b4f19; }

/* Slogan dưới logo đầy đủ (chữ thật, không nằm trong ảnh) */
.logo-slogan { font-family: 'Lora', Georgia, serif; font-style: italic; font-weight: 500; color: #a87a22; font-size: 1.25rem; text-align: center; letter-spacing: 0.01em; }
.hero-art figure { position: relative; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.hero-art figure { width: min(360px, 80%); }
.hero-art figure img { width: 100%; }
@media (max-width: 860px) { .hero-art figure { width: 200px; } .logo-slogan { font-size: 1.05rem; } }

/* ---------- Thông báo: chuông, toast, danh sách ---------- */
.bell { position: relative; font-size: 1.15rem; line-height: 1; padding: 8px 10px !important; }
.bell-count { position: absolute; top: 0; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--sos); color: #fff; font-size: 0.7rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.bell-count[hidden] { display: none; }
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; flex-direction: column; gap: 10px; width: min(360px, calc(100vw - 32px)); }
.toast { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--jade); border-radius: 12px; box-shadow: var(--shadow); color: var(--ink); text-decoration: none; font-size: 0.9rem; animation: toast-in 0.25s ease-out; transition: opacity 0.5s, transform 0.5s; }
.toast:hover { color: var(--ink); border-color: var(--jade); }
.toast.critical { border-left-color: var(--sos); background: var(--sos-soft); }
.toast span { color: var(--ink-soft); }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; transition: none; } }
.live-banner { margin-bottom: 12px; }
.notif-list { display: flex; flex-direction: column; }
.notif { display: flex; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--line-soft); text-decoration: none; color: var(--ink); }
.notif:last-child { border-bottom: 0; }
.notif:hover { background: var(--jade-tint); color: var(--ink); }
.notif .ico { font-size: 1.3rem; flex: none; width: 32px; text-align: center; }
.notif .t { font-weight: 600; }
.notif.unread .t::after { content: ''; display: inline-block; width: 8px; height: 8px; margin-left: 8px; border-radius: 50%; background: var(--jade); vertical-align: middle; }
.notif:not(.unread) { opacity: 0.78; }
.evidence { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.evidence img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
