/* lv5 "đề thật" (docs/nang-cap-uiux/DAC-TA-DE-THAT.md, the two demo videos of anh Cường 23/10): three strips, A the queue + the
   clock + Kết thúc, B one white card whose body is the screen of the moment (main[data-pha], man-hoc-v5.js), C Pika's strip.
   Sizes are the video's CSS pixels: a 960 × 540 page shown at 2× (1920 × 1080), a 480 × 853 page at 2.25× (1080 × 1920);
   man-hoc-v5.js zooms main to the window so 1920 × 1080 is the video and 1366 × 860 keeps its proportions. Tall or narrow
   windows (main.v5-doc) stack the same DOM (§4). Loaded only when UI_VARIANT=lv5 (main.py), after lesson-v4.css; main carries
   "session lv5" only, so no v2 / v4 rule applies. */

@import url("https://fonts.googleapis.com/css2?family=Itim&display=swap");      /* v2 the pencil hint (goi_y_tay); Patrick Hand / cursive else */

main.session.lv5 {
  --v5-cam: #f08a1d; --v5-cam-nhat: #fff0dc; --v5-la: #2eb872; --v5-xd: #3b82f6; --v5-tim: #8b5cf6; --v5-vang: #ffd166; --v5-vang-o: #ffe08a;
  --v5-bang: #2f6b4f; --v5-go: #b8864b; --v5-be: #efe4d2; --v5-pill: #4a4a55; --v5-chu: #2b2a33; --v5-xam: #8a8796; --v5-vien: #e8e2d8;
  position: fixed; inset: 0; z-index: 1; width: auto; height: auto; max-width: none; margin: 0;
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: calc(78 * var(--u)) minmax(0, 1fr) calc(70 * var(--u)); grid-template-areas: "a" "b" "c";
  gap: calc(8 * var(--u)); padding: calc(6 * var(--u)) calc(12 * var(--u)) calc(10 * var(--u)); overflow: hidden;
  background: linear-gradient(120deg, #fff8ef 0%, #fdf3f6 55%, #eef6fb 100%);
  font-family: "Nunito", system-ui, sans-serif; color: var(--v5-chu); font-size: max(15px, calc(17 * var(--u))); line-height: calc(26 * var(--u));
}
main.session.lv5 > * { min-width: 0; min-height: 0; }
main.session.lv5 .card { margin: 0; }
main.lv5 .v5-a, main.lv5 .v5-b, main.lv5 .v5-c { background: #fff; border: 0; border-radius: calc(18 * var(--u)); box-shadow: 0 calc(6 * var(--u)) calc(22 * var(--u)) rgba(120, 90, 60, .08), 0 calc(1 * var(--u)) calc(2 * var(--u)) rgba(120, 90, 60, .05); }
main.lv5 button { font-family: inherit; }
/* the board's own content (board-ops / bang.css / tuong-tac.css keep their px) is scaled as one piece: --zb = --u, never under 1.16
   so their 13 px text reads at 15 px (man-hoc-v5.js coGian). The rules below on .v5-buoc, .v5-bang-xanh's inside, .v5-hd-de .board
   and .v5-c-chon stay in px for that reason. */
main.lv5 .v5-buoc, main.lv5 .v5-hd-de .board, main.lv5 .v5-c-chon { zoom: var(--zb, 1); font-size: 17px; line-height: 26px; }

/* ---------------- A: the queue ---------------- */
main.lv5 .v5-a { grid-area: a; display: flex; align-items: center; gap: calc(18 * var(--u)); padding: calc(8 * var(--u)) calc(12 * var(--u)) calc(8 * var(--u)) calc(16 * var(--u)); position: relative; min-height: 0; height: auto; }
main.lv5 .v5-a-t { flex: none; display: flex; flex-direction: column; gap: calc(3 * var(--u)); min-width: calc(150 * var(--u)); align-self: flex-start; padding-top: calc(10 * var(--u)); }
main.lv5 .v5-a-t1 { font-size: max(15px, calc(15 * var(--u))); font-weight: 800; color: var(--v5-xam); }
main.lv5 .v5-a-dot { display: none; }
main.lv5 .v5-a-t2 { font-size: max(15px, calc(15 * var(--u))); font-weight: 900; color: var(--v5-chu); }
main.lv5 .v5-a-t2:empty { display: none; }
main.lv5 .v5-a .v5-chip { align-self: flex-start; }
main.lv5:not(.v5-doc) .v5-a .v5-chip { display: none; }   /* the landscape video shows no chip in the queue */
main.lv5 .v5-tiles { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: calc(12 * var(--u)); overflow-x: auto; overflow-y: visible; padding: calc(12 * var(--u)) calc(4 * var(--u)) calc(4 * var(--u)); scrollbar-width: none; }
main.lv5 .v5-o { position: relative; flex: none; width: calc(66 * var(--u)); height: calc(60 * var(--u)); border-radius: calc(12 * var(--u)); border: calc(2 * var(--u)) solid #e2dfe8; background: #f3f1f6;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: calc(4 * var(--u)) calc(4 * var(--u)) calc(2 * var(--u)); transition: background .3s, border-color .3s; }
main.lv5 .v5-o-anh { width: 100%; height: calc(28 * var(--u)); border-radius: calc(6 * var(--u)); overflow: hidden; background: #e6e3ea; display: grid; place-items: center; }
main.lv5 .v5-o-anh canvas { width: 100%; height: 100%; object-fit: cover; object-position: left top; display: block; }
main.lv5 .v5-o-ma { font-size: max(15px, calc(15 * var(--u))); font-weight: 900; color: #b3afbd; line-height: 1.1; }
main.lv5 .v5-o-nhan { position: absolute; top: calc(-12 * var(--u)); left: 50%; transform: translateX(-50%); white-space: nowrap; padding: calc(1 * var(--u)) calc(7 * var(--u)); border-radius: calc(8 * var(--u));
  font-size: max(var(--f-min), calc(10 * var(--u))); font-weight: 900; color: #fff; background: #8f8b99; z-index: 1; }
/* v2: a done tile is light blue (yellow / orange now mean "look again", never red) */
main.lv5 .v5-o[data-tt="da_lam"] { background: #e3eeff; border-color: #8fb3f3; box-shadow: 0 0 0 calc(2 * var(--u)) rgba(59, 130, 246, .18); }
main.lv5 .v5-o[data-tt="da_lam"] .v5-o-ma { color: #1e4fa8; }
main.lv5 .v5-o[data-tt="dang_xet"] { box-shadow: 0 0 0 calc(3 * var(--u)) #fff, 0 0 0 calc(5 * var(--u)) var(--v5-xd); }
main.lv5 .v5-o[data-tt="chua"], main.lv5 .v5-o[data-tt="lam_lai"] { background: #fff3c4; border-color: #f5a524; box-shadow: 0 0 0 calc(3 * var(--u)) #fff, 0 0 0 calc(5 * var(--u)) #93b4f5; }
main.lv5 .v5-o[data-tt="co_day_lai"] { background: var(--v5-cam-nhat); border-color: var(--v5-cam); box-shadow: 0 0 0 calc(3 * var(--u)) #fff, 0 0 0 calc(5 * var(--u)) #93b4f5; }
main.lv5 .v5-o[data-tt="chua"] .v5-o-ma, main.lv5 .v5-o[data-tt="lam_lai"] .v5-o-ma { color: #8a5a00; }
main.lv5 .v5-o[data-tt="co_day_lai"] .v5-o-ma { color: var(--v5-cam); }
main.lv5 .v5-o[data-tt="chua"] .v5-o-nhan, main.lv5 .v5-o[data-tt="lam_lai"] .v5-o-nhan { background: #d98a00; }
main.lv5 .v5-o[data-tt="de_pika"] { background: #efe9fe; border-color: #a98bf7; border-style: dashed; }
main.lv5 .v5-o[data-tt="de_pika"] .v5-o-ma { color: #6d4fd6; }
main.lv5 .v5-o[data-tt="de_pika"] .v5-o-nhan { background: #8b6cf0; }
main.lv5 .v5-o-tr { position: absolute; left: calc(-6 * var(--u)); top: calc(-10 * var(--u)); z-index: 1; padding: 0 calc(5 * var(--u)); border-radius: calc(6 * var(--u));
  background: #4a4a55; color: #fff; font-size: max(var(--f-min), calc(10 * var(--u))); font-weight: 900; line-height: 1.3; white-space: nowrap; }
main.lv5 .v5-o[data-tt="co_giang"] { background: var(--v5-cam-nhat); border-color: var(--v5-cam); box-shadow: 0 0 0 calc(3 * var(--u)) #fff, 0 0 0 calc(5 * var(--u)) #93b4f5; }
main.lv5 .v5-o[data-tt="co_giang"] .v5-o-ma { color: var(--v5-cam); }
main.lv5 .v5-o[data-tt="co_giang"] .v5-o-nhan, main.lv5 .v5-o[data-tt="co_day_lai"] .v5-o-nhan { background: var(--v5-cam); }
/* đợt 3 R3: a question left for another day: settled, neutral grey (never the green of ✓, never the yellow / orange of a mistake) */
main.lv5 .v5-o[data-tt="on_sau"] { background: #eef0f3; border-color: #b8bfca; border-style: dashed; }
main.lv5 .v5-o[data-tt="on_sau"] .v5-o-ma { color: #5b6472; }
main.lv5 .v5-o[data-tt="on_sau"] .v5-o-nhan { background: #7b8494; }
main.lv5 .v5-o[data-tt="xong"] { background: var(--v5-la); border-color: #22a463; }
main.lv5 .v5-o[data-tt="xong"] .v5-o-anh { background: transparent; }
main.lv5 .v5-o[data-tt="xong"] .v5-o-ma { color: #fff; }
main.lv5 .v5-o-tick { font-size: max(15px, calc(26 * var(--u))); font-weight: 900; color: #fff; line-height: 1; }
main.lv5 .v5-o.them { justify-content: center; gap: 0; border-style: dashed; }
main.lv5 .v5-o.them b { font-size: max(15px, calc(20 * var(--u))); color: #9b97a6; }
main.lv5 .v5-o.them small { font-size: max(var(--f-min), calc(10 * var(--u))); font-weight: 800; color: #9b97a6; }
main.lv5 .v5-dh { flex: none; margin-left: auto; width: calc(120 * var(--u)); height: calc(64 * var(--u)); border-radius: calc(14 * var(--u)); display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #fff; background: linear-gradient(160deg, #ff9a3d, #f2701c); box-shadow: 0 calc(6 * var(--u)) calc(16 * var(--u)) rgba(242, 112, 28, .28); }
main.lv5 .v5-dh[data-kieu="het"] { background: linear-gradient(160deg, #ffc94d, #f5a524); box-shadow: 0 calc(6 * var(--u)) calc(16 * var(--u)) rgba(245, 165, 36, .3); }
main.lv5 .v5-dh[data-kieu="xanh"] { background: linear-gradient(160deg, #39c47e, #22a463); box-shadow: 0 calc(6 * var(--u)) calc(16 * var(--u)) rgba(46, 184, 114, .28); }
main.lv5 .v5-dh small { font-size: max(var(--f-min), calc(11 * var(--u))); font-weight: 800; opacity: .95; }
main.lv5 .v5-dh b { font-size: max(15px, calc(28 * var(--u))); font-weight: 900; line-height: 1.05; letter-spacing: calc(.5 * var(--u)); }
/* Kết thúc: not in the video, the only way out: small and quiet at the right end */
main.lv5 .v5-a > .btn.danger { flex: none; text-transform: none; letter-spacing: 0; min-height: calc(26 * var(--u)); padding: 0 calc(9 * var(--u)); font-size: max(var(--f-min), calc(11 * var(--u))); border-radius: calc(9 * var(--u)); background: transparent; color: #a19dac;
  border: calc(1 * var(--u)) solid var(--v5-vien); box-shadow: none; }
main.lv5 .v5-a > .btn.danger:hover { color: var(--v5-cam); border-color: var(--v5-cam); }
main.lv5 .v5-dh.hidden + .btn.danger { margin-left: auto; }

/* chips */
main.lv5 .v5-chip { display: inline-flex; align-items: center; white-space: nowrap; padding: calc(2 * var(--u)) calc(9 * var(--u)); border-radius: calc(9 * var(--u)); font-size: max(var(--f-min), calc(12 * var(--u))); font-weight: 900; line-height: calc(18 * var(--u)); }
main.lv5 .v5-chip.cam { background: var(--v5-cam-nhat); color: var(--v5-cam); }
main.lv5 .v5-chip.cam-dam { background: var(--v5-cam); color: #fff; }
main.lv5 .v5-chip.xanh { background: #e5efff; color: var(--v5-xd); }
main.lv5 .v5-chip.la { background: #ddf6e8; color: #1f9a5c; }
main.lv5 .v5-chip.hong { background: #fff3c4; color: #9a6b00; }      /* v2: no red chip any more (kept for old data) */
main.lv5 .v5-chip.vang { background: #fff3c4; color: #9a6b00; }
main.lv5 .v5-chip.tim { background: #a98bf7; color: #fff; }
main.lv5 .v5-chip.xam { background: #f0eef3; color: var(--v5-xam); }

/* ---------------- B: the card ---------------- */
main.lv5 .v5-b { grid-area: b; position: relative; display: flex; flex-direction: column; padding: calc(8 * var(--u)) calc(6 * var(--u)) calc(6 * var(--u)); overflow: hidden; }
main.lv5 .v5-b-h { flex: none; display: flex; align-items: center; gap: calc(8 * var(--u)); min-height: calc(28 * var(--u)); padding: 0 calc(8 * var(--u)) calc(6 * var(--u)); }
main.lv5 .v5-b-ic { font-size: max(15px, calc(15 * var(--u))); }
main.lv5 .v5-b-ic:empty { display: none; }
main.lv5 .v5-b-ten { font-size: max(15px, calc(15 * var(--u))); font-weight: 900; color: var(--v5-chu); white-space: nowrap; }
main.lv5 .v5-b-chips { display: inline-flex; gap: calc(6 * var(--u)); min-width: 0; overflow: hidden; }
main.lv5 .v5-pill { margin-left: auto; max-width: 56%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: calc(4 * var(--u)) calc(12 * var(--u)); border-radius: calc(999 * var(--u));
  background: var(--v5-pill); color: #fff; font-size: max(var(--f-min), calc(10 * var(--u))); font-weight: 800; }
main.lv5 .v5-b-body { flex: 1 1 auto; min-height: 0; display: grid; gap: calc(12 * var(--u)); grid-template-columns: minmax(0, 1fr); grid-template-areas: "noi"; position: relative; padding: 0 calc(4 * var(--u)); }
main.lv5 .v5-b-body > * { min-width: 0; min-height: 0; }
main.lv5 .v5-noi { grid-area: noi; overflow: auto; }
main.lv5 .v5-noi:empty, main.lv5 .v5-phai:empty { display: none; }
main.lv5 .v5-phai { grid-area: phai; }
/* the camera frame: never display:none (its <video> keeps presenting frames), parked tiny and invisible out of the camera screens */
main.lv5 .v5-cam { grid-area: cam; position: absolute; left: 0; bottom: 0; width: calc(8 * var(--u)); height: calc(6 * var(--u)); opacity: .01; overflow: hidden; pointer-events: none; }
main.lv5 .v5-bang { grid-area: bang; display: none; }

/* camera screens: a beige panel, the dashed camera frame on the left (55 %), the white instruction box on the right */
main.lv5.v5-cam-pha .v5-b-body { grid-template-columns: minmax(0, 55fr) minmax(0, 44fr); grid-template-areas: "cam phai"; background: var(--v5-be);
  border-radius: calc(12 * var(--u)); padding: calc(6 * var(--u)) calc(6 * var(--u)) calc(6 * var(--u)) calc(8 * var(--u)); margin: 0 calc(2 * var(--u)); gap: calc(12 * var(--u)); }
main.lv5.v5-cam-pha .v5-cam { position: relative; left: auto; bottom: auto; width: auto; height: auto; opacity: 1; pointer-events: auto;
  border: calc(2 * var(--u)) dashed var(--v5-xd); border-radius: calc(6 * var(--u)); background: var(--v5-be); overflow: hidden; }
main.lv5 .v5-cam-tag { position: absolute; left: calc(8 * var(--u)); top: 0; z-index: 3; padding: calc(1 * var(--u)) calc(8 * var(--u)); border-radius: 0 0 calc(6 * var(--u)) calc(6 * var(--u)); background: var(--v5-xd); color: #fff; font-size: max(var(--f-min), calc(11 * var(--u))); font-weight: 900; }
main.lv5 .v5-cam .cam-wrap { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; aspect-ratio: auto; border: 0; border-radius: 0; background: transparent; margin: 0; }
main.lv5 .v5-cam .cam-wrap::before, main.lv5 .v5-cam .cam-wrap::after { display: none; }
main.lv5 .v5-cam .cam-wrap video { width: 100%; height: 100%; object-fit: contain; background: transparent; }
main.lv5 .v5-cam .cam-badge { position: absolute; top: auto; left: 50%; bottom: calc(26 * var(--u)); transform: translateX(-50%); z-index: 4; padding: calc(3 * var(--u)) calc(10 * var(--u)); border-radius: calc(10 * var(--u)); background: rgba(43, 42, 51, .75); color: #fff; font-size: max(var(--f-min), calc(11 * var(--u))); font-weight: 800; }
main.lv5 .v5-cam .cam-orient { position: absolute; right: calc(6 * var(--u)); top: calc(4 * var(--u)); z-index: 4; }
main.lv5 .v5-cam-anh { position: absolute; inset: calc(8 * var(--u)) calc(8 * var(--u)) calc(8 * var(--u)); z-index: 2; display: flex; align-items: center; justify-content: flex-start; background: var(--v5-be); }
/* đợt 2 U2: man-hoc-v5.js datLop() sizes the layer to the photo as shown (px), the img fills it exactly: % frames sit on the photo */
main.lv5 .v5-cam-lop { position: relative; flex: none; height: 100%; max-width: 100%; }
main.lv5 .v5-cam-lop > img { display: block; width: 100%; height: 100%; object-fit: fill; }
main.lv5 .v5-k { position: absolute; border: calc(2 * var(--u)) solid var(--v5-cam); border-radius: calc(6 * var(--u)); animation: v5-moc .35s ease both; }
main.lv5 .v5-k > span { position: absolute; left: calc(-12 * var(--u)); top: calc(-2 * var(--u)); padding: 0 calc(5 * var(--u)); border-radius: calc(5 * var(--u)); background: var(--v5-cam); color: #fff; font-size: max(var(--f-min), calc(10 * var(--u))); font-weight: 900; line-height: calc(15 * var(--u)); }
main.lv5 .v5-cum { position: absolute; border-radius: calc(8 * var(--u)); background: color-mix(in srgb, var(--m) 22%, transparent); box-shadow: 0 0 calc(10 * var(--u)) color-mix(in srgb, var(--m) 50%, transparent); }
main.lv5 .v5-cum > span { position: absolute; right: calc(-6 * var(--u)); top: calc(-10 * var(--u)); padding: 0 calc(7 * var(--u)); border-radius: calc(6 * var(--u)); background: var(--m); color: #fff; font-size: max(var(--f-min), calc(11 * var(--u))); font-weight: 900; }
main.lv5 .v5-cum.xam > span { left: calc(-6 * var(--u)); right: auto; }
@keyframes v5-moc { from { opacity: 0; transform: scale(.96); } }
main.lv5 .v5-cam-trong { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; pointer-events: none; }
main.lv5 .v5-cam-trong p { margin: 0; font-size: max(15px, calc(15 * var(--u))); font-weight: 800; color: var(--v5-xam); }
main.lv5 .v5-cam-nuts { position: absolute; right: calc(8 * var(--u)); bottom: calc(6 * var(--u)); z-index: 5; display: flex; gap: calc(6 * var(--u)); align-items: center; }
main.lv5 .v5-cam-nut { padding: calc(3 * var(--u)) calc(9 * var(--u)); border-radius: calc(8 * var(--u)); border: calc(1 * var(--u)) solid rgba(43, 42, 51, .18); background: rgba(255, 255, 255, .7); color: #5d5a68; font-size: max(var(--f-min), calc(12 * var(--u))); font-weight: 800; cursor: pointer; }
main.lv5 .v5-cam-nuts.nho { gap: calc(2 * var(--u)); color: var(--v5-xam); font-size: max(var(--f-min), calc(11 * var(--u))); }
main.lv5 .v5-cam-nuts.nho .v5-cam-nut { padding: 0; border: 0; background: none; font-size: max(var(--f-min), calc(11 * var(--u))); color: var(--v5-xam); }
main.lv5 .v5-cam-nuts.nho .v5-cam-nut:hover { color: var(--v5-xd); text-decoration: underline; }
main.lv5:not(.v5-cam-pha) .v5-cam-nuts { display: none; }
/* the «Chụp» button (anh Cường 23/10): round, white, 56 px, bottom right of the frame; the small "Gửi ảnh · Đổi camera" sits left of it */
main.lv5 .v5-chup { position: absolute; right: 10px; bottom: 10px; z-index: 6; width: 56px; height: 56px; padding: 0; border-radius: 50%;
  border: 0; background: #fff; color: #2b2a33; box-shadow: 0 2px 10px rgba(0, 0, 0, .28), 0 0 0 3px rgba(255, 255, 255, .55);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; cursor: pointer; }
main.lv5 .v5-chup.hidden, main.lv5 .v5-cam-tt.hidden { display: none; }
main.lv5 .v5-chup .ic { width: 24px; height: 24px; }
main.lv5 .v5-chup span { font-size: 11px; font-weight: 900; line-height: 1; }
main.lv5 .v5-chup:hover { transform: scale(1.05); }
main.lv5 .v5-chup:active { transform: scale(.94); }
main.lv5 .v5-chup:focus-visible { outline: 3px solid var(--v5-xd); outline-offset: 2px; }
main.lv5 .v5-cam:has(> .v5-chup:not(.hidden)) .v5-cam-nuts { right: 76px; }
/* «Sẵn sàng» (anh Cường 23/10): while the page is being set the camera only shows it live; this big green button scans it.
   It glows once the camera sees a sheet («Thấy trang rồi»). Bottom centre of the frame, above the small links. */
main.lv5 .v5-san-sang { position: absolute; left: 50%; bottom: calc(44 * var(--u)); transform: translateX(-50%); z-index: 7;
  display: flex; align-items: center; gap: calc(10 * var(--u)); min-height: max(56px, calc(64 * var(--u))); padding: calc(8 * var(--u)) calc(22 * var(--u));
  border: 0; border-radius: 999px; background: #2eb872; color: #fff; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .3), 0 0 0 4px rgba(255, 255, 255, .6); }
main.lv5 .v5-san-sang.hidden { display: none; }
main.lv5 .v5-san-sang .ic { width: max(26px, calc(30 * var(--u))); height: max(26px, calc(30 * var(--u))); filter: brightness(0) invert(1); }
main.lv5 .v5-san-sang span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; text-align: left; }
main.lv5 .v5-san-sang b { font-size: max(18px, calc(22 * var(--u))); font-weight: 900; }
main.lv5 .v5-san-sang small { font-size: max(var(--f-min, 13px), calc(13 * var(--u))); font-weight: 800; opacity: .92; }
main.lv5 .v5-san-sang:hover { filter: brightness(1.05); }
main.lv5 .v5-san-sang:active { transform: translateX(-50%) scale(.96); }
main.lv5 .v5-san-sang:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
main.lv5 .v5-san-sang.thay { animation: v5-san-sang 1.4s ease-in-out infinite; }
@keyframes v5-san-sang { 0%, 100% { box-shadow: 0 4px 14px rgba(0, 0, 0, .3), 0 0 0 4px rgba(255, 255, 255, .6); }
  50% { box-shadow: 0 4px 14px rgba(0, 0, 0, .3), 0 0 0 10px rgba(46, 184, 114, .45); } }
@media (prefers-reduced-motion: reduce) { main.lv5 .v5-san-sang.thay { animation: none; } }
main.lv5 .v5-cam-tt.thay { background: rgba(46, 184, 114, .92); }
/* while the page is set: no "đang viết" badge (moving the sheet is not writing); the hint goes to the top centre, clear of the button */
main.lv5[data-pha="dat_khung"] .v5-cam .cam-badge { display: none; }
main.lv5 .v5-cam:has(> .v5-san-sang:not(.hidden)) .v5-cam-tt { top: calc(40 * var(--u)); bottom: auto; left: 50%; transform: translateX(-50%);
  max-width: calc(100% - 24px); width: max-content; text-align: center; }
main.lv5 .v5-cam:has(> .v5-san-sang:not(.hidden)) .v5-cam-nuts { right: 10px; }
/* what the camera does for real: Pika đang đọc… / không thấy chữ / đã chụp N lần */
main.lv5 .v5-cam-tt { position: absolute; left: 8px; bottom: 8px; z-index: 5; margin: 0; max-width: calc(100% - 180px); padding: 3px 10px;
  border-radius: 10px; background: rgba(43, 42, 51, .75); color: #fff; font-size: max(var(--f-min, 13px), calc(13 * var(--u))); font-weight: 800; }
main.lv5 .v5-cam-tt.trong { background: var(--v5-cam); }
/* 24/10: the second line while Pika reads long (the network is slow, she still reads): just above the first, amber */
main.lv5 .v5-cam-phu { position: absolute; left: 8px; bottom: calc(16px + 1.5em); z-index: 5; margin: 0; max-width: calc(100% - 180px);
  padding: 3px 10px; border-radius: 10px; background: rgba(245, 165, 36, .94); color: #3b2600;
  font-size: max(var(--f-min, 13px), calc(13 * var(--u))); font-weight: 800; }
main.lv5 .v5-cam-phu.hidden { display: none; }
main.lv5 .v5-cam.dang-doc::after { content: ""; position: absolute; left: 0; right: 0; top: 0; z-index: 4; height: 70px; pointer-events: none;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--v5-xd) 18%, transparent) 75%, color-mix(in srgb, var(--v5-xd) 75%, transparent));
  animation: v5-quet 1.6s ease-in-out infinite alternate; }
@keyframes v5-quet { from { top: 0; } to { top: calc(100% - 70px); } }
main.lv5 .v5-cam-nhay { position: absolute; inset: 0; z-index: 7; background: #fff; opacity: 0; pointer-events: none; }
main.lv5 .v5-cam-nhay.chay { animation: v5-nhay .35s ease-out; }
@keyframes v5-nhay { 0% { opacity: .9; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { main.lv5 .v5-cam.dang-doc::after { animation: none; top: 0; } main.lv5 .v5-cam-nhay.chay { animation-duration: .15s; } }
/* the instruction box */
main.lv5 .v5-hd { height: 100%; background: #fff; border-radius: calc(8 * var(--u)); padding: calc(14 * var(--u)) calc(14 * var(--u)); overflow: auto; }
main.lv5 .v5-hd p { margin: 0 0 calc(2 * var(--u)); }
main.lv5 .v5-hd-1 { font-size: max(15px, calc(15 * var(--u))); line-height: 1.65; font-weight: 900; color: var(--v5-chu); }
main.lv5 .v5-hd b.xanh { color: var(--v5-xd); font-weight: 900; }
main.lv5 .v5-hd-chup { margin-top: calc(10 * var(--u)) !important; font-size: max(var(--f-min), calc(13 * var(--u))); font-weight: 900; color: var(--v5-xd); display: flex; align-items: center; gap: calc(8 * var(--u)); }
main.lv5 .v5-hd-chup i { width: calc(8 * var(--u)); height: calc(8 * var(--u)); border-radius: 50%; background: var(--v5-cam); }
main.lv5 .v5-hd-chup.xong i { background: #f8c99a; }
main.lv5 .v5-hd-chu { display: flex; flex-wrap: wrap; gap: calc(14 * var(--u)); margin-top: calc(8 * var(--u)) !important; font-size: max(var(--f-min), calc(12 * var(--u))); font-weight: 900; color: var(--v5-xd); }
main.lv5 .v5-hd-chu span { display: inline-flex; align-items: center; gap: calc(5 * var(--u)); }
main.lv5 .v5-hd-chu i { width: calc(11 * var(--u)); height: calc(11 * var(--u)); border-radius: calc(3 * var(--u)); }
main.lv5 .v5-hd-chu i.xam { background: #9aa0aa; }
main.lv5 .v5-hd-de { margin-top: calc(12 * var(--u)); border-top: calc(1 * var(--u)) dashed var(--v5-vien); padding-top: calc(10 * var(--u)); }
main.lv5 .v5-hd-de > small { font-size: max(var(--f-min), calc(12 * var(--u))); font-weight: 900; color: var(--v5-xam); }
main.lv5 .v5-hd-de .board { display: block; min-height: 0; padding: 0; background: none; }
main.lv5 .v5-hd-de .blk-problem { padding: 6px 0 0; border: 0; background: none; }
main.lv5 .v5-hd-de .blk-problem .overline, main.lv5 .v5-hd-de .blk-bai-trang, main.lv5 .v5-hd-de .board-empty { display: none; }
main.lv5 .v5-hd-de .blk-problem .body { font-size: 15px; line-height: 1.5; margin: 0; }

/* chon */
main.lv5 .v5-chon { height: 100%; display: grid; grid-template-columns: 1fr 2.3fr; align-items: center; gap: calc(24 * var(--u)); padding: 0 calc(26 * var(--u)); }
main.lv5 .v5-chon-hoi { display: flex; flex-direction: column; align-items: center; gap: calc(22 * var(--u)); text-align: center; }
main.lv5 .v5-chon-hoi img { width: calc(82 * var(--u)); height: calc(82 * var(--u)); }
main.lv5 .v5-chon-hoi h2 { margin: 0; font-size: max(15px, calc(20 * var(--u))); line-height: 1.4; font-weight: 900; color: var(--v5-chu); }
main.lv5 .v5-chon-hoi .v5-doi-ten { margin-top: calc(-14 * var(--u)); padding: 4px 12px; border: 1px solid #d9dee8; border-radius: 999px; background: #fff; color: #5b6475; font: inherit; font-size: max(12px, calc(14 * var(--u))); font-weight: 700; cursor: pointer; }
main.lv5 .v5-chon-ds { display: grid; grid-template-columns: 1fr 1fr; gap: calc(20 * var(--u)); }
main.lv5 .v5-chon-the { display: flex; flex-direction: column; align-items: center; gap: calc(8 * var(--u)); padding: calc(18 * var(--u)) calc(14 * var(--u)) calc(14 * var(--u)); border-radius: calc(18 * var(--u)); border: 0; background: #fff;
  box-shadow: 0 calc(8 * var(--u)) calc(24 * var(--u)) rgba(120, 90, 60, .10), 0 calc(1 * var(--u)) calc(3 * var(--u)) rgba(120, 90, 60, .06); cursor: pointer; transition: opacity .3s, transform .2s; color: var(--v5-chu); }
main.lv5 .v5-chon-the:hover { transform: translateY(calc(-2 * var(--u))); }
main.lv5 .v5-chon-ic { width: calc(72 * var(--u)); height: calc(72 * var(--u)); border-radius: calc(16 * var(--u)); display: grid; place-items: center; font-size: max(15px, calc(38 * var(--u))); }
main.lv5 .v5-chon-ic.mot { background: #fdeee0; }
main.lv5 .v5-chon-ic.de { background: #e4effd; }
main.lv5 .v5-chon-the b { font-size: max(15px, calc(26 * var(--u))); font-weight: 900; color: var(--v5-chu); }
main.lv5 .v5-chon-the small { font-size: max(15px, calc(15 * var(--u))); font-weight: 800; color: var(--v5-xam); }
main.lv5 .v5-chon[data-da] .v5-chon-the[aria-pressed="false"] { opacity: .35; }

/* chua_cau: the cut of the question (52 %) | the cut of its scratch */
main.lv5 .v5-chua { display: grid; grid-template-columns: minmax(0, 52fr) minmax(0, 40fr); gap: calc(24 * var(--u)); padding: calc(4 * var(--u)) calc(10 * var(--u)); align-content: start; }
main.lv5 .v5-nhan { font-size: max(var(--f-min), calc(12 * var(--u))); font-weight: 800; color: var(--v5-xam); margin: 0 0 calc(6 * var(--u)); }
main.lv5 .v5-nhan b { color: var(--v5-chu); font-weight: 900; }
main.lv5 .v5-cat-o { position: relative; border-radius: calc(6 * var(--u)); background: #f1f0f3; padding: calc(4 * var(--u)); box-shadow: 0 calc(2 * var(--u)) calc(8 * var(--u)) rgba(0, 0, 0, .06); }
main.lv5 .v5-cat-o canvas, main.lv5 .v5-cat-o img.v5-cat { display: block; width: 100%; height: auto; border-radius: calc(4 * var(--u)); object-fit: contain; }
main.lv5 .v5-cat-o.giay { background: #fbfbf7; background-image: linear-gradient(#e3e8ef calc(1 * var(--u)), transparent calc(1 * var(--u))), linear-gradient(90deg, #e3e8ef calc(1 * var(--u)), transparent calc(1 * var(--u))); background-size: calc(14 * var(--u)) calc(14 * var(--u)); border-radius: calc(8 * var(--u)); }
main.lv5 .v5-tick { position: absolute; right: 18%; bottom: 10%; font-size: max(15px, calc(40 * var(--u))); font-weight: 900; color: var(--v5-la); line-height: 1; text-shadow: 0 calc(1 * var(--u)) 0 #fff; }
/* the stamp "ĐÚNG": green (v2: right is green, never red) and the only sign of a right answer on the screen */
main.lv5 .v5-dau { position: absolute; right: calc(14 * var(--u)); top: calc(14 * var(--u)); padding: calc(6 * var(--u)) calc(12 * var(--u)); border: calc(4 * var(--u)) solid #22a463; border-radius: 50%; color: #1a8a52;
  font-size: max(15px, calc(22 * var(--u))); font-weight: 900; letter-spacing: calc(1 * var(--u)); transform: rotate(-14deg); background: rgba(255, 255, 255, .55); box-shadow: 0 0 0 calc(3 * var(--u)) rgba(46, 184, 114, .25); }
main.lv5 .v5-con-ghi { display: flex; align-items: center; gap: calc(8 * var(--u)); margin: calc(10 * var(--u)) 0 0; font-size: max(15px, calc(15 * var(--u))); font-weight: 900; }
main.lv5 .v5-dut { border: calc(2 * var(--u)) dashed #d9d3e3; border-radius: calc(10 * var(--u)); padding: calc(12 * var(--u)) calc(14 * var(--u)); text-align: center; color: #8b87a0; font-size: max(var(--f-min), calc(14 * var(--u))); font-weight: 800; line-height: 1.5; background: #fff; }
main.lv5 .v5-dut p { margin: 0; }

/* bang_co / day_lai_hinh: the green board (62 %) | the scratch column outside it (38 %) */
main.lv5[data-pha="bang_co"] .v5-b-body, main.lv5[data-pha="day_lai_hinh"] .v5-b-body { grid-template-columns: minmax(0, 62fr) minmax(0, 38fr); grid-template-areas: "bang phai"; gap: calc(14 * var(--u)); padding: 0 calc(8 * var(--u)) calc(4 * var(--u)); }
main.lv5[data-pha="bang_co"] .v5-bang, main.lv5[data-pha="day_lai_hinh"] .v5-bang { display: grid; }
main.lv5 .v5-bang { grid-template-columns: calc(300 * var(--u)) minmax(0, 1fr); gap: calc(12 * var(--u)); padding: calc(10 * var(--u)); border-radius: calc(14 * var(--u)); background: var(--v5-bang);
  border: calc(6 * var(--u)) solid var(--v5-go); box-shadow: inset 0 0 calc(26 * var(--u)) rgba(0, 0, 0, .28), 0 calc(2 * var(--u)) calc(6 * var(--u)) rgba(80, 50, 20, .2); color: #fff; overflow: hidden; }
main.lv5 .v5-bang-trai { display: flex; flex-direction: column; gap: calc(10 * var(--u)); min-height: 0; overflow: auto; scrollbar-width: none; }
main.lv5 .v5-ghim { flex: none; background: #fff6dc; border-radius: calc(10 * var(--u)); padding: calc(6 * var(--u)) calc(8 * var(--u)) calc(8 * var(--u)); box-shadow: 0 calc(3 * var(--u)) calc(8 * var(--u)) rgba(0, 0, 0, .25); color: var(--v5-chu); }
main.lv5 .v5-ghim-t { font-size: max(var(--f-min), calc(11 * var(--u))); font-weight: 900; color: #b45309; margin-bottom: calc(4 * var(--u)); }
main.lv5 .v5-ghim-anh { position: relative; border-radius: calc(6 * var(--u)); overflow: hidden; background: #ece9e2; }
main.lv5 .v5-ghim-anh canvas { display: block; width: 100%; height: auto; }
main.lv5 .v5-ghim-chu { margin: 0; padding: calc(8 * var(--u)) calc(10 * var(--u)); font-size: max(var(--f-min), calc(14 * var(--u))); line-height: 1.45; font-weight: 800; color: var(--v5-chu); background: #fffaf0; overflow-wrap: anywhere; }
main.lv5 .v5-ghim-chu p { margin: 0; }
main.lv5 .v5-ghim-chu p + p, main.lv5 .v5-ghim-chu .tt-de-dong + .tt-de-dong { margin-top: calc(4 * var(--u)); }
main.lv5 .v5-ghim-chu .de-trang { gap: calc(6 * var(--u)); }
main.lv5 .v5-ghim-chu .de-bai { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: calc(6 * var(--u)); align-items: start; }
main.lv5 .v5-ghim-chu .de-bai.khong-so { grid-template-columns: minmax(0, 1fr); }
/* 26/10 M2: one question written out (bai_trang bai[].de): the stem, each printed choice on its own line, a little in */
main.lv5 .v5-de-cau .de-cau-lua { padding-left: calc(12 * var(--u)); font-weight: 700; }
/* QC 30/10 (390 px): phương án A–D xếp lưới 2 cột ngay dưới thân đề, chữ cùng cỡ; ô ghim chữ cao tối đa rồi cuộn trong ô, không đẩy bảng */
main.lv5 .v5-de-cau .de-bai.khong-so:has(> .de-cau-lua) { grid-template-columns: repeat(auto-fit, minmax(calc(76 * var(--u)), 1fr)); column-gap: calc(10 * var(--u)); row-gap: calc(2 * var(--u)); }
main.lv5 .v5-de-cau .de-bai.khong-so:has(> .de-cau-lua) > :not(.de-cau-lua) { grid-column: 1 / -1; }
main.lv5 .v5-de-cau .de-bai.khong-so:has(> .de-cau-lua) > .de-cau-lua { padding-left: calc(6 * var(--u)); margin-top: 0; }
main.lv5 .v5-ghim-anh:has(> .v5-de-cau) { max-height: min(36vh, calc(300 * var(--u))); overflow-y: auto; }
main.lv5 .v5-de-cau .de-cau-y { padding-left: calc(6 * var(--u)); }   /* quy chuẩn 30/10: ý a)…h) mỗi ý một dòng */
main.lv5 .v5-de-cau .de-cau-dan { font-weight: 600; font-size: .86em; color: #7c5a12; }
main.lv5 .v5-de-cau .v5-hinh { margin-top: calc(6 * var(--u)); }
main.lv5 .v5-ghim-chu .de-so { width: calc(22 * var(--u)); height: calc(22 * var(--u)); font-size: max(var(--f-min), calc(12 * var(--u))); background: #ffe3a3; color: var(--v5-chu); }
main.lv5 .v5-ghim-chu .de-nd { gap: calc(3 * var(--u)); }
main.lv5 .v5-ghim-chu .de-chu { font-weight: 800; }
main.lv5 .v5-ghim-chu .de-cau { padding-left: calc(14 * var(--u)); gap: calc(3 * var(--u)) calc(16 * var(--u)); }
main.lv5 .v5-ghim-chu .de-y { font-weight: 700; }
main.lv5 .v5-ghim-chu .de-nhan { color: #c2410c; }
main.lv5 .v5-ghim-chu .de-tieu { font-weight: 900; color: #7a4b00; }
main.lv5 .v5-ghim-anh img.v5-ghim-trang { display: block; width: 100%; height: auto; max-height: calc(220 * var(--u)); object-fit: contain; background: #ece9e2; }
main.lv5 .v5-ghim .v5-dut { padding: calc(8 * var(--u)); font-size: max(var(--f-min), calc(12 * var(--u))); }
main.lv5 .v5-ghim .v5-dau { right: calc(10 * var(--u)); top: calc(8 * var(--u)); font-size: max(15px, calc(18 * var(--u))); }
main.lv5 .v5-con-lam { flex: none; background: rgba(255, 255, 255, .12); border-radius: calc(10 * var(--u)); padding: calc(10 * var(--u)) calc(14 * var(--u)) calc(12 * var(--u)); }
main.lv5 .v5-con-lam[hidden] { display: none; }
main.lv5 .v5-con-lam small { display: block; font-size: max(var(--f-min), calc(11 * var(--u))); font-weight: 800; color: rgba(255, 255, 255, .8); margin-bottom: calc(4 * var(--u)); }
main.lv5 .v5-con-lam p { margin: 0; font-size: max(15px, calc(16 * var(--u))); font-weight: 900; color: #fff; line-height: 1.35; }
main.lv5 .v5-bang-xanh { min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
main.lv5 .v5-buoc { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 4px 6px 10px 2px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .3) transparent;
  font-size: 15px; font-weight: 700; color: #fff; }
main.lv5 .v5-buoc > .board { display: flex; flex-direction: column; gap: 14px; min-height: 0; padding: 0; margin: 0; border: 0; overflow: visible; }
main.lv5 .v5-buoc .board-empty, main.lv5 .v5-buoc .blk-quiz .opts { display: none; }
main.lv5 .v5-buoc .board::before { display: none; }
main.lv5 .v5-buoc .board-stage { margin: 0 0 12px; padding: 0; border: 0; min-height: 0; max-height: none; }
main.lv5 .v5-buoc .board-nhap { margin-top: 12px; border: 0; }
/* ON THE BOARD (anh Cường 23/10): everything is chalk written on the green: no white block, no card, no bubble. The only things
   with a ground are the pinned problem and the "Cậu làm" box (both beside .v5-bang-xanh) and the choice pills. */
main.lv5 .v5-bang-xanh *:not(.tt-opt):not(.tt-opill):not(svg):not(svg *):not(.tt-lop-hinh):not(.tt-pad) { background-color: transparent !important; background-image: none !important; box-shadow: none !important; }
main.lv5 .v5-bang-xanh *:not(.tt-opt):not(.tt-opill):not(svg):not(svg *) { color: #fff; border-color: rgba(255, 255, 255, .35); }
main.lv5 .v5-bang-xanh :is(h1, h2, h3, h4, .title2, .tt-ten) { color: var(--v5-vang) !important; }
main.lv5 .v5-bang-xanh .tt-opt.miss { color: #8a4b00 !important; }
main.lv5 .v5-bang-xanh .tt-opt.ok { color: #17663f !important; }
main.lv5 .v5-bang-xanh .tt-fb.ok { color: #9be7bd !important; }
main.lv5 .v5-bang-xanh :is(.tt-hint-sai, .tt-nac-phep) { color: var(--v5-vang) !important; }
main.lv5 .v5-bang-xanh :is(.tt-fb, .tt-gt) { color: rgba(255, 255, 255, .75) !important; }
main.lv5 .v5-bang-xanh .tt-btn.gold, main.lv5 .v5-bang-xanh .tt-btn.dd { color: var(--v5-vang) !important; border-color: var(--v5-vang) !important; }
main.lv5 .v5-bang-xanh .blk { border-radius: 0; padding: 0; margin: 0; border-width: 0; font-family: "Nunito", sans-serif; font-size: 15px; font-weight: 700; }
main.lv5 .v5-bang-xanh .blk-problem .overline { display: none; }
main.lv5 .v5-bang-xanh :is(table, td, th) { border: 1px dashed rgba(255, 255, 255, .35) !important; }
main.lv5 .v5-bang-xanh .tt-slot { border: 2px dashed rgba(255, 255, 255, .75) !important; color: #fff !important; }
main.lv5 .v5-bang-xanh .tt-slot.ok { border-style: solid !important; border-color: #9be7bd !important; }
main.lv5 .v5-bang-xanh .tt-slot.miss { border-color: #ffd166 !important; }
main.lv5 .v5-bang-xanh .tt-slot::placeholder { color: rgba(255, 255, 255, .55); }
main.lv5 .v5-bang-xanh .tt-pad button { border: 1px solid rgba(255, 255, 255, .45) !important; color: #fff !important; }
/* drawings on the board: chalk strokes (white / orange), dashed white boxes; a white fill becomes the board */
main.lv5 .v5-bang-xanh svg text { fill: #fff; }
main.lv5 .v5-bang-xanh svg :is(rect, circle, ellipse, path, polygon):is([fill="#fff"], [fill="white"], [fill="#ffffff"], [fill="#FFF"], [fill="#FFFFFF"]) { fill: transparent; stroke: rgba(255, 255, 255, .55); }
main.lv5 .v5-bang-xanh svg :is(line, path, rect, polyline, circle):is([stroke="#000"], [stroke="#111"], [stroke="black"], [stroke="#0f172a"]) { stroke: #fff; }
/* the scratch column, outside the board */
main.lv5 .v5-nhap-cot { height: 100%; display: flex; flex-direction: column; gap: calc(4 * var(--u)); padding-top: calc(2 * var(--u)); overflow: auto; }
main.lv5 .v5-nhap-cot .v5-dut { flex: 0 1 calc(236 * var(--u)); display: grid; place-items: center; align-content: center; font-size: max(var(--f-min), calc(13 * var(--u))); }
main.lv5 .v5-nhap-cot .v5-cat-o { box-shadow: 0 calc(3 * var(--u)) calc(10 * var(--u)) rgba(0, 0, 0, .08); }
main.lv5 .v5-nhap-ghi { margin: calc(6 * var(--u)) 0 0; font-size: max(var(--f-min), calc(13 * var(--u))); font-weight: 800; color: var(--v5-xam); line-height: 1.4; }

/* bao_cao */
main.lv5 .v5-bao { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: calc(20 * var(--u)); padding: calc(6 * var(--u)) calc(12 * var(--u)) calc(8 * var(--u)); }
main.lv5 .v5-bao-trai, main.lv5 .v5-bao-phai { display: flex; flex-direction: column; gap: calc(8 * var(--u)); min-width: 0; }
main.lv5 .v5-bao-tom { display: flex; align-items: center; gap: calc(14 * var(--u)); padding: calc(10 * var(--u)) calc(16 * var(--u)); border-radius: calc(14 * var(--u)); background: linear-gradient(90deg, #fdeee6, #fbe6ee); }
main.lv5 .v5-bao-tom img { width: calc(40 * var(--u)); height: calc(40 * var(--u)); }
main.lv5 .v5-bao-tom p { margin: 0; font-size: max(15px, calc(15 * var(--u))); font-weight: 900; line-height: 1.45; }
main.lv5 .v5-bao-tom b.cam { color: var(--v5-cam); }
main.lv5 .v5-hh { display: grid; grid-template-columns: repeat(auto-fit, minmax(calc(76 * var(--u)), 1fr)); gap: calc(6 * var(--u)); text-align: center; }
main.lv5 .v5-hh-o { display: flex; flex-direction: column; align-items: center; gap: calc(2 * var(--u)); }
main.lv5 .v5-hh-o > span { width: calc(32 * var(--u)); height: calc(32 * var(--u)); border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: max(15px, calc(16 * var(--u))); font-weight: 900; background: var(--v5-la); }
main.lv5 .v5-hh-o.cam > span { background: var(--v5-cam); }
main.lv5 .v5-hh-o.tim > span { background: #a98bf7; }
main.lv5 .v5-hh-o b { font-size: max(var(--f-min), calc(11 * var(--u))); font-weight: 900; }
main.lv5 .v5-hh-o small { font-size: max(var(--f-min), calc(11 * var(--u))); font-weight: 800; color: var(--v5-xam); }
main.lv5 .v5-bao-h { font-size: max(var(--f-min), calc(13 * var(--u))); font-weight: 900; color: #6d6a78; margin-top: calc(2 * var(--u)); }
main.lv5 .v5-ts-d { display: grid; grid-template-columns: calc(54 * var(--u)) minmax(0, 1fr); align-items: center; gap: calc(8 * var(--u)); font-size: max(var(--f-min), calc(13 * var(--u))); font-weight: 900; color: #6d6a78; }
main.lv5 .v5-ts-d canvas { width: 100%; height: calc(30 * var(--u)); object-fit: cover; object-position: left center; border-radius: calc(4 * var(--u)); }
main.lv5 .v5-bao-nhap { margin: 0; font-size: max(var(--f-min), calc(12 * var(--u))); font-weight: 800; line-height: 1.5; }
main.lv5 .v5-ph { margin: 0; padding: calc(7 * var(--u)) calc(10 * var(--u)); border-radius: calc(10 * var(--u)); background: #f1edfb; font-size: max(var(--f-min), calc(12 * var(--u))); font-weight: 800; line-height: 1.5; }
main.lv5 .v5-toi { margin: 0; padding: calc(8 * var(--u)) calc(12 * var(--u)); border-radius: calc(10 * var(--u)); border: calc(2 * var(--u)) dashed #f2c94c; background: #fff7d6; font-size: max(var(--f-min), calc(12 * var(--u))); font-weight: 900; line-height: 1.5; }
main.lv5 .v5-de-soan { display: grid; grid-template-columns: 1fr 1fr; gap: calc(8 * var(--u)); }
main.lv5 .v5-de-soan p { margin: 0; padding: calc(8 * var(--u)) calc(10 * var(--u)); border-radius: calc(10 * var(--u)); background: #eef4fd; font-size: max(var(--f-min), calc(12 * var(--u))); font-weight: 800; line-height: 1.5; }
main.lv5 .v5-bao-nut { display: grid; grid-template-columns: 1fr 1fr; gap: calc(8 * var(--u)); margin-top: calc(2 * var(--u)); }
main.lv5 .v5-in, main.lv5 .v5-zalo { min-height: calc(32 * var(--u)); border-radius: calc(10 * var(--u)); border: 0; font-size: max(var(--f-min), calc(13 * var(--u))); font-weight: 900; cursor: pointer; }
main.lv5 .v5-in { background: #e8f0fd; color: var(--v5-xd); }
main.lv5 .v5-zalo { background: linear-gradient(90deg, #3b82f6, #2f6ef0); color: #fff; }
main.lv5 .v5-zalo.xong { background: var(--v5-la); }
main.lv5 .v5-zalo:disabled:not(.xong) { opacity: .55; cursor: default; }
main.lv5 .v5-bao-gio { margin: 0; text-align: center; font-size: max(var(--f-min), calc(11 * var(--u))); font-weight: 800; color: var(--v5-xam); }

/* ---------------- C: Pika's strip ---------------- */
main.lv5 .v5-c { grid-area: c; position: relative; display: flex; flex-direction: column; justify-content: center; padding: calc(8 * var(--u)) calc(12 * var(--u)) calc(8 * var(--u)) calc(18 * var(--u)); }
main.lv5 .v5-c-row { display: flex; align-items: center; gap: calc(14 * var(--u)); min-width: 0; }
main.lv5 .v5-c-av { flex: none; width: calc(42 * var(--u)); height: calc(42 * var(--u)); border-radius: 50%; border: calc(2 * var(--u)) solid #ffd9b0; background: #fff3e4; object-fit: contain; }
main.lv5 .v5-c-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: calc(1 * var(--u)); }
main.lv5 .v5-c-ten { font-size: max(var(--f-min), calc(12 * var(--u))); font-weight: 900; color: var(--v5-cam); line-height: 1.2; }
main.lv5 .v5-c-ten[data-ai="be"] { color: var(--v5-xd); }
main.lv5 .v5-c-cau { font-size: max(15px, calc(16 * var(--u))); font-weight: 900; color: var(--v5-chu); line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
main.lv5 .v5-c-ten[data-ai="be"] + .v5-c-cau { color: #2563eb; }
main.lv5 .v5-c-cau.mo { color: #9a96a6; font-style: italic; font-weight: 800; }
main.lv5 .v5-c-go .input { width: 100%; height: calc(40 * var(--u)); border-radius: calc(10 * var(--u)); border: calc(1 * var(--u)) solid #ddd6ca; padding: 0 calc(12 * var(--u)); font-size: max(15px, calc(15 * var(--u))); font-weight: 700; font-family: inherit; background: #fff; }
main.lv5 .v5-c-go .input:focus { outline: calc(2 * var(--u)) solid #ffc58f; border-color: var(--v5-cam); }
main.lv5 .v5-c-nuts { flex: none; display: flex; gap: calc(10 * var(--u)); }
main.lv5 .v5-nut { width: calc(52 * var(--u)); height: calc(52 * var(--u)); border-radius: calc(12 * var(--u)); border: calc(1 * var(--u)) solid var(--v5-vien); background: #fff; box-shadow: 0 calc(1 * var(--u)) calc(3 * var(--u)) rgba(60, 40, 20, .06);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(3 * var(--u)); padding: calc(2 * var(--u)); color: #6d6a78; cursor: pointer; }
main.lv5 .v5-nut .ic { width: calc(16 * var(--u)); height: calc(16 * var(--u)); }
main.lv5 .v5-ic-phim { width: calc(18 * var(--u)); height: calc(18 * var(--u)); display: block; }
main.lv5 .v5-ic-phim svg { width: 100%; height: 100%; display: block; }
main.lv5 .v5-nut small { font-size: max(var(--f-min), calc(9 * var(--u))); font-weight: 900; line-height: 1.15; text-align: center; max-width: max(calc(34 * var(--u)), 46px); }
/* the mic (anh Cường 24/10 «ấn vào ko thấy thu âm»): data-tt = tat | xin | nghe | loi, set by man-hoc-v5.js veMic();
   --muc (0..1) = the live voice level, written once a frame. Orange when on, never red (đợt 2 U11). */
main.lv5 .v5-c-nuts { position: relative; }
main.lv5 .v5-nut.mic { --muc: 0; position: relative; transition: background-color .08s, border-color .08s, color .08s, box-shadow .08s linear; }
main.lv5 .v5-ic-mic { width: calc(18 * var(--u)); height: calc(18 * var(--u)); display: block; position: relative; z-index: 1; }
main.lv5 .v5-ic-mic svg { width: 100%; height: 100%; display: block; }
main.lv5 .v5-nut.mic small { position: relative; z-index: 1; max-width: calc(48 * var(--u)); }
main.lv5 .v5-nut.mic .gach { display: none; }
main.lv5 .v5-nut.mic[data-tt="tat"] .gach { display: inline; }
main.lv5 .v5-nut.mic[data-tt="tat"] { color: #6d6a78; }
main.lv5 .v5-nut.mic[data-tt="xin"] { background: var(--v5-cam-nhat); border-color: var(--v5-cam); color: #b45f05; }
main.lv5 .v5-nut.mic[data-tt="nghe"] { background: var(--v5-cam); border-color: var(--v5-cam); color: #fff;
  box-shadow: 0 0 0 calc(2px + var(--muc) * 12px) rgba(240, 138, 29, .32), 0 calc(4 * var(--u)) calc(12 * var(--u)) rgba(240, 138, 29, .35); }
main.lv5 .v5-nut.mic.noi[data-tt="nghe"] { box-shadow: 0 0 0 calc(4px + var(--muc) * 12px) rgba(240, 138, 29, .38), 0 calc(4 * var(--u)) calc(12 * var(--u)) rgba(240, 138, 29, .4); }
/* listening and quiet / asking the browser: a slow breathing ring, so "on" never looks like a plain button */
main.lv5 .v5-nut.mic[data-tt="nghe"]::after, main.lv5 .v5-nut.mic[data-tt="xin"]::after { content: ""; position: absolute; inset: -2px; border-radius: inherit;
  border: 2px solid var(--v5-cam); pointer-events: none; animation: v5-mic-tho 1.8s ease-out infinite; }
main.lv5 .v5-nut.mic[data-tt="xin"]::after { animation-duration: 1s; }
main.lv5 .v5-nut.mic[data-tt="loi"] { background: #fff7e0; border: 2px solid #e0a100; color: #8a5a00; }
main.lv5 .v5-nut.mic[data-tt="loi"]::after { content: "!"; position: absolute; top: -7px; right: -7px; width: 18px; height: 18px; border-radius: 50%;
  background: #e0a100; color: #fff; font-weight: 900; font-size: 12px; line-height: 18px; text-align: center; }
main.lv5 .v5-mic-bong { position: absolute; right: 0; bottom: calc(100% + 10px); z-index: 7; width: max-content; max-width: min(300px, calc(100vw - 32px));
  display: flex; flex-direction: column; gap: 4px; padding: 8px 12px; border-radius: 12px; background: #fff7e0; border: 1px solid #e0a100; color: #5c3d00;
  font-size: max(13px, calc(13 * var(--u))); line-height: 1.35; box-shadow: 0 6px 20px rgba(0, 0, 0, .12); }
main.lv5 .v5-mic-bong b { font-weight: 900; }
main.lv5 .v5-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
main.lv5 .v5-nut:focus-visible { outline: 3px solid #2563eb; outline-offset: 3px; }
@keyframes v5-mic-tho { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(1.3); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  main.lv5 .v5-nut.mic { transition: none; }
  main.lv5 .v5-nut.mic[data-tt="nghe"]::after, main.lv5 .v5-nut.mic[data-tt="xin"]::after { animation: none; opacity: .6; }
}
main.lv5 .v5-nut.go[aria-pressed="true"] { background: var(--v5-cam-nhat); border-color: var(--v5-cam); color: var(--v5-cam); }
main.lv5 .v5-c-chon { position: absolute; left: 76px; right: 140px; bottom: calc(100% + 6px); z-index: 6; display: flex; flex-direction: column; gap: 6px; }
main.lv5 .v5-c-chon .quizbox, main.lv5 .v5-c-chon .chips { background: #fff; border-radius: 14px; padding: 8px 10px; box-shadow: 0 6px 20px rgba(0, 0, 0, .12); }
main.lv5 .v5-c-chon .opts { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------------- the tall layout (§4): ≤ 1000 px wide or taller than wide ---------------- */
main.session.lv5.v5-doc { grid-template-rows: auto minmax(0, 1fr) auto; padding: calc(8 * var(--u)) calc(8 * var(--u)) calc(12 * var(--u)); gap: calc(10 * var(--u)); }
main.lv5.v5-doc .v5-a { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "t t" "o dh"; gap: calc(4 * var(--u)) calc(10 * var(--u)); padding: calc(8 * var(--u)) calc(12 * var(--u)) calc(10 * var(--u)); min-height: calc(100 * var(--u)); }
main.lv5.v5-doc .v5-a-t { grid-area: t; flex-direction: row; flex-wrap: wrap; align-items: center; gap: calc(4 * var(--u)) calc(6 * var(--u)); min-width: 0; padding: 0 calc(70 * var(--u)) 0 0; }
main.lv5.v5-doc .v5-a-dot { display: inline; color: var(--v5-xam); font-weight: 900; }
main.lv5.v5-doc .v5-a[data-co="0"] .v5-a-dot { display: none; }
main.lv5.v5-doc .v5-a .v5-chip { align-self: center; }
main.lv5.v5-doc .v5-tiles { grid-area: o; padding-top: calc(12 * var(--u)); }
main.lv5.v5-doc .v5-dh { grid-area: dh; align-self: center; width: calc(104 * var(--u)); height: calc(58 * var(--u)); margin: 0; }
main.lv5.v5-doc .v5-dh b { font-size: max(15px, calc(24 * var(--u))); }
main.lv5.v5-doc .v5-a > .btn.danger { position: absolute; right: calc(12 * var(--u)); top: calc(8 * var(--u)); margin: 0; }
main.lv5.v5-doc .v5-b { padding: calc(10 * var(--u)) calc(8 * var(--u)) calc(10 * var(--u)); }
main.lv5.v5-doc .v5-b-h { padding: calc(4 * var(--u)) calc(8 * var(--u)) calc(8 * var(--u)); }
main.lv5.v5-doc .v5-pill { position: absolute; left: 50%; bottom: calc(10 * var(--u)); transform: translateX(-50%); max-width: 92%; margin: 0; z-index: 6; }
main.lv5.v5-doc .v5-b-body { padding-bottom: calc(36 * var(--u)); }
main.lv5.v5-doc.v5-cam-pha .v5-b-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "cam" "phai"; padding: calc(6 * var(--u)) calc(8 * var(--u)) calc(44 * var(--u)); }
main.lv5.v5-doc.v5-cam-pha .v5-cam { aspect-ratio: 4 / 3; }
main.lv5.v5-doc .v5-hd { height: auto; }
main.lv5.v5-doc .v5-chon { grid-template-columns: 1fr; gap: calc(26 * var(--u)); padding: calc(10 * var(--u)) calc(18 * var(--u)); align-content: center; }
main.lv5.v5-doc .v5-chon-ds { grid-template-columns: 1fr; gap: calc(22 * var(--u)); }
main.lv5.v5-doc .v5-chon-the { display: grid; grid-template-columns: calc(72 * var(--u)) 1fr; grid-template-rows: auto auto; column-gap: calc(16 * var(--u)); align-items: center; text-align: left; padding: calc(22 * var(--u)) calc(22 * var(--u)); }
main.lv5.v5-doc .v5-chon-ic { grid-row: 1 / 3; }
main.lv5.v5-doc .v5-chua { grid-template-columns: minmax(0, 1fr); gap: calc(14 * var(--u)); }
main.lv5.v5-doc[data-pha="bang_co"] .v5-b-body, main.lv5.v5-doc[data-pha="day_lai_hinh"] .v5-b-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; grid-template-areas: "bang" "phai"; }
main.lv5.v5-doc .v5-bang { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); padding: 0; border: 0; background: none; box-shadow: none; gap: calc(10 * var(--u)); border-radius: 0; }
main.lv5.v5-doc .v5-bang-trai { overflow: visible; }
main.lv5.v5-doc .v5-ghim:has(.v5-trang-ghim) .v5-ghim-anh { max-height: min(30vh, calc(240 * var(--u))); }
main.lv5.v5-doc .v5-ghim { box-shadow: 0 calc(2 * var(--u)) calc(8 * var(--u)) rgba(0, 0, 0, .12); }
main.lv5.v5-doc .v5-con-lam { display: none; }
main.lv5.v5-doc .v5-bang-xanh { background: var(--v5-bang); border: calc(6 * var(--u)) solid var(--v5-go); border-radius: calc(14 * var(--u)); box-shadow: inset 0 0 calc(26 * var(--u)) rgba(0, 0, 0, .28); padding: calc(12 * var(--u)); color: #fff; }
main.lv5.v5-doc .v5-nhap-cot { height: auto; max-height: calc(200 * var(--u)); }
main.lv5.v5-doc .v5-bao { grid-template-columns: minmax(0, 1fr); }
main.lv5.v5-doc .v5-c { padding: calc(10 * var(--u)) calc(12 * var(--u)); min-height: calc(76 * var(--u)); }
main.lv5 .v5-bao, main.lv5 .v5-bao * { line-height: 1.35; }
main.lv5 .v5-bao { gap: calc(16 * var(--u)); padding-top: calc(2 * var(--u)); }
main.lv5 .v5-bao-trai, main.lv5 .v5-bao-phai { gap: calc(6 * var(--u)); }
main.lv5 .v5-hh-o b, main.lv5 .v5-hh-o small { line-height: 1.2; }
main.lv5 .v5-ph, main.lv5 .v5-toi, main.lv5 .v5-de-soan p { padding: calc(5 * var(--u)) calc(10 * var(--u)); }
main.lv5 .v5-ph .v5-chip { padding: 0 calc(7 * var(--u)); font-size: max(var(--f-min), calc(11 * var(--u))); line-height: calc(16 * var(--u)); }
main.lv5.v5-doc .v5-nhap-cot { max-height: calc(170 * var(--u)); }
main.lv5.v5-doc .v5-nhap-cot .v5-dut { flex: 0 0 auto; min-height: calc(90 * var(--u)); }
main.lv5.v5-doc .v5-nhap-cot .v5-cat-o canvas { max-height: calc(120 * var(--u)) !important; width: auto; margin: 0 auto; }
/* the page photo is on: the live camera stays rendered under it (its frames keep counting) but unseen, its badge too */
main.lv5 .v5-cam:has(> .v5-cam-anh:not(.hidden)) > .cam-wrap { opacity: .01; }
main.lv5 .v5-cam .cam-wrap { z-index: 1; }

/* ---------------- sizes (docs/nang-cap-uiux/bao-cao/v5-man-hinh.md): every window from 360 × 780 to 1920 × 1080 ----------------
   the buttons a finger presses: >= 44 px; the tall layout: strips A and C a fixed height (card B never moves between screens),
   the card scrolls down inside itself; under 700 px wide (v5-hep): 3 tiles + "+n câu sau", the clock and the buttons compact;
   short landscape windows (v5-thap): A and C thinner. */
main.lv5 .v5-nut { width: max(44px, calc(52 * var(--u))); height: max(44px, calc(52 * var(--u))); }
main.session.lv5.v5-doc { grid-template-rows: max(118px, calc(118 * var(--u))) minmax(0, 1fr) max(84px, calc(80 * var(--u))); }
main.lv5.v5-doc .v5-a { min-height: 0; grid-template-rows: auto minmax(0, 1fr); align-items: center; }
main.lv5.v5-doc .v5-a-t { flex-wrap: nowrap; overflow: hidden; white-space: nowrap; }
main.lv5.v5-doc .v5-a-t .v5-chip { min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; }
main.lv5.v5-doc .v5-tiles { padding-top: max(18px, calc(12 * var(--u))); padding-left: max(14px, calc(4 * var(--u))); align-self: stretch; }
main.lv5.v5-doc .v5-c { min-height: 0; }
main.lv5.v5-doc .v5-b-body { overflow-y: auto; overscroll-behavior: contain; }
main.lv5.v5-doc[data-pha="bang_co"] .v5-b-body, main.lv5.v5-doc[data-pha="day_lai_hinh"] .v5-b-body { grid-template-rows: minmax(max(320px, calc(330 * var(--u))), 1fr) auto; }
main.lv5.v5-doc.v5-cam-pha .v5-b-body { grid-template-rows: auto auto; }
main.lv5.v5-hep .v5-a { padding: 8px 8px 8px 10px; column-gap: 8px; }
main.lv5.v5-hep .v5-a-t .v5-chip { display: none; }
main.lv5.v5-hep .v5-a-t { padding-right: 84px; }
main.lv5.v5-hep .v5-tiles { gap: 6px; padding-left: 24px; padding-right: 2px; }
main.lv5.v5-hep .v5-o { width: 52px; height: 52px; }
main.lv5.v5-hep .v5-o.them { width: 62px; line-height: 1.05; }
main.lv5.v5-hep .v5-dh { width: 78px; height: 58px; padding: 2px 4px; }
main.lv5.v5-hep .v5-dh small { line-height: 1.05; text-align: center; }
main.lv5.v5-hep .v5-dh b { font-size: 20px; }
main.lv5.v5-hep .v5-nut small { display: none; }
main.lv5.v5-hep .v5-c { padding: 8px 8px 8px 10px; }
main.lv5.v5-hep .v5-c-row { gap: 8px; }
main.lv5.v5-hep .v5-c-av { width: 36px; height: 36px; }
main.lv5.v5-hep .v5-c-nuts { gap: 6px; }
main.lv5.v5-thap .v5-a { padding-top: calc(4 * var(--u)); padding-bottom: calc(4 * var(--u)); }
main.session.lv5.v5-thap { grid-template-rows: calc(70 * var(--u)) minmax(0, 1fr) calc(62 * var(--u)); gap: calc(6 * var(--u)); padding-bottom: calc(6 * var(--u)); }
main.lv5.v5-thap .v5-tiles { padding-top: calc(10 * var(--u)); }
main.lv5.v5-thap .v5-o { height: calc(54 * var(--u)); }
main.lv5.v5-thap .v5-dh { height: calc(56 * var(--u)); }
@media (prefers-reduced-motion: reduce) {
  main.lv5 *, main.lv5 *::before, main.lv5 *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  main.lv5 .v5-chon-the:hover { transform: none; }
}
/* under 700 px wide the queue's line is its count only ("cậu đã làm 3/5"), "Hàng chờ hôm nay" when there is no count yet */
main.lv5.v5-hep .v5-a-t:has(.v5-a-t2:not(:empty)) :is(.v5-a-t1, .v5-a-dot) { display: none; }
main.lv5.v5-hep .v5-nut .ic, main.lv5.v5-hep .v5-ic-phim, main.lv5.v5-hep .v5-ic-mic { width: 22px; height: 22px; }
/* a long queue scrolls inside the strip: the edge with more tiles behind it fades */
main.lv5 .v5-tiles.tran-phai { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
main.lv5 .v5-tiles.tran-trai { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px); mask-image: linear-gradient(90deg, transparent, #000 36px); }
main.lv5 .v5-tiles.tran-phai.tran-trai { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); }
/* under 700 px wide every control a finger presses is >= 44 px (Kết thúc, the camera frame's buttons, the report's buttons, the
   chips over strip C); strip A one line taller for Kết thúc; the chips box spans the strip (its offsets are zoomed by --zb) */
main.session.lv5.v5-hep { grid-template-rows: 130px minmax(0, 1fr) max(84px, calc(80 * var(--u))); }
main.lv5.v5-hep .v5-a > .btn.danger { min-height: 44px; min-width: 44px; top: 4px; right: 6px; padding: 0 12px; font-size: 15px; }
main.lv5.v5-hep .v5-a-t { min-height: 44px; }
main.lv5.v5-hep .v5-cam-nut, main.lv5.v5-hep .v5-cam-nuts.nho .v5-cam-nut { min-height: 44px; min-width: 44px; padding: 0 10px; }
main.lv5.v5-hep :is(.v5-in, .v5-zalo) { min-height: 44px; }
main.lv5.v5-hep .v5-c-go .input { height: 44px; }
main.lv5.v5-hep .v5-c-chon { left: 4px; right: 4px; }
main.lv5.v5-hep .v5-c-chon :is(button, .opt, .chip) { min-height: 38px; }
/* the card's pills, buttons, boxes and keypad on the board (raw px: x --zb >= 1.16 makes 38 px about 44 px), phones only */
main.lv5.v5-hep .v5-buoc .blk-tuong-tac[data-ve="bang"] :is(.tt-opt, .tt-opt.wide, .tt-opill, .tt-btn, .tt-pad button) { min-height: 38px; }
main.lv5.v5-hep .v5-buoc .blk-tuong-tac[data-ve="bang"] .tt-slot { min-height: 38px; height: 38px; min-width: 38px; }
main.lv5.v5-hep .v5-buoc .blk-tuong-tac[data-ve="bang"] .tt-pad button { height: 38px; min-width: 38px; }
main.lv5.v5-hep .v5-buoc .blk-tuong-tac[data-ve="bang"] .tt-pad { gap: 6px; max-width: none; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); }

/* the pinned page written out (anh Cường 24/10): the whole page as in the book, scrolling inside the pinned card; the question
   being corrected lit (yellow, orange ring), the rest dimmed; the child's answers in the blanks in blue handwriting; the chosen
   letter circled; a question done ticked */
main.lv5 .v5-ghim:has(.v5-trang-ghim) { flex: 1 1 auto; min-height: calc(160 * var(--u)); display: flex; flex-direction: column; }
main.lv5 .v5-ghim:has(.v5-trang-ghim) .v5-ghim-anh { flex: 1 1 auto; min-height: 0; overflow-y: auto; background: #fffaf0; scroll-behavior: smooth; }
main.lv5 .v5-trang-ghim .de-trang { gap: calc(8 * var(--u)); }
main.lv5 .v5-trang-ghim .de-chung-trang, main.lv5 .v5-trang-ghim .de-tieu { font-weight: 800; }
main.lv5 .v5-trang-ghim .de-bai, main.lv5 .v5-trang-ghim .de-y { transition: opacity .3s ease, background-color .3s ease; border-radius: calc(8 * var(--u)); }
main.lv5 .v5-trang-ghim.co-dang .de-bai:not(.chua-dang), main.lv5 .v5-trang-ghim.co-dang .de-chung-trang,
main.lv5 .v5-trang-ghim.co-dang .de-tieu, main.lv5 .v5-trang-ghim.co-dang .chua-dang .de-y:not(.dang) { opacity: .35; }
main.lv5 .v5-trang-ghim .dang { background: #fff1b8; box-shadow: 0 0 0 calc(3 * var(--u)) #f5a524; padding: calc(4 * var(--u)) calc(6 * var(--u)); }
main.lv5 .v5-trang-ghim .v5-be-ghi { color: #1d4ed8; font-weight: 900; font-family: "Itim", "Comic Sans MS", "Chalkboard SE", cursive;
  font-size: 1.1em; padding: 0 calc(4 * var(--u)); border-bottom: 2px dotted rgba(29, 78, 216, .55); }
main.lv5 .v5-trang-ghim .de-y.chon > .de-nhan { color: #1d4ed8; box-shadow: 0 0 0 calc(2.5 * var(--u)) #1d4ed8; border-radius: 999px; padding: 0 calc(4 * var(--u)); }
main.lv5 .v5-trang-ghim .de-y.xong::after { content: "✓"; margin-left: calc(6 * var(--u)); color: #2eb872; font-weight: 900; }
@media (prefers-reduced-motion: reduce) { main.lv5 .v5-ghim:has(.v5-trang-ghim) .v5-ghim-anh { scroll-behavior: auto; } }
main.lv5 .v5-trang-ghim .de-y.xong { grid-template-columns: auto minmax(0, 1fr) auto; }
main.lv5 .v5-o-chu { display: block; padding: 0 calc(3 * var(--u)); font-size: max(10px, calc(9 * var(--u))); line-height: 1.2; font-weight: 700;
  color: #5b5a66; text-align: left; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* ---------------- v2 (thiet-ke-v2/HOP-DONG-V2.md, khung.html M2–M10) ---------------- */
/* đèn lượt: one fixed line under the card's head, whose turn it is */
main.lv5 .v5-luot { flex: none; display: flex; align-items: center; justify-content: center; gap: calc(8 * var(--u)); margin: 0 calc(8 * var(--u)) calc(6 * var(--u));
  padding: calc(4 * var(--u)) calc(14 * var(--u)); border-radius: 999px; font-size: max(15px, calc(15 * var(--u))); line-height: 1.3; font-weight: 900; text-align: center;
  background: #e5efff; color: #1d4ed8; }
main.lv5 .v5-luot.hidden { display: none; }
main.lv5 .v5-luot[data-luot="sua_de"], main.lv5 .v5-luot[data-luot="tinh_nhap"] { background: #fff0dc; color: #9a4a00; }
main.lv5 .v5-luot[data-luot="pika_noi"] { background: #f0eef3; color: #5d5a68; }
main.lv5 .v5-luot[data-luot="noi"] .v5-luot-ic { animation: v5-luot 1.2s ease-in-out infinite; }
@keyframes v5-luot { 50% { transform: scale(1.18); } }
/* chua_cau / lam_lai: no cut + the stamp, the turn of the child */
main.lv5 .v5-cat-trong { position: relative; }
main.lv5 .v5-cat-trong .v5-dau { top: auto; bottom: calc(-8 * var(--u)); }
main.lv5 .v5-chua-phai { display: flex; flex-direction: column; gap: calc(6 * var(--u)); min-width: 0; }
main.lv5 .v5-chua-phai > .v5-nhan { margin: 0; }
main.lv5 .v5-hoi-ly-do { display: flex; align-items: center; gap: calc(10 * var(--u)); padding: calc(10 * var(--u)) calc(14 * var(--u)); border-radius: calc(14 * var(--u));
  background: #e5efff; color: #1e3a8a; }
main.lv5 .v5-hoi-ly-do b { font-size: max(15px, calc(18 * var(--u))); line-height: 1.35; font-weight: 900; }
main.lv5 .v5-hoi-ic { font-size: max(15px, calc(22 * var(--u))); }
main.lv5 .v5-lam-lai-loi { margin: 0; padding: calc(8 * var(--u)) calc(12 * var(--u)); border-radius: calc(12 * var(--u)); background: #fff0dc; color: #7a3d00;
  font-size: max(15px, calc(16 * var(--u))); font-weight: 900; line-height: 1.4; }
main.lv5 .v5-vong-ghi { display: flex; align-items: center; gap: calc(6 * var(--u)); margin: 0; font-size: max(var(--f-min), calc(13 * var(--u))); font-weight: 800; color: #8a5a00; }
main.lv5 .v5-vong-ghi i { width: calc(16 * var(--u)); height: calc(11 * var(--u)); border: calc(2.5 * var(--u)) solid #f5a524; border-radius: 50%; flex: none; }
/* goi_y_tay: one line in pencil handwriting next to the strokes */
main.lv5 .v5-tay { margin: calc(2 * var(--u)) 0 0; padding-left: calc(6 * var(--u)); font-family: "Itim", "Patrick Hand", "Comic Sans MS", "Chalkboard SE", cursive;
  font-size: max(16px, calc(19 * var(--u))); line-height: 1.35; font-weight: 400; color: #4b5260; transform: rotate(-1.2deg); transform-origin: left center; }
main.lv5 .v5-tay-mui { color: #8a8f99; }
/* "Sẵn sàng" after fixing it on paper: green, full width of the column, under the cuts */
main.lv5 .v5-san-lai { align-self: flex-start; display: inline-flex; align-items: center; gap: calc(10 * var(--u)); min-height: max(48px, calc(56 * var(--u))); margin-top: calc(4 * var(--u));
  padding: calc(6 * var(--u)) calc(20 * var(--u)); border: 0; border-radius: 999px; background: #2eb872; color: #fff; cursor: pointer; box-shadow: 0 3px 10px rgba(46, 184, 114, .35); }
main.lv5 .v5-san-lai .ic { width: max(24px, calc(26 * var(--u))); height: max(24px, calc(26 * var(--u))); filter: brightness(0) invert(1); }
main.lv5 .v5-san-lai span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; text-align: left; }
main.lv5 .v5-san-lai b { font-size: max(17px, calc(19 * var(--u))); font-weight: 900; }
main.lv5 .v5-san-lai small { font-size: max(var(--f-min), calc(13 * var(--u))); font-weight: 800; opacity: .92; }
main.lv5 .v5-san-lai:disabled { background: #9fd9bb; cursor: default; box-shadow: none; }
main.lv5 .v5-san-lai:focus-visible { outline: 3px solid var(--v5-xd); outline-offset: 2px; }
/* M9 (mở rộng): the clusters that may be this question's, enlarged; the whole sheet with every grey cluster to tap */
main.lv5 .v5-cham-cum { display: flex; flex-direction: column; gap: calc(8 * var(--u)); }
main.lv5 .v5-cham-cum-hoi { margin: 0; font-size: max(15px, calc(16 * var(--u))); font-weight: 900; line-height: 1.35; color: #1e3a8a; }
main.lv5 .v5-cum-ds { display: flex; flex-wrap: wrap; gap: calc(8 * var(--u)); }
main.lv5 .v5-cum-nut { flex: 1 1 calc(110 * var(--u)); min-width: 0; min-height: 44px; display: flex; flex-direction: column; align-items: stretch; gap: calc(4 * var(--u)); padding: calc(6 * var(--u));
  border-radius: calc(12 * var(--u)); border: calc(2 * var(--u)) dashed #9aa0aa; background: #fbfbf7; cursor: pointer; color: var(--v5-chu); font: inherit; }
main.lv5 .v5-cum-nut canvas { display: block; width: 100%; height: auto; object-fit: contain; }
main.lv5 .v5-cum-nut span { font-size: max(var(--f-min), calc(13 * var(--u))); font-weight: 900; }
main.lv5 .v5-cum-nut.chon, main.lv5 .v5-cum-o.chon { border-style: solid; border-color: var(--v5-xd); box-shadow: 0 0 0 calc(3 * var(--u)) rgba(59, 130, 246, .25); }
main.lv5 .v5-cum-to { position: relative; }
main.lv5 .v5-cum-to > img { display: block; width: 100%; height: auto; }
main.lv5 .v5-cum-o { position: absolute; padding: 0; border: calc(2 * var(--u)) dashed #8a8f99; border-radius: calc(8 * var(--u)); background: rgba(154, 160, 170, .18); cursor: pointer; }
/* M2 (mở rộng): "Còn trang nào nữa không?" + two big buttons */
main.lv5 .v5-hoi-trang { display: flex; flex-direction: column; gap: calc(12 * var(--u)); }
main.lv5 .v5-hoi-trang p { margin: 0; font-size: max(15px, calc(18 * var(--u))); font-weight: 900; line-height: 1.4; }
main.lv5 .v5-hoi-trang-ds { display: flex; flex-wrap: wrap; gap: calc(10 * var(--u)); }
main.lv5 .v5-hoi-trang-nut { flex: 1 1 calc(120 * var(--u)); min-height: max(48px, calc(56 * var(--u))); border-radius: calc(14 * var(--u)); border: calc(2 * var(--u)) solid var(--v5-vien);
  background: #fff; color: var(--v5-chu); font-size: max(16px, calc(18 * var(--u))); font-weight: 900; cursor: pointer; }
main.lv5 .v5-hoi-trang-nut.con { background: var(--v5-xd); border-color: var(--v5-xd); color: #fff; }
/* the board: the "Xem bằng hình" layer keeps its dark ground, its title in yellow */
main.lv5 .v5-bang-xanh .tt-lop-hinh { background-color: #24563f !important; }
main.lv5 .v5-bang-xanh .tt-lop-hinh-t { color: var(--v5-vang) !important; }
main.lv5 .v5-bang-xanh .tt-ke-mic { color: var(--v5-vang) !important; border-color: var(--v5-vang) !important; }
main.lv5 .v5-bang-xanh .tt-bb-buoc.cu > .tt-ten::before { color: #9be7bd; }
/* the report: right but could not say why */
main.lv5 .v5-hh-o.vang > span { background: #f5a524; }
@media (prefers-reduced-motion: reduce) { main.lv5 .v5-luot-ic { animation: none !important; } }
/* tall layout: the head line of the turn stays one line high, the cuts stacked */
main.lv5.v5-doc .v5-luot { margin: 0 calc(4 * var(--u)) calc(6 * var(--u)); }
main.lv5.v5-hep .v5-luot { font-size: 15px; padding: 4px 10px; }
/* the phone's board is short: the picture layer keeps its title in sight */
main.lv5.v5-doc .v5-bang-xanh .tt-lop-hinh { max-height: 190px; }
main.lv5.v5-doc .v5-bang-xanh .tt-bi { max-height: 120px; }

/* ---------------- v2 đợt sửa 2 (thiet-ke-v2/QA-VONG-1.md U1–U11) ---------------- */
/* U4: the stamp "ĐÚNG" in its own cell beside the cut (never on the page's numbers); on the board, in the pin's title row */
main.lv5 .v5-cat-hang { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: calc(14 * var(--u)); }
main.lv5 .v5-cat-hang > .v5-dau { position: relative; right: auto; top: auto; margin: calc(6 * var(--u)) calc(6 * var(--u)) calc(6 * var(--u)) 0; }
main.lv5 .v5-ghim-t { display: flex; align-items: center; justify-content: space-between; gap: calc(8 * var(--u)); }
main.lv5 .v5-ghim-t > .v5-dau { position: relative; right: auto; top: auto; flex: none; padding: calc(2 * var(--u)) calc(8 * var(--u)); border-width: calc(3 * var(--u));
  font-size: max(var(--f-min), calc(13 * var(--u))); margin: calc(2 * var(--u)) calc(4 * var(--u)); }
/* U6: "Sẵn sàng" stays in view: it sticks to the bottom of whatever scrolls around it */
main.lv5 .v5-chua-phai > .v5-san-lai { position: sticky; bottom: calc(4 * var(--u)); z-index: 3; }
main.lv5 .v5-tay { margin-top: calc(-2 * var(--u)); }
/* U11: the old scratch of a question fixed by voice */
main.lv5 .v5-cat-o.sua-loi canvas { opacity: .55; }
main.lv5 .v5-sua-loi { position: absolute; right: calc(8 * var(--u)); bottom: calc(8 * var(--u)); padding: calc(2 * var(--u)) calc(10 * var(--u)); border-radius: 999px;
  background: #e5efff; color: #1d4ed8; font-size: max(var(--f-min), calc(13 * var(--u))); font-weight: 900; box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
main.lv5 .v5-cat-o canvas { margin-inline: auto; }
/* U9: the tall layout: the camera frame then the box, no empty band between them */
main.lv5.v5-doc.v5-cam-pha .v5-b-body { align-content: start; }
main.lv5.v5-doc .v5-chua-phai > .v5-san-lai { align-self: stretch; justify-content: center; box-shadow: 0 3px 10px rgba(46, 184, 114, .35), 0 0 0 calc(8 * var(--u)) #fff; }
/* U7: the board scrolls by whole lines (man-hoc-v5.js theoDong); the top edge fades when there is more above */
main.lv5 .v5-buoc.tran-tren { -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 12px); mask-image: linear-gradient(180deg, transparent 0, #000 12px); }
/* U7: the keypad: keys >= 48 px on screen (the board is zoomed by --zb: raw px = 48 / zb). Đợt 3 R1 (S15 2a): no longer pinned to the
   bottom of the board (pinned, it covered the pills «chọn đáp án» drawn before it): it sits in the flow right under the frame, the
   board brings it into view with the box (man-hoc-v5.js honPad), it folds away once the number boxes are filled (tuong-tac.js) */
main.lv5 .v5-bang-xanh .v5-buoc .blk-tuong-tac[data-ve="bang"] .tt-pad { position: static; z-index: auto; max-width: none; width: 100%; gap: 6px; padding: 6px 0 4px;
  grid-template-columns: repeat(auto-fill, minmax(calc(48px / var(--zb, 1) + 1px), 1fr)); background-color: var(--v5-bang) !important; }
main.lv5 .v5-bang-xanh .v5-buoc .blk-tuong-tac[data-ve="bang"] .tt-pad button { min-height: calc(48px / var(--zb, 1) + 1px); height: calc(48px / var(--zb, 1) + 1px);
  min-width: calc(48px / var(--zb, 1) + 1px); font-size: 17px; }
/* U7: the «Xem bằng hình» layer: a solid ground, nothing of the board shows through or around it */
main.lv5 .v5-bang-xanh .tt-lop-hinh { opacity: 1; isolation: isolate; box-shadow: 0 0 0 10px #24563f, 0 -8px 20px rgba(0, 0, 0, .35) !important; }
/* U8: the tile: its code big, the first words of the question; the labels stay over their own tile */
main.lv5 .v5-o-ma { font-size: max(16px, calc(18 * var(--u))); }
main.lv5 .v5-o-chu { -webkit-line-clamp: 2; font-size: max(var(--f-min), calc(10 * var(--u))); line-height: 1.1; font-weight: 800; color: #4b4a57; text-align: center; padding: 0 calc(2 * var(--u)); }
/* a phone's tile is too small for words at 15 px: its code, big */
main.lv5.v5-hep .v5-o-anh:has(> .v5-o-chu) { display: none; }
main.lv5.v5-hep .v5-o:has(.v5-o-chu) { justify-content: center; }
main.lv5.v5-hep .v5-o:has(.v5-o-chu) .v5-o-ma { font-size: 20px; }
main.lv5 .v5-o-nhan { max-width: calc(100% + 8 * var(--u)); white-space: normal; text-align: center; line-height: 1.05; top: 0; transform: translate(-50%, -62%); padding: calc(2 * var(--u)) calc(5 * var(--u)); overflow: hidden; }
main.lv5 .v5-o-tr { left: calc(-2 * var(--u)); }
main.lv5.v5-hep .v5-o-nhan { max-width: 66px; transform: translate(-50%, -40%); }
/* U9: the tall layout: the head's chips wrap to a second line; Pika's line up to 3 lines */
main.lv5.v5-doc .v5-b-h { flex-wrap: wrap; row-gap: calc(4 * var(--u)); }
main.lv5.v5-doc .v5-b-chips { flex-wrap: wrap; overflow: visible; }
main.lv5.v5-doc .v5-c-cau { -webkit-line-clamp: 3; line-height: 1.22; }
main.session.lv5.v5-doc { grid-template-rows: max(118px, calc(118 * var(--u))) minmax(0, 1fr) max(96px, calc(92 * var(--u))); }
main.session.lv5.v5-hep { grid-template-rows: 130px minmax(0, 1fr) max(96px, calc(92 * var(--u))); }
/* U11: a cluster's label sits left of its strokes (never on the child's result); the frame's links and Kết thúc >= 44 px */
main.lv5 .v5-cum.nhan-trai > span { right: calc(100% + 3 * var(--u)); left: auto; top: 0; }
main.lv5 .v5-cum.nhan-tren > span { left: 0; right: auto; top: auto; bottom: calc(100% + 2 * var(--u)); }
main.lv5 .v5-cam-nut, main.lv5 .v5-cam-nuts.nho .v5-cam-nut { min-height: 44px; min-width: 44px; padding: 0 10px; }
main.lv5 .v5-a > .btn.danger { min-height: 44px; min-width: 44px; }
main.lv5 .v5-bang-xanh .v5-buoc .blk-tuong-tac[data-ve="bang"] .tt-pad button { display: flex; align-items: center; justify-content: center; padding: 0; }
/* the phone with the keypad open: the pinned problem gives the board room (the question, the box and the keys together) */
main.lv5.v5-doc .v5-bang:has(.tt-pad:not([hidden])) .v5-ghim-anh { max-height: 10vh; overflow-y: auto; }
main.lv5.v5-doc .v5-bang:has(.tt-pad:not([hidden])) .v5-ghim-anh canvas { max-height: none !important; }
/* v2 đợt 5 việc 10 (U8: «Pika dạy lại», «đề trống» cut by the top of the strip): a tile's label is ONE line centred on the tile's top
   edge (two or three lines rose above the strip, whose overflow-x:auto clips it), the strip leaves room for its upper half */
main.lv5 .v5-o-nhan { white-space: nowrap; max-width: none; overflow: visible; line-height: 1.15; transform: translate(-50%, -50%);
  font-size: max(11px, calc(9.5 * var(--u))); padding: 1px calc(5 * var(--u)); letter-spacing: -0.01em; }
main.lv5 .v5-tiles { padding-top: max(14px, calc(14 * var(--u))); }
main.lv5.v5-doc .v5-tiles { padding-top: max(18px, calc(14 * var(--u))); }
/* the phone's 52 px tile: a long label («để Pika dạy») may take two short lines, still centred on the edge: the strip's 18 px top
   room holds its upper half; never wider than the tile + half the gap on each side */
main.lv5.v5-hep .v5-o-nhan { transform: translate(-50%, -50%); font-size: 10.5px; padding: 1px 3px; letter-spacing: -0.02em;
  white-space: normal; width: max-content; max-width: 56px; line-height: 1.05; }
/* anh Cường 24/10: the fix / redo screen shows the page written out with the question lit, no photo cut; its own scroll */
main.lv5 .v5-chua-ghim { max-height: min(42vh, calc(360 * var(--u))); overflow-y: auto; }
main.lv5.v5-doc .v5-chua-ghim { max-height: min(26vh, calc(220 * var(--u))); }

/* ---------------- làn 2d: «Giải cả đề» (đặc tả dieu-phoi mục 4, 8; man-hoc-v5.js, giai-de-man.js). Never red: a mistake is
   amber / orange, right is green. ---------------- */
/* the step strip: only what the server said (op tien_do), Pika's pose at its start */
main.lv5 .v5-dai { flex: none; display: flex; align-items: center; justify-content: center; gap: calc(10 * var(--u)); margin: 0 calc(8 * var(--u)) calc(6 * var(--u)); min-height: calc(40 * var(--u)); }
main.lv5 .v5-dai.hidden, main.lv5 .v5-dai-goi.hidden, main.lv5 .v5-dai-pika.hidden { display: none; }
main.lv5 .v5-dai-pika { flex: none; width: calc(44 * var(--u)); height: calc(44 * var(--u)); display: grid; place-items: center; }
main.lv5 .v5-dai-pika img, main.lv5 .v5-c-tu-the img { width: 100%; height: 100%; display: block; object-fit: contain; }
main.lv5 .v5-dai-ds { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: calc(6 * var(--u)) calc(18 * var(--u)); margin: 0; padding: 0; list-style: none; }
main.lv5 .v5-dai-ds li { display: inline-flex; align-items: center; gap: calc(5 * var(--u)); padding: calc(3 * var(--u)) calc(10 * var(--u)); border-radius: 999px;
  font-size: max(var(--f-min), calc(14 * var(--u))); font-weight: 800; color: var(--v5-xam); background: #f3f1f6; border: calc(2 * var(--u)) solid transparent; white-space: nowrap; }
main.lv5 .v5-dai-ds li + li::before { content: "›"; position: absolute; left: calc(-13 * var(--u)); color: #c9c4d3; font-weight: 900; }
main.lv5 .v5-dai-ds li { position: relative; }
main.lv5 .v5-dai-ds li[data-tt="xong"] { color: #1f9a5c; background: #ddf6e8; }
main.lv5 .v5-dai-ds li[data-tt="dang"] { color: #1e4fa8; background: #e5efff; border-color: var(--v5-xd); animation: v5-dai-tho 1.6s ease-in-out infinite; }
main.lv5 .v5-dai-ds li[data-tt="het_gio"] { color: #8a5a00; background: #fff3c4; border-color: #f5a524; }
main.lv5 .v5-dai-ds li[data-tt="loi"] { color: #8a5a00; background: var(--v5-cam-nhat); border-color: var(--v5-cam); }
main.lv5 .v5-dai-ic { font-weight: 900; }
@keyframes v5-dai-tho { 0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, .35); } 50% { box-shadow: 0 0 0 calc(4 * var(--u)) rgba(59, 130, 246, 0); } }
main.lv5 .v5-dai-goi { flex: none; margin: 0 calc(8 * var(--u)) calc(6 * var(--u)); padding: calc(4 * var(--u)) calc(12 * var(--u)); border-radius: calc(10 * var(--u)); background: #fff8e1;
  color: #8a5a00; font-size: max(15px, calc(15 * var(--u))); font-weight: 800; text-align: center; }
/* Pika's pose in strip C (in place of the waving Pika) */
main.lv5 .v5-c-tu-the { display: grid; place-items: center; padding: calc(2 * var(--u)); overflow: hidden; }
main.lv5 .v5-c-tu-the.hidden, main.lv5 .v5-c-av.hidden { display: none; }
/* the effect sounds' own switch */
main.lv5 .v5-nut.am.hidden { display: none; }
main.lv5 .v5-ic-am { font-size: max(var(--f-min, 13px), calc(17 * var(--u))); line-height: 1; }
main.lv5 .v5-nut.am[data-tat="1"] { color: var(--v5-xam); background: #f3f1f6; }
/* the tiles: one per beat (Pika counts them), the faint ones while the page is read, the letter read, «?» chưa chắc */
main.lv5 .v5-o.vao { animation: v5-o-vao .38s cubic-bezier(.3, 1.4, .5, 1) backwards; }
@keyframes v5-o-vao { from { opacity: 0; transform: translateY(calc(8 * var(--u))) scale(.6); } }
main.lv5 .v5-o.bong { border-style: dashed; background: linear-gradient(100deg, #f3f1f6 30%, #ffffff 50%, #f3f1f6 70%) 0 0 / 300% 100%; animation: v5-bong 1.6s ease-in-out infinite; }
@keyframes v5-bong { from { background-position: 100% 0; } to { background-position: 0 0; } }
main.lv5 button.v5-o { font: inherit; color: inherit; cursor: pointer; appearance: none; }
main.lv5 button.v5-o.cham:hover { border-color: var(--v5-xd); }
main.lv5 button.v5-o.cham:focus-visible { outline: 3px solid var(--v5-xd); outline-offset: 2px; }
/* anh Cường 24/10: a tile is a button to its question (op chon_cau): ≥ 44 px to touch, a clear «chosen» ring; ✎ in its corner fixes
   the letter read (be_sua_chon) */
main.lv5 .v5-o.nhay { cursor: pointer; min-width: 44px; min-height: 44px; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
main.lv5 .v5-o.nhay:hover { border-color: var(--v5-xd); }
main.lv5 .v5-o.nhay:active { transform: scale(.96); }
main.lv5 .v5-o.nhay:focus-visible, main.lv5 .v5-hh-o.nhay:focus-visible { outline: 3px solid var(--v5-xd); outline-offset: 2px; }
main.lv5 .v5-o.chon { border-color: var(--v5-xd); box-shadow: 0 0 0 calc(3 * var(--u)) #fff, 0 0 0 calc(6 * var(--u)) var(--v5-xd); transform: translateY(calc(-2 * var(--u))); }
main.lv5 .v5-o-sua { position: absolute; right: -7px; bottom: -3px; z-index: 3; width: 24px; height: 24px; padding: 0; border-radius: 50%;
  border: 2px solid #fff; background: #1e4fa8; color: #fff; font: 900 14px/1 inherit; display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
main.lv5 .v5-o-sua::before { content: ""; position: absolute; inset: -9px; }   /* hit area ≈ 44 px */
main.lv5 .v5-o-sua:focus-visible { outline: 3px solid var(--v5-xd); outline-offset: 2px; }
main.lv5 .v5-hh-o.nhay { cursor: pointer; min-width: 44px; min-height: 44px; border-radius: 10px; padding: 2px 4px; }
main.lv5 .v5-hh-o.nhay:hover { background: rgba(59, 130, 246, .08); }
main.lv5 .v5-hh-o.chon { box-shadow: 0 0 0 3px var(--v5-xd); }
main.lv5 .v5-o-chu.v5-o-chon { font-size: max(15px, calc(20 * var(--u))); font-weight: 900; color: #1e4fa8; line-height: 1.1; overflow: visible; }
main.lv5 .v5-o-hoi { position: absolute; right: calc(-8 * var(--u)); top: calc(16 * var(--u)); z-index: 2; width: max(22px, calc(20 * var(--u))); height: max(22px, calc(20 * var(--u))); border-radius: 50%;
  display: grid; place-items: center; background: var(--v5-cam); color: #fff; font-size: max(var(--f-min, 13px), calc(13 * var(--u))); font-weight: 900; box-shadow: 0 0 0 2px #fff; }
main.lv5 .v5-o-the { position: absolute; left: 50%; bottom: calc(-8 * var(--u)); transform: translateX(-50%); width: calc(7 * var(--u)); height: calc(7 * var(--u)); border-radius: 50%; background: #b3afbd; }
main.lv5 .v5-o[data-tt="chua_cham"] { background: #f3f1f6; border-color: #b8bfca; border-style: dashed; }
main.lv5 .v5-o[data-tt="chua_cham"] .v5-o-nhan { background: #7b8494; }
/* phiên 24/10: «chưa làm» / «chưa thấy» are neutral (grey dashed), never the yellow / orange of a wrong answer */
main.lv5 .v5-o[data-tt="chua_lam"], main.lv5 .v5-o[data-tt="chua_thay"] { background: #fff; border-color: #b8bfca; border-style: dashed; }
main.lv5 .v5-o[data-tt="chua_lam"] .v5-o-nhan, main.lv5 .v5-o[data-tt="chua_thay"] .v5-o-nhan { background: #7b8494; }
main.lv5 .v5-o[data-tt="chua_lam"] .v5-o-ma, main.lv5 .v5-o[data-tt="chua_thay"] .v5-o-ma { color: #5b6472; }
main.lv5 .v5-o[data-tt="chua_ro"] { background: #fff; border-color: var(--v5-cam); border-style: dashed; }
main.lv5 .v5-o[data-tt="chua_ro"] .v5-o-nhan { background: var(--v5-cam); }
@media (prefers-reduced-motion: reduce) { main.lv5 .v5-o.vao, main.lv5 .v5-o.bong, main.lv5 .v5-dai-ds li[data-tt="dang"] { animation: none; } }
/* tapping a tile: the big letters / the number keys, «Tớ chưa chắc» */
main.lv5 .v5-sua { position: absolute; z-index: 20; top: calc(8 * var(--u)); left: 50%; transform: translateX(-50%); width: min(calc(100% - 16px), calc(420 * var(--u))); padding: calc(12 * var(--u)) calc(14 * var(--u));
  display: flex; flex-direction: column; gap: calc(10 * var(--u)); border-radius: calc(16 * var(--u)); background: #fff; box-shadow: 0 10px 34px rgba(60, 40, 20, .22), 0 0 0 2px #e5efff; }
main.lv5 .v5-sua.hidden { display: none; }
main.lv5 .v5-sua-dau { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: max(15px, calc(17 * var(--u))); }
main.lv5 .v5-sua-nut { min-width: 44px; min-height: 44px; border: calc(2 * var(--u)) solid #d7d2e0; border-radius: calc(12 * var(--u)); background: #fff; color: var(--v5-chu); font-size: max(15px, calc(17 * var(--u))); font-weight: 900; cursor: pointer; }
main.lv5 .v5-sua-nut.dong { border-color: transparent; color: var(--v5-xam); }
main.lv5 .v5-sua-chu { display: flex; justify-content: center; gap: calc(14 * var(--u)); }
main.lv5 .v5-sua-chu .v5-sua-nut { width: max(56px, calc(60 * var(--u))); height: max(56px, calc(60 * var(--u))); border-radius: 50%; font-size: max(22px, calc(26 * var(--u))); color: #1e4fa8; }
main.lv5 .v5-sua-chu .v5-sua-nut.chon { border-color: var(--v5-xd); background: #e5efff; }
main.lv5 .v5-sua-so { display: flex; flex-direction: column; align-items: center; gap: calc(8 * var(--u)); }
main.lv5 .v5-sua-o { min-width: calc(90 * var(--u)); text-align: center; font-size: max(22px, calc(26 * var(--u))); color: #1e4fa8; border-bottom: 3px solid #93b4f5; }
main.lv5 .v5-sua-phim { display: grid; grid-template-columns: repeat(3, max(56px, calc(56 * var(--u)))); gap: calc(8 * var(--u)); }
main.lv5 .v5-sua-phim .ok { grid-column: span 2; background: var(--v5-la); border-color: var(--v5-la); color: #fff; }
main.lv5 .v5-sua-nut.hoi { align-self: center; padding: 0 calc(18 * var(--u)); border-color: var(--v5-cam); color: #b25e00; }
main.lv5 .v5-sua-nut.hoi i { font-style: normal; display: inline-grid; place-items: center; width: 1.3em; height: 1.3em; border-radius: 50%; background: var(--v5-cam); color: #fff; }
main.lv5 .v5-sua-nut.hoi.da { opacity: .7; cursor: default; }
/* a question's picture on the pinned page: the cut, or the clean drawing + a small «Xem ảnh gốc» (a 44 px hit area) */
main.lv5 .v5-hinh { grid-column: 1 / -1; margin: calc(6 * var(--u)) 0 calc(2 * var(--u)); display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
main.lv5 .v5-hinh .v5-cat, main.lv5 .v5-hinh-ve { display: block; max-width: 100%; max-height: calc(170 * var(--u)); border-radius: calc(8 * var(--u)); background: #fff; border: 1px solid #ece6da; }
main.lv5 .v5-hinh-ve { width: auto; min-width: calc(120 * var(--u)); padding: calc(4 * var(--u)); }
main.lv5 .v5-hinh-doi { min-height: 44px; padding: 0 6px; border: 0; background: none; color: var(--v5-xd); font-size: 15px; font-weight: 800; text-decoration: underline; cursor: pointer; }
/* the letter read on the pinned page before any grade: a neutral grey ring (not yet right or wrong) */
main.lv5 .v5-trang-ghim .de-y.chon.doc > .de-nhan { color: #4a4a55; box-shadow: 0 0 0 calc(2.5 * var(--u)) #9a96a6; }
/* the board's head: Dạng → Cách làm → Bước i/n (chalk on the green board) */
main.lv5 .v5-the-dai { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; margin: 2px 4px 6px; padding: 0; list-style: none; zoom: var(--zb, 1); font-size: 14px; line-height: 1.25; }
main.lv5 .v5-the-dai.hidden, main.lv5 .v5-bang-cho.hidden { display: none; }
main.lv5 .v5-the-dai li { position: relative; display: flex; align-items: baseline; gap: 5px; padding: 2px 8px; border: 1.5px solid; border-radius: 8px; }
main.lv5 .v5-the-dai li + li::before { content: "→"; position: absolute; left: -17px; top: 50%; transform: translateY(-50%); font-size: 15px; font-weight: 900; color: var(--v5-vang); }
main.lv5 .v5-the-dai small { font-size: 13px; font-weight: 800; opacity: .85; white-space: nowrap; }
main.lv5 .v5-the-dai b { font-size: 14px; font-weight: 900; }
main.lv5 .v5-bang-xanh .v5-the-dai b { color: var(--v5-vang) !important; }
/* the card not there yet: chalk lines being drawn, no words, no numbers */
main.lv5 .v5-bang-cho { flex: none; padding: 10px 12px; zoom: var(--zb, 1); font-size: 16px; font-weight: 800; }
main.lv5 .v5-bang-cho p { margin: 0 0 10px; }
main.lv5 .v5-bang-cho i { display: block; height: 0; margin: 14px 0; border-bottom: 3px dashed; width: 0; animation: v5-phan 2.4s ease-in-out infinite; }
main.lv5 .v5-bang-cho i:nth-of-type(2) { animation-delay: .4s; }
main.lv5 .v5-bang-cho i:nth-of-type(3) { animation-delay: .8s; }
@keyframes v5-phan { 0% { width: 0; } 60%, 100% { width: 72%; } }
@media (prefers-reduced-motion: reduce) { main.lv5 .v5-bang-cho i { animation: none; width: 60%; } }
/* the 25 s ring around «Sẵn sàng» (tien_do cho_bam han_s): the real time left, no number; the last 3 s three dots light up */
@property --v5-vong { syntax: "<number>"; inherits: false; initial-value: 0; }
main.lv5 .v5-san-sang.vong::before { content: ""; position: absolute; inset: -9px; border-radius: 999px; padding: 5px; pointer-events: none;
  background: conic-gradient(from 0deg, #2eb872 calc(var(--v5-vong) * 1%), rgba(255, 255, 255, .85) 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: v5-vong var(--han, 25s) linear var(--tre, 0s) both; }
@keyframes v5-vong { from { --v5-vong: 0; } to { --v5-vong: 100; } }
main.lv5 .v5-ba-cham { display: none; flex-direction: row; align-items: center; gap: 5px; margin-left: 4px; font-style: normal; }
main.lv5 .v5-san-sang.vong .v5-ba-cham { display: inline-flex; }
main.lv5 .v5-ba-cham i { width: 9px; height: 9px; border-radius: 50%; background: #fff; opacity: .3; animation: v5-cham-sang .25s ease-out var(--tre-cham, 99s) both; }
@keyframes v5-cham-sang { to { opacity: 1; transform: scale(1.25); } }
/* the tall layout: the green board is short; the head strip keeps Dạng and Bước only, the way of doing it is left to the card */
main.lv5.v5-doc .v5-the-dai { gap: 2px 18px; margin: 0 2px 4px; }
main.lv5.v5-doc .v5-the-dai li { min-width: 0; flex: 0 1 auto; }
main.lv5.v5-doc .v5-the-dai li.cach { display: none; }
main.lv5.v5-doc .v5-dai { gap: calc(6 * var(--u)); margin-bottom: calc(4 * var(--u)); }
main.lv5.v5-doc .v5-dai-ds li { padding: 2px 8px; }
/* the phone's 52 px tile: the letter / number read is what matters while checking: it shows, the code goes small under it */
main.lv5.v5-hep .v5-o-anh:has(> .v5-o-chon) { display: grid; height: 26px; background: transparent; }
main.lv5.v5-hep .v5-o:has(.v5-o-chon) { justify-content: center; gap: 0; }
main.lv5.v5-hep .v5-o:has(.v5-o-chon) .v5-o-ma { font-size: 15px; }
main.lv5.v5-hep .v5-o-chu.v5-o-chon { font-size: 19px; }
/* the phone: a step done keeps its ✓ only, a step to come its picture only; the step running says its words */
main.lv5.v5-doc .v5-dai-ds li:is([data-tt="xong"], [data-tt="cho"]) > span:last-child { display: none; }
/* the three dots sit over the button (they never squeeze its words) */
main.lv5 .v5-ba-cham { position: absolute; left: 50%; top: -22px; transform: translateX(-50%); margin: 0; }
main.lv5 .v5-ba-cham i { box-shadow: 0 0 0 2px rgba(46, 184, 114, .9); }
/* «Giải cả đề», the tall layout: «Còn trang nữa» / «Hết rồi» is the one thing to do on that screen: above the camera, in view */
main.lv5[data-gd].v5-doc.v5-cam-pha .v5-b-body:has(.v5-hoi-trang) { grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "phai" "cam"; }
main.lv5.v5-doc .v5-bang-cho { padding: 4px 8px; font-size: 15px; }
main.lv5.v5-doc .v5-bang-cho p { margin: 0 0 2px; }
main.lv5.v5-doc .v5-bang-cho i { margin: 8px 0; }
main.lv5.v5-doc .v5-bang-cho i:nth-of-type(3) { display: none; }

/* ================= XDR-GIAI-DE-02 (docs/xdr/XDR-GIAI-DE-02-bo-cuc-man.md; anh Cường 24/10, màn 1366 px) =================
   1. strip A one low row (58 u ≈ 73–83 px at 1366): tiles 40 u (≥ 44 px drawn), the summary one line with big numbers, Kết thúc
      small in the corner (its hit area 44 px);
   2. the card's status lines (lượt, the step strip, the small job) share ONE slot of a fixed height in the head row: nothing that
      comes or goes moves the board, the problem or the scratch column (man-hoc-v5.js veOTT / oTrangThai);
   3. the board: a fixed grid, left the problem + «Cậu làm» (fixed height), right «Dạng · Bước i/n» (one small line) over the step
      area; one type scale of 3 steps for the board, as drawn: --f-s (15 px), --f-m (≥ 18 px, what the child reads), --f-l (results);
      inside the zoomed step column the sizes are written as N / --zb so they are drawn at N. */
main.session.lv5 { --f-s: max(15px, calc(10.5 * var(--u))); --f-m: max(18px, calc(13.5 * var(--u))); --f-l: max(22px, calc(16.5 * var(--u)));
  --h-tt: max(44px, calc(34 * var(--u))); }
main.lv5 .v5-sr { opacity: 0; }      /* screen-reader only: still read (opacity keeps it in the tree), never drawn; overflow stays hidden (a visible
   overflow made main scroll sideways) */

/* ---- 1. strip A ---- */
main.session.lv5:not(.v5-doc) { grid-template-rows: calc(58 * var(--u)) minmax(0, 1fr) calc(70 * var(--u)); }
main.session.lv5.v5-thap:not(.v5-doc) { grid-template-rows: calc(58 * var(--u)) minmax(0, 1fr) calc(62 * var(--u)); }
main.lv5:not(.v5-doc) .v5-a { gap: calc(14 * var(--u)); padding: calc(3 * var(--u)) calc(8 * var(--u)) calc(3 * var(--u)) calc(14 * var(--u)); align-items: center; }
main.lv5:not(.v5-doc) .v5-a-t { flex-direction: row; align-items: baseline; gap: calc(6 * var(--u)); min-width: 0; padding: 0; align-self: center; white-space: nowrap; }
main.lv5:not(.v5-doc) .v5-a-t:has(.v5-a-t2:not(:empty)) .v5-a-t1 { display: none; }
main.lv5 .v5-a-t2 .so { font-size: max(18px, calc(22 * var(--u))); font-weight: 900; color: var(--v5-chu); letter-spacing: -.01em; }
main.lv5:not(.v5-doc) .v5-tiles { align-self: stretch; gap: calc(10 * var(--u)); padding: calc(8 * var(--u)) calc(4 * var(--u)) calc(4 * var(--u)); }
main.lv5:not(.v5-doc) .v5-o { width: calc(58 * var(--u)); height: calc(40 * var(--u)); padding: calc(2 * var(--u)) calc(3 * var(--u)) calc(1 * var(--u)); }
main.lv5.v5-thap:not(.v5-doc) .v5-o { height: calc(40 * var(--u)); }
main.lv5:not(.v5-doc) .v5-o-anh { height: calc(17 * var(--u)); }
main.lv5:not(.v5-doc) .v5-o-ma { font-size: max(16px, calc(16 * var(--u))); line-height: 1.05; }
main.lv5:not(.v5-doc) .v5-o-chu.v5-o-chon { font-size: max(15px, calc(16 * var(--u))); }
main.lv5:not(.v5-doc) .v5-o-tick { font-size: max(15px, calc(18 * var(--u))); }
main.lv5:not(.v5-doc) .v5-o-nhan { font-size: max(var(--f-min), calc(9.5 * var(--u))); padding: 0 calc(5 * var(--u)); }
main.lv5:not(.v5-doc) .v5-o-tr { top: calc(-6 * var(--u)); }
main.lv5:not(.v5-doc) .v5-o-hoi { top: calc(10 * var(--u)); }
main.lv5:not(.v5-doc) .v5-o-the { bottom: calc(1 * var(--u)); }
main.lv5 .v5-o-sua::before { inset: -10px; }      /* 24 + 2 × 10 = 44 px to press */
main.lv5:not(.v5-doc) .v5-dh { width: calc(100 * var(--u)); height: calc(44 * var(--u)); border-radius: calc(12 * var(--u)); }
main.lv5:not(.v5-doc) .v5-dh b { font-size: max(15px, calc(22 * var(--u))); }
main.lv5:not(.v5-doc) .v5-dh small { font-size: max(var(--f-min), calc(10 * var(--u))); line-height: 1.1; }
main.lv5:not(.v5-doc) .v5-a > .btn.danger { align-self: flex-start; min-height: 44px; min-width: 44px; padding: 0 calc(6 * var(--u)); margin: calc(-2 * var(--u)) 0 0;
  font-size: var(--f-min); border-color: transparent; color: #a19dac; }

/* ---- 2. the card's head row: the title | ONE status slot (fixed height) | the machine's pill ---- */
main.lv5 .v5-b-h { display: grid; grid-template-columns: minmax(0, max-content) minmax(46%, 1fr) auto; align-items: center; column-gap: calc(10 * var(--u));
  height: var(--h-tt); min-height: 0; padding: 0 calc(6 * var(--u)); margin: 0 0 calc(6 * var(--u)); flex: none; flex-wrap: nowrap; box-sizing: border-box; }
main.lv5 .v5-b-h.an { visibility: hidden; }
main.lv5 .v5-b-t { display: flex; align-items: center; gap: calc(8 * var(--u)); min-width: 0; }
main.lv5 .v5-b-t .v5-b-ten { flex: 0 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; }
main.lv5 .v5-b-t .v5-b-chips { flex: 0 3 auto; }
main.lv5 .v5-pill { margin-left: 0; max-width: calc(260 * var(--u)); }
main.lv5 .v5-tt { position: relative; display: flex; align-items: center; justify-content: center; gap: calc(8 * var(--u)); height: 100%; min-width: 0; }
main.lv5 .v5-tt > :is(.v5-luot, .v5-dai, .v5-dai-goi) { display: none; }
main.lv5 .v5-tt[data-uu="luot"] > .v5-luot:not(.hidden) { display: flex; }
main.lv5 .v5-tt[data-uu="dai"] > .v5-dai:not(.hidden) { display: flex; }
main.lv5 .v5-tt[data-uu="goi"] > .v5-dai-goi:not(.hidden), main.lv5 .v5-tt[data-uu="dai"].co-goi > .v5-dai-goi:not(.hidden) { display: block; }
main.lv5 .v5-tt .v5-luot { flex: 0 1 auto; min-width: 0; height: calc(100% - 4px); margin: 0; padding: 0 calc(16 * var(--u)); box-sizing: border-box; font-size: max(15px, calc(15 * var(--u))); }
main.lv5 .v5-tt .v5-luot-ic { flex: none; }
main.lv5 .v5-tt .v5-luot > b { min-width: 0; overflow: hidden; white-space: nowrap; }
main.lv5 .v5-tt .v5-dai { flex: 0 1 auto; min-width: 0; height: 100%; min-height: 0; margin: 0; gap: calc(6 * var(--u)); overflow: hidden; }
main.lv5 .v5-tt .v5-dai-pika { width: calc(var(--h-tt) - 6px); height: calc(var(--h-tt) - 6px); }
main.lv5 .v5-tt .v5-dai-ds { flex-wrap: nowrap; gap: 0 calc(16 * var(--u)); min-width: 0; }
main.lv5 .v5-tt .v5-dai-ds li { white-space: nowrap; padding: calc(2 * var(--u)) calc(8 * var(--u)); font-size: max(15px, calc(13 * var(--u))); }
main.lv5 .v5-tt .v5-dai.gon .v5-dai-ds li:is([data-tt="xong"], [data-tt="cho"]) > span:last-child,
main.lv5 .v5-tt .v5-dai.gon2 .v5-dai-ds li:not([data-tt="dang"]):not([data-tt="het_gio"]) > span:last-child { display: none; }
main.lv5 .v5-tt .v5-dai-goi { flex: 0 1 auto; min-width: 0; margin: 0; overflow: hidden; white-space: nowrap; padding: calc(4 * var(--u)) calc(12 * var(--u)); font-size: max(15px, calc(14 * var(--u))); }
main.lv5 .v5-tt.co-goi .v5-dai-goi { flex: 1 1 0; text-align: left; }
/* the tall layout: the title on its own line, the slot on the line under it (both fixed) */
main.lv5.v5-doc .v5-b-h { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: max(26px, calc(24 * var(--u))) var(--h-tt); row-gap: 4px;
  height: calc(max(26px, calc(24 * var(--u))) + var(--h-tt) + 4px); padding: 0 calc(4 * var(--u)); }
main.lv5.v5-doc .v5-tt { grid-column: 1 / -1; grid-row: 2; }
main.lv5.v5-doc .v5-tt .v5-dai-pika { display: none; }
main.lv5.v5-doc .v5-dai-ds li:is([data-tt="xong"], [data-tt="cho"]) > span:last-child { display: none; }
main.lv5.v5-cam-pha .v5-b-body { margin: 0; }      /* the card's body at the same place in every phase */

/* ---- 3. the board ---- */
main.lv5[data-pha="bang_co"]:not(.v5-doc) .v5-b-body, main.lv5[data-pha="day_lai_hinh"]:not(.v5-doc) .v5-b-body { grid-template-columns: minmax(0, 68fr) minmax(0, 32fr); }
main.lv5:not(.v5-doc) .v5-bang { grid-template-columns: minmax(0, 40fr) minmax(0, 60fr); grid-template-rows: minmax(0, 1fr); gap: calc(10 * var(--u)); padding: calc(8 * var(--u)); border-width: calc(5 * var(--u)); }
main.lv5:not(.v5-doc) .v5-bang-trai { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: calc(8 * var(--u)); overflow: visible; }
main.lv5:not(.v5-doc) .v5-ghim, main.lv5:not(.v5-doc) .v5-ghim:has(.v5-trang-ghim) { min-height: 0; display: flex; flex-direction: column; }
main.lv5:not(.v5-doc) .v5-ghim-anh { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
main.lv5 .v5-ghim-t { font-size: var(--f-s); }
main.lv5 .v5-ghim-chu { font-size: var(--f-m); line-height: 1.4; }
main.lv5 .v5-con-lam { box-sizing: border-box; height: calc(var(--f-s) * 1.3 + var(--f-m) * 2.7 + 18 * var(--u)); padding: calc(8 * var(--u)) calc(12 * var(--u)); overflow: hidden; }
main.lv5 .v5-con-lam.trong { visibility: hidden; }
main.lv5 .v5-con-lam small { font-size: var(--f-s); line-height: 1.3; margin: 0 0 calc(2 * var(--u)); }
main.lv5 .v5-con-lam p { height: calc(var(--f-m) * 2.7); overflow: hidden; font-size: var(--f-m); line-height: 1.35; }
main.lv5 .v5-bang-xanh { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
main.lv5 .v5-the-dai { display: block; flex: none; zoom: 1; box-sizing: content-box; height: calc(var(--f-s) * 1.4); margin: 0 0 calc(6 * var(--u)); padding: 0 2px calc(4 * var(--u));
  font-size: var(--f-s); line-height: calc(var(--f-s) * 1.4); font-weight: 800; white-space: nowrap; overflow: hidden; border-bottom: 1px dashed rgba(255, 255, 255, .3); }
main.lv5 .v5-the-dai.trong { visibility: hidden; }
main.lv5 .v5-bang-xanh .v5-the-dai :is(small, i) { color: rgba(255, 255, 255, .78); font-size: 1em; font-style: normal; }
main.lv5 .v5-bang-xanh .v5-the-dai b { color: var(--v5-vang) !important; font-size: 1em; }
main.lv5 .v5-bang-viec { flex: 1 1 auto; min-height: 0; position: relative; display: flex; flex-direction: column; }
main.lv5 .v5-bang-viec > .v5-bang-cho { position: absolute; left: 0; right: 0; top: 0; z-index: 2; zoom: 1; padding: calc(4 * var(--u)) calc(4 * var(--u)); font-size: var(--f-m); pointer-events: none; }
/* the step area: what the child reads --f-m, the results --f-l, the notes --f-s; every pill / button / box to press >= 48 px drawn */
main.lv5 .v5-bang-xanh .v5-buoc .blk-tuong-tac[data-ve="bang"] :is(.tt-bb-buoc, .tt-ten, .tt-q, .tt-fb, .tt-hint-sai, .tt-nac-phep, .tt-ke-lai, .tt-khung, .tt-slots, .tt-lop-hinh-t) {
  font-size: calc(var(--f-m) / var(--zb, 1)); line-height: 1.4; }
main.lv5 .v5-bang-xanh .v5-buoc .blk-tuong-tac[data-ve="bang"] :is(.tt-kq, .tt-dong) { font-size: calc(var(--f-l) / var(--zb, 1)); line-height: 1.35; }
main.lv5 .v5-bang-xanh .v5-buoc .blk-tuong-tac[data-ve="bang"] .tt-tom-tat li { font-size: calc(var(--f-m) / var(--zb, 1)); line-height: 1.4; text-align: left; font-weight: 600; }   /* 27/10 anh Cường: tóm tắt từng dòng chữ to như kết quả, khó đọc */
main.lv5 .v5-bang-xanh .v5-buoc .blk-tuong-tac[data-ve="bang"] .tt-bb-buoc.cu .tt-kq { font-size: calc(var(--f-m) / var(--zb, 1)); }
main.lv5 .v5-bang-xanh .v5-buoc .blk-tuong-tac[data-ve="bang"] :is(.tt-gt, .tt-lop-hinh-ghi) { font-size: calc(var(--f-s) / var(--zb, 1)); line-height: 1.35; }
main.lv5 .v5-bang-xanh .v5-buoc .blk-tuong-tac[data-ve="bang"] :is(.tt-opt, .tt-opt.wide, .tt-opill, .tt-btn) { min-height: calc(48px / var(--zb, 1)); padding: 0 calc(16px / var(--zb, 1));
  font-size: calc(var(--f-m) / var(--zb, 1)); line-height: 1.2; }
main.lv5 .v5-bang-xanh .v5-buoc .blk-tuong-tac[data-ve="bang"] .tt-slot { height: calc(48px / var(--zb, 1)); min-height: calc(48px / var(--zb, 1)); font-size: calc(var(--f-l) / var(--zb, 1)); }
/* kiddy: no ✗ on the board (the amber pill and the crossed words say «not this one») */
main.lv5 .v5-bang-xanh .v5-buoc .blk-tuong-tac[data-ve="bang"] .tt-opt.miss::before { content: none; }
/* the tall layout: the problem a fixed height (it never gives its room to the keypad), the board below it tall enough to work in */
main.lv5.v5-doc .v5-ghim { height: min(22vh, 190px); display: flex; flex-direction: column; min-height: 0; }
main.lv5.v5-doc .v5-ghim-anh, main.lv5.v5-doc .v5-ghim:has(.v5-trang-ghim) .v5-ghim-anh { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; }
main.lv5.v5-doc .v5-bang:has(.tt-pad:not([hidden])) .v5-ghim-anh { max-height: none; overflow-y: auto; }
main.lv5.v5-doc[data-pha="bang_co"] .v5-b-body, main.lv5.v5-doc[data-pha="day_lai_hinh"] .v5-b-body { grid-template-rows: minmax(max(430px, calc(430 * var(--u))), 1fr) auto; }
/* the tall layout's camera frame: one shape whatever photo comes (the instructions under it never move) */
main.lv5.v5-doc.v5-cam-pha .v5-cam { aspect-ratio: auto; height: min(40vh, 340px); }
main.lv5.v5-doc.v5-cam-pha .v5-b-body { grid-template-rows: auto auto; align-content: start; }

/* ---------------------------------------------------------------- nút «Giúp tớ với» (XDR-GIAI-DE-01 mục 5): one fixed button in
   Pika's strip, never over the page / board / tiles; ≥ 64 px to press (the child holds a pencil), pressed look at once. */
main.lv5 .v5-c .v5-ho-tro { display: flex; align-items: center; justify-content: center; gap: 8px; align-self: center;
  flex: none; min-height: 64px; min-width: 64px; margin: 0 12px; padding: 0 22px; white-space: nowrap; border-radius: 32px; border: 2px solid #f0b429;
  background: #fff7e0; color: #5c3d00; font: 700 var(--f-m, 18px)/1.2 inherit; cursor: pointer; touch-action: manipulation;
  box-shadow: 0 3px 0 #e2a21a; transition: transform 80ms ease, box-shadow 80ms ease, background 80ms ease; }
main.lv5 .v5-c .v5-ho-tro.hidden { display: none; }
main.lv5 .v5-c .v5-ho-tro:active, main.lv5 .v5-c .v5-ho-tro.dang { transform: translateY(3px); box-shadow: 0 0 0 #e2a21a; background: #ffe9a8; }
main.lv5 .v5-c .v5-ho-tro.dang { cursor: default; }
main.lv5 .v5-c .v5-ho-tro:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
@media (max-width: 700px) { main.lv5 .v5-c .v5-ho-tro { margin: 0 6px; padding: 0 12px; font-size: 15px; border-radius: 22px; } }
@media (prefers-reduced-motion: reduce) {
  main.lv5 .v5-c .v5-ho-tro { transition: none; }
  main.lv5 .v5-c .v5-ho-tro.dang { transform: none; border-width: 3px; }
}

/* 25/10 đợt kiểm (chấm UI/UX, K21 / K32 / K51 màn 430 px): điện thoại có thẻ trên bảng thì bảng phải đủ chỗ cho câu hỏi + ô + bàn phím.
   (1) đề ghim co lại (bé chạm cuộn trong ô đề), không để khoảng xám trống; (2) ô nháp trống của câu này ẩn (chỉ có chữ «chưa có nét»);
   (3) lời Pika ở thanh dưới có cả một dòng rộng, các nút xuống hàng dưới (không còn «Cậu lấy cả hộp rồi bỏ đ…») */
main.lv5.v5-doc .v5-bang:has(.blk-tuong-tac[data-tt=bai]:not([hidden])) .v5-ghim { height: min(14vh, 120px); }
main.lv5.v5-doc .v5-bang:has(.blk-tuong-tac[data-tt=bai]:not([hidden])) .v5-ghim-anh { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; }
main.lv5.v5-doc:has(.blk-tuong-tac[data-tt=bai]:not([hidden])) .v5-phai:has(.v5-nhap-cot > .v5-dut):not(:has(.v5-cat-o)) { display: none; }
main.session.lv5.v5-hep { grid-template-rows: 130px minmax(0, 1fr) auto; }
main.lv5.v5-hep .v5-c-row { flex-wrap: wrap; row-gap: 6px; }
main.lv5.v5-hep .v5-c-body { flex: 1 1 calc(100% - 52px); }
main.lv5.v5-hep .v5-c-cau { -webkit-line-clamp: 3; }
main.lv5.v5-hep .v5-c .v5-ho-tro { margin-left: 44px; min-height: 48px; }
main.lv5.v5-hep .v5-c-nuts { margin-left: auto; }

/* ================= 25/10 tối · hài hòa kích thước giữa các cỡ màn (XDR-GIAI-DE-02 §5b, đo: tests/ui_v5_muoi_bai.py DO_VAI) =================
   Một thang cho cả hệ, không vá từng phần tử. --u (man-hoc-v5.js coGian) sinh 4 token, mọi vai đọc từ token:
     --f-s  = max(15px, 10.5u)  nhãn: Dạng · Bước, Đề câu N, nhãn ô câu, ghi chú          (--f-min = 15 px ở MỌI cỡ màn)
     --f-m  = max(18px, 13.5u)  chữ bé đọc: câu hỏi bước, lựa chọn, đề ghim, «Cậu làm», lời Pika ở thanh dưới
     --f-l  = max(22px, 16.5u)  kết quả, ô điền, phím số
     --h-nut = max(48px, 36u)   mọi ô chạm của bé: nút / lựa chọn / ô điền / phím số trên bảng, nút thanh dưới, In ra / Gửi Zalo
   nút / chữ giữ một tỉ lệ (≈ 2,7 × --f-m) từ 375 tới 1920 px; trước đây nút cố định 48 px còn chữ lớn theo màn («Xoá» gãy dòng ở 1920). */
main.session.lv5 { --h-nut: max(48px, calc(36 * var(--u))); --f-pika: max(var(--f-m), calc(16 * var(--u))); }
/* hình trên bảng (đặt tính, sơ đồ, tia số, đồng hồ): cao tối đa 5 dòng chữ bé đọc (5 × --f-m): chữ số đặt tính ≈ 1,1 × câu hỏi ở mọi cỡ.
   Trước đây hình theo px riêng × --zb: chữ số to 2,5 lần câu hỏi, hình chiếm nửa bảng và bị đẩy cắt mép trên khi bàn phím mở (B3) */
main.lv5 .v5-bang-xanh .v5-buoc .tt-hinh svg:not(.tt-lop-hinh *) { width: auto; max-width: 100%; height: auto; max-height: calc(var(--f-m) * 5 / var(--zb, 1)); }
main.lv5 .v5-bang-xanh .v5-buoc .blk-tuong-tac[data-ve="bang"] :is(.tt-opt, .tt-opt.wide, .tt-opill, .tt-btn) { min-height: calc(var(--h-nut) / var(--zb, 1)); }
main.lv5 .v5-bang-xanh .v5-buoc .blk-tuong-tac[data-ve="bang"] .tt-slot { height: calc(var(--h-nut) / var(--zb, 1)); min-height: calc(var(--h-nut) / var(--zb, 1)); }
main.lv5 .v5-bang-xanh .v5-buoc .blk-tuong-tac[data-ve="bang"] .tt-pad { grid-template-columns: repeat(auto-fill, minmax(calc(var(--h-nut) / var(--zb, 1) + 1px), 1fr)); }
main.lv5 .v5-bang-xanh .v5-buoc .blk-tuong-tac[data-ve="bang"] .tt-pad button { min-height: calc(var(--h-nut) / var(--zb, 1) + 1px); height: calc(var(--h-nut) / var(--zb, 1) + 1px);
  min-width: calc(var(--h-nut) / var(--zb, 1) + 1px); font-size: calc(var(--f-l) / var(--zb, 1)); white-space: nowrap; }
main.lv5 .v5-nut { width: max(48px, calc(52 * var(--u))); height: max(48px, calc(52 * var(--u))); }
main.lv5 :is(.v5-in, .v5-zalo), main.lv5.v5-hep :is(.v5-in, .v5-zalo) { min-height: var(--h-nut); }
/* lời Pika ở thanh dưới là chữ bé đọc: >= --f-m ở mọi cỡ (điện thoại 15 -> 18 px; từ 1180 px trở lên 16u đã >= 18, không đổi) */
main.lv5 .v5-c-cau { font-size: var(--f-pika); }
/* nhãn ô câu: --f-s ở mọi cỡ (điện thoại 10,5 px, ngang 13 px trước đây). Điện thoại: tối đa hai dòng ngắn, giữa mép trên ô 52 px
   (dải để 18 px phía trên cho nửa trên của nhãn) */
main.lv5 .v5-o-nhan { font-size: var(--f-s); }
main.lv5.v5-hep .v5-o-nhan { font-size: 15px; max-width: 58px; line-height: 1.02; padding: 1px 3px; letter-spacing: -0.02em; }

/* ---- điện thoại: thanh Pika cao CỐ ĐỊNH (giữ bố cục đêm 25/10: lời một dòng rộng, nút xuống hàng dưới). Hàng «auto» làm thẻ B
   co giãn theo độ dài từng câu Pika, bảng dời mỗi câu (XDR-02 cấm bảng nhảy). Giữ chỗ 3 dòng chữ --f-m + hàng nút --h-nut; tên «Pika»
   ẩn (ảnh Pika ở đầu dòng nói ai đang nói; lời của bé vẫn màu xanh). */
main.session.lv5.v5-hep { grid-template-rows: 130px minmax(0, 1fr) calc(16px + var(--f-pika) * 1.22 * 3 + 6px + var(--h-nut)); }
/* tablet dọc (820 × 1180): cùng một bố cục với điện thoại (lời cả dòng, nút xuống dưới), giữ chỗ 2 dòng (dòng rộng gấp đôi). Trước đây
   lời Pika chen giữa ảnh Pika và 4 nút, cột chữ ~330 px, câu 3 dòng bị cắt «…» */
main.session.lv5.v5-doc:not(.v5-hep) { grid-template-rows: max(118px, calc(118 * var(--u))) minmax(0, 1fr) calc(16px + var(--f-pika) * 1.22 * 2 + 6px + max(64px, calc(52 * var(--u)))); }
main.lv5.v5-doc .v5-c { justify-content: flex-start; padding-top: 8px; padding-bottom: 8px; }
main.lv5.v5-doc .v5-c-row { flex-wrap: wrap; row-gap: 6px; }
main.lv5.v5-doc .v5-c-ten { display: none; }
main.lv5.v5-doc .v5-c-body { flex: 1 1 calc(100% - 56 * var(--u)); height: calc(var(--f-pika) * 1.22 * 2); justify-content: center; }
main.lv5.v5-doc .v5-c-cau { line-height: 1.22; -webkit-line-clamp: 2; }
main.lv5.v5-doc:not(.v5-hep) .v5-c .v5-ho-tro { margin-left: calc(56 * var(--u)); }
main.lv5.v5-doc .v5-c-nuts { margin-left: auto; }
main.lv5.v5-hep .v5-c-body { flex: 1 1 calc(100% - 52px); height: calc(var(--f-pika) * 1.22 * 3); }
main.lv5.v5-hep .v5-c-cau { -webkit-line-clamp: 3; }
main.lv5.v5-hep .v5-c .v5-ho-tro { min-height: var(--h-nut); }

/* ---- máy dọc: bảng có thêm chỗ, không có khoảng trống chết dưới bảng ---- */
/* chừa đáy 36u chỉ khi có viên ⚙ (chỉ khi gỡ lỗi); bé không có viên này: chỗ trả cho bảng */
main.lv5.v5-doc .v5-b:not(:has(.v5-pill:not(.hidden))) .v5-b-body { padding-bottom: calc(4 * var(--u)); }
main.lv5.v5-doc:is([data-pha="bang_co"], [data-pha="day_lai_hinh"]) .v5-b-body { row-gap: 0; }
main.lv5.v5-doc:is([data-pha="bang_co"], [data-pha="day_lai_hinh"]) .v5-phai { margin-top: calc(12 * var(--u)); }
/* đề ghim máy dọc: MỘT chiều cao suốt pha bảng, có thẻ hay chưa (trước đây 190 px lúc Pika đang viết, 120 px khi thẻ tới: bảng dời
   70 px, K22 820 × 1180 145→159 s). Giữ đúng giá trị đêm 25/10 min(14vh, 120px). */
main.lv5.v5-doc .v5-ghim { height: min(14vh, 120px); }
/* ô nháp TRỐNG của câu ẩn suốt pha bảng trên máy dọc (đêm 25/10 chỉ ẩn khi có thẻ: thẻ tới thì bảng cao vọt 100–114 px). Nháp có nét
   (.v5-cat-o) vẫn hiện: đó là nội dung mới tới, không phải dải trạng thái */
main.lv5.v5-doc:is([data-pha="bang_co"], [data-pha="day_lai_hinh"]) .v5-phai:has(.v5-nhap-cot > .v5-dut):not(:has(.v5-cat-o)) { display: none; }
/* điện thoại thấp (375 × 812): hàng bảng không đòi quá chỗ có (430 px cố định làm thân thẻ cuộn 12–38 px, cắt đề ghim ở mép trên) */
main.lv5.v5-doc:is([data-pha="bang_co"], [data-pha="day_lai_hinh"]) .v5-b-body { grid-template-rows: minmax(min(max(430px, calc(430 * var(--u))), 100%), 1fr) auto; }
/* ảnh cắt đề trên tablet dọc: không phóng quá 480 px bề ngang (ở 820 px, chữ trong ảnh to gấp 1,6 lần câu hỏi trên bảng và chỉ thấy 1,5 dòng) */
main.lv5.v5-doc .v5-ghim-anh canvas { max-width: min(100%, 480px); margin-inline: auto; }

/* ---- màn kết (B1): danh sách cuộn trong ô của nó, «In ra / Gửi Zalo» dính đáy, có lớp mờ báo còn chữ phía dưới ---- */
main.lv5[data-pha="bao_cao"] .v5-b-body { grid-template-rows: minmax(0, 1fr); overflow: hidden; }
main.lv5[data-pha="bao_cao"] .v5-noi { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
main.lv5 .v5-bao > .v5-bao-nut { grid-column: 1 / -1; position: sticky; bottom: 0; z-index: 2; margin: 0; padding: calc(14 * var(--u)) 0 calc(4 * var(--u));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff calc(12 * var(--u))); }
main.lv5:not(.v5-doc) .v5-bao > .v5-bao-nut { grid-column: 2; }
/* điện thoại: bàn phím số đủ 6 phím một hàng (2 hàng thay vì 3 ở 375 px): viền / lề bảng mỏng hơn, khe phím 4 px, phím đúng 48 px vẽ ra */
main.lv5.v5-hep .v5-bang-xanh { padding: 8px 6px; border-width: 4px; }
main.lv5.v5-hep .v5-bang-xanh .v5-buoc { padding-right: 2px; }
main.lv5.v5-hep .v5-bang-xanh .v5-buoc .blk-tuong-tac[data-ve="bang"] .tt-pad { gap: 4px; grid-template-columns: repeat(auto-fill, minmax(calc(var(--h-nut) / var(--zb, 1) + 0.2px), 1fr)); }
main.lv5.v5-hep .v5-bang-xanh .v5-buoc .blk-tuong-tac[data-ve="bang"] .tt-pad button { min-width: calc(var(--h-nut) / var(--zb, 1) + 0.2px); }

/* QC 30/10 (390×844): ô ghim chữ trắc nghiệm cao theo nội dung tới trần (cao cố định 120 px ở trên che A–D), quá trần thì cuộn trong ô */
main.lv5.v5-doc .v5-ghim:has(.v5-de-cau .de-cau-lua) { height: auto !important; max-height: min(30vh, 250px) !important; }

/* ---------------- việc 41 (code_docs/viec-41/KE-HOACH.md mục 3–4): the tall screen in two blocks, the PAGE on top, the notebook /
   scratch paper / board under it. One machine, one set of ops: man-hoc-v5.js shows .v5-khoi-de (in card B, above its body) once the
   page photo is there (main.v5-co-de, sapVung) and sets .v5-b-body[data-kieu] = cam | nhap | vo | bang | bao_cao. The wide layout
   never shows the block. 0 px: the block keeps one height whatever comes (the photo scrolls inside it, the words keep 2 lines). */
main.lv5:not(.v5-doc) .v5-khoi-de { display: none; }
/* PM đợt 2: correcting: the photo as tall as its shape asks, at most 34vh (it scrolls inside past that), the words right under it; the
   block gives way first so the notebook keeps >= 160 px (the body's basis is 0: its content never moves the block, 0 px in a phase).
   con_lam: a lower page clamp(100px, 22vh, 200px) over the camera. The board's phases: the words only. The report: no block. */
main.lv5.v5-doc .v5-khoi-de { flex: 0 1 auto; display: flex; flex-direction: column; gap: 6px; min-height: calc(var(--f-m) * 1.3 * 2 + 70px); margin: 0 calc(4 * var(--u)) 8px; }
main.lv5.v5-doc .v5-khoi-de[data-gon="thap"] { flex: none; height: clamp(100px, 22vh, 200px); min-height: 0; }
main.lv5.v5-doc .v5-khoi-de[data-gon="chu"] { flex: none; min-height: 0; }
main.lv5.v5-doc .v5-khoi-de[data-gon="chu"] .v5-de-anh { display: none; }
main.lv5.v5-doc .v5-de-anh { flex: 0 1 auto; max-height: 34vh; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; border-radius: 10px;
  background: #fff; border: 1px solid var(--v5-vien); box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
main.lv5.v5-doc .v5-de-lop { position: relative; width: 100%; }
main.lv5.v5-doc .v5-de-lop > img { display: block; width: 100%; height: auto; }
/* KHOANH each question by its state: right (and settled with Pika) green, to look at again amber, not done / not checked grey dots;
   the question being corrected a thick ring + its label. Never red, never a cross. */
main.lv5.v5-doc .v5-de-lop .v5-k { position: absolute; border: 2px dotted #a19dac; border-radius: 8px; background: transparent; animation: none; }
main.lv5.v5-doc .v5-de-lop .v5-k > span { left: 2px; top: 2px; padding: 0 6px; border-radius: 6px; background: #8a8796; color: #fff;
  font-size: var(--f-min, 15px); line-height: 1.25; font-weight: 900; white-space: normal; max-width: calc(100% - 4px); overflow-wrap: anywhere; }
main.lv5.v5-doc .v5-de-lop .v5-k:is([data-tt="dung"], [data-tt="tu_sua"], [data-tt="day_lai"], [data-tt="co_giang"]) { border: 2px solid var(--v5-la); background: transparent; }
main.lv5.v5-doc .v5-de-lop .v5-k:is([data-tt="dung"], [data-tt="tu_sua"], [data-tt="day_lai"], [data-tt="co_giang"]) > span { background: var(--v5-la); }
main.lv5.v5-doc .v5-de-lop .v5-k[data-tt="sai"] { border: 2px solid #f0a020; background: transparent; }
main.lv5.v5-doc .v5-de-lop .v5-k[data-tt="sai"] > span { background: #e08600; }
main.lv5.v5-doc .v5-de-lop .v5-k[data-dang] { border-width: 4px; border-style: solid; border-color: var(--v5-xd); box-shadow: 0 0 0 3px rgba(59, 130, 246, .18); z-index: 2; }
main.lv5.v5-doc .v5-de-lop .v5-k[data-dang] > span { background: var(--v5-xd); }
/* the words of the question being corrected, 2 lines kept even when empty; BÔI = a faint yellow under the words Pika says,
   KHOANH = an orange rounded ring (no red, no strike) */
main.lv5.v5-doc .v5-de-chu { flex: none; margin: 0; padding: 0 4px; font-size: var(--f-m); line-height: 1.3; height: calc(var(--f-m) * 1.3 * 2); overflow-y: auto; overflow-x: hidden; font-weight: 700; color: var(--v5-chu); }
main.lv5.v5-doc .v5-de-chu mark.boi { background: rgba(255, 209, 102, .55); color: inherit; padding: 0 2px; border-radius: 4px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
main.lv5.v5-doc .v5-de-chu .khoanh { border: 2px solid var(--v5-cam); border-radius: 999px; padding: 0 5px; }
/* the block under it takes what is left; the page is on top, so the notebook's own copy of the problem and the board's pin step aside
   and the board takes the place of the notebook (no scratch column beside it) */
main.lv5.v5-doc .v5-b-body { flex: 1 1 auto; min-height: 0; }
main.lv5.v5-doc.v5-co-de .v5-b-body { flex: 1 1 0; min-height: 160px; }
/* the cut of the problem steps aside (the page is on top); the «đúng» stamp and the child's answer line stay (the head drops its own
   «đúng» chip for the stamp: hiding it would leave a right answer with no sign) */
main.lv5.v5-doc.v5-co-de .v5-chua-trai > .v5-nhan, main.lv5.v5-doc.v5-co-de .v5-chua-trai :is(.v5-cat-o, .v5-cat-trong) { display: none; }
main.lv5.v5-doc.v5-co-de .v5-chua-trai .v5-cat-hang { grid-template-columns: auto; justify-content: start; }
main.lv5.v5-doc.v5-co-de .v5-chua-trai .v5-con-ghi { margin-top: 0; }
main.lv5.v5-doc.v5-co-de .v5-chua-trai:not(:has(.v5-dau, .v5-con-ghi)) { display: none; }
main.lv5.v5-doc.v5-co-de .v5-bang-trai { display: none; }
main.lv5.v5-doc.v5-co-de .v5-b-body[data-kieu="bang"] .v5-phai { display: none; }
main.lv5.v5-doc.v5-co-de .v5-b-body[data-kieu="bang"] { grid-template-rows: minmax(0, 1fr); grid-template-areas: "bang"; padding-bottom: 0; }
main.lv5.v5-doc.v5-co-de .v5-b-body[data-kieu="bang"] .v5-bang { grid-template-rows: minmax(0, 1fr); }
main.lv5.v5-doc .v5-khoi-de[data-gon="thap"] .v5-de-anh { flex: 1 1 auto; max-height: none; }
/* PM đợt 3: frames are rings only; the question being corrected says so in a small label ABOVE its frame (never over its words); the
   photo keeps a strip of room on top so the first frame's label is seen */
main.lv5.v5-doc .v5-de-anh { padding-top: calc(var(--f-min, 15px) * 1.25 + 4px); }
main.lv5.v5-doc .v5-de-lop .v5-k[data-dang] { box-shadow: none; background: transparent; }
main.lv5.v5-doc .v5-de-lop .v5-k[data-dang] > span { top: auto; bottom: calc(100% + 2px); left: -4px; max-width: none; white-space: nowrap; padding: 0 6px; }

/* ================= việc 41 đợt 4: the M10 look (PK Design System: ds/pk/tokens.css of the mockup) on the tall screen, at EVERY
   window size (anh Cường chốt DỌC): one column min(100%, 560px) in the middle, #fff7ed around it. White cards with a hairline
   border and a soft shadow; chips of the questions (✓ green, a letter amber, the one being corrected ringed blue); the page card
   (a «Câu N» chip + «Đề trên · vở dưới», the photo with its frames, the words on grey paper in a serif face, BÔI #ffe08a, KHOANH a
   round ring); the notebook cut in a white card; the board green #2f6f52 in a wood frame #b4793a; Pika's strip with the speaker's
   name and the orange mic with a 4 px bottom edge. No red, no cross. Sizes keep XDR §5b (text >= 15 px, buttons >= 48 px). */
main.session.lv5.v41 {
  --pk-bg: #fff7ed; --pk-vien: #e2e8f0; --pk-bong: 0 6px 18px rgba(15, 23, 42, .05); --pk-chu: #0f172a; --pk-chu-2: #64748b;
  --pk-cam: #ff9600; --pk-cam-dam: #e08600; --pk-cam-nhat: #fff5e6; --pk-la: #2ec47a; --pk-la-dam: #22a866; --pk-xd: #1cb0f6; --pk-xd-dam: #1899d6;
  --pk-vang: #fffbea; --pk-boi: #ffe08a; --pk-xam: #cbd5e1;
  background: var(--pk-bg); color: #1e293b;
  padding-left: max(8px, calc((100vw - 560px) / 2)); padding-right: max(8px, calc((100vw - 560px) / 2));
}
body:has(main.session.lv5.v41) .phien-ban { display: none; }
main.session.lv5.v41 :is(.v5-a, .v5-b, .v5-c) { background: #fff; border: 1px solid var(--pk-vien); box-shadow: var(--pk-bong); }
main.session.lv5.v41 .v5-a { border-radius: 16px; }
main.session.lv5.v41 .v5-b { border-radius: 18px; }
main.session.lv5.v41 .v5-c { border-radius: 16px; }
/* strip A: «Hôm nay · đúng k/n», the chips, the clock */
main.session.lv5.v41 .v5-a-t1 { color: var(--pk-chu-2); font-weight: 700; }
main.session.lv5.v41 .v5-a-t2 { color: var(--pk-chu); font-weight: 800; }
main.session.lv5.v41 .v5-a-t2 .so { color: var(--pk-chu); }
main.session.lv5.v41 .v5-o { width: 48px; height: 48px; border-radius: 10px; border: 2px solid var(--pk-vien); background: #f8fafc; box-shadow: none; gap: 0; justify-content: center; }
main.session.lv5.v41 .v5-o.them { width: 60px; }
main.session.lv5.v41 .v5-o-anh:not(:has(.v5-o-tick, .v5-o-chon)) { display: none; }
main.session.lv5.v41 .v5-o-anh { height: auto; background: transparent; }
main.session.lv5.v41 .v5-o-ma { font-size: 16px; color: #475569; }
main.session.lv5.v41 .v5-o:has(.v5-o-tick, .v5-o-chon) .v5-o-ma { font-size: 15px; line-height: 1; }
main.session.lv5.v41 .v5-o-tick { font-size: 18px; }
main.session.lv5.v41 .v5-o[data-tt="xong"] { background: var(--pk-la); border-color: var(--pk-la-dam); }
main.session.lv5.v41 .v5-o[data-tt="xong"] .v5-o-ma { color: #fff; }
main.session.lv5.v41 .v5-o:is([data-tt="da_lam"], [data-tt="chua_ro"]) { background: var(--pk-vang); border-color: var(--pk-cam); box-shadow: none; }
main.session.lv5.v41 .v5-o:is([data-tt="da_lam"], [data-tt="chua_ro"]) :is(.v5-o-ma, .v5-o-chon) { color: var(--pk-cam-dam); }
main.session.lv5.v41 .v5-o:is([data-tt="dang_xet"], [data-tt="chua"], [data-tt="co_giang"], [data-tt="co_day_lai"], [data-tt="lam_lai"]) { background: var(--pk-vang); border: 3px solid var(--pk-xd); box-shadow: none; }
main.session.lv5.v41 .v5-o:is([data-tt="dang_xet"], [data-tt="chua"], [data-tt="co_giang"], [data-tt="co_day_lai"], [data-tt="lam_lai"]) .v5-o-ma { color: var(--pk-xd-dam); }
main.session.lv5.v41 .v5-o:is([data-tt="chua_lam"], [data-tt="de_trong"], [data-tt="chua_cham"], [data-tt="chua_thay"], [data-tt="on_sau"]) { border-style: dashed; border-color: var(--pk-xam); background: #fff; }
main.session.lv5.v41 .v5-o-nhan { background: var(--pk-cam); color: #fff; border-radius: 9999px; font-weight: 900; }
main.session.lv5.v41 .v5-o:is([data-tt="chua_lam"], [data-tt="de_trong"], [data-tt="chua_cham"], [data-tt="chua_thay"], [data-tt="on_sau"]) .v5-o-nhan { background: #64748b; }
main.session.lv5.v41 .v5-o.chon { border-color: var(--pk-xd); box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--pk-xd); }
main.session.lv5.v41 .v5-dh { border-radius: 14px; background: var(--pk-la); border-bottom: 4px solid var(--pk-la-dam); color: #fff; box-shadow: none; }
main.session.lv5.v41 .v5-a > .btn.danger { border-radius: 12px; border: 1px solid var(--pk-vien); border-bottom-width: 3px; color: var(--pk-chu-2); }
/* card B's head: the question as a chip */
main.session.lv5.v41 .v5-b-ten { color: var(--pk-chu); font-weight: 900; }
/* the page block: its head chips, the photo, the words on grey paper */
main.session.lv5.v41 .v5-khoi-de { gap: 8px; }
main.session.lv5.v41 .v5-de-dau { flex: none; display: flex; align-items: center; gap: 6px; min-width: 0; }
main.session.lv5.v41 .v5-de-chip { flex: none; font-size: 15px; line-height: 1.2; font-weight: 800; padding: 4px 10px; border-radius: 9999px; background: #edf2f7; color: #475569; white-space: nowrap; }
main.session.lv5.v41 .v5-de-chip.cau { background: var(--pk-cam-nhat); color: var(--pk-cam-dam); }
main.session.lv5.v41 .v5-de-dau .v5-de-chip:last-child { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
main.session.lv5.v41 .v5-de-anh { border-radius: 12px; border: 1px solid var(--pk-vien); box-shadow: none; background: #f8fafc; }
main.session.lv5.v41 .v5-de-chu { background: #e5e7eb; border-radius: 6px; padding: 6px 10px; color: #334155; font-family: Georgia, "Times New Roman", serif; font-weight: 400;
  font-size: max(15px, var(--f-s)); line-height: 1.35; height: calc(max(15px, var(--f-s)) * 1.35 * 2 + 12px); }
main.session.lv5.v41 .v5-de-chu mark.boi { background: var(--pk-boi); border-radius: 3px; padding: 0 3px; }
main.session.lv5.v41 .v5-de-chu .khoanh { border: 2px solid var(--pk-cam); border-radius: 9999px; padding: 0 4px; }
/* the frames on the photo (KHOANH each question): right green, look again amber + its label, not done grey dots, the one being
   corrected thick blue; rings only */
main.session.lv5.v41 .v5-de-lop .v5-k { border: 2px dotted var(--pk-xam); background: transparent; }
main.session.lv5.v41 .v5-de-lop .v5-k > span { background: #64748b; }
main.session.lv5.v41 .v5-de-lop .v5-k:is([data-tt="dung"], [data-tt="tu_sua"], [data-tt="day_lai"], [data-tt="co_giang"]) { border: 2px solid var(--pk-la); }
main.session.lv5.v41 .v5-de-lop .v5-k:is([data-tt="dung"], [data-tt="tu_sua"], [data-tt="day_lai"], [data-tt="co_giang"]) > span { background: var(--pk-la); }
main.session.lv5.v41 .v5-de-lop .v5-k[data-tt="sai"] { border: 2px solid var(--pk-cam); }
main.session.lv5.v41 .v5-de-lop .v5-k[data-tt="sai"] > span { background: var(--pk-cam); }
main.session.lv5.v41 .v5-de-lop .v5-k[data-dang] { border: 4px solid var(--pk-xd); }
main.session.lv5.v41 .v5-de-lop .v5-k[data-dang] > span { background: var(--pk-xd); }
/* UNDER: the notebook cut in a white card */
main.session.lv5.v41 .v5-chua-phai .v5-cat-o, main.session.lv5.v41 .v5-chua-phai .v5-dut { background: #fff; border: 1px solid var(--pk-vien); border-radius: 12px; box-shadow: var(--pk-bong); }
main.session.lv5.v41 .v5-nhan b { color: var(--pk-chu); }
/* the board: green, a wood frame, «Dạng → Cách làm → Bước i/n» as outlined chips, handwriting digits */
main.session.lv5.v41 .v5-bang-xanh { background: #2f6f52; border: 7px solid #b4793a; border-radius: 16px; box-shadow: none; }
main.session.lv5.v41 .v5-the-dai :is(b, .dang, .buoc, .cach) { display: inline-block; border: 1.5px solid var(--pk-xam); border-radius: 6px; padding: 0 8px; font-weight: 800; color: #fff; }
main.session.lv5.v41 .v5-the-dai i { color: var(--pk-xam); font-style: normal; }
main.session.lv5.v41 .v5-bang-xanh :is(.tt-dt, .tt-dat-tinh, .tt-so-dt) { font-family: "Patrick Hand", "Comic Sans MS", cursive; }
/* Pika's strip: the speaker's name (Pika orange, the child blue), the words, the orange mic with its 4 px edge */
main.session.lv5.v41 .v5-c-ten { display: block; font-size: 15px; line-height: 1.1; font-weight: 800; color: var(--pk-cam-dam); }
main.session.lv5.v41 .v5-c-ten.hidden { display: none; }
main.session.lv5.v41 .v5-c-ten[data-ai="be"] { color: var(--pk-xd-dam); }
main.session.lv5.v41 .v5-c-body { height: calc(17px * 1.22 * 2 + 18px); justify-content: center; }
main.session.lv5.v41 .v5-c-cau { font-size: 17px; font-weight: 800; color: var(--pk-chu); }
main.session.lv5.v41 .v5-c-av { width: 40px; height: 40px; border: 0; background: var(--pk-cam-nhat); }
main.session.lv5.v41 .v5-nut { width: 48px; height: 48px; border-radius: 14px; border: 1px solid var(--pk-vien); border-bottom: 4px solid var(--pk-xam); background: #fff; box-shadow: none; }
main.session.lv5.v41 .v5-nut.mic { background: var(--pk-cam); border-color: var(--pk-cam); border-bottom-color: var(--pk-cam-dam); color: #fff; }
main.session.lv5.v41 .v5-nut.mic[data-tt="tat"] { background: #fff; border-color: var(--pk-vien); border-bottom-color: var(--pk-xam); color: #6d6a78; }
main.session.lv5.v41 .v5-nut.mic:active, main.session.lv5.v41 .v5-nut.go:active { transform: translateY(3px); border-bottom-width: 1px; }
main.session.lv5.v41 .v5-c .v5-ho-tro { display: none; }
/* the report (M8 in one column): Pika's words on a pink card, the outcome dots, before / after, «In ra» + «Gửi Zalo» */
main.session.lv5.v41 .v5-bao-tom { background: #fff1f2; border-radius: 16px; padding: 12px 14px; }
main.session.lv5.v41 .v5-bao-tom p { font-weight: 700; color: #1e293b; }
main.session.lv5.v41 .v5-ts-d > :not(span) { border: 2px solid var(--pk-cam); border-radius: 10px; background: var(--pk-vang); }
main.session.lv5.v41 .v5-ts-d + .v5-ts-d > :not(span) { border-color: var(--pk-la); background: #edfaf4; }
main.session.lv5.v41 .v5-bao-nut { gap: 12px; }
main.session.lv5.v41 .v5-in { min-height: 52px; border: 0; border-bottom: 4px solid var(--pk-xam); border-radius: 16px; background: #eef9ff; color: var(--pk-xd-dam); font-weight: 800; }
main.session.lv5.v41 .v5-zalo { min-height: 52px; border: 0; border-bottom: 4px solid var(--pk-la-dam); border-radius: 16px; background: var(--pk-la); color: #fff; font-weight: 900; }
main.session.lv5.v41 .v5-zalo:disabled { opacity: .55; }
main.session.lv5.v41 .v5-de-chu:empty { background: transparent; }      /* no words read: the room stays (0 px), no grey bar */

/* ================= việc 41 đợt 5 (PM): strip A in ONE line (M10), card B's head one line, the status slot in Pika's strip, the
   page photo clamp(170px, 34vh, 320px), the words up to 4 lines, «Giúp tớ với» back as a small text button */
main.session.lv5.v41 { grid-template-rows: 64px minmax(0, 1fr) calc(16px + 28px + 4px + 15px * 1.1 + 17px * 1.22 * 2 + 6px + 52px); }
/* A: «còn k/n câu» | the chips 36 × 36 (a 48 px hit area around each, unseen) | the clock | Kết thúc */
main.session.lv5.v41 .v5-a { display: flex; align-items: center; gap: 8px; padding: 0 8px 0 12px; min-height: 0; height: 100%; box-sizing: border-box; }
main.session.lv5.v41 .v5-a-t { flex: 0 0 64px; width: 64px; min-width: 0; min-height: 0; padding: 0; flex-direction: column; align-items: flex-start; flex-wrap: nowrap; white-space: normal; overflow: visible; gap: 0; }
main.session.lv5.v41 .v5-a-t :is(.v5-a-t1, .v5-a-dot, .v5-chip) { display: none; }
main.session.lv5.v41 .v5-a-t:not(:has(.v5-a-t2:not(:empty))) .v5-a-t1 { display: block; font-size: 15px; line-height: 1.15; }
main.session.lv5.v41 .v5-a-t2 { font-size: 15px; line-height: 1.2; }
main.session.lv5.v41 .v5-a-t2 .so { font-size: 15px; }
main.session.lv5.v41 .v5-tiles { flex: 1 1 0; min-width: 0; align-self: stretch; align-items: center; justify-content: center; gap: 6px; padding: 14px 4px 0; }
main.session.lv5.v41 .v5-o, main.session.lv5.v41 .v5-o.them, main.session.lv5.v41 .v5-o.nhay { width: 36px; height: 36px; min-width: 0; min-height: 0; border-radius: 8px; padding: 0; }
main.session.lv5.v41 .v5-o::after { content: ""; position: absolute; inset: -6px; }      /* the finger's 48 px, unseen */
main.session.lv5.v41 .v5-o.them small { display: none; }
main.session.lv5.v41 .v5-o.them b { font-size: 15px; }
main.session.lv5.v41 .v5-o-ma, main.session.lv5.v41 .v5-o:has(.v5-o-tick, .v5-o-chon) .v5-o-ma { font-size: 15px; line-height: 1; }
main.session.lv5.v41 .v5-o:has(.v5-o-tick, .v5-o-chon) .v5-o-ma { display: none; }
main.session.lv5.v41 .v5-o-tick, main.session.lv5.v41 .v5-o-chu.v5-o-chon { font-size: 16px; line-height: 1; }
main.session.lv5.v41 .v5-o-nhan { font-size: 15px; line-height: 16px; padding: 0 5px; transform: translate(-50%, -78%); }
main.session.lv5.v41 .v5-o-sua { width: 20px; height: 20px; right: -8px; bottom: -6px; }
main.session.lv5.v41 .v5-dh { flex: none; position: static; width: auto; min-width: 64px; height: 44px; margin: 0; padding: 0 8px; }
main.session.lv5.v41 .v5-dh small { display: none; }
main.session.lv5.v41 .v5-dh b { font-size: 18px; }
main.session.lv5.v41 .v5-a > .btn.danger { position: static; flex: none; order: 9; min-height: 44px; min-width: 44px; padding: 0 8px; font-size: 15px; margin: 0; }
/* B: the title in one line, no status slot (it went to Pika's strip) */
main.session.lv5.v41 .v5-b-h { display: flex; align-items: center; gap: 8px; min-height: 0; height: 28px; padding: 0 8px 4px; grid-template-rows: none; }
main.session.lv5.v41 .v5-b-t { flex: 1 1 auto; min-width: 0; height: 28px; overflow: hidden; }
main.session.lv5.v41 .v5-b-t .v5-b-chips { display: flex; gap: 6px; min-width: 0; overflow: hidden; white-space: nowrap; }
/* C: [the status chips (20 px, kept when empty) · Giúp tớ với] / name / words, then the buttons */
main.session.lv5.v41 .v5-c-body { height: calc(28px + 4px + 15px * 1.1 + 17px * 1.22 * 2); gap: 2px; justify-content: flex-start; }
main.session.lv5.v41 .v5-c-tt { flex: none; display: flex; align-items: center; gap: 8px; height: 28px; min-width: 0; }
main.session.lv5.v41 .v5-c-tt .v5-tt { flex: 1 1 auto; height: 20px; min-width: 0; justify-content: flex-start; gap: 6px; --h-tt: 20px; }
main.session.lv5.v41 .v5-c-tt .v5-tt .v5-luot { height: 20px; padding: 0 8px; margin: 0; border-radius: 9999px; font-size: 15px; line-height: 20px; box-shadow: none; }
main.session.lv5.v41 .v5-c-tt .v5-tt .v5-luot-ic { font-size: 14px; line-height: 20px; }
main.session.lv5.v41 .v5-c-tt .v5-tt .v5-dai { height: 20px; min-height: 0; margin: 0; }
main.session.lv5.v41 .v5-c-tt .v5-tt .v5-dai-pika { width: 20px; height: 20px; }
main.session.lv5.v41 .v5-c-tt .v5-tt .v5-dai-ds { flex-wrap: nowrap; gap: 0 14px; }
main.session.lv5.v41 .v5-c-tt .v5-tt .v5-dai-ds li { padding: 0 6px; font-size: 15px; line-height: 20px; }
main.session.lv5.v41 .v5-c-tt .v5-tt .v5-dai-goi { padding: 0 8px; margin: 0; font-size: 15px; line-height: 20px; border-radius: 9999px; }
main.session.lv5.v41 .v5-c .v5-c-tt .v5-ho-tro { display: inline-flex; flex: none; position: relative; height: 28px; min-height: 28px; padding: 0 10px; margin: 0; font-size: 15px; line-height: 1; border-radius: 9999px; box-shadow: 0 2px 0 #e2a21a; }
main.session.lv5.v41 .v5-c .v5-c-tt .v5-ho-tro::after { content: ""; position: absolute; inset: -10px -2px; }      /* 48 px for the finger */
main.session.lv5.v41 .v5-c .v5-c-tt .v5-ho-tro.hidden { display: none; }
/* the page block: the photo clamp(170px, 34vh, 320px) while correcting (scrolled to the question), the words up to 4 lines (more:
   they scroll inside, never cut), no grey box when there are none (con_lam, a board with no words) */
main.session.lv5.v41 .v5-khoi-de:not([data-gon]) { min-height: auto; }
main.session.lv5.v41 .v5-khoi-de:not([data-gon]) .v5-de-anh { flex: 0 1 clamp(170px, 34vh, 320px); height: clamp(170px, 34vh, 320px); max-height: clamp(170px, 34vh, 320px); min-height: 170px; }
main.session.lv5.v41 .v5-de-chu { height: auto; max-height: calc(max(15px, var(--f-s)) * 1.35 * 4 + 12px); overflow-y: auto; }
main.session.lv5.v41 .v5-de-chu:empty { display: none; }
/* redoing on paper (lam_lai): «Sẵn sàng» and «Gửi ảnh» stay in view at the notebook's bottom */
main.session.lv5.v41 .v5-chua-phai > .v5-san-lai { position: sticky; bottom: 0; z-index: 2; min-height: 48px; }
main.session.lv5.v41 .v5-vo-nuts { display: flex; justify-content: center; }
main.session.lv5.v41 .v5-vo-nuts .v5-cam-nut { min-height: 48px; min-width: 48px; padding: 0 14px; font-size: 15px; border-radius: 14px; }
/* đợt 5: a 360 px phone keeps «+k · the current one · +k» in the line without scrolling; the page block a little tighter */
main.session.lv5.v41 .v5-a { gap: 6px; padding: 0 6px 0 10px; }
main.session.lv5.v41 .v5-a-t { flex-basis: 56px; width: 56px; }
main.session.lv5.v41 .v5-tiles { gap: 4px; padding-left: 0; padding-right: 0; }
main.session.lv5.v41 .v5-dh { min-width: 56px; padding: 0 6px; }
main.session.lv5.v41 .v5-a > .btn.danger { padding: 0 6px; }
main.session.lv5.v41 .v5-khoi-de { gap: 6px; margin-bottom: 4px; }
main.session.lv5.v41 .v5-de-chip { padding: 2px 10px; }
main.session.lv5.v41 .v5-b-h { padding-bottom: 2px; }
main.session.lv5.v41 .v5-a { padding-right: 4px; }
main.session.lv5.v41 .v5-dh { min-width: 0; padding: 0 5px; }
main.session.lv5.v41 .v5-dh b { font-size: 16px; }
main.session.lv5.v41 .v5-a > .btn.danger { padding: 0 4px; letter-spacing: -0.01em; }
main.session.lv5.v41 .v5-tiles { gap: 3px; }
main.session.lv5.v41 .v5-khoi-de { gap: 4px; }
main.session.lv5.v41 .v5-b-h, main.session.lv5.v41 .v5-b-t { height: 26px; }
/* the small label over a chip («Pika giảng», «đề trống») stays inside strip A: the chips sit low, the label rides on their top edge */
main.session.lv5.v41 .v5-tiles { align-items: flex-end; padding-top: 0; padding-bottom: 6px; overflow-y: visible; }
main.session.lv5.v41 .v5-o-nhan { transform: translate(-50%, -62%); max-width: none; white-space: nowrap; overflow: visible; z-index: 2; }

/* việc 41 đợt 6 (phiên 20): the board never stays empty while it waits for the card: past 5 s Pika's words of the question are written
   on it (chalk, >= 18 px); on the card's error (or past 40 s) the chalk lines go and a small line says Pika explains aloud */
main.lv5 .v5-bang-viec > .v5-bang-cho:has(> .v5-bang-loi:not(.hidden)) { bottom: 0; display: flex; flex-direction: column; pointer-events: auto; }
main.lv5 .v5-bang-cho[data-kieu="loi"] > :is(.v5-bang-cho-t, i) { display: none; }
main.lv5 .v5-bang-loi { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 6px; color: #fff; }
main.lv5 .v5-bang-loi.hidden { display: none; }
main.lv5 .v5-bang-loi-ghi { flex: none; margin: 0; font-size: 15px; line-height: 1.3; font-weight: 700; color: #cbd5e1; }
main.lv5 .v5-bang-loi-ds { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
main.lv5 .v5-bang-loi-ds p { margin: 0; font-size: max(18px, var(--f-m)); line-height: 1.4; font-weight: 700; color: #fff;
  font-family: "Patrick Hand", "Comic Sans MS", Nunito, cursive; }
main.lv5 .v5-bang-loi-ds p:last-child { color: #ffe08a; }

/* ================= việc 41 đợt 7: the WIDE layout (main.v41-ngang, >= 1000 px landscape; mockup M3/M4/M5 1024 × 768): strip A
   68 px; card B (radius 24) in two columns, LEFT 45 % the page block (photo the column's height, scrolling inside; the words on
   grey paper under it), RIGHT 55 % the body (camera / notebook / board / report); Pika's strip 84 px under it. No page scroll at
   1366 × 768 / 1280 × 720. Same DOM, same sapVung (st.ngang). */
main.session.lv5.v41.v41-ngang { padding: 12px 16px; gap: 12px; grid-template-rows: 68px minmax(0, 1fr) 84px; }
/* A */
main.session.lv5.v41.v41-ngang .v5-a { gap: 16px; padding: 0 12px 0 18px; border-radius: 20px; }
main.session.lv5.v41.v41-ngang .v5-a-t { flex: 0 0 190px; width: 190px; }
main.session.lv5.v41.v41-ngang .v5-a-t .v5-a-t1 { display: block; font-size: 15px; line-height: 1.2; }
main.session.lv5.v41.v41-ngang .v5-a-t2, main.session.lv5.v41.v41-ngang .v5-a-t2 .so { font-size: 18px; }
main.session.lv5.v41.v41-ngang .v5-tiles { gap: 10px; padding-bottom: 4px; }
main.session.lv5.v41.v41-ngang :is(.v5-o, .v5-o.them, .v5-o.nhay) { width: 52px; height: 44px; border-radius: 12px; }
main.session.lv5.v41.v41-ngang .v5-o::after { inset: -2px; }
main.session.lv5.v41.v41-ngang .v5-dh { min-width: 110px; height: 52px; padding: 0 12px; border-radius: 16px; }
main.session.lv5.v41.v41-ngang .v5-dh small { display: block; font-size: 15px; line-height: 1; }
main.session.lv5.v41.v41-ngang .v5-dh b { font-size: 22px; }
main.session.lv5.v41.v41-ngang .v5-a > .btn.danger { padding: 0 12px; }
/* B: two columns */
main.session.lv5.v41.v41-ngang .v5-b { display: grid; grid-template-columns: minmax(0, 45fr) minmax(0, 55fr); grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas: "h h" "de than"; column-gap: 16px; border-radius: 24px; padding: 12px 16px 14px; }
main.session.lv5.v41.v41-ngang .v5-b-h { grid-area: h; height: 30px; padding: 0 0 6px; }
main.session.lv5.v41.v41-ngang .v5-b-t { height: 30px; }
main.session.lv5.v41.v41-ngang .v5-khoi-de { grid-area: de; height: auto; min-height: 0; margin: 0; flex: none; }
main.session.lv5.v41.v41-ngang .v5-khoi-de .v5-de-anh { flex: 1 1 auto; height: auto; max-height: none; min-height: 0; }
main.session.lv5.v41.v41-ngang .v5-b-body { grid-area: than; min-height: 0; padding-bottom: 0; }
main.session.lv5.v41.v41-ngang:not(.v5-co-de) .v5-b-body { grid-column: 1 / -1; }
/* right: the camera fits the column (never the whole width), the board in its wood frame the column's height */
main.session.lv5.v41.v41-ngang.v5-cam-pha .v5-b-body { grid-template-rows: minmax(0, 1fr) auto; padding: 0 0 6px; }
main.session.lv5.v41.v41-ngang.v5-cam-pha .v5-cam { aspect-ratio: auto; height: 100%; min-height: 0; }
main.session.lv5.v41.v41-ngang:not(.v5-co-de).v5-cam-pha .v5-b-body { grid-template-columns: minmax(0, 55fr) minmax(0, 45fr); grid-template-rows: minmax(0, 1fr); grid-template-areas: "cam phai"; }
main.session.lv5.v41.v41-ngang.v5-co-de .v5-b-body[data-kieu="bang"] { grid-template-rows: minmax(0, 1fr); }
/* C: avatar | [status chips · Giúp tớ với] / words | mic, Gõ 56 px */
main.session.lv5.v41.v41-ngang .v5-c { border-radius: 20px; padding: 6px 16px; }
main.session.lv5.v41.v41-ngang .v5-c-row { flex-wrap: nowrap; gap: 14px; }
main.session.lv5.v41.v41-ngang .v5-c-av { width: 48px; height: 48px; }
main.session.lv5.v41.v41-ngang .v5-c-body { flex: 1 1 auto; height: calc(28px + 17px * 1.22 * 2); }
main.session.lv5.v41.v41-ngang .v5-c-ten { display: none; }
main.session.lv5.v41.v41-ngang .v5-c-nuts { margin-left: 0; }
main.session.lv5.v41.v41-ngang .v5-nut { width: 56px; height: 56px; }
main.session.lv5.v41.v41-ngang .v5-b-h, main.session.lv5.v41.v41-ngang .v5-b-t { height: 38px; }

/* ================= việc 41 đợt 8 (anh Cường: «thay bảng xanh thành dạng vở kẻ giống vở, màu chữ dễ nhìn»): the board is a page of a
   squared exercise book (ô li 24 px faint, a stronger line every 4 squares, a light red margin), ivory #fffdf7, hairline border,
   radius 16, no wood. Dark words: the step's title blue, hints slate italic, right green, to look at orange, BÔI #ffe08a; no white
   or pale-yellow words on it. Choices white with a 4 px bottom edge (right green, again orange, never red). Over the green-board
   rules above (and tuong-tac.css, untouched) for the v41 screen only; the «Pika giảng miệng» board (đợt 6) too. */
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh {
  --vo-li: #dbe7f3; --vo-dam: #c3d5ea; --vo-le: rgba(239, 68, 68, .28);
  background-color: #fffdf7;
  background-image: linear-gradient(90deg, transparent 26px, var(--vo-le) 26px, var(--vo-le) 28px, transparent 28px),
    linear-gradient(var(--vo-dam) 1px, transparent 1px), linear-gradient(var(--vo-li) 1px, transparent 1px), linear-gradient(90deg, var(--vo-li) 1px, transparent 1px);
  background-size: 100% 100%, 100% 96px, 24px 24px, 24px 24px;
  border: 1px solid #e2e8f0; border-radius: 16px; box-shadow: 0 6px 18px rgba(15, 23, 42, .05); padding: 10px 10px 10px 36px; color: #1e293b;
}
main.session.lv5.v41.v5-hep .v5-bang-xanh { border-width: 1px; padding: 8px 8px 8px 34px; }
main.session.lv5.v41 .v5-bang-xanh *:not(.tt-opt):not(.tt-opill):not(svg):not(svg *) { color: #1e293b !important; border-color: #cbd5e1 !important; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh :is(h1, h2, h3, h4, .title2) { color: #0f172a !important; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .tt-ten, main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .tt-ten * { color: #1899d6 !important; font-weight: 800; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh :is(.tt-q, .tt-loi, .tt-de-chu, .tt-khung-chu) { color: #1e293b !important; font-weight: 700; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh :is(.tt-goi-y, .tt-goi-y *, .tt-gt, .tt-lop-hinh-ghi) { color: #475569 !important; font-style: italic; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh :is(.tt-fb.ok, .tt-kq.ok, .tt-bb-buoc.cu > .tt-ten::before) { color: #22a866 !important; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh :is(.tt-hint-sai, .tt-nac-phep, .tt-hint-sai *, .tt-nac-phep *) { color: #e08600 !important; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh :is(.tt-fb, .tt-tt) { color: #334155 !important; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh mark { background-color: #ffe08a !important; color: #1e293b !important; border-radius: 3px; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh :is(table, td, th) { border: 1px solid #cbd5e1 !important; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .tt-slot { border: 2px dashed #94a3b8 !important; color: #0f172a !important; background-color: #fff !important; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .tt-slot.ok { border: 2px solid #2ec47a !important; background-color: #edfaf4 !important; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .tt-slot.miss { border-color: #ff9600 !important; background-color: #fff5e6 !important; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .tt-slot::placeholder { color: #94a3b8; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh :is(.tt-opt, .tt-opill, .tt-btn, .tt-pad button) { background-color: #fff !important; color: #0f172a !important; border: 1px solid #cbd5e1 !important; border-bottom-width: 4px !important; font-weight: 800; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh :is(.tt-opt, .tt-opill).ok { background-color: #edfaf4 !important; border-color: #2ec47a !important; color: #17663f !important; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh :is(.tt-opt, .tt-opill).miss { background-color: #fff5e6 !important; border-color: #ff9600 !important; color: #8a4b00 !important; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh :is(.tt-btn.gold, .tt-btn.dd, .tt-ke-mic) { color: #e08600 !important; border-color: #ff9600 !important; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh svg text { fill: #1e293b; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh svg :is(rect, circle, ellipse, path, polygon):is([fill="#fff"], [fill="white"], [fill="#ffffff"], [fill="#FFF"], [fill="#FFFFFF"]) { fill: #fff; stroke: #94a3b8; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh svg :is(line, path, rect, polyline, circle):is([stroke="#000"], [stroke="#111"], [stroke="black"], [stroke="#0f172a"]) { stroke: #1e293b; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .tt-lop-hinh { background-color: #fffdf7 !important; box-shadow: 0 0 0 10px #fffdf7, 0 -6px 16px rgba(15, 23, 42, .12) !important; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .tt-lop-hinh-t { color: #1899d6 !important; }
/* the «Tóm tắt» box: white, hairline, >= 15 px, its numbers bold */
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .tt-tom-tat { background-color: #fff !important; border: 1px solid #e2e8f0 !important; border-radius: 10px; padding: 6px 10px; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .tt-tom-tat :is(*, li) { font-size: max(calc(15px / var(--zb, 1)), calc(var(--f-s) / var(--zb, 1))) !important; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .tt-tom-tat li { font-size: calc(var(--f-m) / var(--zb, 1)) !important; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .tt-tom-tat :is(b, strong) { color: #0f172a !important; font-weight: 900; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .tt-tom-tat ul { border-left-color: #1cb0f6 !important; }
/* «Dạng → Cách làm → Bước i/n»: white chips with a grey hairline, one line that never cuts them */
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .v5-the-dai { display: flex; align-items: center; gap: 4px; height: 30px; min-height: 30px; overflow: visible; white-space: nowrap; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .v5-the-dai :is(b, .dang, .buoc, .cach) { display: inline-block; padding: 0 8px; line-height: 24px; height: 26px; box-sizing: border-box;
  background-color: #fff !important; border: 1px solid #cbd5e1 !important; border-radius: 8px; color: #334155 !important; font-size: 15px !important; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .v5-the-dai .buoc { color: #1899d6 !important; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .v5-the-dai :is(small, i) { color: #64748b !important; }
/* the board waiting / «Pika giảng miệng» on the notebook page */
main.session.lv5.v41 .v5-bang-cho i { color: #94a3b8 !important; }
main.session.lv5.v41 .v5-bang-loi-ghi { color: #64748b !important; }
main.session.lv5.v41 .v5-bang-loi-ds p { color: #1e293b !important; font-family: Nunito, system-ui, sans-serif; font-weight: 800; }
main.session.lv5.v41 .v5-bang-loi-ds p:last-child { color: #1e293b !important; background-color: #ffe08a !important; border-radius: 4px; padding: 0 4px; align-self: flex-start; }

/* ================= việc 41: the second-session grader's fixes (code_docs/viec-41/CHAM.md «Lỗi ưu tiên») */
/* 1. «Sẵn sàng · gửi ảnh» picked: «Đã gửi · Pika đang xem» with a turning ring; the picker closed empty: the reminder under it */
main.session.lv5.v41 .v5-san-lai.cho .ic { animation: v41-quay 1s linear infinite; }
@keyframes v41-quay { to { transform: rotate(360deg); } }
main.session.lv5.v41 .v5-nhac-anh { margin: 4px 0 0; font-size: 15px; font-weight: 800; color: #e08600; text-align: center; }
/* 3. the card's title never cut at 360 / 390: the title and its chips wrap (two lines at most), no «…» */
main.session.lv5.v41 .v5-b-h, main.session.lv5.v41 .v5-b-t { height: auto; min-height: 26px; }
main.session.lv5.v41 .v5-b-t { flex-wrap: wrap; row-gap: 2px; overflow: visible; }
main.session.lv5.v41 .v5-b-t .v5-b-ten { white-space: normal; overflow: visible; text-overflow: clip; }
main.session.lv5.v41 .v5-b-t .v5-b-chips { flex-wrap: wrap; white-space: normal; overflow: visible; row-gap: 2px; }
main.session.lv5.v41 .v5-b-chips .v5-chip { white-space: normal; max-width: 100%; overflow: visible; text-overflow: clip; line-height: 1.25; }
/* 4. the notebook: the cut of the work takes what is left (scrolls inside), «Sẵn sàng» under it in the flow, never over it */
main.session.lv5.v41 .v5-b-body[data-kieu="vo"] > .v5-noi { min-height: 100%; display: flex; flex-direction: column; }
main.session.lv5.v41 .v5-b-body[data-kieu="vo"] .v5-chua { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 6px; }
main.session.lv5.v41 .v5-b-body[data-kieu="vo"] .v5-chua-trai { flex: none; }
main.session.lv5.v41 .v5-b-body[data-kieu="vo"] .v5-chua-phai { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 6px; }
main.session.lv5.v41 .v5-b-body[data-kieu="vo"] .v5-chua-phai > :not(.v5-cat-o, .v5-dut) { flex: none; }
main.session.lv5.v41 .v5-b-body[data-kieu="vo"] .v5-chua-phai > :is(.v5-cat-o, .v5-dut) { flex: 1 1 auto; min-height: 56px; overflow: auto; }
main.session.lv5.v41 .v5-chua-phai > .v5-san-lai { position: static; }
/* 5. the board's column says there is more under it (a fade at the bottom edge) */
main.lv5.v41 .v5-buoc.tran-duoi { -webkit-mask-image: linear-gradient(0deg, transparent 0, #000 18px); mask-image: linear-gradient(0deg, transparent 0, #000 18px); }
main.lv5.v41 .v5-buoc.tran-tren.tran-duoi { -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 12px, #000 calc(100% - 18px), transparent); mask-image: linear-gradient(180deg, transparent 0, #000 12px, #000 calc(100% - 18px), transparent); }
/* 8. the page photo full screen on a tap */
main.session.lv5.v41 .v5-de-anh { cursor: zoom-in; }
main.lv5 .v5-de-to { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 12px; background: rgba(15, 23, 42, .82); cursor: zoom-out; overflow: auto; }
main.lv5 .v5-de-to.hidden { display: none; }
main.lv5 .v5-de-to img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; background: #fff; }

/* ================= việc 41 đợt 9 mục 6 (anh Cường: «kích thước chữ trên bảng cô giáo không đồng bộ»): ONE type system for every
   word on the notebook page, tall and wide. One face (Nunito; no hand-written face for sentences, no «→» before Pika's line), three
   sizes of XDR §5b only: --f-s labels / captions («Bước i/n», «Tóm tắt»), --f-m every word the child reads (step titles, Pika's
   lines, hints, questions, choices, summary lines), --f-l results to fill / boxes / the keypad. Line height 1.45; 12 px between
   blocks, 20 px before a step's title; one left edge. Inside .v5-buoc sizes are written N / --zb (the column is zoomed by --zb). */
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh :is(.v5-buoc, .v5-bang-loi, .v5-bang-cho, .v5-the-dai) :not(svg, svg *) {
  font-family: "Nunito", system-ui, sans-serif !important; font-style: normal !important; letter-spacing: 0 !important; text-transform: none !important; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .v5-buoc :not(svg, svg *) { font-size: calc(var(--f-m) / var(--zb, 1)) !important; line-height: 1.45 !important; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .v5-buoc :is(.tt-top, .tt-top *, .tt-tom-tieu, .tt-gt, .tt-lop-hinh-ghi, .tt-bb-dem, small) { font-size: calc(var(--f-s) / var(--zb, 1)) !important; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .v5-buoc :is(.tt-slot, .tt-slot *, .tt-pad button, .tt-pad button *) { font-size: calc(var(--f-l) / var(--zb, 1)) !important; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .v5-buoc .tt-ten { font-weight: 800 !important; color: #1899d6 !important; margin-top: calc(20px / var(--zb, 1)) !important; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .v5-buoc .tt-bb-buoc:first-child > .tt-ten:first-child { margin-top: 0 !important; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .v5-buoc :is(.tt-kq, .tt-loi, .tt-q, .tt-de-chu, .tt-khung-chu, .tt-fb) { font-weight: 700 !important; color: #1e293b !important; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .v5-buoc .tt-kq::before { content: none !important; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .v5-buoc :is(.tt-goi-y, .tt-goi-y *, .tt-gt, .tt-lop-hinh-ghi) { font-weight: 600 !important; color: #475569 !important; font-style: normal !important; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .v5-buoc :is(.tt-opt, .tt-opill, .tt-btn, .tt-opt *, .tt-opill *) { font-weight: 700 !important; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .v5-buoc :is(.tt-fb.ok, .tt-kq.ok) { color: #22a866 !important; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .v5-buoc :is(.tt-hint-sai, .tt-nac-phep) { color: #e08600 !important; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .v5-buoc .tt-bb-buoc > * + * { margin-top: calc(12px / var(--zb, 1)) !important; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .v5-buoc .tt-bb-buoc + .tt-bb-buoc { margin-top: calc(12px / var(--zb, 1)) !important; }
/* «Tóm tắt»: in the same column (no indent), white with a hairline, its lines --f-m, its numbers bold, its title --f-s */
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .v5-buoc .tt-tom-tat { margin: calc(12px / var(--zb, 1)) 0 0 !important; padding: calc(8px / var(--zb, 1)) calc(12px / var(--zb, 1)) !important; align-self: stretch; text-align: left; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .v5-buoc .tt-tom-tat .tt-tom-tieu { display: block; color: #64748b !important; font-weight: 800 !important; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .v5-buoc .tt-tom-tat ul { padding-left: 0 !important; border-left: 0 !important; margin: 0 !important; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .v5-buoc .tt-tom-tat li { font-size: calc(var(--f-m) / var(--zb, 1)) !important; font-weight: 600 !important; color: #1e293b !important; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .v5-buoc .tt-tom-tat :is(b, strong) { font-weight: 900 !important; color: #0f172a !important; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .v5-buoc :is(.tt-hinh, .tt-lop-hinh) svg text { font-family: "Nunito", system-ui, sans-serif; }
/* outside the zoomed column: the «Dạng → Bước» chips (--f-s) and the «Pika giảng miệng» board (--f-m, its note --f-s) */
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .v5-the-dai :is(*, b, small, i) { font-size: var(--f-s) !important; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .v5-bang-loi-ds p { font-size: var(--f-m) !important; line-height: 1.45; font-weight: 700 !important; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh :is(.v5-bang-loi-ghi, .v5-bang-cho-t) { font-size: var(--f-s) !important; }

/* ================= việc 41 đợt 10 */
/* 1. the problem pinned at the top of the notebook page in the board's phases (one place on a phone: the page block that only kept
   the words steps aside; the wide layout keeps both, the child's eyes are on the notebook) */
main.lv5 .v5-vo-de.hidden { display: none; }
main.session.lv5.v41 .v5-vo-de { flex: none; display: flex; flex-direction: column; gap: 2px; margin: 0 0 8px; padding: 6px 10px; background: #e5e7eb; border-radius: 8px; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .v5-vo-de-t { font-size: var(--f-s) !important; font-weight: 800 !important; color: #64748b !important; line-height: 1.2; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .v5-vo-de-chu { margin: 0; font-size: var(--f-m) !important; line-height: 1.45 !important; font-weight: 700 !important; color: #1e293b !important;
  max-height: calc(var(--f-m) * 1.45 * 3); overflow-y: auto; font-family: "Nunito", system-ui, sans-serif !important; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .v5-vo-de-chu mark.boi { background-color: #ffe08a !important; border-radius: 3px; padding: 0 3px; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .v5-vo-de-chu .khoanh { border: 2px solid #ff9600 !important; border-radius: 9999px; padding: 0 4px; }
main.session.lv5.v41:not(.v41-ngang) .v5-khoi-de[data-gon="chu"] { display: none; }
main.session.lv5.v41:not(.v41-ngang)[data-pha="day_lai_hinh"] .v5-khoi-de .v5-de-chu { display: none; }
/* 2. the page photo zoomed onto the question being corrected: clipped by paint (no scroll inside), a white veil with a hole on its
   frame, the other frames only their faint labels */
main.session.lv5.v41 .v5-de-lop { transform-origin: 0 0; will-change: transform; }
main.session.lv5.v41 .v5-de-anh.zoom { overflow: visible; contain: paint; }
main.session.lv5.v41 .v5-de-mo { position: absolute; z-index: 1; border-radius: 6px; pointer-events: none; box-shadow: 0 0 0 9999px rgba(255, 255, 255, .55); animation: v41-mo .4s ease-out both; }
@keyframes v41-mo { from { opacity: 0; } to { opacity: 1; } }
main.session.lv5.v41 .v5-de-anh.zoom .v5-de-lop .v5-k { z-index: 0; }
main.session.lv5.v41 .v5-de-anh.zoom .v5-de-lop .v5-k:not([data-dang]) { border-color: transparent !important; }
main.session.lv5.v41 .v5-de-anh.zoom .v5-de-lop .v5-k:not([data-dang]) > span { opacity: .55; }
main.session.lv5.v41 .v5-de-anh.zoom .v5-de-lop .v5-k[data-dang] { z-index: 2; }
@media (prefers-reduced-motion: reduce) { main.session.lv5.v41 .v5-de-mo { animation: none; } }
/* the frames' labels keep their drawn size under the zoom (counter-scaled), the label over the frame being corrected included */
main.session.lv5.v41 .v5-de-anh.zoom .v5-de-lop .v5-k > span { transform: scale(calc(1 / var(--zs, 1))); transform-origin: 0 0; transition: transform .4s ease-out; }
main.session.lv5.v41 .v5-de-anh.zoom .v5-de-lop .v5-k[data-dang] > span { transform-origin: 0 100%; }

/* ================= việc 41 đợt 11: the problem pinned on the notebook starts at its first word (never scrolled to a BÔI), three lines
   then «…xem thêm» opens it all */
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .v5-vo-de-chu { overflow: hidden; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .v5-vo-de.mo .v5-vo-de-chu { max-height: none; overflow: visible; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .v5-vo-de-them { align-self: flex-start; position: relative; min-height: 28px; padding: 0 2px; border: 0; background: none !important;
  color: #1899d6 !important; font: inherit; font-size: var(--f-s) !important; font-weight: 800 !important; cursor: pointer; }
main.session.lv5.v41.v41 .v5-bang-xanh.v5-bang-xanh .v5-vo-de-them::after { content: ""; position: absolute; inset: -10px -8px; }      /* 48 px for the finger */
main.lv5 .v5-vo-de-them.hidden { display: none; }

/* ================= việc 41 đợt 12 (code_docs/viec-41/REVIEW-UIUX.md) */
/* 1. chặn: a box to fill open on the board -> the page block steps aside (tall), the pinned problem one line (a tap opens it) */
main.session.lv5.v41.v41-an-de:not(.v41-ngang) .v5-khoi-de { display: none !important; }
main.session.lv5.v41.v41.v41-ghim-gon .v5-bang-xanh.v5-bang-xanh .v5-vo-de { flex-direction: row; align-items: baseline; gap: 6px; padding: 4px 10px; margin-bottom: 6px; cursor: pointer; }
main.session.lv5.v41.v41.v41-ghim-gon .v5-bang-xanh.v5-bang-xanh .v5-vo-de:not(.mo) .v5-vo-de-chu { max-height: calc(var(--f-m) * 1.45); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto; min-width: 0; }
main.session.lv5.v41.v41.v41-ghim-gon .v5-bang-xanh.v5-bang-xanh .v5-vo-de.mo { flex-direction: column; }
main.session.lv5.v41.v41.v41-ghim-gon .v5-bang-xanh.v5-bang-xanh .v5-vo-de .v5-vo-de-them { display: none; }
main.session.lv5.v41.v41.v41-ghim-gon .v5-bang-xanh.v5-bang-xanh .v5-vo-de-t { flex: none; }
/* 3. the tile's ✎ «Sửa câu N»: a 48 px hit area */
main.session.lv5.v41 .v5-o-sua::before { inset: -14px; }
/* 4. lam_lai: «Sẵn sàng» pinned to the notebook's bottom edge (never under the card's edge); «Con ghi:» back before the child's answer */
main.session.lv5.v41 .v5-b-body[data-kieu="vo"] .v5-chua-phai > .v5-san-lai { position: sticky; bottom: 0; z-index: 2; box-shadow: 0 -8px 12px #fff; }
main.session.lv5.v41 .v5-con-ghi-t { font-size: var(--f-s); font-weight: 800; color: #64748b; }

/* anh Cường 31/10 («đề bên trái còn bảng bên phải, chia màn hình ra làm 2 như các video»): màn ngang việc 41 khi KHÔNG có ảnh
   trang (đề gõ / đọc): ô đề ghim (.v5-bang-trai) cột trái 45 %, bảng vở ô li cột phải 55 %, cùng chiều cao; trước đây ô đề nằm
   trên, bảng chiếm cả bề ngang. Có ảnh trang thì giữ bố cục cũ (.v5-khoi-de trái). Màn dọc / điện thoại không đổi. */
main.session.lv5.v41.v41-ngang:not(.v5-co-de) .v5-bang:has(> .v5-bang-trai:not(:empty)) { grid-template-columns: minmax(0, 45fr) minmax(0, 55fr) !important; grid-template-rows: minmax(0, 1fr) !important; grid-template-areas: none !important; column-gap: 16px; }
main.session.lv5.v41.v41-ngang:not(.v5-co-de) .v5-bang > .v5-bang-trai { grid-column: 1; grid-row: 1; align-self: stretch; min-height: 0; overflow-y: auto; flex-direction: column; justify-content: flex-start; }
main.session.lv5.v41.v41-ngang:not(.v5-co-de) .v5-bang > .v5-bang-xanh { grid-column: 2; grid-row: 1; min-height: 0; }
main.session.lv5.v41.v41-ngang:not(.v5-co-de) .v5-bang > .v5-bang-trai :is(.v5-de-go, .v5-de-cau .de-bai) { font-size: 1.12em; line-height: 1.55; }
