/* Trang của em (bảng học), Lịch lớn, Thư viện đề. Tất cả dùng biến màu ở style.css/theme.css nên đổi màu là đổi cả trang. */
.d-page { --d-fill: linear-gradient(90deg, var(--hl), var(--teal)); padding-block: 18px 70px; }
.d-page h1, .d-page h2, .d-page h3 { font-family: var(--f-disp); color: var(--head); font-weight: 600; margin: 0; text-wrap: balance; }
.wrap.d-page, body:has(.d-page) .topbar .wrap { max-width: 1680px; padding-inline: clamp(16px, 2.4vw, 40px); }
.d-page h1 { font-size: 34px; line-height: 1.15; }
.d-page h2 { font-size: 22px; line-height: 1.2; }
.d-page .btn { border-radius: 999px; font-weight: 600; }
.d-page .btn.primary { background: var(--teal); border-color: var(--teal); color: var(--teal-ink); }
.d-eyebrow { font-size: 11.5px; letter-spacing: .22em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
.d-sub { color: var(--muted); margin: 4px 0 0; font-size: 14px; }
.d-hint { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.d-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: 22px; padding: 20px 22px; min-width: 0; }
.d-panel { background: var(--panel); border-radius: 28px; padding: 16px; display: grid; gap: 16px; min-width: 0; align-content: start; }
.d-pill { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--tile); color: var(--head); white-space: nowrap; }
.d-pill.ok { background: var(--teal); color: var(--teal-ink); }
.d-ok-note { background: var(--glow); border-radius: 14px; padding: 10px 14px; font-size: 14px; line-height: 1.5; }
.d-warn { background: var(--acc2); color: #3b2a00; border-radius: 14px; padding: 10px 14px; font-size: 13.5px; }
.d-row { display: flex; gap: 8px; }
.d-r2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.d-welcome { margin-bottom: 14px; display: grid; gap: 10px; }
.d-welcome label, .d-form label, .d-q { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.d-welcome input, .d-form input, .d-form select, .d-q input { font: inherit; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); width: 100%; }
.d-q input { width: fit-content; }
.d-pagehd { display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 16px; }
.d-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; align-items: center; }
.d-page .chip { padding: 8px 16px; font-weight: 600; font-size: 13.5px; }

/* ---- 3 cột ---- */
.d-dash { display: grid; grid-template-columns: 330px minmax(0, 1fr) 370px; gap: 24px; align-items: stretch; }
.d-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.d-col > :last-child { flex: 1; }
.d-col > .d-panel { flex: 1; }
.d-panel > :last-child { flex: 1; }
.d-clock h2 { margin-top: 2px; }
.d-time { font-family: var(--f-disp); font-size: 62px; line-height: 1; color: var(--head); margin: 10px 0 6px; font-variant-numeric: tabular-nums; }
.d-time span { display: inline-block; margin: 0 4px; animation: d-bl 2s steps(2, jump-none) infinite; }
@keyframes d-bl { 50% { opacity: .35; } }
.d-date { font-size: 13.5px; font-weight: 600; padding-top: 8px; border-top: 2px solid var(--line); }
.d-calh { display: flex; align-items: center; justify-content: space-between; }
.d-calh h3 { font-size: 18px; }
.d-calh h3 small { font-family: var(--f-ui); font-size: 11px; letter-spacing: .14em; color: var(--muted); margin-left: 4px; }
.d-calh .nv { display: flex; gap: 4px; }
.d-calh .nv button { width: 28px; height: 28px; border-radius: 50%; background: var(--tile); color: var(--head); border: 0; font-size: 14px; }
.d-cg { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-top: 10px; text-align: center; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.d-cg b { font-size: 10.5px; letter-spacing: .1em; color: var(--hl); font-weight: 700; padding-bottom: 4px; }
.d-cg span { position: relative; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; }
.d-cg span.out { color: var(--muted); opacity: .4; }
.d-cg span.sd::after { content: ""; position: absolute; bottom: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--hl); }
.d-cg span.today { background: var(--teal); color: var(--teal-ink); font-weight: 700; }
.d-cg span.ex { background: var(--acc2); color: #3b2a00; font-weight: 800; }
.d-legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 8px; flex-wrap: wrap; }
.d-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.d-exrow { margin-top: 10px; display: grid; gap: 8px; border-top: 1px dashed var(--line); padding-top: 10px; }
.d-exrow label { font-size: 12.5px; color: var(--muted); display: grid; gap: 4px; }
.d-exrow input { font: inherit; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); }
.d-cdt { font-size: 13.5px; line-height: 1.45; }
.d-cdt b { font-family: var(--f-disp); font-size: 24px; color: var(--head); }
.d-pomo { background: var(--tile); border-color: transparent; text-align: center; display: grid; gap: 10px; justify-items: center; align-content: center; }
.d-modes { display: flex; gap: 6px; }
.d-modes button { padding: 5px 14px; border-radius: 999px; font-weight: 700; font-size: 12.5px; background: var(--surface); color: var(--muted); border: 0; }
.d-modes button.on { background: var(--teal); color: var(--teal-ink); }
.d-pt { font-family: var(--f-disp); font-size: 60px; line-height: 1; color: var(--head); font-variant-numeric: tabular-nums; }
.d-pdots { display: flex; gap: 6px; }
.d-pdots i { width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--hl); }
.d-pdots i.on { background: var(--teal); border-color: var(--teal); }

