/* ============================================
   datepicker-vn.css — bộ chọn ngày kiểu Việt Nam
   Dùng lại biến màu của styles.css nên tự khớp cả nền sáng lẫn nền tối.
   ============================================ */

/* Ô <input type="date"> gốc vẫn nằm trong trang để mã cũ đọc/ghi được,
   chỉ ẩn khỏi mắt. Không dùng display:none vì vài trình duyệt bỏ qua
   thuộc tính của ô ẩn hoàn toàn. */
.dpvn-native {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    border: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    overflow: hidden;
    white-space: nowrap;
    pointer-events: none;
}

.dpvn { position: relative; }

/* Chu goi y "Ngay / thang / nam" chi can khi con dung o <input type="date">
   tho. Nhan moi da ghi "Thu Ba, 15/09/2026" nen dong goi y thanh thua. */
.filter-field:has(.dpvn) .filter-date-hint,
.vietlott-filter-field:has(.dpvn) .filter-date-hint { display: none; }

.dpvn-hang {
    display: flex;
    align-items: stretch;
    gap: 6px;
}

.dpvn-buoc {
    flex: 0 0 auto;
    width: 34px;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    background: var(--bg-panel);
    color: var(--text);
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}
.dpvn-buoc:hover:not(:disabled) { background: var(--bg-item-hover); border-color: var(--border-active); }
.dpvn-buoc:disabled { opacity: .35; cursor: not-allowed; }

.dpvn-o {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    background: var(--bg-panel);
    color: var(--text);
    font: inherit;
    font-size: 13.5px;
    text-align: left;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}
.dpvn-o::after {
    content: "";
    flex: 0 0 auto;
    width: 15px;
    height: 15px;
    background: currentColor;
    opacity: .5;
    /* Hình cuốn lịch, vẽ bằng mask nên tự đổi màu theo chữ. */
    -webkit-mask: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E");
    mask: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E");
}
.dpvn-o:hover { border-color: var(--border-active); }
.dpvn-o:focus-visible,
.dpvn-buoc:focus-visible,
.dpvn-o-ngay:focus-visible,
.dpvn-dieu:focus-visible,
.dpvn-nhanh:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
.dpvn.is-mo .dpvn-o { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }

.dpvn-ngay { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Rộng thì "Thứ Ba, 15/09/2026"; hẹp thì "T3, 15/09/2026" — phần ngày luôn còn. */
.dpvn-thu-ngan { display: none; }
.dpvn-trong { color: var(--muted); }
.dpvn-cho {
    flex: 0 0 auto;
    margin-left: auto;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--bg-active);
    color: var(--primary);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .02em;
}

/* --- Bảng lịch --- */
.dpvn-lich {
    position: absolute;
    z-index: 60;
    top: calc(100% + 6px);
    left: 0;
    width: 288px;
    max-width: calc(100vw - 32px);
    padding: 12px;
    border: 1px solid var(--border-medium);
    border-radius: 14px;
    background: var(--bg-panel);
    box-shadow: 0 12px 34px rgba(15, 23, 42, .18);
}
html[data-theme="dark"] .dpvn-lich { box-shadow: 0 12px 34px rgba(0, 0, 0, .55); }

.dpvn-dau {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}
/* Nhãn giữa giờ là nút bấm được (ngày → tháng → năm) nên phải trông bấm được,
   nhưng không viền để đầu lịch không rối. */
.dpvn-thang {
    flex: 1 1 auto;
    padding: 4px 8px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    font: inherit;
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
    white-space: nowrap;
    cursor: pointer;
    transition: background .12s, border-color .12s;
}
.dpvn-thang:hover { background: var(--bg-item-hover); border-color: var(--border-active); }
.dpvn-thang:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.dpvn-dieu {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background: var(--bg-item);
    color: var(--text);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}
.dpvn-dieu:hover:not(:disabled) { background: var(--bg-item-hover); }
.dpvn-dieu:disabled { opacity: .3; cursor: not-allowed; }
/* Nút nhảy cả năm « » — nhạt hơn nút tháng để mắt vẫn bám nút tháng trước. */
.dpvn-dieu--phu { width: 26px; font-size: 14px; color: var(--muted); }

