/* =========================================================
   TRANG CHỦ MỚI (resources/views/home.blade.php)
   Dựng theo bản thiết kế assets/game/ui/kiemson_trangchu_PC_FN.html.
   site.css vẫn được nạp (popup quảng bá, popup video) nên mọi class ở đây mang
   tiền tố mh- và mọi quy tắc chung đều gói trong body.mh-body.
   ========================================================= */
/* font tiêu đề kiểu game (assets/fonts/FZ GAMEBR-V2.TTF, bản woff2 nén sẵn), đủ dấu tiếng Việt */
@font-face {
    font-family: "FZ GameBR";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/assets/fonts/fz-gamebr-v2.woff2") format("woff2"), url("/assets/fonts/FZ%20GAMEBR-V2.TTF") format("truetype");
}
/* .mh-body: thẻ body của trang chủ, và khung bọc header/footer (.mh-shell) ở trang con */
.mh-body {
    --muc: #16233A;        /* mực đêm – nền chính */
    --muc-2: #1F3150;      /* mực nhạt – khối phụ */
    --kim: #C9A45C;        /* vàng lá – điểm nhấn */
    --kim-sang: #E6CB8B;
    --chu: #B8322A;        /* son ấn – nút hành động */
    --giay: #EFE6D2;       /* giấy dó – khối sáng */
    --ngoc: #4E7D6F;
    --chu-nhat: #F4EEE2;
    --chu-toi: #2A2A2A;
    /* cả trang dùng một họ Barlow Semi Condensed (assets/barlow-semi-condensed.css) */
    --serif: "Barlow Semi Condensed", "Be Vietnam Pro", system-ui, sans-serif;
    --sans: "Barlow Semi Condensed", "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --hdr-h: 88px;
    margin: 0;
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--chu-nhat);
    background: var(--muc);
}
/* trang con: khung bọc header/footer chỉ mượn biến + font, không phủ nền / màu chữ lên trang */
.mh-shell {
    background: none;
}
html:has(body.mh-body) {
    scroll-padding-top: var(--hdr-h);
}
.mh-body .page-noise {
    display: none;
}
.mh-body a:hover {
    color: inherit;
}
.mh-body h1, .mh-body h2, .mh-body h3, .mh-body p, .mh-body ul {
    margin: 0;
    padding: 0;
}
.mh-body button {
    font: inherit;
    cursor: pointer;
    border: 0;
    background: none;
    color: inherit;
    padding: 0;
}
.mh-body :focus-visible {
    outline: 2px solid var(--kim-sang);
    outline-offset: 3px;
}
/* popup quảng bá (site.js) tự focus nút đóng khi mở: quy tắc viền chung ở trên đè mất kiểu
   focus riêng của site.css (cùng độ ưu tiên, home.css nạp sau) nên hiện khung vuông quanh
   nút hình thoi. Trả lại đúng kiểu của site.css: bỏ viền, quầng sáng ôm theo hình nút. */
.mh-body .promo-popup-close:focus-visible,
.mh-body .promo-popup-btn:focus-visible {
    outline: none;
    filter: brightness(1.15) drop-shadow(0 0 6px #fff3c4);
}
.mh-body a[aria-disabled="true"] {
    opacity: .55;
    cursor: not-allowed;
}
.mh-wrap {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
}
@media (prefers-reduced-motion: reduce) {
    .mh-body *,
    .mh-body *::before,
    .mh-body *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- NÚT ---------- */
.mh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
    transition: background .2s;
}
.mh-btn-chu {
    background: var(--chu);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15);
}
.mh-body .mh-btn-chu:hover {
    background: #cc3b31;
    color: #fff;
}
.mh-btn-vien {
    border: 1px solid var(--kim);
    color: var(--kim-sang);
}
.mh-body .mh-btn-vien:hover {
    background: rgba(201, 164, 92, .12);
    color: var(--kim-sang);
}

/* ---------- 1. HEADER ---------- */
.mh-hdr {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    /* vàng giấy nhạt cùng tông khung khối tải game; nền sáng nên chữ, viền chuyển sang nâu đậm */
    background: linear-gradient(to bottom, rgba(252, 246, 232, .97), rgba(244, 231, 204, .95));
    backdrop-filter: blur(6px);
    border-bottom: 2px solid var(--kim);
}
.mh-hdr .mh-btn-vien {
    border-color: #5A4118;
    color: #4A3514;
}
.mh-body .mh-hdr .mh-btn-vien:hover {
    background: rgba(74, 53, 20, .1);
    color: #2E1F08;
}
/* icon trong nút header: ảnh rương nạp thò nhẹ ra ngoài lề trái nút, svg theo màu chữ */
.mh-btn-ic {
    flex: none;
    transition: transform .2s;
}
img.mh-btn-ic {
    width: 30px;
    height: 30px;
    margin: -8px -2px -8px -10px;
    filter: drop-shadow(0 1px 2px rgba(60, 40, 10, .35));
}
svg.mh-btn-ic {
    width: 18px;
    height: 18px;
    fill: currentColor;
}
.mh-btn:hover .mh-btn-ic {
    transform: scale(1.15);
}
/* logo sát trái | menu trái + menu phải liền nhau ở CHÍNH GIỮA | nút CTA sát phải.
   Hai cột 1fr hai bên bằng nhau nên cụm menu luôn nằm giữa, không phụ thuộc bề ngang logo/nút.
   .mh-hdr-r dùng display:contents để menu phải và nút là ô lưới riêng. */
.mh-hdr-in {
    display: grid;
    max-width: 1600px;
    margin-inline: auto;
    grid-template-columns: 1fr auto auto 1fr;
    column-gap: 4px;
    /* hàng cố định = chiều cao header: logo to hơn chỉ tràn ra ngoài,
       không kéo giãn hàng làm chữ và nút tụt khỏi giữa dải header */
    grid-template-rows: var(--hdr-h);
    align-items: center;
    height: var(--hdr-h);
    padding: 0 40px;
}
.mh-nav {
    display: flex;
    gap: 4px;
}
.mh-hdr .mh-logo {
    grid-column: 1;
    grid-row: 1;
    /* căn giữa khoảng trống bên trái (từ mép header tới cụm menu); cụm menu vẫn ở giữa */
    justify-self: center;
    gap: 14px;
}
/* logo chữ cạnh icon: icon thò xuống dưới viền, riêng chữ căn giữa dải header
   (khối logo đã cách mép trên 10px nên trừ đi 10px) */
.mh-hdr .mh-logo-name {
    --name-h: 76px;
    align-self: flex-start;
    height: var(--name-h);
    width: auto;
    margin-top: calc(var(--hdr-h) / 2 - var(--name-h) / 2 - 10px);
    filter: drop-shadow(0 2px 4px rgba(74, 53, 20, .35));
}
.mh-nav-l {
    grid-column: 2;
    grid-row: 1;
}
.mh-hdr-r {
    display: contents;
}
.mh-nav-r {
    grid-column: 3;
    grid-row: 1;
}
.mh-hdr-r .mh-hdr-cta {
    grid-column: 4;
    grid-row: 1;
    justify-self: end;
}
.mh-nav a {
    padding: 10px 16px;
    font-size: 19px;
    font-weight: 600;
    border-radius: 4px;
    color: #4A3514;
    white-space: nowrap;
}
.mh-body .mh-nav a:hover,
.mh-nav a.is-on {
    color: #2E1F08;
    background: rgba(74, 53, 20, .12);
}
/* ô icon trước chữ: vuông bo góc nền vàng giấy, viền vàng; mục đang mở / rê chuột thì vàng đậm */
.mh-nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.mh-nav-ic {
    display: grid;
    place-items: center;
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid rgba(201, 164, 92, .8);
    color: #6B4A12;
    background: linear-gradient(#FFF8E6, #F1DDA9);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 2px 4px rgba(74, 53, 20, .15);
    transition: background .2s, color .2s, border-color .2s;
}
.mh-nav-ic svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.mh-body .mh-nav a:hover .mh-nav-ic,
.mh-nav a.is-on .mh-nav-ic {
    color: #fff;
    border-color: #B8893F;
    background: linear-gradient(#E6B85A, #B8322A);
}
.mh-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}
.mh-logo-app {
    width: 60px;
    height: 60px;
    border-radius: 14px;
}
/* Logo header to hơn thanh header, bám từ mép trên và thò xuống dưới viền */
.mh-hdr .mh-logo {
    align-self: start;
    margin-top: 10px;
    position: relative;
    z-index: 2;
    transition: transform .2s;
}
.mh-hdr .mh-logo:hover {
    transform: translateY(2px) scale(1.03);
}
.mh-hdr .mh-logo-app {
    width: 100px;
    height: 100px;
    border-radius: 22px;
    /* bỏ viền vàng + viền nâu, chỉ giữ bóng đổ để logo vẫn nổi khỏi header */
    box-shadow: 0 10px 28px rgba(0, 0, 0, .35);
}
.mh-logo-name {
    height: 48px;
    width: auto;
}
/* (màn rộng .mh-hdr-r là display:contents ở trên) */
.mh-hdr-cta {
    display: flex;
    gap: 10px;
    margin-left: auto;
}
.mh-hdr-cta .mh-btn {
    padding: 11px 22px;
    font-size: 17px;
}
/* nút Tài khoản: viền nâu như nút viền của header, icon người theo màu chữ */
.mh-btn-tk svg {
    flex: none;
    width: 20px;
    height: 20px;
    fill: currentColor;
}
/* màn 1101–1439px: nút Tài khoản thu thành nút tròn chỉ còn icon để cụm menu vẫn ở giữa */
@media (min-width: 1101px) and (max-width: 1439px) {
    .mh-hdr-cta .mh-btn-tk {
        width: 46px;
        height: 46px;
        padding: 0;
        border-radius: 50%;
    }
    .mh-btn-tk span {
        display: none;
    }
}
/* 6 mục menu + 2 nút: màn 1101–1280px bỏ ô icon trước chữ cho đủ chỗ */
@media (min-width: 1101px) and (max-width: 1280px) {
    .mh-nav-ic { display: none !important; }
    .mh-body .mh-nav a { padding: 10px 8px; font-size: 16px; }
    .mh-hdr-cta .mh-btn:not(.mh-btn-tk) { padding: 11px 16px; font-size: 16px; }
}
/* nút ☰: chỉ ở header điện thoại / máy tính bảng (nền xanh ngọc) */
.mh-burger {
    display: flex;
    flex: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(243, 210, 122, .7) !important;
    border-radius: 4px;
}
.mh-burger span {
    display: block;
    width: 20px;
    height: 2px;
    background: #FFE7A3;
    transition: transform .2s, opacity .2s;
}
.mh-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mh-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.mh-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
/* header điện thoại + máy tính bảng, menu toàn màn hình, thanh đáy: chỉ bật trong @media (max-width: 1100px) */
.mh-mhdr,
.mh-drawer,
.mh-mbar {
    display: none;
}
.mh-mhdr-logo {
    position: absolute;
    left: 12px;
    top: 6px;
    z-index: 2;
    width: 48px;
    height: 48px;
    overflow: hidden;
    border-radius: 14px;
    box-shadow: 0 0 0 2px var(--kim), 0 4px 10px rgba(0, 0, 0, .4);
}
.mh-mhdr-logo img {
    width: 100%;
    height: 100%;
}
.mh-mhdr-top {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    height: 60px;
    padding: 0 12px 0 72px;
    background: linear-gradient(#1E6F6E, #134D4F);
    border-bottom: 2px solid var(--kim);
}
/* nút tròn đỏ viền vàng (Tài khoản) */
.mh-mhdr-ic {
    display: grid;
    place-items: center;
    flex: none;
    width: 38px;
    height: 38px;
    border: 2px solid #F3D27A;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 35%, #D9483A, #8E1F17);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}
.mh-mhdr-ic svg {
    width: 18px;
    height: 18px;
    fill: #FFE7A3;
}
/* nút lớn đầu nhọn hai bên (Tải game) */
.mh-mhdr-btn {
    display: grid;
    place-items: center;
    height: 38px;
    padding: 0 16px 1px;
    clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 8px 100%, 0 50%);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    white-space: nowrap;
}
.mh-body .mh-mhdr-btn.is-gold {
    color: #6B2A10;
    background: linear-gradient(#FDEBB0, #E3AE44);
    box-shadow: inset 0 0 0 2px #B98428;
}
/* hàng menu chính dưới thanh xanh: nền giấy vàng như header máy tính, mục đang mở chữ đỏ son + gạch chân */
.mh-mhdr-nav {
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    height: 40px;
    padding: 0 6px;
    overflow-x: auto;
    scrollbar-width: none;
    background: linear-gradient(rgba(252, 246, 232, .98), rgba(244, 231, 204, .97));
    border-bottom: 2px solid var(--kim);
}
.mh-mhdr-nav::-webkit-scrollbar {
    display: none;
}
.mh-body .mh-mhdr-nav a {
    position: relative;
    display: flex;
    flex: none;
    align-items: center;
    padding: 0 10px;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    color: #4A3514;
}
.mh-body .mh-mhdr-nav a:hover,
.mh-body .mh-mhdr-nav a.is-on {
    color: var(--chu);
}
.mh-mhdr-nav a.is-on::after {
    content: "";
    position: absolute;
    right: 10px;
    bottom: 5px;
    left: 10px;
    height: 2px;
    border-radius: 2px;
    background: var(--chu);
}
@media (max-width: 380px) {
    .mh-mhdr-nav { justify-content: flex-start; padding: 0 2px; }
    .mh-body .mh-mhdr-nav a { padding: 0 8px; font-size: 14px; }
}
@media (max-width: 1100px) {
    .mh-hdr { padding-top: env(safe-area-inset-top, 0px); }
    /* Menu toàn màn hình: phủ từ dưới header tới đáy màn, nền mực đậm */
    .mh-drawer {
        display: block;
        position: fixed;
        top: calc(var(--hdr-h) + env(safe-area-inset-top, 0px));
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 49;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 8px 20px calc(96px + env(safe-area-inset-bottom, 0px));
        font-family: var(--sans);
        color: var(--chu-nhat);
        background: rgba(14, 23, 38, .98);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity .2s, transform .2s, visibility .2s;
    }
    .mh-drawer.is-open {
        opacity: 1;
        visibility: visible;
        transform: none;
    }
    .mh-body .mh-drawer > a {
        display: block;
        padding: 14px 4px;
        font-size: 20px;
        font-weight: 600;
        color: var(--chu-nhat);
        border-bottom: 1px solid rgba(201, 164, 92, .18);
    }
    .mh-body .mh-drawer > a.is-on,
    .mh-body .mh-drawer > a:hover {
        color: var(--kim-sang);
    }
    .mh-drawer-phu {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-top: 20px;
    }
    .mh-body .mh-drawer-phu a {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 12px 4px;
        border: 1px solid rgba(201, 164, 92, .35);
        border-radius: 4px;
        font-size: 15px;
        text-align: center;
        color: var(--chu-nhat);
    }
    .mh-body .mh-drawer-phu a.is-tk {
        grid-column: 1 / -1;
        font-weight: 700;
        color: var(--kim-sang);
        background: rgba(201, 164, 92, .12);
    }
    .mh-drawer-phu svg {
        width: 18px;
        height: 18px;
        fill: currentColor;
    }
    /* Thanh 3 nút đáy màn hình: Tải game | Nhập Code | Nạp Thẻ (đỏ son) */
    .mh-mbar {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 45;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        font-family: var(--sans);
        background: rgba(14, 23, 38, .97);
        border-top: 1px solid var(--kim);
        box-shadow: 0 -6px 18px rgba(0, 0, 0, .3);
    }
    .mh-body .mh-mbar a {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        padding: 9px 4px 8px;
        font-size: 13px;
        font-weight: 600;
        color: #D9D2C2;
    }
    .mh-body .mh-mbar a:hover {
        color: var(--kim-sang);
    }
    .mh-body .mh-mbar a.is-nap {
        color: #FFF3D2;
        background: linear-gradient(#DA4234, #9A2218);
    }
    .mh-mbar svg {
        width: 22px;
        height: 22px;
        fill: currentColor;
    }
    /* chừa chỗ cho thanh đáy để footer không bị che */
    body:has(.mh-mbar) {
        padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px));
    }
    body:has(.mh-mbar) .back-to-top {
        bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    }
    /* mở menu thì khoá cuộn trang phía sau */
    body.mh-drawer-open {
        overflow: hidden;
    }
}

/* ---------- 2. HERO ---------- */
.mh-hero {
    position: relative;
    min-height: 900px;
    height: 100vh;
    max-height: 1080px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    /* ảnh khung đã chừa sẵn phần dải lụa trong suốt ở đáy nên không cần đệm thêm */
    padding: 0;
}
.mh-hero-bg {
    position: absolute;
    inset: 0;
    background: var(--muc) center / cover no-repeat;
    filter: brightness(1.12) saturate(1.1);
}
.mh-hero-bg video,
.mh-hero-bg iframe,
.mh-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
    background: center / cover no-repeat;
    pointer-events: none;
}
/* ảnh dọc 9:16 riêng cho điện thoại / máy tính bảng: chỉ bật ở ≤1100px, phủ lên video/ảnh ngang */
.mh-hero-mimg {
    display: none;
    position: absolute;
    inset: 0;
    background: center / cover no-repeat;
}
/* iframe YouTube không có object-fit: phóng theo cạnh dài để lấp kín khung 16:9 */
.mh-hero-bg iframe {
    top: 50%;
    left: 50%;
    width: max(100%, 177.78vh);
    height: max(100%, 56.25vw);
    transform: translate(-50%, -50%);
}
.mh-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    /* chỉ phủ tối dải đáy để nối sang phần dưới, giữ banner sáng */
    height: 28%;
    background: linear-gradient(to top, var(--muc), transparent);
}
/* nhãn 18+: khung xanh ngọc mờ viền vàng, góc trái trên banner ngay dưới header cố định */
.mh-age {
    position: absolute;
    top: calc(var(--hdr-h) + env(safe-area-inset-top, 0px) + 16px);
    right: 24px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 280px;
    padding: 8px 14px 8px 12px;
    border: 1px solid var(--kim);
    border-radius: 4px;
    background: rgba(22, 70, 66, .78);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .35);
    pointer-events: none;
}
.mh-age b {
    flex: none;
    padding-right: 12px;
    border-right: 1px solid var(--kim);
    font-size: 34px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
}
.mh-age span {
    font-size: 13px;
    line-height: 1.35;
    color: var(--kim-sang);
}
@media (max-width: 1100px) {
    .mh-age { right: 12px; top: calc(var(--hdr-h) + env(safe-area-inset-top, 0px) + 10px); max-width: 220px; padding: 6px 10px; gap: 8px; }
    .mh-age b { font-size: 24px; padding-right: 8px; }
    .mh-age span { font-size: 11px; }
}
.mh-hero-in {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.mh-hero-title img {
    width: min(620px, 80vw);
    height: auto;
    margin: 0 auto;
    filter: drop-shadow(0 4px 30px rgba(0, 0, 0, .55));
}
.mh-hero-title small {
    display: block;
    max-width: 40em;
    margin: 18px auto 0;
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: .02em;
    color: var(--kim-sang);
    text-shadow: 0 2px 12px rgba(0, 0, 0, .7);
}
.mh-play {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-top: 28px;
    font-weight: 600;
    color: var(--chu-nhat);
}
.mh-play i {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid var(--kim);
    display: grid;
    place-items: center;
    padding-left: 4px;
    font-style: normal;
    font-size: 18px;
    color: var(--kim-sang);
    transition: background .2s, color .2s;
}
.mh-play:hover i {
    background: var(--kim);
    color: var(--muc);
}
/* Cụm đếm ngược + nút đăng ký. --cdw là bề ngang khung bg-time (ảnh 2089x412); ô giấy và
   4 ô xanh đặt theo % đo trên ảnh; chữ tính theo cqi (1% bề ngang khung) nên co giãn cùng khung. */
.mh-hero-cd {
    --cdw: min(620px, 48vw);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 14px 22px;
    margin-top: 22px;
}
.mh-cd {
    position: relative;
    container-type: inline-size;
    width: var(--cdw);
    aspect-ratio: 2089 / 412;
    background: url("/assets/game/ui/bg-time.webp") center / 100% 100% no-repeat;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .35));
}
.mh-cd > div {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.1;
}
.mh-cd-label {
    left: 2%;
    width: 33%;
    top: 22%;
    height: 62%;
    font-size: max(12px, 3cqi);
    font-weight: 700;
    color: #5A3A12;
}
.mh-cd-label b {
    font-size: max(13px, 3.4cqi);
    font-weight: 700;
    color: #3A2408;
}
.mh-cd-o {
    top: 12%;
    height: 74%;
    width: 13%;
    gap: .6cqi;
}
.mh-cd-o:nth-child(2) { left: 37.5%; }
.mh-cd-o:nth-child(3) { left: 52.3%; }
.mh-cd-o:nth-child(4) { left: 67.1%; }
.mh-cd-o:nth-child(5) { left: 81.9%; }
.mh-cd-o b {
    font-family: var(--serif);
    font-size: 5.6cqi;
    font-weight: 700;
    color: #FBEFD2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, .45);
}
.mh-cd-o span {
    /* điện thoại: 1.9cqi chỉ còn ~7px, giữ tối thiểu 10px */
    font-size: max(10px, 1.9cqi);
    color: #C9D3E6;
}
/* nút vàng bg-dk (ảnh 1963x451), chữ nâu đỏ kèm mũi tên; .mh-body để thắng reset button */
.mh-body .mh-cd-dk {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5em;
    width: calc(var(--cdw) * .46);
    aspect-ratio: 1963 / 451;
    padding-bottom: .1em;
    font-size: calc(var(--cdw) * .032);
    font-weight: 700;
    color: #7A2A10;
    background: url("/assets/game/ui/bg-dk.webp") center / 100% 100% no-repeat;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .35));
    transition: transform .2s, filter .2s;
}
.mh-cd-dk::after {
    content: "";
    width: .45em;
    height: .45em;
    border: solid currentColor;
    border-width: 3px 3px 0 0;
    transform: rotate(45deg);
}
.mh-body .mh-cd-dk:hover {
    color: #A0301A;
    transform: translateY(-2px);
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .4)) brightness(1.05);
}

/* Máy tính: khung đối xứng bg-time-fl (2147x345): ô giấy trái "Ra mắt", 4 ô xanh ở giữa,
   ô giấy phải chứa nút "Đăng ký trước" (không dùng ảnh nút bg-dk). Vị trí % đo trên ảnh.
   Máy tính bảng / điện thoại giữ khung bg-time + nút bg-dk như cũ. */
