/* Hộp "Chọn chế độ" (chon-che-do.js) — dùng chung kệ đề sách + trang /test — 28/10/2026 */
/* ===== Chọn chế độ (Luyện thi / Luyện tập) ở trang 1 cuốn — 28/10 theo mẫu chủ trung tâm gửi, màu rừng ===== */
.exm { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(46, 53, 40, .5); font-family: "Be Vietnam Pro", system-ui, sans-serif; color: #2E3528; }
.exm-box { position: relative; width: min(880px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 26px 28px 28px; border-radius: 8px; background: #FBF7EC; box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .55); }
.exm-x { position: absolute; top: 14px; right: 16px; width: 36px; height: 36px; border: 0; border-radius: 6px; background: transparent; font-size: 26px; line-height: 1; color: #6E6A5C; cursor: pointer; }
.exm-x:hover { background: #EFE8D6; }
.exm h3 { margin: 0; font: 700 22px/1.2 "Lora", Georgia, serif; color: #3A4A32; }
.exm-sub { margin: 4px 0 16px; color: #6E6A5C; font-weight: 600; }
.exm svg { width: 18px; height: 18px; flex: none; }
.exm-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 16px; border-radius: 6px; background: #EFE8D6; }
.exm-tabs button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; padding: 10px; border: 0; border-radius: 6px; background: transparent; color: #4A4A3E; font: 600 15px/1 "Be Vietnam Pro", sans-serif; cursor: pointer; }
.exm-tabs button.on { background: #FFFDF7; color: #3A4A32; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.exm-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.exm-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid #E2D8C0; border-radius: 6px; background: #FFFDF7; }
.exm-ch { display: flex; gap: 10px; align-items: center; }
.exm-ch b, .exm-bh b { display: block; font: 700 16px/1.25 "Lora", Georgia, serif; color: #3A4A32; }
.exm-ch small, .exm-bh small { display: block; margin-top: 2px; color: #6E6A5C; font-size: 13px; }
.exm-ic { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 6px; background: #EAF0DE; color: #3A4A32; }
.exm .exm-go, .exm .exm-start { display: inline-flex; justify-content: center; align-items: center; gap: 8px; }
.exm .exm-go svg, .exm .exm-start svg { width: 14px; height: 14px; }
.exm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.exm-chips span { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 6px; background: #F1ECDC; color: #3A4A32; font-size: 13px; font-weight: 700; }
.exm-chips svg { width: 14px; height: 14px; }
.exm-box2 { padding: 16px; border: 1px solid #C9C0A6; border-radius: 6px; background: #FFFDF7; }
.exm-bh { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.exm-bh .exm-start { margin-left: auto; }
.exm .exm-start:disabled { opacity: .45; cursor: not-allowed; }
.exm-parts h5 { margin: 12px 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #6E6A5C; }
.exm-pg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.exm-p { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid #E2D8C0; border-radius: 6px; background: #fff; cursor: pointer; font-weight: 600; }
.exm-p:hover { border-color: #5F6D45; }
.exm-p input { width: 17px; height: 17px; accent-color: #3A4A32; }
.exm-p em { margin-left: auto; font-style: normal; font-weight: 500; font-size: 13.5px; color: #6E6A5C; }
.exm-p.on { border-color: #3A4A32; background: #EAF0DE; }
.exm-p.all { margin-top: 4px; }
.exm-note { margin: 0 0 14px; padding: 12px 14px; border: 1px solid #D6DDC4; border-radius: 6px; background: #EEF2E3; color: #3A4A32; font-size: 14.5px; line-height: 1.55; }
@media (max-width: 720px) {
  .exm-cards { grid-template-columns: 1fr; }
  .exm-pg { grid-template-columns: 1fr; }
  .exm-box { padding: 20px 16px; }
}
.exm .exm-go, .exm .exm-start { padding: 11px 16px; border: 0; border-radius: 6px; background: #3A4A32; color: #FBF6EA; font: 700 15px/1 "Be Vietnam Pro", sans-serif; text-decoration: none; cursor: pointer; box-shadow: 0 2px 0 #26311F; }
.exm .exm-go:hover, .exm .exm-start:not(:disabled):hover { background: #4A5C40; }
.exm .exm-start:disabled { background: #B7BFA6; box-shadow: none; }
.exm-tabs button:focus-visible, .exm .exm-go:focus-visible, .exm .exm-start:focus-visible, .exm-x:focus-visible { outline: 2px solid #5F6D45; outline-offset: 2px; }
.exm-cards.one { grid-template-columns: minmax(0, 320px); }
/* 28/10: hộp Chọn chế độ gọn trong một màn hình laptop (không cuộn) — Part xếp 4 cột, thẻ thi và khoảng cách thu nhỏ */
.exm-box { padding: 18px 22px 20px; }
.exm h3 { font-size: 20px; }
.exm-sub { margin: 2px 0 10px; font-size: 14px; }
.exm-x { top: 10px; right: 12px; }
.exm-tabs { margin-bottom: 12px; }
.exm-tabs button { padding: 8px; font-size: 14.5px; }
.exm-cards { gap: 10px; margin-bottom: 10px; }
.exm-card { gap: 8px; padding: 11px 12px; }
.exm-ic { width: 32px; height: 32px; }
.exm-ch b, .exm-bh b { font-size: 15px; }
.exm-ch small, .exm-bh small { font-size: 12.5px; }
.exm .exm-go, .exm .exm-start { padding: 8px 14px; font-size: 14px; }
.exm-chips span { padding: 4px 8px; font-size: 12.5px; }
.exm-box2 { padding: 11px 12px; }
.exm-bh { margin-bottom: 2px; }
.exm-parts h5 { margin: 8px 0 5px; font-size: 11px; }
.exm-pg { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.exm-p { gap: 8px; padding: 8px 10px; font-size: 14px; }
.exm-p input { width: 15px; height: 15px; }
.exm-p em { font-size: 12.5px; }
.exm-note { margin-bottom: 10px; padding: 9px 12px; font-size: 13.5px; }
@media (max-width: 720px) { .exm-pg { grid-template-columns: 1fr 1fr; } }
.exm .exm-start:disabled { background: #DDE1D3 !important; color: #626B58 !important; box-shadow: none !important; }
.exm-hint { margin: 0 0 6px; color: #6E6A5C; font-size: 12.5px; }
.exm .exm-start:disabled { color: #4A5240 !important; }
.exm-hint { color: #5A5648; }
:is(.exm-tabs button, .exm .exm-go, .exm .exm-start, .exm-x):focus-visible { outline: 2px solid #3A4A32; outline-offset: 2px; }
.exm-p:has(input:focus-visible) { outline: 2px solid #3A4A32; outline-offset: 1px; }
@media (max-width: 520px) { .exm-bh { flex-wrap: wrap; } .exm-bh .exm-start { width: 100%; margin-left: 0; } }
/* 04/11: điện thoại – "Part 2 / 25 câu" không gãy dòng trong ô chọn Part */
.exm-p span, .exm-p em { white-space: nowrap; }
@media (max-width: 420px) { .exm-p { gap: 6px; padding: 8px 8px; } }
