/*
 * Module Sinh hoạt khoa học — Bs Phạm Minh Thành - BVĐK Hậu Lộc
 * Thiết kế ưu tiên điện thoại (mobile-first), mở rộng dần cho máy tính bảng và máy tính.
 * MỌI quy tắc đều nằm trong .shkh hoặc lớp có tiền tố shkh- → không ảnh hưởng giao diện site.
 * Đổi màu chủ đạo: chỉ cần sửa --shkh-chinh và --shkh-chinh-dam.
 */

.shkh {
    --shkh-chinh: #0b5ea8;
    --shkh-chinh-dam: #08487f;
    --shkh-chinh-nhat: #e8f1fa;
    --shkh-nen: #ffffff;
    --shkh-nen-phu: #f4f6f9;
    --shkh-vien: #dbe2ea;
    --shkh-chu: #1d2733;
    --shkh-chu-phu: #5a6878;
    --shkh-xanh: #17794a;
    --shkh-xanh-nhat: #e6f4ec;
    --shkh-cam: #9a5b00;
    --shkh-cam-nhat: #fff3e0;
    --shkh-do: #b3261e;
    --shkh-do-nhat: #fdecea;
    --shkh-bo: 12px;
    color: var(--shkh-chu);
    font-size: 16px;
    line-height: 1.55;
    -webkit-text-size-adjust: 100%;
    overflow-wrap: anywhere;
}
.shkh *, .shkh *::before, .shkh *::after { box-sizing: border-box; }
.shkh a { color: var(--shkh-chinh); }
.shkh a:focus-visible, .shkh button:focus-visible, .shkh input:focus-visible {
    outline: 3px solid var(--shkh-chinh);
    outline-offset: 2px;
}
.shkh h1, .shkh h2, .shkh p, .shkh dl, .shkh ul, .shkh figure { margin-top: 0; }

/* ---------- Điều hướng của module ----------
 * Điện thoại: thanh chia đều (biểu tượng trên, chữ ngắn dưới) — không bao giờ tràn ngang.
 * Màn rộng: biểu tượng + tên đầy đủ trên một dòng.
 */
