/* =============================================================
   LỚP HỌC TRỰC TUYẾN + BẢNG VIẾT
   Phòng học luôn nền tối (như Zoom) cho hình nổi, đỡ chói mắt.
   ============================================================= */

/* ---------- Danh sách phòng ---------- */
.ltt-ds-dau { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.ltt-ds-dau p { max-width: 62ch; }
.ltt-luoi-the { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.ltt-the { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.ltt-the.dang-hoc { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); box-shadow: 0 0 0 3px var(--ok-soft); }
.ltt-the-dau { display: flex; gap: 12px; align-items: flex-start; }
.ltt-the-o { flex: none; width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.ltt-the-o .ltt-ic { width: 22px; height: 22px; }
.ltt-the-ten { min-width: 0; }
.ltt-the-ten h3 { font-size: 17px; line-height: 1.3; margin: 0 0 6px; overflow-wrap: anywhere; }
.ltt-the-tt { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ltt-the-lich { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--text-soft); font-weight: 600; }
.ltt-the-lich .ic { width: 16px; height: 16px; flex: none; }
.ltt-the-mo { margin: 0; color: var(--text-soft); font-size: 14px; white-space: pre-line; }
.ltt-the-khoa { display: flex; gap: 6px; flex-wrap: wrap; }
.ltt-the-nut { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; align-items: center; }
.ltt-the-nut .btn-primary { display: inline-flex; gap: 8px; align-items: center; }
.ltt-ic { width: 20px; height: 20px; flex: none; }
.ltt-the-nut .ltt-ic { width: 18px; height: 18px; }

.ltt-song { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--ok); }
.ltt-song i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 currentColor; animation: lttNhip 1.6s infinite; }
@keyframes lttNhip { 0% { box-shadow: 0 0 0 0 rgba(10,138,63,.55); } 70% { box-shadow: 0 0 0 8px rgba(10,138,63,0); } 100% { box-shadow: 0 0 0 0 rgba(10,138,63,0); } }

.ltt-chon-khoa { display: grid; gap: 6px; max-height: 240px; overflow: auto; padding: 2px; }
.ltt-ck { display: flex; gap: 10px; align-items: flex-start; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; font-size: 14px; }
.ltt-ck:hover { background: var(--bg-sunk); }
.ltt-ck input { margin-top: 3px; accent-color: var(--brand); flex: none; }
.ltt-ck span { flex: 1; min-width: 0; }
.ltt-ck small { color: var(--text-mute); white-space: nowrap; }
.ltt-ck-mo { margin-top: 4px; }
.ltt-dd-ngay { margin: 18px 0 8px; font-size: 15px; }
.ltt-dd-ngay:first-child { margin-top: 0; }
.ltt-dd { max-height: 65vh; overflow: auto; }

/* ---------- Khung phòng (toàn màn hình) ---------- */
body.ltt-dang-mo { overflow: hidden; }
.ltt-man {
  --l-bg: #0d0f13;
  --l-o: #1a1d24;
  --l-o2: #232731;
  --l-line: #2c313c;
  --l-chu: #eef0f4;
  --l-mo: #9aa1ad;
  --l-xanh: #22c55e;
  --l-vang: #fbbf24;
  --l-do: #ef4444;
  position: fixed; inset: 0; z-index: 900; background: var(--l-bg); color: var(--l-chu);
  font-family: var(--font); display: flex; flex-direction: column;
}
.ltt-man .muted { color: var(--l-mo); }

/* ---------- Màn chờ (thử mic & camera) ---------- */
.ltt-cho { margin: auto; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, 1fr); gap: 28px; width: min(1040px, 100%); padding: 24px 16px; align-items: center; overflow: auto; max-height: 100%; }
.ltt-cho-xem { position: relative; aspect-ratio: 16 / 9; background: var(--l-o); border-radius: 14px; overflow: hidden; }
.ltt-cho-xem video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: block; }
.ltt-cho-tat { position: absolute; inset: 0; padding-bottom: 64px; display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--l-mo); background: var(--l-o); font-weight: 600; }
.ltt-cho-tat .ltt-ic { width: 40px; height: 40px; }
.ltt-cho-muc { position: absolute; left: 16px; top: 16px; width: 90px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.18); overflow: hidden; }
.ltt-cho-muc i { display: block; height: 100%; width: 0; background: var(--l-xanh); transition: width .08s; }
.ltt-cho-nut { position: absolute; left: 0; right: 0; bottom: 16px; display: flex; justify-content: center; gap: 14px; }
.ltt-tron { width: 54px; height: 54px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: rgba(255,255,255,.16); color: #fff; backdrop-filter: blur(6px); }
.ltt-tron:hover { background: rgba(255,255,255,.26); }
.ltt-tron.tat { background: var(--l-do); }
.ltt-tron .ltt-ic { width: 24px; height: 24px; }
.ltt-cho-ben h2 { font-size: 26px; line-height: 1.25; margin: 6px 0 6px; overflow-wrap: anywhere; }
.ltt-cho-nhan { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--l-mo); }
.ltt-cho-lich { margin: 0 0 6px; color: var(--l-mo); font-weight: 600; }
.ltt-cho-tt { margin: 0 0 18px; color: var(--l-mo); font-size: 14px; }
.ltt-cho-tt .ltt-song { color: var(--l-xanh); }
.ltt-cho-chon { display: grid; gap: 5px; margin-bottom: 12px; font-size: 13px; color: var(--l-mo); font-weight: 600; }
.ltt-cho-chon select { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--l-line); background: var(--l-o); color: var(--l-chu); font: inherit; font-size: 14px; }
.ltt-cho-loi, .ltt-cho-canh { padding: 12px 14px; border-radius: 8px; background: rgba(239,68,68,.14); color: #fecaca; font-size: 14px; margin-bottom: 14px; line-height: 1.45; }
.ltt-cho-canh { background: rgba(251,191,36,.14); color: #fde68a; }
.ltt-cho-meo { font-size: 13px; color: var(--l-mo); margin: 14px 0 0; line-height: 1.5; }
.ltt-man .btn-ghost { color: var(--l-chu); border-color: var(--l-line); background: transparent; }
.ltt-man .btn-ghost:hover { background: var(--l-o2); }

/* ---------- Bố cục trong phòng ---------- */
.ltt-phong { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.ltt-tren { flex: none; height: 50px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--l-line); }
.ltt-tren-trai, .ltt-tren-phai { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ltt-tren-ten { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ltt-tren-gio { font-variant-numeric: tabular-nums; color: var(--l-mo); font-size: 14px; }
.ltt-tren-khoa { display: inline-flex; gap: 5px; align-items: center; font-size: 12.5px; color: var(--l-vang); font-weight: 600; white-space: nowrap; }
.ltt-tren-khoa .ltt-ic { width: 15px; height: 15px; }
.ltt-tren-mang { font-size: 12.5px; color: var(--l-vang); font-weight: 600; }
.ltt-rec { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .08em; color: #fff; background: var(--l-do); padding: 3px 8px; border-radius: 4px; flex: none; }
.ltt-rec i { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: lttNhay 1.4s infinite; }
@keyframes lttNhay { 50% { opacity: .25; } }
.ltt-nut-nho { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: 8px; border: 0; background: transparent; color: var(--l-chu); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.ltt-nut-nho:hover { background: var(--l-o2); }
.ltt-nut-nho .ltt-ic { width: 18px; height: 18px; }

.ltt-giua { flex: 1; min-height: 0; display: flex; }
.ltt-san { flex: 1; min-width: 0; display: flex; gap: 8px; padding: 8px; position: relative; }
.ltt-chinh { flex: 1; min-width: 0; min-height: 0; position: relative; display: flex; }
.ltt-chinh > [hidden] { display: none !important; }
.ltt-bang-o, .ltt-man-o { flex: 1; min-width: 0; min-height: 0; display: flex; }
.ltt-man-o > .ltt-o { flex: 1; aspect-ratio: auto; }
.ltt-man-o > .ltt-o video { object-fit: contain; background: #000; }
.ltt-san-nut { position: absolute; right: 8px; top: 8px; display: flex; gap: 6px; z-index: 5; }
.ltt-san-nut .ltt-nut-nho { background: rgba(13,15,19,.72); backdrop-filter: blur(6px); }
.ltt-phong[data-san="bang"] .ltt-san-nut { top: auto; bottom: 52px; }

/* Lưới kiểu Zoom: JS tính độ rộng ô --o-w */
.ltt-luoi { flex: 1; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 8px; min-height: 0; overflow: hidden; }
.ltt-luoi > .ltt-o { width: var(--o-w, 320px); }

/* Dải ô nhỏ bên phải khi xem bảng / màn hình */
.ltt-dai { flex: none; width: 196px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; scrollbar-width: thin; }
.ltt-dai[hidden] { display: none; }
.ltt-dai > .ltt-o { width: 100%; }

/* Một ô người */
.ltt-o { position: relative; aspect-ratio: 16 / 9; background: var(--l-o); border-radius: 10px; overflow: hidden; flex: none; outline: 3px solid transparent; outline-offset: -3px; transition: outline-color .15s; }
.ltt-o video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; background: #000; }
.ltt-o.co-hinh video { opacity: 1; }
.ltt-o.la-toi video { transform: scaleX(-1); }
.ltt-o.ltt-o-man video { transform: none; object-fit: contain; }
.ltt-o-chu { position: absolute; inset: 0; display: grid; place-items: center; }
.ltt-o-chu span { width: clamp(38px, 26%, 92px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: clamp(15px, 2.2vw, 34px); background: #3b4252; color: #fff; }
.ltt-o.la-chu .ltt-o-chu span { background: var(--brand); }
.ltt-o.co-hinh .ltt-o-chu { display: none; }
.ltt-o-ten { position: absolute; left: 6px; bottom: 6px; max-width: calc(100% - 12px); display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px 3px 6px; border-radius: 6px; background: rgba(0,0,0,.58); font-size: 12.5px; }
.ltt-o-ten b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ltt-o-mic { display: none; color: var(--l-do); }
.ltt-o-mic .ltt-ic { width: 14px; height: 14px; }
.ltt-o.tat-mic .ltt-o-mic { display: inline-flex; }
.ltt-o-tay, .ltt-o-but { position: absolute; top: 6px; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; }
.ltt-o-tay { left: 6px; background: var(--l-vang); color: #111; animation: lttVay 1.2s ease-in-out infinite; }
.ltt-o-but { right: 6px; background: #2563eb; color: #fff; }
.ltt-o-tay[hidden], .ltt-o-but[hidden] { display: none; }
.ltt-o-tay .ltt-ic, .ltt-o-but .ltt-ic { width: 18px; height: 18px; }
@keyframes lttVay { 50% { transform: rotate(-12deg); } }
.ltt-o.dang-noi { outline-color: var(--l-xanh); }
.ltt-o.mat-ket-noi::after { content: 'Đang nối lại…'; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.55); font-size: 13px; color: var(--l-vang); font-weight: 600; }
.ltt-o-bao { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; text-align: center; padding: 16px; color: var(--l-mo); }
.ltt-o-bao .ltt-ic { width: 44px; height: 44px; }
.ltt-o-bao b { color: var(--l-chu); font-size: 16px; }

.ltt-loa-bao, .ltt-noi-lai { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; z-index: 8; background: rgba(13,15,19,.55); }
.ltt-loa-bao[hidden], .ltt-noi-lai[hidden] { display: none; }
.ltt-loa-bao .btn { display: inline-flex; gap: 8px; align-items: center; }
.ltt-noi-lai { font-weight: 600; }

/* ---------- Bảng bên (chat / thành viên) ---------- */
.ltt-ben { flex: none; width: 0; overflow: hidden; border-left: 1px solid transparent; display: flex; flex-direction: column; transition: width .22s ease; background: #12151a; }
.ltt-phong[data-mo="chat"] .ltt-ben, .ltt-phong[data-mo="nguoi"] .ltt-ben { width: 340px; border-left-color: var(--l-line); }
.ltt-ben-dau { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 0 10px; border-bottom: 1px solid var(--l-line); min-width: 340px; }
.ltt-ben-tab { display: flex; }
.ltt-ben-tab button { background: none; border: 0; color: var(--l-mo); font: inherit; font-weight: 600; font-size: 14px; padding: 10px 12px; border-bottom: 2px solid transparent; cursor: pointer; }
.ltt-ben-tab button.on { color: var(--l-chu); border-bottom-color: var(--brand); }
.ltt-ben-noi { flex: 1; min-height: 0; min-width: 340px; display: flex; flex-direction: column; }
.ltt-ben-noi[hidden] { display: none; }
#ltt-ben-nguoi { overflow-y: auto; padding: 8px; gap: 2px; }

.ltt-chat-ds { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.ltt-chat-trong { margin: auto; color: var(--l-mo); font-size: 14px; }
.ltt-tin { max-width: 92%; }
.ltt-tin.toi { align-self: flex-end; text-align: right; }
.ltt-tin-dau { display: flex; gap: 6px; align-items: baseline; font-size: 12.5px; color: var(--l-mo); margin-bottom: 3px; flex-wrap: wrap; }
.ltt-tin.toi .ltt-tin-dau { justify-content: flex-end; }
.ltt-tin-dau b { color: var(--l-chu); font-weight: 700; }
.ltt-tin-dau b.chu { color: #fca5a5; }
.ltt-tin-dau time { font-size: 11.5px; }
.ltt-rieng { font-size: 11px; font-weight: 700; color: var(--l-vang); }
.ltt-tin-noi { display: inline-block; text-align: left; padding: 8px 11px; border-radius: 10px; background: var(--l-o2); font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.ltt-tin.toi .ltt-tin-noi { background: color-mix(in srgb, var(--brand) 70%, #000); }
.ltt-tin.rieng .ltt-tin-noi { box-shadow: inset 0 0 0 1.5px var(--l-vang); }
.ltt-tin-noi a { color: #93c5fd; }
.ltt-chat-go { flex: none; padding: 10px; border-top: 1px solid var(--l-line); display: grid; gap: 8px; }
.ltt-chat-go select { width: 100%; padding: 7px 9px; border-radius: 7px; border: 1px solid var(--l-line); background: var(--l-o); color: var(--l-chu); font: inherit; font-size: 13px; }
.ltt-chat-hang { display: flex; gap: 8px; }
.ltt-chat-hang input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--l-line); background: var(--l-o); color: var(--l-chu); font: inherit; font-size: 14px; }
.ltt-chat-hang input:focus { outline: 2px solid var(--brand); outline-offset: -1px; }
.ltt-gui { flex: none; width: 42px; border-radius: 8px; border: 0; background: var(--brand); color: #fff; display: grid; place-items: center; cursor: pointer; }
.ltt-gui .ltt-ic { width: 18px; height: 18px; }

.ltt-tv-dau { display: flex; gap: 8px; flex-wrap: wrap; padding: 4px 4px 10px; border-bottom: 1px solid var(--l-line); margin-bottom: 6px; }
.ltt-tv-dau .btn { display: inline-flex; gap: 6px; align-items: center; }
.ltt-tv-dau .ltt-ic { width: 15px; height: 15px; }
.ltt-tv { display: grid; grid-template-columns: 34px 1fr auto; gap: 4px 10px; align-items: center; padding: 8px; border-radius: 8px; }
.ltt-tv:hover { background: var(--l-o); }
.ltt-tv.gio-tay { background: rgba(251,191,36,.08); }
.ltt-tv-o { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #3b4252; font-weight: 700; font-size: 14px; }
.ltt-tv-o.chu { background: var(--brand); }
.ltt-tv-ten { min-width: 0; display: grid; }
.ltt-tv-ten b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ltt-tv-ten small { font-size: 12px; color: var(--l-mo); }
.vang { color: var(--l-vang); }
.ltt-tv-tt { display: flex; gap: 6px; color: var(--l-chu); }
.ltt-tv-tt .ltt-ic { width: 16px; height: 16px; }
.ltt-tv-tt .ltt-ic.mo { color: var(--l-do); opacity: .85; }
.ltt-tv-nut { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.ltt-tv-nut button { border: 1px solid var(--l-line); background: transparent; color: var(--l-chu); font: inherit; font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 6px; cursor: pointer; }
.ltt-tv-nut button:hover { background: var(--l-o2); }
.ltt-tv-nut button.do { color: #fca5a5; }

/* ---------- Thanh nút dưới ---------- */
.ltt-duoi { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--l-line); background: #111318; }
.ltt-duoi-trai, .ltt-duoi-giua, .ltt-duoi-phai { display: flex; gap: 4px; align-items: center; }
.ltt-duoi-giua { flex: 1; justify-content: center; flex-wrap: wrap; }
.ltt-nut { position: relative; display: grid; justify-items: center; gap: 3px; min-width: 66px; padding: 7px 8px 6px; border: 0; border-radius: 10px; background: transparent; color: var(--l-chu); font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.ltt-nut:hover { background: var(--l-o2); }
.ltt-nut .ltt-ic { width: 22px; height: 22px; }
.ltt-nut.tat .ltt-ic { color: var(--l-do); }
.ltt-nut.cam-quyen { opacity: .5; }
.ltt-nut.dang { background: color-mix(in srgb, var(--brand) 26%, transparent); color: #fff; }
.ltt-nut.do { background: var(--l-do); color: #fff; padding-inline: 14px; }
.ltt-nut.do:hover { background: #dc2626; }
.ltt-cham { position: absolute; top: 3px; right: 12px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--brand); color: #fff; font-style: normal; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.ltt-cham.vang { background: var(--l-vang); color: #111; }

/* ---------- Hết buổi ---------- */
.ltt-het { margin: auto; text-align: center; padding: 24px 16px; max-width: 460px; }
.ltt-het-o { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--l-o2); color: var(--l-mo); }
.ltt-het-o .ltt-ic { width: 32px; height: 32px; }
.ltt-het h2 { font-size: 22px; margin: 0 0 8px; }
.ltt-het p { color: var(--l-mo); margin: 0 0 20px; }

.ltt-ql h4 { margin: 14px 0 8px; font-size: 14px; color: var(--text-soft); }
.ltt-ql h4:first-child { margin-top: 0; }
.ltt-ql .ltt-ck { margin-bottom: 6px; }
.ltt-ql-nut { display: grid; gap: 8px; }
.ltt-ql-nut .btn { display: inline-flex; gap: 8px; align-items: center; justify-content: flex-start; }
.ltt-ql-nut .ltt-ic { width: 17px; height: 17px; }
/* Hộp thoại nằm trên phòng học */
body.ltt-dang-mo .modal-back { z-index: 1000; }
body.ltt-dang-mo .toasts { z-index: 1100; top: 58px; bottom: auto; right: auto; left: 50%; transform: translateX(-50%); align-items: center; }

/* =============================================================
   BẢNG VIẾT
   ============================================================= */
.bv { flex: 1; min-width: 0; min-height: 0; display: grid; grid-template-columns: auto 1fr; grid-template-rows: 1fr auto; gap: 8px; }
.bv.bv-chi-xem { grid-template-columns: 1fr; }
.bv-cu { grid-row: 1 / 3; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; scrollbar-width: none; padding: 2px; }
.bv-cu:empty { display: none; }
.bv-nhom { display: grid; grid-template-columns: repeat(2, 38px); gap: 2px; padding: 4px; border-radius: 10px; background: var(--l-o); }
.bv-nut { width: 38px; height: 38px; border: 0; border-radius: 8px; background: transparent; color: var(--l-chu); display: grid; place-items: center; cursor: pointer; flex: none; }
.bv-nut:hover { background: var(--l-o2); }
.bv-nut.on { background: var(--brand); color: #fff; }
.bv-nut[disabled] { opacity: .35; pointer-events: none; }
.bv-ic { width: 20px; height: 20px; }
.bv-mau { grid-template-columns: repeat(4, 1fr); gap: 6px 4px; padding: 8px 6px; }
.bv-cham { width: 16px; height: 16px; justify-self: center; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); background: var(--m); cursor: pointer; padding: 0; }
.bv-cham.on { outline: 2px solid #fff; outline-offset: 2px; }
.bv-day-net i { display: block; width: 20px; background: currentColor; border-radius: 4px; }
.bv-khung { position: relative; min-width: 0; min-height: 0; display: grid; place-items: center; }
.bv-giay { position: relative; border-radius: 6px; overflow: hidden; box-shadow: 0 8px 30px rgba(0,0,0,.45); touch-action: none; background: #fff; }
.bv-c { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.bv-c2 { touch-action: none; }
.bv-go { position: absolute; min-width: 160px; max-width: 70%; padding: 0; margin: 0; border: 1px dashed #60a5fa; background: rgba(255,255,255,.65); font-family: "Google Sans Flex", system-ui, sans-serif; line-height: 1.25; resize: none; outline: none; overflow: hidden; z-index: 3; }
.bv.bv-toi .bv-go { background: rgba(0,0,0,.35); }
.bv-day { grid-column: -2 / -1; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.bv-trang { display: flex; align-items: center; gap: 4px; background: var(--l-o); border-radius: 10px; padding: 3px; }
.bv-so { font-size: 13px; font-weight: 600; padding: 0 10px; font-variant-numeric: tabular-nums; color: var(--l-chu); }
.bv-nut.bv-chu { width: auto; padding: 0 10px; gap: 6px; display: inline-flex; font: inherit; font-size: 13px; font-weight: 600; }
.bv-chon { display: inline-flex; align-items: center; gap: 4px; padding-left: 8px; color: var(--l-chu); }
.bv-chon select { background: transparent; border: 0; color: var(--l-chu); font: inherit; font-size: 13px; font-weight: 600; padding: 8px 4px; cursor: pointer; }
.bv-chon select option { color: #111; }

/* ---------- Điện thoại / máy hẹp ---------- */
@media (max-width: 900px) {
  .ltt-dai { width: 140px; }
}
@media (max-width: 760px) {
  .ltt-cho { grid-template-columns: 1fr; gap: 18px; align-items: start; }
  .ltt-cho-ben h2 { font-size: 21px; }
  .ltt-tren { height: 44px; padding: 0 6px 0 10px; }
  .ltt-tren-gio, .ltt-tren-mang { display: none; }
  .ltt-san { flex-direction: column; padding: 6px; gap: 6px; }
  .ltt-dai { width: auto; height: 76px; flex-direction: row; overflow-x: auto; overflow-y: hidden; }
  .ltt-dai > .ltt-o { width: auto; height: 100%; }
  .ltt-luoi { align-content: flex-start; overflow-y: auto; }
  .ltt-phong[data-mo="chat"] .ltt-ben, .ltt-phong[data-mo="nguoi"] .ltt-ben {
    position: fixed; inset: 44px 0 0 0; width: auto; z-index: 20; border: 0;
  }
  .ltt-ben-dau, .ltt-ben-noi { min-width: 0; }
  .ltt-duoi { padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); gap: 2px; }
  .ltt-duoi-giua { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; scrollbar-width: none; }
  .ltt-nut { min-width: 52px; padding: 6px 4px 5px; font-size: 10.5px; }
  .ltt-nut.phu { display: none; }
  .ltt-nut.do span { display: none; }
  .ltt-nut.do { min-width: 48px; padding-inline: 8px; }
  .bv, .bv.bv-chi-xem { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr) auto; }
  .bv-khung { grid-row: 2; }
  .bv-day { grid-row: 3; }
  .bv-cu { grid-row: 1; flex-direction: row; overflow-x: auto; overflow-y: hidden; }
  .bv-nhom { display: flex; flex-direction: row; }
  .bv-mau { display: flex; align-items: center; gap: 8px; padding: 0 8px; }
  .bv-day { grid-column: auto; }
  .bv-nut { width: 34px; height: 34px; }
  .ltt-phong[data-san="bang"] .ltt-san-nut { bottom: 96px; }
}
