/* ═══════════════════════════════════════════════════════════════════════════
   css/sanh-tro-choi.css — SẢNH TRÒ CHƠI (Chặng 1 · 04/10/2026), chuyển từ bản mẫu ĐÃ DUYỆT tools/sanh_mau/sanh.css
   ─ Theo giao diện sáng/tối của web (html[data-theme]); bìa + sân vinh danh tối/sáng theo biến.
   ─ Avatar + khung: dùng HÀM CHUẨN getTuTienAvatarHtml của trang cha (không tự tính khung như bản mẫu) — .ak chỉ GIỮ CHỖ
     đúng bằng NGOÀI khung (cỡ avatar = --ngoai × avatarScale, JS tính từ XIANXIA_ITEMS) để khung không đè tên/điểm.
   ─ Co giãn theo BỀ NGANG KHUNG (container query), KHÔNG theo bề ngang màn: trên web sảnh nằm trong iframe cạnh thanh bên
     220px ⇒ màn 834px chỉ còn khung 614px (R42 ⑥). Mốc: < 560 (điện thoại) · 560–900 (khung hẹp/máy tính bảng) · ≥ 900.
   ─ Mọi màu là biến ở :root. Mọi khối có width + padding đều border-box (dự án không có border-box toàn cục).
   ═══════════════════════════════════════════════════════════════════════════ */