/* ---- giữa ---- */
.d-rem { background: var(--tile); border-radius: 20px; padding: 16px 20px; }
.d-rem h2 { font-size: 26px; margin: 6px 0 8px; }
.d-kr { font-family: var(--f-krs); font-weight: 600; font-size: 19px; color: var(--ink); line-height: 1.5; }
.d-rem p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.d-sess { display: grid; gap: 12px; align-content: start; }
.d-sess h2 { font-size: 26px; }
.d-tch { display: flex; gap: 6px; flex-wrap: wrap; }
.d-tch button, .d-gset button, .d-dchips button, .d-rmchips button { padding: 7px 15px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line); font-weight: 700; font-size: 13.5px; color: var(--muted); }
.d-tch button.on, .d-gset button.on, .d-dchips button.on, .d-rmchips button.on { background: var(--teal); border-color: var(--teal); color: var(--teal-ink); }
.d-plan { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.d-plan li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; background: var(--tile); border-radius: 14px; padding: 10px 14px; }
.d-plan .tx b { display: block; font-size: 14.5px; }
.d-plan .tx small { color: var(--muted); font-size: 12.5px; font-weight: 400; }
.d-plan li.done .tx { text-decoration: line-through; color: var(--muted); }
.d-ck { appearance: none; -webkit-appearance: none; flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--surface-2); cursor: pointer; margin: 0; position: relative; }
.d-ck::after { content: attr(data-n); position: absolute; inset: 0; display: grid; place-items: center; color: var(--head); font-size: 14px; font-weight: 800; }
.d-plan .btn { min-height: 30px; padding: 0 14px; font-size: 12.5px; background: var(--surface-2); border: 0; color: var(--head); }
.d-ck:checked { background: var(--teal); border-color: var(--teal); }
.d-ck:checked::after { content: "✓"; color: var(--teal-ink); font-size: 16px; font-weight: 700; }
.d-ck:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.d-sbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.d-chk { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); cursor: pointer; }
.d-cta { min-height: 50px; padding: 0 26px; font-size: 16px; font-weight: 800; box-shadow: 0 6px 0 rgba(0, 0, 0, .14); white-space: nowrap; }
.d-lvcard { display: grid; gap: 12px; align-content: start; }
.d-gset { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--muted); }
.d-gset button { padding: 4px 12px; font-size: 12.5px; }
.d-lvtop { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; text-align: center; }
.d-lvtop > div { background: var(--tile); border-radius: 16px; padding: 10px 8px; }
.d-lvtop .arr { background: none; font-size: 22px; color: var(--muted); padding: 0; }
.d-lvtop span { display: block; font-size: 11.5px; color: var(--muted); letter-spacing: .06em; }
.d-lvtop b { display: block; font-family: var(--f-disp); font-size: 28px; line-height: 1.1; color: var(--head); }
.d-lvtop small { font-size: 12px; color: var(--muted); }
.d-lvtop .tg { background: var(--teal); }
.d-lvtop .tg span, .d-lvtop .tg b, .d-lvtop .tg small { color: var(--teal-ink); }
.d-ladder { position: relative; margin: 30px 0 34px; }
.d-ladder .trk { display: flex; height: 16px; border-radius: 9px; overflow: hidden; gap: 2px; }
.d-ladder .trk i { display: block; background: var(--tile); }
.d-ladder .trk i.c3 { background: color-mix(in srgb, var(--teal) 35%, var(--surface)); }
.d-ladder .trk i.c4 { background: color-mix(in srgb, var(--teal) 60%, var(--surface)); }
.d-ladder .trk i.c5 { background: color-mix(in srgb, var(--teal) 82%, var(--surface)); }
.d-ladder .trk i.c6 { background: var(--teal); }
.d-ladder .tick { position: absolute; top: 20px; transform: translateX(-50%); font-size: 10.5px; color: var(--muted); white-space: nowrap; text-align: center; line-height: 1.2; }
.d-ladder .tick b { display: block; color: var(--head); font-size: 11px; }
.d-ladder .me { position: absolute; bottom: 20px; transform: translateX(-100%); font-size: 11.5px; font-weight: 800; color: var(--ink); white-space: nowrap; padding-right: 3px; }
.d-ladder .me::after { content: ""; position: absolute; right: -3px; bottom: -12px; width: 3px; height: 26px; background: var(--ink); border-radius: 2px; }
.d-ladder .goal { position: absolute; bottom: 20px; font-size: 11.5px; font-weight: 800; color: var(--pink-ink); white-space: nowrap; padding-left: 4px; }
.d-ladder .goal::after { content: ""; position: absolute; left: -1px; bottom: -12px; width: 3px; height: 26px; background: var(--pink); border-radius: 2px; }
.d-lvr { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 14px; }
.d-lvr .t { position: relative; height: 12px; border-radius: 7px; background: var(--tile); }
.d-lvr .t i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 7px; background: var(--d-fill); }
.d-lvr .t u { position: absolute; top: -4px; bottom: -4px; width: 3px; background: var(--ink); opacity: .75; border-radius: 2px; }
.d-lvr b { font-size: 13px; white-space: nowrap; }
.d-lvr b small { color: var(--muted); font-weight: 500; }
.d-effort { background: var(--glow); border-radius: 14px; padding: 10px 14px; font-size: 13.5px; line-height: 1.55; }
.d-effort b { color: var(--head); }