/* --- Lưới chọn tháng / chọn năm --- */
.dpvn-luoi-lon {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.dpvn-o-lon {
    height: 46px;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background: var(--bg-item);
    color: var(--text);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: background .12s, color .12s, border-color .12s;
}
.dpvn-o-lon:hover:not(:disabled) { background: var(--bg-item-hover); border-color: var(--border-active); }
.dpvn-o-lon:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.dpvn-o-lon.is-chon {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 700;
}
.dpvn-o-lon:disabled { opacity: .3; cursor: not-allowed; }

.dpvn-thu,
.dpvn-luoi {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}
.dpvn-thu {
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    text-align: center;
}
/* Chủ nhật đứng cột cuối theo lịch Việt Nam, tô khác cho dễ đếm. */
.dpvn-thu span:last-child { color: var(--danger); }

.dpvn-o-trong { height: 34px; }
.dpvn-o-ngay {
    height: 34px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: background .12s, color .12s, border-color .12s;
}
.dpvn-o-ngay:hover:not(:disabled) { background: var(--bg-item-hover); }
.dpvn-o-ngay.is-homnay { border-color: var(--border-active); font-weight: 700; }
.dpvn-o-ngay.is-chon {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 700;
}
/* Ngày đài không quay: mờ đi và gạch ngang, để thấy ngay là không có kết quả
   chứ không phải bấm vào rồi mới biết. */
.dpvn-o-ngay.is-tat,
.dpvn-o-ngay:disabled {
    opacity: .3;
    cursor: not-allowed;
    text-decoration: line-through;
}

.dpvn-chan {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-subtle);
}
.dpvn-nhanh {
    flex: 1 1 0;
    padding: 7px 4px;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background: var(--bg-item);
    color: var(--text);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}
.dpvn-nhanh:hover:not(:disabled) { background: var(--bg-item-hover); border-color: var(--border-active); }
.dpvn-nhanh:disabled { opacity: .35; cursor: not-allowed; }
.dpvn-nhanh--phu { color: var(--muted); }

/* Màn hình hẹp: lịch bám mép trái ô lọc, nút bấm to hơn cho đầu ngón tay. */
@media (max-width: 560px) {
    .dpvn-thu-dai { display: none; }
    .dpvn-thu-ngan { display: inline; }
    /* 手机中央日期格空间很窄；左右箭头已经说明这是日期选择器，
       再放日历图标只会把完整日期挤成省略号。 */
    .dpvn-o {
        gap: 4px;
        padding-inline: 8px;
        font-size: 13px;
    }
    .dpvn-o::after { display: none; }
    /* Trên điện thoại ô chỉ rộng 180px; chữ "mới nhất" chiếm 57px là đủ để đẩy
       phần ngày ra ngoài. Thu thành một chấm tròn, ý nghĩa giữ ở thuộc tính
       title nên người dùng trình đọc màn hình vẫn nghe được. */
    .dpvn-cho {
        width: 7px;
        height: 7px;
        padding: 0;
        overflow: hidden;
        text-indent: -999px;
        background: var(--primary);
        align-self: center;
    }
}

@media (max-width: 480px) {
    .dpvn-lich { width: min(320px, calc(100vw - 24px)); padding: 10px; }
    .dpvn-o-ngay, .dpvn-o-trong { height: 38px; }
    .dpvn-buoc { width: 38px; }
}

@media (prefers-reduced-motion: reduce) {
    .dpvn-o, .dpvn-buoc, .dpvn-o-ngay { transition: none; }
}

/* =====================================================================
   Khối chọn ngày trang kết quả — dựng lại 29/09/2026 (mục 6) theo ảnh mẫu:
   tab miền (đài chọn ngay trong tab) · dải 7 ngày · ‹ ngày › Hôm nay.
   ===================================================================== */
