/* Trang hiển thị livestream 1080×1920 (lane E). Chữ tối thiểu 28px, tiêu đề từ 56px, viền chữ để đọc trên mọi nền.
   Da thật (lane U, 29/11/2026, docs/GIAO_DIEN_THAT.md): khung / nút / thanh / huy chương / ngọc phẩm là mảnh atlas Egret của
   D:/assets/ui cắt bằng tools/ui/cat_atlas.mjs ra art/ui/<nhóm>/<mảnh>.png; logo "Tiên Nghịch" = ui/login kj_logo_fzzg3 (bản vàng);
   chữ tiêu đề = font của game (D:/assets/fonts/myFont.ttf, phục vụ ở /res/fonts). Ghi chú v4 bên dưới giữ để tra lịch sử.
   Da giao diện v4 (lane N, docs/PHONG_CACH_UI_v4.md): khung navy đêm viền vàng kép góc mây cuộn + đá son, dải tên kem ngà,
   thanh ngọc khung kim loại, huy chương hạng, huy hiệu phẩm/ngũ hành — toàn bộ hình vẽ bằng mã (tools/ui/ve_ui.mjs → tools/ui/svg/*.svg
   → tools/ui/ra_webp.mjs → art/ui/*.webp). Dùng WebP chứ không SVG: nền/khung SVG bị vẽ lại vector mỗi lần ô HUD vẽ lại → tụt khung trong trận.
   Hiệu năng: không bóng mờ/filter trên phần tử chuyển động (thanh máu, dòng tin, thông báo); khung là border-image tĩnh. */

/* ---------- font của game (Noto Sans ExtCond bản Việt, kèm bộ tài nguyên). myFont.ttf (440 KB) cùng nét với myFont_dich.ttf
   (18 MB, thêm chữ Hán) và đủ dấu tiếng Việt → dùng bản nhẹ; chữ Hán trong tên người xem rơi xuống font hệ thống ---------- */