/* ---- phải ---- */
.d-pcard { display: grid; gap: 14px; align-content: start; }
.d-prow { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; }
.d-ring { width: 92px; height: 92px; }
.d-ring text { font-family: var(--f-disp); font-weight: 700; }
.d-prow h3 { font-size: 21px; }
.d-prow p { margin: 2px 0 8px; font-size: 13.5px; color: var(--muted); }
.d-tno { font-family: var(--f-disp); font-size: 44px; width: 70px; height: 70px; border-radius: 20px; background: var(--tile); color: var(--head); display: grid; place-items: center; }
.d-pstat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.d-pstat div { background: var(--tile); border-radius: 16px; padding: 8px 10px; }
.d-pstat b { display: block; font-family: var(--f-disp); font-size: 26px; line-height: 1.05; color: var(--head); }
.d-pstat b small { font-size: 13px; color: var(--muted); font-family: var(--f-ui); }
.d-pstat span { font-size: 11.5px; color: var(--muted); line-height: 1.3; display: block; }
.d-plnr { display: flex; flex-direction: column; gap: 10px; }
.d-plh h2 { font-size: 18px; white-space: nowrap; }
.d-seg { display: flex; background: var(--tile); border-radius: 12px; padding: 3px; gap: 2px; }
.d-seg button { flex: 1; padding: 7px 10px; border-radius: 9px; font-weight: 700; font-size: 13.5px; color: var(--muted); border: 0; background: none; }
.d-seg button.on { background: var(--surface); color: var(--head); box-shadow: 0 1px 4px rgba(0, 0, 0, .1); }
.d-navl { display: flex; align-items: center; gap: 8px; }
.d-navl b { flex: 1; text-align: center; font-size: 14.5px; color: var(--head); }
.d-navl button:not(.btn) { width: 32px; height: 32px; border-radius: 50%; background: var(--tile); color: var(--head); border: 0; font-size: 17px; line-height: 1; }
.d-note { background: var(--glow); border-radius: 12px; padding: 8px 12px; font-size: 13px; }
.d-note[hidden], .d-plbot[hidden] { display: none; }
.d-prog { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; color: var(--head); margin-bottom: 4px; }
.d-prog .meter, .d-pcard .meter, .d-rmprog .meter { flex: 1; }
.d-page .meter { height: 10px; border-radius: 6px; background: var(--tile); overflow: hidden; display: block; }
.d-page .meter i { display: block; height: 100%; border-radius: 6px; background: var(--d-fill); }
.d-pll { list-style: none; margin: 0; padding: 0; }
.d-pll li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.d-pll li:last-child { border-bottom: 0; }
.d-pll .tx { flex: 1; min-width: 0; font-size: 14.5px; line-height: 1.35; overflow-wrap: anywhere; cursor: pointer; }
.d-pll .tx small { display: block; color: var(--muted); font-size: 12px; }
.d-pll li.done .tx { text-decoration: line-through; color: var(--muted); }
.d-pll .tm { font-size: 12px; font-weight: 700; background: var(--tile); color: var(--head); padding: 2px 10px; border-radius: 999px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.d-pll .ed { width: 30px; height: 30px; border-radius: 50%; color: var(--muted); font-size: 14px; border: 0; background: none; }
.d-pll .ed:hover { background: var(--tile); color: var(--head); }
.d-tag { font-size: 10.5px; font-weight: 800; padding: 1px 8px; border-radius: 999px; background: var(--teal); color: var(--teal-ink); margin-left: 6px; white-space: nowrap; }
.d-empty { color: var(--muted); font-size: 14px; padding: 14px 0; text-align: center; }
.d-ok { background: var(--glow); border-radius: 12px; padding: 8px 12px; font-size: 13.5px; margin-top: 6px; }
.d-plbot { display: flex; gap: 8px; margin-top: 6px; }
.d-plbot .btn { flex: 1; white-space: nowrap; padding: 0 8px; font-size: 12px; }
.d-form { display: grid; gap: 10px; }
.d-dchips { display: flex; gap: 5px; flex-wrap: wrap; }
.d-dchips button { min-width: 38px; padding: 6px 8px; font-size: 12.5px; }
.d-acts { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- cửa sổ nổi ---- */
.d-mdl { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .45); display: grid; place-items: center; padding: 16px; }
.d-box { background: var(--surface); color: var(--ink); border-radius: 24px; padding: 20px 22px; width: min(560px, 100%); max-height: 90vh; overflow: auto; display: grid; gap: 12px; align-content: start; }
.d-box h2 { font-size: 22px; }
.d-gate, .d-pv { display: grid; gap: 12px; }
.d-q > span { color: var(--head); font-weight: 800; font-size: 14px; }
.d-q small { font-weight: 400; }
.d-pv .sum { background: var(--glow); border-radius: 14px; padding: 10px 14px; font-size: 14px; line-height: 1.5; }
.d-pv .wk { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--line); margin: 0; }
.d-pv .dayb2 { background: var(--tile); border-radius: 12px; padding: 8px 12px; font-size: 13px; line-height: 1.5; margin-top: 6px; }
.d-pv .dayb2 b { color: var(--head); }