.kq-bo-loc {
    position: relative;
    margin: 12px 0 18px;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    overflow: visible;
}
.kq-bo-loc .kq-mien.region-pills {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--border-subtle);
    border-radius: 16px 16px 0 0;
    overflow: hidden;
}
.kq-mien__o {
    position: relative;
    display: flex;
    min-width: 0;
    border-left: 1px solid var(--border-subtle);
}
.kq-mien__o:first-child { border-left: 0; }
.kq-bo-loc .kq-mien .region-pill {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 52px;
    padding: 8px 6px;
    border-radius: 0;
    font-size: 17px;
    font-weight: 800;
    box-shadow: none;
    color: var(--text);
}
.kq-bo-loc .kq-mien .region-pill.active { color: #fff; box-shadow: none; }
.kq-bo-loc .kq-mien .region-pill::after {
    content: "";
    width: 7px; height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    opacity: .75;
}
/* Ô chọn đài nằm trong suốt đè lên tab đang chọn: bấm tab là mở danh sách đài.
   Tab không có đài để chọn (Miền Bắc chỉ 1 đài/ngày) thì bỏ mũi tên. */
.kq-mien__o > .kq-dai {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    font-size: 16px;   /* iOS không phóng to trang khi mở ô chọn */
}
.kq-mien__o:not(.co-dai) > .kq-dai { pointer-events: none; }
.kq-mien__o.is-chon:not(.co-dai) .region-pill::after { display: none; }
.kq-bo-loc > .kq-dai { display: none; }

/* Dải 7 ngày trong tuần */
.kq-tuan {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    border-bottom: 1px solid var(--border-subtle);
}
.kq-tuan__ngay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 58px;
    padding: 6px 0;
    border: 0;
    border-left: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-muted);
    font-family: inherit;
    cursor: pointer;
}
.kq-tuan__ngay:first-child { border-left: 0; }
.kq-tuan__thu { font-size: 14px; font-weight: 600; }
.kq-tuan__so { font-size: 13.5px; font-variant-numeric: tabular-nums; }
.kq-tuan__ngay.is-cn .kq-tuan__thu { color: #dc2626; }
.kq-tuan__ngay.is-homnay .kq-tuan__so { font-weight: 800; color: var(--text); }
.kq-tuan__ngay:hover:not([disabled]) { background: var(--bg-item); }
.kq-tuan__ngay.is-chon,
.kq-tuan__ngay.is-chon .kq-tuan__thu,
.kq-tuan__ngay.is-chon .kq-tuan__so { background: var(--kq-mau, var(--primary)); color: #fff; }
.kq-tuan__ngay[disabled] { opacity: .35; cursor: default; }

/* Hàng ‹ ngày › Hôm nay */
.kq-bo-loc .kq-ngay {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 8px;
    padding: 12px;
    margin: 0;
}
.kq-bo-loc .kq-ngay .dpvn { flex: 1 1 auto; min-width: 0; }
.kq-homnay {
    flex: 0 0 auto;
    min-width: 76px;
    padding: 0 14px;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    background: var(--bg-item);
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}
.kq-homnay.is-chon { border-color: var(--kq-mau, var(--primary)); color: var(--kq-mau, var(--primary)); }
.kq-homnay[disabled] { opacity: .4; cursor: default; }

/* Màu nhấn theo miền đang chọn */
.kq-bo-loc:has(.region-pill[data-region="MB"].active) { --kq-mau: var(--color-mb); }
.kq-bo-loc:has(.region-pill[data-region="MT"].active) { --kq-mau: var(--color-mt); }
.kq-bo-loc:has(.region-pill[data-region="MN"].active) { --kq-mau: var(--color-mn); }

@media (max-width: 560px) {
    .kq-bo-loc { margin: 8px 0 12px; border-radius: 14px; }
    .kq-bo-loc .kq-mien.region-pills { border-radius: 14px 14px 0 0; }
    .kq-bo-loc .kq-mien .region-pill { font-size: 15.5px; min-height: 48px; }
    .kq-tuan__thu { font-size: 12.5px; }
    .kq-tuan__so { font-size: 12px; letter-spacing: -.02em; }
    .kq-tuan__ngay { min-height: 52px; }
    .kq-bo-loc .kq-ngay { padding: 10px; gap: 6px; }
    .kq-homnay { min-width: 64px; padding: 0 10px; font-size: 14px; }
    /* Trang kết quả trên điện thoại: bớt lề hai bên (trước là 44px mỗi bên, dải
       7 ngày bị chật đến dính chữ). */
    #page-results .results-page { padding-left: 0; padding-right: 0; margin: 0 -14px; }
    #page-results .results-layout { padding-left: 0; padding-right: 0; }
    .kq-bo-loc .kq-mien .region-pill { font-size: 14.5px; gap: 4px; padding: 8px 2px; }
    .kq-bo-loc .kq-mien .region-pill::after { width: 5px; height: 5px; border-width: 0 1.5px 1.5px 0; }
    /* Thẻ kết quả: tiêu đề + ngày gọn trên một khối nhỏ, như ảnh mẫu. */
    #page-results .rs-card__head { padding: 12px 14px 10px; gap: 4px; align-items: flex-start; }
    #page-results .rs-card__meta { gap: 8px; flex-wrap: nowrap; }
    #page-results .rs-card__meta .rs-chip { padding: 3px 8px; font-size: 11px; }
    #page-results .rs-card__province { font-size: 19px; }
    #page-results .rs-card__date { padding: 0; border: 0; background: transparent; font-size: 14px; }
    /* Khung trạng thái thành MỘT dòng mảnh như ảnh mẫu ("开奖结果已更新"),
       không chiếm nửa màn hình trước bảng số. */
    #page-results .draw-notice-wrap { margin: 0 0 10px; }
    #page-results .draw-notice { padding: 8px 12px; gap: 8px; border-radius: 10px; align-items: center; }
    #page-results .draw-notice-icon { font-size: 15px; width: auto; height: auto; }
    #page-results .draw-notice-title { font-size: 14px; line-height: 1.35; margin: 0; }
    #page-results .draw-notice-region-tag { display: none; }
    #page-results .draw-notice-desc { display: none; }
    /* Đầu trang gọn lại để màn hình đầu tiên thấy được số (ảnh mẫu: 首屏直接看号码) */
    #page-results .results-hero { margin-bottom: 0; }
    #page-results .results-hero .section-desc { display: none; }
}
/* Máy tính: hàng ngày không kéo dài hết khung. */
@media (min-width: 561px) {
    .kq-bo-loc .kq-ngay .dpvn { flex: 0 1 460px; }
}


/* =====================================================================
   29/09/2026 (tối) — bỏ hàng "‹ ô ngày ›" cũ theo yêu cầu chủ website:
   ‹ › chuyển ra hai đầu dải tuần; hàng dưới chỉ còn "📅 ngày" (bấm mở lịch)
   và "Hôm nay". Áp chung cho trang kết quả và trang Vietlott.
   ===================================================================== */
.kq-tuan-hang {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    border-bottom: 1px solid var(--border-subtle);
}
.kq-tuan-hang .kq-tuan { border-bottom: 0; }
.kq-tuan__buoc {
    border: 0;
    border-right: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.kq-tuan-hang .kq-tuan__buoc:last-child { border-right: 0; border-left: 1px solid var(--border-subtle); }
.kq-tuan__buoc:hover:not(:disabled) { background: var(--bg-item); }
.kq-tuan__buoc:disabled { opacity: .3; cursor: default; }

.kq-bo-loc .kq-ngay {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
}
.kq-bo-loc .kq-ngay .dpvn { flex: 0 1 auto; min-width: 0; }
.kq-bo-loc .kq-ngay .dpvn-buoc { display: none; }
.kq-bo-loc .kq-ngay .dpvn-cho { display: none; }
.kq-bo-loc .kq-ngay .dpvn-o {
    flex-direction: row-reverse;
    justify-content: flex-start;
    gap: 8px;
    padding: 6px 4px;
    border: 0;
    background: transparent;
    font-size: 16px;
    font-weight: 700;
}
.kq-bo-loc .kq-ngay .dpvn-o::after { display: block; opacity: .75; width: 18px; height: 18px; }
.kq-bo-loc .kq-ngay .dpvn.is-mo .dpvn-o { box-shadow: none; color: var(--kq-mau, var(--primary)); }
.kq-bo-loc .kq-ngay .dpvn-o:hover { color: var(--kq-mau, var(--primary)); }
.kq-bo-loc .kq-ngay .kq-homnay { min-height: 36px; }
@media (min-width: 561px) {
    .kq-bo-loc .kq-ngay .dpvn { flex: 0 1 auto; }
}

/* ---- Trang Vietlott: hàng tab trò chơi trong khối chọn ---- */
.kq-bo-loc--vl { --kq-mau: var(--primary); }
.kq-bo-loc .kq-tro.vietlott-type-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--border-subtle);
    border-radius: 16px 16px 0 0;
    overflow: hidden;
}
.kq-bo-loc .kq-tro .vietlott-type-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 6px 4px;
    margin: 0;
    border: 0;
    border-left: 1px solid var(--border-subtle);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--text);
    font-size: 15px;
    font-weight: 800;
    text-align: center;
    line-height: 1.2;
    white-space: normal;
}
.kq-bo-loc .kq-tro .vietlott-type-btn:first-child { border-left: 0; }
.kq-bo-loc .kq-tro .vietlott-type-btn.is-active { background: var(--kq-mau); color: #fff; }

/* ---- Trang Thống kê: tab miền, đài chọn ngay trong tab ---- */
.kq-mien.kq-mien--tk {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 0;
    padding: 0;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    background: transparent;
    overflow: hidden;
}
.kq-mien--tk .kq-mien__o { position: relative; display: flex; min-width: 0; border-left: 1px solid var(--border-subtle); }
.kq-mien--tk .kq-mien__o:first-child { border-left: 0; }
.kq-mien__o:has(> [hidden]) { display: none !important; }
.kq-mien--tk .sc-region-pill {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 48px;
    margin: 0;
    padding: 6px 4px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    color: var(--text);
    font-size: 15px;
    font-weight: 800;
}
.kq-mien--tk .kq-mien__o.co-dai .sc-region-pill::after {
    content: "";
    width: 6px; height: 6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    opacity: .8;
}
.kq-mien--tk .sc-region-pill.active { color: #fff; background: var(--primary); }
.kq-mien--tk .sc-region-pill[data-region="MB"].active { background: var(--color-mb); }
.kq-mien--tk .sc-region-pill[data-region="MT"].active { background: var(--color-mt); }
.kq-mien--tk .sc-region-pill[data-region="MN"].active { background: var(--color-mn); }
.kq-mien--tk .kq-mien__o > .kq-dai {
    position: absolute; inset: 0; width: 100%; height: 100%;
    opacity: 0; cursor: pointer; font-size: 16px;
}
.kq-mien--tk .kq-mien__o:not(.co-dai) > .kq-dai { pointer-events: none; }
.kq-tk-dai-cu:not(:has(select)) { display: none !important; }

@media (max-width: 560px) {
    .kq-tuan-hang { grid-template-columns: 30px minmax(0, 1fr) 30px; }
    .kq-tuan__buoc { font-size: 20px; }
    .kq-bo-loc .kq-ngay { padding: 6px 10px; }
    .kq-bo-loc .kq-ngay .dpvn-o { font-size: 15px; }
    .kq-bo-loc .kq-tro .vietlott-type-btn { font-size: 13px; min-height: 48px; padding: 4px 2px; }
    .kq-mien--tk .sc-region-pill { font-size: 13.5px; white-space: nowrap; padding: 6px 2px; }
    /* Trang Vietlott: bớt lề hai bên như trang kết quả, dải 7 ngày khỏi dính chữ. */
    #page-vietlott .vietlott-page { padding-left: 0; padding-right: 0; margin: 0 -14px; width: calc(100% + 28px); max-width: none; }
    #page-vietlott .vietlott-hero { padding-left: 14px; padding-right: 14px; }
}

/* 29/09/2026 (tối) — máy tính: ô MIỀN trang Thống kê nằm trong một cột lưới hẹp
   (~200px) nên ba tab bị ép, chữ "Miền Bắc" gãy hai dòng. Cho ô Miền chiếm trọn
   một hàng, tab rộng vừa đủ, chữ không gãy — đúng trên mọi bề rộng. */
#page-stats .filter-panel .filter-field--region { grid-column: 1 / -1; }
.kq-mien.kq-mien--tk { width: 100%; max-width: 560px; }
.kq-mien--tk .sc-region-pill { white-space: nowrap; }
@media (min-width: 561px) {
    .kq-mien--tk .sc-region-pill { font-size: 15.5px; min-height: 50px; padding: 6px 12px; }
}

/* Máy tính bảng / máy tính: khối chọn (tab + dải tuần + ngày) không kéo dài hết
   khung 1.300px mà giữ khổ vừa đọc, căn giữa; chữ dải tuần to hơn. */
@media (min-width: 900px) {
    .kq-bo-loc { max-width: 860px; margin-left: auto; margin-right: auto; }
    .kq-tuan__thu { font-size: 15px; }
    .kq-tuan__so { font-size: 14px; }
    .kq-tuan__ngay { min-height: 60px; }
    .kq-bo-loc .kq-ngay .dpvn-o { font-size: 17px; }
}

/* 29/09/2026 (tối) — chủ website: hàng tab 3 miền trang Thống kê ra GIỮA. Tab
   chưa chọn luôn nền trong (trước bị dính nền xanh của trạng thái cũ). */
#page-stats .filter-panel .filter-field--region { align-items: center; text-align: center; }
.kq-mien.kq-mien--tk { margin-left: auto; margin-right: auto; }
.kq-mien--tk .sc-region-pill:not(.active),
.kq-mien--tk .sc-region-pill:not(.active):focus { background: transparent; color: var(--text); box-shadow: none; }
.kq-mien--tk .sc-region-pill:not(.active):hover { background: var(--bg-item); }

/* 30/09/2026 — màn 320–380px (iPhone SE, iPhone mini bật "phóng to màn hình", Android
   nhỏ): ô ngày chỉ rộng ~33px, chữ "21/09" tràn 1–2px nên các ngày dính nhau
   ("21/0922/09…"). Thu hai nút ‹ › và chữ số ngày cho vừa ô. */
@media (max-width: 380px) {
    .kq-tuan-hang { grid-template-columns: 24px minmax(0, 1fr) 24px; }
    .kq-tuan__buoc { font-size: 18px; }
    .kq-tuan__so { font-size: 11.5px; letter-spacing: -.03em; }
    .kq-tuan__thu { font-size: 12px; }
    .kq-tuan__ngay.is-homnay .kq-tuan__so { font-weight: 700; letter-spacing: -.05em; }
}
@media (max-width: 319px) {
    .kq-tuan__so { font-size: 10.5px; }
    .kq-tuan__thu { font-size: 11px; }
}

/* 02/10/2026 — ô ngày ĐANG CHỌN giữ màu khi bị rê chuột / vừa chạm. Trước đây luật
   `.kq-tuan__ngay:hover:not([disabled])` (nặng hơn `.is-chon`) đè nền thành xám, chỉ còn
   hai khối chữ màu như bị bôi đen; trên điện thoại trạng thái rê "dính" sau khi chạm nên
   bấm ngày nào xong ô đó cũng trông như vậy. */
.kq-tuan__ngay.is-chon:hover:not([disabled]) { background: var(--kq-mau, var(--primary)); }

/* 02/10/2026 — điện thoại xoay ngang (màn cao ≤ 450px): ô ngày trong lịch thấp hơn để lịch
   vừa màn (đi cùng luật thôi dính thanh đầu trang trong styles.css). */
@media (max-height: 450px) and (orientation: landscape) {
    .dpvn-o-ngay, .dpvn-o-trong { height: 30px; }
}
