/* UR Limited — nút HUD, popup "sắp mở", banner Sàn Diễn Đêm, mở quà.
 * Ngôn ngữ hình ảnh lấy từ clip quảng cáo (ur5-trailer.html): chữ nghiêng viền đen đổ khối, chip nghiêng bóng cứng, nền tím đêm + hồng neon + vàng đèn,
 * thẻ nhân vật viền màu đúng màu từng UR, vạch quét CRT. Token màu chung với game (--ink, --font, --display). Bóng cứng, radius 0–4 px. */
:root {
  --bn-ink: #2a1c1c; --bn-night: #12052a; --bn-plum: #4a0f6a; --bn-plum2: #2a0b46; --bn-dk: #14061a; --bn-dk2: #1f0b33; --bn-black: #0a0612;
  --bn-pink: #ff3d9a; --bn-pink2: #ffd0ea; --bn-gold: #ffcf33; --bn-cyan: #3af0ff; --bn-lime: #b6ff3a; --bn-orange: #ff6a1a; --bn-violet: #8a56e8; --bn-red: #ff2a4a;
  --bn-lilac: #c9b6e4; --bn-paper: #fff8ea;
  --bn-font: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif; --bn-display: 'Baloo 2', 'Be Vietnam Pro', system-ui, sans-serif;
  --bn-skew: -11.3deg; --bn-unskew: 11.3deg;
}

/* ---------- chip hiệu ứng (đúng kiểu .events .ev.buffs của game) + nút UR LIMITED ---------- */