/* ---- Lịch lớn ---- */
.d-bigbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.d-bigbar .d-seg { width: 220px; }
.d-nv2 { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 240px; }
.d-nv2 b { font-family: var(--f-disp); font-size: 20px; color: var(--head); min-width: 150px; text-align: center; }
.d-nv2 button:not(.btn) { width: 34px; height: 34px; border-radius: 50%; background: var(--tile); color: var(--head); border: 0; font-size: 18px; }
.d-bgm, .d-bgw { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.d-bgm .hd { font-size: 11.5px; letter-spacing: .12em; font-weight: 800; color: var(--head); text-align: center; padding: 4px 0; }
.bgc { background: var(--surface); border-radius: 14px; min-height: 116px; padding: 6px 7px; display: grid; gap: 3px; align-content: start; position: relative; }
.bgc.out { background: transparent; opacity: .45; min-height: 0; }
.bgc.today { outline: 2.5px solid var(--teal); }
.bgc.exd { background: var(--pink-soft); outline: 2px solid var(--pink); }
.bgc .dn { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 13px; color: var(--head); }
.bgc .dn button { width: 24px; height: 24px; border-radius: 50%; color: var(--muted); font-size: 15px; line-height: 1; border: 0; background: none; }
.bgc .dn button:hover { background: var(--tile); color: var(--head); }
.bgc .ct { text-align: left; font-size: 11.5px; line-height: 1.3; background: var(--tile); border-radius: 8px; padding: 3px 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; border: 0; color: var(--ink); cursor: pointer; }
.bgc .ct.d { opacity: .5; text-decoration: line-through; }
.bgc .ct.auto { border-left: 3px solid var(--teal); }
.bgc .mo { font-size: 11px; color: var(--muted); text-align: left; padding-left: 4px; }
.bgc .cnt { display: none; }
.bgc .ex { font-size: 10.5px; font-weight: 800; color: var(--pink-ink); }
.bgc.sel { outline: 2.5px solid var(--hl); }
.d-bgw .bgc { min-height: 260px; }
.d-bgw .ct { white-space: normal; font-size: 12.5px; padding: 5px 8px; }
.d-bgw .ct b { display: block; font-size: 11px; color: var(--head); }
.d-bigday { display: none; margin-top: 4px; background: var(--surface); border-radius: 18px; padding: 14px 16px; gap: 8px; }
.d-bigday h3 { font-size: 18px; }
.d-bigday .ct { background: var(--tile); border-radius: 10px; padding: 8px 12px; font-size: 14px; text-align: left; width: 100%; white-space: normal; border: 0; color: var(--ink); cursor: pointer; }

/* ---- lộ trình ---- */
.d-ov { margin-top: 34px; }
.d-ovh { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.d-ovh::after { content: ""; flex: 1; height: 2px; background: var(--line); }
.d-ovh .btn { order: 3; }
.d-emptyc p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.d-rmh { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.d-rmh > div:first-child { flex: 1; min-width: 220px; }
.d-rmprog { display: flex; align-items: center; gap: 10px; min-width: 200px; font-weight: 700; color: var(--head); font-size: 14px; }
.d-rmchips { display: flex; gap: 6px; flex-wrap: wrap; }
.d-rmchips button { padding: 6px 14px; font-size: 13px; }
.d-tline { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 14px; position: relative; padding-top: 14px; }
.d-tline::before { content: ""; position: absolute; top: 21px; left: 0; right: 0; height: 3px; background: var(--tile); border-radius: 2px; }
.d-tline .ph { position: relative; }
.d-tline .ph::before { content: ""; position: absolute; top: -14px; left: 16px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 4px solid var(--hl); z-index: 1; }
.d-tline .ph.now::before { background: var(--teal); border-color: var(--teal); box-shadow: 0 0 0 5px var(--glow); }
.d-tline .ph.exd::before { background: var(--pink); border-color: var(--pink); border-radius: 4px; transform: rotate(45deg); }
.d-phc { background: var(--surface); border-radius: 18px; padding: 16px 16px 10px; height: 100%; }
.d-phc h3 { font-size: 18px; }
.d-phc .dt { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.d-rtk { list-style: none; margin: 0; padding: 0; }
.d-rtk li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px; line-height: 1.4; }
.d-rtk li[hidden] { display: none; }
.d-rtk label { display: flex; gap: 10px; flex: 1; cursor: pointer; min-width: 0; }
.d-rtk input { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; border: 2px solid var(--hl); border-radius: 5px; margin: 2px 0 0; flex: none; background: var(--surface); cursor: pointer; }
.d-rtk input:checked { background: var(--teal); border-color: var(--teal); }
.d-rtk input:checked::after { content: "✓"; display: grid; place-items: center; color: var(--teal-ink); font-size: 12px; line-height: 14px; font-weight: 700; }
.d-rtk input:checked + span { color: var(--muted); text-decoration: line-through; }
.d-skc { font-size: 10.5px; font-weight: 800; padding: 1px 8px; border-radius: 999px; white-space: nowrap; margin-top: 2px; background: var(--tile); color: var(--head); }
.d-skc.viet { background: var(--acc2); color: #3b2a00; }
.d-skc.diem { background: var(--teal); color: var(--teal-ink); }
.d-goalx { margin: 8px 0 6px; font-size: 13.5px; background: var(--glow); border-radius: 12px; padding: 8px 12px; }
.d-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; align-items: start; }

/* ---- Thư viện đề (thẻ nhỏ) ---- */
.d-libgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.d-dc { background: var(--surface); border: 0; border-radius: 18px; padding: 12px 13px 11px; display: grid; gap: 7px; text-align: left; font: inherit; color: var(--ink); cursor: pointer; transition: transform .2s, box-shadow .2s; }
.d-dc:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0, 0, 0, .08); }
.d-dc.wip { outline: 2.5px solid var(--teal); }
.d-dc .hd2 { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.d-dc .tt { font-family: var(--f-disp); font-size: 21px; line-height: 1; color: var(--head); font-weight: 600; }
.d-dc .d-pill { font-size: 10.5px; padding: 1px 8px; }
.d-dc .mr { display: grid; grid-template-columns: 34px minmax(0, 1fr) 36px; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); font-weight: 600; }
.d-dc .mr .meter { height: 6px; }
.d-dc .mr b { text-align: right; color: var(--ink); font-size: 12px; font-variant-numeric: tabular-nums; }
.d-dc .go2 { display: flex; align-items: center; justify-content: center; min-height: 30px; border-radius: 999px; font-weight: 700; font-size: 12.5px; background: var(--tile); color: var(--head); margin-top: 2px; transition: background .15s, color .15s; }
.d-dc:hover .go2, .d-dc.wip .go2 { background: var(--teal); color: var(--teal-ink); }

@media (max-width: 1100px) { .d-dash { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .d-dash > .d-col:nth-child(2) { grid-column: 1 / -1; order: -1; } }
@media (max-width: 1000px) { .d-tline { grid-auto-flow: row; gap: 16px; padding-top: 0; padding-left: 26px; } .d-tline::before { top: 0; bottom: 0; left: 7px; right: auto; width: 3px; height: auto; } .d-tline .ph::before { top: 12px; left: -26px; } }
@media (max-width: 900px) {
  .d-two { grid-template-columns: minmax(0, 1fr); }
  .d-bgm { gap: 3px; } .bgc { min-height: 70px; padding: 4px; } .bgc .ct { display: none; } .bgc .cnt { display: block; } .bgc .mo { display: block; }
  .d-bigday.on { display: grid; } .d-bgw { grid-template-columns: minmax(0, 1fr); } .d-bgw .bgc { min-height: 0; } .d-bgw .ct { display: block; }
}
@media (max-width: 760px) {
  .d-dash { grid-template-columns: minmax(0, 1fr); } .d-dash > .d-col:nth-child(2) { order: 0; }
  .d-page h1 { font-size: 28px; } .d-time { font-size: 54px; }
  .d-plan li { grid-template-columns: 28px minmax(0, 1fr); } .d-plan li .d-pill, .d-plan li .btn { grid-column: 2; justify-self: start; }
  .d-r2 { grid-template-columns: minmax(0, 1fr); } .d-chips { margin-left: 0; }
  .d-libgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .d-dc { padding: 10px; } .d-dc .tt { font-size: 18px; }
  .d-lvtop b { font-size: 22px; } .d-ladder .tick { font-size: 9.5px; }
  .d-pstat { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .d-time span { animation: none; } }

/* hình dễ thương */
.d-mood { display: grid; align-content: start; }
.mt { border-radius: 16px; background: var(--tile); display: grid; place-items: center; aspect-ratio: 1; position: relative; overflow: hidden; background-image: radial-gradient(circle at 30% 25%, var(--glow), transparent 65%); }
.mt svg { width: 68%; height: 68%; }
.d-remrow { display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 12px; }
.d-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 760px) { .d-remrow { grid-template-columns: minmax(0, 1fr) 84px; } }

/* ===== Trang Phiên học (#/session) ===== */
.ss-page .d-card { display: grid; gap: 12px; align-content: start; }
.ss-list { margin-top: 4px; }
.ss-list li { grid-template-columns: 34px minmax(0, 1fr) auto; }
.ss-list .pn { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-weight: 800; color: var(--head); }
.ss-stepper { display: flex; align-items: center; margin-bottom: 4px; }
.ss-stepper .sd { flex: 1; display: grid; justify-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; color: var(--muted); position: relative; text-align: center; }
.ss-stepper .sd::before { content: ""; position: absolute; top: 15px; left: -50%; right: 50%; height: 3px; background: var(--tile); }
.ss-stepper .sd:first-child::before { display: none; }
.ss-stepper .sd i { position: relative; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); border: 3px solid var(--tile); display: grid; place-items: center; font-style: normal; font-weight: 800; color: var(--muted); }
.ss-stepper .sd.d i { background: var(--teal); border-color: var(--teal); color: var(--teal-ink); }
.ss-stepper .sd.d::before, .ss-stepper .sd.c::before { background: var(--teal); }
.ss-stepper .sd.c i { border-color: var(--teal); color: var(--teal); box-shadow: 0 0 0 5px var(--glow); }
.ss-body { min-height: 300px; }
.ss-bar .btn:disabled { opacity: .45; cursor: default; }
.ss-go h2, .ss-body h2 { font-size: 22px; }
.ss-fc { position: relative; height: 240px; width: 100%; max-width: 560px; margin: 0 auto; border: 0; background: none; padding: 0; perspective: 900px; }
.ss-fc .face { position: absolute; inset: 0; border-radius: 26px; display: grid; place-items: center; align-content: center; gap: 10px; padding: 20px; text-align: center; backface-visibility: hidden; transition: transform .5s; border: 1px solid var(--line); }
.ss-fc .front { background: var(--surface-2); } .ss-fc .back { background: var(--tile); transform: rotateY(180deg); }
.ss-fc.flip .front { transform: rotateY(-180deg); } .ss-fc.flip .back { transform: rotateY(0); }
.ss-fc .kor { font-family: var(--f-krs); font-size: 48px; font-weight: 600; color: var(--head); line-height: 1.2; }
.ss-fc small { color: var(--muted); font-size: 12.5px; }
.ss-fc .back b { font-family: var(--f-disp); font-size: 28px; color: var(--head); }
.ss-fc .fex { font-family: var(--f-krs); font-size: 16px; line-height: 1.6; } .ss-fc .fexvi { font-size: 13.5px; color: var(--muted); }
.ss-rate { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; max-width: 560px; margin: 0 auto; width: 100%; }
.ss-rate[hidden] { display: none; }
.ss-rate button { padding: 10px 6px; border-radius: 16px; background: var(--surface-2); border: 1.5px solid var(--line); font-weight: 700; font-size: 14px; display: grid; gap: 2px; }
.ss-rate button:hover { border-color: var(--teal); background: var(--tile); }
.ss-rate small { font-size: 11px; color: var(--muted); font-weight: 500; }
.ss-rec { display: grid; gap: 10px; }
.ss-rec > div { display: flex; gap: 12px; align-items: center; background: var(--tile); border-radius: 14px; padding: 10px 14px; font-size: 14.5px; }
.ss-rec b { font-family: var(--f-disp); font-size: 22px; color: var(--head); min-width: 60px; }
@media (max-width: 760px) { .ss-stepper .sd { font-size: 10px; } .ss-rate { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
