/* Một cột rộng tối đa 520px như app điện thoại; thanh tab cố định dưới đáy.
   Màu: xanh lam sẫm (tin cậy, bình tĩnh) + vàng nến ấm làm điểm nhấn; xanh "Bố ơi", hồng "Mẹ ơi". */
:root {
  --bg: #f3f5f4; --surface: #ffffff; --fg: #1b2a30; --muted: #5d6e73; --line: #dce3e2;
  --brand: #1f4e5f; --brand-soft: #e3eef0; --accent: #e8a33d; --accent-soft: #fbefd9;
  --bo: #2f6fb8; --me: #c2416b; --ok: #2f8f5f; --err: #b3392f; --bubble: #eef2f2;
  --display: "Baloo 2", "Be Vietnam Pro", system-ui, sans-serif;
  --body: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --tabh: 64px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1719; --surface: #172327; --fg: #e4ecec; --muted: #9db0b3; --line: #29393d;
    --brand: #8cc6d6; --brand-soft: #1d3138; --accent: #f0b85c; --accent-soft: #3a2e17;
    --bo: #7fb0ef; --me: #f08bab; --ok: #6fd19c; --err: #ff8a80; --bubble: #1f2e33; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 16px; line-height: 1.6; -webkit-text-size-adjust: 100%; }
.app { max-width: 520px; margin: 0 auto; min-height: 100%; padding: env(safe-area-inset-top, 0) max(16px, env(safe-area-inset-right, 0px)) calc(var(--tabh) + 24px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
h1, h2, h3 { font-family: var(--display); line-height: 1.2; margin: 0; text-wrap: balance; }
h1 { font-size: 2.2rem; color: var(--brand); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.1rem; }
p { margin: 0; }
.view { display: flex; flex-direction: column; gap: 16px; padding-top: 20px; }
.top { display: flex; flex-direction: column; gap: 4px; position: relative; padding-right: 48px; }
.eyebrow { font-size: .75rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.sub { color: var(--muted); }
.small { font-size: .9rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* nút & form */
.btn { appearance: none; border: 0; border-radius: 12px; background: var(--brand); color: var(--surface); font: 600 1rem var(--body); padding: 13px 18px; cursor: pointer; min-height: 48px; }
.btn:disabled { opacity: .55; cursor: progress; }
a.btn { display: block; text-align: center; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--brand); border: 1.5px solid var(--brand); }
.btn.done { background: var(--ok); }
.icon-btn { position: absolute; right: 0; top: 0; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--fg); cursor: pointer; display: grid; place-items: center; }
.icon-btn svg, .tabs svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.form { display: flex; flex-direction: column; gap: 8px; }
.form label, legend { font-weight: 600; font-size: .92rem; margin-top: 6px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
input, textarea, select { width: 100%; font: 400 1rem var(--body); color: var(--fg); background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 12px; }
input:focus, textarea:focus, select:focus { border-color: var(--brand); outline: none; }
textarea { resize: vertical; }
.form .btn { margin-top: 10px; }
.hint { font-size: .82rem; color: var(--muted); }
.err { color: var(--err); font-size: .9rem; font-weight: 500; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row2 > * { min-width: 0; }
.seg { display: flex; gap: 8px; margin-top: 4px; }
.seg label { flex: 1; margin: 0; }
.seg input { position: absolute; opacity: 0; width: 1px; }
.seg span { display: block; text-align: center; padding: 10px; border: 1.5px solid var(--line); border-radius: 10px; font-weight: 600; cursor: pointer; }
.seg input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.seg input:focus-visible + span { outline: 3px solid var(--accent); }

/* màn đăng nhập */
.intro { gap: 22px; padding-top: 36px; }
.intro-top { display: flex; flex-direction: column; gap: 8px; }
.logo { width: 56px; height: 56px; }

/* bài hôm nay */
.lesson { display: flex; flex-direction: column; gap: 14px; }
.book-tag { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); align-self: flex-start; }
.book-tag.bo-oi { color: var(--bo); } .book-tag.me-oi { color: var(--me); }
.lesson ul { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 6px; }
.block { display: flex; flex-direction: column; gap: 4px; padding-top: 12px; border-top: 1px dashed var(--line); }
.block .k { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.quote { background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; font-style: italic; }
.read-ref { font-size: .88rem; color: var(--muted); }
.note-draft { font-size: .75rem; color: var(--muted); }

/* chat */
.chat-view { min-height: calc(100vh - var(--tabh) - 40px); }
.chat { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.msg { max-width: 88%; border-radius: 16px; padding: 10px 14px; font-size: .95rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.u { align-self: flex-end; background: var(--brand); color: var(--surface); border-bottom-right-radius: 4px; }
.msg.a { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.a strong { color: var(--brand); }
.msg .refs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; white-space: normal; }
.msg .refs span { font-size: .75rem; border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; color: var(--muted); }
.msg.alert { border-color: var(--err); }
.msg.typing { color: var(--muted); font-style: italic; }
.empty { color: var(--muted); font-size: .92rem; }
.goi-y { display: flex; flex-wrap: wrap; gap: 8px; }
.goi-y button { font: 500 .85rem var(--body); color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; cursor: pointer; text-align: left; }
.composer { position: sticky; bottom: calc(var(--tabh) + 8px + env(safe-area-inset-bottom, 0px)); display: flex; gap: 8px; align-items: flex-end; background: var(--bg); padding-top: 8px; }
.composer textarea { max-height: 140px; }
.send { padding: 12px 16px; }

/* nhật ký */
.entry { display: flex; flex-direction: column; gap: 6px; }
.entry .d { font-size: .8rem; font-weight: 700; color: var(--muted); }
.entry dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: .9rem; }
.entry dt { color: var(--muted); }
.entry dd { margin: 0; }
.ai-note { background: var(--brand-soft); border-radius: 12px; padding: 12px 14px; font-size: .92rem; white-space: pre-wrap; }
.ai-note b { color: var(--brand); }

/* 30 ngày */
.days { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.days button { width: 100%; display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: 500 .92rem var(--body); color: var(--fg); cursor: pointer; }
.days button:disabled { opacity: .5; cursor: default; }
.days .n { font-family: var(--display); font-weight: 700; font-size: 1.1rem; color: var(--brand); text-align: center; font-variant-numeric: tabular-nums; }
.days .s { font-size: .75rem; font-weight: 700; color: var(--ok); }
.days .today { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }

/* bài tự soi */
.quiz { min-height: calc(100vh - 40px); }
.quiz-top { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; }
.quiz-top .icon-btn { position: static; }
.bar { height: 8px; border-radius: 99px; background: var(--brand-soft); overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .25s; }
.quiz-body { display: flex; flex-direction: column; gap: 18px; flex: 1; padding-top: 12px; }
.quiz-q { font-family: var(--display); font-size: 1.45rem; line-height: 1.3; text-wrap: balance; }
.quiz-nhom { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); }
.choices { display: flex; flex-direction: column; gap: 10px; margin-top: auto; padding-bottom: 12px; }
.choice { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--surface); color: var(--fg); border: 1.5px solid var(--line); border-radius: 14px; padding: 15px 16px; font: 600 1rem var(--body); cursor: pointer; }
.choice .dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--muted); flex: none; }
.choice.on { border-color: var(--brand); background: var(--brand-soft); }
.choice.on .dot { border-color: var(--brand); background: var(--brand); }
.insight { background: var(--brand); color: var(--surface); border-radius: 20px; padding: 26px 22px; display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.insight h3 { font-size: 1.5rem; color: var(--surface); }
.insight .src { font-size: .8rem; opacity: .8; }
.insight + .btn, .quiz-body > .btn { margin-top: auto; }
.loading-note { text-align: center; color: var(--muted); padding: 60px 0; }

/* hồ sơ làm cha mẹ */
.scores { display: flex; flex-direction: column; gap: 12px; }
.score { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: .9rem; }
.score b { font-weight: 600; }
.score .v { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .85rem; }
.score .track { grid-column: 1 / -1; height: 8px; border-radius: 99px; background: var(--brand-soft); overflow: hidden; }
.score .track i { display: block; height: 100%; border-radius: 99px; background: var(--brand); }
.score.weak .track i { background: var(--accent); }
.score .delta { color: var(--ok); font-weight: 700; }
.pill { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 2px 9px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); align-self: flex-start; }
.pill.warm { background: var(--accent-soft); color: var(--fg); }
.change { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; border-top: 1px dashed var(--line); }
.change:first-of-type { border-top: 0; padding-top: 0; }
.motto { font-family: var(--display); font-size: 1.25rem; color: var(--brand); text-align: center; text-wrap: balance; }
.mini-profile { display: flex; flex-direction: column; gap: 8px; background: var(--accent-soft); border-radius: 16px; padding: 16px 18px; }
.mini-profile .btn { align-self: flex-start; min-height: 40px; padding: 8px 14px; font-size: .9rem; }
.linkish { background: none; border: 0; padding: 0; color: var(--brand); font: 600 .9rem var(--body); cursor: pointer; text-decoration: underline; align-self: flex-start; }

/* tổng quan – màu biểu đồ (đã kiểm tra bằng bộ validate: tách biệt cho người mù màu, đủ tương phản cả 2 nền)
   lưới 30 ngày = thang tuần tự 1 màu (0/1/2 việc); không khí với con = 2 cực xanh/cam + xám ở giữa, luôn kèm nhãn */
:root { --seq-0: #e6ecec; --seq-1: #9cc3cd; --seq-2: #1f4e5f; --gan: #2a78d6; --cang: #eb6834; --binh: #9aa5a8; }
@media (prefers-color-scheme: dark) { :root { --seq-0: #22333a; --seq-1: #3b6470; --seq-2: #8cc6d6; --gan: #3987e5; --cang: #d95926; --binh: #6d7b80; } }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tile b { font-family: var(--display); font-size: 1.7rem; line-height: 1.1; color: var(--brand); font-variant-numeric: tabular-nums; }
.tile span { font-size: .75rem; color: var(--muted); line-height: 1.3; }
.sec-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.sec-h h3 { font-size: 1.05rem; }
.sec-h small { color: var(--muted); font-size: .78rem; }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.checklist button { width: 100%; display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; font: 500 .92rem var(--body); color: var(--fg); cursor: pointer; }
.checklist .ck { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--muted); display: grid; place-items: center; font-size: .75rem; color: var(--surface); }
.checklist .on .ck { background: var(--ok); border-color: var(--ok); }
.checklist .on .t { color: var(--muted); text-decoration: line-through; }
.checklist .go { color: var(--brand); font-weight: 700; }
.grid30 { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.grid30 button { aspect-ratio: 1; max-width: 100%; border: 0; border-radius: 6px; background: var(--seq-0); font: 600 .62rem var(--body); color: var(--muted); cursor: pointer; padding: 0; position: relative; }
.grid30 .l1 { background: var(--seq-1); color: var(--fg); }
.grid30 .l2 { background: var(--seq-2); color: var(--surface); }
.grid30 .khoa { background: transparent; border: 1.5px dashed var(--line); cursor: default; }
.grid30 .nay { outline: 2px solid var(--accent); outline-offset: 1px; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: .75rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.strip { display: flex; gap: 6px; flex-wrap: wrap; }
.strip .d { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: .62rem; color: var(--muted); width: 30px; }
.strip .d i { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: .62rem; color: #fff; font-weight: 700; }
.strip .gan-gui i { background: var(--gan); } .strip .cang-thang i { background: var(--cang); } .strip .binh-thuong i { background: var(--binh); }
.strip .d.doi i { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ok); }
.ghost-mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--muted); border-radius: 2px; }
.score .track { position: relative; overflow: visible; }
.score .track i { position: relative; }
.empty-viz { background: var(--bg); border: 1px dashed var(--line); border-radius: 12px; padding: 14px; font-size: .88rem; color: var(--muted); }
.commit { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.commit li { display: grid; grid-template-columns: 52px 1fr; gap: 8px; font-size: .9rem; }
.commit li span { color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; padding-top: 2px; }

/* công cụ tặng kèm – màu trạng thái chỉ dùng cho mức Xanh/Vàng/Cam/Đỏ, luôn kèm chữ */
/* 4 mức theo đúng tài liệu; vàng–cam–đỏ gần nhau với người mù màu → mỗi mức luôn kèm chữ + ký hiệu riêng (✓ ! !! ⚠) */
:root { --st-xanh: #1f8a55; --st-vang: #9a7400; --st-cam: #e0661a; --st-do: #a3241c; }
@media (prefers-color-scheme: dark) { :root { --st-xanh: #5cc48e; --st-vang: #e9c13d; --st-cam: #f0843a; --st-do: #ff6b6b; } }
.sub-top { padding-left: 48px; }
.sub-top .back-btn { left: 0; right: auto; }
.tool-card { display: flex; flex-direction: column; gap: 8px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; color: var(--fg); font: inherit; cursor: pointer; width: 100%; }
.tool-card h3 { color: var(--brand); }
.tool-card .meta-row { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: .85rem; color: var(--muted); }
.pdf-link { font-size: .85rem; color: var(--brand); font-weight: 600; }
.chips-f { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.chips-f button { flex: none; font: 600 .8rem var(--body); border: 1.5px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.chips-f button[aria-pressed="true"] { border-color: var(--brand); background: var(--brand); color: var(--surface); }
.toggle-row { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); }
.toggle-row input { width: auto; }
.nhom-cau { display: flex; flex-direction: column; gap: 10px; }
.nhom-cau h3 { font-size: 1.05rem; }
.nhom-cau .doc { font-size: .8rem; color: var(--muted); }
details.khoa-hoc { background: var(--brand-soft); border-radius: 10px; padding: 8px 12px; font-size: .86rem; }
details.khoa-hoc summary { cursor: pointer; font-weight: 700; color: var(--brand); font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; }
details.khoa-hoc p { margin-top: 6px; }
.cau { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 10px 0; border-top: 1px dashed var(--line); }
.cau:first-of-type { border-top: 0; }
.cau .so { font-family: var(--display); font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.cau q { quotes: '“' '”'; font-size: .98rem; }
.cau .phu { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.cau .tag { font-size: .7rem; font-weight: 700; border-radius: 999px; padding: 1px 8px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); }
.cau .note { font-size: .78rem; color: var(--muted); font-style: italic; }
.thu-btn { font: 600 .78rem var(--body); border: 1.5px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 999px; padding: 3px 10px; cursor: pointer; }
.thu-btn.on { border-color: var(--ok); color: var(--ok); }
.tranh { background: var(--accent-soft); border-radius: 10px; padding: 8px 12px; font-size: .86rem; }
.tranh b { color: var(--st-do); }
.cau-hom-nay q { font-family: var(--display); font-size: 1.25rem; line-height: 1.35; color: var(--fg); }
.ck-step { display: flex; flex-direction: column; gap: 10px; }
.ck-step h3 span { font-family: var(--body); font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); display: block; }
details.band { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface); }
details.band[open] { border-color: var(--brand); }
details.band summary { cursor: pointer; font-weight: 700; }
.tick { display: grid; grid-template-columns: 24px 1fr; gap: 8px; align-items: start; padding: 8px 0; font-size: .92rem; border-top: 1px dashed var(--line); cursor: pointer; }
.tick:first-of-type { border-top: 0; }
.tick input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--brand); }
.muc-h { display: flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; margin-top: 8px; }
.muc-h::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: currentColor; }
.muc-vang { color: var(--st-vang); } .muc-cam { color: var(--st-cam); } .muc-do { color: var(--st-do); } .muc-xanh { color: var(--st-xanh); }
.ket-qua { border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 2px solid currentColor; }
.ket-qua .lv { font-family: var(--display); font-size: 1.4rem; }
.ket-qua p, .ket-qua li { color: var(--fg); }
.ket-qua ul { margin: 0; padding-left: 1.1em; font-size: .9rem; }
.sos { background: var(--st-do); color: #fff; border-radius: 12px; padding: 12px 14px; font-weight: 600; }
.lich-su { width: 100%; border-collapse: collapse; font-size: .85rem; }
.lich-su td, .lich-su th { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: left; }
.lich-su th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.lv-pill { font-weight: 700; }
.so-sanh { width: 100%; border-collapse: collapse; font-size: .84rem; }
.so-sanh th, .so-sanh td { padding: 6px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
.so-sanh th { font-size: .72rem; text-transform: uppercase; color: var(--muted); }

/* sách nói */
.mini { position: fixed; left: 0; right: 0; bottom: calc(var(--tabh) + env(safe-area-inset-bottom, 0px)); z-index: 6; display: flex; align-items: center; gap: 6px; background: var(--brand); color: var(--surface); padding: 8px max(10px, env(safe-area-inset-right, 0px)) 8px max(10px, env(safe-area-inset-left, 0px)); }
.mini-bar { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: rgba(255,255,255,.25); }
.mini-bar i { display: block; height: 100%; width: 0; background: var(--accent); }
.mini button { background: none; border: 0; color: inherit; font: 700 .8rem var(--body); cursor: pointer; padding: 6px; }
.mini-play { width: 38px; height: 38px; border-radius: 50%; background: var(--surface) !important; color: var(--brand) !important; font-size: 1rem !important; flex: none; }
.mini-info { flex: 1; min-width: 0; text-align: left; display: flex; flex-direction: column; }
.mini-info b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .85rem; }
.mini-info span { font-size: .72rem; opacity: .85; font-weight: 500; font-variant-numeric: tabular-nums; }
.mini-btn { flex: none; min-width: 34px; }
body.co-mini .app { padding-bottom: calc(var(--tabh) + 90px + env(safe-area-inset-bottom, 0px)); }
body.co-mini .composer { bottom: calc(var(--tabh) + 66px + env(safe-area-inset-bottom, 0px)); }
.sn-chuong { font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.track { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; width: 100%; text-align: left; background: none; border: 0; border-top: 1px dashed var(--line); padding: 10px 0; color: var(--fg); font: 500 .92rem var(--body); cursor: pointer; }
.track .ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-size: .8rem; }
.track.dang .ic { background: var(--brand); color: var(--surface); }
.track.xong .ic { background: var(--ok); color: var(--surface); }
.track .tg { font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.track .tien { display: block; height: 3px; border-radius: 3px; background: var(--seq-0); margin-top: 5px; overflow: hidden; }
.track .tien i { display: block; height: 100%; background: var(--brand); }
.nghe-btn { display: flex; align-items: center; gap: 10px; }
.sn-tabs { display: flex; gap: 6px; }
body.o-sach-noi .mini { display: none; }
body.o-sach-noi.co-mini .app { padding-bottom: calc(var(--tabh) + 24px + env(safe-area-inset-bottom, 0px)); }
.now { display: flex; flex-direction: column; gap: 8px; background: var(--brand); color: var(--surface); border: 0; }
.now h3 { color: var(--surface); font-size: 1.25rem; }
.now .hint { color: var(--surface); opacity: .8; }
.now .pill { align-self: flex-start; }
.now input[type=range] { width: 100%; padding: 0; border: 0; background: transparent; accent-color: var(--accent); height: 28px; }
.np-tg { display: flex; justify-content: space-between; font-size: .78rem; font-variant-numeric: tabular-nums; opacity: .9; }
.np-ctl { display: flex; justify-content: center; align-items: center; gap: 22px; }
.np-ctl button { background: none; border: 0; color: inherit; font: 700 .95rem var(--body); cursor: pointer; min-width: 48px; min-height: 48px; }
.np-ctl .np-big { width: 64px; height: 64px; border-radius: 50%; background: var(--surface); color: var(--brand); font-size: 1.4rem; }
.np-row { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.chip-btn { font: 600 .8rem var(--body); border: 1.5px solid rgba(255,255,255,.5); background: transparent; color: inherit; border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.card .tool-card { background: var(--bg); padding: 14px; }
.card .tool-card h3 { font-size: 1rem; }

/* thanh tab */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; background: var(--surface); border-top: 1px solid var(--line); padding: 0 max(8px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(8px, env(safe-area-inset-left, 0px)); z-index: 5; }
.tabs button { flex: 1; min-width: 0; max-width: 130px; height: var(--tabh); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; background: none; color: var(--muted); font: 600 .68rem var(--body); cursor: pointer; white-space: nowrap; letter-spacing: -.01em; }
.tabs button[aria-current="page"] { color: var(--brand); }
@media (prefers-reduced-motion: no-preference) { .msg { animation: in .18s ease-out; } @keyframes in { from { opacity: .3; transform: translateY(4px); } } }