.shkh-taikhoan { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 13px; line-height: 1.4; }
.shkh-taikhoan a { text-decoration: none; }
.shkh-taikhoan__ten { min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shkh-taikhoan__thoat { flex: none; padding-left: 10px; border-left: 1px solid var(--shkh-vien); color: var(--shkh-chu-phu) !important; }
.shkh-taikhoan__vao { font-weight: 600; }
.shkh-dieuhuong { margin: 0 0 14px; }
.shkh-menu {
    display: flex;
    gap: 4px;
    margin: 0;
    padding: 4px;
    list-style: none;
    border-radius: 14px;
    background: var(--shkh-nen-phu);
}
.shkh-menu li { flex: 1 1 0; min-width: 0; margin: 0; }
.shkh-menu a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    min-height: 52px;
    padding: 4px 2px;
    border-radius: 10px;
    color: var(--shkh-chu-phu) !important;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
}
.shkh-menu__bt { font-size: 19px; line-height: 1.1; }
.shkh-menu__ngan { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shkh-menu__day { display: none; }
.shkh-menu a[aria-current="page"] { background: var(--shkh-nen); color: var(--shkh-chinh-dam) !important; box-shadow: 0 1px 4px rgba(15, 23, 42, .14); }
.shkh-menu a[aria-current="page"] .shkh-menu__ngan { color: var(--shkh-chinh); }

/* ---------- Banner trang danh sách ---------- */
.shkh-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 14px;
    padding: 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, #1d4ed8 0%, #0ea5e9 100%);
    color: #fff;
    box-shadow: 0 6px 16px -10px rgba(29, 78, 216, .7);
}
.shkh-banner__bt {
    display: flex; align-items: center; justify-content: center;
    flex: 0 0 48px; height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .18);
    font-size: 26px;
}
.shkh-banner__chu { min-width: 0; }
.shkh .shkh-banner__nho { margin: 0 0 2px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.shkh .shkh-banner__ten { margin: 0; font-size: 20px; font-weight: 800; line-height: 1.25; color: #fff; }
.shkh .shkh-banner__mota {
    margin: 4px 0 0; font-size: 13.5px; line-height: 1.45; opacity: .92;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- Tiêu đề trang ---------- */
.shkh-dau { margin-bottom: 20px; }
.shkh-dau > .shkh-nhan { margin-bottom: 8px; }
.shkh .shkh-tieude { font-size: 24px; line-height: 1.3; margin-bottom: 8px; }
.shkh-gioithieu { color: var(--shkh-chu-phu); margin-bottom: 0; }
.shkh-trong {
    padding: 20px;
    border-radius: var(--shkh-bo);
    background: var(--shkh-nen-phu);
    color: var(--shkh-chu-phu);
    text-align: center;
}

/* ---------- Nhãn trạng thái ---------- */
.shkh-nhan {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.6;
    background: var(--shkh-nen-phu);
    color: var(--shkh-chu-phu);
}
.shkh-nhan--sap, .shkh-nhan--chua_mo { background: var(--shkh-chinh-nhat); color: var(--shkh-chinh-dam); }
.shkh-nhan--dang, .shkh-nhan--dang_mo { background: var(--shkh-xanh-nhat); color: var(--shkh-xanh); }

/* ---------- Thẻ buổi sinh hoạt ---------- */
.shkh-luoi { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 0 0 20px; padding: 0; list-style: none; }
.shkh-the { height: 100%; }
.shkh-the__lk {
    display: flex;
    gap: 14px;
    height: 100%;
    padding: 14px;
    border: 1px solid var(--shkh-vien);
    border-radius: var(--shkh-bo);
    background: var(--shkh-nen);
    color: inherit !important;
    text-decoration: none;
    transition: border-color .15s, box-shadow .15s;
}
.shkh-the__lk:hover { border-color: var(--shkh-chinh); box-shadow: 0 4px 14px rgba(11, 94, 168, .12); }
.shkh-ngay {
    flex: 0 0 58px;
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 4px;
    border-radius: 10px;
    background: var(--shkh-chinh-nhat);
    color: var(--shkh-chinh-dam);
    line-height: 1.1;
}
.shkh-ngay__d { font-size: 24px; font-weight: 700; }
.shkh-ngay__m { font-size: 12px; margin-top: 2px; }
.shkh-the__than { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.shkh .shkh-the__ten { font-size: 17px; line-height: 1.35; margin: 2px 0; color: var(--shkh-chu); }
.shkh-the__phu { font-size: 14px; color: var(--shkh-chu-phu); }

/* ---------- Phân trang (dùng HTML phân trang chuẩn của NukeViet) ---------- */
.shkh-phantrang { display: flex; justify-content: center; }
.shkh-phantrang a, .shkh-phantrang span, .shkh-phantrang strong { min-width: 44px; min-height: 44px; }

/* ---------- Chi tiết buổi ---------- */
.shkh-tt { display: grid; gap: 10px; margin: 16px 0 0; }
.shkh-tt > div { display: grid; gap: 2px; }
.shkh-tt dt { font-size: 13px; font-weight: 600; color: var(--shkh-chu-phu); text-transform: uppercase; letter-spacing: .02em; }
.shkh-tt dd { margin: 0; }
.shkh-ct__anh { margin: 0 0 20px; }
.shkh-ct__anh img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: var(--shkh-bo); }
.shkh-khoi { margin: 0 0 24px; }
.shkh .shkh-khoi__ten { font-size: 18px; margin-bottom: 12px; padding-bottom: 6px; border-bottom: 2px solid var(--shkh-chinh-nhat); }
.shkh-van img, .shkh-van iframe, .shkh-van video { max-width: 100%; height: auto; }
.shkh-van table { display: block; max-width: 100%; overflow-x: auto; }
.shkh-lui { margin-top: 8px; }

/* Bài kiểm tra */
.shkh-bai {
    display: grid;
    gap: 8px;
    margin-bottom: 10px;
    padding: 14px;
    border: 1px solid var(--shkh-vien);
    border-radius: var(--shkh-bo);
}
.shkh-bai__dau { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: space-between; }
.shkh-bai__phu, .shkh-lydo { margin: 0; font-size: 14px; color: var(--shkh-chu-phu); }
.shkh-lydo { color: var(--shkh-cam); }

/* Tài liệu */
.shkh-tl { margin: 0; padding: 0; list-style: none; }
.shkh-tl__muc {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 10px 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--shkh-vien);
}
.shkh-tl__duoi {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    border-radius: 10px;
    background: var(--shkh-do-nhat);
    color: var(--shkh-do);
    font-size: 11px;
    font-weight: 700;
}
.shkh-tl__ten { min-width: 0; font-weight: 600; }
.shkh-tl__ten small { display: block; font-weight: 400; font-size: 13px; color: var(--shkh-chu-phu); }
.shkh-tl__nut { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.shkh-khoa { font-size: 14px; color: var(--shkh-chu-phu); }
.shkh-khoa::before { content: "🔒 "; }

/* ---------- Nút ---------- */
.shkh-nut {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border: 2px solid var(--shkh-chinh);
    border-radius: 10px;
    background: var(--shkh-chinh);
    color: #fff !important;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s;
}
.shkh-nut:hover { background: var(--shkh-chinh-dam); border-color: var(--shkh-chinh-dam); }
.shkh-nut:disabled { opacity: .6; cursor: wait; }
.shkh-nut--nho { min-height: 44px; padding: 0 16px; font-size: 15px; }
.shkh-nut--vien { background: transparent; color: var(--shkh-chinh) !important; }
.shkh-nut--vien:hover { background: var(--shkh-chinh-nhat); }
.shkh-nut--rong { width: 100%; margin-top: 8px; }

/* ---------- Biểu mẫu ---------- */
.shkh-hop { max-width: 420px; margin: 0 auto; }
.shkh-hop--giua { text-align: center; }
.shkh-form { display: grid; gap: 6px; margin: 16px 0; }
.shkh-truong { font-weight: 600; margin-top: 8px; }
.shkh-o {
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid var(--shkh-vien);
    border-radius: 10px;
    background: var(--shkh-nen);
    color: var(--shkh-chu);
    font: inherit;
    font-size: 16px; /* ≥16px để iPhone không tự phóng to khi gõ */
}
.shkh-o:focus { border-color: var(--shkh-chinh); outline: none; box-shadow: 0 0 0 3px var(--shkh-chinh-nhat); }
.shkh-mk { position: relative; display: block; }
.shkh-mk .shkh-o { padding-right: 72px; }
.shkh-mk__nut {
    position: absolute;
    top: 2px;
    right: 2px;
    bottom: 2px;
    min-width: 64px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--shkh-chinh);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.shkh-ghichu { font-size: 14px; color: var(--shkh-chu-phu); }
.shkh-bao { padding: 12px 14px; border-radius: 10px; margin: 12px 0; }
.shkh-bao--loi { background: var(--shkh-do-nhat); color: var(--shkh-do); }
.shkh-bao--canh { background: var(--shkh-cam-nhat); color: var(--shkh-cam); }
.shkh-bao--tin { background: var(--shkh-chinh-nhat); color: var(--shkh-chinh-dam); }
.shkh-bao--xong { background: var(--shkh-xanh-nhat); color: var(--shkh-xanh); }

.shkh-ds { margin: 0; padding: 0; list-style: none; }
.shkh-ds li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--shkh-vien); }
.shkh-ds time { flex: 0 0 auto; color: var(--shkh-chu-phu); font-size: 14px; }

/* ---------- Máy tính bảng trở lên ---------- */
@media (min-width: 640px) {
    .shkh-menu { display: inline-flex; }
    .shkh-menu li { flex: none; }
    .shkh-menu a { flex-direction: row; gap: 6px; min-height: 42px; padding: 0 16px; font-size: 15px; }
    .shkh-menu__bt { font-size: 16px; }
    .shkh-menu__ngan { display: none; }
    .shkh-menu__day { display: inline; }
    .shkh-banner { padding: 18px 20px; }
    .shkh .shkh-banner__ten { font-size: 24px; }
    .shkh .shkh-banner__mota { -webkit-line-clamp: 3; }
    .shkh .shkh-tieude { font-size: 28px; }
    .shkh-luoi { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
    .shkh-tt { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
    .shkh-bai { grid-template-columns: 1fr auto; align-items: center; }
    .shkh-bai__dau, .shkh-bai__phu, .shkh-lydo { grid-column: 1; }
    .shkh-bai__dau { justify-content: flex-start; }
    .shkh-bai .shkh-nut, .shkh-bai__nuts { grid-column: 2; grid-row: 1 / span 3; }
    .shkh-tl__muc { grid-template-columns: 48px 1fr auto; }
    .shkh-tl__nut { grid-column: auto; justify-content: flex-end; }
}

/* ---------- Thông báo kết quả (điểm danh QR…) ---------- */
.shkh-tb__bt {
    width: 72px; height: 72px; margin: 8px auto 16px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 40px; font-weight: 700; color: #fff; background: var(--shkh-cam);
}
.shkh-tb--xong .shkh-tb__bt { background: var(--shkh-xanh); }

/* ---------- Điểm danh: chọn buổi ---------- */
.shkh-ds--the li { display: block; padding: 0; border: 0; margin-bottom: 10px; }
.shkh-ds--the a {
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
    padding: 14px; border: 1px solid var(--shkh-vien); border-radius: var(--shkh-bo);
    color: var(--shkh-chu) !important; text-decoration: none;
}
.shkh-ds--the a:hover { border-color: var(--shkh-chinh); }
.shkh-ds--the small { color: var(--shkh-chu-phu); font-size: 14px; }

/* ---------- Điểm danh: tích tay ---------- */
.shkh-dd-nut { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.shkh-dd-nut .shkh-nut { flex: 1 1 160px; }
.shkh-dd-loc {
    position: sticky; top: 0; z-index: 5; display: grid; gap: 8px;
    padding: 10px 0; background: var(--shkh-nen); border-bottom: 1px solid var(--shkh-vien);
}
.shkh-dd-tatca { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; }
.shkh-dd-tatca input, .shkh-dd-ds input[type=checkbox] { width: 24px; height: 24px; flex: 0 0 24px; accent-color: var(--shkh-chinh); }
.shkh-dd-dem { margin: 0; color: var(--shkh-chu-phu); }
.shkh-dd-dem strong { color: var(--shkh-chinh); font-size: 1.2em; }
.shkh-dd-ds { margin: 0; padding: 0; list-style: none; }
.shkh-dd-ds li[hidden] { display: none; }
.shkh-dd-ds label {
    display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 4px;
    border-bottom: 1px solid var(--shkh-vien); cursor: pointer;
}
.shkh-dd-ds label:has(input:checked) { background: var(--shkh-xanh-nhat); }
.shkh-dd-ten { flex: 1; min-width: 0; font-weight: 600; }
.shkh-dd-ten small { display: block; font-weight: 400; font-size: 13px; color: var(--shkh-chu-phu); }
.shkh-dd-gc { flex: 0 0 auto; font-size: 12px; color: var(--shkh-xanh); text-align: right; }
.shkh-dd-luu { position: sticky; bottom: 0; padding: 10px 0 4px; background: linear-gradient(transparent, var(--shkh-nen) 30%); }

/* ---------- Màn hình chiếu mã QR ---------- */
.shkh-qr {
    min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: space-between;
    gap: 16px; padding: 16px; text-align: center; background: #fff;
}
.shkh-qr__dau h1 { font-size: clamp(19.2px, 3.5vw, 38.4px); margin: 0 0 4px; line-height: 1.25; }
.shkh-qr__dau p { margin: 0; color: var(--shkh-chu-phu); font-size: clamp(16px, 2vw, 22.4px); }
.shkh-qr__khung { width: min(78vh, 92vw, 640px); }
.shkh-qr__ma { aspect-ratio: 1; background: #fff; }
.shkh-qr__ma svg { width: 100%; height: 100%; display: block; }
.shkh-qr--tat .shkh-qr__ma { aspect-ratio: auto; }
.shkh-qr__thanh { height: 8px; margin: 12px 0; border-radius: 4px; background: var(--shkh-nen-phu); overflow: hidden; }
.shkh-qr__thanh span { display: block; height: 100%; width: 100%; background: var(--shkh-chinh); }
.shkh-qr--tat .shkh-qr__thanh { visibility: hidden; }
.shkh-qr__hd { font-size: clamp(16px, 2.4vw, 25.6px); font-weight: 600; margin: 0; }
.shkh-qr__dem { font-size: clamp(17.6px, 2.6vw, 28.8px); margin: 0; }
.shkh-qr__dem strong { color: var(--shkh-xanh); font-size: 1.4em; }
.shkh-qr__moi { color: var(--shkh-chu-phu); margin: 4px 0 8px; min-height: 1.5em; }
.shkh-qr__lui { font-size: 14px; color: var(--shkh-chu-phu) !important; }

@media (min-width: 640px) {
    .shkh-dd-loc { grid-template-columns: 1fr 1fr; }
    .shkh-dd-tatca, .shkh-dd-dem { grid-column: span 1; }
}

/* ================= LÀM BÀI ================= */
.shkh-an { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.shkh-lb-gt__buoi { margin: 0 0 4px; font-size: 14px; color: var(--shkh-chu-phu); }
.shkh-lb-gt__so { display: flex; gap: 12px; margin: 16px 0 8px; padding: 0; list-style: none; }
.shkh-lb-gt__so li { flex: 1; padding: 14px 8px; border-radius: var(--shkh-bo); background: var(--shkh-chinh-nhat); text-align: center; }
.shkh-lb-gt__so strong { display: block; font-size: 30px; line-height: 1.1; color: var(--shkh-chinh-dam); }
.shkh-lb-gt__so span { font-size: 14px; color: var(--shkh-chinh-dam); }
.shkh-lb-gt__luot { margin: 0 0 8px; font-weight: 600; text-align: center; }
.shkh-lb-gt__luat { margin: 16px 0; padding-left: 20px; font-size: 15px; color: var(--shkh-chu-phu); }
.shkh-lb-gt__luat li { margin-bottom: 6px; }

.shkh-lb-thanh {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 -4px 8px;
    padding: 8px 4px;
    background: var(--shkh-nen);
    border-bottom: 1px solid var(--shkh-vien);
    box-shadow: 0 6px 12px -10px rgba(0, 0, 0, .35);
}
.shkh-lb-gio {
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 10px;
    background: var(--shkh-chinh-nhat);
    color: var(--shkh-chinh-dam);
    font-size: 20px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.shkh-lb-gio--sap { background: var(--shkh-do-nhat); color: var(--shkh-do); animation: shkh-nhay 1s steps(2) infinite; }
@keyframes shkh-nhay { 50% { opacity: .55; } }
.shkh-lb-dem {
    flex: 1;
    min-height: 44px;
    border: 1px solid var(--shkh-vien);
    border-radius: 10px;
    background: var(--shkh-nen);
    color: var(--shkh-chu);
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
.shkh-lb-oso { margin: 0 0 12px; padding: 12px; border: 1px solid var(--shkh-vien); border-radius: var(--shkh-bo); background: var(--shkh-nen-phu); }
.shkh-lb-oso[hidden] { display: none; }
.shkh-lb-oso__luoi { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.shkh-lb-oso__luoi a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    border: 1px solid var(--shkh-vien);
    border-radius: 8px;
    background: var(--shkh-nen);
    color: var(--shkh-chu) !important;
    font-weight: 600;
    text-decoration: none;
}
.shkh-lb-oso__luoi a:not(.shkh-xong) { border-color: #e8a5a0; color: var(--shkh-do) !important; }
.shkh-lb-oso__luoi a.shkh-xong { background: var(--shkh-chinh); border-color: var(--shkh-chinh); color: #fff !important; }
.shkh-lb-luu { min-height: 20px; margin: 0 0 8px; font-size: 13px; color: var(--shkh-xanh); }
.shkh-lb-luu--loi { color: var(--shkh-cam); }
.shkh-lb-dau { margin-bottom: 12px; }

.shkh-lb-ds { margin: 0 0 20px; padding: 0; list-style: none; }
.shkh-cau {
    margin-bottom: 14px;
    padding: 14px;
    border: 1px solid var(--shkh-vien);
    border-left: 4px solid var(--shkh-vien);
    border-radius: var(--shkh-bo);
    background: var(--shkh-nen);
    scroll-margin-top: 72px;
}
.shkh-cau--xong { border-left-color: var(--shkh-chinh); }
.shkh-cau fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.shkh-cau__dau { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; width: 100%; margin: 0 0 8px; padding: 0; border: 0; font-size: 14px; }
.shkh-cau__so { font-weight: 700; color: var(--shkh-chinh-dam); }
.shkh-cau__loai { color: var(--shkh-chu-phu); }
.shkh-cau__nd { margin-bottom: 12px; font-size: calc(17px * var(--shkh-co, 1)); font-weight: 600; line-height: 1.5; }
.shkh-cau__anh, .shkh-lc__nd img, .shkh-sx__nd img { display: block; max-width: 100%; height: auto; margin: 8px 0; border-radius: 8px; }
.shkh-cau__am, .shkh-lc__nd audio, .shkh-sx__nd audio { display: block; width: 100%; margin: 8px 0; }

.shkh-lcs { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.shkh-lc {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 48px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid var(--shkh-vien);
    border-radius: 10px;
    background: var(--shkh-nen);
    font-weight: 400;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.shkh-lc input { position: absolute; opacity: 0; pointer-events: none; }
.shkh-lc__ky {
    flex: 0 0 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    border: 2px solid var(--shkh-vien);
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    color: var(--shkh-chu-phu);
}
.shkh-cau[data-loai="2"] .shkh-lc__ky { border-radius: 6px; }
.shkh-lc__nd { flex: 1; min-width: 0; padding-top: 3px; font-size: calc(16px * var(--shkh-co, 1)); }
label.shkh-lc.shkh-lc--chon, label.shkh-lc:has(input:checked) { border-color: var(--shkh-chinh); background: var(--shkh-chinh-nhat); }
.shkh-lc input:checked + .shkh-lc__ky { border-color: var(--shkh-chinh); background: var(--shkh-chinh); color: #fff; }
.shkh-lc input:focus-visible + .shkh-lc__ky { outline: 3px solid var(--shkh-chinh); outline-offset: 2px; }

.shkh-sx { display: grid; gap: 8px; margin: 0 0 8px; padding: 0; list-style: none; counter-reset: shkh-sx; }
.shkh-sx__muc {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 8px 8px 12px;
    border: 1px solid var(--shkh-vien);
    border-radius: 10px;
    background: var(--shkh-nen);
    counter-increment: shkh-sx;
}
.shkh-sx__muc--vua { animation: shkh-vua .5s ease-out; }
@keyframes shkh-vua { from { background: var(--shkh-chinh-nhat); } to { background: var(--shkh-nen); } }
.shkh-sx__so::before { content: counter(shkh-sx); display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--shkh-nen-phu); font-weight: 700; color: var(--shkh-chinh-dam); }
.shkh-sx__nd { flex: 1; min-width: 0; }
.shkh-sx__nut { display: flex; flex-direction: column; gap: 4px; }
.shkh-sx__nut button {
    width: 44px;
    height: 36px;
    border: 1px solid var(--shkh-vien);
    border-radius: 8px;
    background: var(--shkh-nen-phu);
    color: var(--shkh-chinh-dam);
    font-size: 14px;
    cursor: pointer;
}
.shkh-sx__muc:first-child [data-shkh-len], .shkh-sx__muc:last-child [data-shkh-xuong] { visibility: hidden; }
.shkh-sx__xn { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 15px; font-weight: 400; color: var(--shkh-chu-phu); }
.shkh-sx__xn input { width: 22px; height: 22px; margin: 0; }

.shkh-ht { width: min(92vw, 420px); padding: 20px; border: 0; border-radius: 16px; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); color: var(--shkh-chu); }
.shkh-ht::backdrop { background: rgba(15, 25, 40, .55); }
.shkh-ht h2 { margin: 0 0 8px; font-size: 20px; }
.shkh-ht__nut { display: flex; gap: 10px; margin-top: 16px; }
.shkh-ht__nut .shkh-nut { flex: 1; padding: 0 12px; }

/* ================= KẾT QUẢ ================= */
.shkh-kq-the { margin-bottom: 20px; padding: 20px 16px; border-radius: 16px; background: var(--shkh-chinh-nhat); text-align: center; }
.shkh-kq-diem { margin: 0; color: var(--shkh-chinh-dam); line-height: 1; }
.shkh-kq-diem strong { font-size: 56px; font-weight: 800; }
.shkh-kq-diem span { font-size: 22px; font-weight: 600; }
.shkh-kq-phu { margin: 8px 0; color: var(--shkh-chu-phu); }
.shkh-kq-the .shkh-nhan { margin: 4px 0 0; }
.shkh-kq-ss { margin: 12px 0 0; font-weight: 600; color: var(--shkh-xanh); }
.shkh-kq-hang { margin: 8px 0 0; font-size: 18px; font-weight: 700; color: var(--shkh-chinh-dam); }
.shkh-kq-nut { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.shkh-kq-luots { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.shkh-kq-luot { display: flex; flex-direction: column; padding: 10px 12px; border: 1px solid var(--shkh-vien); border-radius: 10px; color: var(--shkh-chu) !important; text-decoration: none; }
.shkh-kq-luot span { font-size: 13px; color: var(--shkh-chu-phu); }
.shkh-kq-luot strong { font-size: 24px; }
.shkh-kq-luot small { font-size: 13px; color: var(--shkh-chu-phu); }
.shkh-kq-luot--xem { border-color: var(--shkh-chinh); box-shadow: 0 0 0 1px var(--shkh-chinh) inset; }
.shkh-cau--dung { border-left-color: var(--shkh-xanh); }
.shkh-cau--sai { border-left-color: var(--shkh-do); }
.shkh-cau--bo { border-left-color: var(--shkh-cam); }
.shkh-kq-nhan--dung { background: var(--shkh-xanh-nhat); color: var(--shkh-xanh); }
.shkh-kq-nhan--sai { background: var(--shkh-do-nhat); color: var(--shkh-do); }
.shkh-kq-nhan--bo { background: var(--shkh-cam-nhat); color: var(--shkh-cam); }
li.shkh-lc { cursor: default; }
.shkh-lc--dung { border-color: var(--shkh-xanh); background: var(--shkh-xanh-nhat); }
.shkh-lc--dung .shkh-lc__ky { border-color: var(--shkh-xanh); background: var(--shkh-xanh); color: #fff; }
.shkh-lc--sai { border-color: var(--shkh-do); background: var(--shkh-do-nhat); }
.shkh-lc--sai .shkh-lc__ky { border-color: var(--shkh-do); color: var(--shkh-do); }
.shkh-lc__gc { display: block; margin-top: 2px; font-size: 13px; font-weight: 600; color: var(--shkh-chu-phu); }
.shkh-loigiai { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--shkh-nen-phu); font-size: 15px; }

/* ================= XẾP HẠNG ================= */
.shkh-xh-chon { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.shkh-xh-chon .shkh-o { flex: 1 1 220px; width: auto; }
.shkh-xh-tab {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--shkh-nen-phu);
    color: var(--shkh-chu) !important;
    font-weight: 600;
    text-decoration: none;
}
.shkh-xh-tab[aria-current] { background: var(--shkh-chinh); color: #fff !important; }
.shkh-xh-loc { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-bottom: 12px; font-size: 15px; }
.shkh-xh-loc > a { padding: 6px 2px; color: var(--shkh-chu-phu) !important; text-decoration: none; border-bottom: 2px solid transparent; }
.shkh-xh-loc > a[aria-current] { color: var(--shkh-chinh-dam) !important; font-weight: 700; border-bottom-color: var(--shkh-chinh); }
.shkh-xh-nam { margin-left: auto; }
.shkh-xh-nam .shkh-o { min-height: 40px; padding: 6px 10px; }
.shkh-khoi__ten small { font-size: 13px; font-weight: 400; color: var(--shkh-chu-phu); }
.shkh-xh-ds { margin: 0; padding: 0; list-style: none; }
.shkh-xh-dong { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-bottom: 1px solid var(--shkh-vien); }
.shkh-xh-hang {
    flex: 0 0 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    border-radius: 50%;
    background: var(--shkh-nen-phu);
    font-weight: 700;
    color: var(--shkh-chu-phu);
}
.shkh-xh-dong--top1 .shkh-xh-hang { background: #f6c343; color: #5c4300; }
.shkh-xh-dong--top2 .shkh-xh-hang { background: #cfd6de; color: #39424c; }
.shkh-xh-dong--top3 .shkh-xh-hang { background: #e2a878; color: #5a3014; }
.shkh-xh-ten { flex: 1; min-width: 0; font-weight: 600; }
.shkh-xh-ten small, .shkh-xh-diem small { display: block; font-size: 13px; font-weight: 400; color: var(--shkh-chu-phu); }
.shkh-xh-diem { flex: 0 0 auto; text-align: right; font-size: 18px; font-weight: 700; color: var(--shkh-chinh-dam); }
.shkh-xh-dong--toi { border-radius: 10px; background: var(--shkh-cam-nhat); }
.shkh-xh-cd { margin: 16px 0 4px; font-size: 15px; color: var(--shkh-chu-phu); }
.shkh-ds li small { color: var(--shkh-chu-phu); font-size: 14px; }
.shkh-ds li.shkh-ch-buoi { align-items: center; }
.shkh-ch-buoi small { display: block; }
.shkh-ch-diem { flex: 0 0 auto; text-align: right; font-size: 14px; white-space: nowrap; }
.shkh-ch-diem a { text-decoration: none; }

@media (min-width: 640px) {
    .shkh-lb-thanh { margin: 0 0 12px; padding: 10px 0; }
    .shkh-lcs { gap: 10px; }
}

/* =====================================================================
 * GIAO DIỆN THEO ỨNG DỤNG CŨ: thẻ buổi gập/mở, viên thông tin, lịch,
 * hướng dẫn, bài báo cáo, khung xem tài liệu, thanh làm bài
 * ===================================================================== */
.shkh-thuonghieu { margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--shkh-chinh); }
.shkh-ds-the { display: grid; gap: 12px; margin: 0 0 20px; padding: 0; list-style: none; }
.shkh-ds-the > li { margin: 0; }

.shkh-the2 {
    border: 1px solid var(--shkh-vien);
    border-left: 5px solid #0ea5e9;
    border-radius: var(--shkh-bo);
    background: var(--shkh-nen);
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
}
.shkh-the2--dong, .shkh-the2--khong { border-left-color: #94a3b8; }
.shkh-the2--sap { border-left-color: #f59e0b; }
.shkh-the2--mo { border-left-color: #10b981; }
.shkh-the2__dau { display: block; padding: 12px 14px; cursor: pointer; list-style: none; }
.shkh-the2__dau::-webkit-details-marker { display: none; }
.shkh-the2__dong1 { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--shkh-chu-phu); }
.shkh-the2__dong1 strong { color: var(--shkh-chu); }
.shkh-the2__mui { margin-left: auto; font-size: 16px; transition: transform .2s; }
.shkh-the2[open] .shkh-the2__mui { transform: rotate(180deg); }
.shkh-the2__ten { display: block; margin-top: 4px; font-size: 17px; font-weight: 700; line-height: 1.4; text-transform: uppercase; }
.shkh-the2__than { padding: 0 14px 14px; border-top: 1px dashed var(--shkh-vien); }
.shkh-the2__phu { margin: 6px 0; font-size: 14px; color: var(--shkh-chu-phu); }
.shkh-the2__nut { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.shkh-mau0 { color: #059669; } .shkh-mau1 { color: #7c3aed; } .shkh-mau2 { color: #db2777; } .shkh-mau3 { color: #ea580c; }
.shkh-mau4 { color: #4f46e5; } .shkh-mau5 { color: #b91c1c; } .shkh-mau6 { color: #0f766e; } .shkh-mau7 { color: #c2410c; }

.shkh-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 6px; }
.shkh-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.shkh-pill--cau { background: #e0f2fe; color: #0369a1; }
.shkh-pill--phut { background: #fef3c7; color: #92400e; }
.shkh-pill--nop { background: #ede9fe; color: #5b21b6; }

.shkh-lich { margin: 6px 0; padding: 8px 10px; border-radius: 8px; background: var(--shkh-nen-phu); font-size: 14px; }
.shkh-lich__ten { font-weight: 700; }
.shkh-lich__ten--pre { color: #7c3aed; }
.shkh-lich__ten--post { color: #0369a1; }
.shkh .shkh-do { color: var(--shkh-do); }
.shkh .shkh-chu-xanh { color: var(--shkh-chinh); }

.shkh-nut--mo { background: #059669; border-color: #059669; }
.shkh-nut--mo:hover { background: #047857; border-color: #047857; }
.shkh-nut--sap { background: #f59e0b; border-color: #f59e0b; color: #1f2937 !important; }
.shkh-nut--sap:hover { background: #d97706; border-color: #d97706; }
.shkh-nut--tat, .shkh-nut--tat:hover { background: #e2e8f0; border-color: #e2e8f0; color: #64748b !important; cursor: default; }

.shkh-nhan--pre { background: #ede9fe; color: #5b21b6; }
.shkh-nhan--post { background: #e0f2fe; color: #0369a1; }

.shkh-bai__nuts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }

.shkh-huongdan { margin: 8px 0 20px; border: 1px solid var(--shkh-vien); border-radius: var(--shkh-bo); background: var(--shkh-nen); }
.shkh-huongdan > summary { padding: 12px 14px; font-weight: 700; cursor: pointer; }
.shkh-huongdan__than { padding: 0 14px 12px; }
.shkh .shkh-huongdan h2 { margin: 12px 0 6px; font-size: 16px; }
.shkh-huongdan ol { margin: 0 0 8px; padding-left: 22px; }
.shkh-huongdan li { margin: 4px 0; }

.shkh-bc { padding: 12px 14px; border: 1px solid var(--shkh-vien); border-left: 5px solid #2563eb; border-radius: var(--shkh-bo); background: var(--shkh-nen); }
.shkh-bc__ten { margin: 0 0 4px; font-size: 16px; font-weight: 700; }
.shkh-bc__duoi { display: grid; gap: 8px; margin-top: 8px; }
.shkh-bc__tt { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; color: var(--shkh-chu-phu); }

/* Khung xem tài liệu toàn màn hình (gắn vào body, ngoài .shkh) */
.shkh-xemtl { position: fixed; inset: 0; z-index: 100000; display: flex; flex-direction: column; background: #0f172a; }
.shkh-xemtl__dau { display: flex; align-items: center; gap: 8px; padding: 8px 10px; color: #fff; font: 600 15px/1.4 system-ui, sans-serif; }
.shkh-xemtl__dau span { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.shkh-xemtl__dau a, .shkh-xemtl__dau button {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border: 0; border-radius: 8px;
    background: rgba(255, 255, 255, .14); color: #fff; font-size: 20px; text-decoration: none; cursor: pointer;
}
.shkh-xemtl iframe { flex: 1; width: 100%; border: 0; background: #fff; }

/* Thanh làm bài: cỡ chữ, thông tin thí sinh */
.shkh-lb-co { display: inline-flex; border: 1px solid var(--shkh-vien); border-radius: 10px; overflow: hidden; }
.shkh-lb-co button { min-width: 40px; min-height: 42px; border: 0; background: var(--shkh-nen); color: var(--shkh-chu); font: 700 14px/1 system-ui, sans-serif; cursor: pointer; }
.shkh-lb-co button + button { border-left: 1px solid var(--shkh-vien); }
.shkh-lb-dem__chu { display: none; }
.shkh-lb-thongtin { margin: 0 0 12px; padding: 12px 14px; border-radius: var(--shkh-bo); background: linear-gradient(135deg, #2563eb, #0ea5e9); color: #fff; }
.shkh .shkh-lb-thongtin__ten { margin: 0 0 8px; font-size: 18px; line-height: 1.35; color: #fff; }
.shkh-lb-thongtin__the { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.shkh-lb-thongtin .shkh-nhan { background: rgba(255, 255, 255, .2); color: #fff; }
.shkh-lb-ds { -webkit-user-select: none; user-select: none; }
.shkh-lb-ds input, .shkh-lb-ds textarea { -webkit-user-select: auto; user-select: auto; }

@media (min-width: 640px) {
    .shkh-bc__duoi { grid-template-columns: 1fr auto; align-items: center; }
    .shkh-lb-dem__chu { display: inline; }
    .shkh-the2__ten { font-size: 18px; }
}
@media (min-width: 960px) {
    .shkh-ds-the { grid-template-columns: repeat(2, 1fr); align-items: start; }
    .shkh-ds-the > .shkh-bc { grid-column: 1 / -1; }
}

/* Tab trang xếp hạng */
.shkh-tabs { display: flex; gap: 4px; margin: 0 0 12px; padding: 4px; border-radius: 12px; background: var(--shkh-nen-phu); }
.shkh-tabs a { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 8px; border-radius: 9px; font-size: 15px; font-weight: 600; color: var(--shkh-chu-phu) !important; text-decoration: none; text-align: center; }
.shkh-tabs a[aria-current] { background: var(--shkh-nen); color: var(--shkh-chinh-dam) !important; box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }

/* Bảng xếp hạng / lịch sử */
.shkh-bang-cuon { margin: 0 0 12px; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--shkh-vien); border-radius: var(--shkh-bo); background: var(--shkh-nen); }
.shkh-bxh { width: 100%; border-collapse: collapse; font-size: 14px; }
.shkh-bxh th { position: sticky; top: 0; padding: 10px 8px; background: #1e3a8a; color: #fff; font-size: 13px; font-weight: 600; text-align: left; white-space: nowrap; }
.shkh-bxh td { padding: 9px 8px; border-top: 1px solid var(--shkh-vien); vertical-align: middle; }
.shkh-bxh tbody tr:nth-child(even) td { background: #f8fafc; }
.shkh-bxh .shkh-so { text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.shkh-bxh td small { display: block; font-size: 12px; color: var(--shkh-chu-phu); }
.shkh-bxh__hang { width: 44px; text-align: center !important; font-weight: 700; }
.shkh-bxh__huy { font-size: 22px; line-height: 1; }
.shkh-bxh td.shkh-bxh__diem { font-size: 16px; font-weight: 800; color: #1d4ed8; }
.shkh-bxh .shkh-mo { color: var(--shkh-chu-phu); }
.shkh-bxh--top1 td { background: #fffbeb !important; }
.shkh-bxh--top2 td { background: #f8fafc !important; }
.shkh-bxh--top3 td { background: #fff7ed !important; }
.shkh-bxh--toi td { background: #fef3c7 !important; }
.shkh-bxh--toi td:first-child { box-shadow: inset 4px 0 0 #f59e0b; }
.shkh-bxh__tach td { padding: 2px; text-align: center; color: var(--shkh-chu-phu); }
.shkh-cot-rong { display: none; }
.shkh-nhan--do { background: var(--shkh-do-nhat); color: var(--shkh-do); }

/* Hồ sơ: ô thống kê */
.shkh-hoso { display: flex; align-items: center; gap: 12px; }
.shkh-hoso__anh { display: flex; align-items: center; justify-content: center; flex: 0 0 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #2563eb, #0ea5e9); font-size: 28px; }
.shkh-hoso .shkh-tieude, .shkh-hoso .shkh-gioithieu { margin-bottom: 2px; text-align: left; }
.shkh-tk { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0 0 16px; padding: 0; list-style: none; }
.shkh-tk li { padding: 14px 10px; border-radius: var(--shkh-bo); text-align: center; color: #fff; }
.shkh-tk strong { display: block; font-size: 26px; line-height: 1.2; }
.shkh-tk span { font-size: 13px; opacity: .92; }
.shkh-tk--xanh { background: linear-gradient(135deg, #2563eb, #3b82f6); }
.shkh-tk--tim { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.shkh-tk--luc { background: linear-gradient(135deg, #059669, #10b981); }
.shkh-tk--cam { background: linear-gradient(135deg, #ea580c, #f59e0b); }

/* Kết quả: so sánh Pre → Post */
.shkh-ss { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 12px 0 0; }
.shkh-ss__o { min-width: 84px; padding: 8px 12px; border-radius: 10px; background: var(--shkh-nen-phu); text-align: center; }
.shkh-ss__o small { display: block; font-size: 12px; color: var(--shkh-chu-phu); }
.shkh-ss__o strong { font-size: 20px; }
.shkh-ss__mui { font-weight: 800; white-space: nowrap; }
.shkh-ss__mui--len { color: var(--shkh-xanh); }
.shkh-ss__mui--xuong { color: var(--shkh-do); }
.shkh-ss__mui--bang { color: var(--shkh-chu-phu); }

@media (min-width: 640px) {
    .shkh-cot-rong { display: table-cell; }
    .shkh-bxh .shkh-bxh__khoa { display: none; }
    .shkh-ls .shkh-bxh__khoa { display: block; }
    .shkh-tk { grid-template-columns: repeat(4, 1fr); }
    .shkh-bxh { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
    .shkh *, .shkh *::before, .shkh *::after { transition: none !important; animation: none !important; }
}

@media print {
    .shkh-lb-thanh, .shkh-ht,
    .shkh-dieuhuong, .shkh-taikhoan, .shkh-tl__nut, .shkh-bai .shkh-nut, .shkh-bai__nuts, .shkh-the2__nut, .shkh-lui { display: none !important; }
}