@media (min-width: 1101px) {
    .mh-hero-cd:has(.mh-cd) {
        position: relative;
        container-type: inline-size;
        display: block;
        width: min(820px, 56vw);
        aspect-ratio: 2147 / 345;
        background: url("/assets/game/ui/bg-time-fl.webp") center / 100% 100% no-repeat;
        filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .35));
    }
    .mh-hero-cd:has(.mh-cd) .mh-cd {
        position: absolute;
        inset: 0;
        width: auto;
        aspect-ratio: auto;
        background: none;
        filter: none;
    }
    .mh-hero-cd:has(.mh-cd) .mh-cd-label { left: 2%; width: 23%; top: 20%; height: 62%; font-size: 1.9cqi; }
    .mh-hero-cd:has(.mh-cd) .mh-cd-label b { font-size: 2.2cqi; }
    .mh-hero-cd:has(.mh-cd) .mh-cd-o { top: 13.3%; height: 70%; width: 9.6%; gap: .3cqi; }
    .mh-hero-cd:has(.mh-cd) .mh-cd-o:nth-child(2) { left: 27.9%; }
    .mh-hero-cd:has(.mh-cd) .mh-cd-o:nth-child(3) { left: 39.26%; }
    .mh-hero-cd:has(.mh-cd) .mh-cd-o:nth-child(4) { left: 51%; }
    .mh-hero-cd:has(.mh-cd) .mh-cd-o:nth-child(5) { left: 62.56%; }
    .mh-hero-cd:has(.mh-cd) .mh-cd-o b { font-size: 3.6cqi; }
    .mh-hero-cd:has(.mh-cd) .mh-cd-o span { font-size: 1.2cqi; }
    .mh-body .mh-hero-cd:has(.mh-cd) .mh-cd-dk {
        position: absolute;
        left: 74.5%;
        top: 20%;
        width: 23%;
        height: 62%;
        aspect-ratio: auto;
        padding: 0;
        font-size: 2.3cqi;
        background: none;
        filter: none;
        animation: none;
    }
    .mh-body .mh-hero-cd:has(.mh-cd) .mh-cd-dk::before {
        display: none;
    }
    .mh-body .mh-hero-cd:has(.mh-cd) .mh-cd-dk:hover {
        color: var(--chu);
        filter: none;
        transform: translateX(3px);
    }
}

/* ---------- KHỐI TẢI GAME ---------- */
/* nằm trong .mh-hero-in, ngay dưới nút đăng ký của banner */
.mh-taigame {
    width: 100%;
    /* mép trên ảnh khung còn ~9% trong suốt (dải lụa hai bên) nên kéo lên cho viền vàng
       nằm sát ngay dưới cụm đếm ngược */
    margin-top: -14px;
    text-align: left;
}
/* Khung giấy bg-ft-bt kéo giãn phủ cả khối; padding (tính theo bề ngang) đưa lưới
   nút vào đúng lòng khung. Ảnh nút cắt sẵn trong assets/game/ui/tg (xem build ở đó):
   nút nhỏ tỉ lệ thân 3.3:1, viền trang trí thò ra ngoài thân nên vẽ bằng ::before. */
.mh-tg {
    position: relative;
    isolation: isolate;
    container-type: inline-size;
    display: grid;
    grid-template-columns: 181fr 273fr 273fr 181fr;
    grid-template-rows: 1fr 1fr;
    grid-template-areas:
        "nap ios apk code"
        "nap gp  pc  code";
    /* ≈12px ở bản 1180px, thu theo tỉ lệ khung 920px */
    gap: 10px;
    width: min(920px, 100%);
    aspect-ratio: 3.83;
    margin: 0 auto;
    /* lề trong sát viền vàng của khung hơn (trước 4% 10.1% 7.1% 10%) để nút to, lấp kín lòng khung */
    padding: 3% 7% 5.6% 7%;
}
.mh-tg::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: url("/assets/game/ui/tg/khung.webp") center / 100% 100% no-repeat;
    pointer-events: none;
}
.mh-tg-nap { grid-area: nap; }
.mh-tg-code { grid-area: code; }
.mh-tg-btn.is-ios { grid-area: ios; }
.mh-tg-btn.is-apk { grid-area: apk; }
.mh-tg-btn.is-gp { grid-area: gp; }
.mh-tg-btn.is-pc { grid-area: pc; }
.mh-tg-lon,
.mh-tg-btn {
    position: relative;
    isolation: isolate;
    transition: filter .15s, transform .15s;
}
.mh-tg-lon:hover,
.mh-tg-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-2px);
}
.mh-body .mh-tg-lon {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0 0 11%;
    border: 0 !important;
    font-family: var(--serif);
    font-weight: 700;
    font-size: 2.7cqw;
    line-height: 1;
    color: #FFF6DC !important;
    text-shadow: 0 2px 0 rgba(0, 0, 0, .25), 0 2px 10px rgba(0, 0, 0, .55);
}
/* .mh-body để thắng reset "button { background: none }" (Nhập Code là <button>) */
.mh-tg-nap { --img: url("/assets/game/ui/tg/nap.webp"); }
.mh-tg-code { --img: url("/assets/game/ui/tg/code.webp"); }
.mh-body .mh-tg-nap,
.mh-body .mh-tg-code {
    background: var(--img) center / 100% 100% no-repeat;
}
.mh-tg-btn {
    display: flex;
    align-items: center;
    padding: 0 4% 0 40%;
    color: #3A2A14 !important;
}
.mh-tg-btn::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -12% -3.03%;
    background: center / 100% 100% no-repeat;
}
.mh-tg-btn.is-ios { --img: url("/assets/game/ui/tg/ios.webp"); }
.mh-tg-btn.is-apk { --img: url("/assets/game/ui/tg/apk.webp"); }
.mh-tg-btn.is-gp { --img: url("/assets/game/ui/tg/gp.webp"); }
.mh-tg-btn.is-pc { --img: url("/assets/game/ui/tg/pc.webp"); }
/* ô Hỗ trợ dùng vị trí ô PC, ảnh cùng khung nhưng biểu tượng tai nghe */
.mh-tg-btn.is-hotro { --img: url("/assets/game/ui/tg/hotro.webp"); }
.mh-tg-btn::before { background-image: var(--img); }
/* nút hợp với máy đang dùng (iPhone → App Store, Android → Google Play; home.js gắn .is-goi-y):
   quầng son đỏ ôm theo hình nút */
.mh-tg-btn.is-goi-y::before {
    filter: drop-shadow(0 0 3px #B8322A) drop-shadow(0 0 8px rgba(184, 50, 42, .55));
}
.mh-tg-btn span {
    font-size: max(12px, 1.35cqw);
    line-height: 1.2;
    white-space: nowrap;
}
.mh-tg-btn b {
    display: block;
    font-family: var(--serif);
    font-size: 2.15cqw;
    font-weight: 700;
    color: #2A1C0A;
}

/* ---------- HIỆU ỨNG NÚT (tải game + Đăng ký trước) ----------
   Vệt sáng là một dải gradient chạy bằng background-position (không dùng transform để
   mask đứng yên); mask-image là chính ảnh nút nên vệt sáng chỉ lướt trên hình nút, không
   tràn ra phần trong suốt. */
@keyframes mh-shine {
    0%, 55% { background-position: 160% 0; }
    100% { background-position: -60% 0; }
}
@keyframes mh-glow {
    0%, 100% { filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .35)); }
    50% { filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .35)) drop-shadow(0 0 16px rgba(255, 214, 110, .75)); }
}
.mh-tg-lon::after,
.mh-tg-btn::after,
.mh-body .mh-cd-dk::before {
    content: "";
    position: absolute;
    pointer-events: none;
    background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .75) 50%, transparent 62%) 160% 0 / 250% 100% no-repeat;
    -webkit-mask: var(--img) center / 100% 100% no-repeat;
    mask: var(--img) center / 100% 100% no-repeat;
}
/* nút lớn: vệt sáng lướt mỗi ~3.5s, hai nút lệch nhịp */
.mh-tg-lon::after {
    inset: 0;
    z-index: -1;
    animation: mh-shine 3.5s ease-in-out infinite;
}
.mh-tg-code::after {
    animation-delay: -1.75s;
}
/* nút nhỏ: vệt sáng lướt một lượt khi rê chuột */
.mh-tg-btn::after {
    inset: -12% -3.03%;
    z-index: -1;
}
.mh-tg-btn:hover::after {
    animation: mh-shine .9s ease-out;
}
/* Đăng ký trước: viền sáng vàng nhấp nháy, vệt sáng lướt (không di chuyển) */
.mh-body .mh-cd-dk {
    --img: url("/assets/game/ui/bg-dk.webp");
    position: relative;
    isolation: isolate;
    animation: mh-glow 2.4s ease-in-out infinite;
}
.mh-body .mh-cd-dk::before {
    inset: 0;
    z-index: -1;
    animation: mh-shine 3s ease-in-out infinite;
}
.mh-body .mh-cd-dk:hover {
    animation-play-state: paused;
}

/* ---------- ĐUA TOP LỰC CHIẾN (khối trang chủ, mục 3.6) ----------
   Dựng theo ảnh mẫu public/Trang1/Demo1.png: nền nối tiếp màu xanh đêm cuối hero, chuyển dần
   sang cam đất rồi kem; trái = tiêu đề thư pháp + iPhone trên bệ (art thienhadenha) + đếm ngược
   + 2 nút vàng, phải = 3 băng rôn Top 1-3 (art Trang1/1–3 (2).png) + danh sách Top 4-10. */
.mh-dt2 {
    position: relative;
    /* chi chan tran ngang (art phong 160%), de tieu de duoc troi len de nhe mep duoi hero */
    overflow-x: clip;
    padding: 8px 0 90px;
    background: linear-gradient(180deg, #1c2539 0%, #2b2738 14%, #6b3f3c 36%, #b9694a 56%, #dc9c76 74%, #f0d9c6 90%, #f6ece2 100%);
    color: #fff;
}
/* pháo hoa trang trí, hoà sáng vào nền tối bằng screen */
.mh-dt2-fw {
    position: absolute;
    z-index: 0;
    width: 360px;
    height: auto;
    mix-blend-mode: screen;
    pointer-events: none;
}
/* pháo hoa nổ: sprite 16 khung 256px ngang (4096x256). Mỗi quả chạy 16 khung trong 1.2s rồi
   tắt, nghỉ tới hết chu kỳ --t; mỗi quả lệch giờ nổ (--d) và cỡ (--s) nên nhìn ngẫu nhiên.
   Chỉ nổ quanh cụm iPhone + bệ: lớp này nằm TRONG .mh-dt2-stage, vị trí/cỡ tính theo % ảnh
   phanthuong.webp (iPhone ~ x 25-72%, y 25-60%) nên tự co theo màn hình. Nằm trên art, screen
   nên chỉ làm sáng. */
.mh-dt2-fx {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}
.mh-dt2-fx i {
    position: absolute;
    width: var(--s, 20%);
    aspect-ratio: 1;
    /* margin % luôn tính theo bề ngang khối cha => căn tâm đúng cả 2 chiều */
    margin: calc(var(--s, 20%) / -2) 0 0 calc(var(--s, 20%) / -2);
    background: var(--fx) 0 0 / 1600% 100% no-repeat;
    /* nền art sáng vàng: screen làm pháo hoa chìm, dùng hiển thị thường + quầng cam để nổi */
    filter: var(--hue, none) drop-shadow(0 0 8px rgba(255, 170, 60, .95)) brightness(1.3);
    opacity: 0;
    animation: mh-dt2-fx-frames var(--t, 3.6s) steps(1) var(--d, 0s) infinite;
}
.mh-dt2-fx .is-1  { left: 17%; top: 20%; --s: 26%; --t: 2.6s; --d: 0.1s; }
.mh-dt2-fx .is-2  { left: 82%; top: 20%; --s: 27%; --t: 2.9s; --d: 0.5s; }
.mh-dt2-fx .is-3  { left: 48%; top: 5%; --s: 24%; --t: 2.7s; --d: 1s; }
.mh-dt2-fx .is-4  { left: 11%; top: 46%; --s: 22%; --t: 2.5s; --d: 1.5s; }
.mh-dt2-fx .is-5  { left: 88%; top: 46%; --s: 22%; --t: 2.8s; --d: 0.3s; }
.mh-dt2-fx .is-6  { left: 30%; top: 6%; --s: 20%; --t: 3s; --d: 0.8s; }
.mh-dt2-fx .is-7  { left: 67%; top: 6%; --s: 20%; --t: 2.6s; --d: 1.9s; }
.mh-dt2-fx .is-8  { left: 8%; top: 70%; --s: 19%; --t: 3.1s; --d: 1.2s; }
.mh-dt2-fx .is-9  { left: 91%; top: 70%; --s: 19%; --t: 2.7s; --d: 2.2s; }
.mh-dt2-fx .is-10 { left: 22%; top: 34%; --s: 17%; --t: 2.4s; --d: 2.6s; }
.mh-dt2-fx .is-11 { left: 77%; top: 34%; --s: 17%; --t: 2.9s; --d: 0.6s; }
.mh-dt2-fx .is-12 { left: 39%; top: 16%; --s: 16%; --t: 3.2s; --d: 2s; }
.mh-dt2-fx .is-13 { left: 58%; top: 14%; --s: 17%; --t: 2.6s; --d: 1.4s; }
.mh-dt2-fx .is-14 { left: 4%; top: 28%; --s: 18%; --t: 3s; --d: 0.9s; }
.mh-dt2-fx .is-15 { left: 96%; top: 30%; --s: 18%; --t: 2.8s; --d: 1.7s; }
.mh-dt2-fx .is-16 { left: 14%; top: 8%; --s: 18%; --t: 2.7s; --d: 2.4s; }
.mh-dt2-fx .is-17 { left: 86%; top: 6%; --s: 19%; --t: 3.1s; --d: 0.2s; }
.mh-dt2-fx .is-18 { left: 24%; top: 58%; --s: 15%; --t: 2.5s; --d: 1.1s; }
.mh-dt2-fx .is-19 { left: 76%; top: 58%; --s: 15%; --t: 2.9s; --d: 2.8s; }
.mh-dt2-fx .is-20 { left: 50%; top: -4%; --s: 21%; --t: 3.3s; --d: 1.6s; }
.mh-dt2-fx .is-21 { left: 3%; top: 58%; --s: 16%; --t: 2.6s; --d: 2s; }
.mh-dt2-fx .is-22 { left: 97%; top: 58%; --s: 16%; --t: 3s; --d: 0.7s; }
/* đổi màu một số quả cho rực rỡ: đỏ hồng, tím, xanh ngọc, cam */
.mh-dt2-fx .is-3, .mh-dt2-fx .is-11, .mh-dt2-fx .is-18 { --hue: hue-rotate(-50deg) saturate(1.8); }
.mh-dt2-fx .is-6, .mh-dt2-fx .is-15, .mh-dt2-fx .is-21 { --hue: hue-rotate(-110deg) saturate(1.6); }
.mh-dt2-fx .is-9, .mh-dt2-fx .is-14, .mh-dt2-fx .is-20 { --hue: hue-rotate(130deg) saturate(1.5); }
.mh-dt2-fx .is-4, .mh-dt2-fx .is-17 { --hue: hue-rotate(-25deg) saturate(2); }
/* 16 khung chạy trong 60% đầu chu kỳ (~2.2s với chu kỳ 3.6s) cho pháo nổ chậm, nhìn rõ; 40% còn lại tắt */
@keyframes mh-dt2-fx-frames {
    0%    { opacity: 1; background-position: 0 0; }
    4%    { background-position: calc(100% / 15 * 1) 0; }
    8%    { background-position: calc(100% / 15 * 2) 0; }
    12%   { background-position: calc(100% / 15 * 3) 0; }
    16%   { background-position: calc(100% / 15 * 4) 0; }
    20%   { background-position: calc(100% / 15 * 5) 0; }
    24%   { background-position: calc(100% / 15 * 6) 0; }
    28%   { background-position: calc(100% / 15 * 7) 0; }
    32%   { background-position: calc(100% / 15 * 8) 0; }
    36%   { background-position: calc(100% / 15 * 9) 0; }
    40%   { background-position: calc(100% / 15 * 10) 0; }
    44%   { background-position: calc(100% / 15 * 11) 0; }
    48%   { background-position: calc(100% / 15 * 12) 0; }
    52%   { background-position: calc(100% / 15 * 13) 0; }
    56%   { background-position: calc(100% / 15 * 14) 0; }
    60%   { background-position: 100% 0; }
    64%, 100% { opacity: 0; background-position: 100% 0; }
}

@media (max-width: 760px) {
    .mh-dt2-fx i:nth-child(n+15) { display: none; }
}
.mh-dt2-fw.is-a { left: max(0px, calc(50% - 720px)); top: 150px; }
.mh-dt2-fw.is-c { left: max(-60px, calc(50% - 760px)); top: 620px; width: 300px; opacity: .8; }
.mh-dt2-in {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
    /* khoảng cách cột rộng: art iPhone + bệ (phóng 160%) không áp sát danh sách bên phải */
    gap: 96px;
    align-items: start;
}
.mh-dt2-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
/* .mh-dt2 dung truoc: .mh-body h2 { margin: 0 } manh hon mot class don */
.mh-dt2 .mh-dt2-title {
    position: relative;
    z-index: 1;
    margin: -46px 0 0;
    width: 145%;
    max-width: 940px;
}
.mh-dt2-title img {
    display: block;
    width: 100%;
    height: auto;
}

/* iPhone trên bệ (art phanthuong.webp, đã kèm pháo hoa + nhãn "Giải thưởng Top 1"),
   3 ô quà Top 1 (quatop1.webp) chồng lên mặt trước bệ trên một tấm nền tối như ảnh mẫu */
.mh-dt2-stage {
    position: relative;
    z-index: 0;
    /* art co vung hao quang rong: phong 160% cot de cum iPhone gan bang ca cot,
       keo len 31% (theo be ngang cot) de vung trong phia tren khong day khoi xuong */
    width: 160%;
    max-width: 1080px;
    margin: -31% 0 -3%;
    /* tam cum iPhone + be trong art nam o 46% be ngang anh (khong phai 50%):
       day anh sang phai 4% de cum nay dung giua cot */
    translate: 4% 0;
    pointer-events: none;
}
.mh-dt2-prize {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1131 / 742;
}
/* dat theo tam be (46%), khong theo tam anh */
.mh-dt2-gifts {
    position: absolute;
    left: 46%;
    top: 72%;
    width: 47%;
    transform: translateX(-50%);
}
.mh-dt2-gifts::before {
    content: "";
    position: absolute;
    /* 3 o qua (phan dac) nam o x 11.2-89.3%, y 23.4-73.4% cua quatop1.webp:
       tam nen boc deu ~20px quanh ca 4 phia */
    inset: 15.2% 7.2% 18.4% 7.7%;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(48, 14, 8, .82), rgba(24, 6, 4, .88));
    box-shadow: 0 10px 24px rgba(40, 8, 4, .4);
}
.mh-dt2-gifts img {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 572 / 244;
}
/* hiệu ứng quanh 3 ô quà: vệt sáng chạy vòng theo viền (conic xoay, cắt thành vành bằng mask)
   + vành nhấp nháy nhẹ (mask cắt mất bóng đổ nên dùng độ mờ thay vì drop-shadow). Ô trong quatop1.webp: x 62-188 / 224-350 / 386-512, y 56-177 (572x244). */
.mh-dt2-gift-fx {
    position: absolute;
    top: 20.6%;
    width: 25.2%;
    height: 54.8%;
    padding: 1%;
    border-radius: 6px;
    overflow: hidden;
    pointer-events: none;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    animation: mh-dt2-gift-glow 2s ease-in-out infinite;
}
.mh-dt2-gift-fx.is-1 { left: 9.3%; }
.mh-dt2-gift-fx.is-2 { left: 37.6%; animation-delay: .65s; }
.mh-dt2-gift-fx.is-3 { left: 65.9%; animation-delay: 1.3s; }
.mh-dt2-gift-fx::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 300%;
    aspect-ratio: 1;
    translate: -50% -50%;
    background: conic-gradient(from 0deg, transparent 0 40%, rgba(255, 210, 60, .5) 55%, #fff6c4 66%, #fff 70%, #ffd23c 76%, transparent 86%, transparent 100%);
    animation: mh-dt2-spin 2.4s linear infinite;
}
.mh-dt2-gift-fx.is-2::before { animation-delay: -.8s; }
.mh-dt2-gift-fx.is-3::before { animation-delay: -1.6s; }
@keyframes mh-dt2-gift-glow {
    0%, 100% { opacity: .8; }
    50% { opacity: 1; }
}

/* đếm ngược: khung art top1-lodien.webp (417x179, viền vàng chạm) + 4 ô ngay.webp (65x96,
   vạch ngăn nhãn/số nằm ở 32% chiều cao ô) */
.mh-dt2-cd {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 400px;
    max-width: 100%;
    aspect-ratio: 417 / 179;
    margin-top: 22px;
    /* chua cho hoa van o dinh khung (~ 14% chieu cao) */
    padding-top: 27px;
    background: url('/assets/game/thienhadenha/top1-lodien.webp') center / 100% 100% no-repeat;
    filter: drop-shadow(0 10px 18px rgba(40, 10, 4, .35));
}
/* chữ đứng nét đậm hẹp, đổ vàng -> cam + viền tối, quầng cam như ảnh mẫu
   (chữ gradient nên bóng/viền dùng drop-shadow thay text-shadow) */