@font-face { font-family: "TN Game"; font-style: normal; font-weight: 100 1000; font-display: block; src: url(/res/fonts/myFont.ttf) format("truetype"); }
/* ---------- font OFL, kèm trong máy (không gọi mạng) — nguồn + giấy phép: docs/TRANH_NGUON.md mục Font ---------- */
@font-face { font-family: "Alegreya SC"; font-style: normal; font-weight: 800; font-display: block; src: url(../fonts/alegreyasc-800-vietnamese.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: "Alegreya SC"; font-style: normal; font-weight: 800; font-display: block; src: url(../fonts/alegreyasc-800-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Alegreya SC"; font-style: normal; font-weight: 800; font-display: block; src: url(../fonts/alegreyasc-800-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; }
/* Baloo 2: bản TĨNH cắt từ font biến thiên (tools/ui/tinh_font.py) — font biến thiên làm raster chữ tăng ~5 lần trong trận */
@font-face { font-family: "Baloo 2"; font-style: normal; font-weight: 100 599; font-display: block; src: url(../fonts/baloo2-500-vietnamese.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-style: normal; font-weight: 100 599; font-display: block; src: url(../fonts/baloo2-500-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Baloo 2"; font-style: normal; font-weight: 100 599; font-display: block; src: url(../fonts/baloo2-500-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; }
@font-face { font-family: "Baloo 2"; font-style: normal; font-weight: 600 749; font-display: block; src: url(../fonts/baloo2-700-vietnamese.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-style: normal; font-weight: 600 749; font-display: block; src: url(../fonts/baloo2-700-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Baloo 2"; font-style: normal; font-weight: 600 749; font-display: block; src: url(../fonts/baloo2-700-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; }
@font-face { font-family: "Baloo 2"; font-style: normal; font-weight: 750 1000; font-display: block; src: url(../fonts/baloo2-800-vietnamese.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-style: normal; font-weight: 750 1000; font-display: block; src: url(../fonts/baloo2-800-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Baloo 2"; font-style: normal; font-weight: 750 1000; font-display: block; src: url(../fonts/baloo2-800-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 {
  --gold: #ffd77a;
  --gold2: #e0a23a;
  --acc: #ffd77a;
  --f-title: "TN Game", "Alegreya SC", "Palatino Linotype", "Book Antiqua", Cambria, Georgia, serif;
  --f-ui: "Baloo 2", "Segoe UI", Tahoma, Arial, "Segoe UI Emoji", "Segoe UI Symbol", "Microsoft YaHei", "Malgun Gothic", sans-serif;
  --f-num: "Segoe UI", Tahoma, Arial, sans-serif; /* số đồng hồ: chữ số đều bề rộng, không nhảy */
  --ink: #170a03; /* viền chữ nâu đen (thay đen tuyền) */
  --ol: 0 2px 0 var(--ink), 2px 0 0 var(--ink), -2px 0 0 var(--ink), 0 -2px 0 var(--ink), 2px 2px 0 var(--ink), -2px 2px 0 var(--ink), 2px -2px 0 var(--ink), -2px -2px 0 var(--ink);
  /* viền chữ bằng bóng cứng (không làm mờ): rẻ hơn nhiều khi dựng hình, giữ được 60 khung/giây */
  --ol3: 0 3px 0 var(--ink), 3px 0 0 var(--ink), -3px 0 0 var(--ink), 0 -3px 0 var(--ink), 2px 2px 0 var(--ink), -2px 2px 0 var(--ink), 2px -2px 0 var(--ink), -2px -2px 0 var(--ink), 0 5px 0 rgba(23, 10, 3, .55);
  /* bảng màu v4 (lấy mẫu sắc độ từ bộ tham khảo, vẽ lại) */
  --kem: #f6ead2;
  --nau: #4a230d;
  --kim-vien: linear-gradient(180deg, #fff3c0 0%, #f2c66a 32%, #b47826 62%, #f4d47f 100%);
  --dem: linear-gradient(180deg, rgba(46, 31, 29, .95), rgba(24, 16, 15, .96)); /* nâu đêm như lòng khung tips */
  --van: linear-gradient(transparent, transparent); /* v4 vân mây vẽ mã: bỏ (khung thật đã có hoa văn) */
  /* khung 9 mảnh: ảnh 200×200, góc 64; mép vàng nằm đúng mép phần tử nhờ outset 14 */
  /* khung 9 mảnh common1 'tips' 63×56: viền vàng góc hồi văn, lòng nâu đêm; mép trong suốt 8px → outset để viền vàng khớp mép phần tử */
  --khung: url(../art/ui/common/tips.png) 20 fill / 30px / 12px stretch;
  --khung-s: url(../art/ui/common/tips.png) 20 fill / 22px / 9px stretch;
  --khung-ngoc: url(../art/ui/common/tips.png) 20 / 30px / 12px stretch; /* không fill: giữ nền ngọc của bảng Linh Thú */
  /* biển tên login 'sys_bg_ejbt' 304×49: hai đầu hồi văn vàng, lòng nâu; chữ kem */
  --bang: url(../art/ui/login/sys_bg_ejbt.png) 0 76 fill / 0 60px / 0 10px stretch;
  --chu-bang: #ffe9b0;
  /* khung tối góc vát common1 'sys_bg_tips2' 74×49 */
  --khung-vat: url(../art/ui/common/sys_bg_tips2.png) 17 18 fill / 22px 24px stretch;
}
body[data-phase="luyen_khi"] { --acc: #ffb35c; }
/* rối DragonBones (TN.Rig, rig.js) vẽ trong #rigHost: trên phông (#bg) và sân khấu DOM (#stage), dưới HUD/bảng/kết quả/hiệu ứng */
body[data-phase="linh_thu"] { --acc: #7ff5de; }
body[data-phase="loi_dai"] { --acc: #9fd6ff; }

html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; background: #000; }
#root {
  position: absolute; left: 0; top: 0; width: 1080px; height: 1920px; transform-origin: 0 0; overflow: hidden;
  background: #05040c; font-family: var(--f-ui); color: #fff; -webkit-font-smoothing: antialiased; user-select: none;
}
#shake { position: absolute; inset: 0; will-change: transform; } /* rung bằng transform trên lớp riêng, không vẽ lại cả trang (lane C2) */
#bg, #fx { position: absolute; left: 0; top: 0; width: 1080px; height: 1920px; }
#fx { z-index: 50; pointer-events: none; }
#stage { position: absolute; inset: 0; z-index: 5; }
#rigHost { z-index: 10; }
#hud { position: absolute; inset: 0; z-index: 20; pointer-events: none; }
#panel { position: absolute; inset: 0; z-index: 30; pointer-events: none; }
#reveal { position: absolute; inset: 0; z-index: 40; pointer-events: none; }

/* ---------- ảnh đại diện ---------- */
.av {
  position: relative; flex: none; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center;
  border: 2px solid #e8c372; box-sizing: border-box;
}
.av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; }
.av-l { font-weight: 800; color: #fff; text-shadow: 0 2px 0 rgba(23, 10, 3, .7); line-height: 1; }
canvas.cv { display: block; }

/* ---------- huy hiệu phẩm / ngũ hành đứng trước tên (panels.js gắn lớp rb-<phẩm>, eb-<hành>) ---------- */
.rb::before, .eb::before {
  content: ""; display: inline-block; width: 1.05em; height: 1.05em; margin-right: .2em; vertical-align: -.17em;
  background: url(../art/ui/common/pham_linh.png) center / contain no-repeat;
}
/* phẩm: ngọc thật (common3 common_bg_pop1..6, common1 beibao_11) */
.rb::before { background-image: url(../art/ui/common/pham_linh.png); }
.rb-pham::before { background-image: url(../art/ui/common/pham_pham.png); }
.rb-tien::before { background-image: url(../art/ui/common/pham_tien.png); }
.rb-than::before { background-image: url(../art/ui/common/pham_than.png); }
.rb-thanh::before, .rb-thien::before { background-image: url(../art/ui/common/pham_thanh.png); }
.rb-gioihan::before { background-image: url(../art/ui/common/pham_gioihan.png); }
.eb-kim::before { background-image: url(../art/ui/hanh_kim.webp); }
.eb-moc::before { background-image: url(../art/ui/hanh_moc.webp); }
.eb-thuy::before { background-image: url(../art/ui/hanh_thuy.webp); }
.eb-hoa::before { background-image: url(../art/ui/hanh_hoa.webp); }
.eb-tho::before { background-image: url(../art/ui/hanh_tho.webp); }

/* ---------- đầu trang: biển hiệu navy viền vàng, sen đỉnh, mây hai bên ---------- */
/* lane L (đợt 2, docs/BO_CUC_50.md): HUD nén vào dải 0–260 — logo trái, tên pha + đồng hồ phải, hàng hướng dẫn 136, hai thanh mốc 190 */
#hdr { position: absolute; left: 0; top: 0; width: 1080px; height: 260px; }
/* quầng tối sau logo để logo vàng nổi trên mọi tranh nền */
#hdr::before { content: ""; position: absolute; left: 0; top: 0; width: 1080px; height: 270px; background: linear-gradient(180deg, rgba(12, 6, 4, .62), rgba(12, 6, 4, .4) 70%, rgba(12, 6, 4, 0)); pointer-events: none; }
/* logo thư pháp "Tiên Nghịch" (ui/login kj_logo_fzzg3, bản vàng) khi tiêu đề máy chủ là Tiên Nghịch; tiêu đề khác thì hiện chữ */
#title.logo {
  left: 8px; right: auto; width: 140px; top: 2px; height: 134px; line-height: 134px; font-size: 0 !important; color: transparent; filter: none;
  background: url(../art/ui/login/kj_logo_fzzg3_vang.png) center / contain no-repeat; -webkit-background-clip: border-box; background-clip: border-box;
}
#title {
  position: absolute; left: 8px; width: 150px; top: 40px; height: 60px; line-height: 62px; text-align: center;
  font-family: var(--f-title); font-weight: 800; font-size: 40px; letter-spacing: 2px; text-transform: uppercase; white-space: nowrap; overflow: hidden;
  background: linear-gradient(180deg, #fffdf0 0%, #ffeaa6 34%, #f2b858 56%, #b9771f 72%, #ffe9a6 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 #2a1205) drop-shadow(0 0 1.5px #2a1205) drop-shadow(0 0 10px rgba(255, 190, 80, .35));
}
#phaseRow {
  position: absolute; left: 156px; right: 0; top: 14px; height: 112px; display: flex; align-items: center; gap: 16px;
  background: url(../art/ui/common/common_bg32.png) 0 0 / 100% 100% no-repeat, linear-gradient(90deg, rgba(14, 10, 30, 0), rgba(14, 10, 30, .55) 12%, rgba(14, 10, 30, .55) 88%, rgba(14, 10, 30, 0));
  border-top: 2px solid transparent; border-bottom: 2px solid transparent;
}
/* hồi văn vàng chạy dọc mép trên/dưới dải pha, mờ dần hai đầu (độ mờ vẽ sẵn trong SVG: không dùng mask/transform) */
/* đường kẻ vàng đầu kim cương (login ggxf_line_ggxf_3 224×29): giữ nguyên đầu 40px, kéo dài thân */
#phaseRow::before, #phaseRow::after { content: ""; position: absolute; left: 20px; width: calc(100% - 40px); height: 22px; box-sizing: border-box; pointer-events: none; border-style: solid; border-color: transparent; border-width: 0 0 0 30px; border-image: url(../art/ui/login/ggxf_line_ggxf_3.png) 0 0 0 40 fill / 0 0 0 30px stretch; }
#phaseRow::before { top: -12px; }
#phaseRow::after { bottom: -12px; transform: scaleX(-1); }
#phaseBox { flex: 1; min-width: 0; padding-left: 46px; position: relative; }
#phaseBox::before { content: ""; position: absolute; left: 10px; top: 22px; width: 24px; height: 24px; transform: rotate(45deg); border-radius: 4px; background: linear-gradient(135deg, #fff6cf, var(--acc) 45%, #3a2a10); border: 2px solid #f4d47f; box-sizing: border-box; outline: 2px solid var(--ink); }
#phaseName {
  font-family: var(--f-title); font-weight: 800; font-size: 56px; line-height: 64px; color: var(--acc); white-space: nowrap; overflow: hidden;
  text-shadow: var(--ol3); letter-spacing: 1px;
}
#phaseNext { font-size: 28px; line-height: 34px; font-weight: 600; color: #f3e6c8; text-shadow: var(--ol); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#clock {
  position: relative; flex: none; width: 236px; height: 90px; margin-right: 22px; border-radius: 18px; text-align: center; font-family: var(--f-num); font-weight: 800; font-size: 70px; line-height: 88px;
  font-variant-numeric: tabular-nums; color: #fff8e6; text-shadow: var(--ol3);
  background: radial-gradient(ellipse at 50% 28%, rgba(70, 46, 36, .96), rgba(24, 15, 13, .97) 70%); border: 3px solid transparent; border-image: var(--khung);
}
/* cánh vàng ngọc tím (common3 sys_icon_star7) đội trên đồng hồ */
#clock::before { content: ""; position: absolute; left: 50%; top: -24px; width: 168px; height: 33px; margin-left: -84px; background: url(../art/ui/common/sys_icon_star7.png) center / 100% 100% no-repeat; pointer-events: none; }
#clock.low { color: #ff7a6a; animation: pulse 1s ease-in-out infinite; }
#hint {
  position: absolute; left: 24px; right: 24px; top: 134px; height: 44px; line-height: 47px; text-align: center; font-weight: 800; font-size: 36px;
  white-space: nowrap; overflow: hidden; color: #fffaf0; text-shadow: var(--ol); transition: opacity .25s;
  background: url(../art/ui/common/sys_bg_kfnum.png) center / 100% 100% no-repeat;
}
#hint.swap { animation: hintIn .45s ease-out; }
#hint.ch { color: #ffd2c2; }
#hint.hide { opacity: 0; }

/* ---------- thẻ chào: chỗ riêng ở hàng hướng dẫn (không tranh sân khấu) ---------- */
#welcome { position: absolute; left: 24px; right: 24px; top: 132px; height: 48px; display: flex; justify-content: center; pointer-events: none; }
.wc {
  position: absolute; max-width: 1032px; height: 48px; box-sizing: border-box; display: flex; align-items: center; gap: 12px; padding: 0 22px 0 6px;
  border-radius: 0; border: 3px solid transparent; border-image: var(--khung-vat);
  background: linear-gradient(90deg, rgba(16, 60, 44, .6), rgba(8, 24, 28, 0)) padding-box;
  animation: wcIn .45s cubic-bezier(.2, 1.3, .4, 1); white-space: nowrap; overflow: hidden;
}
.wc.ret { background: linear-gradient(90deg, rgba(56, 34, 92, .6), rgba(16, 10, 34, 0)) padding-box; }
.wc.out { opacity: 0; transform: translateY(-14px); transition: opacity .35s, transform .35s; }
.wc-h {
  flex: none; font-family: var(--f-title); font-weight: 800; font-size: 26px; line-height: 22px; letter-spacing: 1px; color: #3a1a06; padding: 0 4px 0 6px;
  border: 0 solid transparent; border-width: 10px 10px 12px 20px; margin: -6px 0; border-image: url(../art/ui/common/sys_btn_b1.png) 12 12 14 22 fill / 10px 10px 12px 20px stretch;
  text-shadow: 0 1px 0 rgba(255, 245, 215, .7);
}
.wc.ret .wc-h { border-image-source: url(../art/ui/common/sys_btn_b2.png); color: #ffe9b0; text-shadow: 0 2px 0 var(--ink); }
.wc .av { border-width: 2px; }
.wc-n { min-width: 0; font-size: 32px; line-height: 40px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; text-shadow: var(--ol); }
.wc-s { flex: none; font-size: 28px; line-height: 36px; color: #d8f5e6; text-shadow: var(--ol); }
/* lane G: câu chỉ lệnh của người mới nổi hơn (vàng, đậm) */
.wc-s.go { color: #ffe08a; font-weight: 800; }
.wc-g { flex: none; display: flex; }
.wc-g .av { margin-left: -12px; }
.wc-g .av:first-child { margin-left: 0; }

/* hộp CÁCH CHƠI của lane G → TM.GuidePanel (guide_panel.js, kiểu .gd ở khối v5 cuối tệp) */

/* ---------- dòng lệnh chạy ngang ở đáy HUD (y 232–260; hud.js dựng từ snapshot.commands.hints, chạy bằng CSS animation) ---------- */
#ticker { position: absolute; left: 0; top: 232px; width: 1080px; height: 28px; overflow: hidden; pointer-events: none;
  background: linear-gradient(90deg, rgba(8, 5, 4, 0), rgba(8, 5, 4, .62) 6%, rgba(8, 5, 4, .62) 94%, rgba(8, 5, 4, 0)); }
#ticker::before, #ticker::after { content: ""; position: absolute; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(244, 212, 127, .45) 15%, rgba(244, 212, 127, .45) 85%, transparent); }
#ticker::before { top: 0; }
#ticker::after { bottom: 0; }
.tk-track { position: absolute; left: 0; top: 0; height: 28px; display: flex; white-space: nowrap; will-change: transform; animation: tkRun 60s linear infinite; }
.tk-run { flex: none; display: flex; align-items: center; height: 28px; font-size: 22px; line-height: 28px; font-weight: 700; color: #ffd77a; text-shadow: 0 1px 0 #1a0c02; }
.tk-run span { padding: 0 6px; }
.tk-run b { color: #fff1b8; font-weight: 800; }
.tk-run i { font-style: normal; color: #e8a94a; padding: 0 10px; }
@keyframes tkRun { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- thanh mục tiêu phòng: ngọc trong khung kim loại ---------- */
#goals { position: absolute; left: 24px; right: 24px; top: 180px; height: 50px; display: flex; gap: 16px; }
.goal { flex: 1; min-width: 0; position: relative; }
.g-lbl { font-size: 22px; line-height: 22px; font-weight: 700; color: #ffefc6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: var(--ol); padding-left: 8px; }
.g-bar {
  position: relative; height: 25px; margin-top: 2px; border-radius: 14px; overflow: hidden; border: 0;
  /* common sys_jd_nsbg 40×30: viên thuốc nâu viền sẫm */
  background: url(../art/ui/common/sys_jd_nsbg.png) 0 0 / 100% 100% no-repeat;
  box-shadow: 0 0 0 2px rgba(244, 212, 127, .55), 0 2px 0 3px rgba(23, 10, 3, .7);
}
.g-fill {
  position: absolute; inset: 3px 4px; border-radius: 11px; transform-origin: 0 50%; transform: scaleX(0); transition: transform .45s ease-out;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 5%, rgba(255, 255, 255, .38) 12%, rgba(255, 255, 255, .08) 40%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, .16)), linear-gradient(90deg, #c92e62, #ff6f96 58%, #ffc2d4);
}
/* ruột vàng thật (common sys_jd_qd 26×16) */
.coin .g-fill { background: url(../art/ui/common/sys_jd_qd.png) 0 0 / 100% 100% no-repeat; }
.g-num { position: absolute; inset: 0; text-align: center; font-size: 22px; line-height: 25px; font-weight: 800; text-shadow: var(--ol); font-variant-numeric: tabular-nums; }
.g-num.retarget { animation: hintIn .5s ease-out; color: #fff3c4; }
.goal.buff .g-bar { box-shadow: 0 0 0 2px #ffe08a, 0 0 16px 2px rgba(255, 210, 90, .55); }
.goal.buff .g-fill { background: linear-gradient(90deg, #ffcf45, #fff6d0, #ffcf45); background-size: 200% 100%; animation: shimmer 1.6s linear infinite; }
.goal.buff .g-lbl { color: #ffe08a; }

/* ---------- thông báo ngắn (lane M, gộp v5): DẢI MỎNG TRONG HUD đè đúng dải lệnh chạy ngang y 232–260 (#ticker) tối đa 3 s ----------
   Trước ở khoảng trời đầu đấu trường 292–394 → đè đầu tâm cảnh của cả 4 trang (nhãn trứng Linh Thú, BẢNG THƯỢNG ĐÀI, chữ đàn / lư);
   mép dưới tâm cảnh 930–970 cũng đã có chữ (bảo hiểm Chiêu Hiền, "Lôi Đài mở sau", dải hoạt động 986). Một dòng một lúc, chữ 24 px. */
#notice { position: absolute; left: 0; top: 232px; width: 1080px; height: 28px; overflow: hidden; pointer-events: none; }
.nt {
  position: absolute; left: 0; top: 0; width: 1080px; height: 28px; box-sizing: border-box; padding: 0 64px; text-align: center;
  font-size: 24px; font-weight: 800; line-height: 28px; color: #fff1b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 1px 0 #1a0c02, 0 0 4px rgba(0, 0, 0, .9);
  background: linear-gradient(90deg, rgba(60, 30, 6, 0), rgba(60, 30, 6, .97) 7%, rgba(60, 30, 6, .97) 93%, rgba(60, 30, 6, 0));
  box-shadow: inset 0 1px 0 rgba(255, 215, 120, .55), inset 0 -1px 0 rgba(255, 215, 120, .55);
  animation: ntDai .3s ease-out;
}
.nt::before, .nt::after { content: ""; position: absolute; top: 50%; width: 10px; height: 10px; margin-top: -5px; transform: rotate(45deg); background: linear-gradient(135deg, #fff6cf, #e8ab62 55%, #8a5a1c); border: 1px solid var(--ink); }
.nt::before { left: 92px; }
.nt::after { right: 92px; }
.nt.tone-rare { color: #ffe9a0; background: linear-gradient(90deg, rgba(120, 30, 14, 0), rgba(120, 30, 14, .97) 7%, rgba(120, 30, 14, .97) 93%, rgba(120, 30, 14, 0)); }
.nt.tone-ok { color: #a8ffc6; }
.nt.tone-warn { color: #ffc58a; }
.nt.out { opacity: 0; transition: opacity .35s; }
@keyframes ntDai { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- trả lời riêng (lane G): ô riêng ở đầu cột dòng tin (y 1700, rộng = cột dòng tin 610), đè tạm các dòng tin cũ nhất;
   không còn chung hàng với phụ đề MC (trước: MC nói thì câu trả lời phải chờ / bị bỏ). Chữ 24 px, xuống dòng tối đa 3 dòng. ---------- */
#replies { position: absolute; left: 24px; top: 1764px; width: 610px; display: flex; flex-direction: column; align-items: stretch; gap: 4px; z-index: 2; transition: opacity .25s; pointer-events: none; }
.rp {
  flex: none; box-sizing: border-box; padding: 6px 16px 7px 18px; border-radius: 6px 16px 16px 6px; border-left: 6px solid #8fd0ff;
  background: linear-gradient(90deg, rgba(34, 22, 16, .96), rgba(24, 16, 12, .93)); box-shadow: 0 0 0 2px rgba(244, 212, 127, .55), 0 4px 12px rgba(0, 0, 0, .55);
  font-size: 24px; line-height: 30px; font-weight: 700; text-shadow: 0 2px 0 var(--ink); animation: rpIn .3s ease-out;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: normal;
}
.rp-n { color: #ffe08a; margin-right: 10px; }
.rp.tone-warn { border-left-color: #ffb35c; }
.rp.tone-ok { border-left-color: #6fe8a0; }
.rp.tone-rare { border-left-color: #cf86ff; }
.rp.out { opacity: 0; transition: opacity .35s; }

/* ---------- phụ đề MC + dòng tin + bảng ---------- */
#mc {
  position: absolute; left: 24px; right: 24px; top: 1650px; height: 100px; box-sizing: border-box; display: flex; align-items: center; gap: 16px; z-index: 3;
  padding: 4px 20px; border-radius: 12px; background: var(--van), var(--dem); border: 2px solid transparent; border-image: var(--khung-s);
  opacity: 0; transform: translateY(10px); transition: opacity .3s, transform .3s;
}
#mc.on { opacity: 1; transform: none; }
#mc.pop #mcText { animation: hintIn .35s ease-out; }
/* nút đỏ son: tên người dẫn */
#mcName {
  flex: none; font-family: var(--f-title); font-weight: 800; font-size: 30px; line-height: 20px; letter-spacing: 1px; color: #fff4dc; padding: 0 4px;
  /* common sys_icon_hdlt 50×30: viên son viền kem */
  border: 0 solid transparent; border-width: 12px 18px; margin: -4px 0; border-image: url(../art/ui/common/sys_icon_hdlt.png) 15 18 fill / 12px 18px stretch; text-shadow: 0 2px 0 #4a0e08;
}
#mcText { font-size: 28px; line-height: 30px; font-weight: 600; text-shadow: var(--ol); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#bottom { position: absolute; left: 24px; right: 24px; top: 1764px; height: 150px; display: flex; gap: 16px; }
#feed { flex: 1.5; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; overflow: hidden; }
.fl {
  position: relative; flex: none; font-size: 28px; line-height: 32px; padding: 2px 14px 2px 34px; border-radius: 6px 16px 16px 6px;
  background: url(../art/ui/common/hscb_ng_di.png) 0 0 / 100% 100% no-repeat, linear-gradient(90deg, rgba(30, 20, 18, .75), rgba(30, 20, 18, 0)); border-left: 4px solid #8fa3c0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; animation: flIn .3s ease-out; text-shadow: 0 2px 0 var(--ink);
}
/* viên ngọc đầu dòng (màu theo giọng tin) */
.fl::before { content: ""; position: absolute; left: 11px; top: 13px; width: 11px; height: 11px; transform: rotate(45deg); background: #c9d3e6; border: 1px solid var(--ink); }
.fl.tone-ok { border-left-color: #6fe8a0; }
.fl.tone-ok::before { background: #6fe8a0; }
.fl.tone-warn { border-left-color: #ffb35c; }
.fl.tone-warn::before { background: #ffb35c; }
.fl.tone-rare { border-left-color: #cf86ff; color: #f0d8ff; }
.fl.tone-rare::before { background: #cf86ff; }
.fl.tone-gift { border-left-color: #ffd24a; color: #fff0c0; }
.fl.tone-gift::before { background: #ffd24a; }
.fl.old { opacity: 0; transition: opacity 1s; }
#rank {
  flex: 1; min-width: 0; box-sizing: border-box; padding: 4px 12px 2px; overflow: hidden; border-radius: 12px;
  background: var(--van), var(--dem); border: 2px solid transparent; border-image: var(--khung);
}
/* dải tên kem ngà, chữ nâu */
#rankTitle {
  width: fit-content; max-width: 100%; min-width: 260px; box-sizing: border-box; margin: 0 auto 1px; padding: 0 64px; height: 34px;
  font-family: var(--f-title); font-size: 27px; line-height: 36px; font-weight: 800; color: var(--chu-bang); letter-spacing: 1px; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-image: var(--bang); text-shadow: 0 2px 0 var(--ink);
}
.rr { display: flex; align-items: center; gap: 8px; height: 34px; font-size: 28px; border-bottom: 1px solid rgba(244, 212, 127, .12); }
.rr:last-child { border-bottom: 0; }
.rr-i {
  flex: none; width: 34px; height: 34px; line-height: 36px; border-radius: 50%; text-align: center; font-size: 22px; font-weight: 800; color: #ffe9b0;
  background: radial-gradient(circle at 40% 35%, #3a3a6a, #12122a); box-shadow: inset 0 0 0 2px #b88a3c; text-shadow: 0 1px 0 var(--ink);
}
/* huy chương hạng thật (common common_rank1..3, đã có số) */
.rr.r1 .rr-i, .rr.r2 .rr-i, .rr.r3 .rr-i { width: 36px; height: 34px; margin: 0 -4px 0 -2px; border-radius: 0; box-shadow: none; color: transparent; text-shadow: none; background: url(../art/ui/common/common_rank1.png) center / contain no-repeat; }
.rr.r2 .rr-i { background-image: url(../art/ui/common/common_rank2.png); }
.rr.r3 .rr-i { background-image: url(../art/ui/common/common_rank3.png); }
.rr-n { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 2px 0 var(--ink); }
.rr-v { font-weight: 800; color: #ffe9b0; font-variant-numeric: tabular-nums; text-shadow: 0 2px 0 var(--ink); }
.rr.r1 .rr-n { color: #ffe08a; }

/* ---------- sân khấu chung ---------- */
#minis { position: absolute; inset: 0; z-index: 2; }

/* ba ngai */

/* thẻ nhỏ trên đàn */
.mini {
  position: absolute; width: 200px; display: flex; flex-direction: column; align-items: center;
  animation: miniIn .32s cubic-bezier(.2, 1.3, .4, 1) both, miniOut .3s ease-in calc(var(--life) - 300ms) forwards;
}
.mini.fly { animation: miniFly .55s cubic-bezier(.3, 1.2, .5, 1) both, miniOut .3s ease-in calc(var(--life) - 300ms) forwards; }
.mini .flip { position: relative; transform-style: preserve-3d; animation: flipOpen .42s ease-out .16s both; }
.face { position: absolute; inset: 0; width: 100%; height: 100%; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 10px; display: block; }
.face.front { transform: rotateY(180deg); }
.mini.card .front { box-shadow: 0 0 22px var(--glow); }
.mini .ic { display: block; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .6)); }
.mo, .mr { max-width: 200px; font-size: 28px; line-height: 32px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: var(--ol); }
.mo { margin-top: 4px; font-weight: 700; }
.mr { font-weight: 800; }

/* bảng bên: khung navy đêm, dải tên kem */
.side {
  position: absolute; top: 600px; width: 280px; box-sizing: border-box; padding: 10px 16px 12px; border-radius: 12px; transition: opacity .4s;
  background: var(--van), var(--dem); border: 2px solid transparent; border-image: var(--khung);
}
.side.l { left: 14px; }
.side.r { right: 14px; }
.side.empty { opacity: 0; }
.sd-h {
  box-sizing: border-box; height: 40px; margin: 0 -2px 6px; padding: 0 48px; font-family: var(--f-title); font-size: 28px; line-height: 42px; font-weight: 800;
  color: var(--chu-bang); letter-spacing: 1px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-image: var(--bang); text-shadow: 0 2px 0 var(--ink);
}
.sd-kv { display: flex; justify-content: space-between; gap: 8px; font-size: 28px; line-height: 40px; text-shadow: 0 2px 0 var(--ink); }
.sd-kv .v { font-weight: 800; color: #ffe9b0; white-space: nowrap; }
.sd-kv.rule .k { font-weight: 800; color: #ffd1dc; }
.sd-r { display: flex; gap: 8px; font-size: 28px; line-height: 40px; text-shadow: 0 2px 0 var(--ink); }
.sd-r .i { width: 22px; font-weight: 800; color: #ffe08a; }
.sd-r .n { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sd-r .v { font-weight: 800; color: #ffe9b0; }

/* vườn linh thú */
.ns { color: #fff3c4; font-weight: 600; }

/* lôi đài chờ */
.ar-idle {
  position: absolute; left: 80px; right: 80px; top: 650px; box-sizing: border-box; padding: 18px 30px 22px; border-radius: 14px; transition: opacity .4s;
  background: var(--van), linear-gradient(180deg, rgba(24, 34, 80, .93), rgba(8, 12, 32, .95)); border: 2px solid transparent; border-image: var(--khung);
}
.ar-idle.hide { opacity: 0; }
.ar-c { margin-top: 12px; text-align: center; font-size: 34px; font-weight: 800; color: #ffe08a; text-shadow: var(--ol); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* trận đấu đầy sân khấu (pha Lôi Đài): vùng 585–1290, chữ quan trọng nằm trên mốc 1344.
   KHÔNG đổi chiều cao/lề các hàng trên .d-cw (.d-name 50, .d-hp 40+viền 2+lề 4, .d-ch 30): battle.js đo chân nhân vật theo đó. */
.duel { position: absolute; left: 0; top: 585px; width: 1080px; height: 720px; display: none; z-index: 3; }
.duel.on { display: block; }
/* tên vòng trên dải lụa son, chữ vàng viền nâu đỏ */
.d-round {
  position: absolute; left: 0; right: 0; top: 2px; text-align: center; font-family: var(--f-title); font-weight: 800; font-size: 50px; line-height: 62px; color: #ffeaa6; letter-spacing: 6px;
  text-shadow: 0 3px 0 #3a0a04, 3px 0 0 #3a0a04, -3px 0 0 #3a0a04, 0 -2px 0 #3a0a04, 2px 2px 0 #3a0a04, -2px 2px 0 #3a0a04, 2px -2px 0 #3a0a04, -2px -2px 0 #3a0a04;
  background: url(../art/ui/lua_son.webp) center / 600px 62px no-repeat;
}
.d-sub { position: absolute; left: 0; right: 0; top: 64px; height: 36px; white-space: nowrap; overflow: hidden; text-align: center; font-size: 30px; line-height: 38px; font-weight: 800; color: #f6ead2; text-shadow: var(--ol); }
.d-f { position: absolute; top: 100px; width: 480px; display: flex; flex-direction: column; align-items: center; transition: filter .6s; }
.d-f.a { left: 30px; }
.d-f.b { right: 30px; }
/* bảng tên phe: lam bên trái, son bên phải, chỉ vàng trên/dưới */
.d-name {
  --pl: rgba(36, 70, 140, .9); box-sizing: border-box; padding: 0 36px;
  font-size: 40px; line-height: 50px; font-weight: 800; max-width: 470px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: var(--ol);
  background: linear-gradient(90deg, transparent, #f4d47f 16%, #f4d47f 84%, transparent) top / 100% 2px no-repeat,
    linear-gradient(90deg, transparent, #f4d47f 16%, #f4d47f 84%, transparent) bottom / 100% 2px no-repeat,
    linear-gradient(90deg, transparent, var(--pl) 14%, var(--pl) 86%, transparent);
}
.d-f.a .d-name { color: #eaf5ff; }
.d-f.b .d-name { color: #fff0ea; --pl: rgba(146, 34, 34, .9); }
/* huy hiệu phe tròn trước tên: trái Nguyệt (lam), phải Nhật (son) — chỉ rộng ngang, không đổi chiều cao hàng */
.d-name::before { content: ""; display: inline-block; width: 38px; height: 38px; margin-right: 8px; vertical-align: -9px; background: url(../art/ui/phe_nguyet.webp) center / contain no-repeat; }
.d-f.b .d-name::before { background-image: url(../art/ui/phe_nhat.webp); }
/* thanh máu: ngọc trong khung kim loại (viền 2 px vàng đồng, rãnh tối); vệt sáng vẽ ngay trong nền phần đầy —
   KHÔNG thêm lớp phủ ::after trên phần đầy: phần đầy chạy chuyển động nên lớp phủ chồng lên bị tách thành lớp ghép riêng, đo được tụt khung */
.d-hp {
  position: relative; width: 420px; height: 40px; margin-top: 4px; border-radius: 20px; overflow: hidden; border: 2px solid transparent;
  background: linear-gradient(180deg, #04050b, #1a1c2c) padding-box, linear-gradient(180deg, #fff3c0 0%, #e2b452 28%, #6e4210 55%, #c9973c 80%, #fff0b0 100%) border-box;
  outline: 2px solid rgba(23, 10, 3, .9);
}
.d-hp i {
  position: absolute; inset: 0; transform-origin: 0 50%; transition: transform .35s ease-out;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 6%, rgba(255, 255, 255, .36) 12%, rgba(255, 255, 255, .08) 42%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, .22)), linear-gradient(90deg, #0f7a52, #27c983 55%, #9dffc8);
}
.d-f.b .d-hp i { transform-origin: 100% 50%; background: linear-gradient(180deg, rgba(255, 255, 255, 0) 6%, rgba(255, 255, 255, .36) 12%, rgba(255, 255, 255, .08) 42%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, .22)), linear-gradient(270deg, #0f7a52, #27c983 55%, #9dffc8); }
.d-hp i.low, .d-f.b .d-hp i.low { background: linear-gradient(180deg, rgba(255, 255, 255, 0) 6%, rgba(255, 255, 255, .36) 12%, rgba(255, 255, 255, .08) 42%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, .22)), linear-gradient(90deg, #9a1020, #f03848 55%, #ff9a7a); }
.d-hp span { position: absolute; inset: 0; text-align: center; font-size: 28px; line-height: 38px; font-weight: 800; text-shadow: var(--ol); }
.d-ch { height: 30px; font-size: 28px; line-height: 32px; font-weight: 800; color: #ffb3c8; text-shadow: var(--ol); }
.d-cw { position: relative; width: 260px; height: 390px; margin-top: 6px; }
.d-cw .main { position: absolute; left: 0; top: 0; width: 260px; height: 390px; border-radius: 16px; box-shadow: 0 12px 34px rgba(0, 0, 0, .7); }
.d-pow {
  display: flex; align-items: center; gap: 10px; margin-top: 24px; padding: 0 28px; font-size: 30px; line-height: 44px; font-weight: 800; color: #ffe9b0; text-shadow: var(--ol);
  background: linear-gradient(90deg, transparent, rgba(12, 10, 32, .82) 18%, rgba(12, 10, 32, .82) 82%, transparent);
}
/* VS: chữ vàng viền son trên vòng hai kiếm (vòng nằm sau đấu thủ) */
.d-vs {
  position: absolute; left: 440px; top: 300px; width: 200px; text-align: center; font-family: var(--f-title); font-style: italic; font-weight: 800; font-size: 104px; line-height: 140px;
  background: linear-gradient(180deg, #fffdf0 0%, #ffe08a 38%, #f2a93a 62%, #fff0b0 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 3px #6a1408;
}
/* vòng hai kiếm sau chữ VS: ::before của khung trận nên vẽ trước (nằm dưới) mọi đấu thủ */
.duel.full::before { content: ""; position: absolute; left: 440px; top: 270px; width: 200px; height: 200px; opacity: .8; pointer-events: none; background: url(../art/ui/vong_vs.webp) center / 100% 100% no-repeat; }
.d-win {
  position: absolute; top: 280px; width: 480px; text-align: center; font-family: var(--f-title); font-weight: 800; font-size: 140px; line-height: 150px;
  color: #ffe98a; text-shadow: 0 5px 0 #6a1006, 5px 0 0 #6a1006, -5px 0 0 #6a1006, 0 -4px 0 #6a1006, 4px 4px 0 #6a1006, -4px 4px 0 #6a1006, 4px -4px 0 #6a1006, -4px -4px 0 #6a1006, 0 10px 0 rgba(23, 10, 3, .55);
  opacity: 0; transform: scale(2.6) rotate(-14deg);
}
.d-win.a { left: 30px; }
.d-win.b { right: 30px; }
.d-win.on { opacity: 1; transform: scale(1) rotate(-10deg); transition: opacity .3s, transform .45s cubic-bezier(.2, 1.5, .4, 1); }
.d-rw { position: absolute; left: 40px; right: 40px; top: 662px; text-align: center; font-size: 34px; line-height: 44px; font-weight: 800; color: #ffe9b0; text-shadow: var(--ol); opacity: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-sub.rw { color: #ffe08a; font-size: 32px; animation: hintIn .4s ease-out; }
.d-f.win .main { box-shadow: 0 0 50px rgba(255, 215, 90, .95), 0 12px 34px rgba(0, 0, 0, .7); }
.d-f.lose { filter: grayscale(.85) brightness(.55); }

/* trận thu gọn (ngoài pha Lôi Đài): một dải ở đầu sân khấu, không chiếm sân của đàn đang mở */

/* ---------- lớp diễn kết quả lớn ---------- */
.rv { position: absolute; inset: 0; --sp: 1; --rc: #ffd77a; --glow: rgba(255, 210, 90, .9); }
.rv-dim { position: absolute; inset: 0; background: rgba(3, 2, 10, 0); transition: background calc(180ms / var(--sp)); }
.rv.in .rv-dim { background: rgba(3, 2, 10, .9); }
.rv.t4.in .rv-dim, .rv.t5.in .rv-dim { background: rgba(6, 3, 10, .95); }
/* đang diễn kết quả lớn: ẩn lớp chữ HUD để không lộ chữ mờ dưới lớp tối */
#hint, #welcome, #notice, #replies, #minis { transition: opacity .25s; }
body.rv-on #minis, body.rv-on .duel.mini, body.rv-on .duel.full,
body.rv-full #notice, body.rv-full #hint, body.rv-full #welcome, body.rv-full #replies, body.rv-full #ui5 { opacity: 0; visibility: hidden; transition: none; }
.rv.out { opacity: 0; transition: opacity calc(350ms / var(--sp)); }
.rv-rays {
  position: absolute; left: 540px; top: 980px; width: 1700px; height: 1700px; margin: -850px 0 0 -850px; border-radius: 50%; opacity: 0;
  background: repeating-conic-gradient(var(--rc) 0deg 5deg, transparent 5deg 22.5deg);
  -webkit-mask: radial-gradient(circle, #000 0, rgba(0, 0, 0, .8) 18%, transparent 62%); mask: radial-gradient(circle, #000 0, rgba(0, 0, 0, .8) 18%, transparent 62%);
  animation: spin 16s linear infinite; transition: opacity calc(500ms / var(--sp));
}
.rv.in .rv-rays { opacity: .26; }
.rv.t4.in .rv-rays, .rv.t5.in .rv-rays { opacity: .36; }
.rv-tag {
  position: absolute; left: 20px; right: 20px; top: 398px; text-align: center; font-family: var(--f-title); font-weight: 800; font-size: 72px; line-height: 90px;
  color: #fff; white-space: nowrap; overflow: hidden; letter-spacing: 4px; text-shadow: var(--ol3), 0 0 16px var(--rc); opacity: 0;
}
.rv.in .rv-tag { animation: tagIn calc(700ms / var(--sp)) ease-out forwards; }
.rv-who { position: absolute; left: 30px; right: 30px; top: 494px; display: flex; align-items: center; justify-content: center; gap: 18px; opacity: 0; transform: translateY(16px); transition: all calc(400ms / var(--sp)) calc(150ms / var(--sp)); }
.rv.in .rv-who { opacity: 1; transform: none; }
.rv-wn { font-size: 54px; line-height: 64px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 620px; text-shadow: var(--ol); }
.rv-wx { font-size: 32px; color: #e8e0ff; white-space: nowrap; text-shadow: var(--ol); }
.rv-cw {
  position: absolute; left: 0; right: 0; top: 610px; display: flex; justify-content: center; perspective: 1800px;
  opacity: 0; transform: translateY(260px) scale(.35); transition: opacity calc(450ms / var(--sp)), transform calc(550ms / var(--sp)) cubic-bezier(.2, 1.25, .4, 1);
}
.rv.card-in .rv-cw { opacity: 1; transform: none; }
.rv .rv-cw .flip { position: relative; transform-style: preserve-3d; transition: transform calc(560ms / var(--sp)) cubic-bezier(.3, 1.25, .5, 1); }
.rv .flip.open { transform: rotateY(180deg); }
.rv.open .rv-cw .front { box-shadow: 0 0 70px var(--glow), 0 0 20px var(--glow); }
.rv-icon { width: 380px; height: 380px; display: block; filter: drop-shadow(0 0 40px var(--glow)); }
.rv-name { position: absolute; left: 30px; right: 30px; top: 1166px; text-align: center; opacity: 0; transform: translateY(20px); }
.rv.open .rv-name { opacity: 1; transform: none; transition: all calc(400ms / var(--sp)); }
.rv-name .n { display: block; font-family: var(--f-title); font-weight: 800; font-style: italic; font-size: 64px; line-height: 76px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: var(--ol3); }
.rv-name .s { display: block; font-size: 32px; line-height: 40px; font-weight: 700; color: #f3ecff; text-shadow: var(--ol); }
.rv.t4 .rv-cw, .rv.t5 .rv-cw { top: 588px; }
.rv.t4 .rv-name, .rv.t5 .rv-name { top: 1226px; }
.rv.single.art .rv-name { top: 1024px; }
.rv-pt { position: absolute; left: 30px; right: 30px; top: 350px; text-align: center; font-size: 32px; line-height: 40px; font-weight: 800; color: #ffe9b0; text-shadow: var(--ol); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv.pet .rv-cw { top: 650px; }
.rv-cw.pet { position: absolute; left: 330px; width: 420px; height: 420px; }
.pv { position: absolute; left: 0; top: 0; width: 420px; height: 420px; transition: opacity calc(300ms / var(--sp)), transform calc(500ms / var(--sp)) cubic-bezier(.2, 1.4, .4, 1); }
.pv.new { opacity: 0; transform: scale(.5); }
.rv.card-in .pv.old { animation: wobble .22s linear infinite; }
.rv.open .pv.old { opacity: 0; }
.rv.open .pv.new { opacity: 1; transform: none; }
.rv.pet .rv-name { top: 1100px; }
.rv-mh { opacity: 0; transition: opacity calc(250ms / var(--sp)) calc(160ms / var(--sp)); position: absolute; left: 20px; right: 20px; top: 452px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rv.in .rv-mh { opacity: 1; }
.rv-mh .rv-who { position: static; opacity: 1; transform: none; }
.rv-pity { font-size: 30px; line-height: 40px; color: #e8dcff; text-shadow: var(--ol); }
.rv-grid { position: absolute; left: 30px; right: 30px; top: 600px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px 10px; justify-items: center; }
.rv-grid.dense { grid-template-columns: repeat(6, 1fr); }
.rv-c { display: flex; flex-direction: column; align-items: center; opacity: 0; transform: translateY(50px) scale(.6); animation: cIn calc(360ms / var(--sp)) ease-out forwards; perspective: 1200px; }
.rv-c .flip { position: relative; transform-style: preserve-3d; transition: transform calc(480ms / var(--sp)) cubic-bezier(.3, 1.25, .5, 1); }
.rv-ib { display: flex; align-items: center; justify-content: center; opacity: .25; transform: scale(.7); transition: all calc(350ms / var(--sp)); }
.rv-ib.open { opacity: 1; transform: none; }
.rv-ib .ic { display: block; }
.rv-cl { max-width: 196px; font-size: 28px; line-height: 32px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: var(--ol); opacity: 0; transition: opacity .2s; }
.rv-c.open .rv-cl { opacity: 1; }
.rv-c.best .front, .rv-c.best .rv-ib { box-shadow: 0 0 40px 12px rgba(255, 220, 120, .85); border-radius: 12px; }
.rv-best { position: absolute; left: 20px; right: 20px; top: 1196px; text-align: center; animation: hintIn .4s ease-out; }
.rv-best .t { display: block; font-family: var(--f-title); font-weight: 800; font-size: 40px; color: #fff3c4; text-shadow: var(--ol); letter-spacing: 3px; }
.rv-best .n { display: block; font-family: var(--f-title); font-style: italic; font-weight: 800; font-size: 58px; line-height: 66px; text-shadow: var(--ol); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-champ { position: absolute; left: 0; right: 0; top: 540px; display: flex; flex-direction: column; align-items: center; opacity: 0; transform: scale(.5); transition: all calc(600ms / var(--sp)) cubic-bezier(.2, 1.4, .4, 1); }
.rv.open .rv-champ { opacity: 1; transform: none; }
.rv-champ .crown { font-size: 150px; line-height: 150px; color: #ffd257; text-shadow: 0 0 40px rgba(255, 200, 60, .9), var(--ol); }
.rv-champ .av { border: 6px solid #ffd257; box-shadow: 0 0 60px rgba(255, 200, 60, .8); }
.rv-champ .cn { margin-top: 18px; font-size: 76px; line-height: 88px; font-weight: 800; color: #fff6d0; text-shadow: var(--ol), 0 0 24px rgba(255, 200, 60, .7); max-width: 1000px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-champ .ct { font-family: var(--f-title); font-weight: 800; font-size: 46px; color: #ffd257; text-shadow: var(--ol); }
.rv-champ .cr { margin-top: 6px; font-size: 34px; line-height: 44px; font-weight: 800; color: #fff3c4; text-shadow: var(--ol); }
.rv-gal { position: absolute; left: 20px; right: 20px; top: 560px; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 18px; }
.rv-gc { width: 200px; display: flex; flex-direction: column; align-items: center; animation: cIn .35s ease-out both; opacity: 0; transform: translateY(40px); }
.rv-gc canvas { width: 200px; border-radius: 12px; box-shadow: 0 0 26px rgba(205, 130, 255, .8); }
.rv-gc .gn, .rv-gc .gr { max-width: 200px; font-size: 28px; line-height: 32px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: var(--ol); }
.rv-more { position: absolute; left: 0; right: 0; top: 1296px; text-align: center; font-size: 34px; font-weight: 800; color: #f0d8ff; text-shadow: var(--ol); }
/* màn ra tướng toàn thân (lane H): .rv.hb — chữ danh tính ở trên, nhân vật giữa, tên + danh hiệu + câu thoại ở dải dưới (≤ 1344 px) */
/* ô ẩn 8×8 px độ mờ 1 % chứa canvas vẽ sẵn: để GPU tự vẽ lúc rảnh, không cần đọc ngược */

/* ---------- bảng thông tin: khung navy đêm góc mây, đầu bảng dải kem ---------- */
.pn {
  position: absolute; right: 16px; top: 1178px; width: 900px; max-height: 760px; box-sizing: border-box; padding: 24px 34px 34px; border-radius: 14px; overflow: hidden; zoom: .79;
  background: var(--van), linear-gradient(180deg, rgba(32, 30, 74, .97), rgba(10, 8, 28, .97)); border: 3px solid transparent; border-image: var(--khung);
  animation: pnIn .3s ease-out;
  /* lane PN: lớp ghép riêng cố định suốt đời bảng (không nhập vào lớp gộp 1156×1920 của HUD/sân khi pnIn hết, không tách ra lại khi .out/.hold)
     + cô lập bố cục/kiểu — bảng hiện/ẩn không bắt GPU vẽ lại cả lớp toàn màn (docs/SAN_KHAU_THAT.md mục 13) */
  will-change: transform, opacity; contain: layout style;
}
.pn.out { opacity: 0; transition: opacity .3s; }
.pn.hold { opacity: 0; transition: opacity .25s; }
.pn.hold .pn-t { animation-play-state: paused; }
.pn-h { display: flex; align-items: center; gap: 20px; padding-bottom: 10px; background: linear-gradient(90deg, transparent, rgba(244, 212, 127, .55) 12%, rgba(244, 212, 127, .55) 88%, transparent) bottom / 100% 2px no-repeat; }
.pn-ht { min-width: 0; }
.pn-name { font-size: 50px; line-height: 60px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: var(--ol); }
.pn-kind {
  display: inline-block; box-sizing: border-box; height: 40px; padding: 0 56px; margin-top: 2px; font-family: var(--f-title); font-size: 28px; line-height: 42px; font-weight: 800;
  color: var(--chu-bang); letter-spacing: 1px; border-image: var(--bang); text-shadow: 0 2px 0 var(--ink);
}
.pn-b { margin-top: 16px; }
.pn-t { position: absolute; left: 0; bottom: 0; height: 8px; width: 100%; background: linear-gradient(180deg, #fff3c0, #e8ab62 55%, #9a6a1e); transform-origin: 0 50%; animation: pnT 6s linear forwards; }
.pn-cards { display: flex; justify-content: center; gap: 26px; }
.pn-card { display: flex; flex-direction: column; align-items: center; }
.pn-card canvas { width: 184px; height: 276px; border-radius: 12px; display: block; }
.pn-cn { font-size: 30px; line-height: 38px; font-weight: 800; max-width: 240px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: var(--ol); }
.pn-cp { font-size: 28px; line-height: 32px; color: #ffe9b0; font-weight: 700; }
.pn-kv { display: flex; justify-content: space-between; gap: 20px; font-size: 34px; line-height: 48px; border-bottom: 1px solid rgba(244, 212, 127, .16); }
.pn-kv .k { color: #ddd3f2; white-space: nowrap; }
.pn-kv .v { font-weight: 800; color: #ffe9b0; text-align: right; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pn-kv.big .v { font-size: 44px; color: var(--gold); }
.pn-foot { margin-top: 12px; }
.pn-foot .pn-kv { line-height: 48px; }
.pn-gear { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pn-g { display: flex; align-items: center; gap: 14px; padding: 6px 10px; border-radius: 14px; background: linear-gradient(180deg, rgba(70, 58, 130, .32), rgba(18, 14, 40, .5)); box-shadow: inset 0 0 0 1px rgba(244, 212, 127, .3); min-width: 0; }
.pn-g canvas { width: 96px; height: 96px; flex: none; display: block; }
.pn-gt { min-width: 0; }
.pn-gn { font-size: 30px; line-height: 38px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pn-gs { font-size: 28px; line-height: 34px; color: #ffe9b0; }
.pn-gempty { width: 100%; height: 96px; line-height: 96px; text-align: center; font-size: 30px; color: #9890b6; }
.pn-pet { display: flex; align-items: center; gap: 22px; }
.pn-pet canvas { width: 260px; height: 260px; flex: none; display: block; }
.pn-pt { min-width: 0; flex: 1; }
.pn-pn { font-family: var(--f-title); font-size: 54px; line-height: 66px; font-weight: 800; color: #ffe9a0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: var(--ol); }
.pn-ps { font-size: 36px; line-height: 46px; font-weight: 800; color: #9ff7e0; }
.pn-pl { font-size: 32px; line-height: 44px; color: #f0ecff; }
.pn-bar { position: relative; height: 22px; border-radius: 12px; overflow: hidden; margin: 6px 0 10px; border: 2px solid transparent; background: linear-gradient(180deg, #04050b, #1a1c2c) padding-box, var(--kim-vien) border-box; }
.pn-barf { height: 100%; background: linear-gradient(180deg, rgba(255, 255, 255, .25), rgba(255, 255, 255, 0) 50%), linear-gradient(90deg, #ff8fb0, #ffe08a); transform-origin: 0 50%; }
.pn-big { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; font-size: 34px; font-weight: 800; color: #ddd3f2; margin-bottom: 8px; }
.pn-big .v { font-size: 66px; color: var(--gold); text-shadow: var(--ol); white-space: nowrap; }
.pn-part, .pn-rate { display: grid; grid-template-columns: 250px 1fr 170px; align-items: center; gap: 16px; font-size: 32px; line-height: 54px; }
.pn-part .k, .pn-rate .k { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pn-part .v, .pn-rate .v { text-align: right; font-weight: 800; color: #ffe9b0; }
.pn-part .b, .pn-rate .b { height: 20px; border-radius: 10px; overflow: hidden; border: 2px solid transparent; background: linear-gradient(180deg, #04050b, #1a1c2c) padding-box, var(--kim-vien) border-box; }
.pn-part i, .pn-rate i { display: block; height: 100%; background: linear-gradient(180deg, rgba(255, 255, 255, .25), rgba(255, 255, 255, 0) 50%), linear-gradient(90deg, #c98a2e, #ffe08a); transform-origin: 0 50%; }
.pn-msg { font-size: 34px; line-height: 46px; text-align: center; color: #ece6f6; margin: 6px 0; }
.pn-msg.big { font-size: 46px; line-height: 58px; font-weight: 800; color: #ffe9b0; }
.pn-msg.sub { font-size: 32px; line-height: 42px; font-weight: 800; color: var(--gold); margin: 0 0 8px; }
.pn-msg.buff { font-size: 32px; line-height: 42px; font-weight: 800; color: #ffe08a; background: rgba(255, 200, 60, .14); border-radius: 14px; box-shadow: inset 0 0 0 1px rgba(255, 210, 90, .45); }
.pn-msg.pity { font-size: 30px; line-height: 40px; color: #f3e6ff; margin: 8px 0 0; }
.pn-msg.pity.me { color: #ffe9b0; font-weight: 800; margin-top: 2px; }
.pn-mx { display: grid; gap: 2px 8px; align-items: center; font-size: 28px; line-height: 44px; font-variant-numeric: tabular-nums; }
.pn-mx .h { font-weight: 800; color: #ddd3f2; text-align: right; white-space: nowrap; overflow: hidden; border-bottom: 2px solid rgba(244, 212, 127, .4); }
.pn-mx .k { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pn-mx .v { text-align: right; font-weight: 800; color: #ffe9b0; white-space: nowrap; }
.pn-mx .v.z { color: #6f6890; }
.pn-sp { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.pn-spr { display: flex; justify-content: space-between; font-size: 30px; line-height: 44px; border-bottom: 1px solid rgba(244, 212, 127, .14); }
.pn-spr .k { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pn-spr .v { font-weight: 800; color: #ffe9b0; }

/* ---------- trạng thái ---------- */
#conn { position: absolute; left: 0; right: 0; top: 26px; text-align: center; font-size: 30px; font-weight: 700; color: #ffb3b3; z-index: 60; display: none; text-shadow: var(--ol); }
#conn.bad { display: block; }
#audioHint { position: absolute; left: 0; right: 0; top: 96px; text-align: center; font-size: 28px; color: #ffe9b0; opacity: 0; z-index: 60; text-shadow: var(--ol); transition: opacity .5s; }
#audioHint.on { opacity: .75; }

/* ---------- chuyển động ---------- */
@keyframes pulse { 50% { transform: scale(1.06); } }
@keyframes hintIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { from { background-position: 0 0; } to { background-position: 200% 0; } }
@keyframes ntIn { from { opacity: 0; transform: translateY(-16px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes flIn { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: none; } }
@keyframes rpIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes miniIn { from { opacity: 0; transform: translateY(40px) scale(.5); } to { opacity: 1; transform: none; } }
@keyframes miniOut { to { opacity: 0; transform: translateY(-8px) scale(.9); } }
@keyframes miniFly { from { opacity: .2; transform: translate(var(--fx), var(--fy)) scale(.2); } to { opacity: 1; transform: none; } }
@keyframes flipOpen { from { transform: rotateY(0); } to { transform: rotateY(180deg); } }
@keyframes bob { 50% { transform: translateY(-8px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes cIn { to { opacity: 1; transform: none; } }
@keyframes wcIn { from { opacity: 0; transform: translateX(-140px); } to { opacity: 1; transform: none; } }
@keyframes pnIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes pnT { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes tagIn { from { opacity: 0; transform: scale(1.35); } to { opacity: 1; transform: none; } }
@keyframes wobble { 25% { transform: rotate(-4deg); } 75% { transform: rotate(4deg); } }
@keyframes swapIn { from { opacity: .2; transform: scale(.7); } to { opacity: 1; transform: none; } }
@keyframes popN { 40% { transform: scale(1.18); } }
@keyframes hitPop { from { opacity: .3; transform: scale(1.5); } to { opacity: 1; transform: none; } }

/* lane Q — linh thú sống + nghi thức (public/js/thu_fx.js). Khối riêng, chỉ lớp .tf-*; không sửa dòng phía trên. */

/* lane R */
/* lư luyện khí + nghi thức (js/lo_fx.js): lớp phủ nghi thức (dưới #reveal) và dời màn ra món ở Luyện Khí Lô */

/* =====================================================================================================================
   v5 — trang riêng (lane R, docs/TRANG_RIENG.md mục 1.1): khung trang, linh kiện dùng chung, chuyển cảnh, reveal trong tâm cảnh
   ===================================================================================================================== */
/* trang: phủ toàn sân khấu trong #stage (DOM của trang + sân #tlt) */
.trang { position: absolute; left: 0; top: 0; width: 1080px; height: 1920px; pointer-events: none; }
/* lớp linh kiện trong #hud (z 20, trên canvas rối) */
#ui5 { position: absolute; left: 0; top: 0; width: 1080px; height: 1920px; pointer-events: none; transition: opacity .25s; }
/* đáy 1760–1920: dòng tin 3 dòng + bảng lực chiến 3 dòng; MC đè dải hướng dẫn khi nói */
#bottom::before { content: ""; position: absolute; left: -24px; right: -24px; top: -6px; bottom: -8px; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(14, 9, 8, .55), rgba(14, 9, 8, .78)); border-top: 2px solid rgba(244, 212, 127, .55); }
#rank { padding: 2px 12px 0; }
#rankTitle { height: 32px; line-height: 34px; font-size: 26px; }
/* lane M2: MC không còn đè dải CÁCH CHƠI (phụ đề MC thay chỗ bảng lực chiến ở đáy phải — khối lane M2 cuối tệp) */
#mc { background: var(--dem); }
#mcText { -webkit-line-clamp: 2; }

/* ---------- TM.GiftPanel (gift_panel.js): 0, 1500, 1080 × 140 ---------- */
.gp { position: absolute; box-sizing: border-box; pointer-events: none; color: #f3ead6; font-weight: 700;
  background: linear-gradient(180deg, rgba(24, 14, 10, .92), rgba(12, 8, 6, .95)); border-top: 2px solid rgba(244, 212, 127, .8); border-bottom: 2px solid rgba(244, 212, 127, .35); }
.gp-pg { position: absolute; inset: 0; display: flex; align-items: stretch; gap: 6px; padding: 8px 8px 6px; box-sizing: border-box; opacity: 0; visibility: hidden; transition: opacity .45s, visibility 0s .45s; }
.gp-pg.on { opacity: 1; visibility: visible; transition: opacity .45s; }
.gp-ic { display: inline-block; width: 30px; height: 30px; vertical-align: -7px; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .6)); }
.gp-ic.sm { width: 26px; height: 26px; vertical-align: -5px; }
.gp-ic.big { width: 52px; height: 52px; display: block; margin: 0 auto 2px; }
.gp-hd { flex: none; width: 92px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; line-height: 28px; }
.gp-hd b { font-family: var(--f-title); font-size: 28px; color: #ffe08a; text-shadow: var(--ol); letter-spacing: 1px; }
.gp-hd span { font-size: 26px; color: #e8dcc0; text-shadow: var(--ol); }
.gp-c { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 12px; text-align: center;
  background: linear-gradient(180deg, rgba(70, 48, 30, .55), rgba(28, 18, 12, .7)); box-shadow: inset 0 0 0 2px rgba(244, 212, 127, .38); }
.gp-c.best { flex-grow: 1.6; background: linear-gradient(180deg, rgba(140, 92, 20, .72), rgba(60, 30, 8, .82)); box-shadow: inset 0 0 0 3px #ffd257, 0 0 18px rgba(255, 200, 70, .55); }
.gp-rb { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); padding: 0 12px; height: 28px; line-height: 29px; border-radius: 14px; font-style: normal;
  font-size: 24px; font-weight: 800; color: #3a1a06; white-space: nowrap; background: linear-gradient(180deg, #fff1c4, #e8b45e); box-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
.gp-l1 { white-space: nowrap; line-height: 34px; }
.gp-l1 b { font-size: 30px; font-weight: 800; color: #ffe08a; text-shadow: var(--ol); margin-left: 4px; font-variant-numeric: tabular-nums; }
.gp-l2, .gp-l3 { max-width: 100%; font-size: 26px; line-height: 30px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: var(--ol); }
.gp-l2 { color: #fff6e0; }
.gp-l3 { font-weight: 800; color: #e8dcc0; }
.gp-c.best .gp-l1 b { font-size: 34px; color: #fff3c4; }
/* lane M (TRANG_RIENG 3.1): đàn tướng nổi bật thêm bậc "chắc Thần" (199) — khung tím màu phẩm Thần + nhãn CHẮC THẦN */
.gp-c.hot { flex-grow: 1.25; background: linear-gradient(180deg, rgba(104, 52, 150, .74), rgba(40, 16, 66, .84)); box-shadow: inset 0 0 0 3px #c48cff, 0 0 16px rgba(190, 120, 255, .55); }
.gp-c.hot .gp-l1 b { font-size: 32px; color: #f6e6ff; }
.gp-rb.hot { color: #2a0d44; background: linear-gradient(180deg, #f6e4ff, #c08cf5); }
.gp-b { flex-direction: column; justify-content: center; gap: 2px; padding: 6px 18px; }
.gp-b1 { display: flex; align-items: center; gap: 12px; font-size: 27px; line-height: 40px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: var(--ol); }
.gp-b1 .gp-ic { width: 36px; height: 36px; flex: none; }
.gp-b1 span { overflow: hidden; text-overflow: ellipsis; }
/* người vừa tặng (8 s): đè nửa trái */
.gp-pity { position: absolute; left: 0; top: 0; bottom: 0; width: 556px; display: flex; align-items: center; gap: 14px; padding: 0 14px; box-sizing: border-box; z-index: 2; overflow: hidden;
  background: linear-gradient(90deg, rgba(40, 14, 60, .99) 94%, rgba(40, 14, 60, .9)); box-shadow: 4px 0 0 rgba(244, 212, 127, .7), 10px 0 18px rgba(0, 0, 0, .6); opacity: 0; transform: translateX(-40px); transition: opacity .3s, transform .3s; }
.gp-pity.on { opacity: 1; transform: none; }
.gp-pity .av { flex: none; box-shadow: 0 0 0 3px #ffd257; }
.gp-pt { min-width: 0; flex: 1; }
.gp-pn { font-size: 26px; line-height: 32px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: var(--ol); color: #f3ead6; }
.gp-pn b { color: #ffe08a; }
.gp-pm { font-size: 28px; line-height: 36px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: var(--ol); }
.gp-bar { position: relative; height: 28px; border-radius: 14px; overflow: hidden; margin-top: 2px; background: rgba(0, 0, 0, .55); box-shadow: inset 0 0 0 2px rgba(244, 212, 127, .6); }
.gp-bar i { position: absolute; inset: 0; transform-origin: 0 50%; background: linear-gradient(90deg, #8b4fd6, #e6a1ff); }
.gp-bar span { position: relative; display: block; text-align: right; padding: 0 12px; font-size: 24px; line-height: 28px; font-weight: 800; color: #fff; text-shadow: var(--ol); }
.gp-pet .gp-bar i { background: linear-gradient(90deg, #2bbf9a, #9ff7e0); }
.gp-buff { position: absolute; right: 12px; top: -30px; height: 30px; line-height: 31px; padding: 0 14px; border-radius: 10px 10px 0 0; font-size: 24px; font-weight: 800; color: #3a1a06;
  background: linear-gradient(180deg, #fff1c4, #e8b45e); display: none; }
.gp.buff .gp-buff { display: block; }

/* ---------- TM.GuidePanel (guide_panel.js): 0, 1640, 1080 × 120 — #cachChoi giữ id cũ cho bài kiểm ---------- */
.gd { position: absolute; box-sizing: border-box; display: flex; align-items: stretch; gap: 8px; padding: 6px 10px 6px; pointer-events: none; transition: opacity .3s, transform .3s;
  background: linear-gradient(180deg, rgba(14, 10, 30, .9), rgba(10, 8, 24, .94)); border-bottom: 2px solid rgba(244, 212, 127, .45); }
/* lane M2: bảng thông tin (.pn, 931–1531 sau zoom) không chạm dải này — với 80 người bảng hiện ~76 % thời gian nên ẩn hẳn (.an = 0) làm
   CÁCH CHƠI chỉ đọc được ~24 %; nay chỉ dịu đi (0,85) để mắt vẫn về bảng mà chữ vẫn đọc được */
.gd.an { opacity: .85; }
/* lane M2 (đề nghị lane PN): lớp ghép riêng suốt đời — .an mờ / hiện không nhập-tách lớp gộp ::after toàn màn của HUD (raster lại 1080×1920) */
.gd { will-change: opacity; }
.gd-h { flex: none; width: 140px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 10px; text-align: center;
  background: linear-gradient(180deg, #fff1c4, #e8b45e); color: #3a1a06; }
.gd-h b { font-family: var(--f-title); font-size: 28px; line-height: 34px; font-weight: 800; letter-spacing: 1px; }
.gd-h span { font-size: 24px; line-height: 28px; font-weight: 700; }
.gd-b { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: 1fr 1fr; gap: 4px 6px; }
.gd-c { min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 0 10px; border-radius: 8px; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(244, 212, 127, .3); }
.gd-c b { font-size: 26px; line-height: 27px; font-weight: 800; color: #ffd77a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 2px 0 var(--ink); }
.gd-c span { font-size: 24px; line-height: 25px; font-weight: 700; color: #f3ead6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 2px 0 var(--ink); }
.gd-c.dau { background: linear-gradient(180deg, rgba(255, 200, 80, .32), rgba(150, 90, 20, .32)); box-shadow: inset 0 0 0 2px #ffd257, 0 0 12px rgba(255, 200, 70, .45); }
.gd-c.dau b { color: #fff3a0; }

/* ---------- TM.PhaseFeed (phase_feed.js): 12, 986, 760 × 100 — 3 dòng ---------- */
.pf { position: absolute; display: flex; flex-direction: column; justify-content: flex-start; gap: 2px; pointer-events: none; overflow: hidden; }
.pf-r { flex: none; display: flex; align-items: center; gap: 8px; height: 31px; max-width: 100%; padding: 0 16px 0 4px; box-sizing: border-box; border-radius: 16px; align-self: flex-start;
  background: linear-gradient(90deg, rgba(14, 9, 8, .82), rgba(14, 9, 8, .55) 80%, rgba(14, 9, 8, 0)); animation: pfIn .3s ease-out; transition: opacity .8s; }
.pf-r .av { flex: none; width: 26px !important; height: 26px !important; }
.pf-t { font-size: 24px; line-height: 30px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 2px 0 var(--ink), 1px 0 0 var(--ink), -1px 0 0 var(--ink); }
.pf-r.hi { box-shadow: inset 0 0 0 2px rgba(255, 215, 120, .55); }
.pf-r.old { opacity: 0; }
@keyframes pfIn { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: none; } }

/* ---------- chuyển cảnh 0,6 s giữa hai trang ---------- */
#chuyenCanh { position: absolute; inset: 0; z-index: 44; pointer-events: none; display: none;
  background: radial-gradient(ellipse 70% 40% at 50% 46%, rgba(255, 246, 214, .98), rgba(255, 214, 120, .95) 45%, rgba(150, 92, 20, .94) 100%); }
#chuyenCanh.on { display: block; animation: ccMan .6s ease-in-out forwards; }
.cc-ten { position: absolute; left: 0; right: 0; top: 800px; text-align: center; font-family: var(--f-title); font-weight: 800; font-size: 112px; line-height: 140px; letter-spacing: 6px;
  color: #fff8e2; text-shadow: var(--ol3), 0 6px 0 #6b3a08, 0 0 36px rgba(120, 50, 0, .9), 0 0 70px rgba(255, 190, 60, .8); white-space: nowrap; }
#chuyenCanh.on .cc-ten { animation: ccTen .6s ease-out forwards; }
@keyframes ccMan { 0% { opacity: 0; } 38% { opacity: 1; } 55% { opacity: 1; } 100% { opacity: 0; } }
@keyframes ccTen { 0% { transform: scale(.6); opacity: 0; } 35% { transform: scale(1.04); opacity: 1; } 70% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.08); opacity: 0; } }

/* ---------- kết quả lớn trong tâm cảnh (reveal.js v5): hộp cắt + .rv thu theo khung ---------- */
.rv-box { position: absolute; left: 0; top: 0; width: 1080px; height: 1920px; overflow: hidden; pointer-events: none; }
.rv-box > .rv { right: auto; bottom: auto; width: 1080px; height: 1920px; transform-origin: 0 0; }
/* thu vào khung: lớp tối là hình Egret dưới rối (DOM .rv-dim trong suốt để không phủ lên rối); chữ nhỏ phóng to lại (≥ 22 px sau khi thu ≈ 0,58) */
.rv.cs.eg .rv-dim, .rv.cs.eg.in .rv-dim { background: rgba(3, 2, 10, 0); }
.rv.cs.in .rv-rays { opacity: .16; }
.rv.cs .rv-name .s, .rv.cs .rv-wx, .rv.cs .rv-pt, .rv.cs .rv-pity, .rv.cs .rv-more, .rv.cs .rv-champ .cr, .rv.cs.skh .rv-name .q { font-size: 40px; line-height: 48px; }
.rv.cs .rv-cl, .rv.cs .rv-gc .gn, .rv.cs .rv-gc .gr { font-size: 38px; line-height: 42px; }
.rv.cs .rv-pt { top: 150px; }

/* lane M2: host nạp trước của trang kế (router stages.js, 20 s cuối pha) — dựng ẩn, không vẽ, không nhận chuột */
.trang.trang-nap { visibility: hidden; opacity: 0; pointer-events: none; }

/* lane M2: PHỤ ĐỀ MC thay chỗ BẢNG LỰC CHIẾN (đáy phải 650–1056 × 1764–1914, cùng khung tips) khi MC nói. Trước: #mc 1650–1750 đè dải
   CÁCH CHƠI 1640–1760 và ẩn nó (80 người: MC nói gần liên tục → CÁCH CHƠI hầu như không đọc được). Bảng lực chiến ẩn trong lúc MC nói
   (ba người đầu vẫn đứng trên sân: rối + huy chương + danh hiệu); dòng tin + trả lời riêng (đáy trái) giữ nguyên 3 dòng. */
#mc { left: 650px; right: 24px; top: 1764px; height: 150px; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0;
  padding: 2px 12px 2px; border-radius: 12px; border: 2px solid transparent; border-image: var(--khung); background: var(--van), var(--dem); transform: translateY(6px); }
#mc.on { transform: none; }
/* lớp ghép riêng nhỏ (406×150): MC bật / tắt mỗi ~5 s với 80 người — trước đây #mc mở một lớp gộp (Overlap) 1080×1926 vẽ lại 10 lần / 4 s
   (var/e2e/m2/lop_sau.txt), cùng cách lane PN làm cho .pn */
#mc { will-change: transform, opacity; contain: layout style; }
#mcName { align-self: center; font-size: 26px; line-height: 14px; border-width: 10px 16px; margin: 0 0 3px; }
#mcText { font-size: 24px; line-height: 25px; -webkit-line-clamp: 4; }
#rank { transition: visibility 0s; }
body.mc-on #rank { visibility: hidden; transition: visibility 0s .3s; }

/* =====================================================================================================================
   v6 — vùng an toàn TikTok (lane S6, docs/TRANG_RIENG.md mục 7): chữ cần đọc chỉ trong y 120–1320. body.bc-v6 do hud.js đặt khi
   TM.LAYOUT.v === 6 (?bocuc=v5 giữ bố cục cũ). 0–120 chỉ trang trí mờ · HUD 120–250 · lệnh chạy 250–290 · dải thẻ 290–380 ·
   hộp CÁCH CHƠI / QUÀ dọc 320 × 250 ở 640–890 · dưới 1320 chỉ dòng tin + bảng lực chiến (bị bình luận che — chấp nhận).
   ===================================================================================================================== */
body.bc-v6 #hdr { height: 290px; }
body.bc-v6 #hdr::before { height: 300px; background: linear-gradient(180deg, rgba(12, 6, 4, .45), rgba(12, 6, 4, .6) 40%, rgba(12, 6, 4, .55) 88%, rgba(12, 6, 4, 0)); }
/* logo nhỏ mờ trong dải trang trí (TikTok che tên kênh + viên xếp hạng ở 0–110) */
body.bc-v6 #title.logo { top: 8px; left: 16px; width: 112px; height: 100px; line-height: 100px; opacity: .5; }
body.bc-v6 #title { top: 30px; opacity: .5; }
body.bc-v6 #phaseRow { left: 0; top: 128px; height: 72px; gap: 12px; }
body.bc-v6 #phaseRow::before { top: -10px; }
body.bc-v6 #phaseBox::before { top: 12px; }
body.bc-v6 #phaseName { font-size: 50px; line-height: 48px; }
body.bc-v6 #phaseNext { font-size: 22px; line-height: 24px; }
body.bc-v6 #clock { width: 214px; height: 72px; margin-right: 18px; font-size: 64px; line-height: 70px; }
body.bc-v6 #clock::before { top: -22px; }
body.bc-v6 #goals { top: 202px; height: 48px; }
/* dòng lệnh chạy ngang 250–290 (chữ 26 px) + thông báo ngắn đè đúng dải này */
body.bc-v6 #ticker { top: 250px; height: 40px; }
body.bc-v6 .tk-track, body.bc-v6 .tk-run { height: 40px; }
body.bc-v6 .tk-run { font-size: 26px; line-height: 40px; }
body.bc-v6 #notice { top: 250px; height: 40px; }
body.bc-v6 .nt { height: 40px; font-size: 28px; line-height: 40px; }
/* thẻ chào / trả lời riêng / phụ đề MC cũ: thay bằng dải thẻ #the */
body.bc-v6 #welcome, body.bc-v6 #replies, body.bc-v6 #mc { display: none !important; }
body.bc-v6.mc-on #rank { visibility: visible; }

/* ---------- dải thẻ 290–380: người mới / trả lời riêng / MC (hud.js pumpCards) ---------- */
#the { position: absolute; left: 0; top: 290px; width: 1080px; height: 90px; z-index: 40; pointer-events: none; will-change: opacity; contain: layout style; transition: opacity .25s; }
body.rv-full #the { opacity: 0; visibility: hidden; transition: none; }
body.bc-v6 #hint { left: 24px; right: 24px; top: 20px; height: 50px; line-height: 52px; font-size: 34px; }
.cd { position: absolute; left: 0; top: 0; width: 1080px; height: 90px; box-sizing: border-box; display: flex; align-items: center; gap: 14px; padding: 2px 24px 8px 18px; overflow: hidden;
  background: rgba(10, 6, 14, .82); border-top: 2px solid rgba(244, 212, 127, .8); border-bottom: 2px solid rgba(244, 212, 127, .45); animation: cdIn .35s ease-out; }
.cd.out { opacity: 0; transition: opacity .35s; }
.cd .av { flex: none; box-shadow: 0 0 0 3px #ffd257; }
.cd-t { flex: 1; min-width: 0; font-size: 30px; line-height: 36px; font-weight: 700; color: #fff6e0; text-shadow: var(--ol);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; }
.cd-t b { color: #ffe08a; font-weight: 800; }
.cd-t .go { color: #8dffb8; font-weight: 800; }
.cd-wc.new { background: linear-gradient(90deg, rgba(12, 66, 44, .9), rgba(8, 26, 22, .82)); }
.cd-wc.ret { background: linear-gradient(90deg, rgba(60, 36, 100, .9), rgba(18, 10, 38, .82)); }
.cd-avs { flex: none; display: flex; }
.cd-avs .av { margin-left: -16px; }
.cd-avs .av:first-child { margin-left: 0; }
.cd-rp .cd-t, .cd-mc .cd-t { font-size: 28px; line-height: 34px; }
.cd-rp.guide { background: linear-gradient(90deg, rgba(96, 62, 8, .9), rgba(32, 18, 6, .82)); }
.cd-rp.tone-warn .cd-t b { color: #ffc58a; }
.cd-mc .cd-t { font-weight: 600; }
.cd-mcn { flex: none; font-family: var(--f-title); font-weight: 800; font-size: 28px; line-height: 16px; letter-spacing: 1px; color: #fff4dc; padding: 0 4px;
  border: 0 solid transparent; border-width: 12px 18px; border-image: url(../art/ui/common/sys_icon_hdlt.png) 15 18 fill / 12px 18px stretch; text-shadow: 0 2px 0 #4a0e08; }
.cd-bar { position: absolute; left: 0; bottom: 0; width: 1080px; height: 6px; transform-origin: 0 50%; background: linear-gradient(90deg, #ffd257, #fff3c4); animation: cdBar 6s linear forwards; }
@keyframes cdBar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes cdIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }

/* ---------- hộp QUÀ dọc (GiftPanel .gp-doc) 750–1070 × 640–890: 3 bậc nổi bật + người vừa tặng → nhận gì ---------- */
.gp.gp-doc { border: 2px solid rgba(244, 212, 127, .8); border-radius: 14px; background: linear-gradient(180deg, rgba(24, 14, 10, .74), rgba(12, 8, 6, .8)); }
.gp-doc .gp-pg { flex-direction: column; align-items: stretch; gap: 4px; padding: 4px 8px 8px; }
.gp-dh { flex: none; display: flex; align-items: center; justify-content: center; gap: 8px; height: 36px; border-bottom: 1px solid rgba(244, 212, 127, .45);
  font-family: var(--f-title); font-size: 26px; line-height: 36px; color: #ffe08a; text-shadow: var(--ol); white-space: nowrap; }
.gp-dh b { font-weight: 800; letter-spacing: 1px; }
.gp-dr { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; justify-content: center; padding: 0 8px; border-radius: 10px;
  background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(244, 212, 127, .3); }
.gp-dr.hot { background: linear-gradient(180deg, rgba(104, 52, 150, .62), rgba(40, 16, 66, .72)); box-shadow: inset 0 0 0 2px #c48cff; }
.gp-dr.best { background: linear-gradient(180deg, rgba(140, 92, 20, .66), rgba(60, 30, 8, .76)); box-shadow: inset 0 0 0 2px #ffd257, 0 0 12px rgba(255, 200, 70, .45); }
.gp-d1 { display: flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; font-size: 26px; line-height: 32px; text-shadow: var(--ol); color: #fff6e0; }
.gp-d1 b { font-size: 30px; font-weight: 800; color: #ffe08a; font-variant-numeric: tabular-nums; margin-right: 6px; }
.gp-dr.best .gp-d1 b { color: #fff3c4; }
.gp-d2 { font-size: 26px; line-height: 30px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: var(--ol); color: #e8dcc0; }
.gp-doc .gp-b { justify-content: flex-start; gap: 6px; padding: 4px 10px 8px; }
.gp-doc .gp-b1 { align-items: flex-start; gap: 8px; font-size: 26px; line-height: 31px; white-space: normal; overflow: visible; }
.gp-doc .gp-b1 .gp-ic { width: 30px; height: 30px; margin-top: 1px; }
.gp-doc .gp-b1 span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; }
.gp-doc .gp-pity { display: block; left: 0; right: 0; top: 40px; bottom: 0; width: auto; padding: 6px 10px; border-radius: 0 0 12px 12px;
  background: #280d3c; box-shadow: 0 -3px 0 rgba(244, 212, 127, .7); transform: translateY(16px); }
.gp-doc .gp-pity.on { transform: none; }
.gp-doc .gp-pity .av { float: left; margin: 4px 8px 0 0; }
.gp-doc .gp-pn { font-size: 26px; line-height: 32px; }
.gp-doc .gp-pm { font-size: 26px; line-height: 31px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; clear: left; }
.gp-doc .gp-bar { margin-top: 4px; }
.gp-doc .gp-bar span { font-size: 22px; }
.gp-doc .gp-buff { right: 10px; top: -32px; }

/* ---------- hộp CÁCH CHƠI dọc (GuidePanel .gd-doc) 10–330 × 640–890: 5 dòng "LỆNH việc" chữ 26 px ---------- */
.gd.gd-doc { flex-direction: column; gap: 4px; padding: 4px 8px 8px; border: 2px solid rgba(244, 212, 127, .7); border-radius: 14px;
  background: linear-gradient(180deg, rgba(14, 10, 30, .74), rgba(10, 8, 24, .8)); }
.gd-doc .gd-h { width: auto; height: 36px; flex: none; flex-direction: row; gap: 10px; border-radius: 8px; }
.gd-doc .gd-h b { font-size: 26px; line-height: 36px; }
.gd-doc .gd-h span { font-size: 22px; line-height: 36px; }
.gd-doc .gd-b { display: flex; flex-direction: column; gap: 3px; }
.gd-doc .gd-c { flex: 1 1 0; min-height: 0; flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; padding: 0 8px; }
.gd-doc .gd-c b { flex: none; max-width: 200px; font-size: 26px; line-height: 30px; overflow: hidden; text-overflow: ellipsis; }
.gd-doc .gd-c span { flex: 1; min-width: 0; font-size: 22px; line-height: 30px; }

/* ---------- bảng thông tin (#panel .pn, panels.js): đáy bảng ở 1320 (trên vùng bình luận), mọc lên trên; zoom .79 → bottom 760 = 600 px ---------- */
body.bc-v6 .pn { top: auto; bottom: 760px; max-height: 700px; }
/* v6: có trận → hộp CÁCH CHƠI / QUÀ nhường chỗ cho bảng đấu trường */
.gp-doc.tran, .gd-doc.tran { opacity: 0; visibility: hidden; transition: opacity .25s, visibility 0s .25s; }
/* v6: màn kết quả thường diễn trong 380–1320 (đè cả sân) → dải hoạt động + bong bóng sân ẩn trong lúc diễn (lớp tối Egret nằm dưới chúng) */
body.bc-v6.rv-on #ui5 .pf, body.bc-v6.rv-on .ts-bubs { opacity: 0; transition: opacity .2s; }

/* =====================================================================================================================
   lane D1 (docs/GIU_CHAN.md mục 3–4): thẻ 2 dòng ở dải 290–380 (nhập môn · bước tân thủ · xong Tân Tú · quà online · "đã về" có
   quà vắng mặt / điểm danh chuỗi), 3 ô tiến độ chuỗi tân thủ, dòng mục tiêu cá nhân trong thẻ trả lời, chữ "LƯỢT ĐẦU MAY MẮN",
   màn boss "Yêu thú xâm nhập" (#bossUi, boss_ui.js) trong tâm cảnh 380–900.
   ===================================================================================================================== */
.cd2 .cd-tx, .cd-rp.has-goal .cd-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.cd-tx .cd-t { flex: none; }
.cd-l1 { display: block; font-size: 30px; line-height: 36px; font-weight: 700; color: #fff6e0; text-shadow: var(--ol); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-l1 b { color: #ffe08a; font-weight: 800; }
.cd-l1 .hn { font-weight: 800; }
.cd-l2 { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 24px; line-height: 32px; font-weight: 700; color: #e9f3ee; text-shadow: var(--ol); white-space: nowrap; overflow: hidden; }
.cd-l2 .go { color: #8dffb8; font-weight: 800; overflow: hidden; text-overflow: ellipsis; }
.tt-os { flex: none; display: flex; gap: 6px; }
.tt-o { flex: none; height: 30px; padding: 0 10px; border-radius: 15px; font-size: 22px; line-height: 30px; font-weight: 800; color: #c9d1dc; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .28); }
.tt-o.on { color: #04281a; text-shadow: none; background: linear-gradient(180deg, #b4ffd8, #3ad692); box-shadow: 0 0 10px rgba(90, 255, 170, .55); }
.tt-o.hot { animation: ttHot .45s ease-out 3; }
@keyframes ttHot { 50% { scale: 1.18; box-shadow: 0 0 22px rgba(140, 255, 200, .95); } }
.cd-tt.nhap { background: linear-gradient(90deg, rgba(14, 74, 50, .94), rgba(8, 30, 24, .86)); border-top-color: #8dffb8; }
.cd-tt.buoc { background: linear-gradient(90deg, rgba(10, 58, 66, .92), rgba(8, 24, 30, .84)); }
.cd-tt.xong { background: linear-gradient(90deg, rgba(120, 78, 10, .94), rgba(44, 24, 6, .86)); border-top-color: #ffd257; }
.cd-tt.xong .tt-ten { color: #fff3c4; text-shadow: 0 0 10px rgba(255, 210, 90, .9), var(--ol); }
.cd-tt.qo { background: linear-gradient(90deg, rgba(10, 70, 76, .92), rgba(6, 24, 30, .84)); }
.cd-tt.qo .cd-l2 .go { color: #ffe08a; }
.cd-rp.has-goal { padding-top: 0; padding-bottom: 6px; }
.cd-rp.has-goal.g1 .cd-t { font-size: 28px; line-height: 34px; -webkit-line-clamp: 1; }
.cd-rp.has-goal.g2 .cd-t { font-size: 24px; line-height: 26px; }
.cd-goal { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 22px; line-height: 26px; font-weight: 800; color: #9dffd0; text-shadow: var(--ol); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-rp.has-goal.g2 .cd-goal { line-height: 24px; }
.cd-goal .tt-o { height: 24px; line-height: 24px; font-size: 20px; padding: 0 8px; }

/* "LƯỢT ĐẦU MAY MẮN" (reveal.js, lớp #reveal): đầu tâm cảnh, trên kết quả */
.rv-lucky { position: absolute; left: 140px; width: 800px; height: 100px; z-index: 60; pointer-events: none; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(ellipse 50% 60% at 50% 50%, rgba(80, 40, 0, .82), rgba(40, 18, 0, .55) 62%, rgba(0, 0, 0, 0) 100%); animation: rvLuckyIn .5s cubic-bezier(.2, 1.4, .4, 1); transition: opacity .4s; }
.rv-lucky b { font-family: var(--f-title); font-size: 54px; line-height: 58px; font-weight: 800; letter-spacing: 3px; color: #ffe27a; text-shadow: 0 0 18px rgba(255, 200, 60, .9), 0 3px 0 #6a3a00, var(--ol); white-space: nowrap; }
.rv-lucky span { font-size: 26px; line-height: 32px; font-weight: 800; color: #fff6e0; text-shadow: var(--ol); white-space: nowrap; }
.rv-lucky span i { font-style: normal; }
.rv-lucky.out { opacity: 0; }
@keyframes rvLuckyIn { from { opacity: 0; scale: .5; } to { opacity: 1; scale: 1; } }

/* ---------- boss "Yêu thú xâm nhập" (#bossUi trong #hud, trên #ui5; rối + màn tối ở lớp Egret 'front' cắt theo tâm cảnh) ---------- */
#bossUi { position: absolute; left: 0; width: 1080px; z-index: 16; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .35s; contain: layout style; }
#bossUi.in { opacity: 1; }
#bossUi.out { opacity: 0; }
.bs-top { position: absolute; left: 0; top: 6px; width: 1080px; height: 48px; display: flex; align-items: center; gap: 14px; padding: 0 22px; box-sizing: border-box; }
.bs-ttl { flex: none; font-family: var(--f-title); font-size: 36px; line-height: 44px; font-weight: 800; letter-spacing: 1px; color: #ff6b6b; text-shadow: 0 0 12px rgba(255, 60, 60, .8), var(--ol); animation: bsBlink 1.1s ease-in-out infinite; }
.bs-nm { flex: 1; min-width: 0; font-size: 30px; line-height: 40px; font-weight: 800; color: #ffe08a; text-shadow: var(--ol); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bs-clock { flex: none; min-width: 124px; height: 44px; border-radius: 12px; text-align: center; font-size: 38px; line-height: 42px; font-weight: 800; font-variant-numeric: tabular-nums; color: #fff8e0; background: rgba(40, 8, 10, .88); border: 2px solid #ff8a6a; text-shadow: var(--ol); }
.bs-clock.low { color: #ff8080; animation: bsBlink .6s ease-in-out infinite; }
.bs-hp { position: absolute; left: 60px; top: 60px; width: 960px; height: 40px; border-radius: 20px; overflow: hidden; background: rgba(20, 6, 8, .88); box-shadow: 0 0 0 3px #ffd257, 0 4px 12px rgba(0, 0, 0, .6); }
.bs-hp i { position: absolute; left: 0; top: 0; width: 100%; height: 100%; transform-origin: 0 50%; }
.bs-tr { background: #fff0c8; opacity: .85; }
.bs-fl { background: linear-gradient(180deg, #ff7a6a, #d8142a 60%, #9a0018); }
.bs-hp b { position: absolute; left: 0; right: 0; top: 0; text-align: center; font-size: 28px; line-height: 40px; font-weight: 800; color: #fff; text-shadow: var(--ol); }
#bossUi.low .bs-fl { animation: bsBlink .5s ease-in-out infinite; }
.bs-call { position: absolute; left: 220px; top: 106px; width: 640px; text-align: center; transition: opacity .3s; }
.bs-call b { display: block; font-family: var(--f-title); font-size: 46px; line-height: 52px; font-weight: 800; letter-spacing: 2px; color: #fff; text-shadow: 0 0 16px rgba(255, 110, 150, .95), var(--ol); animation: bsPulse 1s ease-in-out infinite; }
.bs-call span { display: block; font-size: 24px; line-height: 30px; font-weight: 700; color: #ffd1dc; text-shadow: var(--ol); }
.bs-box { position: absolute; top: 232px; width: 290px; height: 236px; box-sizing: border-box; padding: 6px 10px 8px; border-radius: 14px; border: 2px solid rgba(255, 150, 120, .75);
  background: linear-gradient(180deg, rgba(40, 10, 14, .84), rgba(18, 6, 8, .88)); }
.bs-box.l { left: 12px; }
.bs-box.r { right: 12px; }
.bs-bh { height: 36px; font-family: var(--f-title); font-size: 26px; line-height: 36px; font-weight: 800; text-align: center; color: #ffe08a; border-bottom: 1px solid rgba(255, 200, 140, .45); text-shadow: var(--ol); white-space: nowrap; }
.bs-rows { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; }
.bs-r { display: flex; align-items: center; gap: 8px; height: 50px; }
.bs-i { flex: none; width: 28px; text-align: center; font-size: 28px; line-height: 32px; font-weight: 800; color: #ffd257; text-shadow: var(--ol); }
.bs-r.r2 .bs-i { color: #e4ecff; }
.bs-r.r3 .bs-i { color: #f0a060; }
.bs-r .av { flex: none; }
.bs-n { flex: 1; min-width: 0; font-size: 24px; line-height: 30px; font-weight: 800; color: #fff6e0; text-shadow: var(--ol); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bs-v { flex: none; font-size: 24px; line-height: 30px; font-weight: 800; color: #ff9db4; text-shadow: var(--ol); font-variant-numeric: tabular-nums; }
.bs-empty { padding-top: 40px; text-align: center; font-size: 24px; line-height: 32px; font-weight: 700; color: #ffd1dc; text-shadow: var(--ol); white-space: normal; }
.bs-rw { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; height: 180px; text-align: center; }
.bs-rw b { font-size: 32px; line-height: 38px; font-weight: 800; color: #ffe08a; text-shadow: var(--ol); }
.bs-rw span { font-size: 24px; line-height: 30px; font-weight: 700; color: #fff0e0; text-shadow: var(--ol); }
.bs-rw .top1 { color: #ffd1dc; }
.bs-fx { position: absolute; left: 0; top: 0; width: 1080px; height: 100%; }
.bs-num { position: absolute; font-family: var(--f-title); font-size: 44px; line-height: 48px; font-weight: 800; color: #fff3c4; text-shadow: 0 0 10px rgba(255, 60, 90, .9), var(--ol); animation: bsNum 1s ease-out forwards; }
.bs-num.crit { font-size: 58px; line-height: 62px; color: #ffd257; }
.bs-end { position: absolute; left: 140px; top: 112px; width: 800px; text-align: center; opacity: 0; transform: scale(.6); transition: opacity .3s, transform .45s cubic-bezier(.2, 1.4, .4, 1); }
.bs-end.on { opacity: 1; transform: none; }
.bs-end b { display: block; font-family: var(--f-title); font-size: 64px; line-height: 72px; font-weight: 800; letter-spacing: 2px; color: #ffe27a; white-space: nowrap; text-shadow: 0 0 20px rgba(255, 200, 60, .95), 0 4px 0 #6a2a00, var(--ol); }
.bs-end span { display: block; margin-top: 6px; font-size: 30px; line-height: 38px; font-weight: 800; color: #fff6e0; text-shadow: var(--ol); }
#bossUi.lost .bs-end b { color: #d0d6e0; text-shadow: 0 0 14px rgba(120, 140, 170, .8), var(--ol); }
#bossUi.won .bs-call, #bossUi.lost .bs-call { opacity: 0; }
@keyframes bsBlink { 50% { opacity: .55; } }
@keyframes bsPulse { 50% { scale: 1.06; } }
@keyframes bsNum { 0% { opacity: 0; transform: translateY(20px) scale(.6); } 20% { opacity: 1; transform: translateY(0) scale(1.1); } 100% { opacity: 0; transform: translateY(-70px) scale(1); } }
/* boss đang chiếm tâm cảnh: hộp CÁCH CHƠI / QUÀ + phần DOM tâm cảnh của trang trong #ui5 (trừ dải hoạt động) ẩn; tâm pha mặc định ẩn */
body.boss-on #ui5 > *:not(.pf) { opacity: 0 !important; visibility: hidden; transition: opacity .25s, visibility 0s .25s; }
body.boss-on #dai .dai-pha { opacity: 0; visibility: hidden; }

/* ---------- màn mở màn (mo_man.js, 29/11): tranh login_ini phóng chậm trong #reveal (z 40), logo + 2 dòng chữ, mờ vào 0,5 s / ra 0,6 s ---------- */
.mm { position: absolute; inset: 0; background: #05030c; opacity: 0; animation: mmIn .5s ease-out forwards; pointer-events: none; overflow: hidden; --mmd: 10000ms; }
.mm.out { animation: mmOut .6s ease-in forwards; }
.mm-anh { position: absolute; left: 0; top: 0; width: 1080px; height: 1920px; object-fit: cover; display: block; transform-origin: 50% 40%; animation: mmZoom var(--mmd) linear forwards; }
.mm-sang { position: absolute; inset: 0; background: radial-gradient(ellipse 60% 35% at 50% 18%, rgba(255, 246, 214, .55), rgba(255, 214, 120, 0) 70%), linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(5, 3, 12, .85) 100%); animation: mmSang 2.4s ease-in-out infinite alternate; }
.mm-chu { position: absolute; left: 0; right: 0; top: 1240px; text-align: center; opacity: 0; animation: mmChu 1.2s ease-out 1s forwards; }
.mm-logo { font-family: var(--f-title); font-weight: 800; font-size: 150px; line-height: 170px; letter-spacing: 8px; color: #fff3c4; text-shadow: var(--ol3), 0 6px 0 #6b3a08, 0 0 40px rgba(255, 190, 60, .9); }
.mm-logo.logo { height: 230px; font-size: 0; color: transparent; background: url(../art/ui/login/kj_logo_fzzg3_vang.png) center / contain no-repeat; }
.mm-l1 { margin-top: 18px; font-family: var(--f-title); font-size: 56px; line-height: 70px; font-weight: 800; color: #ffe9b0; text-shadow: var(--ol3); }
.mm-l2 { margin-top: 8px; font-size: 38px; line-height: 50px; font-weight: 700; color: #e6dcff; text-shadow: var(--ol); }
@keyframes mmIn { to { opacity: 1; } }
@keyframes mmOut { to { opacity: 0; } }
@keyframes mmZoom { from { transform: scale(1); } to { transform: scale(1.08); } }
@keyframes mmSang { from { opacity: .7; } to { opacity: 1; } }
@keyframes mmChu { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
