/* LoopiClass v1.7.42 – BS92 luồng lớp học (Gemini + Canvas v3, anh Huu duyệt 23/11). Token theo Gemini: teal chính, nền phụ, viền mảnh. */
.lpi{flex-shrink:0;vertical-align:middle}

/* ---------- L1 thanh ngữ cảnh ---------- */
.crumb.ctx-on{display:flex;align-items:center;gap:8px;overflow:hidden}
.ctx-back{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:10px;border:1px solid var(--line);background:var(--surface);color:var(--ink);flex-shrink:0;text-decoration:none;transition:background .15s}
.ctx-back:hover{background:var(--soft)}
.ctx-back:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
@media (pointer:coarse){.ctx-back{width:44px;height:44px}}
.ctx-bc{display:flex;align-items:center;gap:6px;min-width:0;font-size:14px;font-weight:500;white-space:nowrap}
.ctx-bc a{color:var(--muted);text-decoration:none;max-width:200px;overflow:hidden;text-overflow:ellipsis}
.ctx-bc a:hover{color:var(--accent);text-decoration:underline}
.ctx-bc span{color:var(--line);font-weight:400}
.ctx-bc b{color:var(--ink);font-weight:700;overflow:hidden;text-overflow:ellipsis;min-width:0}
.ctx-bar{display:none}
@media (max-width:760px){
  .crumb.ctx-on{display:none}
  .ctx-bar{display:flex;align-items:center;gap:8px;position:sticky;top:var(--tbh,56px);z-index:15;margin:-16px -16px 12px;padding:4px 12px 4px 8px;min-height:52px;background:color-mix(in srgb,var(--bg) 94%,transparent);backdrop-filter:blur(8px);border-bottom:1px solid var(--line)}
  .ctx-bar .ctx-back{border:0;background:transparent;width:44px;height:44px}
  .ctx-t{display:flex;flex-direction:column;min-width:0;line-height:1.2}
  .ctx-t small{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .ctx-t b{font-size:15px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
}

/* ---------- L5 đầu lớp gọn ---------- */
.lop-h{display:flex;align-items:center;gap:14px;padding:14px 18px;min-height:84px;margin:4px 0 0}
.lop-av{width:44px;height:44px;border-radius:50%;flex-shrink:0;display:flex;align-items:center;justify-content:center;color:#fff;font:700 13px/1 var(--f-display);letter-spacing:.02em;box-shadow:0 0 0 2px var(--surface),0 0 0 3px var(--line)}
.lop-ht{min-width:0;flex:1}
.lop-ht h1{font-size:20px;line-height:1.3;margin:0;display:flex;align-items:center;gap:6px}
.lop-ht .clsren{border:0;background:transparent;color:var(--muted);width:32px;height:32px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
.lop-ht .clsren:hover{background:var(--soft);color:var(--ink)}
/* như trước (v1.2.6): nút bút ẩn, hiện khi rê chuột vào đầu lớp hoặc khi được chọn bằng bàn phím */
@media (hover:hover){.lop-ht .clsren{opacity:0;transition:opacity .15s}.lop-h:hover .clsren,.lop-ht .clsren:focus-visible{opacity:1}}
.lop-hm{display:flex;flex-wrap:wrap;gap:4px 12px;font-size:13px;color:var(--muted);margin-top:2px}
.lop-hn{color:var(--ink);font-weight:500}
.lop-ma{display:inline-flex;align-items:center;gap:8px;height:36px;padding:0 12px;border-radius:999px;border:1px solid var(--line);background:var(--soft);color:var(--ink);cursor:pointer;flex-shrink:0;font-size:12px}
.lop-ma span{color:var(--muted)}
.lop-ma b{font:700 14px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.12em}
.lop-ma:hover{border-color:var(--accent)}
.lop-ha{display:flex;align-items:center;gap:8px;flex-shrink:0}
.lop-ha .btn{min-height:40px;display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.lop-sec{background:var(--surface)}
.lop-ha .live-go{background:var(--surface)!important;color:var(--ink)!important;border:1px solid var(--line)!important;margin-top:0;font-weight:600}
.lop-new .lop-pl{font-size:18px;line-height:1;font-weight:500}
.lop-ns{display:none}
.lop-more{width:40px;padding:0;justify-content:center}
.lop-msm{display:none!important}
@media (max-width:1100px){.lop-sec{display:none!important}.lop-msm{display:flex!important}}
@media (max-width:640px){
  .lop-h{display:grid;grid-template-columns:40px minmax(0,1fr) auto auto;grid-template-areas:"av t t ma" "av m a a";gap:4px 10px;padding:10px 12px;min-height:0}
  .lop-hn{font-size:12px;white-space:nowrap}
  .lop-av{grid-area:av;width:40px;height:40px;align-self:start}
  .lop-ht{display:contents}
  .lop-ht h1{grid-area:t;font-size:18px;min-width:0}
  .lop-ht h1{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}
  .lop-ht .clsren{display:none}
  .lop-hm{grid-area:m;align-self:center}.lop-hm>span:first-child{display:none}
  .lop-ma{grid-area:ma;height:30px;padding:0 10px;justify-self:end}.lop-ma span{display:none}.lop-ma b{font-size:13px}
  .lop-ha{grid-area:a;justify-self:end;gap:6px}
  .lop-ha .btn{min-height:36px;height:36px;padding:0 12px}
  .lop-more{width:36px}
  .lop-nl{display:none}.lop-ns{display:inline}
}
/* menu nổi */
.lop-menu{min-width:240px;padding:6px}
.lop-menu [role=menuitem]{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:8px 10px;border-radius:8px;border:0;background:transparent;color:var(--ink);font:inherit;text-align:left;text-decoration:none;cursor:pointer}
.lop-menu [role=menuitem]:hover,.lop-menu [role=menuitem]:focus-visible{background:var(--soft);outline:none}
.lop-menu [role=menuitem][disabled]{opacity:.5;cursor:not-allowed}
.lop-menu [role=menuitem] span{display:flex;flex-direction:column;line-height:1.3}
.lop-menu [role=menuitem] small{color:var(--muted);font-size:12px}
.lop-menu .lpi{color:var(--accent)}
.lop-mh{font-size:12px;color:var(--muted);padding:6px 10px 4px}
.lop-menu hr{border:0;border-top:1px solid var(--line);margin:4px 0}

/* ---------- L6 4 thẻ + công tắc đoạn ---------- */
.ct-tabs .ct-g{overflow-x:auto;scrollbar-width:none}
.ct-tabs .ct-g::-webkit-scrollbar{display:none}
@media (max-width:640px){.ct-tabs .ct-g{-webkit-mask-image:linear-gradient(to right,#000 calc(100% - 28px),transparent);mask-image:linear-gradient(to right,#000 calc(100% - 28px),transparent);padding-right:24px}.ct-tabs .ct-gi{white-space:nowrap}}
.ct-seg{display:inline-flex;gap:2px;padding:3px;margin:12px 0 2px;border-radius:10px;background:var(--soft);border:1px solid var(--line);max-width:100%;overflow-x:auto}
.ct-seg[hidden]{display:none}
.ct-seg a{display:inline-flex;align-items:center;min-height:32px;padding:0 14px;border-radius:7px;font-size:13px;font-weight:600;color:var(--muted);text-decoration:none;white-space:nowrap}
.ct-seg a.on{background:var(--surface);color:var(--ink);box-shadow:var(--shadow-sm)}
.ct-seg a[hidden]{display:none}
@media (pointer:coarse){.ct-seg a{min-height:40px}}

/* ---------- L2–L4 danh sách bài ---------- */
.asg-bar{min-width:0;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;margin-top:12px}
.asg-seg{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;min-width:0}
.asg-seg::-webkit-scrollbar{display:none}
.asg-seg button{display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:0 14px;border-radius:999px;border:1px solid var(--line);background:var(--surface);color:var(--ink);font:600 13px/1 inherit;cursor:pointer;white-space:nowrap}
.asg-seg button.on{background:var(--accent);border-color:var(--accent);color:#fff}
.asg-n{display:inline-block;min-width:22px;padding:2px 6px;border-radius:999px;background:var(--soft);color:var(--muted);font-size:12px;font-weight:700;text-align:center}
.asg-seg button.on .asg-n{background:rgba(255,255,255,.22);color:#fff}
.asg-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.asg-q{display:flex;align-items:center;gap:6px;height:36px;padding:0 10px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--muted);width:240px}
.asg-q input{border:0;outline:0;background:transparent;font:inherit;font-size:14px;color:var(--ink);width:100%;min-width:0;padding:0}
.asg-q:focus-within{border-color:var(--accent)}
.asg-tools select{height:36px;border-radius:10px;border:1px solid var(--line);background:var(--surface);color:var(--ink);padding:0 8px;font:inherit;font-size:14px}
.asg-note{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin:10px 0 0}
.asg-list{margin-top:12px;gap:12px}
.asg-g{border:1px solid var(--line);border-radius:12px;background:var(--surface);overflow:hidden}
.asg-gh{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:0 14px;border:0;background:var(--soft);color:var(--ink);font:inherit;cursor:pointer;text-align:left}
.asg-gc{display:inline-flex;transition:transform .15s;color:var(--muted)}
.asg-g.open .asg-gc{transform:rotate(90deg)}
.asg-gl{font-weight:700;font-size:14px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.asg-gn{font-size:12px;color:var(--muted);background:var(--surface);border:1px solid var(--line);border-radius:999px;padding:1px 8px;flex-shrink:0}
.asg-gt{margin-left:auto;font-size:13px;color:var(--accent);font-weight:600;flex-shrink:0}
.asg-gb,.asg-gm{display:none}
.asg-g.open .asg-gb{display:grid}
.asg-g.open .asg-gm{display:block}
.asg-gm:empty{display:none!important}
.asg-gm{padding:8px;text-align:center}
.asg-gb .aitem{border:0;border-top:1px solid var(--line);border-radius:0;min-height:64px}
.asg-pr{display:flex;flex-direction:column;align-items:flex-end;gap:4px;font-size:12px;color:var(--muted);white-space:nowrap}
.asg-pr b{color:var(--ink)}
.asg-pr .prog{display:block;width:72px}
.asg-more{display:flex;justify-content:center;margin:16px 0 8px}
.asg-more:empty{display:none}
.asg-mb{min-height:44px;min-width:200px}
.asg-empty{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;padding:32px 16px;color:var(--ink)}
.asg-empty .lpi{color:var(--muted)}
.asg-skel{display:grid;gap:8px}
.asg-skel i{display:block;height:64px;border-radius:12px;background:linear-gradient(90deg,var(--soft),var(--line),var(--soft));background-size:200% 100%;animation:asgsk 1.2s linear infinite}
.asg-skel i.h{height:16px;width:140px}
@keyframes asgsk{to{background-position:-200% 0}}
.asg-gerr{padding:12px}
@media (max-width:640px){
  .asg-bar{flex-direction:column;align-items:stretch}
  .asg-seg{-webkit-mask-image:linear-gradient(to right,#000 calc(100% - 28px),transparent);mask-image:linear-gradient(to right,#000 calc(100% - 28px),transparent);padding-right:24px}
  .asg-seg{width:100%;max-width:100%}
  .asg-tools{width:100%;min-width:0}
  .asg-q{flex:1 1 100%;width:auto}
  .asg-tools select{flex:1}
  .asg-gb .aitem{flex-wrap:wrap;gap:8px}
  .asg-gb .aitem .grow{flex:1 1 calc(100% - 60px)}
  .asg-gb .aitem b{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .asg-pr{flex-direction:row;align-items:center}
  .asg-gt{display:none}
}

/* ---------- L7 trang lớp của học sinh ---------- */
.sxc-h{display:flex;align-items:center;gap:12px;padding:10px 12px;margin:6px 0 12px;min-height:76px}
.sxc-t{flex:1;min-width:0}
.sxc-t h1{font-size:18px;margin:0;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sxc-t p{margin:2px 0 0;font-size:13px;color:var(--muted);display:flex;align-items:center;gap:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sxc-mon{display:inline-block;padding:1px 8px;border-radius:999px;background:var(--accent-soft,var(--soft));color:var(--accent);font-weight:600;font-size:12px}
.sxc-a{display:flex;gap:4px;flex-shrink:0}
.sxc-ib{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:10px;border:1px solid var(--line);color:var(--ink);background:var(--surface)}
@media (pointer:coarse){.sxc-ib{width:44px;height:44px}}
.sxc-ch{border:1px solid var(--line);border-radius:12px;background:var(--surface);margin-top:10px;overflow:hidden}
.sxc-chh{display:flex;align-items:center;gap:10px;width:100%;min-height:48px;padding:8px 14px;border:0;background:transparent;color:var(--ink);font:inherit;text-align:left;cursor:pointer}
.sxc-chh b{flex:1;min-width:0;font-size:14px}
.sxc-chv{display:inline-flex;color:var(--muted);transition:transform .15s}
.sxc-ch.open .sxc-chv{transform:rotate(90deg)}
.sxc-pc{display:flex;flex-direction:column;align-items:flex-end;gap:4px;flex-shrink:0}
.sxc-pc small{font-size:12px;color:var(--muted);white-space:nowrap}
.sxc-bar{display:block;width:64px;height:4px;border-radius:4px;background:var(--soft);overflow:hidden}
.sxc-bar i{display:block;height:100%;background:var(--accent);border-radius:4px}
.sxc-chb,.sxc-chm{display:none}
.sxc-ch.open .sxc-chb{display:grid;padding:0 8px 8px}
.sxc-ch.open .sxc-chm{display:block;text-align:center;padding:0 0 10px}
.sxc-chm:empty{display:none!important}
.sxc-xong{margin-top:8px}

/* ---------- L8 danh sách lớp nhóm theo môn: chip khối ---------- */
.tcl-chips{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;max-width:100%}
.tcl-chips::-webkit-scrollbar{display:none}
.tcl-chips button{min-height:36px;padding:0 14px;border-radius:999px;border:1px solid var(--line);background:var(--surface);color:var(--ink);font:600 13px/1 inherit;white-space:nowrap;cursor:pointer}
.tcl-chips button.on{background:var(--accent);border-color:var(--accent);color:#fff}
@media (max-width:640px){.tcl-chips{-webkit-mask-image:linear-gradient(to right,#000 calc(100% - 28px),transparent);mask-image:linear-gradient(to right,#000 calc(100% - 28px),transparent);padding-right:24px}}
/* L9 – viên môn trên bài của em + chip lọc môn */
.sx-mon{display:inline-block;margin-right:6px;padding:0 7px;border-radius:999px;font-size:11px;font-weight:700;line-height:18px;color:var(--mc,var(--accent));background:color-mix(in srgb,var(--mc,var(--accent)) 12%,transparent)}
.sx-mons{margin:4px 0 10px}
.sx-mons button.on{background:var(--mc,var(--accent));border-color:var(--mc,var(--accent))}
.gq-mons{margin:8px 0 12px}.gq-mons em{font-style:normal;font-weight:700;color:inherit;opacity:.8}
/* ---------- L11 bảng điểm điện thoại: thẻ theo học sinh ---------- */
.gb-cards{display:none}
@media (max-width:640px){
  .gb-cards{display:grid;gap:8px;margin-top:10px}
  .gb-tbl{display:none!important}
  .gb-card{background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:12px 14px}
  .gb-c1{display:flex;align-items:center;justify-content:space-between;gap:8px}
  .gb-c1 b{font-size:15px}
  .gb-avg{padding:3px 10px;border-radius:999px;background:var(--accent);color:#fff;font-weight:700;font-size:14px;white-space:nowrap}
  .gb-c2{font-size:12px;color:var(--muted);margin-top:4px}
  .gb-miss{color:var(--red,#b42318)}
  .gb-card details{margin-top:6px}
  .gb-card summary{font-size:13px;color:var(--accent);font-weight:600;cursor:pointer;min-height:32px;display:flex;align-items:center}
  .gb-card ul{list-style:none;margin:4px 0 0;padding:0;display:grid;gap:4px}
  .gb-card li{display:flex;justify-content:space-between;gap:10px;font-size:13px}
  .gb-card li a{color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .gb-more{min-height:44px}
}
/* L11 – thành viên trên điện thoại: mỗi em một thẻ (tên + trạng thái dòng 1, liên hệ dòng 2, nút dòng 3) – không cuộn ngang */
@media (max-width:640px){
  .mem-tw{overflow:visible;padding:0;background:transparent;border:0;box-shadow:none}
  .mem-t thead{display:none}
  .mem-t,.mem-t tbody{display:block}
  .mem-t tr{display:grid;grid-template-columns:1fr auto;gap:4px 10px;padding:12px 14px;margin-bottom:8px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}
  .mem-t td{display:block;border:0!important;padding:0!important;min-width:0}
  .mem-t td:nth-child(1){grid-column:1}
  .mem-t td:nth-child(2){grid-column:2;justify-self:end}
  .mem-t td:nth-child(3){grid-column:1/-1;overflow-wrap:anywhere}
  .mem-t td:nth-child(4){display:none}
  .mem-t td:nth-child(5){grid-column:1/-1;text-align:left;display:flex;flex-wrap:wrap;gap:6px}
  .mem-t td:nth-child(5) .btn{min-height:40px}
}
/* L12 – ô ngày giờ kiểu Việt */
.vndt{position:relative;display:flex;align-items:center;gap:6px;max-width:100%;margin-top:4px}
.vndt input.vndt-d{flex:1 1 120px;min-width:0;width:auto}
.vndt input.vndt-t{flex:0 0 76px;width:76px;min-width:0}
.vndt input.bad{border-color:var(--red,#b42318);background:var(--red-soft,#fef2f2)}
.vndt-b{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:10px;border:1px solid var(--line);background:var(--surface);color:var(--ink);cursor:pointer}
.vndt-src{position:absolute!important;left:0;bottom:0;width:1px!important;height:1px!important;opacity:0;pointer-events:none;border:0!important;padding:0!important}

/* ---------- BS93 Hướng dẫn sử dụng ---------- */
.hlp-miss{display:flex;gap:10px;align-items:flex-start;margin:0 0 12px;padding:12px 14px;border-radius:10px;background:#FFFBEB;border:1px solid #FDE68A;color:#78350F}
.hlp-miss .ic{width:20px;height:20px;color:#D97706;flex-shrink:0;margin-top:1px}
.hlp-miss p{margin:0 0 8px;font-size:14px;line-height:1.45}
.hlp-key{display:inline-block;padding:0 6px;margin:0 1px;border-radius:4px;background:#F1F5F9;border:1px solid #CBD5E1;border-bottom-width:2px;color:#0F172A;font-size:.92em;font-weight:600;line-height:1.5;white-space:nowrap}
.hlp-show{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:0 14px;margin-top:6px;border:0;border-radius:8px;background:var(--accent);color:#fff;font:600 14px/1 inherit;cursor:pointer}
.hlp-show .ic{width:16px;height:16px}
.hlp-tip b{display:flex;align-items:center;gap:6px}.hlp-tip b .ic{width:16px;height:16px;color:#D97706}
.hlp-fb button{display:inline-flex;align-items:center;gap:4px}.hlp-fb button .ic{width:14px;height:14px}
.hlp-nores{display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px;padding:20px 8px}
.hlp-nores-i .ic{width:36px;height:36px;color:#94A3B8}
.hlp-nores small{color:var(--muted)}
.hlp-chips{display:flex;flex-wrap:wrap;justify-content:center;gap:6px}
.hlp-chip{min-height:32px;padding:0 12px;border-radius:999px;border:1px solid var(--line);background:var(--soft);color:var(--ink);font:500 13px/1 inherit;cursor:pointer}
@media (max-width:640px){.hlp-show{width:100%;justify-content:center}}
/* L12 – ô chọn có phương án dài không được đẩy trang tràn ngang ở 390 (bước 3 Giao bài: 558 px) */
#main select{max-width:100%;min-width:0;text-overflow:ellipsis}
#main label:has(> select){min-width:0}
/* L12 – Kết quả bài ở điện thoại: Phổ điểm và Gợi ý chữa bài xếp MỘT cột (trước: 2 cột hẹp, chữ dọc) */
@media (max-width:640px){.res-2c{grid-template-columns:minmax(0,1fr)!important}}
/* v1.7.61: từ khi lớp có "Năm học 2026-2027" (lớp chuẩn 1.7.60) dòng phụ xuống 2 dòng → đầu lớp cao 122px, vượt chuẩn BS92 (≤ 110px).
   Giữ một dòng: phần môn · khối · năm học co lại có dấu "…" (đủ chữ trong title), số học sinh · bài luôn hiện đủ. */
@media (min-width:600px){.lop-hm{flex-wrap:nowrap;min-width:0}.lop-hm>span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.lop-hn{flex:0 0 auto;white-space:nowrap}.lop-ht{min-width:0}}