.mh-dt2-cd-label {
    display: block;
    margin-bottom: 6px;
    padding: 0 4px;
    font-family: var(--serif);
    font-size: 25px;
    font-weight: 700;
    line-height: 1.2;
    color: #ffb22e;
    background: linear-gradient(180deg, #ffe45c 15%, #ffb21f 55%, #ff7a0e 92%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 1px 0 #5a1a04) drop-shadow(0 0 6px rgba(255, 120, 20, .55));
}
.mh-dt2-cd-row {
    display: flex;
    gap: 12px;
}
.mh-dt2-cd-o {
    display: flex;
    flex-direction: column;
    width: 60px;
    aspect-ratio: 65 / 96;
    background: url('/assets/game/thienhadenha/ngay.webp') center / 100% 100% no-repeat;
}
.mh-dt2-cd-o span {
    display: grid;
    place-items: center;
    height: 32%;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
}
.mh-dt2-cd-o b {
    display: grid;
    place-items: center;
    flex: 1;
    padding-bottom: 4px;
    font-family: var(--serif);
    font-style: italic;
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
    color: #ffcb52;
    text-shadow: 0 2px 0 #6b2a07;
}
.mh-dt2 .mh-dt2-note {
    max-width: 440px;
    margin: 26px 0 0;
    padding: 12px 18px;
    border-radius: 10px;
    background: rgba(36, 14, 8, .6);
    color: #ffe7c0;
}

/* 2 nút vàng: khung nut-vang.webp (cắt từ thienhadenha/Thelecuocthi.png, bỏ chữ in sẵn; 200x140,
   2 đầu nhọn rộng 98px). border-image giữ nguyên 2 đầu, chỉ kéo giãn phần thân theo độ dài chữ.
   Ảnh có quầng sáng trong suốt trên/dưới (thân vàng chỉ chiếm y 33-94/140) nên margin âm bù lại. */
.mh-dt2-cta {
    display: flex;
    /* 2 nút luôn cùng 1 hàng (cột trái hẹp đi vì gap lớn): không xuống dòng */
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 0 14px;
    margin-top: 2px;
}
.mh-dt2-btn {
    --h: 100px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--h);
    /* 2 dau co quang sang trong suot ~16px: chong len nhau cho 2 nut sat nhu anh mau */
    margin: -16px -14px -20px;
    padding: 0 6px 8px;
    border-style: solid;
    border-width: 0 calc(var(--h) * .7);
    border-image: url('/assets/game/duatop/nut-vang.webp') 0 98 fill / 0 calc(var(--h) * .7) stretch;
    color: #6e1405;
    font-size: 25px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    transition: transform .15s ease, filter .15s ease;
}
.mh-dt2-btn.is-lg { --h: 104px; padding: 0 8px 8px; font-size: 27px; }
.mh-dt2-btn:hover { transform: translateY(-2px); filter: brightness(1.08); color: #6e1405; }
/* nút Thể lệ = nguyên ảnh thelecuocthi.webp (348x140, cùng bộ khung với nut-vang.webp): cao bằng
   nút bên cạnh để thân vàng 2 nút thẳng hàng, margin âm như .mh-dt2-btn để bù quầng sáng */
.mh-dt2-btn-img {
    display: block;
    margin: -18px -16px -23px;
    transition: transform .15s ease, filter .15s ease;
}
.mh-dt2-btn-img img {
    display: block;
    width: auto;
    /* thân vàng = 41% ảnh => cao 49px như thiết kế */
    height: 120px;
}
.mh-dt2-btn-img:hover { transform: translateY(-2px); filter: brightness(1.08); }
/* nút chính xem-day-du.webp: thân vàng chiếm 65% chiều cao ảnh (y 11-106/146), nút Thể lệ chỉ 41%
   (y 35-92/140) => cao 66px để thân vàng 2 nút bằng nhau (~43px); margin lệch để tâm thân 2 nút thẳng hàng */
.mh-dt2-btn-img.is-main { margin: 5px -5px -5px; }
.mh-dt2-btn-img.is-main img { height: 75px; }

/* ---- cột phải: băng rôn Top 1-3 ----
   Ảnh 3 băng có phần trong suốt khác nhau (bang-1 có quầng sáng rộng). Đo alpha: phần băng nhìn
   thấy theo chiều cao ảnh = bang-1 8.5-85.8%, bang-2 0.9-96.9%, bang-3 1.3-97%; theo bề ngang
   bang-1 73.5%, bang-2 98%, bang-3 95%. Cột chia sao cho băng Top 1 rộng hơn ~15% so với 2 băng
   bên (như ảnh mẫu) và mũi nhọn dưới thấp hơn một chút.
   Avatar / dải tên / Lực Chiến đặt theo tỉ lệ của PHẦN BĂNG NHÌN THẤY (--t0..--t1) chứ không theo
   cả ảnh, nên 3 băng thẳng hàng với nhau. Cỡ chữ theo cqw (bề ngang ảnh từng băng) đã quy đổi để
   chữ 3 băng gần bằng nhau, Top 1 nhỉnh hơn. */
.mh-dt2-podium {
    display: grid;
    /* phần băng Top 1 nhìn thấy = 73.5% ảnh; ảnh phóng 136% cột (margin -18% x2) nên thân băng
       bằng đúng bề cột và mép chạm 2 băng bên. Cột 35 : 31/32 => Top 1 to hơn băng bên ~12% */
    grid-template-columns: 31fr 35fr 32fr;
    align-items: end;
    margin: 0 0 6px;
    padding: 0;
    list-style: none;
}
.mh-dt2-pod {
    position: relative;
    container-type: inline-size;
    --t0: .9%;
    --t1: 96.9%;
    --y-ava: .365;
    --y-info: .51;
    --ava: 33cqw;
    --f-name: 8.6cqw;
    --f-id: 5.8cqw;
    --f-lc: 12.5cqw;
    --inset: 11%;
}
.mh-dt2-pod.is-p1 {
    z-index: 2;
    /* quầng sáng 2 bên ảnh Top 1 rộng ~13%: kéo 2 băng bên áp sát thân băng Top 1 như ảnh mẫu */
    /* đáy âm sâu hơn = hạ băng Top 1 xuống: thanh treo 2 băng bên chỉ thấp hơn Top 1 ~1/6 bề ngang băng bên như ảnh mẫu */
    margin: 0 -18% -25%;
    --t0: 8.5%;
    --t1: 85.8%;
    --y-ava: .35;
    --y-info: .525;
    --info-w: 104%;
    --ava: 23.5cqw;
    --f-name: 6.2cqw;
    --f-id: 4.1cqw;
    --f-lc: 9.6cqw;
    --inset: 20%;
}
.mh-dt2-pod.is-p3 {
    --t0: 1.3%;
    --t1: 97%;
    --ava: 30cqw;
    --f-name: 7.8cqw;
    --f-id: 5.3cqw;
    --f-lc: 11.4cqw;
    --inset: 12%;
}
/* 2 băng bên áp sát thân băng Top 1 (nằm dưới nó) như ảnh mẫu */
.mh-dt2-pod.is-p2 { translate: 9% 0; }
.mh-dt2-pod.is-p3 { translate: -9% 0; }
.mh-dt2-pod-bg {
    display: block;
    width: 100%;
    height: auto;
}
.mh-dt2-pod.is-p1 .mh-dt2-pod-bg { aspect-ratio: 418 / 529; filter: drop-shadow(0 0 18px rgba(255, 214, 80, .75)); }

/* ---- hiệu ứng 3 băng rôn ----
   Vào khung (home.js thêm .is-in khi cuộn tới): Top 1 rơi xuống + nảy, Top 2 trượt từ trái,
   Top 3 trượt từ phải. Sau đó (băng đứng yên): Top 1 quầng vàng thở, vệt sáng quét
   ngang thân băng (mask theo đúng hình băng), viền ảnh đại diện lấp lánh xoay.
   Không có JS thì băng hiện bình thường; prefers-reduced-motion đã tắt mọi animation (đầu file). */
.mh-dt2-podium.js-anim:not(.is-in) .mh-dt2-pod { opacity: 0; }
.mh-dt2-podium.is-in .mh-dt2-pod.is-p1 { animation: mh-dt2-drop .9s cubic-bezier(.2, 1.4, .4, 1) .15s both; }
.mh-dt2-podium.is-in .mh-dt2-pod.is-p2 { animation: mh-dt2-from-l .7s cubic-bezier(.2, .9, .3, 1.15) .45s both; }
.mh-dt2-podium.is-in .mh-dt2-pod.is-p3 { animation: mh-dt2-from-r .7s cubic-bezier(.2, .9, .3, 1.15) .6s both; }
@keyframes mh-dt2-drop {
    0% { opacity: 0; transform: translateY(-40%) scale(.85); }
    60% { opacity: 1; }
    100% { opacity: 1; transform: none; }
}
@keyframes mh-dt2-from-l {
    0% { opacity: 0; transform: translateX(-30%) rotate(-6deg); }
    100% { opacity: 1; transform: none; }
}
@keyframes mh-dt2-from-r {
    0% { opacity: 0; transform: translateX(30%) rotate(6deg); }
    100% { opacity: 1; transform: none; }
}
/* quầng vàng Top 1 "thở" */
.mh-dt2-pod.is-p1 .mh-dt2-pod-bg { animation: mh-dt2-glow 2.6s ease-in-out infinite; }
@keyframes mh-dt2-glow {
    0%, 100% { filter: drop-shadow(0 0 14px rgba(255, 214, 80, .6)); }
    50% { filter: drop-shadow(0 0 30px rgba(255, 224, 110, 1)) brightness(1.06); }
}
/* vệt sáng quét chéo, cắt theo hình băng bằng mask chính ảnh băng */
.mh-dt2-pod::after {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    aspect-ratio: var(--ar);
    background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .55) 50%, transparent 62%) -150% 0 / 250% 100% no-repeat;
    -webkit-mask: var(--mask) top / 100% 100% no-repeat;
    mask: var(--mask) top / 100% 100% no-repeat;
    mix-blend-mode: soft-light;
    pointer-events: none;
    animation: mh-dt2-shine 4.5s ease-in-out infinite;
}
.mh-dt2-pod.is-p1 { --ar: 418 / 529; --mask: url('/Trang1/1 (2).png'); }
.mh-dt2-pod.is-p2 { --ar: 305 / 387; --mask: url('/Trang1/2 (2).png'); }
.mh-dt2-pod.is-p3 { --ar: 337 / 426; --mask: url('/Trang1/3 (2).png'); }
.mh-dt2-pod.is-p1::after { animation-duration: 3.2s; mix-blend-mode: overlay; }
.mh-dt2-pod.is-p2::after { animation-delay: 1.1s; }
.mh-dt2-pod.is-p3::after { animation-delay: 2.2s; }
@keyframes mh-dt2-shine {
    0%, 55% { background-position: -150% 0; }
    100% { background-position: 250% 0; }
}
/* viền ảnh đại diện: vòng sáng xoay */
.mh-dt2-ava::before {
    content: "";
    position: absolute;
    inset: -2.2cqw;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0 70%, rgba(255, 236, 160, .95) 82%, transparent 94%);
    -webkit-mask: radial-gradient(closest-side, transparent 80%, #000 82%);
    mask: radial-gradient(closest-side, transparent 80%, #000 82%);
    animation: mh-dt2-spin 3.6s linear infinite;
    pointer-events: none;
}
.mh-dt2-pod.is-p2 .mh-dt2-ava::before { animation-duration: 4.4s; }
.mh-dt2-pod.is-p3 .mh-dt2-ava::before { animation-duration: 5s; }
@keyframes mh-dt2-spin { to { transform: rotate(1turn); } }
/* số Lực Chiến Top 1 lấp lánh nhẹ */
.mh-dt2-pod.is-p1 .mh-dt2-pod-lc { animation: mh-dt2-lc 2.6s ease-in-out infinite; }
@keyframes mh-dt2-lc {
    0%, 100% { color: #ffe874; }
    50% { color: #fff6c0; }
}
.mh-dt2-pod.is-p2 .mh-dt2-pod-bg { aspect-ratio: 305 / 387; }
.mh-dt2-pod.is-p3 .mh-dt2-pod-bg { aspect-ratio: 337 / 426; }
.mh-dt2-pod-body {
    position: absolute;
    inset: 0 var(--inset);
    text-align: center;
}
/* mỗi phần đặt tâm tại tỉ lệ --y của phần băng nhìn thấy */
.mh-dt2-pod-body > * {
    position: absolute;
    left: 50%;
    top: calc(var(--t0) + (var(--t1) - var(--t0)) * var(--y));
    translate: -50% -50%;
}
.mh-dt2-ava {
    --y: var(--y-ava);
    width: var(--ava);
    aspect-ratio: 1;
    /* khung ảnh đại diện kiểu demo: viền vàng dày + vòng xanh ngọc + quầng sáng */
    border: 1.1cqw solid #f6d77e;
    border-radius: 50%;
    background: #2d3a2a no-repeat 50% 6% / 400%;
    box-shadow: 0 0 0 .7cqw #4f9a48, 0 0 0 1.2cqw rgba(246, 215, 126, .55), 0 0 3cqw rgba(255, 220, 120, .55), 0 3px 8px rgba(0, 0, 0, .45);
}
/* khối thông tin = dải tên (tên + server/ID) liền ngay trên dải Lực Chiến, như demo:
   2 tấm nền chữ nhật mờ trải ngang thân băng, tấm dưới đậm hơn. Neo theo MÉP TRÊN tại --y-info. */
.mh-dt2-pod-body > .mh-dt2-pod-info {
    --y: var(--y-info);
    translate: -50% 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    /* nằm gọn trong thân băng (giữa 2 thanh viền) */
    width: var(--info-w, 100%);
}
.mh-dt2-pod-info > * { position: static; translate: none; }
.mh-dt2-pod-band {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Ô tên và ô lực chiến cùng chiều rộng trong mỗi khung hạng. */
    width: 100%;
    padding: 1.6cqw 0 1.8cqw;
    background: linear-gradient(90deg, transparent, rgba(52, 40, 36, .55) 16%, rgba(52, 40, 36, .55) 84%, transparent);
}
.mh-dt2-pod-name {
    max-width: 92%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: var(--f-name);
    font-weight: 600;
    line-height: 1.2;
    color: #ffe7a6;
}
.mh-dt2-pod-band small {
    font-size: var(--f-id);
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
}
.mh-dt2-pod-lc {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.4cqw;
    /* dải nền riêng cho số Lực Chiến (demo): rộng hơn dải tên, tối ở giữa, mờ dần ra 2 đầu,
       tách dải tên bằng một vạch mảnh */
    width: 100%;
    margin: .8cqw 0 0;
    padding: 1.8cqw 0 2cqw;
    background: linear-gradient(90deg, transparent, rgba(24, 12, 6, .62) 16%, rgba(24, 12, 6, .62) 84%, transparent);
    font-family: var(--serif);
    font-size: var(--f-lc);
    font-weight: 700;
    line-height: 1;
    color: #ffe874;
    -webkit-text-stroke: .7cqw #3a1a04;
    paint-order: stroke fill;
    text-shadow: 0 .8cqw 0 #3a1a04, 0 0 2.4cqw rgba(0, 0, 0, .55);
    white-space: nowrap;
}
.mh-dt2-pod-lc img { width: auto; height: 1.1em; }

/* ---- Top 4-10: dải tối mờ chồng lên nền, vòng tròn hạng, gạch ngăn dưới tên ---- */
.mh-dt2-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.mh-dt2-list li {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 64px;
    padding: 6px 18px 6px 10px;
    border-radius: 8px;
    background: url('/assets/game/duatop/cell-den.webp') center / 100% 100% no-repeat, rgba(70, 28, 20, .42);
    box-shadow: inset 0 0 0 1px rgba(255, 220, 170, .08);
}
.mh-dt2-rank {
    flex: none;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    background: url('/assets/game/duatop/so-han.webp') center / contain no-repeat;
    font-family: var(--serif);
    font-size: 28px;
    font-weight: 700;
    color: #fff;
}
.mh-dt2-who {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding-left: 34px;
}
.mh-dt2-who b {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-bottom: 0;
    background: none;
    border-bottom: 0;
    text-decoration: none;
    font-size: 21px;
    font-weight: 500;
    line-height: 1.2;
    color: #ffd98c;
}
.mh-dt2-who small {
    margin-top: 2px;
    padding-left: 4px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}
.mh-dt2-lc {
    flex: none;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--serif);
    font-size: 24px;
    font-weight: 700;
    color: #ffd06a;
    text-shadow: 0 1px 2px rgba(40, 10, 4, .6);
}
.mh-dt2-lc img { width: auto; height: 28px; }
.mh-dt2-tie {
    display: inline-block;
    margin-left: 6px;
    padding: 0 6px;
    border-radius: 4px;
    white-space: nowrap;
    background: rgba(255, 210, 120, .2);
    color: #ffd98c;
    font-size: 12px;
}
.mh-dt2 .mh-dt2-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px 16px;
    margin: 12px 0 0;
    font-size: 14px;
    color: #4a2b1c;
}
.mh-dt2-foot a {
    color: #9a1d10;
    font-weight: 700;
}
/* chưa có người / hạng trống: avatar "?" + câu yêu cầu Lực Chiến tối thiểu ở chỗ của số LC */
.mh-dt2-ava.is-wait {
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 50% 35%, #5b4a35, #2a2016);
    font-size: calc(var(--ava) * .5);
    font-weight: 700;
    color: #f4d27a;
}
.mh-dt2-pod-gift {
    /* nằm trong khối thông tin, chỗ của dải Lực Chiến; 1 dòng */
    width: 116%;
    margin: .8cqw 0 0 -8%;
    padding: 2cqw 6% 2.2cqw;
    background: linear-gradient(90deg, transparent, rgba(24, 12, 6, .62) 16%, rgba(24, 12, 6, .62) 84%, transparent);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: calc(var(--f-lc) * .4);
    font-weight: 700;
    line-height: 1.15;
    color: #fff3b0;
    -webkit-text-stroke: .25cqw #5a2d07;
    paint-order: stroke fill;
    text-shadow: 0 .5cqw 0 #6b3a07;
}
/* khung chờ dữ liệu (API chưa trả ai): giữ nguyên bố cục, chữ nhạt hơn */
.mh-dt2-list.is-wait .mh-dt2-who b { color: #f0dcb4; }
.mh-dt2-list.is-wait .mh-dt2-who small,
.mh-dt2-list.is-wait .mh-dt2-lc { color: #e3cba5; }
/* hạng trống (không ai đạt Lực Chiến tối thiểu của bậc, cms-api mục 2.1): mờ hơn, chữ không vàng */
.mh-dt2-list li.is-empty { background-color: rgba(40, 18, 14, .32); }
.mh-dt2-list li.is-empty .mh-dt2-who b { color: #e9d6b8; font-weight: 500; }
.mh-dt2-list li.is-empty .mh-dt2-who small { color: #d8c3a6; font-weight: 500; }
.mh-dt2-list li.is-empty .mh-dt2-lc { color: #c9b08c; }
.mh-dt2-rank.is-range { display: flex; align-items: center; justify-content: center; font-size: 15px; letter-spacing: -.03em; }
.mh-dt2-rank.is-range small { font-size: 12px; }
.mh-dt2-list.is-tiers .mh-dt2-who small { font-weight: 500; line-height: 1.35; }
.mh-dt2-empty {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 40px 24px;
    border-radius: 12px;
    background: rgba(40, 16, 10, .55);
    text-align: center;
}
.mh-dt2-empty b { font-size: 22px; color: #ffd98c; }
.mh-dt2-empty span { color: #ffeccc; }

/* cột phải kéo cao bằng cột trái (grid stretch), danh sách 4-10 giãn đều khoảng cách
   để đáy hàng 10 thẳng với đáy 2 nút bên trái */
.mh-dt2-right {
    position: relative;
    z-index: 1;
    align-self: stretch;
    display: flex;
    flex-direction: column;
}
.mh-dt2-right .mh-dt2-list {
    flex: 1;
    justify-content: space-between;
    margin-top: 24px;
}

/* ---- 2 pha của khối (data-phase, partials/dua-top-home): pre = trước giờ ra mắt, xem trước
   Phần Thưởng Top 100 + "Top 1 Lộ diện sau" trên bệ; live = BXH. home.js đổi pre -> live khi
   đồng hồ ra mắt ở hero về 0 (thanh đồng hồ hero cũng ẩn theo). ---- */
.mh-hero-cd[hidden] { display: none; }
.mh-dt2[data-phase="pre"] .is-live-only,
.mh-dt2[data-phase="live"] .is-pre-only { display: none; }
/* đồng hồ đặt lên mặt trước bệ, thế chỗ 3 ô quà (cùng tâm bệ 46% như .mh-dt2-gifts) */
.mh-dt2-cd.is-reveal {
    position: absolute;
    left: 46%;
    top: 72%;
    width: 38%;
    margin: 0;
    transform: translateX(-50%);
}
.mh-dt2[data-phase="pre"] .mh-dt2-cta { margin-top: 7%; }
/* cột phải pha pre: tiêu đề art + 3 dải Top 1-3. Nền top{n}.webp có huy chương ở 0-24% bề ngang;
   ô quà đặt từ 32.7% như ảnh mẫu. quatop1.webp có viền sáng rộng (3 ô nằm ở x 62-512/572) nên
   phóng to hơn và lùi trái để 3 ô thẳng cột với 2 dải dưới. */
.mh-dt2-pre { align-items: center; padding-top: 7%; }
.mh-dt2 .mh-dt2-pre-title { margin: 0 0 10px; }
.mh-dt2-pre-title img { display: block; width: min(470px, 100%); height: auto; }
.mh-dt2-rw {
    display: grid;
    gap: 16px;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}
.mh-dt2-rw li {
    position: relative;
    aspect-ratio: 851 / 145;
    background: center / 100% 100% no-repeat;
}
.mh-dt2-rw li img {
    position: absolute;
    top: 50%;
    left: 32.7%;
    width: 51.3%;
    height: auto;
    translate: 0 -50%;
}
.mh-dt2-rw li.is-1 img { left: 25.6%; width: 65.9%; }
/* top1.webp 867x161 có viền sáng ~8px quanh khung 851x145: phóng nền để khung bằng 2 dải dưới */
.mh-dt2-rw li.is-1 { background-size: calc(100% * 867 / 851) calc(100% * 161 / 145); }
.mh-dt2 .mh-dt2-rw-more {
    align-self: flex-end;
    margin-top: 22px;
    padding: 0 6px 2px;
    border-bottom: 3px solid currentColor;
    font-family: var(--serif);
    font-size: 30px;
    font-weight: 600;
    line-height: 1.2;
    color: #3a160c;
    text-decoration: none;
}
.mh-dt2 .mh-dt2-rw-more:hover { color: #8a2a0c; }

/* ---- Popup chúc mừng ra mắt (#mh-launch, home.blade + home.js) ----
   Lớp: nền tối có quầng vàng < pháo hoa toàn màn (sprite .mh-dt2-fx) < kim tuyến rơi < hộp chính
   (hào quang conic xoay sau hộp, hộp nảy vào, chữ vàng lấp lánh). */
.mh-launch-lock, .mh-launch-lock body { overflow: hidden; }
.mh-launch {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: grid;
    place-items: center;
    padding: 16px;
    opacity: 0;
    transition: opacity .3s ease;
}
.mh-launch[hidden] { display: none; }
.mh-launch.is-open { opacity: 1; }
.mh-launch-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 45%, rgba(255, 190, 60, .35), rgba(120, 30, 6, .55) 38%, rgba(12, 6, 4, .88) 75%);
    backdrop-filter: blur(3px);
}
.mh-launch-fx { position: fixed; z-index: 1; }
.mh-launch-fx i { filter: var(--hue, none) drop-shadow(0 0 10px rgba(255, 190, 80, .9)) brightness(1.5); }
.mh-launch-confetti { position: absolute; inset: 0; z-index: 2; overflow: hidden; pointer-events: none; }
.mh-launch-confetti i {
    position: absolute;
    top: -20px;
    left: var(--x);
    width: 9px;
    height: 16px;
    border-radius: 2px;
    background: var(--c);
    box-shadow: 0 0 6px var(--c);
    opacity: 0;
    animation: mh-launch-fall var(--t) linear var(--d) infinite;
}
.mh-launch-confetti i:nth-child(3n) { width: 7px; height: 7px; border-radius: 50%; }
@keyframes mh-launch-fall {
    0% { opacity: 1; transform: translate3d(0, 0, 0) rotate(var(--r)); }
    50% { transform: translate3d(40px, 52vh, 0) rotate(calc(var(--r) + 360deg)); }
    100% { opacity: .9; transform: translate3d(-20px, 105vh, 0) rotate(calc(var(--r) + 720deg)); }
}
.mh-launch-box {
    position: relative;
    z-index: 3;
    width: min(580px, 100%);
    padding: 34px 40px 26px;
    /* khung vàng 2 lớp như bảng 18+ của site + 4 ngọc góc; nền = tranh nen.webp (Đua Top)
       phủ đỏ sơn mài, quầng vàng phía trên chỗ logo */
    border: 2px solid #f0c75e;
    border-radius: 6px;
    /* đỏ son thẫm ngả hồng ngọc (không ngả cam cho khỏi "đỏ lửa"): sáng nhẹ ở giữa, đậm dần ra mép;
       quầng vàng dịu phía trên (chỗ logo) */
    background:
        radial-gradient(ellipse 70% 40% at 50% 0, rgba(255, 210, 110, .45), rgba(255, 170, 70, .12) 55%, transparent 80%),
        radial-gradient(ellipse 85% 65% at 50% 55%, rgba(200, 40, 70, .35), transparent 75%),
        linear-gradient(180deg, rgba(150, 18, 36, .9), rgba(112, 12, 28, .93) 55%, rgba(66, 6, 18, .97)),
        #6a0c18 url('/assets/game/thienhadenha/nen.webp') center / cover no-repeat;
    box-shadow:
        inset 0 0 40px rgba(40, 0, 10, .6),
        0 0 0 4px rgba(50, 4, 12, .85),
        0 0 0 6px #f0c75e,
        0 0 90px rgba(255, 180, 40, .85),
        0 30px 70px rgba(0, 0, 0, .55);
    color: #ffeccc;
    text-align: center;
    transform: scale(.6) translateY(30px);
    transition: transform .55s cubic-bezier(.2, 1.5, .4, 1);
}
.mh-launch.is-open .mh-launch-box { transform: none; }
.mh-launch-box:focus { outline: none; }
/* nút art: viền focus bám đúng thân nút khi dùng bàn phím (không phải cả khung ảnh có quầng sáng) */
.mh-launch .mh-launch-art:focus { outline: none; }
.mh-launch .mh-launch-art:focus-visible img { filter: brightness(1.15) drop-shadow(0 0 0 #fff) drop-shadow(0 0 6px #fff6c4); }
/* hào quang nằm sau hộp (anh em của hộp, không phải con: con z-index âm vẫn vẽ đè lên nền hộp) */
.mh-launch-rays {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: min(1100px, 190vw);
    aspect-ratio: 1;
    translate: -50% -50%;
    opacity: 0;
    transition: opacity .6s ease .2s;
    border-radius: 50%;
    background: repeating-conic-gradient(rgba(255, 214, 90, .55) 0 7deg, transparent 7deg 20deg);
    -webkit-mask: radial-gradient(circle, #000 18%, transparent 68%);
    mask: radial-gradient(circle, #000 18%, transparent 68%);
    animation: mh-launch-spin 14s linear infinite;
    pointer-events: none;
}
.mh-launch.is-open .mh-launch-rays { opacity: 1; }
@keyframes mh-launch-spin { to { rotate: 360deg; } }
/* viền chỉ vàng mảnh bên trong khung */
.mh-launch-box::before {
    content: "";
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(255, 210, 110, .45);
    border-radius: 3px;
    pointer-events: none;
}
.mh-launch-gem {
    position: absolute;
    width: 14px;
    height: 14px;
    background: linear-gradient(135deg, #fff1b8, #f0c75e 55%, #93641c);
    box-shadow: 0 0 0 2px #4a1206, 0 0 8px rgba(255, 200, 80, .9);
    rotate: 45deg;
}
.mh-launch-gem.is-tl { left: -8px; top: -8px; }
.mh-launch-gem.is-bl { left: -8px; bottom: -8px; }
.mh-launch-gem.is-br { right: -8px; bottom: -8px; }
/* nút đóng = art close.webp (hình thoi) của bộ popup quảng bá, treo ở góc phải trên khung */
.mh-launch .mh-launch-x {
    position: absolute;
    top: -22px;
    right: -22px;
    z-index: 2;
    width: 50px;
    height: 46px;
    padding: 0;
    border: 0;
    background: url('/assets/game/popup/close.webp') center / contain no-repeat;
    cursor: pointer;
    transition: transform .15s ease, filter .15s ease;
}
.mh-launch .mh-launch-x:hover { transform: rotate(90deg); filter: brightness(1.15); }
.mh-launch-logo {
    display: block;
    width: min(180px, 50%);
    height: auto;
    margin: -96px auto 4px;
    border-radius: 18%;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .6)) drop-shadow(0 0 20px rgba(255, 190, 60, .6));
    animation: mh-launch-float 3s ease-in-out infinite;
}
@keyframes mh-launch-float { 50% { transform: translateY(-6px); } }
/* ngày giờ giữa 2 vạch vàng có hình thoi ở đầu */
.mh-launch .mh-launch-eyebrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0 0 2px;
    color: #ffd98a;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .08em;
}
.mh-launch-eyebrow::before,
.mh-launch-eyebrow::after {
    content: "";
    width: 70px;
    height: 7px;
    background:
        linear-gradient(45deg, #ffd76a 50%, transparent 50%) var(--gx) 50% / 7px 7px no-repeat,
        linear-gradient(var(--gd), transparent, #ffd76a) 0 50% / 100% 1px no-repeat;
}
.mh-launch-eyebrow::before { --gd: 90deg; --gx: 100%; }
.mh-launch-eyebrow::after { --gd: 270deg; --gx: 0; }
/* tiêu đề thư pháp FZ GameBR (font của trang chủ) vàng đổ cam, viền nâu, vệt sáng chạy ngang */
.mh-launch .mh-launch-title {
    margin: 0 0 8px;
    padding: 6px 4px 2px;
    font-family: "FZ GameBR", var(--serif);
    font-size: clamp(40px, 8vw, 62px);
    font-weight: 400;
    line-height: 1.15;
    background: linear-gradient(100deg, #ffc93a 20%, #fff8d2 38%, #ffe066 48%, #ff9a1a 72%) 0 0 / 250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 0 #4a1203) drop-shadow(0 0 1px #4a1203) drop-shadow(0 0 16px rgba(255, 140, 20, .85));
    animation: mh-launch-shine 3s linear infinite;
}
@keyframes mh-launch-shine { to { background-position: -250% 0; } }
.mh-launch .mh-launch-text { max-width: 430px; margin: 0 auto 6px; font-size: 18px; line-height: 1.45; color: #ffe6c2; }
.mh-launch-text b { color: #ffd54a; }
/* nút art nhan-game-ngay.webp (692x259, thân nút ~ y 27-77%): cao 92px -> thân ~46px;
   nút phụ .mh-dt2-btn (khung nut-vang.webp) chỉnh cao bằng thân nút art */
.mh-launch-cta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0 4px; }
.mh-launch .mh-launch-art { display: block; margin: -4px -14px -10px; transition: transform .15s ease, filter .15s ease; }
.mh-launch-art img { display: block; width: auto; height: 96px; animation: mh-launch-pulse 1.6s ease-in-out infinite; }
.mh-launch .mh-launch-art:hover { transform: translateY(-2px); filter: brightness(1.1); }
@keyframes mh-launch-pulse { 50% { filter: brightness(1.15) drop-shadow(0 0 10px rgba(255, 200, 80, .9)); } }
/* nút phụ: lục giác 2 đầu nhọn như nút art. Lớp ngoài = viền vàng (gradient), ::before thụt 2px = thân
   đỏ sẫm cùng tông nền popup. Thân cao 46px = thân nút art (96px ảnh x ~48%). */
.mh-launch .mh-launch-sub {
    --tip: 20px;
    position: relative;
    z-index: 0;
    display: inline-grid;
    place-items: center;
    height: 46px;
    margin: 0 10px;
    padding: 0 38px 2px;
    clip-path: polygon(0 50%, var(--tip) 0, calc(100% - var(--tip)) 0, 100% 50%, calc(100% - var(--tip)) 100%, var(--tip) 100%);
    background: linear-gradient(180deg, #fff0b0, #e0a83c 50%, #a8691c);
    color: #ffe3a0;
    font-family: var(--serif);
    font-size: 21px;
    font-weight: 600;
    letter-spacing: .02em;
    text-decoration: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
    white-space: nowrap;
    transition: transform .15s ease, filter .15s ease, color .15s ease;
}
.mh-launch-sub::before {
    content: "";
    position: absolute;
    inset: 2px;
    z-index: -1;
    clip-path: polygon(0 50%, calc(var(--tip) - 1px) 0, calc(100% - var(--tip) + 1px) 0, 100% 50%, calc(100% - var(--tip) + 1px) 100%, calc(var(--tip) - 1px) 100%);
    background: linear-gradient(180deg, #b52038, #82101f 60%, #5a0814);
}
.mh-launch .mh-launch-sub:hover { transform: translateY(-2px); filter: brightness(1.15); color: #fff4c8; }
.mh-launch .mh-launch-sub:focus-visible { outline: none; filter: brightness(1.25); }
@media (max-width: 480px) {
    .mh-launch-box { padding: 28px 16px 18px; }
    .mh-launch-logo { margin-top: -78px; }
    .mh-launch .mh-launch-x { top: -18px; right: -10px; width: 42px; height: 38px; }
    .mh-launch .mh-launch-text { font-size: 16px; }
    .mh-launch-eyebrow::before, .mh-launch-eyebrow::after { width: 40px; }
    .mh-launch-art img { height: 80px; }
    .mh-launch .mh-launch-sub { height: 40px; padding: 0 32px 2px; font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
    .mh-launch-fx, .mh-launch-confetti { display: none; }
    .mh-launch-rays, .mh-launch-logo, .mh-launch .mh-launch-title, .mh-launch-art img { animation: none; }
}
@media (max-width: 1100px) {
    .mh-dt2 { padding: 8px 0 60px; }
    .mh-dt2-in { grid-template-columns: minmax(0, 1fr); gap: 34px; }
    /* margin-top am cua .mh-dt2-stage tinh theo be ngang cot: giu cot trai <= 620px de art khong de len nhan */
    .mh-dt2-left { width: 100%; max-width: 620px; margin: 0 auto; }
    .mh-dt2-right { width: 100%; max-width: 660px; margin: 0 auto; }
}
@media (max-width: 760px) {
    /* mobile: tiêu đề vừa khít bề ngang, art iPhone chỉ phóng nhẹ để không bị cắt 2 mép màn hình */
    .mh-dt2 .mh-dt2-title { width: 112%; margin-top: -30px; }
    .mh-dt2-stage { width: 116%; margin-top: -21%; }
    .mh-dt2-gifts::before { border-radius: 8px; }
    .mh-dt2-cd { width: 350px; padding-top: 23px; }
    .mh-dt2-cd.is-reveal { width: 236px; padding-top: 15px; top: 70%; }
    .mh-dt2-cd.is-reveal .mh-dt2-cd-label { margin-bottom: 2px; font-size: 16px; }
    .mh-dt2-cd.is-reveal .mh-dt2-cd-row { gap: 7px; }
    .mh-dt2-cd.is-reveal .mh-dt2-cd-o { width: 36px; }
    .mh-dt2-cd.is-reveal .mh-dt2-cd-o span { font-size: 10px; }
    .mh-dt2-cd.is-reveal .mh-dt2-cd-o b { padding-bottom: 2px; font-size: 17px; }
    .mh-dt2[data-phase="pre"] .mh-dt2-cta { margin-top: 64px; }
    .mh-dt2-rw { gap: 10px; }
    .mh-dt2 .mh-dt2-rw-more { align-self: center; font-size: 24px; }
    .mh-dt2-cd-label { margin-bottom: 4px; font-size: 20px; }
    .mh-dt2-cd-row { gap: 9px; }
    .mh-dt2-cd-o { width: 52px; }
    .mh-dt2-cd-o span { font-size: 13px; }
    .mh-dt2-cd-o b { font-size: 25px; }
    /* mobile: thân vàng 2 nút ~32px, vừa khít 1 hàng ở màn 375px */
    .mh-dt2-cta { gap: 0 8px; }
    .mh-dt2-btn-img { margin: -12px -11px -15px; }
    .mh-dt2-btn-img img { height: 78px; }
    .mh-dt2-btn-img.is-main { margin: 3px -3px -3px; }
    .mh-dt2-btn-img.is-main img { height: 49px; }
    /* bớt khoảng trống giữa cụm nút và 3 băng rôn; phần trên băng Top 1 là quầng sáng trong suốt */
    .mh-dt2 .mh-dt2-in { gap: 6px; }
    .mh-dt2-podium { margin-top: -14px; }
    .mh-dt2-list li { gap: 10px; min-height: 56px; padding: 5px 12px 5px 8px; }
    .mh-dt2-rank { width: 38px; height: 38px; font-size: 22px; }
    .mh-dt2-who { padding-left: 6px; }
    .mh-dt2-who b { font-size: 17px; }
    .mh-dt2-who small { font-size: 12px; }
    .mh-dt2-lc { font-size: 19px; }
    .mh-dt2-lc img { height: 22px; }
}

/* ---------- TIÊU ĐỀ KHỐI ---------- */
.mh-sec {
    padding: 80px 0;
}
.mh-sec-h {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 32px;
}
.mh-sec-h h2 {
    font-family: var(--serif);
    font-weight: 900;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.1;
}
.mh-sec-h p {
    max-width: 46ch;
    color: #BFB7A6;
}
.mh-more {
    font-weight: 600;
    white-space: nowrap;
    color: var(--kim-sang);
}
.mh-body .mh-more:hover {
    color: var(--kim-sang);
    text-decoration: underline;
}

/* Khối nền giấy dó: tranh thuỷ mặc bg-main trải dọc, chữ tối */
.mh-paper {
    color: var(--chu-toi);
    background: var(--giay) url("/assets/game/ui/bg-main.webp?v=3") center top / 100% auto repeat-y;
}
.mh-paper .mh-sec-h h2 {
    color: var(--muc);
}
.mh-paper .mh-sec-h p {
    color: #5E5646;
}
.mh-body .mh-paper .mh-more {
    color: var(--chu);
}

/* ---------- 4. TIN TỨC ---------- */
/* Khối tin dùng gần hết bề ngang; chừa mép phải vừa đủ cho sidebar nổi khi nó hiện. */
@media (min-width: 1101px) {
    .mh-news .mh-wrap {
        width: min(1480px, calc(100% - 32px));
        margin: 0 auto;
    }
    #cong-dong .mh-wrap,
    .mh-tn-cards-sec .mh-wrap {
        width: min(1180px, calc(100% - 320px));
        margin: 0 auto;
    }
}
.mh-news-grid {
    display: grid;
    /* hai cột bằng nhau, cả slider lẫn khung tin đều 16:9 nên cao bằng nhau */
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
}
.mh-slider {
    position: relative;
    align-self: start;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 6px;
    background: var(--muc);
}
.mh-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 24px;
    color: #fff;
    opacity: 0;
    visibility: hidden;
    background: center / cover no-repeat;
    transition: opacity .6s, visibility .6s;
}
.mh-slide.is-on {
    opacity: 1;
    visibility: visible;
}
.mh-body .mh-slide:hover {
    color: #fff;
}
.mh-slide h3 {
    max-width: 26ch;
    padding-right: 110px;
    font-family: var(--serif);
    font-size: 26px;
    line-height: 1.25;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .6);
}
.mh-dots {
    position: absolute;
    right: 20px;
    bottom: 20px;
    z-index: 2;
    display: flex;
    gap: 6px;
}
.mh-dots button {
    width: 28px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, .4) !important;
}
.mh-dots button.is-on {
    background: var(--kim-sang) !important;
}
/* lớp giấy mờ che tranh thuỷ mặc phía sau cho chữ dễ đọc. Khung 16:9 như slider;
   chữ và khoảng cách tính theo cqi (1% bề ngang khung) để 6 tin luôn vừa khít khung */
.mh-news-list {
    container-type: inline-size;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    /* padding của chính khung không dùng được cqi (sẽ tính theo khung cha), dùng % bề ngang */
    padding: .6% 3% .8%;
    border: 1px solid rgba(201, 164, 92, .35);
    border-radius: 6px;
    background: rgba(255, 250, 240, .82);
    backdrop-filter: blur(4px);
    box-shadow: 0 6px 20px rgba(60, 40, 10, .08);
}
/* hàng tab + ô tìm kiếm; gạch chân xám nằm ở hàng, tab kéo xuống -2px để gạch đỏ
   của tab đang chọn đè đúng lên gạch xám */
.mh-news-bar {
    display: flex;
    align-items: stretch;
    gap: 2cqi;
    margin-bottom: 2px;
    border-bottom: 2px solid #CFC4AC;
}
.mh-tabs {
    display: flex;
    flex: 0 1 auto;
    min-width: 0;
    margin-bottom: -2px;
    overflow-x: auto;
    /* ẩn thanh cuộn, vẫn vuốt ngang được */
    scrollbar-width: none;
}
.mh-tabs::-webkit-scrollbar {
    display: none;
}
.mh-search {
    display: flex;
    align-self: center;
    /* giãn lấp hết chỗ trống từ sau tab Cẩm nang tới mép phải */
    flex: 1 1 auto;
    min-width: 0;
    height: 5cqi;
    border: 1px solid #B9AA88;
    border-radius: 999px;
    background: rgba(255, 255, 255, .7);
    transition: border-color .2s, background .2s;
}
.mh-search:focus-within {
    border-color: var(--chu);
    background: #fff;
}
.mh-search input {
    flex: 1;
    min-width: 0;
    padding: 0 0 0 1.8cqi;
    border: 0;
    outline: 0;
    background: none;
    font: inherit;
    font-size: 2.2cqi;
    color: #1F1810;
}
/* viền đỏ của .mh-search:focus-within đã báo đang nhập; tắt khung vàng :focus-visible chung */
.mh-body .mh-search input:focus-visible {
    outline: none;
}
.mh-search input::placeholder {
    color: #8A806E;
}
.mh-search button {
    display: grid;
    place-items: center;
    flex: none;
    width: 5cqi;
    color: #5C5140 !important;
}
.mh-search button:hover {
    color: var(--chu) !important;
}
.mh-search svg {
    width: 2.6cqi;
    height: 2.6cqi;
    fill: currentColor;
}
.mh-tabs button {
    padding: 1.3cqi 2cqi !important;
    white-space: nowrap;
    font-size: 3cqi;
    font-weight: 600;
    color: #4A3F2E !important;
    border-bottom: 2px solid transparent !important;
}
.mh-tabs button.is-on {
    color: var(--chu) !important;
    border-color: var(--chu) !important;
}
.mh-list {
    list-style: none;
}
.mh-list li a {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.8cqi;
    padding: 1.9cqi 0;
    font-size: 2.9cqi;
    line-height: 1.5;
    border-bottom: 1px dashed #B9AA88;
}
/* tin đầu tab (home.js gắn .is-top): dải vàng, tiêu đề đỏ đậm to hơn */
.mh-list li.is-top a {
    margin-top: .6cqi;
    padding-left: 1.8cqi;
    padding-right: 1.8cqi;
    border-bottom: 0;
    border-radius: 4px;
    background: #FDEBC2;
}
/* vệt sáng quét ngang dải vàng mỗi ~3.5s; prefers-reduced-motion đã tắt animation chung */
.mh-list li.is-top a {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.mh-list li.is-top a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    width: 40%;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .75), transparent);
    transform: translateX(-120%) skewX(-20deg);
    animation: mh-top-shine 3.5s ease-in-out infinite;
    pointer-events: none;
}
/* mỗi lần đổi tab, dải tin đầu trượt nhẹ vào */
.mh-list li.is-top {
    animation: mh-top-in .45s ease-out;
}
@keyframes mh-top-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: none; }
}
@keyframes mh-top-shine {
    0%, 55% { transform: translateX(-120%) skewX(-20deg); }
    100% { transform: translateX(320%) skewX(-20deg); }
}
.mh-list li.is-top .mh-t {
    font-size: 1.12em;
    font-weight: 700;
    color: var(--chu);
}
.mh-list li.is-top time {
    font-weight: 700;
    color: var(--chu);
}
.mh-body .mh-list li a:hover .mh-t {
    color: var(--chu);
}
.mh-tag {
    padding: .4cqi 1.3cqi;
    border-radius: 3px;
    font-size: 2.1cqi;
    font-weight: 600;
    white-space: nowrap;
    color: #fff;
    background: var(--muc);
}
.mh-tag.is-sk { background: var(--chu); }
.mh-tag.is-cn { background: var(--ngoc); }
.mh-tag.is-tt { background: #8C6A2E; }
/* nền tranh thuỷ mặc loang nên chữ cần đậm và tối hẳn mới dễ đọc */
.mh-t {
    font-weight: 500;
    color: #1F1810;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    transition: color .2s;
}
.mh-list time {
    font-size: 2.2cqi;
    font-weight: 500;
    color: #5C5140;
}
/* nút "Xem tất cả tin tức": ẩn trên máy tính, hiện ở ≤1100px (xem @media) */
.mh-news-all {
    display: none;
}
.mh-list-empty {
    padding: 20px 0;
    color: #8A806E;
}

@media (min-width: 1101px) {
    .mh-news-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 32px;
        align-items: start;
    }
    .mh-slider {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        min-height: 0;
    }
    .mh-news-list {
        width: 100%;
        aspect-ratio: 16 / 9;
        min-height: 0;
        overflow: hidden;
        padding: 8px 10px 10px;
    }
    .mh-news-bar {
        gap: 10px;
    }
    .mh-tabs button {
        padding: 9px 11px !important;
        font-size: 18px;
    }
    .mh-search {
        height: 36px;
    }
    .mh-search input {
        padding-left: 12px;
        font-size: 14px;
    }
    .mh-search button {
        width: 36px;
    }
    .mh-search svg {
        width: 18px;
        height: 18px;
    }
    .mh-list li a {
        gap: 8px;
        padding: 9px 0;
        font-size: 21px;
        line-height: 1.32;
    }
    .mh-list li.is-top a {
        margin-top: 6px;
        padding: 8px 8px;
    }
    .mh-tag {
        padding: 2px 6px;
        font-size: 12px;
    }
    .mh-list time {
        font-size: 13px;
    }
}
/* ---------- 5. NGHỀ ---------- */
/* Trải hết bề ngang: trái mảng màu nghề cắt chéo + tranh, phải nền giấy;
   đáy là thanh vàng chọn nghề. Màu nghề đi qua --c/--c2 (JS đổi khi chọn tab). */
.mh-nghe {
    background: var(--muc);
}
.mh-ng-stage {
    position: relative;
    overflow: hidden;
    /* nền bg-he: mảng xanh ngọc cắt chéo bên trái (mép chéo ~54% trên, ~31% dưới) + giấy bên phải;
       kéo giãn 100% để đường chéo luôn nằm đúng tỉ lệ khung */
    background: #F6EBD3 url("/assets/game/ui/bg-he.webp") center / 100% 100% no-repeat;
}
/* Màn có thanh bên (>1100px): nền (mảng xanh cắt chéo + giấy) và thanh chọn nghề vẫn trải hết
   bề ngang; chỉ phần nội dung (tranh + chữ) thu vào giữa cùng khổ với cụm Tin tức để không bị
   thanh bên che. */
@media (min-width: 1101px) {
    .mh-nghe .mh-nghe-panel {
        width: min(1180px, calc(100% - 320px));
        margin: 0 auto;
    }
    /* nội dung đã tránh thanh bên nên bỏ lề phải lớn dành cho nó */
    .mh-nghe .mh-ng-right {
        padding: 32px 28px;
    }
    /* khung hẹp hơn trước (~70% bề ngang) nên thu cỡ chữ theo */
    .mh-nghe .mh-ng-name {
        font-size: clamp(48px, 4.2vw, 84px);
        padding: 0 48px;
    }
    .mh-nghe .mh-ng-left::after {
        font-size: clamp(220px, 18vw, 340px);
    }
}
.mh-nghe-panel {
    display: none;
    grid-template-columns: 54% 46%;
    height: clamp(620px, 44vw, 780px);
}
.mh-nghe-panel.is-on {
    display: grid;
    animation: mhFade .35s ease;
}
@keyframes mhFade {
    from { opacity: 0; transform: translateY(8px); }
}
/* mảng xanh cắt chéo nằm sẵn trong ảnh nền bg-he; tranh được thò qua đường chéo */
.mh-ng-left {
    position: relative;
    isolation: isolate;
}
/* chữ Hán mờ làm nền sau tranh */
.mh-ng-left::after {
    content: attr(data-kytu);
    position: absolute;
    left: 6%;
    top: 50%;
    z-index: -1;
    transform: translateY(-50%);
    font-family: "Noto Serif", serif;
    font-weight: 900;
    font-size: clamp(260px, 26vw, 420px);
    line-height: 1;
    color: rgba(255, 255, 255, .1);
    pointer-events: none;
}
.mh-ng-art {
    position: absolute;
    /* to gần hết cột trái; khung cao hơn 100% một chút để tranh vuông không bị chiều cao bó lại,
       bám đáy nên phần thừa nằm ở phía trên (trong suốt) */
    left: -8%;
    bottom: 0;
    width: 112%;
    height: 118%;
    /* tranh to có thể tràn sang cột chữ: không chặn bấm nút phía dưới */
    pointer-events: none;
    object-fit: contain;
    object-position: center bottom;
    filter: drop-shadow(0 12px 30px rgba(0, 0, 0, .35));
}
/* Dãy Hệ cạnh nhân vật: cột dọc, không nền; mỗi mục icon trái + tên phải. Hệ của hiệp khách tiêu biểu
   có thẻ vàng đầu nhọn chĩa sang phải (tab nghề đang chọn xoay ngang).
   Màn rộng: đặt trong khoảng nền xanh trống bên trái nội dung. Màn ≤1100px: hàng icon nhỏ ở góc trên. */
.mh-ng-he {
    position: absolute;
    top: 50%;
    /* lùi vào gần nhân vật (trước -222px) */
    left: -150px;
    z-index: 2;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 200px;
    margin: 0;
    padding: 0;
    list-style: none;
    transform: translateY(-50%);
}
/* Chữ theo màu của từng Hệ (--c, gắn ở từng li), pha tối cho đọc rõ trên nền xanh ngọc sáng */
.mh-ng-he li {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 30px 8px 10px;
    font-size: 17px;
    font-weight: 700;
    white-space: nowrap;
    color: color-mix(in srgb, var(--c, #8C6A2E) 62%, #1B1206);
    text-shadow: 0 1px 0 rgba(255, 255, 255, .45);
    transition: color .2s;
}
/* khung: dải gradient màu Hệ đậm ở mép trái, mờ dần sang trong suốt; vạch màu Hệ ở mép trái */
.mh-ng-he li::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-left: 3px solid var(--c, #E6CB8B);
    border-radius: 999px 0 0 999px;
    background: linear-gradient(90deg,
        color-mix(in srgb, var(--c, #E6CB8B) 48%, rgba(255, 255, 255, .55)) 0,
        color-mix(in srgb, var(--c, #E6CB8B) 22%, rgba(255, 255, 255, .25)) 55%,
        transparent 100%);
    opacity: .85;
    transition: background .2s, opacity .2s;
}
.mh-ng-he img,
.mh-ng-he i {
    flex: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: contain;
    filter: drop-shadow(0 3px 6px rgba(0, 30, 30, .45));
    transition: transform .2s, filter .2s;
}
/* chưa có ảnh: chữ cái đầu trong vòng tròn màu Hệ */
.mh-ng-he i {
    display: grid;
    place-items: center;
    font-family: var(--serif);
    font-style: normal;
    font-weight: 900;
    font-size: 20px;
    color: #FFF6DC;
    text-shadow: none;
    background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c, #E6CB8B) 60%, #fff), var(--c, #8C6A2E) 80%);
    box-shadow: inset 0 0 0 2px rgba(255, 246, 220, .7);
}
/* cả thẻ là link sang /hiep-khach?element=…: link phủ kín thẻ (bù lại padding của li) */
.mh-body .mh-ng-he a {
    display: flex;
    align-items: center;
    gap: inherit;
    margin: -8px -30px -8px -10px;
    padding: 8px 30px 8px 10px;
    color: inherit;
}
.mh-ng-he li:hover {
    color: color-mix(in srgb, var(--c, #8C6A2E) 45%, #1B1206);
}
.mh-ng-he li:hover::before {
    opacity: 1;
}
.mh-ng-he li:hover img,
.mh-ng-he li:hover i {
    transform: scale(1.08);
}
/* hệ của hiệp khách tiêu biểu: dải màu đậm hơn, chữ gần trắng, icon toả sáng theo màu Hệ */
.mh-ng-he li.is-on {
    color: #fff;
    text-shadow: 0 1px 2px color-mix(in srgb, var(--c, #8C6A2E) 60%, #000);
}
.mh-ng-he li.is-on::before {
    opacity: 1;
    border-left-width: 4px;
    background: linear-gradient(90deg,
        color-mix(in srgb, var(--c, #E6CB8B) 88%, transparent) 0,
        color-mix(in srgb, var(--c, #E6CB8B) 45%, transparent) 60%,
        transparent 100%);
    filter: drop-shadow(0 0 10px color-mix(in srgb, var(--c, #E6CB8B) 55%, transparent));
}
.mh-ng-he li.is-on img,
.mh-ng-he li.is-on i {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px color-mix(in srgb, var(--c, #E6CB8B) 80%, #fff));
}
@media (max-width: 1100px) {
    .mh-ng-he {
        top: 18px;
        left: 12px;
        flex-direction: row;
        gap: 4px;
        width: auto;
        transform: none;
    }
    .mh-ng-he li { padding: 4px; gap: 0; font-size: 0; }
    .mh-body .mh-ng-he a { margin: -4px; padding: 4px; }
    .mh-ng-he li::before { border-radius: 999px; border-left-width: 0; }
    .mh-ng-he img,
    .mh-ng-he i { width: 34px; height: 34px; font-size: 14px; }
}
/* phía phải: nền giấy, chữ căn giữa; chừa lề phải cho thanh .mh-side trên màn rộng */
.mh-ng-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 40px clamp(24px, 9vw, 160px) 40px 24px;
    text-align: center;
    color: var(--chu-toi);
}
.mh-ng-name {
    position: relative;
    padding: 0 60px;
    font-family: "FZ GameBR", var(--serif);
    font-size: clamp(60px, 5.8vw, 104px);
    font-weight: 400;
    line-height: 1.05;
    color: var(--c);
    text-shadow: 0 3px 0 rgba(255, 255, 255, .7), 0 6px 18px rgba(0, 0, 0, .15);
}
/* gạch trang trí hai bên tên nghề */
.mh-ng-name::before,
.mh-ng-name::after {
    content: "";
    position: absolute;
    top: 58%;
    width: 48px;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--c));
}
.mh-ng-name::before { left: 0; }
.mh-ng-name::after { right: 0; transform: scaleX(-1); }
.mh-ng-sub {
    display: flex;
    align-items: center;
    gap: 12px;
    width: min(480px, 100%);
    /* nét thư pháp của y, g… ở tên nghề thò sâu xuống: chừa khoảng để không đè dòng này */
    margin-top: clamp(12px, 1.3vw, 24px);
    font-size: 22px;
    font-weight: 600;
    color: #5A4A30;
}
.mh-ng-sub::before,
.mh-ng-sub::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #B9AA88;
}
.mh-ng-sub i {
    font-style: normal;
    font-size: 12px;
    color: var(--kim);
}
.mh-ng-text {
    max-width: 34em;
    font-size: 19px;
    line-height: 1.5;
    color: #2E261A;
}
/* Hiệp Khách tiêu biểu: nhãn nhỏ + dãy thẻ giấy vàng viền vàng, bấm mở khung chi tiết người đó */
.mh-ng-tieubieu {
    display: grid;
    justify-items: center;
    gap: 10px;
    width: min(520px, 100%);
}
.mh-ng-tieubieu h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #7A6440;
}
.mh-ng-tieubieu div {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
.mh-body .mh-ng-tieubieu a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid #C79A3E;
    border-radius: 6px;
    font-size: 17px;
    font-weight: 700;
    color: #6B4A12;
    background: linear-gradient(#FFF8E6, #F1DDA9);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 2px 4px rgba(74, 53, 20, .15);
    transition: color .2s, border-color .2s, transform .2s;
}
.mh-ng-tieubieu small {
    padding: 0 5px;
    border-radius: 3px;
    font-size: 12px;
    line-height: 1.5;
    color: #FFF6DC;
    background: linear-gradient(#B7802A, #8E5C17);
}
.mh-body .mh-ng-tieubieu a:hover {
    color: var(--c);
    border-color: var(--c);
    transform: translateY(-2px);
}
/* nút "Xem chi tiết": thẻ đầu nhọn theo màu nghề, chữ kem, mũi tên › */
.mh-body .mh-ng-more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 34px;
    clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 14px 100%, 0 50%);
    font-size: 18px;
    font-weight: 700;
    color: #FFF6DC;
    background: linear-gradient(135deg, var(--c2), var(--c) 55%, color-mix(in srgb, var(--c) 70%, #000));
    box-shadow: inset 0 0 0 2px rgba(255, 230, 170, .6);
    transition: filter .2s, transform .2s;
}
.mh-ng-more::after {
    content: "";
    width: 8px;
    height: 8px;
    border: solid currentColor;
    border-width: 2px 2px 0 0;
    transform: rotate(45deg);
}
.mh-body .mh-ng-more:hover {
    color: #fff;
    filter: brightness(1.12);
    transform: translateY(-2px);
}
/* thanh vàng chọn nghề */
.mh-ng-bar {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 24px;
    padding: 0 24px;
    /* cùng tông vàng giấy nhạt và viền vàng như header */
    background: linear-gradient(rgb(252, 246, 232), rgb(244, 231, 204));
    border-top: 2px solid var(--kim);
    border-bottom: 2px solid var(--kim);
}
.mh-nghe-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}
.mh-nghe-tabs::-webkit-scrollbar {
    display: none;
}
.mh-nghe-tabs button {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 128px;
    padding: 20px 14px 16px !important;
    font-size: 18px;
    font-weight: 700;
    white-space: nowrap;
    color: #6B4A12 !important;
    transition: color .2s;
}
/* icon nghề là ảnh (tải ở Cài đặt, mặc định assets/game/ui/ic-*.webp) có sẵn viền vàng */
.mh-nghe-tabs button img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    filter: drop-shadow(0 3px 6px rgba(80, 50, 10, .3));
    transition: transform .2s, filter .2s;
}
.mh-nghe-tabs button:hover img {
    transform: translateY(-3px);
}
/* tab đang chọn: thẻ giấy trắng nhô lên trên thanh, đầu nhọn như mẫu */
.mh-nghe-tabs button.is-on {
    color: var(--c) !important;
}
.mh-nghe-tabs button.is-on::before {
    content: "";
    position: absolute;
    inset: -18px 0 0;
    z-index: -1;
    clip-path: polygon(50% 0, 100% 14px, 100% 100%, 0 100%, 0 14px);
    /* thanh đã là vàng giấy nhạt nên thẻ đang chọn dùng vàng đậm hơn để nổi lên */
    background: linear-gradient(#FBE3A0, #EFC462);
}
.mh-nghe-tabs button.is-on img {
    transform: scale(1.12);
    filter: drop-shadow(0 0 10px color-mix(in srgb, var(--c2) 80%, transparent));
}
.mh-nghe-tabs {
    position: relative;
    isolation: isolate;
    padding-top: 18px;
    margin-top: -18px;
}
/* nút tròn viền vàng bt-prev / bt-next (cắt cùng khung vuông nên to bằng nhau) */

/* ---------- 7. TÍNH NĂNG ---------- */
/* Băng chuyền coverflow trên nền xanh ngọc (cùng tông bg-he của mục Nghề). --w là bề ngang
   slide giữa; slide 16:9, hai slide kề thu nhỏ, mờ và ló ra hai bên. */
.mh-tn {
    --w: min(1060px, 60vw);
    padding: 64px 0 40px;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 50% 40%, rgba(120, 210, 200, .25), transparent 60%),
        linear-gradient(#1E6F6E, #134D4F);
    border-top: 3px solid var(--kim);
}
/* thẻ tính năng: mục riêng (.mh-tn-cards-sec, nền giấy dó), 4 cột x 2 hàng; thẻ giấy kem viền vàng, đầu thẻ là mảng màu
   riêng của tính năng với chữ Hán mờ, dưới là tên (font thư pháp) + mô tả */
/* một hàng: thấy 3 thẻ, chuyển bằng nút ‹ › trên tiêu đề (home.js) hoặc vuốt; ẩn thanh cuộn */
.mh-tn-cards {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 24px * 2) / 3);
    gap: 24px;
    padding: 6px 2px 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.mh-tn-cards::-webkit-scrollbar {
    display: none;
}
.mh-tn-cards > * {
    scroll-snap-align: start;
}
/* tiêu đề thư pháp + nút tròn bt-prev / bt-next */
.mh-tn-cards-sec .mh-sec-h {
    align-items: center;
    margin-bottom: 20px;
}
.mh-tn-cards-sec .mh-sec-h h2 {
    font-family: "FZ GameBR", var(--serif);
    font-weight: 400;
    font-size: clamp(36px, 3.6vw, 56px);
    color: #7A2A10;
    text-shadow: 0 2px 0 rgba(255, 255, 255, .7);
}
.mh-tnc-nav {
    display: flex;
    gap: 10px;
}
.mh-body .mh-tnc-arrow {
    width: 52px;
    height: 52px;
    background: url("/assets/game/ui/bt-prev.webp") center / contain no-repeat;
    filter: drop-shadow(0 3px 6px rgba(60, 40, 10, .35));
    transition: transform .15s, filter .15s;
}
.mh-body .mh-tnc-arrow.is-next {
    background-image: url("/assets/game/ui/bt-next.webp");
}
.mh-body .mh-tnc-arrow:hover {
    transform: scale(1.08);
    filter: drop-shadow(0 3px 6px rgba(60, 40, 10, .35)) brightness(1.1);
}
.mh-tn-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 2px solid #E0B24E;
    border-radius: 8px;
    background: linear-gradient(#FFF9EC, #F3E3BD);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6), 0 10px 22px rgba(0, 0, 0, .25);
    transition: transform .25s, box-shadow .25s;
}
.mh-tn-card:hover {
    transform: translateY(-4px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6), 0 16px 30px rgba(0, 0, 0, .35), 0 0 0 1px #F3D27A;
}
/* khung ảnh 16:9 (ảnh đại diện bài viết) */
.mh-tn-card-img {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    font-family: "Noto Serif", serif;
    font-weight: 900;
    color: rgba(255, 255, 255, .22);
    background:
        radial-gradient(circle at 50% 40%, rgba(255, 255, 255, .18), transparent 60%),
        linear-gradient(160deg, var(--c), color-mix(in srgb, var(--c) 45%, #0B1322));
    border-bottom: 2px solid #E0B24E;
    transition: color .25s;
}
.mh-tn-card:hover .mh-tn-card-img {
    color: rgba(255, 240, 200, .45);
}
.mh-tn-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s;
}
.mh-tn-card:hover .mh-tn-card-img img {
    transform: scale(1.05);
}
/* chữ Hán chỉ dùng cho thẻ mẫu, to theo thẻ */
.mh-tn-card-img.is-han {
    font-size: 96px;
}
.mh-tn-card-body {
    padding: 18px 26px 24px;
}
.mh-tn-card-body h3 {
    font-family: "FZ GameBR", var(--serif);
    font-size: 38px;
    font-weight: 400;
    line-height: 1.2;
    color: #7A2A10;
}
.mh-tn-card-body p {
    margin-top: 6px;
    font-size: 18px;
    line-height: 1.5;
    color: #4A3F2E;
}
.mh-tn-stage {
    position: relative;
}
.mh-tn-track {
    position: relative;
    height: calc(var(--w) * .5625);
}
.mh-tn-slide {
    position: absolute;
    top: 0;
    left: 50%;
    width: var(--w);
    height: 100%;
    overflow: hidden;
    border: 2px solid #E0B24E;
    background: linear-gradient(160deg, var(--c, #2B4468), #0F1A2C) center / cover no-repeat;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 24px 48px rgba(0, 0, 0, .45);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) scale(.7);
    transition: transform .6s ease, opacity .6s ease, filter .6s ease, visibility .6s;
}
.mh-tn-slide.is-on {
    z-index: 3;
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%);
}
.mh-tn-slide.is-prev,
.mh-tn-slide.is-next {
    z-index: 2;
    cursor: pointer;
    opacity: .45;
    visibility: visible;
    filter: saturate(.6) brightness(.8);
}
.mh-tn-slide.is-prev { transform: translateX(-128%) scale(.84); }
.mh-tn-slide.is-next { transform: translateX(28%) scale(.84); }
.mh-tn-slide.is-prev:hover,
.mh-tn-slide.is-next:hover {
    opacity: .65;
}
/* viền vàng mảnh thứ hai lùi vào trong khung */
.mh-tn-slide::before {
    content: "";
    position: absolute;
    inset: 8px;
    z-index: 1;
    border: 1px solid rgba(240, 200, 110, .6);
    pointer-events: none;
}
/* chữ Hán mờ cho slide mẫu khi chưa có ảnh */
.mh-tn-slide.is-han::after {
    content: attr(data-kytu);
    position: absolute;
    inset: 0 0 30%;
    display: grid;
    place-items: center;
    font-family: "Noto Serif", serif;
    font-weight: 900;
    font-size: calc(var(--w) * .28);
    color: rgba(255, 255, 255, .14);
}
/* nút play ở giữa (chỉ slide có video): ảnh bt-playvd, tỉ lệ theo slide */
.mh-tn-play {
    position: absolute;
    inset: 0;
    z-index: 2;
}
.mh-tn-play::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 44%;
    width: max(64px, calc(var(--w) * .11));
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    background: url("/assets/game/ui/bt-playvd.webp") center / contain no-repeat;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .5));
    transition: transform .2s, filter .2s;
}
.mh-tn-slide.is-on .mh-tn-play:hover::after {
    transform: translate(-50%, -50%) scale(1.08);
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .5)) brightness(1.1);
}
.mh-tn-cap {
    position: absolute;
    inset: auto 0 0;
    z-index: 1;
    padding: calc(var(--w) * .1) 5% calc(var(--w) * .035);
    text-align: center;
    background: linear-gradient(to top, rgba(10, 8, 4, .85), rgba(10, 8, 4, .5) 55%, transparent);
    pointer-events: none;
}
.mh-tn-cap h3 {
    font-family: "FZ GameBR", var(--serif);
    font-weight: 400;
    font-size: calc(var(--w) * .062);
    line-height: 1.15;
    background: linear-gradient(#FFF3C4, #F0C25A 55%, #C98A2A);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 2px 0 rgba(60, 30, 0, .9)) drop-shadow(0 4px 10px rgba(0, 0, 0, .6));
}
/* dải vàng chữ nâu bên dưới tiêu đề */
.mh-tn-cap p {
    display: inline-block;
    max-width: 90%;
    margin-top: calc(var(--w) * .012);
    padding: .3em 2.2em;
    clip-path: polygon(3% 0, 97% 0, 100% 50%, 97% 100%, 3% 100%, 0 50%);
    font-size: calc(var(--w) * .02);
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #2A1C0A;
    background: linear-gradient(#FBE3A0, #E3AE44);
}
.mh-body .mh-tn-arrow {
    position: absolute;
    top: calc(var(--w) * .5625 / 2);
    z-index: 4;
    width: 72px;
    height: 72px;
    transform: translateY(-50%);
    background: url("/assets/game/ui/bt-prev.webp") center / contain no-repeat;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .45));
    transition: transform .15s, filter .15s;
}
.mh-body .mh-tn-arrow.is-prev { left: calc(50% - var(--w) / 2 - 36px); }
.mh-body .mh-tn-arrow.is-next {
    right: calc(50% - var(--w) / 2 - 36px);
    background-image: url("/assets/game/ui/bt-next.webp");
}
.mh-body .mh-tn-arrow:hover {
    transform: translateY(-50%) scale(1.08);
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .45)) brightness(1.1);
}
.mh-tn-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 28px;
}
.mh-tn-dots button {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: #F4EEE2 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .3);
    transition: width .3s, background .3s;
}
.mh-tn-dots button.is-on {
    width: 56px;
    background: linear-gradient(#E0503F, #A8281E) !important;
}

/* ---------- POPUP VIDEO (ghi đè #video-modal của site.css, chỉ ở trang chủ) ---------- */
/* Kiểu tối giản: nền tối mờ vẫn thấy trang phía sau, video lớn không khung, không băng
   tiêu đề, nút đóng vuông ở góc trên phải màn hình. */
.mh-body .video-modal {
    padding: 44px 16px 24px;
}
.mh-body .video-modal-backdrop {
    background: rgba(0, 0, 0, .72);
    backdrop-filter: none;
}
.mh-body .video-modal-dialog {
    /* rộng 80% màn nhưng không cao quá phần màn còn lại */
    width: min(1520px, 80vw, (100vh - 88px) * 16 / 9);
}
/* chỉ hiện dần: hiệu ứng phóng của site.css dùng transform, làm nút đóng (fixed) bám
   theo khung video trong lúc mở rồi mới nhảy về góc màn hình */
.mh-body .video-modal.open .video-modal-dialog {
    animation-name: mhVideoIn;
}
@keyframes mhVideoIn {
    from { opacity: 0; }
}
.mh-body .video-modal-title {
    display: none;
}
.mh-body .video-modal-frame {
    padding: 0;
    border-radius: 0;
    background: #000;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
}
.mh-body .video-modal-frame::before {
    display: none;
}
.mh-body .video-modal-frame iframe {
    border-radius: 0;
}
.mh-body .video-modal-close {
    position: fixed;
    top: 0;
    right: 0;
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 0;
    font-size: 30px;
    font-weight: 300;
    color: #fff;
    background: rgba(40, 40, 40, .85);
    box-shadow: none;
    transform: none;
}
.mh-body .video-modal-close:hover {
    color: #fff;
    background: rgba(90, 90, 90, .95);
    box-shadow: none;
    transform: none;
}
@media (max-width: 760px) {
    .mh-body .video-modal-dialog { width: 100%; }
    .mh-body .video-modal-close { width: 44px; height: 44px; }
}

/* ---------- 8. CỘNG ĐỒNG ---------- */
/* cùng kiểu khung tin tức: giấy kem mờ viền vàng, chữ nâu đen */
.mh-cd-box {
    display: grid;
    /* chữ bên trái, 4 ô mạng xã hội xếp một hàng ngang bên phải */
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
    gap: 40px;
    align-items: center;
    padding: 40px 48px;
    border: 1px solid rgba(201, 164, 92, .35);
    border-radius: 6px;
    color: #1F1810;
    background: rgba(255, 250, 240, .82);
    backdrop-filter: blur(4px);
    box-shadow: 0 6px 20px rgba(60, 40, 10, .08);
}
.mh-cd-box > div:first-child {
    container-type: inline-size;
}
.mh-cd-box h2 {
    font-family: var(--serif);
    font-size: min(28px, 7cqi);
    font-weight: 900;
    line-height: 1.15;
    white-space: nowrap;
    color: var(--muc);
}
.mh-cd-box p {
    max-width: 44ch;
    margin-top: 12px;
    font-size: 17px;
    color: #4A3F2E;
}
/* 4 ô luôn một hàng: ô dựng dọc (icon trên, tên + chú thích dưới, căn giữa) để vừa bề ngang hẹp */
.mh-cong {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.mh-cong a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px 14px;
    text-align: center;
    border: 1px solid #D8C9A6;
    border-radius: 6px;
    background: rgba(255, 255, 255, .6);
    transition: border-color .2s, background .2s, transform .2s;
}
.mh-body .mh-cong a:hover {
    border-color: var(--chu);
    background: #fff;
    color: inherit;
    transform: translateY(-2px);
}
.mh-cong img {
    flex: none;
    /* icon kênh có khung hoa văn: để to cho rõ chi tiết */
    width: 88px;
    height: 88px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(60, 40, 10, .25));
}
.mh-cong span {
    min-width: 0;
    font-size: 14px;
    line-height: 1.35;
    color: #5C5140;
}
.mh-cong b {
    display: block;
    font-size: 18px;
    color: #1F1810;
}

/* ---------- 3. SIDEBAR NỔI ---------- */
/* Khung giấy bg-tb (446x882) vẽ bằng border-image 3 lát: lát trên (0-165px: hoa văn đỉnh +
   dải lụa) và lát dưới (590-882px: hoa văn đáy + tua rua) giữ nguyên tỉ lệ, lát giữa kéo
   dài theo nội dung. border-width = 0 nên padding tự do đặt nội dung vào lòng khung. */
.mh-side {
    position: fixed;
    /* sát mép phải: phần ngoài cùng của ảnh khung chỉ là dải lụa */
    right: 0;
    top: 50%;
    z-index: 40;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 240px;
    /* lòng khung: mép vàng trái/phải ~21% bề ngang ảnh; đáy khung nằm trên lát dưới */
    padding: 36px 46px 108px 50px;
    transform: translateY(-50%);
    border: 0 solid transparent;
    border-image: url("/assets/game/ui/bg-tb.webp") 165 0 292 0 fill / 88px 0 157px 0 stretch;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .35));
    /* ẩn mặc định; home.js gắn .is-shown khi cuộn trang (qua banner), 5s không cuộn thì ẩn */
    opacity: 0;
    visibility: hidden;
    translate: 24px 0;
    transition: opacity .35s, translate .35s, visibility .35s;
}
.mh-side.is-shown {
    opacity: 1;
    visibility: visible;
    translate: 0 0;
}
/* thanh cao ~575px: màn thấp hơn ~660px thì thu nhỏ cả thanh cho vừa, neo mép phải */
@media (max-height: 660px) {
    .mh-side { zoom: calc(100vh / 660px); }
}
/* thu vào: trượt ra mép phải, chừa lại đúng phần tab (8px + rộng 32px) ló ra */
.mh-side.is-shown.is-collapsed {
    translate: calc(100% - 40px) 0;
}
.mh-body .mh-side-toggle {
    position: absolute;
    /* mép trái ảnh khung là dải lụa trong suốt: đặt tab áp sát khung vàng */
    left: 8px;
    /* ngang phần ảnh app: mép khung chỗ này trống, không che icon các hàng lối tắt */
    top: 23%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 32px;
    height: 72px;
    translate: 0 -50%;
    border: 2px solid #E9C063 !important;
    border-right: 0 !important;
    border-radius: 12px 0 0 12px;
    background: linear-gradient(90deg, #DA4234, #9A2218) !important;
    box-shadow: -3px 4px 10px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 230, 180, .5);
    transition: filter .2s, width .2s, left .2s;
}
.mh-body .mh-side-toggle:hover {
    left: 4px;
    width: 36px;
    filter: brightness(1.1);
}
/* mũi tên: đang mở thì chỉ sang phải (thu vào), đang thu thì chỉ sang trái (kéo ra) */
.mh-side-toggle::before {
    content: "";
    width: 10px;
    height: 10px;
    margin-left: -4px;
    border: solid #FFE7A3;
    border-width: 3px 3px 0 0;
    transform: rotate(45deg);
    transition: transform .3s, margin .3s;
}
.mh-side.is-collapsed .mh-side-toggle::before {
    margin-left: 4px;
    transform: rotate(-135deg);
}
.mh-side-app {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin-bottom: 4px;
}
.mh-side-app img {
    width: 104px;
    height: 104px;
    border-radius: 16px;
    /* ảnh QR nền trắng: object-fit giữ vuông, không méo nếu admin tải ảnh khác tỉ lệ */
    object-fit: cover;
    background: #fff;
    box-shadow: 0 0 0 2px var(--kim), 0 0 0 4px rgba(255, 246, 220, .8), 0 6px 14px rgba(60, 40, 10, .35);
    transition: transform .2s;
}
.mh-side-app span {
    margin-top: 6px;
    font-family: "FZ GameBR", var(--serif);
    font-size: 26px;
    line-height: 1.1;
    color: #5A3A12;
}
.mh-side-app:hover img {
    transform: translateY(-2px) scale(1.04);
}
/* hàng lối tắt: thẻ giấy viền vàng, icon tròn thò ra mép trái, mũi tên › bên phải */
.mh-body .mh-side-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 16px 0 40px;
    border: 1px solid #D9B45A;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 700;
    white-space: nowrap;
    color: #5A3A12;
    background: linear-gradient(#FFF9EC, #F3E3BD);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7), 0 2px 5px rgba(90, 60, 20, .15);
    transition: transform .2s, filter .2s;
}
.mh-side-row::after {
    content: "";
    position: absolute;
    right: 9px;
    top: 50%;
    width: 6px;
    height: 6px;
    border: solid currentColor;
    border-width: 2px 2px 0 0;
    opacity: .6;
    transform: translateY(-50%) rotate(45deg);
}
.mh-body .mh-side-row:hover {
    color: var(--chu);
    filter: brightness(1.04);
    transform: translateX(-3px);
}
.mh-side-row img,
.mh-side-ic {
    position: absolute;
    left: -10px;
    top: 50%;
    width: 46px;
    height: 46px;
    transform: translateY(-50%);
    filter: drop-shadow(0 2px 4px rgba(60, 40, 10, .3));
}
/* nạp vàng: thẻ đỏ nổi bật, icon to hơn */
.mh-body .mh-side-row.is-nap {
    height: 46px;
    padding-left: 46px;
    border-color: #F3C766;
    color: #FFF3D2;
    background: linear-gradient(#DA4234, #9A2218);
    box-shadow: inset 0 0 0 1px rgba(255, 220, 160, .5), 0 4px 10px rgba(142, 31, 23, .4);
}
.mh-side-row.is-nap img {
    left: -14px;
    width: 58px;
    height: 58px;
}
.mh-body .mh-side-row.is-nap:hover {
    color: #fff;
}
/* đĩa tròn viền vàng vẽ bằng CSS cho Hỗ trợ / Lên đầu trang (chưa có ảnh icon riêng) */
.mh-side-ic {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    left: -7px;
    border: 3px solid #E9C063;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5);
}
.mh-side-ic.is-cam { background: radial-gradient(circle at 50% 35%, #F0A04B, #A8520F); }
/* 2 lối tắt phụ (Giftcode, Group) chỉ có icon, một hàng ngang trong lòng khung (~144px) */
.mh-side-icons {
    display: flex;
    justify-content: space-around;
    margin-top: 4px;
}
.mh-body .mh-side-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    transition: transform .2s, filter .2s;
}
.mh-body .mh-side-icon:hover {
    transform: translateY(-2px) scale(1.12);
    filter: brightness(1.1);
}
/* ảnh và đĩa icon nằm tại chỗ (bỏ kiểu thò ra mép trái của hàng thẻ) */
.mh-side-icon img,
.mh-side-icon .mh-side-ic {
    position: static;
    width: 58px;
    height: 58px;
    transform: none;
    filter: drop-shadow(0 2px 3px rgba(60, 40, 10, .3));
}
.mh-side-icon .mh-side-ic {
    border-width: 2px;
}
.mh-side-icon .mh-side-ic svg {
    width: 24px;
    height: 24px;
}
/* 3 icon một hàng (Giftcode, Group, Hỗ trợ): thu còn 46px cho vừa lòng khung */
.mh-body .mh-side-icon,
.mh-side-icon img,
.mh-side-icon .mh-side-ic {
    width: 46px;
    height: 46px;
}
/* Lên đầu trang: dòng chữ nhỏ dưới cùng lòng khung */
.mh-body .mh-side-top {
    margin-top: 2px;
    padding: 6px 0;
    font-size: 13px;
    font-weight: 700;
    color: #6B4A12;
    border-top: 1px dashed rgba(90, 58, 18, .35);
}
.mh-body .mh-side-top::before {
    content: "↑ ";
}
.mh-body .mh-side-top:hover {
    color: var(--chu);
}
/* đĩa icon của 4 nút tải game */
.mh-side-ic.is-den { background: radial-gradient(circle at 50% 35%, #5A5A5A, #141414); }
.mh-side-ic.is-luc { background: radial-gradient(circle at 50% 35%, #4FC47E, #17733F); }
.mh-side-ic.is-apk { background: radial-gradient(circle at 50% 35%, #9BD65A, #4E8A1C); }
.mh-side-ic.is-xam { background: radial-gradient(circle at 50% 35%, #6C8FC0, #2B456E); }
.mh-side-ic.is-lam { background: radial-gradient(circle at 50% 35%, #5FA8E8, #1D4E9A); }
/* Fanpage (xanh Facebook) và Giftcode (đỏ son): cùng kiểu đĩa phẳng viền vàng như các hàng khác */
.mh-side-ic.is-win { background: radial-gradient(circle at 50% 35%, #3FB4F0, #0A5FA8); }
.mh-side-ic.is-fb { background: radial-gradient(circle at 50% 35%, #4A8CF0, #1846A0); }
.mh-side-ic.is-gift { background: radial-gradient(circle at 50% 35%, #E0584A, #8E1F17); }
.mh-side-ic.is-dt { background: radial-gradient(circle at 50% 35%, var(--kim-sang), var(--gold-deep, #93641c)); }
.mh-side-ic svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}
/* --- hiệu ứng: tự chạy chỉ là ánh sáng (không di chuyển); rê chuột mới có chuyển động nhỏ --- */
/* ảnh app: viền vàng sáng lên tắt xuống */
@keyframes mh-side-halo {
    0%, 100% { box-shadow: 0 0 0 2px var(--kim), 0 0 0 4px rgba(255, 246, 220, .8), 0 6px 14px rgba(60, 40, 10, .35); }
    50% { box-shadow: 0 0 0 2px #F6D27A, 0 0 0 4px rgba(255, 246, 220, .95), 0 0 18px 4px rgba(255, 205, 90, .7); }
}
.mh-side-app img {
    animation: mh-side-halo 2.6s ease-in-out infinite;
}
/* vệt sáng trong thẻ: ::before phủ đúng thẻ (bo góc theo thẻ), gradient chạy bằng
   background-position nên không cần overflow:hidden (icon thò ra ngoài vẫn thấy) */
.mh-side-row::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .8) 50%, transparent 62%) 160% 0 / 250% 100% no-repeat;
}
.mh-side-row:hover::before {
    animation: mh-shine .8s ease-out;
}
/* Nạp Vàng: vệt sáng lướt đều + quầng vàng nhấp nháy để nổi bật */
@keyframes mh-side-nap-glow {
    0%, 100% { box-shadow: inset 0 0 0 1px rgba(255, 220, 160, .5), 0 4px 10px rgba(142, 31, 23, .4); }
    50% { box-shadow: inset 0 0 0 1px rgba(255, 230, 180, .8), 0 0 16px 3px rgba(255, 190, 80, .65); }
}
.mh-body .mh-side-row.is-nap {
    animation: mh-side-nap-glow 2.2s ease-in-out infinite;
}
.mh-side-row.is-nap::before {
    animation: mh-shine 3s ease-in-out infinite;
}
/* rê chuột: icon phồng nhẹ và sáng lên, mũi tên nhích sang phải */
.mh-side-row img,
.mh-side-ic {
    transition: transform .25s, filter .25s;
}
.mh-side-row:hover img,
.mh-side-row:hover .mh-side-ic {
    transform: translateY(-50%) scale(1.12);
    filter: drop-shadow(0 2px 6px rgba(60, 40, 10, .35)) brightness(1.1);
}
.mh-side-row::after {
    transition: right .2s, opacity .2s;
}
.mh-side-row:hover::after {
    right: 6px;
    opacity: 1;
}

/* ---------- 9. FOOTER ---------- */
/* Khối pháp lý chuẩn cho game đã cấp phép: logo | công ty + giấy phép G1 | nhãn 18+,
   dưới là cảnh báo sức khỏe, rồi hàng liên kết + bản quyền. Dùng div thay cho p vì
   ".mh-body p" reset mất padding. */
.mh-ftr {
    padding: 48px 0 28px;
    font-size: 14px;
    color: #B8AE9C;
    background:
        radial-gradient(ellipse at 50% 0, rgba(201, 164, 92, .08), transparent 60%),
        #0E1726;
    border-top: 2px solid var(--kim);
}
.mh-ftr-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 40px;
    align-items: center;
}
.mh-ftr-logo {
    gap: 16px;
}
.mh-ftr-brand {
    display: block;
    width: 180px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}
.mh-ftr-info {
    display: grid;
    gap: 4px;
    padding-left: 40px;
    border-left: 1px solid rgba(201, 164, 92, .25);
    line-height: 1.55;
}
/* số hotline: vàng nhạt, đậm để nổi giữa các dòng chữ xám */
.mh-body .mh-ftr-hotline {
    font-weight: 700;
    color: var(--kim-sang);
}
.mh-body .mh-ftr-hotline:hover {
    color: #fff;
    text-decoration: underline;
}
/* link "Tra cứu" giấy phép G1 */
.mh-body .mh-ftr-link {
    color: var(--kim-sang);
}
.mh-body .mh-ftr-link:hover {
    color: #fff;
    text-decoration: underline;
}
.mh-ftr-co {
    margin-bottom: 4px;
    font-size: 18px;
    font-weight: 700;
    color: #F0E6CF;
}
.mh-tuoi {
    display: flex;
    align-items: center;
    gap: 14px;
    line-height: 1.45;
    color: #D9D2C2;
}
.mh-badge {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border: 3px solid #fff;
    border-radius: 10px;
    font-family: var(--serif);
    font-size: 26px;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(#D23A2E, #9E221A);
    box-shadow: 0 0 0 2px var(--chu), 0 4px 12px rgba(0, 0, 0, .35);
}
/* cảnh báo sức khỏe: giữa trang, gạch vàng mảnh hai bên */
.mh-canhbao {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 32px 0 24px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    color: var(--kim-sang);
}
.mh-canhbao::before,
.mh-canhbao::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(201, 164, 92, .5));
}
.mh-canhbao::after {
    transform: scaleX(-1);
}
.mh-ftr-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .08);
}
.mh-ftr-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}
.mh-ftr-links a {
    color: #D9D2C2;
}
/* gạch đứng ngăn giữa các liên kết */
.mh-ftr-links a + a::before {
    content: "";
    display: inline-block;
    width: 1px;
    height: 12px;
    margin: 0 14px;
    vertical-align: middle;
    background: rgba(255, 255, 255, .25);
}
.mh-body .mh-ftr-links a:hover {
    color: var(--kim-sang);
}
.mh-copy {
    color: #8E8575;
}
/* cột phải footer: 18+ và logo "Đã thông báo" Bộ Công Thương xếp chồng, căn trái theo nhau */
.mh-ftr-badges { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.mh-ftr-bct { display: block; transition: opacity .15s ease; }
.mh-ftr-bct img { display: block; width: auto; height: 72px; }
.mh-ftr-bct:hover { opacity: .85; }

/* =========================================================
   RESPONSIVE – bản thiết kế là PC 1280px; dưới đây co lại cho
   laptop nhỏ, tablet và điện thoại.
   ========================================================= */
@media (max-width: 1360px) {
    .mh-hdr-in { padding: 0 24px; }
    .mh-nav a { padding: 10px 10px; font-size: 17px; }
    .mh-logo-name { height: 40px; }
    .mh-logo-app { width: 52px; height: 52px; }
    .mh-hdr .mh-logo-app { width: 90px; height: 90px; border-radius: 20px; }
}

@media (max-width: 1100px) {
    .mh-cd-box { grid-template-columns: 1fr; gap: 28px; }
    /* máy tính bảng dùng chung header của điện thoại: thanh xanh 60px + viền 2px + hàng menu 40px */
    .mh-body { --hdr-h: 102px; }
    .mh-hdr-in { display: none; }
    .mh-mhdr { display: block; }
    /* banner đầu trang thành khung dọc 9:16 (dưới header cố định); có ảnh dọc riêng thì
       dùng ảnh đó, không thì ảnh/video ngang được cắt giữa theo khung */
    .mh-hero { height: auto; min-height: 0; max-height: none; aspect-ratio: 9 / 16; padding: 0 0 24px; }
    .mh-hero-mimg { display: block; z-index: 1; }
    /* khối tải game: chỉ còn 4 nút tải xếp 2 cột, nút hợp với máy đang dùng lên đầu;
       Nạp thẻ / Nhập code đã có ở thanh đáy màn hình */
    .mh-tg {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
        grid-template-areas: none;
        gap: 12px 10px;
        width: min(560px, 100%);
        aspect-ratio: auto;
        padding: 0;
    }
    .mh-tg::before { display: none; }
    .mh-tg > * { grid-area: auto !important; }
    .mh-body .mh-tg-lon { display: none; }
    .mh-tg-btn { aspect-ratio: 3.3; }
    .mh-tg-btn.is-goi-y { order: -1; }
    .mh-tg-btn span { font-size: max(11px, 2.6cqw); }
    .mh-tg-btn b { font-size: max(14px, 3.8cqw); }
    /* nút ‹ › của hàng Tính năng nổi bật: màn cảm ứng vuốt ngang là đủ */
    .mh-tnc-nav { display: none; }
    /* máy tính bảng / điện thoại: khung tin bỏ tỉ lệ 16:9 nên có chỗ cho nút xem tất cả */
    .mh-body .mh-news-all {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        margin: 14px auto 6px;
        width: fit-content;
        padding: 10px 28px;
        border: 1px solid var(--chu);
        border-radius: 999px;
        font-size: 15px;
        font-weight: 700;
        color: var(--chu);
        background: rgba(255, 255, 255, .7);
        transition: background .2s, color .2s;
    }
    .mh-body .mh-news-all::after {
        content: "";
        width: 7px;
        height: 7px;
        border: solid currentColor;
        border-width: 2px 2px 0 0;
        transform: rotate(45deg);
    }
    .mh-body .mh-news-all:hover {
        color: #fff;
        background: var(--chu);
    }
    /* trang con: header cố định sẽ che banner đầu trang; đẩy nội dung xuống đúng bằng chiều cao header */
    .mh-shell + main#top { padding-top: 102px; }

    .mh-news-grid { grid-template-columns: 1fr 1fr; }
    /* khung hẹp: bỏ 16:9 để chữ không bị thu quá nhỏ, quay về cỡ cố định */
    .mh-news-list { aspect-ratio: auto; padding: 4px 16px 8px; }
    .mh-tabs button { padding: 10px 14px !important; font-size: 18px; }
    .mh-list li a { gap: 12px; padding: 13px 0; font-size: 17px; }
    .mh-tag { padding: 2px 8px; font-size: 13px; }
    .mh-list time { font-size: 14px; }
    .mh-news-bar { gap: 12px; }
    .mh-search { height: 36px; }
    .mh-search input { padding-left: 14px; font-size: 15px; }
    .mh-search button { width: 36px; }
    .mh-search svg { width: 18px; height: 18px; }

    .mh-nghe-panel { grid-template-columns: 1fr 1fr; height: 600px; }
    .mh-ng-right { padding: 32px 24px; gap: 14px; }
    .mh-ng-art { left: -6%; width: 116%; }
    .mh-tn { --w: 76vw; }
    .mh-tn-cards { grid-auto-columns: calc((100% - 24px) / 2); }

    .mh-side { display: none; }
}

@media (max-width: 760px) {
    .mh-body { font-size: 15px; }
    .mh-wrap { width: calc(100% - 32px); }

    .mh-hero-title small { font-size: 16px; }
    /* điện thoại: khung đếm ngược rộng hết màn, nút xuống dòng dưới */
    .mh-hero-cd { --cdw: calc(100vw - 32px); }
    .mh-body .mh-cd-dk { width: calc(var(--cdw) * .62); font-size: 17px; }

    .mh-taigame { margin-top: 10px; }
    .mh-tg-btn span { font-size: max(11px, 3cqw); }
    .mh-tg-btn b { font-size: max(14px, 4.4cqw); }

    .mh-sec { padding: 56px 0; }
    .mh-sec-h { flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 24px; }

    .mh-news-grid { grid-template-columns: 1fr; }
    .mh-slide { padding: 18px; }
    .mh-slide h3 { font-size: 20px; padding-right: 0; padding-bottom: 14px; }
    .mh-dots { right: 16px; bottom: 12px; }
    .mh-news-list { padding: 4px 14px 8px; }
    /* điện thoại: ô tìm kiếm lên dòng riêng phía trên, hàng tab vẫn nằm sát gạch chân */
    .mh-news-bar { flex-wrap: wrap; row-gap: 0; }
    .mh-tabs { flex-basis: 100%; }
    .mh-search { order: -1; flex: 1 1 100%; margin: 10px 0 4px; }
    .mh-list .mh-tag { display: none; }
    .mh-list li a { grid-template-columns: 1fr auto; }

    /* điện thoại: tranh lên trên (mảng màu không cắt chéo), thông tin xuống dưới; thanh chọn nghề vuốt ngang */
    .mh-nghe-panel { height: auto; grid-template-rows: 380px auto; }
    .mh-nghe-panel.is-on { grid-template-columns: 1fr; }
    /* xếp dọc thì đường chéo không còn ý nghĩa: khối tranh lấy phần xanh bên trái ảnh nền,
       khối chữ dùng nền giấy */
    .mh-ng-stage { background: #F6EBD3 url("/assets/game/ui/bg-main.webp?v=3") center top / 100% auto; }
    /* phóng ~155% và bám góc dưới trái để chỉ còn phần xanh, không lộ mép chéo và dải trên */
    .mh-ng-left { background: url("/assets/game/ui/bg-he.webp") left bottom / auto 155% no-repeat; }
    .mh-ng-left::after { font-size: 220px; }
    .mh-ng-art { left: -4%; width: 108%; }
    .mh-ng-name { font-size: 44px; padding: 0 44px; }
    .mh-ng-name::before, .mh-ng-name::after { width: 32px; }
    .mh-ng-sub { font-size: 17px; }
    .mh-body .mh-ng-tieubieu a { padding: 6px 12px; font-size: 15px; }
    .mh-ng-text { font-size: 16px; }
    .mh-ng-bar { justify-content: flex-start; gap: 0; padding: 0; }
    .mh-nghe-tabs button { min-width: 96px; padding: 18px 8px 12px !important; font-size: 15px; }
    .mh-nghe-tabs button img { width: 54px; height: 54px; }



    /* điện thoại: slide gần hết bề ngang, mũi tên nhỏ đè lên mép slide, vuốt để chuyển */
    .mh-tn { --w: 88vw; padding: 40px 0 28px; }
    .mh-tn-cards { gap: 12px; grid-auto-columns: 82%; }
    .mh-tn-card-img.is-han { font-size: 64px; }
    .mh-tn-card-body { padding: 10px 12px 12px; }
    .mh-tn-card-body h3 { font-size: 22px; }
    .mh-tn-card-body p { font-size: 13px; }
    .mh-body .mh-tn-arrow { width: 44px; height: 44px; }
    .mh-body .mh-tn-arrow.is-prev { left: 2px; }
    .mh-body .mh-tn-arrow.is-next { right: 2px; }
    .mh-tn-cap h3 { font-size: 26px; }
    .mh-tn-cap p { font-size: 11px; padding: .3em 1.4em; }
    .mh-tn-dots { gap: 8px; margin-top: 18px; }
    .mh-tn-dots button { width: 12px; height: 12px; }
    .mh-tn-dots button.is-on { width: 36px; }

    .mh-cd-box { grid-template-columns: 1fr; gap: 24px; padding: 28px 20px; }
    .mh-cong { gap: 8px; }
    /* 2 ô một hàng: icon 56px + đệm 16px làm tràn ngang màn 360px, thu gọn lại */
    .mh-cong a { min-width: 0; gap: 6px; padding: 10px 4px; }
    .mh-cong img { width: 60px; height: 60px; }
    .mh-cong b { font-size: 14px; }
    .mh-cong span { font-size: 11px; }

    /* điện thoại: xếp dọc, căn giữa */
    .mh-ftr-main { grid-template-columns: 1fr; gap: 20px; justify-items: center; text-align: center; }
    .mh-ftr-info { padding-left: 0; border-left: 0; }
    .mh-ftr-badges { flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px 24px; }
    .mh-ftr-bct img { height: 60px; }
    .mh-canhbao { font-size: 14px; gap: 10px; }
    .mh-ftr-bottom { flex-direction: column; text-align: center; }
    .mh-ftr-links { justify-content: center; }
}

@media (min-width: 761px) and (max-width: 1100px) {
    .mh-news .mh-wrap { width: calc(100% - 48px); max-width: 820px; margin-inline: auto; }
    .mh-news-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .mh-news .mh-slider { width: 100%; }
    .mh-news .mh-slide { padding: 24px 24px 48px; }
    .mh-news .mh-slide h3 { max-width: 36ch; padding: 0; font-size: 26px; }
    .mh-news-list { padding: 12px 20px 16px; }
    .mh-news-bar { gap: 20px; }
    .mh-tabs { flex: 1 1 auto; }
    .mh-tabs button { min-height: 44px; }
    .mh-search { flex: 0 1 240px; height: 40px; }
    .mh-search button { width: 40px; }
    .mh-list li a { grid-template-columns: auto minmax(0, 1fr) auto; min-height: 56px; }
    .mh-list .mh-t {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        white-space: normal;
    }
}

/* Compact role layout: selection first, artwork and elements kept separate. */
@media (max-width: 1100px) {
    .mh-nghe { display: flex; flex-direction: column; }
    .mh-ng-bar { order: -1; padding: 0 16px; }
    .mh-nghe-tabs {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        width: min(680px, 100%);
        gap: 0;
        margin: 0;
        padding: 0;
        overflow: visible;
    }
    .mh-nghe-tabs button {
        min-width: 0;
        min-height: 100px;
        padding: 12px 6px !important;
        font-size: 16px;
        white-space: normal;
        text-align: center;
        line-height: 1.3;
    }
    .mh-nghe-tabs button img { width: 52px; height: 52px; }
    .mh-nghe-tabs button.is-on::before { inset: 0; clip-path: none; }
    .mh-nghe .mh-nghe-panel {
        width: 100%;
        margin: 0;
        height: auto;
        min-height: 540px;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        grid-template-rows: auto;
    }
    .mh-ng-left { min-width: 0; min-height: 540px; }
    .mh-ng-art {
        left: 0;
        bottom: 124px;
        width: 100%;
        height: calc(100% - 140px);
        object-position: center bottom;
    }
    .mh-ng-he {
        top: auto;
        bottom: 16px;
        left: 16px;
        width: calc(100% - 32px);
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        transform: none;
    }
    .mh-ng-he li {
        min-width: 0;
        min-height: 44px;
        gap: 6px;
        padding: 6px;
        font-size: 14px;
        line-height: 1.25;
        white-space: normal;
    }
    .mh-ng-he li::before { border-radius: 4px; border-left-width: 3px; }
    .mh-ng-he img, .mh-ng-he i { width: 28px; height: 28px; font-size: 14px; }
    .mh-nghe .mh-ng-right { min-width: 0; padding: 28px 24px; gap: 16px; }
    .mh-nghe .mh-ng-name { max-width: 100%; font-size: 48px; padding: 0; }
    .mh-ng-name::before, .mh-ng-name::after { display: none; }
    .mh-ng-sub { justify-content: center; font-size: 18px; gap: 8px; margin-top: 12px; }
    .mh-ng-sub::before, .mh-ng-sub::after, .mh-ng-sub i { display: none; }
    .mh-body .mh-ng-tieubieu a { padding: 7px 12px; font-size: 16px; }
    .mh-ng-text { font-size: 17px; }
}

@media (max-width: 760px) {
    .mh-ng-bar { padding: 0 8px; }
    .mh-nghe-tabs button { min-height: 90px; padding: 10px 2px !important; font-size: 12px; gap: 8px; }
    .mh-nghe-tabs button img { width: 42px; height: 42px; }
    .mh-nghe .mh-nghe-panel { grid-template-columns: minmax(0, 1fr); min-height: 0; }
    .mh-ng-left { min-height: 0; height: 440px; }
    .mh-nghe .mh-ng-left::after { font-size: 220px; }
    .mh-ng-art { bottom: 116px; height: calc(100% - 124px); }
    .mh-ng-he { left: 12px; width: calc(100% - 24px); bottom: 12px; gap: 6px; }
    .mh-ng-he li { font-size: 13px; gap: 5px; }
    .mh-ng-he img, .mh-ng-he i { width: 26px; height: 26px; }
    .mh-nghe .mh-ng-right { padding: 24px 16px 28px; gap: 14px; }
    .mh-nghe .mh-ng-name { font-size: 42px; }
    .mh-ng-sub { font-size: 17px; }
    .mh-body .mh-ng-tieubieu a { padding: 6px 10px; font-size: 15px; }
    .mh-ng-text { font-size: 16px; }
}

@media (max-width: 380px) {
    .mh-ng-left { height: 396px; }
    .mh-ng-he li { flex-direction: column; text-align: center; }
    .mh-ng-art { bottom: 142px; height: calc(100% - 150px); }
    .mh-nghe-tabs button img { width: 36px; height: 36px; }
}

/* =========================================================
   HEADER KIẾM SƠN – nền sơn mài đen đỏ + bóng núi, menu chữ font game,
   mục đang mở gạch chân hình lưỡi kiếm, nút xiên kiểu mũi kiếm.
   Đặt cuối file để đè kiểu header giấy vàng cũ (ghi đè cả bản điện thoại).
   ========================================================= */
.mh-body .mh-hdr {
    --ks-ink: #140B09;
    --ks-lac: #2B1410;
    --ks-gold: #E2B455;
    --ks-gold-hi: #FFE6A6;
    --ks-text: #EADBB8;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 88' preserveAspectRatio='none'%3E%3Cpath d='M0 88V62l90-22 70 18 110-38 90 30 80-14 120 34 100-40 130 36 90-20 110 26 140-46 120 40 90-16 120 28 140-30V88z' fill='%23E2B455' fill-opacity='.07'/%3E%3Cpath d='M0 88V74l140-16 120 14 160-22 140 20 130-12 170 18 150-24 160 22 140-14 130 16 160-10V88z' fill='%23000' fill-opacity='.35'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat,
        radial-gradient(ellipse 50% 140% at 50% 0%, rgba(184, 50, 42, .35), transparent 70%),
        linear-gradient(180deg, var(--ks-lac) 0%, #1D0E0B 60%, var(--ks-ink) 100%);
    border-bottom: 1px solid rgba(226, 180, 85, .75);
    box-shadow: 0 1px 0 rgba(0, 0, 0, .6), 0 10px 30px rgba(0, 0, 0, .35);
    backdrop-filter: none;
}
/* đường viền chỉ vàng có hạt thoi ở giữa, nằm ngay dưới viền header */
.mh-body .mh-hdr::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -5px;
    width: 9px;
    height: 9px;
    background: var(--ks-gold);
    transform: translateX(-50%) rotate(45deg);
    box-shadow: 0 0 10px rgba(255, 210, 120, .7);
    pointer-events: none;
}

/* menu: bỏ ô icon, chữ font game màu giấy sáng, ngăn bằng hạt thoi nhỏ */
.mh-body .mh-hdr .mh-nav-ic { display: none; }
.mh-body .mh-hdr .mh-nav { gap: 0; }
.mh-body .mh-hdr .mh-nav a {
    position: relative;
    padding: 10px 22px 12px;
    font-family: "FZ GameBR", var(--sans);
    font-size: 24px;
    font-weight: 400;
    letter-spacing: .02em;
    color: var(--ks-text);
    background: none;
    border-radius: 0;
    transition: color .2s, text-shadow .2s;
}
.mh-body .mh-hdr .mh-nav a + a::before,
.mh-body .mh-hdr .mh-nav-r a:first-child::before {
    content: "";
    position: absolute;
    left: -2px;
    top: 50%;
    width: 4px;
    height: 4px;
    background: rgba(226, 180, 85, .55);
    transform: translateY(-50%) rotate(45deg);
}
/* gạch chân lưỡi kiếm: mảnh hai đầu, sáng ở giữa, bung ra khi rê chuột / mục đang mở */
.mh-body .mh-hdr .mh-nav a::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 4px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--ks-gold) 20%, var(--ks-gold-hi) 50%, var(--ks-gold) 80%, transparent);
    clip-path: polygon(0 50%, 12% 0, 88% 0, 100% 50%, 88% 100%, 12% 100%);
    transform: scaleX(0);
    transition: transform .25s ease;
}
.mh-body .mh-hdr .mh-nav a:hover,
.mh-body .mh-hdr .mh-nav a.is-on {
    color: var(--ks-gold-hi);
    background: none;
    text-shadow: 0 0 12px rgba(255, 200, 100, .45);
}
.mh-body .mh-hdr .mh-nav a:hover::after,
.mh-body .mh-hdr .mh-nav a.is-on::after {
    transform: scaleX(1);
}

/* logo: khung vàng hai lớp, quầng đỏ phía sau */
.mh-body .mh-hdr .mh-logo-app {
    box-shadow:
        0 0 0 2px var(--ks-gold),
        0 0 0 5px var(--ks-ink),
        0 0 0 6px rgba(226, 180, 85, .55),
        0 0 26px 4px rgba(184, 50, 42, .45),
        0 12px 28px rgba(0, 0, 0, .55);
}

/* nút xiên kiểu mũi kiếm: Nạp Vàng ánh kim, nút chính đỏ son viền vàng */
.mh-body .mh-hdr .mh-hdr-cta { gap: 6px; }
.mh-body .mh-hdr .mh-hdr-cta .mh-btn {
    position: relative;
    overflow: hidden;
    padding: 12px 30px;
    border: 0;
    border-radius: 0;
    font-family: "FZ GameBR", var(--sans);
    font-size: 21px;
    font-weight: 400;
    letter-spacing: .02em;
    clip-path: polygon(14px 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
    transition: filter .2s, transform .2s;
}
.mh-body .mh-hdr .mh-btn-vien {
    color: #3A1F05;
    background: linear-gradient(180deg, #FFF0BE 0%, #F0C45F 45%, #C88E2C 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 -2px 0 rgba(120, 70, 10, .45);
}
.mh-body .mh-hdr .mh-btn-chu {
    color: #FFF1D0;
    background: linear-gradient(180deg, #D9473A 0%, #A8261C 55%, #7A140E 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 214, 140, .55), inset 0 1px 0 rgba(255, 255, 255, .25);
    text-shadow: 0 1px 1px rgba(0, 0, 0, .4);
}
.mh-body .mh-hdr .mh-btn-vien:hover { color: #2A1503; background: linear-gradient(180deg, #FFF0BE 0%, #F0C45F 45%, #C88E2C 100%); }
.mh-body .mh-hdr .mh-btn-chu:hover { color: #fff; background: linear-gradient(180deg, #D9473A 0%, #A8261C 55%, #7A140E 100%); }
.mh-body .mh-hdr .mh-hdr-cta .mh-btn:hover {
    filter: brightness(1.12) saturate(1.05);
    transform: translateY(-1px);
}
/* vệt sáng lướt qua nút khi rê chuột */
.mh-body .mh-hdr .mh-hdr-cta .mh-btn::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -60%;
    width: 40%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent);
    transform: skewX(-20deg);
    transition: left .5s ease;
    pointer-events: none;
}
.mh-body .mh-hdr .mh-hdr-cta .mh-btn:hover::after { left: 120%; }
/* Nạp Vàng: vệt sáng tự lướt qua đều đặn (không cần rê chuột) + rương nạp nhún nhẹ */
@keyframes ks-nap-shine {
    0% { left: -60%; }
    45%, 100% { left: 130%; }
}
@keyframes ks-nap-bob {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-2px) rotate(-6deg); }
}
.mh-body .mh-hdr .mh-hdr-cta .mh-btn-vien::after {
    width: 45%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .85), transparent);
    animation: ks-nap-shine 2.6s ease-in-out infinite;
}
.mh-body .mh-hdr .mh-btn-vien img.mh-btn-ic {
    animation: ks-nap-bob 1.6s ease-in-out infinite;
}
.mh-body .mh-hdr img.mh-btn-ic { margin: -6px 0 -6px -6px; }

@media (min-width: 1101px) and (max-width: 1360px) {
    .mh-body .mh-hdr .mh-nav a { padding: 10px 14px 12px; font-size: 21px; }
    .mh-body .mh-hdr .mh-hdr-cta .mh-btn { padding: 11px 22px; font-size: 19px; }
}
@media (min-width: 1101px) and (max-width: 1280px) {
    .mh-body .mh-hdr .mh-nav a { padding: 10px 10px 12px; font-size: 19px; }
    .mh-body .mh-hdr .mh-hdr-cta .mh-btn { padding: 10px 18px; font-size: 17px; }
}

/* điện thoại / máy tính bảng: thanh trên sơn mài thay cho thanh xanh ngọc, hàng menu tối chữ sáng */
.mh-body .mh-mhdr-top {
    background:
        radial-gradient(ellipse 60% 160% at 50% 0%, rgba(184, 50, 42, .35), transparent 70%),
        linear-gradient(180deg, #2B1410, #160B09);
    border-bottom: 1px solid rgba(226, 180, 85, .7);
}
.mh-body .mh-mhdr-logo {
    box-shadow: 0 0 0 2px #E2B455, 0 0 0 4px #140B09, 0 4px 12px rgba(0, 0, 0, .55);
}
.mh-body .mh-mhdr-btn.is-gold {
    color: #3A1F05;
    background: linear-gradient(180deg, #FFF0BE 0%, #F0C45F 45%, #C88E2C 100%);
    box-shadow: none;
    clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
    padding: 0 20px 1px;
}
.mh-body .mh-mhdr-nav {
    background: linear-gradient(180deg, #1D0E0B, #120907);
    border-bottom: 1px solid rgba(226, 180, 85, .55);
}
.mh-body .mh-mhdr-nav a {
    color: #EADBB8;
    font-family: "FZ GameBR", var(--sans);
    font-size: 17px;
    font-weight: 400;
}
.mh-body .mh-mhdr-nav a:hover,
.mh-body .mh-mhdr-nav a.is-on {
    color: #FFE6A6;
}
.mh-body .mh-mhdr-nav a.is-on::after {
    height: 3px;
    background: linear-gradient(90deg, transparent, #E2B455 20%, #FFE6A6 50%, #E2B455 80%, transparent);
    clip-path: polygon(0 50%, 12% 0, 88% 0, 100% 50%, 88% 100%, 12% 100%);
}

/* =========================================================
   MÔN PHÁI (12 phái, home.blade.php #mon-phai) – dùng lại khung .mh-nghe:
   tranh nhân vật Kiếm Sơn, dãy Ngũ hành thay dãy Hệ, thanh 12 ấn chọn phái.
   ========================================================= */
.mh-phai .mh-ng-left::after { color: rgba(255, 255, 255, .08); }
/* dãy Ngũ hành: không phải link nên bỏ con trỏ; chữ Hán trong vòng tròn màu hành */
.mh-phai .mh-ng-he li { cursor: default; }
.mh-phai .mh-ng-he i { font-family: "Noto Serif", serif; font-size: 22px; }

/* hai nhánh võ công: thẻ giấy vàng như thẻ hiệp khách tiêu biểu cũ, không bấm */
.mh-body .mh-ng-tieubieu .mh-phai-sub {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid #C79A3E;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 700;
    color: color-mix(in srgb, var(--c) 70%, #2A1A05);
    background: linear-gradient(#FFF8E6, #F1DDA9);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 2px 4px rgba(74, 53, 20, .15);
}
.mh-ng-tieubieu .mh-phai-sub small {
    background: linear-gradient(var(--c2), var(--c));
}
.mh-phai-note {
    margin-top: 2px !important;
    font-size: 15px;
    font-style: italic;
    color: #7A6440;
}

/* thanh 12 ấn chọn phái */
.mh-phai .mh-ng-bar { gap: 0; }
.mh-phai .mh-nghe-tabs { gap: 2px; }
.mh-phai .mh-nghe-tabs button {
    min-width: 0;
    padding: 16px 10px 12px !important;
    font-size: 16px;
    gap: 6px;
}
.mh-phai-ic {
    display: block;
    width: 54px;
    height: 54px;
    object-fit: contain;
    filter: drop-shadow(0 3px 5px rgba(80, 50, 10, .35));
    transition: transform .2s, filter .2s;
}
.mh-phai .mh-nghe-tabs button:hover .mh-phai-ic { transform: translateY(-3px); }
.mh-phai .mh-nghe-tabs button.is-on .mh-phai-ic {
    transform: scale(1.16);
    filter: drop-shadow(0 0 8px color-mix(in srgb, var(--c2) 85%, transparent)) drop-shadow(0 3px 5px rgba(80, 50, 10, .3));
}
@media (max-width: 1100px) {
    .mh-phai .mh-nghe-tabs button { min-width: 84px; font-size: 14px; }
    .mh-phai-ic { width: 44px; height: 44px; }
}
@media (max-width: 760px) {
    .mh-phai .mh-nghe-tabs button { min-width: 72px; font-size: 13px; }
    .mh-phai-ic { width: 40px; height: 40px; }
    .mh-body .mh-ng-tieubieu .mh-phai-sub { font-size: 16px; padding: 7px 12px; }
}

/* thẻ chân dung nhân vật môn phái (tranh 3:4 có nền): khung vàng hai lớp, ánh màu phái phía sau,
   dải màu phái mờ ở đáy để tranh liền với khung */
.mh-phai-card {
    position: absolute;
    left: 52%;
    top: 50%;
    z-index: 1;
    height: 86%;
    aspect-ratio: 3 / 4;
    margin: 0;
    transform: translate(-50%, -50%);
    border-radius: 14px;
    overflow: hidden;
    background: #F6EBD3;
    box-shadow:
        0 0 0 3px #E9C46E,
        0 0 0 7px color-mix(in srgb, var(--c) 75%, #1a0d05),
        0 0 0 8px rgba(243, 213, 138, .8),
        0 24px 50px rgba(0, 0, 0, .35),
        0 0 70px 6px color-mix(in srgb, var(--c2) 45%, transparent);
    animation: mh-phai-card-in .45s ease both;
}
.mh-phai-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.mh-phai-card::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 22%;
    background: linear-gradient(to top, color-mix(in srgb, var(--c) 45%, transparent), transparent);
    pointer-events: none;
}
@keyframes mh-phai-card-in {
    from { opacity: 0; transform: translate(-50%, -46%); }
}
@media (max-width: 1100px) {
    .mh-phai-card { left: 50%; top: 54%; height: 80%; }
}
@media (max-width: 760px) {
    /* dãy Ngũ hành xếp 2 hàng ở đáy cột (~118px): thẻ nằm gọn phần phía trên */
    .mh-phai-card { top: calc((100% - 118px) / 2); height: calc(100% - 150px); border-radius: 10px; }
}

/* banner đầu trang: neo ảnh theo mép trên (ảnh đã chừa sẵn dải dưới header), phần thừa cắt ở dưới */
@media (min-width: 1101px) {
    .mh-hero-bg,
    .mh-hero-img { background-position: center top; }
}
/* bỏ lớp phủ tối ở đáy banner đầu trang (theo yêu cầu) */
.mh-hero::after { display: none; }
/* phái chưa có tranh nhân vật: icon phái ở giữa khung trên nền màu phái */
.mh-phai-card.is-icon {
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--c2) 70%, #fff), var(--c) 95%);
}
.mh-phai-card.is-icon img { width: 42%; height: auto; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .4)); }

/* =========================================================
   CHUYỂN TRANG MƯỢT (View Transitions giữa các trang, Chrome/Edge/Safari 18+;
   trình duyệt khác bỏ qua, vẫn chuyển trang bình thường).
   Header và thanh lối tắt giữ nguyên chỗ, chỉ phần nội dung mờ chéo sang trang mới.
   ========================================================= */
@view-transition { navigation: auto; }
.mh-hdr { view-transition-name: ks-header; }
.mh-side { view-transition-name: ks-side; }
.mh-mbar { view-transition-name: ks-mbar; }
::view-transition-old(root) { animation: ks-vt-out .18s ease both; }
::view-transition-new(root) { animation: ks-vt-in .24s ease both; }
::view-transition-group(ks-header),
::view-transition-group(ks-side),
::view-transition-group(ks-mbar) { animation: none; }
@keyframes ks-vt-out { to { opacity: 0; } }
@keyframes ks-vt-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) {
    ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* banner điện thoại: ảnh dọc bắt đầu ngay dưới header cố định (không bị che đầu nhân vật);
   phần thừa cắt ở đáy (mặt hồ, nơi đặt nút tải game) */
@media (max-width: 1100px) {
    .mh-hero-mimg {
        top: calc(var(--hdr-h) + env(safe-area-inset-top, 0px));
        background-position: center top;
    }
}

/* =========================================================
   HEADER ĐIỆN THOẠI (≤1100px) – bản Kiếm Sơn
   Hàng trên 56px: logo + tên game | Tải game | ☰ ; hàng dưới 44px: 5 mục chia đều, icon + chữ.
   Tổng vẫn 102px (--hdr-h) như cũ.
   ========================================================= */
.mh-body .mh-mhdr-top {
    justify-content: flex-start;
    gap: 10px;
    height: 56px;
    padding: 0 12px;
    background:
        radial-gradient(ellipse 70% 160% at 0 0, rgba(184, 50, 42, .45), transparent 70%),
        linear-gradient(180deg, #2E1511, #170A08);
    border-bottom: 1px solid rgba(226, 180, 85, .55);
}
.mh-body .mh-mhdr-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    margin-right: auto;
    color: inherit;
}
.mh-mhdr-brand img {
    width: 42px;
    height: 42px;
    flex: none;
    border-radius: 11px;
    box-shadow: 0 0 0 1.5px #E2B455, 0 0 0 3px #170A08, 0 0 0 4px rgba(226, 180, 85, .5), 0 3px 8px rgba(0, 0, 0, .5);
}
.mh-mhdr-brand span { display: grid; min-width: 0; line-height: 1; }
.mh-mhdr-brand b {
    font-family: "FZ GameBR", var(--serif);
    font-size: 22px;
    font-weight: 400;
    white-space: nowrap;
    background: linear-gradient(180deg, #FFF3C8, #F2C35A 55%, #C88E2C);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.mh-mhdr-brand small {
    margin-top: 3px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .38em;
    text-transform: uppercase;
    color: #CDB27A;
}
.mh-body .mh-mhdr-btn.is-gold {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 16px 0 14px;
    clip-path: polygon(9px 0, 100% 0, calc(100% - 9px) 100%, 0 100%);
    font-family: "FZ GameBR", var(--serif);
    font-size: 17px;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    color: #3A1F05;
    background: linear-gradient(180deg, #FFF0BE 0%, #F0C45F 45%, #C88E2C 100%);
    box-shadow: none;
}
.mh-mhdr-btn svg { width: 16px; height: 16px; fill: currentColor; }
.mh-body .mh-burger {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(226, 180, 85, .6) !important;
    background: rgba(255, 230, 170, .06);
}
.mh-body .mh-burger span { width: 18px; background: #F3D58A; }

/* hàng menu: 5 ô chia đều, không phải vuốt ngang */
.mh-body .mh-mhdr-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    height: 46px;
    padding: 0 4px;
    overflow: visible;
    background: linear-gradient(180deg, #1F0F0C, #140907);
    border-bottom: 1px solid rgba(226, 180, 85, .55);
}
.mh-body .mh-mhdr-nav a {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    padding: 0 2px;
    font-family: var(--sans);
    font-size: 12.5px;
    font-weight: 700;
    color: #CDB98F;
    transition: color .2s;
}
.mh-mhdr-nav a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mh-body .mh-mhdr-nav .mh-nav-ic {
    display: grid !important;
    width: auto;
    height: auto;
    border: 0;
    background: none;
    box-shadow: none;
    color: inherit;
}
.mh-body .mh-mhdr-nav .mh-nav-ic svg { width: 19px; height: 19px; stroke-width: 1.8; }
.mh-body .mh-mhdr-nav a:hover { color: #FFE6A6; }
.mh-body .mh-mhdr-nav a.is-on { color: #FFE6A6; }
/* mục đang mở: nền ánh vàng + vạch lưỡi kiếm ở đáy */
.mh-body .mh-mhdr-nav a.is-on::before {
    content: "";
    position: absolute;
    inset: 4px 3px;
    z-index: -1;
    border-radius: 8px;
    background: radial-gradient(ellipse at 50% 100%, rgba(242, 195, 90, .3), rgba(242, 195, 90, .06) 70%);
}
.mh-body .mh-mhdr-nav a.is-on::after {
    left: 22%;
    right: 22%;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #E2B455 20%, #FFE6A6 50%, #E2B455 80%, transparent);
    clip-path: none;
    box-shadow: 0 0 8px rgba(255, 210, 120, .7);
}
.mh-mhdr-nav { isolation: isolate; }
@media (max-width: 360px) {
    .mh-mhdr-brand small { display: none; }
    .mh-mhdr-brand b { font-size: 19px; }
    .mh-body .mh-mhdr-btn.is-gold { padding: 0 12px 0 10px; font-size: 15px; }
    .mh-body .mh-mhdr-nav a { font-size: 11.5px; }
}
@media (max-width: 1100px) {
    .mh-body .mh-hdr::after { display: none; } /* hạt thoi giữa đáy header máy tính: dễ nhầm là mục đang chọn */
}

/* =========================================================
   GIAO DIỆN ĐIỆN THOẠI – rà soát tổng (đặt cuối để đè các quy tắc cũ)
   ========================================================= */
@media (max-width: 1100px) {
    /* nút chat hỗ trợ (widget ngoài, khung fixed bottom 20px) nổi trên thanh đáy, không đè "Nạp Thẻ" */
    body > div[style*="2147483000"]:not(.ks-progress) {
        bottom: calc(62px + 12px + env(safe-area-inset-bottom, 0px)) !important;
        right: 12px !important;
    }

    /* 18+: dải mảnh 1 dòng ngay dưới header, không đè mặt nhân vật */
    .mh-age {
        top: calc(var(--hdr-h) + env(safe-area-inset-top, 0px) + 8px);
        left: 12px;
        right: 12px;
        max-width: none;
        justify-content: center;
        gap: 8px;
        padding: 4px 12px;
        border-radius: 999px;
        background: rgba(20, 10, 8, .55);
        backdrop-filter: blur(4px);
    }
    .mh-age b { padding-right: 8px; font-size: 15px; }
    .mh-age span { font-size: 11px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

    /* ---- khối Môn phái trang chủ ---- */
    /* 13 phái: 1 hàng vuốt ngang (thay lưới 3 hàng), mép mờ báo còn nội dung */
    .mh-phai .mh-ng-bar { padding: 0; }
    .mh-phai .mh-nghe-tabs {
        display: flex;
        gap: 2px;
        width: 100%;
        padding: 0 10px;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
        mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
    }
    .mh-phai .mh-nghe-tabs button {
        flex: none;
        width: 74px;
        min-height: 0;
        padding: 10px 2px 8px !important;
        gap: 4px;
        font-size: 12.5px;
        line-height: 1.2;
        white-space: nowrap;
        scroll-snap-align: center;
    }
    .mh-phai .mh-phai-ic { width: 40px; height: 40px; }

    /* panel: tranh + dãy ngũ hành 1 hàng gọn */
    .mh-phai .mh-nghe-panel { grid-template-columns: minmax(0, 1fr); min-height: 0; }
    .mh-phai .mh-ng-left { height: 470px; min-height: 0; }
    .mh-phai-card { top: calc((100% - 64px) / 2); height: calc(100% - 96px); }
    .mh-phai .mh-ng-he {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 6px;
        left: 12px;
        right: 12px;
        bottom: 12px;
        width: auto;
        top: auto;
        transform: none;
    }
    .mh-phai .mh-ng-he li {
        flex-direction: column;
        justify-content: center;
        gap: 2px;
        padding: 6px 2px;
        font-size: 12px;
        text-align: center;
    }
    .mh-phai .mh-ng-he li::before { border-radius: 10px; border-left-width: 0; }
    .mh-phai .mh-ng-he i { width: 26px; height: 26px; font-size: 14px; }
    .mh-phai .mh-ng-right { padding: 24px 18px 30px; gap: 14px; }
}
@media (max-width: 760px) {
    .mh-phai .mh-ng-left { height: 430px; }
}

/* trang Môn phái: chữ không tràn mép, tab nhánh chia đôi gọn */
@media (max-width: 900px) {
    .mp-hero-in { grid-template-columns: minmax(0, 1fr); }
    .mp-head { min-width: 0; width: 100%; }
    .mp-lead { overflow-wrap: anywhere; }
    .mp-subtabs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 8px; }
    .mp-subtabs button { min-width: 0; padding: 9px 14px; font-size: 15px; line-height: 1.25; }
    .mp-khac { width: 100%; justify-content: center; }
}
@media (max-width: 900px) {
    /* nền tranh núi mực đậm phía sau làm khó đọc: đặt mô tả lên lớp giấy mờ */
    .mp-lead {
        padding: 10px 14px;
        border-radius: 12px;
        background: rgba(255, 252, 243, .85);
        box-shadow: 0 0 0 1px rgba(226, 194, 122, .6);
    }
}
@media (max-width: 1100px) {
    /* tranh và dãy ngũ hành tách hẳn nhau */
    .mh-phai-card { top: calc((100% - 92px) / 2); height: calc(100% - 118px); }
    /* ô ngũ hành: nền đều màu hành (bỏ dải mờ dần của bản máy tính) */
    .mh-phai .mh-ng-he li::before {
        background: color-mix(in srgb, var(--c) 22%, rgba(255, 255, 255, .78));
        border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
        opacity: 1;
    }
    .mh-phai .mh-ng-he li { color: color-mix(in srgb, var(--c) 70%, #1B1206); text-shadow: none; }
    .mh-phai .mh-ng-he li.is-on { color: #fff; }
    .mh-phai .mh-ng-he li.is-on::before {
        background: linear-gradient(180deg, color-mix(in srgb, var(--c) 75%, #fff), var(--c));
        border-color: #F3D58A;
        box-shadow: 0 0 0 2px rgba(243, 213, 138, .6), 0 4px 10px color-mix(in srgb, var(--c) 45%, transparent);
        filter: none;
    }
}

/* banner đầu trang: hiện đúng màu ảnh gốc (bỏ tăng sáng/bão hoà làm ảnh ngả vàng, cháy sáng) */
.mh-hero-bg { filter: none; }

/* =========================================================
   HEADER: đỏ son sáng hơn (thay sơn mài gần đen) cho đồng bộ banner pastel & nút đỏ son
   ========================================================= */
.mh-body .mh-hdr {
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 88' preserveAspectRatio='none'%3E%3Cpath d='M0 88V62l90-22 70 18 110-38 90 30 80-14 120 34 100-40 130 36 90-20 110 26 140-46 120 40 90-16 120 28 140-30V88z' fill='%23FFE6A6' fill-opacity='.08'/%3E%3Cpath d='M0 88V74l140-16 120 14 160-22 140 20 130-12 170 18 150-24 160 22 140-14 130 16 160-10V88z' fill='%235A0F08' fill-opacity='.35'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat,
        radial-gradient(ellipse 50% 140% at 50% 0%, rgba(255, 170, 120, .28), transparent 70%),
        linear-gradient(180deg, #9E2F22 0%, #7E1F15 55%, #63150E 100%);
    border-bottom: 2px solid #E2B455;
    box-shadow: 0 4px 18px rgba(99, 21, 14, .3);
}
.mh-body .mh-hdr .mh-nav a { color: #FFEBC8; text-shadow: 0 1px 2px rgba(60, 8, 4, .5); }
.mh-body .mh-hdr .mh-nav a:hover,
.mh-body .mh-hdr .mh-nav a.is-on { color: #FFE38A; }
.mh-body .mh-hdr .mh-nav a + a::before,
.mh-body .mh-hdr .mh-nav-r a:first-child::before { background: rgba(255, 220, 150, .6); }
/* nút Đăng ký: đổi sang vàng-đỏ viền vàng để không chìm vào nền đỏ */
.mh-body .mh-hdr .mh-btn-chu {
    background: linear-gradient(180deg, #E8503F 0%, #B3261A 55%, #7A1209 100%);
    box-shadow: inset 0 0 0 1.5px #F3D58A, inset 0 1px 0 rgba(255, 255, 255, .3), 0 3px 8px rgba(60, 8, 4, .35);
}
.mh-body .mh-hdr .mh-btn-chu:hover { background: linear-gradient(180deg, #E8503F 0%, #B3261A 55%, #7A1209 100%); }

/* điện thoại: cùng tông */
.mh-body .mh-mhdr-top {
    background:
        radial-gradient(ellipse 70% 160% at 0 0, rgba(255, 170, 120, .3), transparent 70%),
        linear-gradient(180deg, #9E2F22, #6E1A11);
    border-bottom: 1px solid rgba(243, 213, 138, .7);
}
.mh-body .mh-mhdr-nav { background: linear-gradient(180deg, #6E1A11, #551209); border-bottom: 2px solid #E2B455; }
.mh-body .mh-mhdr-nav a { color: #FBDDB0; }
.mh-mhdr-brand img { box-shadow: 0 0 0 1.5px #F3D58A, 0 0 0 3px #6E1A11, 0 3px 8px rgba(0, 0, 0, .35); }
.mh-body .mh-burger { background: rgba(255, 230, 170, .12); }

/* header tươi sáng hơn: đỏ son tươi pha cam ánh hồng đào */
.mh-body .mh-hdr {
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 88' preserveAspectRatio='none'%3E%3Cpath d='M0 88V62l90-22 70 18 110-38 90 30 80-14 120 34 100-40 130 36 90-20 110 26 140-46 120 40 90-16 120 28 140-30V88z' fill='%23FFF1D0' fill-opacity='.12'/%3E%3Cpath d='M0 88V74l140-16 120 14 160-22 140 20 130-12 170 18 150-24 160 22 140-14 130 16 160-10V88z' fill='%238E1F14' fill-opacity='.22'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat,
        radial-gradient(ellipse 55% 150% at 50% 0%, rgba(255, 200, 150, .45), transparent 70%),
        linear-gradient(180deg, #E0573F 0%, #C63A28 55%, #A72B1C 100%);
    box-shadow: 0 4px 18px rgba(167, 43, 28, .25);
}
.mh-body .mh-hdr .mh-nav a { color: #FFF6E2; text-shadow: 0 1px 2px rgba(110, 20, 10, .55); }
.mh-body .mh-hdr .mh-btn-chu {
    background: linear-gradient(180deg, #A72B1C 0%, #861D12 60%, #6A140B 100%);
    box-shadow: inset 0 0 0 1.5px #F3D58A, inset 0 1px 0 rgba(255, 255, 255, .25), 0 3px 8px rgba(90, 15, 8, .35);
}
.mh-body .mh-hdr .mh-btn-chu:hover { background: linear-gradient(180deg, #B83322 0%, #921F14 60%, #6A140B 100%); }

.mh-body .mh-mhdr-top {
    background:
        radial-gradient(ellipse 70% 160% at 0 0, rgba(255, 205, 160, .45), transparent 70%),
        linear-gradient(180deg, #E0573F, #B8301F);
}
.mh-body .mh-mhdr-nav { background: linear-gradient(180deg, #B8301F, #9C2517); }
.mh-body .mh-mhdr-nav a { color: #FFEBD0; }
.mh-mhdr-brand img { box-shadow: 0 0 0 1.5px #F3D58A, 0 0 0 3px #B8301F, 0 3px 8px rgba(0, 0, 0, .3); }
.mh-mhdr-brand b { filter: drop-shadow(0 1px 1px rgba(110, 20, 10, .6)); }
.mh-mhdr-brand small { color: #FFE2B0; }
/* logo header máy tính: bỏ vòng đen (--ks-ink) giữa 2 lớp viền vàng, chỉ giữ viền vàng + bóng */
.mh-body .mh-hdr .mh-logo-app {
    box-shadow:
        0 0 0 2px #F3D58A,
        0 0 22px 2px rgba(255, 200, 120, .45),
        0 10px 24px rgba(90, 20, 10, .35);
}
/* header điện thoại: logo chữ "Kiếm Sơn" (ảnh nền trong suốt) thay icon + chữ */
.mh-body .mh-mhdr-brand img.mh-mhdr-wordmark {
    width: auto;
    height: 50px;
    margin: -2px 0 -4px -4px;
    border-radius: 0;
    box-shadow: none;
    filter: drop-shadow(0 2px 3px rgba(90, 15, 8, .45));
}
@media (max-width: 360px) { .mh-body .mh-mhdr-brand img.mh-mhdr-wordmark { height: 44px; } }
/* header điện thoại: icon app + logo chữ bên cạnh */
.mh-body .mh-mhdr-brand { gap: 4px; }
.mh-body .mh-mhdr-brand img.mh-mhdr-appicon {
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 10px;
    box-shadow: 0 0 0 1.5px #F3D58A, 0 3px 8px rgba(90, 15, 8, .35);
}
.mh-body .mh-mhdr-brand img.mh-mhdr-wordmark { height: 46px; margin: -2px 0 -4px 0; }
@media (max-width: 360px) {
    .mh-body .mh-mhdr-brand img.mh-mhdr-appicon { width: 36px; height: 36px; }
    .mh-body .mh-mhdr-brand img.mh-mhdr-wordmark { height: 40px; }
}

/* Khối Tin tức (máy tính): nút "Xem tất cả" nằm sát đáy khung 16:9, lấp khoảng trống dưới 6 bài.
   Nút đổi link theo tab đang chọn (home.js). Cỡ theo cqi để co giãn cùng khung. */
@media (min-width: 1101px) {
    .mh-news-list { display: flex; flex-direction: column; }
    .mh-news-list .mh-news-panel { min-height: 0; }
    .mh-body .mh-news-all {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: .9cqi;
        align-self: stretch;
        margin: auto 0 1cqi;
        padding: 1cqi 0;
        border: 1px solid var(--chu);
        border-radius: 4px;
        background: rgba(178, 34, 34, .04);
        font-size: 2.3cqi;
        font-weight: 700;
        line-height: 1.2;
        color: var(--chu);
        transition: color .2s ease, background-color .2s ease;
    }
    .mh-body .mh-news-all::after {
        content: "";
        width: 1cqi;
        height: 1cqi;
        border: solid currentColor;
        border-width: 2px 2px 0 0;
        transform: rotate(45deg);
    }
    .mh-body .mh-news-all:hover { color: #fff; background: var(--chu); }
}

/* Tablet / điện thoại: nút "Xem tất cả" cũng trải full chiều ngang khung tin */
@media (max-width: 1100px) {
    .mh-body .mh-news-all { width: auto; margin: 14px 0 6px; padding: 11px 0; border-radius: 4px; background: rgba(178, 34, 34, .04); }
}
/* Máy tính: khung tin cố định 16:9 -> 6 dòng tin chia đều phần cao còn lại, nút "Xem tất cả" luôn vừa khung
   (trước đây dòng có padding cố định nên ở màn ~1440px nút bị cắt đáy). */
@media (min-width: 1101px) {
    .mh-news-list .mh-news-panel { flex: 1 1 0; display: flex; flex-direction: column; overflow: hidden; }
    .mh-news-list .mh-news-panel[hidden] { display: none; }
    .mh-news-list .mh-list { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
    .mh-news-list .mh-list li { flex: 1 1 0; min-height: 0; display: flex; }
    .mh-news-list .mh-list li a { flex: 1; padding-top: 0; padding-bottom: 0; }
    .mh-body .mh-news-all { margin: .8cqi 0 .6cqi; flex: 0 0 auto; }
}

/* Khối tải game: ô "File APK" đổi thành "Tài khoản" (Kiếm Sơn không phát hành APK) - cùng vị trí, khung ảnh vẽ biểu tượng người dùng */
.mh-tg-btn.is-acc { grid-area: apk; --img: url("/assets/game/ui/tg/acc.webp"); }

/* =========================================================
   CHUYỂN TRANG + CUỘN MƯỢT (bản nâng cấp)
   - Trang cũ mờ nhanh, trang mới trượt lên nhẹ: cảm giác nhanh, không "chớp trắng".
   - Ảnh thẻ bài viết bấm vào (ks-motion.js đặt tên ks-cover) bay thành ảnh bìa trang chi tiết.
   - Lenis (cuộn mượt máy tính): bỏ scroll-behavior smooth của CSS để không giật khi Lenis cuộn từng khung hình.
   ========================================================= */
::view-transition-old(root) { animation: ks-vt-out .14s cubic-bezier(.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: ks-vt-in2 .32s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes ks-vt-in2 { from { opacity: 0; transform: translateY(14px); } }
.article-cover { view-transition-name: ks-cover; }
::view-transition-group(ks-cover) { animation-duration: .38s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
::view-transition-old(ks-cover), ::view-transition-new(ks-cover) { height: 100%; object-fit: cover; overflow: clip; }
@media (prefers-reduced-motion: reduce) {
    ::view-transition-group(ks-cover) { animation: none; }
}

html.lenis, html.lenis body { height: auto; }
html.lenis, html.lenis.lenis-smooth { scroll-behavior: auto !important; }
html.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
html.lenis.lenis-stopped { overflow: clip; }
