:root {
  --nen: #fbf7f6; --the: #ffffff; --chu: #2a2124; --phu: #5e5156; --vien: #ecdfe2; --mem: #f8eaee;
  --chinh: #a63d63; --chinh-dam: #85304f; --tren-chinh: #ffffff; --vang: #b07a12; --vang-mem: #fbf1dc;
  --do: #b3261e; --xanh: #2b7a4b; --bong: 0 1px 3px rgba(20,40,40,.08);
  --cau-a: #a63d63; --cau-b: #6a4c93; --vung: rgba(166,61,99,.16);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --nen: #1a1517; --the: #251d20; --chu: #f6eef0; --phu: #c9b8bd; --vien: #3d3034; --mem: #33262b;
    --chinh: #f29bbb; --chinh-dam: #f8bfd3; --tren-chinh: #3a0f20; --vang: #e8b75a; --vang-mem: #3a2f19;
    --do: #ff8a80; --xanh: #7fd3a1; --bong: none; --cau-a: #6e2843; --cau-b: #3f2d5c; --vung: rgba(242,155,187,.18);
  }
}
:root[data-theme="dark"] {
  --nen: #1a1517; --the: #251d20; --chu: #f6eef0; --phu: #c9b8bd; --vien: #3d3034; --mem: #33262b;
  --chinh: #f29bbb; --chinh-dam: #f8bfd3; --tren-chinh: #3a0f20; --vang: #e8b75a; --vang-mem: #3a2f19;
  --do: #ff8a80; --xanh: #7fd3a1; --bong: none; --cau-a: #6e2843; --cau-b: #3f2d5c; --vung: rgba(242,155,187,.18);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--nen); color: var(--chu); }
body { font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; padding-bottom: calc(72px + env(safe-area-inset-bottom)); -webkit-tap-highlight-color: transparent; }
a { color: var(--chinh-dam); }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }

.dau { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: calc(8px + env(safe-area-inset-top)) 14px 8px; background: color-mix(in srgb, var(--nen) 92%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--vien); }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; text-decoration: none; color: var(--chu); letter-spacing: -.01em; }
.logo img { width: 30px; height: 30px; border-radius: 8px; }
.dau-phai { display: flex; gap: 4px; align-items: center; }
.nut-tron { position: relative; border: 0; background: transparent; width: 40px; height: 40px; border-radius: 50%; font-size: 1.15rem; cursor: pointer; }
.nut-tron:hover { background: var(--mem); }
.cham-do { position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--do); color: #fff; font-size: .7rem; font-weight: 700; line-height: 18px; }
.nut-nn { border: 1px solid var(--vien); background: var(--the); border-radius: 999px; padding: 4px 10px; font-size: .8rem; font-weight: 700; cursor: pointer; }

main { max-width: 600px; margin: 0 auto; padding: 14px 14px 24px; }
h1 { font-size: 1.45rem; line-height: 1.25; margin: 6px 0 12px; }
h2 { font-size: 1.1rem; margin: 22px 0 10px; }
.phu { color: var(--phu); }
.nho { font-size: .86rem; }

.the { background: var(--the); border: 1px solid var(--vien); border-radius: 16px; padding: 16px; box-shadow: var(--bong); margin-bottom: 12px; }
.hang { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.gian { justify-content: space-between; }
.cot2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cot3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.nut { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 16px; border-radius: 12px;
  border: 1px solid var(--vien); background: var(--the); cursor: pointer; font-weight: 600; text-decoration: none; color: var(--chu); }
.nut:hover { border-color: var(--chinh); }
.nut.chinh { background: var(--chinh); border-color: var(--chinh); color: var(--tren-chinh); }
.nut.chinh:hover { background: var(--chinh-dam); }
.nut.nhe { border-color: transparent; background: var(--mem); }
.nut.do { color: var(--do); }
.nut.rong { width: 100%; }
.nut.nho { min-height: 34px; padding: 4px 10px; font-size: .85rem; border-radius: 10px; }
.nut:disabled { opacity: .5; cursor: default; }

label { display: block; font-weight: 600; margin: 12px 0 4px; }
input[type=text], input[type=tel], input[type=email], input[type=password], input[type=date], input[type=time], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--vien); border-radius: 12px; background: var(--the); }
textarea { resize: vertical; min-height: 80px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--chinh); outline-offset: 1px; }
.o-tick { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 10px 0; }
.o-tick input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.bao-loi { color: var(--do); font-weight: 600; min-height: 1.2em; margin: 8px 0; }

/* Thanh dưới */
.thanh-duoi { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--the); border-top: 1px solid var(--vien); padding-bottom: env(safe-area-inset-bottom); }
.thanh-duoi a { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 2px 7px; text-decoration: none; color: var(--phu); font-size: .72rem; font-weight: 600; }
.thanh-duoi a span:first-child { font-size: 1.3rem; line-height: 1.2; }
.thanh-duoi .ic-nav { display: grid; place-items: center; width: 44px; height: 28px; border-radius: 999px; transition: background .2s; }
.thanh-duoi .ic-nav svg { width: 22px; height: 22px; }
.thanh-duoi a.dang .ic-nav { background: var(--vung); }
.thanh-duoi a.dang .ic-nav svg { stroke-width: 2.4; }
.thanh-duoi a.dang { color: var(--chinh); }

/* Câu ngày */
.cau { position: relative; border-radius: 20px; padding: 22px 20px 18px; color: #fff; overflow: hidden;
  background: linear-gradient(140deg, var(--cau-a), var(--cau-b)); box-shadow: var(--bong); margin-bottom: 12px; }
.cau::after { content: "“"; position: absolute; right: 14px; top: -18px; font: 900 7rem/1 "Noto Serif", "Times New Roman", serif; opacity: .14; }
.cau .nhan { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; opacity: .85; font-weight: 700; }
.cau .en { font: 600 1.28rem/1.42 "Noto Serif", "Times New Roman", serif; margin: 10px 0 8px; }
.cau .vi { opacity: .92; }
.cau .nguon { font-size: .78rem; opacity: .7; margin-top: 8px; }
.cau .hang { margin-top: 14px; }
.cau .nut { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.3); color: #fff; min-height: 38px; padding: 6px 12px; }
.cau .nut:hover { background: rgba(255,255,255,.26); }