.bn-btn { position: relative; display: flex; align-items: center; gap: 8px; width: 140px; height: 40px; padding: 3px 6px 3px 4px; gap: 6px; border-radius: 4px; text-align: left;
  background: linear-gradient(180deg, #3a0f5c 0%, #1b0830 62%, #14061a 100%); border: 2px solid var(--bn-black);
  box-shadow: 0 0 0 2px var(--bn-pink), 0 5px 0 2px var(--bn-black), inset 0 2px 0 rgba(255, 255, 255, .22); transition: transform .06s, box-shadow .06s; overflow: visible; }
.bn-btn:hover { filter: brightness(1.1); }
.bn-btn:active { transform: translateY(3px); box-shadow: 0 0 0 2px var(--bn-pink), 0 2px 0 2px var(--bn-black), inset 0 2px 0 rgba(255, 255, 255, .18); }
.bn-bulbs { position: absolute; left: 8px; right: 8px; top: -7px; height: 4px; background: repeating-linear-gradient(90deg, var(--bn-gold) 0 4px, transparent 4px 9px); animation: bulbs .9s steps(1) infinite; pointer-events: none; }
@keyframes bulbs { 0% { background-position: 0 0; } 50% { background-position: 4.5px 0; } }
.bn-btn::after { content: ''; position: absolute; top: 0; bottom: 0; left: -30%; width: 22%; background: rgba(255, 255, 255, .35); transform: skewX(var(--bn-skew)); animation: shine 3.6s steps(12) infinite; pointer-events: none; mix-blend-mode: overlay; }
@keyframes shine { 0%, 70% { left: -30%; } 100% { left: 125%; } }
.bn-face { flex: 0 0 auto; width: 31px; height: 31px; display: grid; place-items: center; background: linear-gradient(#2a0b46, #0a0612); border: 2px solid var(--fc, var(--bn-gold)); box-shadow: 2px 2px 0 var(--bn-black); }
.bn-face canvas { width: 25px; height: 25px; display: block; }
.bn-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.05; }
.bn-txt b { font: 800 12.5px var(--bn-display); color: #fff; transform: skewX(var(--bn-skew)); transform-origin: left bottom; text-shadow: 2px 2px 0 var(--bn-pink), -1px -1px 0 var(--bn-black), 1px -1px 0 var(--bn-black); white-space: nowrap; letter-spacing: .01em; }
.bn-sub { font: 800 9px var(--bn-font); font-style: normal; color: var(--bn-lilac); margin-top: 2px; display: flex; align-items: center; gap: 3px; white-space: nowrap; }
.bn-sub time { color: var(--bn-gold); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.bn-sub svg { width: 9px; height: 9px; flex: 0 0 auto; }
.bn-btn.hot .bn-sub time { color: var(--bn-orange); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .45; } }
.bn-btn.bn-pre { filter: saturate(.8); }
.bn-btn.open { box-shadow: 0 0 0 2px var(--bn-gold), 0 5px 0 2px var(--bn-black), inset 0 2px 0 rgba(255, 255, 255, .26); animation: ulpulse 1.4s steps(2) infinite; }
.bn-btn.open .bn-sub { color: var(--bn-gold); }
@keyframes ulpulse { 50% { box-shadow: 0 0 0 4px var(--bn-pink), 0 5px 0 4px var(--bn-black), inset 0 2px 0 rgba(255, 255, 255, .26); } }
.bn-tag { position: absolute; right: -5px; top: -8px; padding: 0 5px; font: 800 8px var(--bn-display); font-style: normal; text-decoration: none; background: var(--bn-red); color: #fff; border: 2px solid var(--bn-black); transform: skewX(var(--bn-skew)); box-shadow: 2px 2px 0 var(--bn-black); }
.bn-btn.bn-pre .bn-tag { background: var(--bn-violet); }
.bn-burst { position: absolute; inset: -14px; pointer-events: none; }
.bn-burst i { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; background: var(--c); margin: -4px; animation: burst .8s steps(8) forwards; }
@keyframes burst { to { transform: translate(var(--x), var(--y)) scale(.2); opacity: 0; } }

/* ---------- chip nghiêng + chữ tiêu đề kiểu clip ---------- */
.bn-chip { display: inline-block; transform: skewX(var(--bn-skew)); background: var(--c, var(--bn-pink)); color: #120c22; font: 800 12px var(--bn-display); padding: 2px 12px; box-shadow: 3px 3px 0 #000, inset 0 5px 0 rgba(255, 255, 255, .28); white-space: nowrap; }
.bn-chip > span { display: inline-block; transform: skewX(var(--bn-unskew)); }
.bn-bt { position: relative; display: inline-block; font: 800 var(--fs, 32px)/1 var(--bn-display); transform: skewX(var(--bn-skew)); color: transparent; white-space: nowrap; letter-spacing: .01em; }
.bn-bt::before { content: attr(data-t); position: absolute; left: 0; top: 0; -webkit-text-stroke: .16em var(--bn-black); color: var(--bn-black); text-shadow: .05em .05em 0 var(--cd, #6a0f3f), .1em .1em 0 var(--cd, #6a0f3f), 0 0 .5em var(--c, var(--bn-pink)); }
.bn-bt span { position: relative; background: linear-gradient(#fff 0%, var(--c3, #fff) 45%, var(--c, var(--bn-pink)) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; -webkit-text-stroke: .03em var(--c, var(--bn-pink)); }
.bn-neon { font: 800 var(--fs, 40px)/1 var(--bn-display); color: #fff; text-shadow: 0 0 2px #fff, 0 0 8px var(--c, var(--bn-pink)), 0 0 20px var(--c, var(--bn-pink)), 0 0 36px var(--c, var(--bn-pink)); animation: neonflick 5s steps(1) infinite; letter-spacing: .02em; }
@keyframes neonflick { 0%, 92%, 100% { opacity: 1; } 93% { opacity: .45; } 94% { opacity: 1; } 96% { opacity: .55; } }
.bn-scan::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .16) 0 1px, transparent 1px 4px); }
.bn-x { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; display: grid; place-items: center; background: #fff; color: var(--bn-ink); font: 800 20px/1 var(--bn-display); border: 2px solid var(--bn-black); border-radius: 4px; box-shadow: 0 3px 0 var(--bn-black); z-index: 3; }
.bn-x:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--bn-black); }

/* ---------- nút hành động (cùng khuôn nút game: gờ 3px, nhấn xuống 2px) ---------- */
.bn-abtn { position: relative; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-height: 44px; padding: 6px 12px; border-radius: 4px; border: 2px solid var(--bn-black);
  background: var(--bg, var(--bn-pink)); color: var(--fg, #120c22); font: 800 15px/1.1 var(--bn-display); box-shadow: 0 4px 0 var(--bn-black), inset 0 3px 0 rgba(255, 255, 255, .32); transition: transform .06s, box-shadow .06s, filter .15s; }
.bn-abtn small { font: 700 11px var(--bn-font); opacity: .9; margin-top: 2px; }
.bn-abtn:hover { filter: brightness(1.08); }
.bn-abtn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--bn-black), inset 0 3px 0 rgba(255, 255, 255, .2); }
.bn-abtn.gold { --bg: linear-gradient(#ffe36a, #ffbf1a); }
.bn-abtn.cyan { --bg: linear-gradient(#7ff6ff, #2bc4d6); }
.bn-abtn.dark { --bg: linear-gradient(#3b2e48, #271f30); --fg: #fff; }
.bn-abtn.pink { --bg: linear-gradient(#ff7bbd, #ff3d9a); }
.bn-abtn.cant { filter: grayscale(.75) brightness(.9); }
.bn-abtn.cant::after { content: 'THIẾU'; position: absolute; right: -6px; top: -10px; padding: 0 5px; font: 800 9px var(--bn-display); background: var(--bn-red); color: #fff; border: 2px solid var(--bn-black); transform: skewX(var(--bn-skew)); }
.bn-abtn:disabled { filter: grayscale(.9) brightness(.8); cursor: not-allowed; }

/* ---------- popup chung ---------- */
.bn-dlg { position: absolute; z-index: 31; background: linear-gradient(#1f0b33, #14061a); border: 3px solid var(--bn-black); border-radius: 6px; box-shadow: 0 0 0 3px var(--bn-pink), 0 8px 0 3px var(--bn-black); overflow: hidden; animation: dlgin .22s steps(5); color: #fff; }
@keyframes dlgin { from { transform: translateY(24px) scale(.96); opacity: 0; } }
@media (min-width: 900px) and (min-height: 560px) { .bn-dlg { left: 50%; top: 50%; width: 520px; max-height: 640px; transform: translate(-50%, -50%); animation: dlgin-d .22s steps(5); } }
@keyframes dlgin-d { from { transform: translate(-50%, -46%) scale(.96); opacity: 0; } }
@media not all and (min-width: 900px) and (min-height: 560px) { .bn-dlg { left: 8px; right: 8px; top: 60px; bottom: auto; max-height: calc(100% - 76px); } }
.bn-dlg .bn-body { padding: 14px 16px 16px; overflow-y: auto; max-height: inherit; }
.bn-dlg h3 { margin: 0 0 8px; font: 800 20px var(--bn-display); color: var(--bn-gold); }
.bn-dlg p { margin: 6px 0; font-size: 13px; line-height: 1.45; color: #e8ddff; }
.bn-dlg table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bn-dlg th, .bn-dlg td { padding: 6px 8px; text-align: left; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.bn-dlg th { color: var(--bn-lilac); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.bn-dlg td.r { text-align: right; font-variant-numeric: tabular-nums; }
.bn-acts { display: flex; gap: 8px; margin-top: 12px; }
.bn-acts > .bn-abtn { flex: 1; }

/* ---------- popup "sắp mở" ---------- */
.bn-dlg.bn-pre .bn-pre-top { position: relative; padding: 14px 16px 6px; text-align: center; background: radial-gradient(ellipse at 50% 0, rgba(255, 61, 154, .4), transparent 70%), repeating-linear-gradient(90deg, #5e1530 0 22px, #8e2447 22px 44px); border-bottom: 3px solid var(--bn-black); }
.bn-dlg.bn-pre .bn-pre-top::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 9px; background: var(--bn-gold); box-shadow: 0 3px 0 var(--bn-black); }
.bn-dlg.bn-pre .bn-pre-top > * { position: relative; }
.bn-pre-top .bn-chip { margin: 8px 0 6px; }
.bn-pre-top .bn-neon { --fs: 40px; display: block; margin: 2px 0 2px; }
.bn-pre-top p { margin: 4px 0 10px; font-size: 12.5px; font-weight: 600; text-shadow: 0 2px 0 #000; }
.bn-pre-stage { position: relative; height: 170px; border-bottom: 3px solid var(--bn-black); background: #08041a; }
.bn-pre-stage canvas { width: 100%; height: 100%; display: block; }
.bn-pre-stage .bn-q { position: absolute; font: 800 22px var(--bn-display); color: #fff; text-shadow: 2px 2px 0 var(--bn-pink); animation: bob 1.6s steps(4) infinite; }
@keyframes bob { 50% { transform: translateY(-5px); } }
.bn-cd { padding: 12px 12px 4px; text-align: center; }
.bn-cd-row { display: flex; align-items: center; justify-content: center; gap: 6px; }
.bn-cd-g { display: flex; flex-direction: column; align-items: center; }
.bn-cd-d { display: flex; gap: 3px; }
.bn-dg { position: relative; width: 38px; height: 54px; display: grid; place-items: center; font: 800 38px/1 var(--bn-display); font-variant-numeric: tabular-nums; color: var(--bn-gold); background: linear-gradient(#2a0b46 0 50%, #1b0830 50% 100%); border: 2px solid var(--bn-black); box-shadow: 0 3px 0 var(--bn-black), inset 0 2px 0 rgba(255, 255, 255, .15); text-shadow: 0 2px 0 #7a3a00; }
.bn-dg::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: #000; opacity: .7; }
.bn-dg.tick { animation: tick .16s steps(3); }
@keyframes tick { 30% { transform: translateY(-4px) scale(1.06); color: #fff; } }
.bn-cd-s { font: 800 30px var(--bn-display); color: var(--bn-pink); padding-bottom: 16px; animation: blink 1s steps(2) infinite; }
.bn-cd-l { font: 700 10px var(--bn-font); color: var(--bn-lilac); letter-spacing: .12em; margin-top: 5px; }
.bn-cd.hot .bn-dg { color: var(--bn-orange); }
.bn-cd-note { margin: 6px 0 0; font-size: 12px; color: var(--bn-lilac); }
.bn-cd-note b { color: #fff; }
.bn-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 10px; margin: 10px 14px 2px; padding: 0; list-style: none; }
.bn-dlg.bn-pre .bn-acts { padding: 6px 16px 14px; }
.bn-opened { text-align: center; padding: 22px 16px 6px; }
.bn-opened .bn-bt { --fs: 66px; }

/* ---------- panel banner (sau 0h) ---------- */
.bn-panel { position: absolute; z-index: 20; display: flex; flex-direction: column; background: linear-gradient(#1f0b33, #14061a); border: 3px solid var(--bn-black); box-shadow: 0 0 0 3px var(--bn-pink), 0 8px 0 3px var(--bn-black); overflow: hidden; animation: panelin .28s steps(6); }
@media (min-width: 900px) and (min-height: 560px) { .bn-panel { left: 0; top: 0; width: 1280px; height: 720px; border-radius: 0; box-shadow: none; border-width: 0 0 3px; } }
@media not all and (min-width: 900px) and (min-height: 560px) { .bn-panel { left: 0; right: 0; top: 0; bottom: 0; border-radius: 0; box-shadow: none; border: 0; } }
@media not all and (min-width: 900px) and (min-height: 560px) { .bn-ph { padding-top: calc(8px + env(safe-area-inset-top, 0px)); } }
@keyframes panelin { from { transform: translateX(40px); opacity: 0; } }
@media not all and (min-width: 900px) and (min-height: 560px) { .bn-panel { animation: panelup .28s steps(6); } }
@keyframes panelup { from { transform: translateY(60px); opacity: 0; } }
.bn-ph { flex: 0 0 auto; position: relative; display: flex; align-items: center; gap: 8px; padding: 8px 52px 8px 12px; background: repeating-linear-gradient(90deg, #5e1530 0 22px, #8e2447 22px 44px); border-bottom: 3px solid var(--bn-black); }
.bn-ph::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--bn-gold); }
.bn-ph .bn-neon { --fs: 24px; }
.bn-pbody { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; }
.bn-hero { position: relative; height: 196px; background: #08041a; border-bottom: 3px solid var(--bn-black); overflow: hidden; }
.bn-hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.bn-hero .bn-scan::after { z-index: 1; }
.bn-hero-tl { position: absolute; left: 8px; top: 8px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; z-index: 2; }
.bn-hero-name { position: absolute; left: 12px; bottom: 10px; z-index: 2; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.bn-hero-name .bn-bt { --fs: 34px; }
.bn-hero-name .bn-chip { font-size: 11px; }
.bn-hero .bn-own { position: absolute; right: 10px; top: 8px; z-index: 2; }
.bn-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; padding: 12px 12px 8px; }
.bn-uc { position: relative; display: flex; flex-direction: column; border: 2px solid var(--bn-black); background: var(--c); padding: 0; box-shadow: 0 0 0 2px var(--c), 0 3px 0 2px var(--bn-black); transition: transform .08s; text-align: center; }
.bn-uc:active { transform: translateY(2px); }
.bn-uc canvas { width: 100%; height: auto; aspect-ratio: 62/76; display: block; background: linear-gradient(var(--c-d), var(--bn-dk)); }
.bn-uc span { display: block; background: var(--c); color: #120c22; font: 800 10px/1.15 var(--bn-display); padding: 2px 1px 3px; white-space: nowrap; overflow: hidden; }
.bn-uc[aria-pressed=true] { transform: translateY(-4px); box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--c), 0 6px 0 5px var(--bn-black); z-index: 1; }
.bn-uc .bn-own-t { position: absolute; left: 0; top: 0; padding: 0 4px; font: 800 8px var(--bn-display); background: var(--bn-lime); color: #120c22; border-right: 2px solid var(--bn-black); border-bottom: 2px solid var(--bn-black); }
.bn-sec { margin: 8px 12px; padding: 10px 12px; background: rgba(255, 255, 255, .05); border: 2px solid var(--bn-black); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.bn-sec h4 { margin: 0 0 6px; font: 800 13px var(--bn-display); color: var(--bn-gold); display: flex; align-items: center; gap: 8px; }
.bn-sec p { margin: 4px 0; font-size: 12px; line-height: 1.45; color: #e8ddff; }
.bn-link { color: var(--bn-cyan); font-weight: 700; font-size: 12px; text-decoration: underline; text-underline-offset: 2px; }
.bn-pity { display: grid; grid-template-columns: repeat(20, 1fr); gap: 2px; margin: 6px 0 4px; }
.bn-pity i { height: 12px; background: #2e2342; border: 1px solid #000; }
.bn-pity i.on { background: var(--bn-lime); }
.bn-pity.hot i.on { background: var(--bn-orange); }
.bn-pity.full i.on { background: var(--bn-pink); animation: blink .6s steps(2) infinite; }
.bn-pity-t { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; font-weight: 700; }
.bn-pity-t b { font: 800 16px var(--bn-display); color: #fff; }
.bn-money { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.bn-money .bn-abtn { font-size: 14px; }
.bn-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 12px; }
.bn-pf { flex: 0 0 auto; padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); background: #0e0418; border-top: 3px solid var(--bn-black); box-shadow: 0 -3px 0 var(--bn-pink); }
.bn-pf-t { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; color: var(--bn-lilac); margin-bottom: 7px; font-weight: 600; }
.bn-pf-t b { color: var(--bn-gold); font: 800 15px var(--bn-display); font-variant-numeric: tabular-nums; }
.bn-pf-b { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bn-pf-b .bn-abtn { min-height: 52px; font-size: 17px; }
.bn-coupon-i { display: inline-block; width: 12px; height: 12px; background: var(--bn-gold); border: 2px solid var(--bn-black); border-radius: 50%; vertical-align: -2px; margin-right: 3px; }

/* ---------- lịch sử, tỉ lệ ---------- */
.bn-hist { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow-y: auto; }
.bn-hist li { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid rgba(255, 255, 255, .1); font-size: 12.5px; }
.bn-hist li .bn-chip { font-size: 10px; padding: 1px 8px; }
.bn-hist li em { margin-left: auto; font-style: normal; color: var(--bn-lilac); font-size: 11px; }
.bn-detail-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.bn-detail-head canvas { width: 62px; height: 76px; border: 2px solid var(--c); background: var(--bn-dk); }
video { width: 100%; display: block; background: #000; border: 2px solid #000; }

/* ---------- mở quà (gacha) ---------- */
.bn-wish { z-index: 40; background: #000; }
.bn-wish canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: auto; pointer-events: auto; touch-action: manipulation; }
.bn-wui { position: absolute; inset: 0; pointer-events: none; }
.bn-wui > * { pointer-events: auto; }
.bn-w-skip { position: absolute; right: 12px; top: 12px; z-index: 3; }
@media (min-width: 900px) and (min-height: 560px) { .bn-w-skip { top: 56px; } }
.bn-w-skip .bn-chip { font-size: 14px; padding: 4px 14px; --c: #fff; }
.bn-w-hint { position: absolute; left: 0; right: 0; bottom: 70px; text-align: center; font: 800 15px var(--bn-display); letter-spacing: .12em; color: #fff; text-shadow: 0 2px 0 #000; animation: blink 1s steps(2) infinite; pointer-events: none !important; }
@media not all and (min-width: 900px) and (min-height: 560px) { .bn-w-hint { bottom: 40px; } }
.bn-sum { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: 56px 24px 0; background: radial-gradient(ellipse at 50% 40%, rgba(74, 15, 106, .55), rgba(10, 6, 18, .94) 75%); animation: fade .25s steps(4); }
@media not all and (min-width: 900px) and (min-height: 560px) { .bn-sum { padding: 44px 10px 0; } }
.bn-sum::before, .bn-sum::after { content: ''; flex: 1 0 0; }
.bn-sum > * { flex-shrink: 0; }
.bn-sum-x { position: absolute; right: 12px; top: 12px; z-index: 4; }
.bn-sum .bn-bt { --fs: 52px; margin-bottom: 4px; }
@media not all and (min-width: 900px) and (min-height: 560px) { .bn-sum .bn-bt { --fs: 38px; } }
.bn-sum-sub { font: 700 13px var(--bn-font); color: var(--bn-lilac); margin: 4px 0 14px; text-align: center; }
.bn-sum-grid { display: grid; grid-template-columns: repeat(5, 150px); gap: 14px; justify-content: center; }
@media not all and (min-width: 900px) and (min-height: 560px) { .bn-sum-grid { grid-template-columns: repeat(3, 118px); gap: 8px; } }
.bn-sum-grid.one { grid-template-columns: 220px; }
.bn-rc { position: relative; height: 214px; perspective: 600px; padding: 0; background: none; }
@media not all and (min-width: 900px) and (min-height: 560px) { .bn-rc { height: 150px; } }
.bn-sum-grid.one .bn-rc { height: 300px; }
.bn-rc-in { position: absolute; inset: 0; display: flex; flex-direction: column; border: 2px solid var(--bn-black); background: var(--bn-dk); box-shadow: 0 0 0 3px var(--c), 0 5px 0 3px var(--bn-black); transform-origin: center; }
.bn-rc.fl .bn-rc-in { animation: cardflip .4s steps(6) both; animation-delay: var(--d, 0s); }
@keyframes cardflip { 0% { transform: scaleX(0) skewX(var(--bn-skew)); filter: brightness(2.6); } 100% { transform: none; } }
.bn-rc.back .bn-rc-in { background: repeating-linear-gradient(135deg, #2a0b46 0 8px, #3a0f5c 8px 16px); }
.bn-rc.back .bn-rc-in::after { content: '?'; margin: auto; font: 800 54px var(--bn-display); color: var(--bn-pink); text-shadow: 3px 3px 0 #000; }
.bn-rc.back .bn-rc-in > * { display: none; }
.bn-rc-art { position: relative; flex: 1 1 auto; min-height: 0; display: grid; place-items: center; background: linear-gradient(var(--c-d, #4a0f6a), var(--bn-dk)); overflow: hidden; }
.bn-rc-art::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 55%, var(--c) 0, transparent 62%); opacity: .55; }
.bn-rc-art::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .08) 0 1px, transparent 1px 4px); }
.bn-rc-art canvas { position: relative; z-index: 1; max-width: 86%; max-height: 92%; }
.bn-rc-bar { flex: 0 0 auto; background: var(--c); color: #120c22; text-align: center; padding: 4px 2px 5px; }
.bn-rc-bar b { display: block; font: 800 15px/1.1 var(--bn-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bn-rc-bar small { display: block; font: 800 10.5px var(--bn-font); opacity: .85; margin-top: 1px; }
@media not all and (min-width: 900px) and (min-height: 560px) { .bn-rc-bar b { font-size: 12.5px; } }
@media not all and (min-width: 900px) and (min-height: 560px) { .bn-rc-bar small { font-size: 9px; } }
.bn-rc-tag { position: absolute; left: -4px; top: 6px; z-index: 2; }
.bn-rc-tag .bn-chip { font-size: 10px; padding: 1px 8px; }
.bn-rc.ur .bn-rc-in { animation-name: cardflip, urglow; animation-duration: .4s, 1.2s; animation-iteration-count: 1, infinite; animation-timing-function: steps(6), steps(2); }
@keyframes urglow { 50% { box-shadow: 0 0 0 5px var(--c), 0 5px 0 5px var(--bn-black); } }
.bn-sum-foot { display: flex; align-items: center; gap: 14px; margin-top: 16px; flex-wrap: wrap; justify-content: center; position: sticky; bottom: 0; z-index: 2; align-self: stretch; padding: 12px 0 max(14px, env(safe-area-inset-bottom)); background: linear-gradient(to bottom, rgba(10, 6, 18, 0), rgba(10, 6, 18, .96) 28%); }
@media not all and (min-width: 900px) and (min-height: 560px) { .bn-sum-foot { margin-top: 10px; gap: 8px; } }
.bn-sum-gain { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }
@media not all and (min-width: 900px) and (min-height: 560px) { .bn-sum-gain { margin-top: 8px; } }
.bn-sum-foot .bn-abtn { min-width: 150px; }

/* ---------- toast ---------- */
#toast { z-index: 60; pointer-events: none; }
@keyframes toast { 0% { opacity: 0; transform: translateX(-50%) translateY(-12px); } 6% { opacity: 1; transform: translateX(-50%); } 90% { opacity: 1; } 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .bn-btn::after, .bn-bulbs, .bn-neon, .bn-btn.open, .bn-pre-stage .bn-q, .bn-cd-s, .bn-w-hint, .bn-rc.ur .bn-rc-in { animation: none !important; }
  .bn-dlg, .bn-panel, .scrim { animation: none !important; }
}
@media (max-width: 700px) { .demo-bar { font-size: 11px; gap: 4px 8px; padding: 4px 6px; } .db-grp button { padding: 3px 6px; } .db-grp > span { display: none; } }

/* danh sách 20 SSS */
.bn-dlg.bn-sssl .bn-body { max-height: 560px; overflow-y: auto; }
.bn-sss-grid { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
@media not all and (min-width: 900px) and (min-height: 560px) { .bn-sss-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; } }
.bn-sss-grid li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 2px 5px; border: 2px solid #3a1a6a; background: linear-gradient(#2a0b46, #0a0612); text-align: center; opacity: .62; }
.bn-sss-grid li.bn-own { opacity: 1; border-color: #b07cff; }
.bn-sss-grid canvas { width: 100%; height: auto; aspect-ratio: 56/76; image-rendering: pixelated; display: block; }
.bn-sss-grid b { font: 800 10.5px var(--bn-font); line-height: 1.1; }
.bn-sss-grid small { font: 700 9.5px var(--bn-font); color: var(--bn-lilac); }
.bn-sss-grid i { position: absolute; top: 2px; left: 2px; font: 800 8.5px var(--bn-font); font-style: normal; background: var(--bn-lime, #b6ff3a); color: #14061a; padding: 0 4px; }

/* banner toàn màn hình */
.bn-pl { display: block; }
@media (min-width: 900px) and (min-height: 560px) { .bn-pbody { display: grid; grid-template-columns: 1fr 440px; overflow: hidden; } }
@media (min-width: 900px) and (min-height: 560px) { .bn-pl { display: flex; flex-direction: column; min-height: 0; border-right: 3px solid var(--bn-black); } }
@media (min-width: 900px) and (min-height: 560px) { .bn-hero { flex: 1 1 auto; height: auto; min-height: 0; border-bottom: 3px solid var(--bn-black); } }
@media (min-width: 900px) and (min-height: 560px) { .bn-hero-name .bn-bt { --fs: 62px; } }
@media (min-width: 900px) and (min-height: 560px) { .bn-hero-name .bn-chip { font-size: 15px; } }
@media (min-width: 900px) and (min-height: 560px) { .bn-hero-tl .bn-chip, .bn-hero .bn-own .bn-chip { font-size: 14px; } }
@media (min-width: 900px) and (min-height: 560px) { .bn-cards { flex: 0 0 auto; gap: 12px; padding: 14px 24px 14px; } }
@media (min-width: 900px) and (min-height: 560px) { .bn-uc span { font-size: 12px; padding: 3px 1px 4px; } }
@media (min-width: 900px) and (min-height: 560px) { .bn-pr { overflow-y: auto; overscroll-behavior: contain; min-height: 0; padding-top: 4px; } }
@media (min-width: 900px) and (min-height: 560px) { .bn-ph { padding: 8px 64px 8px 24px; } }
@media (min-width: 900px) and (min-height: 560px) { .bn-ph .bn-neon { --fs: 30px; } }
@media (min-width: 900px) and (min-height: 560px) { .bn-pf { flex-direction: row; align-items: center; justify-content: flex-end; gap: 18px; padding: 10px 24px; } }
@media (min-width: 900px) and (min-height: 560px) { .bn-pf-t { margin: 0; gap: 14px; } }
@media (min-width: 900px) and (min-height: 560px) { .bn-pf-b { width: 520px; } }
@media not all and (min-width: 900px) and (min-height: 560px) { .bn-hero { height: 250px; } }
@media not all and (min-width: 900px) and (min-height: 560px) { .bn-hero-name .bn-bt { --fs: 40px; } }
.bn-btn::before { content: ''; position: absolute; inset: -4px; }
@media (min-width: 900px) and (min-height: 560px) { .bn-pf { justify-content: space-between; } }
@media (min-width: 900px) and (min-height: 560px) { .bn-pf-t { flex: 0 0 auto; align-items: baseline; font-size: 13px; } }
@media (min-width: 900px) and (min-height: 560px) { .bn-pf-t b { font-size: 20px; } }
@media (min-width: 900px) and (min-height: 560px) { .bn-pf { display: flex; } }
/* ===== Tích hợp vào game (06/11): dialog dùng UI.dialog (.modal-wrap > .modal.bn-m), HUD gắn vào #hud ===== */
:where(.modal.bn-m, .bn-hud) , :where(.modal.bn-m, .bn-hud) * { box-sizing: border-box; }
:where(.modal.bn-m, .bn-hud) button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
:where(.modal.bn-m) canvas { image-rendering: pixelated; }
.modal.bn-m button:focus-visible, .bn-hud button:focus-visible { outline: 3px solid var(--bn-cyan); outline-offset: 2px; }
.modal.bn-m { font-family: var(--bn-font); color: #fff; }
.modal.bn-m.bn-dlg { position: relative; left: auto; top: auto; right: auto; bottom: auto; transform: none; width: min(520px, 100%); max-height: min(640px, calc(100dvh - 24px)); padding: 0; margin: 0; z-index: auto;
  background: linear-gradient(#1f0b33, #14061a); border: 3px solid var(--bn-black); border-radius: 6px; box-shadow: 0 0 0 3px var(--bn-pink), 0 8px 0 3px var(--bn-black); overflow: hidden; animation: bn-dlgin .22s steps(5); }
@keyframes bn-dlgin { from { transform: translateY(24px) scale(.96); opacity: 0; } }
.modal.bn-m.bn-dlg .bn-body { max-height: calc(min(640px, 100dvh - 24px) - 6px); overflow-y: auto; }
.modal.bn-m.bn-dlg > .bn-x { position: absolute; right: 8px; top: 8px; z-index: 5; }
.modal.bn-m.bn-panel-m, .modal.bn-m.bn-wish-m { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: #08041a; overflow: hidden; animation: none; z-index: 5; }
.modal.bn-m.bn-panel-m .bn-panel { position: relative; inset: auto; width: 100%; height: 100%; max-width: none; border-radius: 0; box-shadow: none; border: 0; z-index: auto; }
.bn-wish { position: absolute; inset: 0; }
.bn-wish-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.bn-wui { position: absolute; inset: 0; pointer-events: none; }
.bn-wui > * { pointer-events: auto; }
.bn-hud { position: absolute; top: 62px; right: 10px; z-index: 19; display: flex; justify-content: flex-end; pointer-events: auto; }
.bn-hud[hidden] { display: none !important; }
.bn-left, [data-bn-left] { font-variant-numeric: tabular-nums; }
.bn-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bn-link { color: var(--bn-cyan); font-weight: 800; font-size: 12px; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.bn-note { margin: 6px 0 0; font-size: 12px; color: var(--bn-lilac); }
.bn-tbl-wrap { overflow-x: auto; margin: 6px 0; }
.bn-cd-days { margin-bottom: 6px; font: 800 14px var(--bn-display); color: var(--bn-gold); }
.bn-detail-art, .bn-uc-art { display: block; background: #08041a; overflow: hidden; }
.bn-detail-art img, .bn-uc-art img { display: block; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.bn-detail-art { flex: 0 0 auto; width: 64px; height: 64px; border: 3px solid var(--c, var(--bn-gold)); box-shadow: 3px 3px 0 var(--bn-black); }
.bn-uc-n { display: block; font: 800 12px var(--bn-display); text-align: center; }
.bn-icon-cv, .bn-bust-cv { image-rendering: pixelated; }
.bn-confirm.modal.bn-m { width: min(380px, 100%); }
.bn-trailer video { width: 100%; display: block; background: #000; }
@media (prefers-reduced-motion: reduce) { .bn-btn::after, .bn-bulbs, .bn-q, .bn-cd-s, .bn-dg.tick { animation: none !important; } .modal.bn-m { animation: none !important; } }
/* ---------- Cửa hàng Vé Sàn Diễn (07/11/2026) ---------- */
@media (min-width: 900px) and (min-height: 560px) { .bn-dlg.bn-shop-m { width: 600px; max-height: min(680px, calc(100% - 40px)); } }
.bn-shop-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 2px 0 6px; font: 700 14px var(--bn-font); color: #fff; }
.bn-shop-bar b { font: 800 20px var(--bn-display); color: var(--bn-gold); font-variant-numeric: tabular-nums; }
.bn-shop .bn-note { font-size: 12px; color: var(--bn-lilac); }
.bn-shop-t { margin: 14px 0 6px; display: flex; align-items: center; }
.bn-shop-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 560px) { .bn-shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.bn-shop-o { display: flex; flex-direction: column; gap: 4px; padding: 8px; background: rgba(255, 255, 255, .05); border: 2px solid var(--c, var(--bn-lilac)); border-radius: 4px; min-width: 0; }
.bn-shop-o b { font: 800 13px/1.25 var(--bn-font); color: #fff; overflow-wrap: anywhere; }
.bn-shop-o small { font: 700 11px var(--bn-font); color: var(--bn-lilac); }
.bn-shop-o .bn-abtn { margin-top: auto; min-height: 40px; font-size: 14px; width: 100%; }
.bn-shop-o.done { opacity: .55; }
@media (prefers-reduced-motion: reduce) { .bn-shop-o, .bn-shop-o .bn-abtn { transition: none; animation: none; } }