@font-face { font-family: 'Baloo 2'; font-weight: 400 800; font-display: swap; src: url(../fonts/baloo2-vi.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Baloo 2'; font-weight: 400 800; font-display: swap; src: url(../fonts/baloo2-latinext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Baloo 2'; font-weight: 400 800; font-display: swap; src: url(../fonts/baloo2-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --nen: #0a0820;
  --nen-2: #15123a;
  --the: rgba(25, 22, 64, 0.72);
  --the-dam: rgba(16, 14, 44, 0.9);
  --vien: rgba(160, 175, 255, 0.16);
  --vien-sang: rgba(160, 175, 255, 0.34);
  --chu: #eef0ff;
  --chu-mo: #a3abd0;
  --chu-mo2: #7c84ad;
  --vang: #ffd54f;
  --vang-dam: #f0a91a;
  --hong: #ff5c8a;
  --lam: #7ee8ff;
  --luc: #6ee7a8;
  --tim: #b58cff;
  --bac: #d9e2ef;
  --dong: #e0955a;
  --toi-phu: rgba(6, 5, 20, 0.82);
  --bong: 0 18px 40px -18px rgba(0, 0, 0, 0.75);
  --font: 'Baloo 2', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bo: 18px;
  --nhan-moi-chu: #05261a;
  --dai-phu: linear-gradient(180deg, rgba(10, 8, 32, .55), rgba(10, 8, 32, .82));
  --vang-chu: #ffd54f;                               /* SỐ/chữ vàng (kỷ lục, "Cần máy tính") — giao diện sáng cần bản đậm */
  --nut-loc-dang: linear-gradient(180deg, #ffffff, #cfd8ff);
  --nut-loc-dang-chu: #1a1030;
  --hero-phu: linear-gradient(90deg, rgba(8, 6, 26, .94) 0%, rgba(8, 6, 26, .82) 42%, rgba(8, 6, 26, .25) 100%), linear-gradient(0deg, rgba(8, 6, 26, .85), transparent 55%);
  --hero-phu-dt: linear-gradient(0deg, rgba(8, 6, 26, 1), transparent 70%);
  --hero-tieu: linear-gradient(180deg, #ffffff, #c9f7df);
  --hero-mo: #d5daf5;
  --sao-mo: .5;
  --nen-trang: radial-gradient(1200px 600px at 85% -10%, rgba(181, 140, 255, 0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(126, 232, 255, 0.10), transparent 60%),
    radial-gradient(700px 500px at 60% 110%, rgba(255, 92, 138, 0.10), transparent 60%);
}
/* ── GIAO DIỆN SÁNG (Founder 03/10: "muốn sảnh đổi theo giao diện sáng") — theo đúng cờ của web: html[data-theme="light"]
   (đặt từ localStorage ytt_pref_theme lúc mở + lệnh postMessage 'ytt-theme' của dashboard khi người dùng bấm đổi).
   Nền pastel tím nhạt, thẻ trắng, chữ xanh tím đậm; vàng/lục/lam đổi sang bản ĐẬM để đủ tương phản trên nền trắng. ── */
html[data-theme="light"] {
  --nen: #f3f1ff;
  --nen-2: #e6e2ff;
  --the: rgba(255, 255, 255, 0.92);
  --the-dam: #ffffff;
  --vien: rgba(72, 58, 170, 0.14);
  --vien-sang: rgba(72, 58, 170, 0.28);
  --chu: #1c1840;
  --chu-mo: #4a4677;
  --chu-mo2: #625e8e;
  --lam: #0b7aa3;
  --luc: #0d7f52;
  --tim: #7c4ddb;
  --toi-phu: rgba(255, 255, 255, 0.9);
  --bong: 0 18px 40px -24px rgba(60, 40, 140, 0.45);
  --vang-chu: #9a6200;
  --nhan-moi-chu: #ffffff;
  --dai-phu: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .8));
  --bac: #94a3b8;                                    /* sao hạng 2: bạc nhạt cũ gần như biến mất trên nền trắng */
  --nut-loc-dang: linear-gradient(180deg, #2b2468, #1c1840);
  --nut-loc-dang-chu: #ffffff;
  --hero-phu: linear-gradient(90deg, rgba(255, 255, 255, .95) 0%, rgba(255, 255, 255, .86) 42%, rgba(255, 255, 255, .15) 100%), linear-gradient(0deg, rgba(255, 255, 255, .8), transparent 55%);
  --hero-phu-dt: linear-gradient(0deg, rgba(255, 255, 255, 1), transparent 70%);
  --hero-tieu: linear-gradient(180deg, #2a1f6e, #7b3fe4);
  --hero-mo: #3b3768;
  --sao-mo: .0;
  --nen-trang: radial-gradient(1200px 600px at 85% -10%, rgba(181, 140, 255, 0.35), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(126, 232, 255, 0.30), transparent 60%),
    radial-gradient(700px 500px at 60% 110%, rgba(255, 150, 190, 0.28), transparent 60%);
  background: #f3f1ff;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--nen); color: var(--chu); font-family: var(--font); }
/* [04/10] Founder: BỎ thanh cuộn (thanh trắng "xấu quá") — vẫn cuộn bằng con lăn chuột / vuốt tay như thường. Áp mọi phần tử của trang
   (dải lọc ngang, danh sách) — Firefox: scrollbar-width · Chrome/Safari/Edge: ::-webkit-scrollbar. */
html, body, * { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar, *::-webkit-scrollbar { display: none; width: 0; height: 0; }
body {
  overflow-x: clip;     /* không bao giờ cuộn ngang (clip không biến body thành khung cuộn — R48 ②) */
  background: var(--nen-trang), var(--nen);
  background-attachment: fixed;
}
/* bụi sao li ti phủ cả trang */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; opacity: var(--sao-mo);
  background-image: radial-gradient(1px 1px at 20px 30px, #fff, transparent), radial-gradient(1px 1px at 120px 80px, #cfd8ff, transparent),
                    radial-gradient(1.5px 1.5px at 200px 160px, #fff, transparent), radial-gradient(1px 1px at 60px 210px, #b9c4ff, transparent);
  background-size: 240px 240px;
}
svg { width: 1em; height: 1em; flex: none; }
button { font-family: inherit; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.sanh {
  container-type: inline-size; container-name: sanh;
  position: relative; max-width: 1240px; margin: 0 auto;
  padding: clamp(14px, 3.2cqw, 32px) clamp(12px, 3cqw, 32px) 40px;
  display: flex; flex-direction: column; gap: clamp(16px, 2.6cqw, 28px);
}

/* ── Đầu trang ───────────────────────────────────────────── */
.dau { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dau-ten { display: flex; align-items: center; gap: 12px; min-width: 0; }
.huy {
  flex: none; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  font: 700 28px/1 'KaiTi', 'STKaiti', serif; color: #2a1606;
  background: linear-gradient(145deg, #ffe58a, var(--vang-dam)); box-shadow: 0 6px 20px -6px rgba(255, 196, 61, .7), inset 0 2px 0 rgba(255,255,255,.6);
}
.dau h1 { margin: 0; font-size: clamp(22px, 3.4cqw, 32px); line-height: 1.1; letter-spacing: .2px; }
.dau p { margin: 2px 0 0; color: var(--chu-mo); font-size: 14px; line-height: 1.35; }
.dau-vi { display: flex; align-items: center; gap: 10px; }
/* Linh Thạch: CÙNG giao diện với Hồ Sơ + Nạp Tiền — khung rồng khung1.webp (479:112) + viên linh thạch xanh linhthach1.webp.
   Khung là ảnh nền tối cố định ở cả hai giao diện ⇒ màu số vàng giữ nguyên, không đổi theo sáng/tối. */
.chip-lt {
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
  height: 52px; aspect-ratio: 479 / 112; padding: 0 17%;
  background: url('../images/anh_du_an_ytt/khung_chua_linhthach/khung1.webp') center / contain no-repeat;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .4)); white-space: nowrap;
}
.chip-lt b {
  position: relative;
  color: #ffd54f; font-size: 19px; font-weight: 800; letter-spacing: .4px; font-variant-numeric: tabular-nums; line-height: 1;
  text-shadow: 0 0 10px rgba(255, 213, 79, .5), 0 2px 4px rgba(0, 0, 0, .8);
}
/* CĂN GIỮA RIÊNG SỐ: viên linh thạch là ::before treo NGOÀI hộp số (absolute) ⇒ không tính vào phần được căn giữa.
   Số lớn đã viết tắt (js/so-gon.js: tối đa 6 ký tự "99.999" · "123K" · "1,23M") ⇒ số + viên luôn nằm gọn giữa hai đầu rồng. */
.chip-lt b::before {
  content: ''; position: absolute; right: calc(100% + 6px); top: 50%; width: 25px; height: 25px; transform: translateY(-50%);
  background: url('../images/anh_du_an_ytt/linhthach1.webp') center / contain no-repeat;
  filter: drop-shadow(0 0 5px rgba(110, 231, 168, .55));
}
.ava-nho { position: relative; flex: none; width: 34px; height: 34px; margin: 4px; border-radius: 50%; background: var(--nen-2); }
.ava-nho.co-khung { width: auto; height: auto; margin: 0; background: none; --ngoai: 46px; }   /* có khung: ô = NGOÀI khung 46px */

/* ── Hero: game nổi bật ──────────────────────────────────── */
.hero {
  position: relative; display: grid; grid-template-columns: 1fr; gap: 16px; overflow: hidden; isolation: isolate;
  border-radius: calc(var(--bo) + 6px); border: 1px solid var(--vien-sang); box-shadow: var(--bong);
  padding: clamp(18px, 3.6cqw, 36px); min-height: clamp(300px, 42cqw, 420px);
}
.hero-anh { position: absolute; inset: 0; z-index: -2; background: var(--anh) center / cover no-repeat; transform: scale(1.03); }
.hero::before {          /* phủ tối từ trái sang để chữ luôn đọc rõ trên ảnh bất kỳ */
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: var(--hero-phu);
}
.hero-noi { display: flex; flex-direction: column; gap: 12px; max-width: 560px; align-self: center; }
.hero h2 { margin: 0; font-size: clamp(30px, 5.4cqw, 52px); line-height: 1.02; text-shadow: 0 4px 24px rgba(0,0,0,.6);
  background: var(--hero-tieu); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-mo { margin: 0; color: var(--hero-mo); font-size: clamp(15px, 1.7cqw, 17px); line-height: 1.5; }
.hero-mo b { color: var(--luc); }
.nhan-hang { display: flex; gap: 8px; flex-wrap: wrap; }
.nhan { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; white-space: nowrap; }
.nhan.moi { background: var(--luc); color: var(--nhan-moi-chu); }   /* sáng: nền lục ĐẬM ⇒ chữ trắng (chữ tối chỉ đạt 3,21) */
.nhan.hot { background: linear-gradient(90deg, #c2410c, #be185d); color: #fff; }   /* tông đậm: chữ trắng ≥ 4,5 (cam tươi cũ chỉ 2,59) */
.meta { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--chu-mo); font-size: 14px; }
.meta li { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.meta svg { color: var(--lam); font-size: 16px; }
.meta .can-mt { color: var(--vang-chu); }
.meta .can-mt svg { color: var(--vang-chu); }
.hero-nut { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.nut {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px;
  border-radius: 14px; border: 0; font-weight: 800; font-size: 16px; white-space: nowrap; transition: transform .15s, box-shadow .15s, background .15s;
}
.nut svg { font-size: 18px; }
.nut.chinh { color: #2a1606; background: linear-gradient(180deg, #ffe58a, var(--vang-dam)); box-shadow: 0 8px 22px -8px rgba(255, 190, 50, .8), inset 0 2px 0 rgba(255,255,255,.55); }
.nut.chinh:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -8px rgba(255, 190, 50, .95), inset 0 2px 0 rgba(255,255,255,.55); }
.nut.phu { color: var(--chu); background: rgba(255,255,255,.08); border: 1px solid var(--vien-sang); backdrop-filter: blur(6px); }
.nut.phu:hover { background: rgba(255,255,255,.14); }
.nut:focus-visible, .loc button:focus-visible, .tab button:focus-visible { outline: 3px solid var(--lam); outline-offset: 2px; }

.hero-top {
  align-self: end; border-radius: var(--bo); padding: 14px 16px; background: var(--toi-phu); border: 1px solid var(--vien);
  backdrop-filter: blur(10px);
}
.hero-top h3 { margin: 0 0 8px; display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--vang-chu); }
.hero-top ol, .bxh-the ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ky-luc-toi { margin: 10px 0 0; font-size: 13px; color: var(--chu-mo); }
.ky-luc-toi b { color: var(--chu); }

/* dòng bảng xếp hạng (dùng chung hero + bảng) */
.hero-top li, .bxh-the li { display: grid; grid-template-columns: 30px 30px minmax(0, 1fr) auto; align-items: center; gap: 8px; font-size: 14.5px; }
.hang { position: relative; display: grid; place-items: center; width: 30px; height: 30px; color: var(--chu-mo2); }
.hang svg { position: absolute; inset: 0; width: 30px; height: 30px; }
.hang b { position: relative; font-size: 13px; }
.h1 .hang { color: var(--vang); } .h2 .hang { color: var(--bac); } .h3 .hang { color: var(--dong); }
.h1 .hang b, .h2 .hang b, .h3 .hang b { color: #1a1030; }
.av { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--nen-2); }
.ten { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d { font-weight: 800; color: var(--chu); font-variant-numeric: tabular-nums; }

/* ── Bộ lọc ─────────────────────────────────────────────── */
.loc { display: flex; flex-wrap: wrap; gap: 8px; }
.loc button {
  min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--vien); background: var(--the);
  font-size: 14.5px; font-weight: 700; color: var(--chu-mo); white-space: nowrap; transition: background .15s, color .15s, border-color .15s;
}
.loc button:hover { color: var(--chu); border-color: var(--vien-sang); }
.loc button.dang { color: var(--nut-loc-dang-chu); background: var(--nut-loc-dang); border-color: transparent; }

/* ── Lưới thẻ game ──────────────────────────────────────── */
/* auto-FILL (giữ cỡ cột): auto-fit từng kéo 1 thẻ còn lại khi lọc RỘNG HẾT MÀN ⇒ bìa phình khổng lồ (ảnh Founder 03/10) */
.luoi { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: clamp(14px, 2cqw, 22px); }
.the {
  position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  border-radius: var(--bo); background: var(--the); border: 1px solid var(--vien); box-shadow: var(--bong);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.the:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--mau) 60%, transparent); box-shadow: 0 22px 44px -20px color-mix(in srgb, var(--mau) 55%, black); }
.bia { position: relative; aspect-ratio: 2 / 1; background: var(--anh) center / cover no-repeat, var(--nen-2); overflow: hidden; }
.bia::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, var(--the-dam), transparent 55%); }
/* CLIP GAMEPLAY khi rê chuột (ý wow 4): video nằm DƯỚI lớp phủ ::after của bìa, mờ dần vào/ra. Nút ▶ nhỏ gợi ý "rê để xem" —
   chỉ hiện ở máy có chuột (điện thoại không phát clip nên không hứa hẹn gì) */
.bia-clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s; }
.the.dang-clip .bia-clip { opacity: 1; }
.bia-goi-y { display: none; position: absolute; right: 10px; bottom: 10px; z-index: 1; width: 32px; height: 32px; border-radius: 50%; place-items: center;
  font-size: 15px; color: #fff; background: rgba(8, 6, 26, .55); border: 1px solid rgba(255, 255, 255, .35); backdrop-filter: blur(4px); transition: opacity .25s; }
@media (hover: hover) and (pointer: fine) { .bia-goi-y { display: grid; } }
.the.dang-clip .bia-goi-y { opacity: 0; }
.nhan-goc { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; }
.the .than { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 16px; flex: 1; }
.the h3 { margin: 0; font-size: 20px; line-height: 1.15; }
.the p { margin: 0; color: var(--chu-mo); font-size: 14.5px; line-height: 1.45; }
.the .meta { font-size: 13px; gap: 5px 12px; }
.duoi { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding-top: 6px; border-top: 1px solid var(--vien); }
.kl { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.kl span { font-size: 12px; color: var(--chu-mo2); }
.kl b { font-size: 20px; color: var(--vang-chu); font-variant-numeric: tabular-nums; }
.kl small { font-size: 12px; color: var(--chu-mo2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.the .nut { min-height: 42px; padding: 0 18px; }

/* ── Dải "Sắp ra mắt": ô gọn một dòng (biểu tượng khoá + tên + mô tả) ── */
.sap-ra { display: flex; flex-direction: column; gap: 10px; }
.tieu-nho { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 16px; color: var(--chu-mo); }
.sap-luoi { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 10px; }
.sap-o {
  display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px 14px; border-radius: 14px; border: 1px dashed var(--vien-sang);
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0 10px, transparent 10px 20px), var(--the);
}
.sap-khoa { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; color: var(--chu-mo2); background: rgba(255,255,255,.05); }
.sap-o > div { min-width: 0; }
.sap-o h3 { margin: 0; font-size: 15.5px; color: var(--chu-mo); }
.sap-o p { margin: 2px 0 0; font-size: 13px; color: var(--chu-mo2); line-height: 1.35; }

/* ── ĐÀI VINH DANH ─────────────────────────────────────── */
.duoi-nut { display: flex; gap: 8px; flex: none; }
.nut-cup { width: 42px; min-height: 42px; padding: 0; color: var(--vang-chu); background: var(--the); border: 1px solid var(--vien-sang); }
.nut-cup:hover { border-color: var(--vang-chu); }
.nut-nho { min-height: 40px; padding: 0 16px; font-size: 14.5px; }
.dai { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 16px; }
.dai-dau { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; }
.dai h2 { margin: 0; display: flex; align-items: center; gap: 10px; font-size: clamp(22px, 3cqw, 30px); }
.dai h2 svg { color: var(--vang-chu); }
.dai-phai { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dem-nguoc { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--chu-mo); white-space: nowrap; }
.dem-nguoc b { color: var(--chu); font-variant-numeric: tabular-nums; }
.tab { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--the); border: 1px solid var(--vien); }
.tab button { min-height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; font-weight: 700; font-size: 14px; color: var(--chu-mo); white-space: nowrap; }
.tab button.dang { background: var(--vang); color: #2a1606; }

/* đồng xu chọn game: bìa tròn + tên; đang chọn ⇒ viền + quầng màu riêng của game. Thêm game là thêm xu (tự xuống dòng) */
.dai-game { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.xu { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 96px; padding: 0; border: 0; background: none; color: var(--chu-mo); }
.xu-anh { width: 62px; height: 62px; border-radius: 50%; background: var(--anh) center / cover no-repeat, var(--nen-2);
  box-shadow: 0 0 0 2px var(--vien-sang); transition: transform .2s, box-shadow .2s, filter .2s; filter: saturate(.75) brightness(.9); }
.xu-ten { font-size: 12.5px; font-weight: 700; line-height: 1.2; text-align: center; }
.xu:hover .xu-anh { transform: translateY(-2px); filter: none; }
.xu.dang { color: var(--chu); }
.xu.dang .xu-anh { filter: none; transform: scale(1.06); box-shadow: 0 0 0 3px var(--mau), 0 0 22px 2px color-mix(in srgb, var(--mau) 65%, transparent); }
.xu:focus-visible { outline: 3px solid var(--lam); outline-offset: 4px; border-radius: 14px; }

/* sân vinh danh: nền = bìa của game đang xem làm MỜ + phủ màu game ⇒ mỗi game một không khí riêng */
.dai-san { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: 1fr; gap: 18px;
  padding: clamp(16px, 3cqw, 28px); border-radius: calc(var(--bo) + 6px); border: 1px solid var(--vien-sang); box-shadow: var(--bong); background: var(--the-dam); }
.dai-san::before { content: ''; position: absolute; inset: -40px; z-index: -2; background: var(--anh) center / cover no-repeat; filter: blur(22px) saturate(1.2); opacity: .55; }
.dai-san::after { content: ''; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(70% 90% at 30% 100%, color-mix(in srgb, var(--mau) 28%, transparent), transparent 70%), var(--dai-phu); }

/* bục 3 bậc: thứ tự hiển thị 2 · 1 · 3, bậc cao thấp theo hạng */
.buc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: clamp(6px, 1.4cqw, 14px); padding-top: 26px; }
.bac { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; --huy: var(--dong); }
.bac.h1 { --huy: var(--vang); }
.bac.h2 { --huy: var(--bac); }
.bac-ava { position: relative; z-index: 1; margin-bottom: 2px; --ngoai: 92px; }
.bac.h1 .bac-ava { --ngoai: 118px; }

/* AVATAR + KHUNG: khung vẽ bằng HÀM CHUẨN getTuTienAvatarHtml (trang cha) — ảnh khung rộng 1/s lần avatar (s = avatarScale).
   .ak = ô avatar cỡ --ngoai × s, margin giữ đúng chỗ NGOÀI khung ⇒ khung không đè tên/điểm. Hàm chuẩn ghi cỡ px vào style
   của khối ngoài cùng ⇒ ép 100% bằng !important (thắng style nội tuyến không-important); mọi thứ bên trong nó tính theo %. */
.ak { position: relative; display: block; flex: none; width: calc(var(--ngoai) * var(--s)); height: calc(var(--ngoai) * var(--s));
  margin: calc(var(--ngoai) * (1 - var(--s)) / 2); }
.ak-tron { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; background: var(--nen-2); }
.ak-tron img, .av img, .ava-nho img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.ak > div { width: 100% !important; height: 100% !important; }
.bac .ak:not(.co-khung) .ak-tron { box-shadow: 0 0 0 3px var(--huy), 0 0 0 6px color-mix(in srgb, var(--huy) 30%, transparent); }   /* không khung ⇒ vòng màu hạng */
/* tia sáng sau hạng 1: quạt nan xoay chậm, mờ dần ra mép */
.tia { position: absolute; z-index: -1; left: 50%; top: 50%; width: 190%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; pointer-events: none;
  background: repeating-conic-gradient(color-mix(in srgb, var(--vang) 42%, transparent) 0 7deg, transparent 7deg 22deg);
  -webkit-mask: radial-gradient(closest-side, #000 30%, transparent); mask: radial-gradient(closest-side, #000 30%, transparent);
  animation: quay 14s linear infinite; }
@keyframes quay { to { rotate: 1turn; } }
.vuong { position: absolute; left: 50%; top: -30px; translate: -50% 0; color: var(--vang); font-size: 30px; filter: drop-shadow(0 3px 8px rgba(255, 196, 61, .7)); animation: lac 3s ease-in-out infinite; }
@keyframes lac { 50% { rotate: -8deg; } }
.bac-ten { max-width: 100%; padding: 2px 10px; border-radius: 999px; background: var(--toi-phu); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bac-diem { font-weight: 800; font-size: 15px; color: var(--chu); font-variant-numeric: tabular-nums; padding: 0 8px; border-radius: 8px; background: var(--toi-phu); }
.bac-de { width: 100%; height: 72px; margin-top: 6px; display: grid; place-items: center; border-radius: 14px 14px 6px 6px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--huy) 85%, white), color-mix(in srgb, var(--huy) 70%, black));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .55), inset 0 -6px 0 rgba(0, 0, 0, .18), 0 12px 24px -12px rgba(0, 0, 0, .6); }
.bac.h1 .bac-de { height: 104px; }
.bac.h3 .bac-de { height: 56px; }
.bac-de span { font-size: clamp(26px, 5cqw, 40px); font-weight: 800; color: #1a1030; text-shadow: 0 1px 0 rgba(255, 255, 255, .5); }

/* BỤC MỌC LÊN (ý wow 2). .cho = trạng thái chờ (JS chỉ gắn khi chắc sẽ diễn) · .dien = diễn · .nhe = đổi game/tab: nhanh gấp đôi.
   Thứ tự: bậc 3 → 2 → 1 (--tre), avatar/tên/điểm hiện SAU bậc của mình .45s; tia sáng hạng 1 hiện cuối. Trễ khớp với dien() trong sanh.js. */
.bac.h3 { --tre: 0s; } .bac.h2 { --tre: .35s; } .bac.h1 { --tre: .7s; }
.dai-san { --k: 1; } .dai-san.nhe { --k: .5; }
.bac-de { transform-origin: 50% 100%; }
.dai-san.cho .bac-de { transform: scaleY(0); }
.dai-san.cho :is(.bac-ava, .bac-ten, .bac .hh-ds, .bac-diem), .dai-san.cho .dai-ds li { opacity: 0; }
.dai-san.cho .ds-thanh i { width: 0; }
.dai-san.dien .bac-de { animation: moc calc(.7s * var(--k)) cubic-bezier(.2, .9, .3, 1.2) calc(var(--tre) * var(--k)) both; }
.dai-san.dien :is(.bac-ava, .bac-ten, .bac .hh-ds, .bac-diem) { animation: hien calc(.5s * var(--k)) ease-out calc((var(--tre) + .45s) * var(--k)) both; }
.dai-san.dien .tia { animation: hien-tia calc(.9s * var(--k)) ease-out calc(1.25s * var(--k)) both, quay 14s linear infinite; }
.dai-san.dien .dai-ds li { animation: hien calc(.45s * var(--k)) ease-out calc((.8s + var(--k-hang, 0s)) * var(--k)) both; }
.dai-san.dien .ds-thanh i { animation: thanh calc(.7s * var(--k)) ease-out calc((.9s + var(--k-hang, 0s)) * var(--k)) both; }
.dai-ds li { --k-hang: calc(var(--i, 0) * 60ms); }
@keyframes moc { from { transform: scaleY(0); } }
@keyframes hien { from { opacity: 0; translate: 0 14px; } }
@keyframes hien-tia { from { opacity: 0; scale: .4; } }
@keyframes thanh { from { width: 0; } }

/* hạng 4–10: thanh so điểm với hạng 1 */
.dai-ds { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; align-self: center; min-width: 0; }
.dai-ds li { display: grid; grid-template-columns: 26px 44px minmax(0, 1fr) clamp(40px, 16cqw, 150px) auto; align-items: center; gap: 10px;
  padding: 7px 12px; border-radius: 12px; background: var(--toi-phu); font-size: 14.5px; }
.ds-hang { text-align: center; font-weight: 800; color: var(--chu-mo); }
/* [04/10] Ô avatar hạng 4–10: NGOÀI khung 44px, tràn nhẹ lên/xuống mép dòng (dòng không cao thêm vì khung) — cùng cách .dai-toi .ak */
.ds-ava { display: grid; place-items: center; --ngoai: 44px; margin-block: -6px; }
.ds-ai { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ds-ten { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-thanh, .toi-thanh { height: 6px; border-radius: 99px; background: var(--vien); overflow: hidden; }
.ds-thanh i, .toi-thanh i { display: block; width: var(--w); height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--mau, var(--vang)), var(--vang)); }

/* HUY HIỆU MÙA (ý wow 5): huân chương + số tuần đã đạt. Nền kim loại SÁNG cố định ở cả hai giao diện ⇒ số tối luôn đủ tương phản */
.hh-ds { display: inline-flex; gap: 3px; flex: none; }
.hh { display: inline-flex; align-items: center; gap: 1px; height: 20px; padding: 0 6px 0 3px; border-radius: 999px; font-size: 12px; font-weight: 800; line-height: 1;
  color: #1a1030; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 2px 6px -2px rgba(0, 0, 0, .5); cursor: help; }
.hh svg { font-size: 15px; color: #1a1030; opacity: .8; }
.hh-vang { background: linear-gradient(180deg, #ffe58a, #f5b82e); }
.hh-bac { background: linear-gradient(180deg, #f4f7fb, #b9c4d4); }
.hh-dong { background: linear-gradient(180deg, #f6c08e, #d9894c); }
.bac .hh-ds { margin-top: -1px; }
.dai-ghi { margin: -4px 0 0; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; font-size: 13px; color: var(--chu-mo); line-height: 1.4; }
.ds-diem { font-weight: 800; font-variant-numeric: tabular-nums; }

/* thanh "Của bạn": bám đáy màn khi cuộn qua Đài (sticky) */
.dai-toi { position: sticky; bottom: 10px; z-index: 2; display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 10px 12px 10px 16px; border-radius: 16px; background: var(--toi-phu); border: 1px solid var(--vien-sang); box-shadow: var(--bong); backdrop-filter: blur(12px); }
.toi-hang { font-size: 22px; font-weight: 800; color: var(--vang-chu); font-variant-numeric: tabular-nums; }
.dai-toi .ak { --ngoai: 58px; margin-block: -6px; }   /* khung tràn nhẹ lên/xuống mép thanh — thanh không cao thêm vì khung */
.toi-noi { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: 13.5px; color: var(--chu-mo); }
.toi-dong { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.toi-dong > b { color: var(--chu); font-size: 15px; }
/* LÊN HẠNG (ý wow 3): viền thanh "Của bạn" bừng sáng + nhãn nổi phía trên thanh (absolute ⇒ không đẩy bố cục) */
.dai-toi.len { border-color: var(--vang); animation: bung 1.2s ease-out 2; }
@keyframes bung { 0% { box-shadow: var(--bong), 0 0 0 0 color-mix(in srgb, var(--vang) 70%, transparent); } 100% { box-shadow: var(--bong), 0 0 0 18px transparent; } }
.toi-len { position: absolute; left: 50%; bottom: calc(100% + 8px); translate: -50% 0; display: flex; align-items: center; gap: 6px; max-width: calc(100% - 16px);
  padding: 7px 14px; border-radius: 999px; background: linear-gradient(180deg, #ffe58a, #f5b82e); color: #2a1606; font-size: 14px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 10px 26px -8px rgba(255, 180, 40, .8); animation: nhay-len .5s cubic-bezier(.2, .9, .3, 1.4) both; }
.toi-len span { overflow: hidden; text-overflow: ellipsis; }
.toi-len svg { color: #0d7f52; font-size: 18px; }
@keyframes nhay-len { from { opacity: 0; translate: -50% 12px; scale: .8; } }
.phao { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 50; pointer-events: none; }
.toi-noi em { font-style: normal; font-weight: 800; color: var(--luc); }
.toi-noi > span > b { color: var(--chu); }   /* chỉ con TRỰC TIẾP: luật rộng "span b" từng nhuộm trắng số trên huy hiệu đồng (tương phản 1,44) */
.toi-thanh { margin-top: 2px; }

.chan { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: var(--chu-mo2); font-size: 13px; }
.chan p { margin: 0; }

/* ── Khung rộng (≥ 900px): hero 2 cột — nội dung trái, bảng cao thủ phải ── */
@container sanh (min-width: 900px) {
  .dai-san { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 28px; }
  .hero { grid-template-columns: minmax(0, 1fr) 300px; align-items: center; }
  .hero-top { align-self: center; }
}
/* ── Khung hẹp (< 560px, điện thoại): hero xếp dọc, ảnh lên trên ── */
@container sanh (max-width: 559px) {
  .hero { padding: 0; min-height: 0; }
  .hero-anh { position: relative; inset: auto; height: 200px; transform: none; }
  .hero::before { inset: 0 0 auto 0; height: 200px; background: var(--hero-phu-dt); }
  .hero-noi, .hero-top { margin: 0 14px; }
  .hero-noi { margin-top: -46px; }
  .hero-top { margin-bottom: 14px; }
  .hero-nut .nut { flex: 1 1 140px; }
  .dau p { font-size: 13px; }
  .huy { width: 44px; height: 44px; font-size: 24px; border-radius: 13px; }
  .dai-ds li { grid-template-columns: 24px 44px minmax(0, 1fr) auto; }   /* cột avatar 44px = ô NGOÀI khung (.ds-ava) — 30px cũ làm avatar đè lên tên */
  .ds-thanh { display: none; }
  .dai-toi { grid-template-columns: auto minmax(0, 1fr); position: relative; bottom: auto; }   /* điện thoại: KHÔNG dính đáy — thanh + nút to sẽ che ~1/5 màn khi cuộn (relative: neo nhãn lên hạng) */
  .dai-toi .ak { display: none; }
  .dai-toi .nut { grid-column: 1 / -1; }
  .bac-ava { --ngoai: 76px; } .bac.h1 .bac-ava { --ngoai: 96px; }
  .bac-ten { font-size: 12.5px; padding: 2px 6px; }
  .xu { width: 80px; } .xu-anh { width: 54px; height: 54px; }
}
@media (prefers-reduced-motion: reduce) {
  .vuong, .tia, .dai-toi.len, .toi-len { animation: none; }
  .the, .nut { transition: none; }
}

/* ── Trang thật (Chặng 1) ───────────────────────────────────────────────── */
/* Game chưa có bảng máy chủ (Rắn tới Chặng 3) / bảng chưa ai chơi / lỗi mạng: NÓI RÕ vì sao trống, đừng để một ô rỗng
   trông như hỏng (cùng nguyên tắc veBang() của Phi Thuyền) */
.dai-san.trong .buc, .dai-san.trong .dai-ds { display: none; }
.dai-trong { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 30px 16px; text-align: center;
  color: var(--chu-mo); font-size: 15px; line-height: 1.5; }
.dai-trong b { color: var(--chu); font-size: 18px; }
.dai-trong svg { font-size: 34px; color: var(--vang-chu); }
/* Nút của game chưa lên sóng: không phải nút chính màu vàng (đừng mời bấm một thứ chưa mở) */
.nut.cho { color: var(--chu-mo); background: var(--the); border: 1px dashed var(--vien-sang); box-shadow: none; cursor: default; }
.nut.cho:hover { transform: none; box-shadow: none; }
/* chữ "bạn" cạnh tên mình trong danh sách */
.ds-toi { flex: none; padding: 0 6px; border-radius: 6px; font-size: 11.5px; font-weight: 800; color: #2a1606; background: var(--vang); }