.so-lieu { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.so-lieu div { background: var(--the); border: 1px solid var(--vien); border-radius: 14px; padding: 10px; text-align: center; }
.so-lieu b { display: block; font-size: 1.35rem; }
.so-lieu span { font-size: .78rem; color: var(--phu); }

/* Cộng đồng */
.tab-nhom { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; scrollbar-width: none; }
.tab-nhom button { flex: none; border: 1px solid var(--vien); background: var(--the); border-radius: 999px; padding: 6px 14px; cursor: pointer; font-weight: 600; font-size: .88rem; }
.tab-nhom button.dang { background: var(--chinh); border-color: var(--chinh); color: var(--tren-chinh); }
.soan textarea { min-height: 70px; border: 0; padding: 4px 0; background: transparent; }
.soan textarea:focus { outline: 0; }
.xem-truoc-anh { position: relative; margin-top: 8px; }
.xem-truoc-anh img { border-radius: 12px; max-height: 260px; }
.xem-truoc-anh button { position: absolute; top: 6px; left: 6px; }
.bai .dau-bai { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.anh-dd { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; flex: none; text-decoration: none; }
.bai .ten { font-weight: 700; color: var(--chu); text-decoration: none; }
.bai .meta { font-size: .78rem; color: var(--phu); }
.bai .noi-dung { white-space: pre-wrap; overflow-wrap: anywhere; }
.bai .anh { margin-top: 10px; border-radius: 12px; width: 100%; max-height: 520px; object-fit: cover; background: var(--mem); }
.bai audio { width: 100%; margin-top: 10px; }
.ghim { color: var(--vang); font-weight: 700; font-size: .78rem; }
.nhan-nhom { display: inline-block; background: var(--mem); color: var(--chinh-dam); border-radius: 999px; padding: 0 8px; font-size: .72rem; font-weight: 700; }
.cam-xuc { display: flex; gap: 6px; margin-top: 10px; border-top: 1px solid var(--vien); padding-top: 8px; flex-wrap: wrap; }
.cam-xuc button, .cam-xuc a { border: 0; background: transparent; border-radius: 10px; padding: 6px 10px; cursor: pointer; color: var(--phu); font-weight: 600; text-decoration: none; font-size: .9rem; }
.cam-xuc button:hover, .cam-xuc a:hover { background: var(--mem); }
.cam-xuc button.chon { color: var(--chinh-dam); background: var(--mem); }
.menu-bai { margin-left: auto; position: relative; }
.binh-luan { display: flex; gap: 8px; margin-top: 12px; }
.binh-luan .bong { background: var(--mem); border-radius: 14px; padding: 8px 12px; flex: 1; }
.binh-luan .bong b { font-size: .88rem; }
.binh-luan .bong p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.anh-dd.nho { width: 32px; height: 32px; font-size: .8rem; }
.ghi-am { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.dang-ghi { color: var(--do); font-weight: 700; animation: nhap 1s infinite; }
@keyframes nhap { 50% { opacity: .4; } }

.thanh-tien-do { height: 8px; border-radius: 4px; background: var(--mem); overflow: hidden; }
.thanh-tien-do i { display: block; height: 100%; background: var(--chinh); }

.bang-qt { width: 100%; border-collapse: collapse; font-size: .88rem; }
.bang-qt td, .bang-qt th { border-bottom: 1px solid var(--vien); padding: 8px 6px; text-align: left; vertical-align: top; }
.tb { display: block; padding: 10px 0; border-bottom: 1px solid var(--vien); text-decoration: none; color: var(--chu); }
.tb.moi { font-weight: 700; }

.thong-diep { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60;
  background: var(--chu); color: var(--nen); padding: 10px 16px; border-radius: 12px; font-weight: 600; max-width: 92vw; box-shadow: 0 4px 16px rgba(0,0,0,.2); }
.trong { text-align: center; color: var(--phu); padding: 30px 10px; }
.cong-tac { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--vien); }
.trinh-phat audio { width: 100%; margin-top: 8px; }
.nut.nhe.chinh { background: var(--chinh); color: var(--tren-chinh); }

/* ===== Trang chủ: câu nói trên ảnh phong cảnh tràn màn hình ===== */
body.o-trang-chu { overflow: hidden; }
body.o-trang-chu .dau { background: linear-gradient(rgba(0,0,0,.35), transparent); border-bottom: 0; backdrop-filter: none; }
body.o-trang-chu .logo { color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.5); }
body.o-trang-chu .nut-nn { background: rgba(255,255,255,.18); color: #fff; border-color: rgba(255,255,255,.4); }
body.o-trang-chu .nut-tron { color: #fff; }
.trang-cau { position: fixed; inset: 0; z-index: 1; overflow: hidden; background: #3a2230; touch-action: pan-y; user-select: none; }
.lop-anh { position: absolute; inset: 0; background: center / cover no-repeat; opacity: 0; transform: scale(1.04); transition: opacity .8s ease, transform 8s ease-out; }
.lop-anh.hien { opacity: 1; transform: scale(1); }
.trang-cau::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 95% 42% at 50% 44%, rgba(0,0,0,.42), rgba(0,0,0,.12) 70%, rgba(0,0,0,.25)); }
/* Câu nói đứng giữa, hơi cao hơn tâm màn hình (44%) cho vừa tầm mắt khi cầm điện thoại. */
.lop-chu { position: absolute; z-index: 2; left: 0; right: 0; top: 44%; transform: translateY(-50%); margin: 0 auto; max-width: 640px;
  padding: 0 28px; border: 0; background: none; text-align: center; color: #fff; cursor: pointer; text-shadow: 0 2px 10px rgba(0,0,0,.55); }
.lop-chu .vi { display: block; font: 600 clamp(1.4rem, 5.6vw, 2.1rem)/1.42 "Noto Serif", "Times New Roman", serif; }
.lop-chu .en { display: block; margin-top: 12px; font-size: clamp(.92rem, 3.6vw, 1.08rem); line-height: 1.5; opacity: .85; font-style: italic; }
.lop-chu.vao { animation: chu-vao .55s ease both; }
@keyframes chu-vao { from { opacity: 0; transform: translate(var(--tu, 0), -50%); } to { opacity: 1; transform: translate(0, -50%); } }
.goi-y-vuot { position: absolute; z-index: 2; left: 0; right: 0; bottom: calc(76px + env(safe-area-inset-bottom)); text-align: center;
  color: rgba(255,255,255,.75); font-size: .8rem; animation: nhap 2.4s ease-in-out 3; }
@media (prefers-reduced-motion: reduce) { .lop-anh { transition: none; transform: none; } .lop-chu.vao { animation: none; } }

.thanh-tien-do.sang { background: rgba(255,255,255,.28); margin: 10px 0 6px; }
.thanh-tien-do.sang i { background: #fff; }

/* ===== Mẹ & Bé ===== */
.quay-lai { display: inline-block; margin-bottom: 2px; }
.mien-tru { font-size: .78rem; color: var(--phu); text-align: center; margin: 22px 8px 0; }
.chao h1 { margin-top: 0; }
.the-thai { display: block; position: relative; border-radius: 20px; padding: 18px 18px 16px; color: #fff; text-decoration: none; margin-bottom: 12px;
  background: linear-gradient(140deg, var(--cau-a), var(--cau-b)); box-shadow: var(--bong); }
.the-thai .nhan { font-size: .78rem; font-weight: 700; opacity: .9; }
.the-thai .so-to { font: 700 2.1rem/1.2 "Noto Serif", "Times New Roman", serif; margin-top: 6px; }
.the-thai .so-to small { font-size: 1.1rem; opacity: .9; }
.the-thai.tinh .so-to { font-size: 1.45rem; }
.the-thai .trai-cay { margin-top: 8px; font-size: .92rem; }
.so-to { font: 700 1.7rem/1.25 "Noto Serif", "Times New Roman", serif; }
.dong-nho { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--chu); padding: 12px 14px; }
.dong-nho .i { font-size: 1.5rem; flex: none; }
.dong-nho > span:nth-child(2) { flex: 1; min-width: 0; }
.dong-nho.canh-bao { border-color: color-mix(in srgb, var(--do) 45%, var(--vien)); }
.luoi-cc { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.cc { display: flex; gap: 10px; align-items: center; background: var(--the); border: 1px solid var(--vien); border-radius: 14px; padding: 12px; text-decoration: none; color: var(--chu); font-weight: 600; font-size: .9rem; line-height: 1.3; min-height: 60px; }
.cc .i { font-size: 1.45rem; flex: none; }
.cc:hover { border-color: var(--chinh); }
.the-be .ten-be { font-size: 1.15rem; }
.cuu-bu { margin: 10px 0; padding: 10px 12px; background: var(--mem); border-radius: 12px; font-size: .92rem; }
.the-do { background: var(--do); color: #fff; border-radius: 999px; padding: 0 8px; font-size: .75rem; font-weight: 700; }
.nut-nhanh { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.nut-nhanh a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border-radius: 12px; background: var(--mem); text-decoration: none; color: var(--chu); font-size: .78rem; font-weight: 600; }
.nut-nhanh a span { font-size: 1.4rem; }
.hom-nay-be { margin-top: 10px; color: var(--phu); }
.tab-nhom a { flex: none; border: 1px solid var(--vien); background: var(--the); border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: .88rem; text-decoration: none; color: var(--chu); }
.tab-nhom a.dang { background: var(--chinh); border-color: var(--chinh); color: var(--tren-chinh); }
.tab-nhom.nho-tab button { padding: 5px 12px; font-size: .84rem; }
.ket-qua { border-color: var(--chinh); }
.luoi-tuan { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.luoi-tuan a { background: var(--the); border: 1px solid var(--vien); border-radius: 12px; padding: 8px 4px; text-align: center; text-decoration: none; color: var(--chu); font-size: .72rem; line-height: 1.25; }
.luoi-tuan b { display: block; font-size: 1.15rem; color: var(--chinh-dam); }
.nhan-tt { font-size: .74rem; font-weight: 700; border-radius: 999px; padding: 1px 8px; background: var(--mem); color: var(--chinh-dam); white-space: nowrap; }
.moc.xong { opacity: .75; }
.moc.xong .nhan-tt { background: color-mix(in srgb, var(--xanh) 20%, transparent); color: var(--xanh); }
.moc.dang { border-color: var(--chinh); border-width: 2px; }
.moc.dang .nhan-tt { background: var(--chinh); color: var(--tren-chinh); }
.moc.qua .nhan-tt { background: var(--vang-mem); color: var(--vang); }
.dem-to { text-align: center; }
.so-khong-lo { font: 800 4.2rem/1 "Noto Serif", "Times New Roman", serif; color: var(--chinh); }
.nut-tron-lon { width: 190px; height: 190px; border-radius: 50%; border: 0; margin: 14px auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--chinh) 70%, #fff), var(--chinh)); color: #fff; font-size: 3rem; cursor: pointer; box-shadow: 0 8px 24px rgba(166,61,99,.35); }
.nut-tron-lon span { font-size: .95rem; font-weight: 700; }
.nut-tron-lon:active { transform: scale(.96); }
.nut-tron-lon.dang-go { background: radial-gradient(circle at 35% 30%, #f08080, #b3261e); animation: nhap 1.6s infinite; }
.canh-bao { border-color: var(--do); border-width: 2px; background: color-mix(in srgb, var(--do) 7%, var(--the)); }
.canh-bao-nhe { background: var(--vang-mem); border-color: transparent; }
.dong-ls { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--vien); font-size: .9rem; }
.dong-ls:last-child { border-bottom: 0; }
.dong-ls.dau-bang { font-size: .78rem; color: var(--phu); font-weight: 700; }
.bieu-do { width: 100%; height: auto; display: block; }
.bieu-do text { font-size: 10px; fill: var(--phu); }
.bieu-do .luoi { stroke: var(--vien); stroke-width: 1; }
.bieu-do .vung { stroke: none; }
.bieu-do .nhan-duong { font-size: 9px; font-weight: 700; }
.bieu-do .cham-be { fill: #e8789c; stroke: #fff; stroke-width: 1.5; }
.bieu-do .duong-be { stroke: #e8789c; stroke-width: 2; }
.dong-tick { margin: 6px 0; }
.dong-tick input:checked + span { text-decoration: line-through; color: var(--phu); }
.luoi-ghi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.luoi-ghi button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 4px; border-radius: 14px; border: 1px solid var(--vien); background: var(--the); cursor: pointer; font-weight: 600; font-size: .85rem; }
.luoi-ghi button span { font-size: 1.6rem; }
.tong-ngay { margin-top: 8px; text-align: center; }
.tong-ngay > div { background: var(--mem); border-radius: 12px; padding: 8px 4px; }
.tong-ngay b { display: block; font-size: 1.05rem; }
.tong-ngay span { font-size: .74rem; color: var(--phu); }
.dang-do { border: 2px solid var(--chinh); }
.so-dong-ho { font: 700 1.05rem ui-monospace, Consolas, monospace; color: var(--chinh-dam); }
.dong-nk { display: grid; grid-template-columns: 52px auto 1fr; gap: 8px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--vien); background: none; padding: 10px 0; cursor: pointer; font-size: .92rem; align-items: center; }
.dong-nk:last-child { border-bottom: 0; }
.dong-nk .gio { font-weight: 700; font-variant-numeric: tabular-nums; }
.dong-nk .phu { text-align: right; font-size: .85rem; }
.chon-o { position: relative; margin: 0; font-weight: 600; text-align: center; }
.chon-o input { position: absolute; opacity: 0; }
.chon-o span { display: block; border: 1px solid var(--vien); border-radius: 12px; padding: 10px 4px; cursor: pointer; }
.chon-o input:checked + span { border: 2px solid var(--chinh); background: var(--mem); }
.chon-o input:focus-visible + span { outline: 2px solid var(--chinh); }
.dong-tiem { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--vien); }
.dong-tiem:last-child { border-bottom: 0; }
.o-tron { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--vien); background: var(--the); flex: none; cursor: pointer; font-weight: 800; color: #fff; }
.dong-tiem.xong .o-tron { background: var(--xanh); border-color: var(--xanh); }
.dong-tiem.qua { background: color-mix(in srgb, var(--vang) 8%, transparent); }
.dong-tiem.toi .o-tron { border-color: var(--chinh); }
.nhan-loai { font-size: .68rem; font-weight: 800; border-radius: 6px; padding: 0 5px; vertical-align: middle; }
.nhan-loai.tcmr { background: color-mix(in srgb, var(--xanh) 18%, transparent); color: var(--xanh); }
.nhan-loai.dich-vu { background: var(--mem); color: var(--chinh-dam); }
.moc-thang summary { cursor: pointer; }
.goi-115 { background: var(--do); border-color: var(--do); color: #fff; font-size: 1.05rem; margin-bottom: 12px; }
.dau-hieu { padding: 12px 14px; }
.dau-hieu.cap-cuu { border-left: 5px solid var(--do); }
.dau-hieu.kham-som { border-left: 5px solid var(--vang); }

/* Nhắc lịch */
.lieu { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--vien); }
.lieu:last-child { border-bottom: 0; }
.lieu .gio { font-weight: 800; font-variant-numeric: tabular-nums; width: 48px; flex: none; }
.lieu.xong > span:nth-child(2) { color: var(--phu); text-decoration: line-through; }
.lieu.tre .gio { color: var(--do); }
.nhac.tat { opacity: .55; }
.gio-nhac { font: 700 1.1rem ui-monospace, Consolas, monospace; color: var(--chinh-dam); margin: 2px 0; }
.cong-tac-nho { position: relative; width: 46px; height: 26px; flex: none; margin: 0; }
.cong-tac-nho input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.cong-tac-nho span { position: absolute; inset: 0; border-radius: 13px; background: var(--vien); transition: background .2s; }
.cong-tac-nho span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.cong-tac-nho input:checked + span { background: var(--chinh); }
.cong-tac-nho input:checked + span::after { transform: translateX(20px); }
.cong-tac-nho input:focus-visible + span { outline: 2px solid var(--chinh); outline-offset: 2px; }
.chip-loai { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-loai button, .o-thu { border: 1px solid var(--vien); background: var(--the); border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: .85rem; font-weight: 600; color: var(--chu); }
.chip-loai button.dang, .o-thu.dang { background: var(--chinh); border-color: var(--chinh); color: var(--tren-chinh); }
.o-thu { padding: 6px 10px; min-width: 44px; }
.o-gio { display: inline-flex; align-items: center; gap: 2px; }
.o-gio input { width: 142px; }
.o-gio button { border: 0; background: none; color: var(--phu); cursor: pointer; font-size: 1rem; padding: 4px; }
.cach-deu { margin-top: 8px; }
.cach-deu input, .cach-deu select { width: auto; padding: 6px 8px; }
.the-push { border-color: var(--chinh); }

/* Hộp thoại */
.nen-hop { position: fixed; inset: 0; z-index: 40; background: rgba(20,10,15,.45); display: flex; align-items: flex-end; justify-content: center; animation: mo .2s ease; }
.hop { background: var(--the); width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; border-radius: 20px 20px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
@media (min-width: 640px) { .nen-hop { align-items: center; } .hop { border-radius: 20px; } }
@keyframes mo { from { opacity: 0; } to { opacity: 1; } }

/* ================= Học viện kiểu Skool ================= */
.ic { width: 1.15em; height: 1.15em; vertical-align: -.2em; flex: none; }
.ic.to { width: 2.2rem; height: 2.2rem; color: var(--chinh); }
.ic.mo { opacity: .55; }
.thanh-cd { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: -4px -14px 12px; padding: 4px 14px 8px; border-bottom: 1px solid var(--vien); }
.thanh-cd a { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; text-decoration: none; color: var(--phu); font-weight: 600; font-size: .88rem; }
.thanh-cd a:hover { color: var(--chu); background: var(--mem); }
.thanh-cd a.dang { background: var(--chu); color: var(--nen); }
.thanh-cd a.goi { color: var(--vang); }
.thanh-cd a.goi.dang { background: var(--vang); color: #fff; }
.luoi-khoa { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 12px; }
.the-khoa { display: flex; flex-direction: column; background: var(--the); border: 1px solid var(--vien); border-radius: 16px; overflow: hidden; text-decoration: none; color: var(--chu); box-shadow: var(--bong); transition: transform .15s; }
.the-khoa:hover { transform: translateY(-2px); border-color: var(--chinh); }
.the-khoa h3 { margin: 0 0 4px; font-size: 1.02rem; line-height: 1.3; }
.than-khoa { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.bi-khoa .bia img { filter: grayscale(.6) brightness(.85); }
.bia { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--mau, var(--chinh)), color-mix(in srgb, var(--mau, var(--chinh)) 35%, #f7d6c7)); overflow: hidden; }
.bia img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bia.trong::after { content: "🌸"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.4rem; opacity: .85; }
.nhan-bia { position: absolute; left: 10px; top: 10px; background: rgba(0,0,0,.6); color: #fff; font-size: .75rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; display: inline-flex; gap: 4px; align-items: center; }
.khoa-bia { position: absolute; right: 10px; top: 10px; background: rgba(0,0,0,.6); color: #fff; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; }
.mo-ta-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.tien-do { height: 8px; background: var(--mem); border-radius: 999px; overflow: hidden; margin-top: 4px; }
.tien-do i { display: block; height: 100%; background: linear-gradient(90deg, var(--chinh), var(--vang)); border-radius: 999px; transition: width .4s; }
.ly-do { font-size: .85rem; font-weight: 600; color: var(--phu); display: flex; gap: 6px; align-items: center; }
.dat { color: var(--xanh); font-weight: 600; }
.dau-khoa { display: grid; grid-template-columns: 140px 1fr; gap: 14px; align-items: center; margin: 10px 0; }
.dau-khoa .bia { border-radius: 12px; }
.dau-khoa h1 { margin: 0 0 4px; font-size: 1.3rem; }
@media (max-width: 420px) { .dau-khoa { grid-template-columns: 1fr; } }
.noi-bat { background: linear-gradient(135deg, var(--vung), var(--vang-mem)); border-color: color-mix(in srgb, var(--chinh) 30%, var(--vien)); }
.canh-bao-khoa { border-style: dashed; }
.module h2 { font-size: 1.02rem; margin: 0 0 6px; }
.dong-bai { display: flex; align-items: center; gap: 10px; padding: 10px 6px; border-top: 1px solid var(--vien); text-decoration: none; color: var(--chu); }
.module h2 + .dong-bai, .module .hang + .dong-bai { border-top: 0; }
.dong-bai > span { flex: 1; min-width: 0; }
a.dong-bai:hover { background: var(--mem); border-radius: 10px; }
.dong-bai.da-xong > .ic:first-child { color: var(--xanh); }
.dong-bai.bi-khoa { color: var(--phu); }
.khung-video { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; margin-bottom: 12px; }
.khung-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.van-ban { line-height: 1.65; font-size: 1.02rem; }
.van-ban ul { padding-left: 1.2em; }
.van-ban li { margin: 4px 0; }
/* Cấp độ */
.anh-cap { position: relative; display: inline-flex; flex: none; }
.anh-cap.lon .anh-dd { width: 64px; height: 64px; font-size: 1.6rem; }
.cap-so { position: absolute; right: -4px; bottom: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--chinh); color: var(--tren-chinh);
  font: 800 .7rem/20px system-ui, sans-serif; text-align: center; border: 2px solid var(--the); }
.dong-cap .cap-so, .hang > .cap-so { position: static; border: 0; }
.cap-so.c1, .cap-so.c2 { background: #6f8a82; color: #fff; }
.cap-so.c3, .cap-so.c4 { background: #3f8a58; color: #fff; }
.cap-so.c5, .cap-so.c6 { background: #a63d63; color: #fff; }
.cap-so.c7, .cap-so.c8, .cap-so.c9 { background: #9a6a0e; color: #fff; }
.cham-on { position: absolute; left: 0; bottom: 0; width: 12px; height: 12px; border-radius: 50%; background: #2fb36b; border: 2px solid var(--the); }
.cham-on.tinh { position: static; display: inline-block; vertical-align: middle; }
.the-cap { display: flex; gap: 16px; align-items: center; }
.cap-ten { color: var(--chinh-dam); font-weight: 700; margin: 2px 0; }
.luoi-cap { display: grid; gap: 2px; }
.dong-cap { display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-radius: 10px; }
.dong-cap > span:nth-child(2) { flex: 1; }
.dong-cap.dang { background: var(--vung); }
.dong-hang { display: flex; align-items: center; gap: 10px; padding: 8px 4px; text-decoration: none; color: var(--chu); border-top: 1px solid var(--vien); }
.dong-hang:first-child { border-top: 0; }
.dong-hang.toi { background: var(--vung); border-radius: 10px; }
.hang-so { width: 28px; text-align: center; font-weight: 800; color: var(--phu); flex: none; }
.huy-hieu { color: var(--vang); display: inline-flex; align-items: center; gap: 3px; font-size: .82rem; font-weight: 700; }
/* Thành viên */
.thanh-vien { display: flex; gap: 12px; align-items: flex-start; text-decoration: none; color: var(--chu); padding: 12px 14px; }
.thanh-vien .dong { display: block; margin-top: 2px; }
.chip { display: inline-block; border: 1px solid var(--vien); background: var(--the); border-radius: 999px; padding: 4px 10px; font-size: .85rem; text-decoration: none; color: var(--chu); }
/* Bản đồ */
.ban-do { border-radius: 16px; overflow: hidden; border: 1px solid var(--vien); margin: 10px 0; background: var(--mem); }
.bd-svg { display: block; width: 100%; height: auto; max-height: 72vh; }
.bd-bien { fill: color-mix(in srgb, #9fc9dc 32%, var(--nen)); }
.bd-dat { fill: var(--the); stroke: color-mix(in srgb, var(--chinh) 45%, var(--vien)); stroke-width: 1.2; stroke-linejoin: round; }
.bd-ten-bien { font: italic 600 15px system-ui, sans-serif; fill: color-mix(in srgb, #2d6c8a 70%, var(--chu)); letter-spacing: .12em; }
.bd-dao circle { fill: color-mix(in srgb, var(--chinh) 55%, var(--chu)); }
.bd-dao text { font: 600 10.5px system-ui, sans-serif; fill: var(--chu); }
.bd-cham { cursor: pointer; outline: none; }
.bd-cham circle { fill: var(--chinh); fill-opacity: .85; stroke: #fff; stroke-width: 2; }
.bd-cham:hover circle, .bd-cham:focus-visible circle, .bd-cham.chon circle { fill-opacity: 1; stroke: var(--vang); stroke-width: 3; }
.bd-cham text { font: 800 11px system-ui, sans-serif; fill: var(--tren-chinh); pointer-events: none; }
/* Lịch */
.luoi-lich { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 10px; text-align: center; }
.luoi-lich .thu { font-size: .75rem; font-weight: 700; color: var(--phu); padding: 4px 0; }
.o-ngay { position: relative; aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px; text-decoration: none; color: var(--chu); font-weight: 600; font-size: .9rem; }
.o-ngay:hover { background: var(--mem); }
.o-ngay.hom-nay { outline: 2px solid var(--chinh); }
.o-ngay.co { background: var(--vung); }
.o-ngay.chon { background: var(--chinh); color: var(--tren-chinh); }
.o-ngay i { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); width: 6px; height: 6px; border-radius: 999px; background: var(--chinh); font-size: 0; }
.o-ngay.chon i { background: var(--tren-chinh); }
.su-kien { display: flex; gap: 12px; align-items: flex-start; }
.ngay-sk { flex: none; width: 52px; border-radius: 12px; background: var(--vung); text-align: center; padding: 6px 0; display: flex; flex-direction: column; }
.ngay-sk b { font-size: 1.35rem; line-height: 1.1; color: var(--chinh-dam); }
.ngay-sk span { font-size: .72rem; color: var(--phu); font-weight: 700; }
/* Gói */
.the-goi { border: 2px solid color-mix(in srgb, var(--vang) 55%, var(--vien)); background: linear-gradient(160deg, var(--vang-mem), var(--the) 55%); }
.goi-dau { display: flex; gap: 12px; align-items: center; }
.goi-dau .ic { color: var(--vang); }
.goi-dau h1 { margin: 0; }
.gia { font-size: 1.5rem; font-weight: 800; }
.quyen-loi { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 6px; }
.quyen-loi .ic { color: var(--xanh); }
.o-qr { text-align: center; }
.o-qr img { width: min(260px, 80vw); height: auto; border-radius: 12px; background: #fff; padding: 6px; border: 1px solid var(--vien); }
.bang-ck { margin: 10px auto; border-collapse: collapse; text-align: left; font-size: .92rem; }
.bang-ck td { padding: 6px 8px; border-bottom: 1px solid var(--vien); vertical-align: top; }
.ma-don { font: 800 1.1rem ui-monospace, monospace; letter-spacing: .08em; color: var(--chinh-dam); }
/* Chứng nhận */
.chung-nhan { background: #fffaf3; color: #3a2a2e; border-radius: 18px; padding: 14px; box-shadow: var(--bong); }
.cn-vien { border: 3px double #c9a24a; border-radius: 12px; padding: 28px 18px; text-align: center; display: grid; gap: 8px;
  background: radial-gradient(circle at 50% 0%, rgba(201,162,74,.14), transparent 60%); }
.cn-logo { display: flex; justify-content: center; align-items: center; gap: 8px; font-weight: 800; color: #a63d63; }
.cn-nhan { letter-spacing: .14em; font-weight: 800; font-size: .82rem; color: #7a5a12; margin-top: 6px; }
.cn-ten { font: 700 clamp(1.6rem, 6vw, 2.4rem)/1.2 "Noto Serif", "Times New Roman", serif; color: #6e2843; margin: 4px 0; }
.cn-khoa { font: 600 1.15rem/1.35 "Noto Serif", "Times New Roman", serif; }
.cn-chan { display: flex; justify-content: space-between; gap: 10px; font-size: .8rem; color: #5e4d51; margin-top: 14px; flex-wrap: wrap; }
.chung-nhan .phu { color: #5e4d51; }
@media print {
  body:has(#cn) * { visibility: hidden; }
  #cn, #cn * { visibility: visible; }
  #cn { position: absolute; inset: 0; box-shadow: none; }
}

/* ================= Bố cục MÁY TÍNH (≥ 1024px) =================
 * Điện thoại giữ nguyên. Máy tính: thanh điều hướng thành CỘT DỌC bên trái (kèm các mục cộng đồng như Skool),
 * nội dung rộng hơn, trang cộng đồng có cột phụ bên phải (sắp diễn ra · xếp hạng · cấp của tôi). */
.thanh-duoi .chi-pc, .cot-phai { display: none; }  /* phải nặng hơn `.thanh-duoi a`, không thì lọt xuống thanh đáy điện thoại */
@media (min-width: 640px) and (max-width: 1023px) {
  main { max-width: 760px; }
}
@media (min-width: 1024px) {
  :root { --rong-cot: 240px; }
  body { padding-bottom: 0; padding-left: var(--rong-cot); }
  .dau { margin-left: calc(-1 * var(--rong-cot)); padding-left: 22px; padding-right: 22px; }
  main { max-width: 980px; padding: 22px 32px 48px; }
  h1 { font-size: 1.7rem; }

  .thanh-duoi { top: 57px; bottom: 0; right: auto; width: var(--rong-cot); display: flex; flex-direction: column; gap: 2px;
    padding: 16px 12px; border-top: 0; border-right: 1px solid var(--vien); background: var(--nen); overflow-y: auto; }
  .thanh-duoi a { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 9px 12px; border-radius: 12px; font-size: .95rem; color: var(--chu); }
  .thanh-duoi a:hover { background: var(--mem); }
  .thanh-duoi .ic-nav { width: 26px; height: 26px; background: none !important; }
  .thanh-duoi a.dang, .thanh-duoi a.dang-con { background: var(--vung); color: var(--chinh-dam); }
  .thanh-duoi .chi-pc { display: flex; }
  .thanh-duoi .nhom-pc { display: block; margin: 16px 12px 4px; font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--phu); }
  .thanh-duoi a.chi-pc { padding: 7px 12px 7px 16px; font-size: .9rem; color: var(--phu); }
  .thanh-duoi a.chi-pc .ic { width: 18px; height: 18px; }
  .thanh-duoi a.chi-pc.dang-con { color: var(--chinh-dam); }
  /* Đã có mục cộng đồng ở cột trái → bỏ thanh mục ngang cho đỡ lặp. */
  .thanh-cd { display: none; }

  /* Trang chủ: cột trái trong suốt nổi trên ảnh, câu nói canh giữa phần còn lại. */
  body.o-trang-chu .thanh-duoi { background: rgba(20, 10, 16, .28); backdrop-filter: blur(10px); border-right-color: rgba(255,255,255,.15); }
  body.o-trang-chu .thanh-duoi a, body.o-trang-chu .thanh-duoi .nhom-pc { color: #fff; }
  body.o-trang-chu .thanh-duoi a.dang { background: rgba(255,255,255,.2); }
  body.o-trang-chu .lop-chu { left: var(--rong-cot); }

  /* Cộng đồng: bảng tin + cột phụ. */
  .bo-cuc-cd { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 24px; align-items: start; }
  .cot-phai { display: block; position: sticky; top: 76px; }
  .cot-phai .the { padding: 14px; }
  .cot-phai h3 { margin: 0 0 8px; font-size: .95rem; display: flex; gap: 6px; align-items: center; }
  .cot-phai .dong-mini { display: flex; gap: 10px; align-items: center; padding: 6px 0; text-decoration: none; color: var(--chu); font-size: .9rem; border-top: 1px solid var(--vien); }
  .cot-phai .dong-mini:first-of-type { border-top: 0; }
  .cot-phai .dong-mini > span:nth-child(2) { flex: 1; min-width: 0; }
  .cot-phai .ngay-sk { width: 44px; padding: 4px 0; }
  .cot-phai .ngay-sk b { font-size: 1.1rem; }

  .luoi-khoa { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
  .dau-khoa { grid-template-columns: 300px 1fr; gap: 24px; }
  .dau-khoa h1 { font-size: 1.7rem; }
  .van-ban, .khung-video, #f-xong { max-width: 820px; }
  .bd-svg { max-height: 78vh; }
  #ds-tv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
  .luoi-lich { gap: 6px; }
  .o-ngay { aspect-ratio: auto; height: 56px; }
  .goi-y-vuot { bottom: 28px; }
}

/* ===== Ảnh thai nhi + chuẩn bị mang thai + riêng tư ===== */
.the-thai.co-anh > :not(img) { padding-right: 100px; }
.the-thai.co-anh > .thanh-tien-do, .the-thai.co-anh > .hang.gian.nho { padding-right: 0; }
.anh-thai-nho { position: absolute; right: 14px; top: 34px; width: 92px; height: 92px; border-radius: 50%; object-fit: cover;
  border: 3px solid rgba(255,255,255,.85); box-shadow: 0 4px 14px rgba(0,0,0,.18); background: #fff4ee; }
.anh-thai { margin: 0 0 12px; text-align: center; }
.anh-thai img { width: min(100%, 340px); height: auto; aspect-ratio: 1; border-radius: 50%; object-fit: cover; box-shadow: var(--bong); background: #fff4ee; }
.anh-thai figcaption { font-size: .75rem; color: var(--phu); margin-top: 4px; font-style: italic; }
.the-cb { background: linear-gradient(140deg, #6aa57a, #3f8a7e); }
.lich-ck { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 12px 0 8px; text-align: center; font-size: .85rem; }
.lich-ck b { font-size: .7rem; color: var(--phu); font-weight: 600; }
.lich-ck span { padding: 7px 0; border-radius: 10px; background: var(--mem); }
.lich-ck .kinh { background: #e9798f; color: #fff; }
.lich-ck .du { background: transparent; outline: 2px dashed #e9798f; outline-offset: -2px; }
.lich-ck .cua { background: #bfe3c7; color: #1f4d2c; }
:root[data-theme="dark"] .lich-ck .cua { color: #10301a; }
.lich-ck .rung { background: #3f8a5a; color: #fff; font-weight: 700; }
.lich-ck .hom-nay { box-shadow: 0 0 0 2px var(--chinh) inset; font-weight: 700; }
.chu-giai { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--phu); }
.chu-giai .o { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: -1px; margin-right: 4px; }
.chu-giai .o.kinh { background: #e9798f; } .chu-giai .o.cua { background: #bfe3c7; } .chu-giai .o.rung { background: #3f8a5a; }
.chu-giai .o.du { outline: 2px dashed #e9798f; outline-offset: -2px; }
.ds-ky { display: flex; flex-wrap: wrap; gap: 6px; }
.the-nho { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 10px; border-radius: 999px; background: var(--vang-mem); font-size: .82rem; }
.nut-x { border: 0; background: transparent; color: var(--phu); cursor: pointer; font-size: .8rem; padding: 2px 4px; }
.viec-cb { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--vien); cursor: pointer; }
.viec-cb:first-of-type { border-top: 0; }
.viec-cb input { margin-top: 4px; width: 20px; height: 20px; flex: none; accent-color: var(--chinh); }
.ds-rt { list-style: none; padding: 0; margin: 0; }
.ds-rt li { display: flex; gap: 10px; padding: 6px 0; }

/* ---------- Thai giáo: nhạc ru + đọc truyện ---------- */
.the-tg { background: linear-gradient(135deg, var(--mem), var(--the)); }
.luoi-bai { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.bai-nhac { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 14px; border-radius: 16px; border: 1px solid var(--vien);
  background: var(--the); cursor: pointer; color: var(--chu); min-height: 96px; }
.bai-nhac .i { font-size: 1.6rem; line-height: 1.2; }
.bai-nhac small { color: var(--phu); font-size: .8rem; line-height: 1.35; }
.bai-nhac.dang { background: var(--chinh); border-color: var(--chinh); color: var(--tren-chinh); }
.bai-nhac.dang small { color: var(--tren-chinh); opacity: .85; }
.bai-nhac.dang .i { animation: tg-nhun 2.4s ease-in-out infinite; }
@keyframes tg-nhun { 50% { transform: translateY(-3px) scale(1.06); } }
.dong-truyen { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--chu); }
.dong-truyen > .i { font-size: 1.8rem; flex: none; width: 44px; text-align: center; }
.dong-truyen > span:nth-child(2) { flex: 1; }
.nhan-xanh { color: var(--xanh); font-weight: 600; }
.dau-truyen { text-align: center; }
.dau-truyen .i { font-size: 3rem; display: block; }
.dau-truyen h1 { margin: 4px 0; font-family: "Noto Serif", "Times New Roman", serif; }
.dieu-chinh-chu { gap: 8px; align-items: center; margin: 6px 0 8px; }
.than-truyen { font-family: "Noto Serif", "Times New Roman", serif; line-height: 1.75; }
.than-truyen.loi-ru { text-align: center; }
.doan-truyen { margin: 0 0 .9em; padding: 2px 6px; border-radius: 8px; transition: background .3s; }
.doan-truyen.dang-doc { background: var(--vung); }
.nut.dang-ghi { background: var(--do); border-color: var(--do); color: #fff; animation: tg-nhap 1.4s ease-in-out infinite; }
@keyframes tg-nhap { 50% { opacity: .75; } }
.thanh-nhac-ru { position: fixed; left: 12px; right: 12px; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 40; display: flex; align-items: center; gap: 8px;
  padding: 6px 6px 6px 14px; border-radius: 999px; background: var(--the); border: 1px solid var(--vien); box-shadow: 0 4px 16px rgba(0,0,0,.12); max-width: 520px; margin: 0 auto; }
.thanh-nhac-ru a { flex: 1; text-decoration: none; color: var(--chu); font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 1024px) { .thanh-nhac-ru { left: calc(var(--rong-cot) + 16px); bottom: 16px; } }
@media (prefers-reduced-motion: reduce) { .bai-nhac.dang .i, .nut.dang-ghi { animation: none; } }
.khoi-giong.dinh { position: sticky; top: 64px; z-index: 5; box-shadow: 0 6px 18px rgba(0,0,0,.12); }

/* ---------- Sách lật ---------- */
.luoi-sach { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.the-sach { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--chu); }
.bia-sach { border-radius: 6px 12px 12px 6px; overflow: hidden; box-shadow: 0 6px 16px rgba(0,0,0,.18), inset 6px 0 8px -6px rgba(0,0,0,.4); background: var(--mem); transition: transform .2s; }
.bia-sach img { width: 100%; height: 100%; object-fit: cover; display: block; }
.the-sach:hover .bia-sach { transform: translateY(-3px) rotate(-1deg); }
.sl-vo { background: var(--nen); }
.sl-vo:fullscreen { padding: 14px; display: flex; flex-direction: column; justify-content: center; }
.sl-dau { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 8px 0; }
.sl-khung { display: flex; justify-content: center; padding: 6px 0 4px; }
.sl-san { position: relative; perspective: 2400px; touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: pointer; }
.sl-nua { position: absolute; top: 0; bottom: 0; background: #fff center/cover no-repeat; box-shadow: 0 8px 22px rgba(0,0,0,.18); }
.sl-nua.trong { background: none; box-shadow: none; }
.sl-san:not(.doi) .sl-phai { left: 0; width: 100%; border-radius: 4px 10px 10px 4px; }
.sl-san.doi .sl-trai { left: 0; width: 50%; border-radius: 10px 0 0 10px; }
.sl-san.doi .sl-phai { left: 50%; width: 50%; border-radius: 0 10px 10px 0; }
.sl-gay { display: none; }
.sl-san.doi .sl-gay { display: block; position: absolute; left: calc(50% - 18px); width: 36px; top: 0; bottom: 0; pointer-events: none; z-index: 3;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,.14) 45%, rgba(0,0,0,.22) 50%, rgba(0,0,0,.14) 55%, transparent); }
.sl-to { position: absolute; top: 0; bottom: 0; z-index: 4; transform-style: preserve-3d; transition: transform .75s cubic-bezier(.45,.05,.3,1); }
.sl-to.phai { left: 50%; width: 50%; transform-origin: left center; }
.sl-to.trai { left: 0; width: 50%; transform-origin: right center; }
.sl-to.don { left: 0; width: 100%; transition: transform .7s cubic-bezier(.45,.05,.3,1), opacity .7s ease-in; }
.sl-to.phai.chay { transform: rotateY(-180deg); }
.sl-to.trai.chay { transform: rotateY(180deg); }
.sl-to.don.chay { opacity: 0; }
.sl-to.don.ve { transform: rotateY(-180deg); opacity: 0; }
.sl-to.don.ve.chay { transform: rotateY(0); opacity: 1; }
.sl-to .mat { position: absolute; inset: 0; background: #fff center/cover no-repeat; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.sl-to .mat.sau { transform: rotateY(180deg); }
.sl-to .mat::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(0,0,0,.18), transparent 18%, transparent 82%, rgba(0,0,0,.08)); }
.sl-dieu-khien { display: flex; align-items: center; gap: 10px; justify-content: center; margin-top: 10px; }
.sl-dieu-khien input[type=range] { flex: 1; max-width: 420px; accent-color: var(--chinh); }
.sl-dieu-khien .nut { min-width: 48px; font-size: 1.3rem; }
@media (prefers-reduced-motion: reduce) { .sl-to { transition: none; } }

/* ---------- Lịch học ---------- */
.nhan-buoi { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--mem); color: var(--chinh-dam); margin-bottom: 4px; }
.nhan-buoi .ic { width: 14px; height: 14px; }
.nhan-buoi.k-live { background: #fde4e4; color: #a32020; }
.nhan-buoi.k-truc-tiep { background: #e3f3e8; color: #22663f; }
:root[data-theme="dark"] .nhan-buoi.k-live { background: #4a1d1d; color: #ffb3b3; }
:root[data-theme="dark"] .nhan-buoi.k-truc-tiep { background: #183a26; color: #9fe0b8; }
.nhan-buoi.dang-dien { background: #d93838; color: #fff; animation: tg-nhap 1.6s ease-in-out infinite; }
.ten-sk { display: block; font-size: 1.05rem; }
.ten-sk a { color: inherit; text-decoration: none; }
.su-kien.da-dk { border-color: var(--chinh); box-shadow: 0 0 0 1px var(--chinh) inset; }
.ds-dk { max-height: 50vh; overflow: auto; display: grid; gap: 6px; }

/* ---------- Nhật ký kỷ niệm ---------- */
.hanh-trinh { position: relative; margin-top: 8px; }
.kn-thang h2 { font-size: 1rem; color: var(--phu); margin: 18px 0 8px 34px; }
.kn-muc { position: relative; display: block; padding-left: 34px; text-decoration: none; color: var(--chu); }
.kn-muc::before { content: ""; position: absolute; left: 13px; top: 0; bottom: -12px; width: 2px; background: var(--vien); }
.kn-cham { position: absolute; left: 2px; top: 14px; width: 24px; height: 24px; border-radius: 50%; background: var(--the); border: 2px solid var(--chinh); display: grid; place-items: center; font-size: .78rem; z-index: 1; }
.kn-cham.moc { background: #fdeac2; border-color: #d9a21b; }
.kn-the { margin-bottom: 12px; transition: transform .15s; }
.kn-muc:hover .kn-the { transform: translateY(-2px); }
.kn-tuoi { color: var(--chinh-dam); }
.nhan-moc { display: inline-block; background: #fdeac2; color: #7a5200; border-radius: 999px; padding: 2px 10px; font-size: .8rem; font-weight: 700; margin: 4px 0; }
:root[data-theme="dark"] .nhan-moc, :root[data-theme="dark"] .kn-cham.moc { background: #4a3a14; color: #ffd98a; }
.kn-td { display: block; font-size: 1.05rem; margin-top: 2px; }
.kn-nd { margin: 4px 0 0; white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.kn-nd-day { white-space: pre-wrap; font-size: 1.05rem; }
.kn-luoi { display: grid; gap: 4px; margin-top: 8px; border-radius: 12px; overflow: hidden; }
.kn-luoi.n1 { grid-template-columns: 1fr; } .kn-luoi.n2 { grid-template-columns: 1fr 1fr; } .kn-luoi.n3, .kn-luoi.n4 { grid-template-columns: 1fr 1fr; }
.kn-luoi.n3 .kn-o:first-child { grid-column: span 2; }
.kn-o { position: relative; display: block; aspect-ratio: 4/3; background: var(--mem); overflow: hidden; }
.kn-luoi.n1 .kn-o { aspect-ratio: 16/10; }
.kn-o img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kn-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-style: normal; font-size: 1.6rem; text-shadow: 0 2px 8px rgba(0,0,0,.5); }
.kn-them { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.45); color: #fff; font-style: normal; font-size: 1.4rem; font-weight: 700; }
.kn-chon { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.kn-chon .kn-o { border-radius: 10px; aspect-ratio: 1; }
.kn-bo { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; }
.kn-media { display: grid; gap: 8px; margin-top: 12px; }
.kn-media img, .kn-media video { width: 100%; border-radius: 14px; display: block; background: #000; cursor: zoom-in; }
.the-kn-nay { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--chu); background: linear-gradient(135deg, #fdeac2, var(--the)); margin-top: 12px; }
.trong-kn { text-align: center; padding: 28px 16px; }
.kn-xem, .kn-chieu { position: fixed; inset: 0; z-index: 90; background: rgba(10,6,8,.95); display: grid; place-items: center; }
.kn-xem img { max-width: 96vw; max-height: 92vh; border-radius: 8px; }
.kn-xem button, .kn-nut button { border: 0; background: rgba(255,255,255,.14); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 1.3rem; cursor: pointer; }
.kn-x { position: absolute; top: 14px; right: 14px; } .kn-lui { position: absolute; left: 10px; } .kn-toi { position: absolute; right: 10px; }
.kn-khung { position: absolute; inset: 0; overflow: hidden; }
.kn-khung img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; animation: kn-vao 5s ease-out forwards; }
.kn-khung img.phai { animation-name: kn-vao2; }
@keyframes kn-vao { from { opacity: 0; transform: scale(1.08); } 15% { opacity: 1; } to { opacity: 1; transform: scale(1); } }
@keyframes kn-vao2 { from { opacity: 0; transform: scale(1) translateX(-1.5%); } 15% { opacity: 1; } to { opacity: 1; transform: scale(1.07) translateX(1.5%); } }
.kn-chu { position: absolute; left: 0; right: 0; bottom: 84px; text-align: center; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.8); display: grid; gap: 2px; padding: 0 16px; }
.kn-chu b { font-family: "Noto Serif", "Times New Roman", serif; font-size: 1.6rem; }
.kn-chu small { opacity: .8; }
.kn-nut { position: absolute; bottom: 22px; display: flex; gap: 10px; }
.kn-nut button.bat { background: var(--chinh); }
.kn-thanh { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: rgba(255,255,255,.15); } .kn-thanh i { display: block; height: 100%; background: #fff; transition: width .4s; }
@media (prefers-reduced-motion: reduce) { .kn-khung img { animation: none; } }
.kn-chieu { background: #0b0709; }

@media print {
  body.dang-in-album { padding: 0 !important; background: #fff !important; }
  body.dang-in-album .dau, body.dang-in-album .thanh-duoi, body.dang-in-album .khong-in, body.dang-in-album #thanh-nhac-ru, body.dang-in-album .thong-diep { display: none !important; }
  body.dang-in-album #noi-dung { max-width: none !important; padding: 0 !important; margin: 0 !important; }
}

.cam-xuc .chia-bai { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; }
.cam-xuc .chia-bai .ic { width: 16px; height: 16px; }

/* ---------- Đặt tên cho con ---------- */
.cot3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 420px) { .cot3 { grid-template-columns: 1fr 1fr; } .cot3 > :first-child { grid-column: span 2; } }
.lien-ket { border: 0; background: none; color: var(--chinh-dam); text-decoration: underline; cursor: pointer; padding: 0; font: inherit; }
.the-khop { background: linear-gradient(135deg, var(--mem), var(--the)); }
.dt-luoi { display: grid; gap: 8px; }
.dt-ten { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--the); border: 1px solid var(--vien); border-radius: 14px; padding: 10px 12px; }
.dt-ten b { font-size: 1.12rem; }
.dt-ten.khop { border-color: var(--chinh); box-shadow: 0 0 0 1px var(--chinh) inset; }
.dt-ten.khop b::after { content: " 💞"; }
.nhan-hanh { display: inline-block; font-size: .72rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--vang-mem); color: var(--vang); }
.dt-san { display: grid; place-items: center; min-height: 340px; margin: 12px 0 4px; }
.dt-the { position: relative; width: min(100%, 360px); min-height: 300px; border-radius: 24px; padding: 22px; text-align: center; display: flex; flex-direction: column; justify-content: center; gap: 6px;
  background: linear-gradient(160deg, #fdeef3, var(--the) 65%, #fdf3e2); border: 1px solid var(--vien); box-shadow: 0 10px 30px rgba(166,61,99,.16); touch-action: pan-y; user-select: none; cursor: grab;
  transition: transform .25s ease, opacity .25s ease; --co: 0; --bo: 0; }
:root[data-theme="dark"] .dt-the { background: linear-gradient(160deg, #3a2430, var(--the) 65%); }
.dt-ten-to { font: 700 3.2rem/1.1 "Noto Serif", "Times New Roman", serif; color: var(--chinh-dam); }
.dt-the p { margin: 4px 0; font-size: 1.05rem; }
.dt-dau { position: absolute; top: 16px; font-size: 2rem; font-weight: 800; opacity: 0; pointer-events: none; }
.dt-dau.dau-co { left: 18px; opacity: var(--co); } .dt-dau.dau-bo { right: 18px; color: var(--do); opacity: var(--bo); }
.dt-the.bay-phai { transform: translateX(130%) rotate(18deg); opacity: 0; } .dt-the.bay-trai { transform: translateX(-130%) rotate(-18deg); opacity: 0; }
.dt-het { cursor: default; }
.dt-nut-vuot { justify-content: center; gap: 18px; }
.dt-nut-vuot .nut { width: 60px; height: 60px; border-radius: 50%; font-size: 1.5rem; padding: 0; }
.dt-nut-vuot #dt-lai { width: 46px; height: 46px; font-size: 1.1rem; align-self: center; }
.dt-khop { background: var(--chinh); color: var(--tren-chinh); border-color: var(--chinh); font-weight: 700; }
.dt-ten-day { font: 700 2rem/1.2 "Noto Serif", "Times New Roman", serif; color: var(--chinh-dam); text-align: center; margin: 4px 0 10px; }
.dt-nghia { display: grid; gap: 4px; margin-bottom: 8px; }
.dt-muc { border-top: 1px solid var(--vien); padding-top: 8px; margin-top: 8px; display: grid; gap: 2px; }
.dt-canh { color: var(--do); margin-top: 6px; font-size: .92rem; }
.dt-tot { color: var(--xanh); margin-top: 6px; font-size: .92rem; }
.dt-ten-luu { font-family: "Noto Serif", "Times New Roman", serif; }
@media (prefers-reduced-motion: reduce) { .dt-the { transition: none; } }
