/* Say Piano – app học viên (app.html / gói Android). Dùng biến và phông của ebook.css.
 * Toàn app khổ ngang (chủ dự án 2026-10-17): khung màn, thanh dọc, chip, nền đêm ở khung-ngang.css. Không giãn khoảng cách chữ.
 * Màu: navy là màu thương hiệu (chữ chính, nút chính); Gia đình Nốt Nhạc (note-family.js) mang 7 màu nốt vào
 * linh vật, thẻ, lộ trình. Màu nốt chỉ dùng cho nền/viền/hình; chữ màu luôn dùng --tone-i (đạt AA). */

:root {
  --app-w: 100%;              /* khổ ngang: không còn cột giữa – tấm phủ (gm-sheet, knd-tam, xq) trải hết bề ngang */
  --pad: 20px;
  --card-r: 20px;
  --card-shadow: 0 1px 2px rgba(15, 3, 78, .06), 0 8px 24px -16px rgba(15, 3, 78, .28);
  /* vùng an toàn (tai thỏ / lỗ camera khi ngang): env() của WebView, hoặc biến --safe-area-inset-* do plugin SystemBars của
   * Capacitor 8 tiêm vào <html> (WebView < 140 tự đệm khung gốc và báo 0) – lấy giá trị lớn hơn */
  --safe-t: max(env(safe-area-inset-top, 0px), var(--safe-area-inset-top, 0px));
  --safe-b: max(env(safe-area-inset-bottom, 0px), var(--safe-area-inset-bottom, 0px));
  --safe-l: max(env(safe-area-inset-left, 0px), var(--safe-area-inset-left, 0px));
  --safe-r: max(env(safe-area-inset-right, 0px), var(--safe-area-inset-right, 0px));
  --danger: #B3261E;
  --focus: 0 0 0 3px rgba(98, 66, 214, .35);
  --bg: #FFF8EC;              /* kem ấm – nền app */
  --muted: #5E5885;           /* chữ phụ nhạt hơn navy-70 nhưng vẫn ≥ 4.5 trên nền kem */
  --rainbow: linear-gradient(90deg, #F0503C 0%, #FF9A2E 16.6%, #FFD23F 33.3%, #36C26B 50%, #2F9BFF 66.6%, #5B5BE6 83.3%, #C25BE6 100%);
  /* thanh tiến độ: dải màu thương hiệu Say Piano (biểu tượng nền gradient: navy #0F004E, quầng tím #3F2F7F/#4A3684, quầng xanh #273E85
     – hai quầng sáng được làm sáng lên để đầu thanh "phát sáng" trên nền kem) */
  --brand-progress: linear-gradient(90deg, #0F004E 0%, #3F2F7F 38%, #6A4FC0 72%, #4D6FD1 100%);
  --tone: #5B5BE6; --tone-d: #3F3FC4; --tone-l: #E2E2FB; --tone-i: #3434A8;
}

html, body { min-height: 100%; }
body.po-app { background: var(--night, #081127); font-size: 16px; line-height: 1.5; overscroll-behavior-y: none; -webkit-tap-highlight-color: transparent; }
#app { position: relative; min-height: 100vh; min-height: 100dvh; background: var(--night, #081127); }
:focus-visible { outline: none; box-shadow: var(--focus); }
a { color: inherit; }

/* ---------- khung màn ---------- */
.scr { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh;
  padding-left: var(--safe-l); padding-right: var(--safe-r); }
.scr__top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 16px;
  padding: calc(var(--safe-t) + 14px) var(--pad) 10px; background: var(--bg); }
.scr__spacer { flex: 1; }
.scr__topr { flex: none; display: flex; align-items: center; min-height: 44px; }
.scr__topr a, .scr__topr button { min-height: 44px; display: inline-flex; align-items: center; padding: 0 4px;
  border: 0; background: none; font-weight: 600; color: var(--navy-70); text-decoration: none; cursor: pointer; }

/* thanh tiến độ màu thương hiệu: dải màu cố định cả bề ngang, phần chưa đi tới bị cắt (clip-path) – càng đi xa càng "sáng" */
.progress { flex: 1; height: 10px; border-radius: 999px; background: #EFE7D8; overflow: hidden; }
.progress > span { display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--brand-progress);
  clip-path: inset(0 calc(100% - var(--p, 0%)) 0 0 round 999px); transition: clip-path .5s cubic-bezier(.2, .7, .2, 1); }

.scr__scroll { flex: 1; display: flex; flex-direction: column; padding: 8px var(--pad) 28px; }
.scr:not(:has(.scr__top)) .scr__scroll { padding-top: calc(var(--safe-t) + 24px); }
.scr__head { display: flex; align-items: flex-start; gap: 12px; margin: 12px 0 24px; }
.scr__titles { flex: 1; min-width: 0; }
.scr__title { font-size: 28px; line-height: 1.22; font-weight: 700; color: var(--navy); }
.scr__title:focus { outline: none; box-shadow: none; }
.scr__sub { margin: 10px 0 0; font-size: 16px; line-height: 1.5; color: var(--navy-70); font-weight: 500; }
.scr__art { flex: none; width: 96px; display: flex; justify-content: flex-end; }
.scr__art > img, .scr__art > svg { width: 96px; height: auto; display: block; }
.scr__body { display: flex; flex-direction: column; gap: 16px; }

/* thanh dưới: nút tròn quay lại + nút chính dạng viên thuốc; thanh tab */
.scr__foot { position: sticky; bottom: 0; z-index: 5; background: var(--bg); }
.scr__bar { padding: 12px var(--pad) calc(var(--safe-b) + 16px); box-shadow: 0 -16px 16px -8px var(--bg);
  display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.scr__row { display: flex; align-items: center; gap: 12px; }

/* ---------- nút ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 24px;
  border: 0; border-radius: 999px; font-weight: 700; font-size: 17px; line-height: 1.2; cursor: pointer; text-decoration: none;
  transition: transform .12s ease, opacity .2s ease, background-color .2s ease; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn--primary { background: var(--navy-grad); color: var(--cream); box-shadow: none; }
.btn--primary:disabled { background: var(--tint); color: var(--navy-50); box-shadow: none; cursor: default; }
.btn--ghost { background: var(--tint); color: var(--navy); }
.btn--outline { background: #fff; color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--grow, .btn--block { flex: 1; width: 100%; }
.btn-round { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: #fff; color: var(--navy); border: 0; box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-round:active { transform: scale(.96); }
/* nút phụ nhẹ: viên thuốc viền mảnh, KHÔNG gạch chân (chủ dự án 20/10: không nút nào trong app trông như liên kết chữ) */
.btn-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border: 0; border-radius: 999px; background: none;
  box-shadow: inset 0 0 0 2px currentColor; font-weight: 700; font-size: 16px; color: var(--navy-70); cursor: pointer; text-decoration: none; }
.btn-link:hover { color: var(--navy); }

/* ---------- thẻ ---------- */
.card { background: #fff; border-radius: var(--card-r); box-shadow: var(--card-shadow); padding: 18px; }
.muted { color: var(--navy-70); }
.center { align-items: center; justify-content: center; text-align: center; }

/* ---------- thẻ lựa chọn ---------- */
.opts { display: flex; flex-direction: column; gap: 12px; }
.opt { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 68px; padding: 12px 16px; text-align: left;
  background: #fff; border: 0; border-radius: var(--card-r); cursor: pointer; color: var(--navy);
  box-shadow: inset 0 0 0 1.5px var(--line), var(--card-shadow); transition: box-shadow .18s ease, background-color .18s ease; }
.opt:active { transform: scale(.99); }
.opt__ico { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--tint-2); color: var(--navy); }
.opt__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.opt__label { font-weight: 700; font-size: 17px; line-height: 1.3; }
.opt__desc { font-size: 14px; line-height: 1.4; color: var(--navy-70); font-weight: 500; }
.opt__mark { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  box-shadow: inset 0 0 0 1.5px var(--line); color: transparent; transition: background-color .18s ease; }
.opt[role="checkbox"] .opt__mark { border-radius: 7px; }
.opt.is-on { background: var(--tint-2); box-shadow: inset 0 0 0 2px var(--navy), var(--card-shadow); }
.opt.is-on .opt__ico { background: #fff; }
.opt.is-on .opt__mark { background: var(--navy); color: #fff; box-shadow: none; }
.opt:focus-visible { box-shadow: inset 0 0 0 2px var(--navy), var(--focus); }

/* ---------- ô nhập ---------- */
.field { width: 100%; min-height: 52px; padding: 0 16px; border: 0; border-radius: 16px; background: #fff; font-size: 17px; font-weight: 600;
  box-shadow: inset 0 0 0 1.5px var(--line); color: var(--navy); }
.field:focus { outline: none; box-shadow: inset 0 0 0 2px var(--navy); }
.field::placeholder { color: var(--navy-50); font-weight: 500; }

/* ---------- hộp thoại ---------- */
.dlg { width: min(100% - 32px, 360px); padding: 24px; border: 0; border-radius: 24px; background: var(--cream); color: var(--navy);
  box-shadow: 0 30px 80px -30px rgba(15, 3, 78, .6); }
.dlg::backdrop { background: rgba(8, 17, 39, .66); }
.dlg__form { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.dlg__title { font-size: 22px; font-weight: 700; text-align: center; }
.dlg__text { display: block; margin: 0; font-size: 17px; line-height: 1.5; font-weight: 600; }
.dlg__actions { display: flex; gap: 10px; margin-top: 8px; }
.dlg__actions .btn { flex: 1; padding: 0 16px; min-height: 48px; font-size: 16px; }
.dlg .btn--primary { color: var(--cream); }
.gate__ico { width: 56px; height: 56px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: var(--tint); }
.dlg__form:has(.gate__q) .dlg__text { text-align: center; color: var(--navy-70); font-weight: 500; }
.gate__q { margin: 4px 0 0; text-align: center; font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; }
.gate__input { text-align: center; font-size: 24px; }
.gate__msg { margin: 0; min-height: 1.4em; text-align: center; color: var(--danger); font-weight: 600; font-size: 15px; }

/* ---------- thông báo nhanh ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--safe-b) + 96px); z-index: 50; transform: translate(-50%, 12px);
  max-width: min(100% - 32px, 400px); padding: 12px 18px; border-radius: 14px; background: var(--navy); color: var(--cream);
  font-weight: 600; font-size: 15px; text-align: center; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- màn chờ ---------- */
.spinner { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--tint); border-top-color: var(--navy); animation: po-spin .9s linear infinite; }
@keyframes po-spin { to { transform: rotate(360deg); } }

/* ---------- màn chào (hero) ---------- */
.scr--hero .scr__scroll { text-align: center; justify-content: center; }
.scr--hero .scr__body { order: -1; }
.scr--hero .welcome__logo { order: -2; }
.scr--hero .scr__head { flex-direction: column; align-items: center; margin-bottom: 8px; }
.scr--hero .scr__sub { max-width: 30ch; margin-inline: auto; }
.welcome__logo { display: block; height: 28px; width: auto; margin: 4px auto 0; }
.welcome__art { position: relative; width: min(64vw, 240px); aspect-ratio: 1; margin: 36px auto 12px; border-radius: 50%;
  display: grid; place-items: center; background: var(--navy-grad); box-shadow: 0 30px 60px -30px rgba(15, 3, 78, .7); }
.welcome__art::after { content: ""; position: absolute; inset: -14px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line); }
.welcome__art img { width: 46%; height: auto; filter: brightness(0) invert(1); }
.welcome__foot { margin: 16px 0 0; font-size: 13px; color: var(--navy-50); text-align: center; }

/* ---------- vòng tiêu điểm bàn phím cho các nút có bóng riêng ---------- */
.btn--primary:focus-visible { box-shadow: 0 0 0 3px var(--cream), 0 0 0 6px rgba(98, 66, 214, .55); }
.btn--outline:focus-visible { box-shadow: inset 0 0 0 2px var(--navy), var(--focus); }
.btn--ghost:focus-visible, .btn--danger:focus-visible { box-shadow: var(--focus); }
.btn-round:focus-visible { box-shadow: inset 0 0 0 2px var(--navy), var(--focus); }
.btn-link:focus-visible { box-shadow: var(--focus); border-radius: 8px; }

/* ---------- dẫn dắt ---------- */
.field-wrap { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.field-wrap[hidden] { display: none; }
.field-label { font-weight: 700; font-size: 17px; color: var(--navy); }
.field-hint { margin: 0; font-size: 14px; color: var(--navy-70); font-weight: 500; }
.sec-head { margin-top: 12px; }
.sec-head__title { font-size: 20px; line-height: 1.3; font-weight: 700; color: var(--navy); }
.sec-head__sub { margin: 4px 0 0; font-size: 15px; color: var(--navy-70); font-weight: 500; }
.opts--grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.opts--grid .opt { min-height: 64px; padding: 10px 14px; }
.note { margin: 0; font-size: 15px; line-height: 1.5; color: var(--navy-70); font-weight: 500; }

/* ---------- kiểm tra xếp lớp ---------- */
.qz-count { font-weight: 700; font-size: 15px; color: var(--navy-70); font-variant-numeric: tabular-nums; white-space: nowrap; }
.qz-card { padding: 14px 10px; }
.qz-staff svg { display: block; width: 100%; height: auto; max-width: 420px; margin: 0 auto; }
.qz-opts { display: flex; flex-direction: column; gap: 12px; }
.qz-opts--grid { display: grid; grid-template-columns: 1fr 1fr; }
.qz-opt { min-height: 64px; padding: 12px 16px; border: 0; border-radius: var(--card-r); background: #fff; color: var(--navy);
  font-weight: 700; font-size: 19px; line-height: 1.3; cursor: pointer; box-shadow: inset 0 0 0 1.5px var(--line), var(--card-shadow);
  transition: box-shadow .18s ease, background-color .18s ease, transform .12s ease; }
.qz-opts:not(.qz-opts--grid) .qz-opt { text-align: left; font-size: 17px; }
.qz-opt:active:not(:disabled) { transform: scale(.98); }
.qz-opt:disabled { cursor: default; }
.qz-opt.is-on { background: var(--tint-2); box-shadow: inset 0 0 0 2px var(--navy), var(--card-shadow); }
.qz-opt:focus-visible { box-shadow: inset 0 0 0 2px var(--navy), var(--focus); }

/* ---------- kết quả + kế hoạch ---------- */
.result-card { position: relative; padding: 28px 20px 24px; border-radius: 28px; text-align: center; color: var(--cream);
  background: var(--navy-grad); box-shadow: 0 30px 60px -34px rgba(15, 3, 78, .8); }
.result-card__badge { width: 60px; height: 60px; margin: 0 auto 6px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 251, .14); }
.result-card__big { margin: 0; font-size: 48px; line-height: 1.1; font-weight: 700; }
.result-card__line { margin: 8px 0 0; font-size: 17px; line-height: 1.4; font-weight: 600; opacity: .92; }
.result__stat { display: inline-flex; align-items: center; gap: 6px; margin: 16px 0 0; padding: 6px 14px; border-radius: 999px;
  background: rgba(255, 255, 251, .16); font-weight: 700; font-size: 15px; }
.sum { padding: 6px 18px; }
.sum__row { display: grid; grid-template-columns: 36px 1fr; grid-template-rows: auto auto; column-gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.sum__row:last-child { border-bottom: 0; }
.sum__ico { grid-row: span 2; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--tint-2); }
.sum__k { font-size: 13px; color: var(--navy-70); font-weight: 600; }
.sum__v { font-size: 16px; line-height: 1.4; font-weight: 700; color: var(--navy); }
.today { padding: 18px; border-radius: var(--card-r); background: var(--tint); }
.today__k { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 14px; font-weight: 700; color: var(--navy-70); }
.today__v { margin: 6px 0 0; font-size: 18px; line-height: 1.35; font-weight: 700; color: var(--navy); }
.today__sub { margin: 2px 0 0; font-size: 15px; color: var(--navy-70); font-weight: 500; }

/* ---------- đăng nhập / thiết bị / sắp mở bán ---------- */
.login__art { width: 80px; height: 80px; border-radius: 24px; display: grid; place-items: center; background: var(--tint); color: var(--navy); }
.login__card { display: flex; flex-direction: column; align-items: stretch; gap: 14px; padding: 20px; }
.login__slot { min-height: 52px; display: flex; justify-content: center; }
/* Đăng nhập với Apple (app iOS) – kiểu đen của Apple HIG, cùng cỡ và cùng hàng với nút Google */
.login__slot:has(.login__apple) { flex-wrap: wrap; gap: 10px; }
.login__slot:has(.login__apple) > .btn { flex: 1 1 200px; width: auto; padding: 0 16px; white-space: nowrap; }
/* #/devices-full: tối đa 5 máy (giới hạn 20/10) – thẻ máy gọn hai cột, vừa một màn ở 732×360 */
.scr--dan.scr--may .opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.scr--may .opt { min-width: 0; min-height: 52px; padding: 6px 10px; gap: 8px; }
.scr--may .opt__txt { min-width: 0; }
.scr--may .opt__ico { width: 34px; height: 34px; }
.scr--may .opt__label { font-size: 15px; }
.scr--may .opt__desc { font-size: 12.5px; }
.scr--may .note { margin: 0; font-size: 13px; }
@media (max-height: 430px) { .scr--may .scr__body > .note { display: none; } }
@media (max-height: 380px) { .scr--dan.scr--may .opts { gap: 6px; } .scr--may .opt { min-height: 46px; padding: 4px 10px; } .scr--may .opt__ico { width: 30px; height: 30px; }
  .scr--may .opt__mark { display: none; } }   /* máy đang chọn đã có mặt Vàng Piano – bỏ vòng tròn để tên + ngày một dòng */   /* điện thoại: nút "Đăng xuất máy đã chọn" đã đủ rõ – nhường chỗ cho 5 máy */
@media (min-height: 600px) { .scr--may .opt { min-height: 64px; padding: 10px 14px; } .scr--may .opt__label { font-size: 17px; } }
/* web: sau cổng phụ huynh – nút Apple + nút Google (GSI) xếp dọc, lời nhắc chọn tài khoản */
.login__slot:has(.login__gsi) { flex-direction: column; align-items: stretch; gap: 10px; }
.login__slot:has(.login__gsi) > .btn { flex: none; width: 100%; }
.login__gsi { min-height: 44px; display: flex; justify-content: center; }
.login__note--chon { font-size: 13px; }
.login__apple { background: #000; color: #fff; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", var(--font, system-ui), sans-serif; }
.login__apple-logo { flex: none; margin-top: -3px; }
.login__g { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff; font-size: 15px; }
.login__note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; font-size: 14px; color: var(--navy-70); font-weight: 600; }
.login__perks { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.login__perks li { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--navy-90); }
.login__perks .ico { flex: none; color: var(--navy); }
.soon__art { width: min(48vw, 180px); aspect-ratio: 1; margin: 24px auto 8px; border-radius: 50%; display: grid; place-items: center;
  background: var(--navy-grad); color: var(--cream); box-shadow: 0 30px 60px -30px rgba(15, 3, 78, .7); }

/* ---------- ảnh đại diện + thẻ dùng chung (trang chủ, tài khoản) ---------- */
.avatar { display: block; flex: none; border-radius: 50%; box-shadow: 0 6px 14px -8px rgba(15, 3, 78, .6); }
.chip { flex: none; display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; border-radius: 999px;
  background: var(--tint); color: var(--navy); font-size: 13px; font-weight: 700; white-space: nowrap; }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn--cream { background: var(--cream); color: var(--navy); box-shadow: none; }
.btn--cream:focus-visible { box-shadow: 0 0 0 3px var(--navy), 0 0 0 6px rgba(255, 255, 251, .8); }
.hcard { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; color: var(--navy); text-decoration: none; border: 0; }
button.hcard, a.hcard, .arow { cursor: pointer; }
.hcard__ico { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--tint-2); color: var(--navy); }
.hcard__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hcard__title { font-weight: 700; font-size: 17px; line-height: 1.3; color: var(--navy); }
.hcard__v { font-weight: 700; font-size: 16px; color: var(--navy-90); }
.hcard__sub { font-size: 14px; line-height: 1.4; color: var(--navy-70); font-weight: 500; }
.hcard__chev { flex: none; color: var(--navy-50); display: grid; place-items: center; }
.hcard--link:active, .arow:active { transform: scale(.99); }
.hcard--link:focus-visible, .arow:focus-visible { box-shadow: inset 0 0 0 2px var(--navy), var(--focus); }
.hretry { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ---------- trang chủ ---------- */
.hhead { display: flex; align-items: center; gap: 12px; align-self: flex-start; max-width: 100%; min-height: 56px; margin: 0 0 4px; padding: 6px 14px 6px 6px;
  border: 0; border-radius: 999px; background: #fff; color: var(--navy); text-align: left; cursor: pointer; box-shadow: inset 0 0 0 1.5px var(--line), var(--card-shadow); }
.hhead__txt { min-width: 0; display: flex; flex-direction: column; }
.hhead__name { font-weight: 700; font-size: 16px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hhead__track { font-size: 13px; color: var(--navy-70); font-weight: 600; }
.hhead__chev { flex: none; margin-left: 4px; color: var(--navy-50); display: grid; place-items: center; }
.hhead:focus-visible { box-shadow: inset 0 0 0 2px var(--navy), var(--focus); }
.scr--home .scr__head { margin-top: 14px; }
.next-card { position: relative; overflow: hidden; padding: 22px 20px 20px; border-radius: 28px; color: var(--cream); background: var(--navy-grad);
  box-shadow: 0 30px 60px -34px rgba(15, 3, 78, .8); display: flex; flex-direction: column; gap: 6px; }
.next-card::after { content: ""; position: absolute; right: -40px; top: -40px; width: 150px; height: 150px; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 251, .16); pointer-events: none; }
.next-card__k { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin: 0; padding: 4px 12px; border-radius: 999px;
  background: rgba(255, 255, 251, .16); font-size: 14px; font-weight: 700; }
.next-card__meta { margin: 8px 0 0; font-size: 15px; font-weight: 600; opacity: .85; }
.next-card__title { margin: 0 0 14px; font-size: 26px; line-height: 1.25; font-weight: 700; color: var(--cream); }

/* ---------- lộ trình ---------- */
.chap { display: flex; flex-direction: column; gap: 10px; }
.chap + .chap { margin-top: 12px; }
.chap__head { position: sticky; top: 0; z-index: 2; padding: calc(var(--safe-t) + 10px) 0 8px; background: var(--bg); }
.chap__title { font-size: 20px; line-height: 1.3; font-weight: 700; color: var(--navy); }
.chap__sub { margin: 0; font-size: 14px; color: var(--navy-70); font-weight: 600; text-align: right; }
.st-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.st { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 10px 14px; text-align: left; border: 0; cursor: pointer;
  border-radius: 18px; background: #fff; color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--line); }
.st:active { transform: scale(.99); }
.st:focus-visible { box-shadow: inset 0 0 0 2px var(--navy), var(--focus); }
.st__no { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 16px;
  background: var(--tint); color: var(--navy); font-variant-numeric: tabular-nums; }
.st__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.st__title { font-weight: 700; font-size: 16px; line-height: 1.3; }
.st__sub { font-size: 13px; color: var(--navy-70); font-weight: 600; }
.st__end { flex: none; display: grid; place-items: center; color: var(--navy-50); }
.st--cur { background: var(--navy-grad); color: var(--cream); box-shadow: 0 16px 30px -18px rgba(15, 3, 78, .8); min-height: 76px; }
.st--cur .st__no { background: var(--cream); color: var(--navy); }
.st--cur .st__sub, .st--cur .st__end { color: var(--cream); opacity: .9; }
.st--cur:focus-visible { box-shadow: 0 0 0 3px var(--cream), 0 0 0 6px rgba(98, 66, 214, .55); }
.st--lock { background: transparent; color: var(--navy-50); cursor: default; }
.st--lock .st__no { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); color: var(--navy-50); }

/* ---------- tài khoản ---------- */
.acc-mail { display: flex; align-items: center; gap: 14px; }
.acc-mail__v { overflow-wrap: anywhere; }
.arow { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; border: 0; color: var(--navy); }
.devs { list-style: none; margin: 0; padding: 4px 16px; }
.dev { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.dev:last-child { border-bottom: 0; }
.dev__ico { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--tint-2); color: var(--navy); }
.dev__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.dev__label { font-weight: 700; font-size: 16px; line-height: 1.3; color: var(--navy); }
.dev__sub { font-size: 13px; color: var(--navy-70); font-weight: 600; }
.acc-actions { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 8px; }
.btn-link--danger { color: var(--danger); }
.btn-link--danger:hover { color: var(--danger); }

/* ---------- hồ sơ học viên ---------- */
.profs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.prof { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 80px; padding: 12px 16px 12px 12px; border: 0; border-radius: var(--card-r);
  background: #fff; color: var(--navy); text-align: left; cursor: pointer; box-shadow: inset 0 0 0 1.5px var(--line), var(--card-shadow);
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.prof img { pointer-events: none; }
.prof.is-on { background: var(--tint-2); box-shadow: inset 0 0 0 2px var(--navy), var(--card-shadow); }
.prof:focus-visible { box-shadow: inset 0 0 0 2px var(--navy), var(--focus); }
.prof__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.prof__name { font-weight: 700; font-size: 18px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prof__track { font-size: 14px; color: var(--navy-70); font-weight: 600; }
.prof-add { margin-top: 4px; }
.opts--3 { grid-template-columns: repeat(3, 1fr); gap: 10px; }
.opts--3 .opt { flex-direction: column; align-items: flex-start; gap: 6px; min-height: 76px; padding: 12px; }
.opts--3 .opt__mark { position: absolute; top: 10px; right: 10px; }
.opts--3 .opt { position: relative; }
.opts--3 .opt__label { font-size: 16px; }
.opts--3 .opt__desc { font-size: 13px; }
.av-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; justify-items: center; }
.av-pick__b { width: 68px; height: 68px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer; background: transparent;
  box-shadow: inset 0 0 0 2px transparent; transition: box-shadow .15s ease, transform .12s ease; }
.av-pick__b[aria-checked="true"] { box-shadow: inset 0 0 0 3px var(--navy); }
.av-pick__b:active { transform: scale(.95); }
.av-pick__b:focus-visible { box-shadow: inset 0 0 0 3px var(--navy), var(--focus); }
.av-pick__b img { pointer-events: none; }

/* =====================================================================
 * Gia đình Nốt Nhạc trong app: linh vật, bóng thoại, màu theo nốt (--tone*), sân khấu màn chào,
 * pháo giấy, thẻ trang chủ, dải chương + trạm trên lộ trình. Biến --tone/--tone-d/--tone-l/--tone-i do
 * ui.js tone(step) gắn vào từng phần tử; mặc định (La) ở :root.
 * ===================================================================== */

/* ---------- nhân vật (bản rút gọn từ kids.css: chớp mắt, nhún, nhảy) ---------- */
.ch { overflow: visible; display: block; }
.ch .ch__body { transform-origin: 60px 130px; }
.ch .ch__eye { transform-box: fill-box; transform-origin: center; animation: nf-blink 4.5s infinite; }
@keyframes nf-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes nf-bob { 50% { transform: translateY(-5px); } }
@keyframes nf-pop { 0% { transform: scale(.4) translateY(10px); opacity: 0; } 70% { transform: scale(1.06); opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes nf-jump { 0% { transform: none; } 30% { transform: translateY(-20px) scale(1.04, .96); } 60% { transform: translateY(0) scale(1.08, .92); } 100% { transform: none; } }
@keyframes nf-fall { 0% { opacity: 1; transform: translateY(0) rotate(0) scale(var(--s, 1)); } 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(340px) rotate(var(--r, 180deg)) scale(var(--s, 1)); } }

/* ---------- linh vật + bóng thoại dưới tiêu đề ---------- */
.scr__head--guide { flex-direction: column; align-items: stretch; gap: 14px; margin: 6px 0 22px; }
.say { display: flex; align-items: flex-end; gap: 10px; }
.mascot { flex: none; display: block; line-height: 0; animation: nf-pop .55s cubic-bezier(.3, 1.4, .5, 1) both; }
.mascot .ch { animation: nf-bob 3.2s ease-in-out .7s infinite; }
.mascot.is-jump .ch { animation: nf-jump .6s cubic-bezier(.3, 1.6, .5, 1); }
.say__bubble { position: relative; flex: 1; min-width: 0; margin: 0 0 18px; padding: 12px 16px; border-radius: 20px 20px 20px 6px;
  background: #fff; color: var(--navy-90); font-size: 16px; line-height: 1.45; font-weight: 600;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--tone) 38%, transparent), 0 10px 24px -18px rgba(15, 3, 78, .5); }
.say__bubble::before { content: ""; position: absolute; left: -6px; bottom: 9px; width: 13px; height: 13px; background: #fff; transform: rotate(45deg);
  border-left: 1.5px solid color-mix(in srgb, var(--tone) 38%, transparent); border-bottom: 1.5px solid color-mix(in srgb, var(--tone) 38%, transparent);
  border-radius: 0 0 0 4px; }
.is-calm .scr__head--guide { gap: 16px; margin-bottom: 28px; }
.is-calm .say__bubble { font-size: 15px; font-weight: 500; color: var(--navy-70); margin-bottom: 10px; }
.is-calm .mascot .ch { animation: none; }
.scr__art > .mascot { margin-top: -4px; }

/* ---------- thẻ lựa chọn mang màu nốt ---------- */
.opt { position: relative; }
.opt__ico { background: var(--tone-l); color: var(--tone-i); }
.opt:not(:has(.opt__ico))::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--tone);
  box-shadow: 0 0 0 3px var(--tone-l); }
.opts--3 .opt:not(:has(.opt__ico))::before { margin: 2px 0 2px 2px; }
.opt.is-on { background: color-mix(in srgb, var(--tone-l) 50%, #fff);
  box-shadow: inset 0 0 0 2px var(--navy), var(--tone-d) 90%, transparent); }
.opt.is-on .opt__ico { background: #fff; box-shadow: inset 0 0 0 2px var(--tone); }
.is-calm .opt__ico { width: 40px; height: 40px; border-radius: 12px; }

/* ---------- màn chào: cả nhà đứng trên phím đàn, cao dần như gam đi lên ---------- */
.fam { position: relative; isolation: isolate; width: min(100%, 360px); margin: 26px auto 18px; padding: 0 6px; }
.fam::before { content: ""; position: absolute; z-index: -1; inset: -26px -24px -10px;
  background: radial-gradient(closest-side at 18% 40%, #FFF1CC, transparent), radial-gradient(closest-side at 82% 22%, #E2E2FB, transparent),
    radial-gradient(closest-side at 55% 80%, #FFE3DF, transparent), radial-gradient(closest-side at 40% 10%, #DBF6E5, transparent); opacity: .9; }
.fam__row { display: grid; grid-template-columns: repeat(7, 1fr); align-items: end; gap: 3px; }
.fam__m { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-width: 0; }
.fam__m .ch { width: 112%; max-width: 64px; height: auto; margin-bottom: -5px; animation: nf-bob 2.8s ease-in-out infinite; animation-delay: calc(var(--i) * -.4s); }
.fam__k { display: block; width: 100%; height: calc(28px + var(--i) * 9px); border-radius: 6px 6px 10px 10px; background: #fff;
  box-shadow: inset 0 6px 0 var(--tone), inset 0 0 0 1.5px rgba(15, 3, 78, .1), 0 10px 16px -12px rgba(15, 3, 78, .45); }
.fam::after { content: ""; display: block; height: 12px; margin: 0 -4px; border-radius: 4px 4px 10px 10px; background: var(--navy-grad); }
.scr--hero .scr__title { font-size: 30px; }
.welcome__logo { margin-top: 8px; }

/* ---------- câu hỏi xếp lớp ---------- */
.qz-card { box-shadow: inset 0 0 0 1.5px #F1E6D2, var(--card-shadow); }
.qz-opt { display: flex; align-items: center; justify-content: center; gap: 8px; }
.qz-opts:not(.qz-opts--grid) .qz-opt { justify-content: flex-start; }
.qz-opt.is-right { background: #E6F8EC; color: var(--navy); box-shadow: inset 0 0 0 2.5px #20A052;
  animation: nf-pop .35s ease-out; }
.qz-opt.is-right .ico { color: #17763C; flex: none; }

/* ---------- kết quả xếp lớp ---------- */
.result { position: relative; margin-top: 4px; }
.result__hero { position: relative; z-index: 1; display: flex; justify-content: center; margin-bottom: -30px; }
.result__ch { animation: nf-pop .6s .15s cubic-bezier(.3, 1.4, .5, 1) both; }
.result-card { overflow: hidden; padding-top: 44px; }
.rainbow { position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--rainbow); }
.confetti { position: absolute; z-index: 3; left: -8px; right: -8px; top: -20px; height: 380px; overflow: hidden; pointer-events: none; }
.confetti i { position: absolute; top: -14px; left: var(--x); width: 8px; height: 12px; opacity: 0;
  animation: nf-fall var(--t) var(--d) cubic-bezier(.25, .6, .4, 1) forwards; }
.scr--result.is-calm .result__hero { margin-bottom: -24px; }

/* ---------- kế hoạch ---------- */
.sum__ico { background: var(--tone-l); color: var(--tone-i); }
.today { background: var(--tone-l); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--tone) 45%, transparent); }
.today__k { color: var(--tone-i); }

/* ---------- màn sắp mở bán / lỗi tải: vài bạn nốt ---------- */
.soon__cast { display: flex; justify-content: center; align-items: flex-end; gap: 2px; margin: 28px auto 12px; }
.soon__cast .ch { animation: nf-bob 3s ease-in-out infinite; }
.soon__cast .ch:nth-child(2) { animation-delay: -1s; }
.soon__cast .ch:nth-child(3) { animation-delay: -2s; }

/* ---------- biểu tượng thẻ (trang chủ, tài khoản) mang màu nốt ---------- */
.hcard__ico, .dev__ico { background: var(--tone-l); color: var(--tone-i); }
.avatar { background: #fff; }

/* ---------- trang chủ ---------- */
.hhead .avatar { box-shadow: 0 0 0 2px #fff, 0 6px 14px -8px rgba(15, 3, 78, .6); }
.next-card { isolation: isolate; min-height: 214px;
  background: radial-gradient(circle at 86% 18%, color-mix(in srgb, var(--tone) 55%, transparent) 0, transparent 34%),
    linear-gradient(140deg, #2E1A86 0%, #5A2DB8 62%, #8438C9 100%);
  box-shadow: 0 30px 50px -30px rgba(90, 45, 184, .9); }
.next-card::before { content: ""; position: absolute; z-index: -1; left: -30px; bottom: -60px; width: 160px; height: 160px; border-radius: 50%;
  background: rgba(255, 255, 255, .06); }
.next-card__ch { position: absolute; right: 12px; top: 12px; line-height: 0; }
.next-card__ch .ch { animation: nf-bob 3s ease-in-out infinite; filter: drop-shadow(0 10px 12px rgba(15, 0, 78, .35)); }
.next-card__k, .next-card__meta, .next-card__title { margin-right: 104px; }
.is-calm .next-card__k, .is-calm .next-card__meta, .is-calm .next-card__title { margin-right: 84px; }
.is-calm .next-card { min-height: 0; }
.is-calm .next-card__ch .ch { animation: none; }
.next-card__k { background: rgba(255, 255, 255, .18); }
.next-card__meta { opacity: 1; color: #EDE6FF; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { position: relative; flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px 14px; background: var(--tone-l);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--tone) 30%, transparent), 0 12px 24px -20px var(--tone-d); }
.tile .hcard__ico { background: #fff; color: var(--tone-i); }
.tile .hcard__title { font-size: 16px; padding-right: 18px; }
.tile .hcard__v { color: var(--tone-i); font-size: 15px; }
.tile .hcard__sub { font-size: 13px; color: var(--navy-70); }
.tile .hcard__chev { position: absolute; top: 18px; right: 12px; color: var(--tone-i); }

/* ---------- lộ trình ---------- */
.chap__band { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px 14px 6px 6px; border-radius: 18px;
  background: var(--tone-l); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--tone) 35%, transparent); }
.chap__ch { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #fff; }
.chap__ch .ch { margin-top: 4px; }
.chap__title { flex: 1; min-width: 0; color: var(--tone-i); }
.chap__sub { color: var(--navy-70); }
.st-list { position: relative; gap: 10px; }
.st-list::before { content: ""; position: absolute; left: 33px; top: 30px; bottom: 30px; border-left: 3px dotted color-mix(in srgb, var(--tone) 55%, transparent); }
.st-list > li { position: relative; }
.st { box-shadow: inset 0 0 0 1.5px var(--line), 0 6px 14px -12px rgba(15, 3, 78, .35); }
.st__no { background: var(--tone-l); color: var(--tone-i); box-shadow: inset 0 0 0 2.5px var(--tone); }
.st--open .st__end { color: var(--tone-i); }
.st--cur { overflow: visible; background: linear-gradient(140deg, #2E1A86 0%, #5A2DB8 62%, #8438C9 100%); box-shadow: 0 16px 30px -18px rgba(90, 45, 184, .9); }
.st--cur .st__no { background: #fff; color: var(--tone-i); box-shadow: 0 0 0 3px var(--tone); }
.st--cur .st__sub { color: #EDE6FF; opacity: 1; }
.st__ch { flex: none; line-height: 0; margin: -18px -6px -6px 0; }
.st__ch .ch { animation: nf-bob 2.8s ease-in-out infinite; }
.is-calm .st__ch .ch { animation: none; }
.st--lock { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line); }
.st--lock .st__no { background: var(--bg); color: var(--muted); box-shadow: inset 0 0 0 1.5px rgba(15, 3, 78, .18); }
.st--lock .st__sub, .st--lock .st__end { color: var(--muted); }

/* ---------- hồ sơ ---------- */
.prof.is-on { background: #fff; box-shadow: inset 0 0 0 2px var(--navy); }
.av-pick__b { background: #fff; box-shadow: none; }
.av-pick__b[aria-checked="true"] { box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px var(--navy); }
.av-pick__b:focus-visible { box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px var(--navy), var(--focus); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
  .ch, .ch *, .mascot, .confetti i, .qz-opt.is-right { animation: none !important; }
  .confetti { display: none; }
}
.login__perks .ico { color: #17763C; }

/* ---------- xếp lớp: câu nghe cao độ / tiết tấu, hàng nút tên nốt ---------- */
.qz-listen { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 22px 16px 16px; text-align: center; }
.qz-play { min-width: 200px; }
.qz-play.is-playing:disabled { background: var(--tint); color: var(--navy); }
.qz-play.is-playing .ico { animation: qz-beat .75s ease-in-out infinite; }
@keyframes qz-beat { 50% { transform: scale(.82); } }
.qz-hint { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 6px 12px; border-radius: 999px;
  background: var(--bg); font-size: 14px; font-weight: 600; color: var(--muted); }
.qz-opts.qz-opts--row { grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 8px; }
.qz-opts.qz-opts--row .qz-opt { min-height: 60px; padding: 8px 4px; font-size: 17px; text-align: center; justify-content: center; }
.qz-opts--row[style*="--n: 7"] .qz-opt, .qz-opts--row[style*="--n: 6"] .qz-opt { min-height: 56px; border-radius: 14px; font-size: 16px; }
.qz-opts--row .qz-opt.is-right { flex-direction: column; gap: 0; }
.qz-opts--row .qz-opt.is-right .ico { width: 18px; height: 18px; }
.qz-rhys { display: flex; flex-direction: column; gap: 12px; }
.qz-opt.qz-rhy { position: relative; min-height: 0; padding: 6px 10px; justify-content: center; }
.qz-rhy__pic { display: block; width: 100%; max-width: 420px; line-height: 0; }
.qz-rhy__pic svg { display: block; width: 100%; height: auto; }
.qz-opt.qz-rhy:disabled:not(.is-on):not(.is-right) { opacity: .55; }
.qz-opts .qz-opt:disabled:not(.is-on):not(.is-right) { opacity: .55; }
.qz-opt.qz-rhy.is-right > .ico { position: absolute; top: 8px; right: 10px; }
@media (prefers-reduced-motion: reduce) { .qz-play.is-playing .ico { animation: none; } }

/* =====================================================================
 * Mốc 4: chuỗi ngày, nhiệm vụ hôm nay, chúc mừng, thành tích, giấy chứng nhận, báo cáo phụ huynh
 * ===================================================================== */

/* ---------- thẻ chuỗi ngày ---------- */
.streak { display: flex; flex-direction: column; gap: 14px; text-decoration: none; color: var(--navy);
  background: linear-gradient(135deg, #FFF3E2 0%, #FFE6CC 100%); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--tone) 35%, transparent), 0 12px 24px -20px var(--tone-d); }
.streak:active { transform: scale(.99); }
.streak:focus-visible { box-shadow: inset 0 0 0 2px var(--navy), var(--focus); }
.streak__top { display: flex; align-items: center; gap: 12px; }
.streak__fire { flex: none; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: #fff; color: #9A9AB0; }
.streak__fire.is-on { color: #fff; background: linear-gradient(160deg, #FFC93C 0%, #FF9A2E 45%, #FF4B4B 100%); box-shadow: none; }
.streak__fire.is-on .ico { fill: rgba(255, 255, 255, .25); }
.streak__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.streak__n { font-size: 16px; font-weight: 700; line-height: 1.3; }
.streak__n b { font-size: 26px; color: var(--tone-i); }
.streak__best { font-size: 13px; font-weight: 600; color: var(--muted); }
.streak .hcard__chev { color: var(--tone-i); }
.wk { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.wk__d { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.wk__dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #fff; box-shadow: inset 0 0 0 2px #E4DACA; }
.wk__l { font-size: 12px; font-weight: 700; color: var(--muted); }
.wk__d.is-done .wk__dot { background: linear-gradient(160deg, #FFB347 0%, #FF7A2E 100%); color: #fff; box-shadow: none; }
.wk__d.is-done .ico { stroke-width: 2.6; }
.wk__d.is-rest .wk__dot { background: var(--tone-l); color: var(--tone-i); box-shadow: inset 0 0 0 2px var(--tone); }
.wk__d.is-miss .wk__dot { background: #F2EEE7; box-shadow: inset 0 0 0 2px #E4DACA; }
.wk__d.is-today .wk__dot { background: #fff; box-shadow: inset 0 0 0 2.5px var(--tone), 0 0 0 4px color-mix(in srgb, var(--tone) 22%, transparent); }
.wk__d.is-today .wk__l { color: var(--tone-i); }
.wk__d.is-future .wk__dot { background: transparent; box-shadow: none; border: 1.5px dashed #D6CBB8; }

/* ---------- vòng phút + nhiệm vụ hôm nay ---------- */
.today2 { display: flex; flex-direction: column; gap: 14px; }
.today2__top { display: flex; align-items: center; gap: 14px; }
.today2__txt { flex: 1; min-width: 0; }
.today2__title { font-size: 20px; line-height: 1.3; font-weight: 700; color: var(--navy); text-wrap: balance; }
.today2__msg { margin: 4px 0 0; font-size: 14px; line-height: 1.4; font-weight: 600; color: var(--muted); }
.ring { position: relative; flex: none; width: 5.25rem; height: 5.25rem; }   /* theo cỡ chữ: chữ to thì vòng to theo, số không đè lên vòng */
.ring svg { display: block; width: 100%; height: 100%; }
.ring__p { stroke: #2F9BFF; transition: stroke-dasharray .6s ease; }
.ring.is-full .ring__p { stroke: #36C26B; }
.ring__v { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.ring__v b { font-size: 24px; color: var(--navy); }
.ring__v small { font-size: 11px; font-weight: 700; color: var(--muted); }
.tasks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.task { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 8px 12px 8px 8px; border: 0; border-radius: 16px; text-align: left; cursor: pointer;
  background: var(--tone-l); color: var(--navy); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--tone) 30%, transparent); }
.task:active { transform: scale(.99); }
.task:focus-visible { box-shadow: inset 0 0 0 2px var(--navy), var(--focus); }
.task__mark { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--tone-i); }
.task__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.task__title { font-weight: 700; font-size: 15px; line-height: 1.3; }
.task__sub { font-size: 13px; font-weight: 600; color: var(--muted); }
.task__chev { flex: none; color: var(--tone-i); display: grid; place-items: center; }
.task.is-done { background: #E6F8EC; box-shadow: inset 0 0 0 1.5px rgba(32, 160, 82, .35); }
.task.is-done .task__mark { background: #20A052; color: #fff; }
.task.is-done .task__mark .ico { stroke-width: 2.6; }
.task.is-done .task__title { color: var(--navy-90); }
.task.is-done .task__sub { color: #17763C; }
.task.is-done .task__chev { color: #17763C; }
.tile--wide { flex-direction: row; align-items: center; }
.tile--wide .hcard__chev { position: static; }

/* ---------- lộ trình: trạm đã qua ---------- */
.st.is-done .st__no { background: var(--tone-i); color: #fff; box-shadow: none; }
.st.is-done .st__no .ico { stroke-width: 2.6; }
.st--cur.is-done .st__no { background: #fff; color: var(--tone-i); }

/* ---------- huy chương ---------- */
.medal { flex: none; width: var(--m); height: var(--m); border-radius: 50%; display: grid; place-items: center; color: var(--tone-i);
  background: radial-gradient(circle at 35% 30%, #fff 0, var(--tone-l) 60%); box-shadow: inset 0 0 0 3px var(--tone), 0 8px 16px -10px var(--tone-d); }
.medal .ico { stroke-width: 1.9; }
.medal.is-off { color: #8C87A6; background: #F2EEE7; box-shadow: inset 0 0 0 2px #DCD2C2; }

/* ---------- màn chúc mừng ---------- */
.dlg.party { position: relative; overflow: hidden; padding: 0; width: min(100% - 32px, 380px); }
.party__in { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 26px 22px 22px; }
.party__glow { position: absolute; left: 50%; top: -90px; width: 320px; height: 260px; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--tone) 40%, transparent) 0, transparent 68%); pointer-events: none; }
.party__cast { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 4px; margin-bottom: 10px; }
.party__ch { animation: nf-jump .7s .2s cubic-bezier(.3, 1.6, .5, 1) both; }
.party__cast .medal { margin-left: -14px; margin-bottom: 6px; animation: nf-pop .6s .35s cubic-bezier(.3, 1.4, .5, 1) both; }
.party__paper { width: 72px; height: 72px; margin-left: -14px; margin-bottom: 6px; border-radius: 18px; display: grid; place-items: center; background: #fff; color: var(--tone-i);
  box-shadow: inset 0 0 0 3px var(--tone), 0 8px 16px -10px var(--tone-d); transform: rotate(6deg); animation: nf-pop .6s .35s cubic-bezier(.3, 1.4, .5, 1) both; }
.party__k { margin: 0; padding: 4px 12px; border-radius: 999px; background: var(--tone-l); color: var(--tone-i); font-size: 13px; font-weight: 700; }
.party__title { margin: 10px 0 0; font-size: 24px; line-height: 1.25; font-weight: 700; color: var(--navy); }
.party__desc { margin: 8px 0 0; font-size: 16px; line-height: 1.45; font-weight: 600; color: var(--muted); }
.party__count { margin: 8px 0 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.party__acts { align-self: stretch; display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.party__acts .btn { min-height: 52px; }
.party .confetti { top: 0; height: 100%; }

/* ---------- thành tích ---------- */
.bdgs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bdg { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 10px 14px; border-radius: var(--card-r); text-align: center;
  background: #fff; box-shadow: var(--card-shadow); }
.bdg.is-on { background: linear-gradient(180deg, var(--tone-l) 0%, #fff 75%); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--tone) 35%, transparent), var(--card-shadow); }
.bdg.is-off { background: #FBF8F3; box-shadow: inset 0 0 0 1.5px #ECE4D6; }
.bdg__title { font-weight: 700; font-size: 15px; line-height: 1.3; color: var(--navy); }
.bdg__sub { font-size: 13px; line-height: 1.35; font-weight: 600; color: var(--muted); }
.bdg.is-on .bdg__sub { color: var(--tone-i); }
.bdg__lock { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.cert-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cert-row { min-height: 72px; }
.cert-empty { display: flex; align-items: center; gap: 14px; background: var(--tone-l); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--tone) 35%, transparent); }
.cert-empty .hcard__ico { background: #fff; }

/* ---------- giấy chứng nhận ---------- */
.pcert-wrap { padding: 4px 0; }
.pcert { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 26px 18px 20px; border-radius: 10px; background: #FFFDF8; color: var(--navy);
  box-shadow: 0 1px 2px rgba(15, 3, 78, .08), 0 18px 36px -22px rgba(15, 3, 78, .45); }
.pcert__frame { position: absolute; inset: 8px; z-index: -1; border-radius: 6px; border: 2px solid #E8C873; box-shadow: inset 0 0 0 4px #FFFDF8, inset 0 0 0 5px #EFDDAA; pointer-events: none; }
.pcert__wm { position: absolute; z-index: -1; left: 50%; top: 52%; width: 62%; transform: translate(-50%, -50%); opacity: .04; pointer-events: none; }
.pcert__ribbon { display: flex; width: 150px; height: 6px; border-radius: 999px; overflow: hidden; margin: 2px 0 12px; }
.pcert__ribbon i { flex: 1; }
.pcert__brand { display: flex; flex-direction: column; align-items: center; }
.pcert__logo { width: 160px; height: auto; }   /* logo chữ ≥ 160 px ngang (bộ nhận diện) */
.pcert__by { margin-top: 2px; font-size: 11px; font-weight: 700; color: #6B6385; }
.pcert__kicker { margin: 14px 0 0; font-size: 26px; line-height: 1.2; font-weight: 700; color: #8A5A00; }
.pcert__to { margin: 10px 0 0; font-size: 14px; font-weight: 600; color: #5E5885; }
.pcert__name { margin: 6px 0 0; font-size: 30px; line-height: 1.2; font-weight: 700; color: var(--tone-i); overflow-wrap: anywhere; }
.pcert__text { margin: 8px 0 0; font-size: 14px; font-weight: 600; color: #5E5885; }
.pcert__chap { margin: 2px 0 0; font-size: 18px; line-height: 1.35; font-weight: 700; color: var(--navy); text-wrap: balance; }
.pcert__cast { display: flex; justify-content: center; gap: 2px; margin-top: 14px; }
.pcert__cast .ch { width: 34px; height: auto; }
.pcert__foot { align-self: stretch; display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; padding-top: 12px; border-top: 1px dashed #DCCB9C; text-align: left; }
.pcert__foot span { display: flex; flex-direction: column; }
.pcert__foot span + span { text-align: right; }
.pcert__foot small { font-size: 11px; font-weight: 700; color: #6B6385; }
.pcert__foot b { font-size: 14px; color: var(--navy); font-variant-numeric: tabular-nums; }
.center-t { text-align: center; }
.nowrap { white-space: nowrap; }
/* bản A4 ngoài màn hình để xuất PDF (794 × 1123 px ≈ A4 ở 96 dpi) */
.pcert-pdf { position: fixed; left: -10000px; top: 0; width: 794px; background: #fff; pointer-events: none; }
.pcert--a4 { width: 794px; height: 1123px; padding: 110px 80px 80px; border-radius: 0; box-shadow: none; }
.pcert--a4 .pcert__frame { inset: 28px; border-width: 4px; border-radius: 10px; box-shadow: inset 0 0 0 8px #FFFDF8, inset 0 0 0 10px #EFDDAA; }
.pcert--a4 .pcert__ribbon { width: 300px; height: 10px; margin-bottom: 36px; }
.pcert--a4 .pcert__logo { width: 280px; }
.pcert--a4 .pcert__by { font-size: 17px; }
.pcert--a4 .pcert__kicker { margin-top: 70px; font-size: 66px; }
.pcert--a4 .pcert__to { margin-top: 44px; font-size: 24px; }
.pcert--a4 .pcert__name { margin-top: 24px; font-size: 76px; }
.pcert--a4 .pcert__text { margin-top: 36px; font-size: 24px; }
.pcert--a4 .pcert__chap { margin-top: 10px; font-size: 38px; }
.pcert--a4 .pcert__cast { margin-top: 80px; gap: 10px; }
.pcert--a4 .pcert__cast .ch { width: 84px; }
.pcert--a4 .pcert__foot { margin-top: auto; padding-top: 22px; }
.pcert--a4 .pcert__foot small { font-size: 17px; }
.pcert--a4 .pcert__foot b { font-size: 24px; }

/* ---------- báo cáo phụ huynh ---------- */
.wseg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 999px; background: #F2EADC; }
.wseg__b { min-height: 44px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-weight: 700; font-size: 15px; cursor: pointer; }
.wseg__b[aria-pressed="true"] { background: #fff; color: var(--navy); box-shadow: none; }
.wseg__b:focus-visible { box-shadow: var(--focus); }
.rprofs { display: flex; gap: 8px; overflow-x: auto; padding: 2px; }
.rprof { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 14px 4px 4px; border: 0; border-radius: 999px; cursor: pointer;
  background: #fff; color: var(--navy); font-weight: 700; font-size: 15px; box-shadow: inset 0 0 0 1.5px var(--line); }
.rprof[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--navy); }
.rprof:focus-visible { box-shadow: inset 0 0 0 2px var(--navy), var(--focus); }
.rbody { display: flex; flex-direction: column; gap: 14px; }
.rload { display: grid; place-items: center; min-height: 200px; }
.rsec__title { font-size: 17px; line-height: 1.3; font-weight: 700; color: var(--navy); }
.rchart { padding: 16px 14px 10px; }
.rchart__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.rchart__goal { display: flex; align-items: center; gap: 6px; margin: 2px 0 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.rchart__goal i { width: 22px; border-top: 2px dashed #5E5885; }
.rchart__range { font-size: 13px; font-weight: 700; color: var(--muted); }
.rchart svg { display: block; height: auto; }
.rstats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rstat { display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: var(--card-r); background: var(--tone-l);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--tone) 30%, transparent); }
.rstat__ico { width: 34px; height: 34px; margin-bottom: 4px; border-radius: 11px; display: grid; place-items: center; background: #fff; color: var(--tone-i); }
.rstat__k { font-size: 13px; font-weight: 700; color: var(--navy-90); }
.rstat__v { font-size: 22px; line-height: 1.2; font-weight: 700; color: var(--tone-i); }
.rstat__sub { font-size: 12px; font-weight: 600; color: var(--navy-90); }
.rstation__v { margin: 6px 0 10px; font-size: 16px; line-height: 1.4; font-weight: 700; color: var(--navy-90); }
.rstation__sub { margin: 6px 0 0; font-size: 13px; font-weight: 700; color: var(--tone-i); }
.rbar { height: 12px; border-radius: 999px; background: var(--tone-l); overflow: hidden; }
.rbar > span { display: block; height: 100%; border-radius: inherit; background: var(--tone); }
.rbadges__list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rbadges__list li { display: flex; align-items: center; gap: 12px; }
.rbadges__txt { display: flex; flex-direction: column; }
.rbadges__txt b { font-size: 15px; color: var(--navy); }
.rbadges__txt small { font-size: 13px; font-weight: 600; color: var(--muted); }
.rbadges .note { margin-top: 6px; }
.rhint { display: flex; align-items: flex-end; gap: 10px; }
.rhint .mascot { flex: none; }
.rhint__txt { flex: 1; min-width: 0; margin: 0 0 8px; padding: 12px 16px; border-radius: 20px 20px 20px 6px; background: #fff;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--tone) 35%, transparent), var(--card-shadow); display: flex; flex-direction: column; gap: 2px; }
.rhint__txt b { font-size: 14px; color: var(--tone-i); }
.rhint__txt span { font-size: 15px; line-height: 1.45; font-weight: 600; color: var(--navy); }
@media (prefers-reduced-motion: reduce) { .party__ch, .party__cast .medal, .party__paper { animation: none !important; } }

/* ---------- M4: nhắc tập (cài đặt hồ sơ, hộp xin quyền thông báo) ---------- */
.profrow { display: flex; align-items: stretch; gap: 8px; }
.profrow .prof { flex: 1; min-width: 0; }
.prof__set { flex: none; width: 56px; border: 0; border-radius: var(--card-r); background: #fff; color: var(--navy); cursor: pointer;
  display: grid; place-items: center; box-shadow: var(--card-shadow); }
.prof__set:focus-visible { box-shadow: inset 0 0 0 2px var(--navy), var(--focus); }
.remind { display: flex; flex-direction: column; gap: 14px; padding: 16px; }
.remind__row { display: flex; align-items: center; gap: 14px; }
.remind__row .hcard__txt { flex: 1; min-width: 0; cursor: pointer; }
.remind__time-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.remind__time { width: 136px; flex: none; text-align: center; font-variant-numeric: tabular-nums; }
.remind__time:disabled { opacity: .5; }
.remind__perm { padding: 10px 12px; border-radius: 14px; background: #FDECEA; color: var(--danger); font-weight: 600; }
.switch { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 52px; height: 32px; margin: 0; border-radius: 999px;
  background: var(--tint); box-shadow: inset 0 0 0 1.5px var(--line); cursor: pointer; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff;
  box-shadow: none; transition: transform .2s; }
.switch:checked { background: var(--navy); box-shadow: none; }
.switch:checked::after { transform: translateX(20px); }
.switch:focus-visible { box-shadow: var(--focus); }
@media (prefers-reduced-motion: reduce) { .switch, .switch::after { transition: none; } }
/* Cài đặt trong Tài khoản: Âm thanh / Rung / Giảm chuyển động (công tắc) + Âm lượng (thanh kéo) */
.cd-vol { display: flex; flex-direction: column; gap: 6px; }
.cd-vol__v { flex: none; min-width: 52px; text-align: right; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.cd-vol__range { width: 100%; min-height: 44px; margin: 0; accent-color: var(--navy); cursor: pointer; }

/* ---------- Cài đặt › Kết nối đàn (#/ket-noi-dan, screens/ket-noi-dan.js; tấm phủ trong bài .knd-tam) ---------- */
.knd { display: flex; flex-direction: column; gap: 12px; }
.knd-dung { display: flex; flex-direction: column; gap: 12px; border: 2px solid transparent; }
.knd-dung__hang { display: flex; align-items: center; gap: 12px; }
.knd-dung > .po-nut { align-self: flex-start; margin-left: 56px; }
.knd-dung.is-on { border-color: var(--tone); background: var(--tone-l); }
.knd-dung .hcard__ico { background: var(--tone-l); color: var(--tone-i); }
.knd-dung.is-on .hcard__ico { background: var(--tone-i); color: #fff; }
.knd-head { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; }
.knd-head__ico { flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center;
  background: var(--tone-l); color: var(--tone-i); margin-top: 2px; }
.knd-ds .dev .po-nut { flex: none; }
.knd-ds .dev .gm-cho { flex: none; }
.knd-chip { gap: 4px; background: var(--tone-l); color: var(--tone-i); }
.knd-hang { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.knd-quet { gap: 6px; min-width: 112px; }
.knd-hang .gm-cho { flex-direction: row; gap: 8px; }
.knd-bao:empty { display: none; }
.knd-bao { color: var(--navy); font-weight: 600; }
.knd-goi-y { font-size: 14px; }
.knd-chi { display: flex; align-items: center; gap: 12px; }
.knd-thu { display: flex; flex-direction: column; gap: 12px; padding: 16px 12px; overflow: hidden; }
.knd-thu__ten { margin: 0; text-align: center; font-size: 26px; line-height: 1.25; font-weight: 800; color: var(--tone, var(--navy)); min-height: 33px; }
/* bàn phím chỉ để xem (trọn Đô3–Đô6, phím sáng theo đàn): không ô cuộn ngang nào – WebView Android ngừng vẽ lại cả màn
   khi có ô cuộn lồng trong trang cuộn dọc (màn trắng phần đầu) */
.knd-thu__phim { pointer-events: none; }
.knd-thu .gm-bp { overflow-x: hidden; }
/* tấm phủ trong bài: toàn màn, cuộn được, không rời bài */
.knd-tam { width: 100%; max-width: var(--app-w); height: 100%; max-height: 100%; margin: 0 auto; padding: 0; border: 0;
  background: var(--bg); color: var(--navy); display: flex; flex-direction: column; }
.knd-tam:not([open]) { display: none; }
.knd-tam::backdrop { background: rgba(15, 3, 78, .42); }
.knd-tam__dau { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(12px + var(--safe-t)) var(--pad) 12px; background: var(--bg); box-shadow: 0 1px 0 var(--line); z-index: 1; }
.knd-tam__tieu { margin: 0; font-size: 22px; font-weight: 800; }
.knd-tam__than { flex: 1; overflow-y: auto; padding: 16px var(--pad) calc(24px + var(--safe-b)); }

/* ---------- màn xin quyền trước (student/xin-quyen.js) – kiểu Duolingo, giao diện sáng Say Piano ---------- */
.xq { --ok: #36C26B; --ok-d: #20A052; position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; max-width: var(--app-w, 600px); margin: 0 auto;
  width: 100%; height: 100%; max-height: none; border: 0; color: var(--navy);
  padding: calc(var(--safe-t, 0px) + 16px) 16px calc(var(--safe-b, 0px) + 16px); background: var(--bg); opacity: 0; transform: translateY(16px);
  transition: opacity .2s, transform .22s cubic-bezier(.2, .8, .2, 1); overflow-y: auto; }
.xq.is-in { opacity: 1; transform: none; }
.xq:not([open]) { display: none; }
.xq::backdrop { background: var(--bg); }
.xq__top { padding: 6px 4px 0; }
.xq__bar { height: 14px; border-radius: 999px; background: #EFE7D8; overflow: hidden; }
.xq__bar > span { display: block; width: 62%; height: 100%; border-radius: inherit; background: var(--brand-progress);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .1), inset 0 3px 0 rgba(255, 255, 255, .25); }
.xq__than { flex: 1; display: flex; flex-direction: column; gap: 18px; padding: 18px 0 12px; }
.xq__noi { display: flex; align-items: flex-end; gap: 6px; }
.xq__nv { flex: none; line-height: 0; }
.xq__nv :is(svg, .nv3d img) { display: block; }
.xq__bong { position: relative; flex: 1; margin: 0 0 18px; padding: 12px 16px; border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 2px #E2EEFF;
  font-size: 18px; font-weight: 700; line-height: 1.35; color: var(--navy); }
.xq__bong::before { content: ""; position: absolute; left: -9px; bottom: 16px; width: 16px; height: 16px; background: #fff;
  box-shadow: -2px 2px 0 #E2EEFF; transform: rotate(45deg); }
.xq__minh-hoa { display: flex; justify-content: center; }
.xq-he { width: min(100%, 320px); display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 22px 18px 18px; border-radius: 28px;
  background: #fff; box-shadow: 0 2px 0 #EFE7D8, 0 18px 40px -22px rgba(15, 3, 78, .45); text-align: center; }
.xq-he__ico { width: 44px; height: 44px; border-radius: 12px; }
.xq-he__hoi { margin: 0 0 4px; font-size: 17px; line-height: 1.35; color: #2A2140; }
.xq-he__nut-o { display: flex; align-items: center; gap: 4px; width: 100%; }
.xq-he__nut-o .xq-he__nut { flex: 1; }
.xq-he__nut { display: block; width: 100%; padding: 11px 12px; border-radius: 999px; font-weight: 700; font-size: 15px; }
.xq-he__nut.is-chon { background: #D6E4FF; color: #0B3D91; box-shadow: 0 0 0 3px #2F7BFF; }
.xq-he__nut.is-mo { background: #F2EFEA; color: #A39C90; }
.xq-he__ten { flex: none; width: 46px; height: 30px; animation: xq-chi 1.1s ease-in-out infinite; }
@keyframes xq-chi { 50% { transform: translateX(-6px); } }
.xq-noi { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.xq-noi__o { margin: 0; padding: 12px 10px 10px; border-radius: 22px; background: #fff; box-shadow: 0 2px 0 #EFE7D8; text-align: center; }
.xq-noi__o svg { display: block; width: 100%; height: auto; }
.xq-noi__o figcaption { margin-top: 6px; font-weight: 700; font-size: 15px; color: var(--navy); }
.xq__tran-an { margin: 0; text-align: center; font-size: 15px; line-height: 1.45; font-weight: 600; color: var(--muted); }
.xq__chan { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.xq__phu { align-self: center; min-height: 48px; padding: 0 18px; border: 0; background: none; font: inherit; font-weight: 700; font-size: 16px; color: var(--muted); cursor: pointer; }
html.po-giam .xq, html.po-giam .xq-he__ten { transition: none; animation: none; }

/* ---------- Trang chẩn đoán ẩn (#/chan-doan) ---------- */
.chd-the { padding: 14px 16px; margin-bottom: 12px; display: grid; gap: 10px; }
.chd-h { font-size: 1rem; margin: 0; }
.chd-pre { margin: 0; white-space: pre-wrap; word-break: break-word; font: 12px/1.45 ui-monospace, Menlo, Consolas, monospace; color: #1d1640; }
.chd-nk { max-height: 50vh; overflow: auto; background: rgba(15, 0, 78, .04); border-radius: 12px; padding: 10px; }
.chd-hang { display: flex; flex-wrap: wrap; gap: 8px; }
/* Kết nối đàn › phát tiếng qua (chỉ hiện khi đàn có USB audio) */
.knd-ra { display: grid; gap: 10px; padding: 14px 16px; }
.knd-ra[hidden] { display: none; }
.knd-ra__chu { margin: 0; font-weight: 700; }
.knd-ra__chon { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(15, 0, 78, .06); }
.knd-ra__nut { border: 0; border-radius: 999px; padding: 10px 12px; background: transparent; font: inherit; font-weight: 700; color: #5b5578; cursor: pointer; }
.knd-ra__nut[aria-checked="true"] { background: #fff; color: #1d1640; box-shadow: none; }

/* app học viên: không bôi đen / không menu chạm giữ (student/khoa-chon.js); ô nhập vẫn chọn, dán được */
html.po-khoa-chon body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
html.po-khoa-chon img { -webkit-user-drag: none; }
html.po-khoa-chon :is(input, textarea, select, [contenteditable="true"]) { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }

/* bản web /hoc: tiến độ tải sẵn (lần đầu) + dải ngoại tuyến (student/sw-web.js) */
.smp-tai-san, .smp-ngoai-tuyen { position: fixed; z-index: 9000; left: 50%; transform: translateX(-50%); max-width: calc(100vw - 32px);
  padding: 8px 16px; border-radius: 999px; font: 700 14px/1.3 "Quicksand", system-ui, sans-serif; pointer-events: none; text-align: center; }
.smp-tai-san { bottom: calc(var(--safe-b, 0px) + 12px); background: #FFFFFF; color: #5B2BC4; box-shadow: inset 0 0 0 2px #E3D9F6, 0 3px 0 #E3D9F6; }
.smp-ngoai-tuyen { top: calc(var(--safe-t, 0px) + 10px); background: #FFF5D9; color: #8A5300; box-shadow: inset 0 0 0 2px #FFE3A0; }
.smp-tai-san[hidden], .smp-ngoai-tuyen[hidden] { display: none; }
