/* LiveBridge game kit — khung chung (sân khấu cố định 1080×1920 / 1920×1080, thẻ phủ, cài đặt, trạng thái, feed, băng rôn).
   Mỗi game đặt biến màu trong :root của game.html. */
:root {
  --font-ui: 'Baloo 2', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-title: 'Paytone One', 'Baloo 2', system-ui, sans-serif;
  --bg: #07101c;
  --ink: #f4f7ff;
  --muted: #b9c6e4;
  --accent: #ffd36b;
  --accent2: #ff9f43;
  --panel: rgba(10, 18, 34, 0.72);
  --line: rgba(255, 255, 255, 0.16);
  --btn-top: #ffe9a8;
  --btn-bot: #ffb636;
  --btn-ink: #3b2300;
  --btn-edge: #b9761a;
  --overlay: radial-gradient(ellipse at center, rgba(8, 16, 30, 0.55), rgba(2, 5, 12, 0.9));
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; background: var(--bg); color: var(--ink); overflow: hidden; font-family: var(--font-ui); }
button, input, select { font-family: inherit; }
body.idle, body.idle * { cursor: none !important; }

#viewport { position: fixed; inset: 0; background: var(--bg); }
#stage { position: absolute; left: 0; top: 0; width: 1080px; height: 1920px; transform-origin: 0 0; overflow: hidden; background: var(--bg); }
#stage.landscape { width: 1920px; height: 1080px; }
#cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#hud { position: absolute; inset: 0; pointer-events: none; }
.hidden { opacity: 0 !important; }

/* ---------- bảng bên (quà / xếp hạng) ---------- */
.panel, .lb-panel {
  position: absolute; width: 330px; padding: 14px 14px 12px;
  background: var(--panel); border: 2px solid var(--line); border-radius: 22px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.42); backdrop-filter: blur(4px);
  transition: opacity .3s;
}
.panel h2, .lb-panel h2 { font-family: var(--font-title); font-weight: 400; font-size: 27px; color: var(--accent); text-align: center; margin-bottom: 8px; letter-spacing: .5px; text-shadow: 0 2px 0 rgba(0,0,0,.45); }
.g-row { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); margin-top: 6px; }
.g-row:first-child { margin-top: 0; }
.g-ico { width: 40px; height: 40px; flex: none; display: grid; place-items: center; font-size: 26px; }
.g-ico img { width: 40px; height: 40px; object-fit: contain; }
.g-txt { min-width: 0; line-height: 1.1; }
.g-name { font-size: 19px; font-weight: 800; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-act { font-size: 19px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- dòng sự kiện + băng rôn ---------- */
#feed { position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%); width: 920px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.f-line {
  display: flex; align-items: center; max-width: 100%; padding: 7px 22px; border-radius: 999px;
  background: rgba(6, 12, 24, 0.78); border: 1.5px solid var(--line); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  font-size: 26px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; animation: fIn .35s ease-out both;
}
.f-line.out { animation: fOut .5s ease-in forwards; }
.f-line .txt { overflow: hidden; text-overflow: ellipsis; }
.f-line b { color: var(--accent); }
.f-line .em { color: var(--accent2); }
.f-line .t1 { color: var(--team1, #7dffb0); font-weight: 800; }
.f-line .t2 { color: var(--team2, #7dd3ff); font-weight: 800; }
.f-line img.f-gift { width: 34px; height: 34px; object-fit: contain; vertical-align: middle; margin: 0 4px; }
.f-line img.f-ava { width: 30px; height: 30px; object-fit: cover; border-radius: 50%; vertical-align: middle; margin: 0 6px 0 0; border: 2px solid var(--line); }
@keyframes fIn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes fOut { to { opacity: 0; transform: translateY(-10px); } }

#banner { position: absolute; left: 0; right: 0; top: 40%; text-align: center; opacity: 0; transition: opacity .35s; pointer-events: none; }
#banner.show { opacity: 1; animation: bPop .6s cubic-bezier(.2, 1.4, .4, 1) both; }
#banner .b-ico { font-size: 72px; line-height: 1; margin-bottom: 4px; filter: drop-shadow(0 0 18px rgba(255, 220, 120, .7)); }
#banner .b-big { font-family: var(--font-title); font-size: 86px; line-height: 1.05; padding: 0 30px;
  background: linear-gradient(180deg, #fffbe6, var(--accent) 55%, var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 5px 0 rgba(0, 0, 0, .55)) drop-shadow(0 0 26px rgba(255, 200, 90, .55)); }
#banner .b-small { margin-top: 8px; font-size: 38px; font-weight: 800; color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.8), 0 0 18px rgba(0,0,0,.6); padding: 0 30px; }
#banner.t1 .b-big { background-image: linear-gradient(180deg, #f6ffe9, var(--team1, #7dffb0) 55%, var(--team1d, #1f9e57)); }
#banner.t2 .b-big { background-image: linear-gradient(180deg, #eefaff, var(--team2, #7dd3ff) 55%, var(--team2d, #1c6fd1)); }
#stage.landscape #banner { top: 34%; }
#stage.landscape #banner .b-big { font-size: 78px; }
@keyframes bPop { from { transform: scale(.7); } to { transform: none; } }

/* ---------- thông báo (chơi thử, TikTok chưa nối, khách ảo) ---------- */
#notices { position: absolute; left: 50%; top: 300px; transform: translateX(-50%); width: 760px; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; z-index: 5; }
#stage.landscape #notices { top: 210px; width: 1000px; }
.pill { display: none; padding: 8px 22px; border-radius: 999px; font-size: 24px; font-weight: 800; text-align: center; line-height: 1.25; }
.pill.show { display: block; }
.pill.demo { background: rgba(120, 30, 20, 0.88); border: 1.5px solid #ffb27a; color: #ffe6c8; }
.pill.warn { border-radius: 18px; font-size: 23px; background: rgba(105, 12, 12, 0.92); border: 2px solid #ff8a7a; color: #fff1ec; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4); }
.pill.bots { font-size: 20px; letter-spacing: 1px; background: rgba(28, 46, 104, 0.9); border: 1.5px solid #9cb6ff; color: #e8eeff; }

/* ---------- nút góc (tự ẩn khi chuột đứng yên) ---------- */
#chrome { position: absolute; right: 18px; bottom: 18px; display: flex; gap: 10px; align-items: center; transition: opacity .4s; z-index: 20; }
body.idle #chrome { opacity: 0; pointer-events: none; }
.c-btn { height: 56px; min-width: 56px; padding: 0 18px; border-radius: 16px; border: 1.5px solid var(--line); background: rgba(6, 12, 24, 0.86); color: var(--accent); font-size: 22px; font-weight: 800; cursor: pointer; }
.c-btn:hover { filter: brightness(1.25); }
.c-status { min-height: 56px; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 4px 16px; border-radius: 16px; background: rgba(6, 12, 24, 0.86); border: 1.5px solid var(--line); font-size: 18px; font-weight: 700; }
.c-row { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.c-row.hidden { display: none; }
.c-dot { width: 12px; height: 12px; border-radius: 50%; background: #888; }
.c-dot.on { background: #5dff8a; box-shadow: 0 0 10px #5dff8a; }
.c-dot.wait { background: #ffcf5c; }
.c-dot.off { background: #ff5c5c; }

/* ---------- thẻ phủ ---------- */
.overlay { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; z-index: 30; background: var(--overlay); }
.overlay.show { display: flex; }
.card { width: 860px; max-width: calc(100% - 60px); max-height: calc(100% - 60px); overflow: auto; padding: 40px 46px; border-radius: 32px; text-align: center;
  background: linear-gradient(180deg, rgba(20, 30, 52, 0.97), rgba(8, 12, 24, 0.98)); border: 2px solid var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255,255,255,.08); }
.card h2 { font-family: var(--font-title); font-weight: 400; font-size: 76px; line-height: 1.08;
  background: linear-gradient(180deg, #fffbe6, var(--accent) 55%, var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 0 rgba(0,0,0,.5)); }
.card h3 { font-family: var(--font-title); font-weight: 400; font-size: 44px; color: var(--accent); margin-bottom: 14px; }
.card p { font-size: 26px; color: var(--muted); margin-top: 14px; line-height: 1.4; }
.card .note { font-size: 21px; opacity: .92; }
.card .credit { font-size: 16px; opacity: .6; }
.how { margin-top: 22px; padding: 16px 18px; border-radius: 22px; background: rgba(255, 255, 255, 0.05); border: 1.5px solid var(--line); text-align: left; }
.how-title { font-size: 22px; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 8px; text-align: center; }
.how-list { display: grid; grid-template-columns: 1fr; gap: 8px; }
.how-item { display: flex; align-items: center; gap: 14px; font-size: 24px; font-weight: 700; color: var(--ink); line-height: 1.25; }
.how-ico { width: 46px; height: 46px; flex: none; display: grid; place-items: center; font-size: 28px; border-radius: 14px; background: rgba(255, 255, 255, 0.08); }
#stage.landscape .how-list { grid-template-columns: 1fr 1fr; }
.btns { display: flex; gap: 16px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.btn { height: 78px; padding: 0 42px; border-radius: 22px; border: none; cursor: pointer; font-size: 30px; font-weight: 800; color: var(--btn-ink);
  background: linear-gradient(180deg, var(--btn-top), var(--btn-bot)); box-shadow: 0 6px 0 var(--btn-edge), 0 14px 30px rgba(0, 0, 0, 0.35); }
.btn:active { transform: translateY(3px); box-shadow: 0 3px 0 var(--btn-edge); }
.btn.ghost { background: rgba(255, 255, 255, 0.07); color: var(--accent); border: 2px solid var(--line); box-shadow: none; }
.btn.small { height: 52px; font-size: 21px; padding: 0 20px; }
a.btn { display: inline-flex; align-items: center; text-decoration: none; }

.set-grid { display: grid; grid-template-columns: 1fr; gap: 12px; text-align: left; margin-top: 8px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.06); }
.set-row .lbl { font-size: 23px; font-weight: 700; color: var(--ink); }
.set-row small { display: block; font-size: 17px; color: var(--muted); font-weight: 500; }
.seg { display: flex; border-radius: 14px; overflow: hidden; border: 1.5px solid var(--line); flex: none; }
.seg button { height: 50px; padding: 0 16px; border: none; background: transparent; color: var(--muted); font-size: 20px; font-weight: 800; cursor: pointer; }
.seg button.on { background: linear-gradient(180deg, var(--btn-top), var(--btn-bot)); color: var(--btn-ink); }
.set-row input[type=text], .set-row input[type=password] { width: 340px; height: 50px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line); background: rgba(0, 0, 0, 0.3); color: var(--ink); font-size: 21px; }
.set-row input[type=range] { width: 240px; accent-color: var(--btn-bot); }
.set-row select { height: 50px; min-width: 260px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line); background: rgba(0, 0, 0, 0.35); color: var(--ink); font-size: 21px; font-weight: 700; }
.set-row input[type=checkbox] { width: 30px; height: 30px; accent-color: var(--btn-bot); flex: none; }
.inline { display: flex; gap: 14px; align-items: center; }
.chk { display: flex; flex-wrap: wrap; gap: 10px 18px; justify-content: flex-end; }
.chk label { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 700; }
.keys { text-align: left; font-size: 23px; line-height: 1.7; color: var(--ink); margin-top: 6px; columns: 2; column-gap: 30px; }
.keys kbd { display: inline-block; min-width: 38px; padding: 0 8px; text-align: center; border-radius: 8px; background: rgba(255, 255, 255, 0.12); border: 1.5px solid var(--line); color: var(--accent); font-weight: 800; font-family: inherit; margin-right: 8px; }
#stage.landscape .card { width: 1060px; }
#stage.landscape .set-grid { grid-template-columns: 1fr 1fr; }

/* =====================================================================================================
   P5-R30 — khung hình tuỳ chọn, cài đặt chia thẻ, chế độ bố cục, bảng kích thích tặng quà.
   Biến trên #stage: --lb-w, --lb-h, --lb-unit (cạnh ngắn / 1080), --lb-ui (cỡ giao diện). data-frame, data-shape.
   ===================================================================================================== */
.overlay > .card { zoom: var(--lb-unit, 1); }
.pill.lb-hint { background: rgba(14, 40, 30, 0.92); border: 1.5px solid #8bffc5; color: #eafff4; font-size: 23px; }

/* ---------- cài đặt chia thẻ ---------- */
.card.lb-settings { width: 900px; padding: 30px 34px 26px; display: flex; flex-direction: column; }
.card.lb-settings h3 { margin-bottom: 10px; }
.lb-set-tabs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 2px 0 14px; }
.lb-set-tabs button { height: 54px; padding: 0 20px; border-radius: 16px; border: 1.5px solid var(--line); background: rgba(255, 255, 255, 0.06);
  color: var(--muted); font-size: 22px; font-weight: 800; cursor: pointer; }
.lb-set-tabs button.on { background: linear-gradient(180deg, var(--btn-top), var(--btn-bot)); color: var(--btn-ink); border-color: transparent; box-shadow: 0 4px 0 var(--btn-edge); }
.card.lb-settings .set-grid { overflow: auto; min-height: 0; flex: 1 1 auto; padding-right: 4px; }
.card.lb-settings .btns { margin-top: 18px; }
.set-row .lbl { flex: 1 1 auto; min-width: 0; }
.set-row > :last-child { flex: none; }
.seg.lb-wrap { flex-wrap: wrap; max-width: 560px; justify-content: flex-end; }
.seg.lb-wrap button { flex: 1 0 auto; }
.inline.lb-slider input[type=range] { width: 230px; }
.inline .lb-val { min-width: 74px; text-align: right; font-size: 21px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.inline .lb-x { font-size: 24px; font-weight: 800; color: var(--muted); }
.set-row input.lb-num { width: 140px; height: 50px; padding: 0 12px; border-radius: 12px; border: 1.5px solid var(--line); background: rgba(0, 0, 0, 0.3); color: var(--ink); font-size: 21px; font-weight: 700; }
.set-row input[type=color] { width: 70px; height: 46px; border: 1.5px solid var(--line); border-radius: 12px; background: transparent; padding: 2px; cursor: pointer; }
.set-row .btn.small:disabled { opacity: .45; cursor: not-allowed; }
#stage:not(.landscape) .card.lb-settings { width: 980px; max-height: calc(100% - 200px); }
#stage:not(.landscape) .card.lb-settings .set-row .lbl { font-size: 26px; }
#stage:not(.landscape) .card.lb-settings .set-row small { font-size: 19px; }
#stage.landscape .card.lb-settings { width: 1180px; }
#stage.landscape .card.lb-settings .set-grid { grid-template-columns: 1fr 1fr; align-content: start; }

/* ---------- chế độ bố cục (chỉ hiện khi bật — OBS sạch) ---------- */
#lb-layout { position: absolute; inset: 0; z-index: 40; display: none; pointer-events: none; }
#stage.lb-layout #lb-layout { display: block; }
#stage.lb-layout .overlay.show { display: none; }
#stage.lb-layout .lb-p.hidden { opacity: .35 !important; }
#stage.lb-layout::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 39;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 60px 60px; }
.lb-box { position: absolute; pointer-events: auto; cursor: move; border: 3px dashed rgba(255, 220, 120, .95); border-radius: 14px;
  background: rgba(255, 210, 90, .08); box-shadow: 0 0 0 2px rgba(0,0,0,.35); touch-action: none; }
.lb-box:hover, .lb-box.lb-drag { background: rgba(255, 210, 90, .16); border-color: #fff3b8; }
.lb-box.lb-dim { border-color: rgba(200, 200, 200, .6); background: rgba(120, 120, 120, .1); }
.lb-box-lbl { position: absolute; left: -3px; top: -34px; padding: 3px 12px; border-radius: 10px 10px 10px 0; background: #ffd36b; color: #3b2300;
  font-size: 18px; font-weight: 800; white-space: nowrap; pointer-events: none; }
.lb-box.lb-dim .lb-box-lbl { background: #b8b8b8; }
.lb-box-tools { position: absolute; right: -3px; top: -38px; display: flex; gap: 4px; align-items: center; padding: 3px; border-radius: 10px; background: rgba(10, 14, 26, .92); border: 1.5px solid rgba(255,220,120,.6); }
.lb-box-tools button { width: 32px; height: 28px; border: none; border-radius: 7px; background: rgba(255,255,255,.12); color: #fff; font-size: 18px; font-weight: 800; cursor: pointer; line-height: 1; }
.lb-box-tools button:hover { background: #ffd36b; color: #3b2300; }
.lb-box-tools .lb-eye { font-size: 15px; }
.lb-box.lb-dim .lb-box-tools .lb-eye { background: #ff8a6b; }
.lb-box-pct { min-width: 50px; text-align: center; font-size: 15px; font-weight: 800; color: #ffe9a8; font-variant-numeric: tabular-nums; }
.lb-box-rs { position: absolute; right: -12px; bottom: -12px; width: 26px; height: 26px; border-radius: 50%; background: #ffd36b; border: 3px solid #3b2300; cursor: nwse-resize; }
.lb-guide { position: absolute; z-index: 199999; display: none; background: #5ff0ff; box-shadow: 0 0 8px #5ff0ff; pointer-events: none; }
.lb-guide.lb-v { top: 0; bottom: 0; width: 2px; margin-left: -1px; }
.lb-guide.lb-h { left: 0; right: 0; height: 2px; margin-top: -1px; }
.lb-lay-bar { position: absolute; z-index: 200000; left: 50%; bottom: 96px; transform: translateX(-50%); zoom: var(--lb-unit, 1); pointer-events: auto; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center;
  width: max-content; max-width: calc(100% - 40px); padding: 12px 18px; border-radius: 20px; background: rgba(8, 12, 24, .94); border: 2px solid #ffd36b; box-shadow: 0 12px 40px rgba(0,0,0,.6); }
.lb-lay-bar b { font-size: 24px; color: #ffd36b; }
.lb-lay-bar span { font-size: 18px; color: #dfe6ff; max-width: 560px; }
.lb-lay-btn { height: 48px; padding: 0 18px; border-radius: 14px; border: 1.5px solid var(--line); background: rgba(255,255,255,.08); color: #fff; font-size: 19px; font-weight: 800; cursor: pointer; }
.lb-lay-btn.lb-main { background: linear-gradient(180deg, var(--btn-top), var(--btn-bot)); color: var(--btn-ink); border: none; }

/* ---------- bảng kích thích tặng quà (mặc định; game ghi đè bằng CSS #lb-goal, #lb-pk…) ---------- */
.lb-w { position: absolute; transition: opacity .35s; color: var(--ink); }
.lb-w.lb-off { opacity: 0; }
#stage.lb-layout .lb-w.lb-off { opacity: .6; }
.lb-w-title { font-size: 19px; font-weight: 800; letter-spacing: 1.5px; color: var(--accent); text-align: center; margin-bottom: 6px; text-shadow: 0 2px 0 rgba(0,0,0,.5); }
.lb-ava { width: 40px; height: 40px; flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center; font-size: 16px; font-weight: 800; color: #fff;
  border: 2.5px solid rgba(255,255,255,.85); background: #445; }
.lb-ava img { width: 100%; height: 100%; object-fit: cover; }
.lb-ava.lb-big { width: 78px; height: 78px; font-size: 28px; border: 3px solid #ffd36b; box-shadow: 0 0 22px rgba(255, 211, 107, .6); }
.lb-ava.lb-empty { background: rgba(255,255,255,.08); color: var(--muted); border-style: dashed; box-shadow: none; }

/* Mục tiêu quà */
:where(.lb-goal) { left: 50%; transform: translateX(-50%); bottom: 330px; width: 680px; padding: 12px 16px 14px; border-radius: 22px;
  background: linear-gradient(180deg, rgba(36, 22, 60, .9), rgba(14, 10, 30, .9)); border: 2px solid rgba(255, 211, 107, .55); box-shadow: 0 12px 34px rgba(0,0,0,.45); }
:where(#stage.landscape .lb-goal) { bottom: 26px; width: 640px; }
.lb-goal-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.lb-goal-ico { font-size: 30px; line-height: 1; filter: drop-shadow(0 0 8px rgba(255,120,120,.6)); }
.lb-goal-title { flex: 1; min-width: 0; font-family: var(--font-title); font-size: 27px; line-height: 1.1; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 2px 0 rgba(0,0,0,.5); }
.lb-goal-lvl { flex: none; padding: 2px 12px; border-radius: 99px; background: rgba(255,211,107,.18); border: 1.5px solid rgba(255,211,107,.6); color: var(--accent); font-size: 18px; font-weight: 800; }
.lb-goal-bar { position: relative; height: 40px; border-radius: 99px; overflow: hidden; background: rgba(0,0,0,.45); border: 2px solid rgba(255,255,255,.18); box-shadow: inset 0 3px 8px rgba(0,0,0,.5); }
.lb-goal-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; overflow: hidden; border-radius: 99px; transition: width .6s cubic-bezier(.2,.9,.3,1);
  background: linear-gradient(90deg, #ff5f8f, #ffb347 55%, #ffe66b); box-shadow: 0 0 18px rgba(255, 170, 90, .7); }
.lb-goal-shine { position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.28) 45%, transparent 60%); background-size: 260% 100%; animation: lbShine 2.8s linear infinite; mix-blend-mode: screen; }
.lb-goal-num { position: absolute; left: 16px; top: 0; bottom: 0; display: flex; align-items: center; font-size: 22px; font-weight: 800; color: #fff; text-shadow: 0 2px 3px rgba(0,0,0,.85); font-variant-numeric: tabular-nums; }
.lb-goal-pct { position: absolute; right: 16px; top: 0; bottom: 0; display: flex; align-items: center; font-size: 22px; font-weight: 800; color: #fff; text-shadow: 0 2px 3px rgba(0,0,0,.85); }
.lb-goal.lb-near { border-color: #ffd36b; animation: lbGlow 1s ease-in-out infinite alternate; }
.lb-goal.lb-done .lb-goal-fill { background: linear-gradient(90deg, #3ddc84, #b6ff6b); box-shadow: 0 0 22px rgba(120, 255, 150, .8); }
.lb-goal.lb-win { animation: lbWin .5s ease-in-out 6 alternate; }
@keyframes lbShine { from { background-position: 130% 0; } to { background-position: -130% 0; } }
@keyframes lbGlow { to { box-shadow: 0 0 34px rgba(255, 211, 107, .75), 0 12px 34px rgba(0,0,0,.45); } }
@keyframes lbWin { to { box-shadow: 0 0 60px rgba(140, 255, 160, .95); filter: brightness(1.25); } }

/* Combo */
:where(.lb-combo) { left: 20px; top: 54%; width: 300px; }
:where(#stage.landscape .lb-combo) { top: auto; bottom: 170px; left: 24px; }
.lb-combo-list { display: flex; flex-direction: column; gap: 6px; }
.lb-combo-row { position: relative; display: flex; align-items: center; gap: 10px; padding: 7px 12px 9px 8px; border-radius: 16px; overflow: hidden;
  background: linear-gradient(90deg, rgba(120, 30, 10, .92), rgba(60, 14, 30, .88)); border: 2px solid rgba(255, 160, 80, .7); box-shadow: 0 8px 20px rgba(0,0,0,.4);
  animation: lbPop .4s cubic-bezier(.2, 1.5, .4, 1) both; }
.lb-combo-row.lb-hot { border-color: #ffe66b; box-shadow: 0 0 22px rgba(255, 140, 40, .8); }
.lb-combo-row.lb-ghost { opacity: .7; border-style: dashed; animation: none; }
.lb-combo-name { flex: 1; min-width: 0; font-size: 21px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-combo-n { font-family: var(--font-title); font-size: 34px; line-height: 1; color: #ffe66b; text-shadow: 0 3px 0 #8a2a0c, 0 0 14px rgba(255, 180, 60, .9); }
.lb-combo-row.lb-hot .lb-combo-n { animation: lbBeat .45s ease-in-out infinite alternate; }
.lb-combo-time { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(0,0,0,.3); }
.lb-combo-time i { display: block; height: 100%; width: 100%; background: #ffb347; transition: width .25s linear; }
@keyframes lbPop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes lbBeat { to { transform: scale(1.15); } }

/* Vua quà */
:where(.lb-spot) { right: 20px; top: 54%; width: 300px; padding: 12px 14px 12px; border-radius: 22px;
  background: linear-gradient(160deg, rgba(70, 46, 8, .92), rgba(24, 14, 4, .92)); border: 2px solid rgba(255, 211, 107, .75); box-shadow: 0 12px 34px rgba(0,0,0,.45); }
:where(#stage.landscape .lb-spot) { top: auto; bottom: 170px; right: 24px; }
.lb-spot-body { display: flex; align-items: center; gap: 12px; margin-top: 30px; }
.lb-spot-ava { position: relative; flex: none; }
.lb-crown { position: absolute; left: 50%; top: -24px; transform: translateX(-50%) rotate(-8deg); font-size: 30px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.6)); }
.lb-spot-txt { min-width: 0; }
.lb-spot-name { font-family: var(--font-title); font-size: 26px; line-height: 1.1; color: #fff3c4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-spot-gift { font-size: 19px; font-weight: 800; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-spot-time { margin-top: 10px; height: 5px; border-radius: 3px; background: rgba(0,0,0,.4); overflow: hidden; }
.lb-spot-time i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffd36b, #fff3c4); transition: width .25s linear; }
.lb-spot.lb-pop { animation: lbCrown .8s cubic-bezier(.2, 1.4, .4, 1) both; }
.lb-spot.lb-pop .lb-crown { animation: lbCrownDrop .7s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes lbCrown { 0% { transform: scale(.8); box-shadow: 0 0 0 rgba(255,211,107,0); } 50% { box-shadow: 0 0 60px rgba(255,211,107,.95); } 100% { transform: none; } }
@keyframes lbCrownDrop { from { top: -80px; opacity: 0; } to { top: -24px; opacity: 1; } }

/* PK */
:where(.lb-pk) { left: 50%; transform: translateX(-50%); top: 21%; width: 900px; padding: 10px 14px 12px; border-radius: 24px;
  background: rgba(10, 12, 26, .9); border: 2px solid rgba(255,255,255,.22); box-shadow: 0 14px 36px rgba(0,0,0,.5); --pk-l: #ff5d6c; --pk-r: #4da3ff; }
:where(#stage.landscape .lb-pk) { top: 18px; width: 980px; }
.lb-pk-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-bottom: 8px; }
.lb-pk-name { font-family: var(--font-title); font-size: 28px; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 2px 0 rgba(0,0,0,.6); }
.lb-pk-name.lb-l { color: var(--pk-l); } .lb-pk-name.lb-r { color: var(--pk-r); text-align: right; }
.lb-pk-mid { display: flex; align-items: center; gap: 10px; }
.lb-pk-vs { font-family: var(--font-title); font-size: 30px; color: #fff; padding: 0 12px; border-radius: 12px; background: linear-gradient(90deg, var(--pk-l), var(--pk-r)); }
.lb-pk-clock { font-family: var(--font-title); font-size: 34px; color: #fff; font-variant-numeric: tabular-nums; min-width: 92px; text-align: center; }
.lb-pk-x2 { padding: 2px 12px; border-radius: 99px; background: #ffe66b; color: #5a1a00; font-size: 22px; font-weight: 900; animation: lbBeat .4s ease-in-out infinite alternate; }
.lb-pk.lb-final .lb-pk-clock { color: #ff8a6b; animation: lbBeat .5s ease-in-out infinite alternate; }
.lb-pk-bar { position: relative; height: 46px; border-radius: 99px; overflow: hidden; display: flex; background: rgba(0,0,0,.5); border: 2px solid rgba(255,255,255,.2); }
.lb-pk-fill { height: 100%; transition: width .45s cubic-bezier(.2,.9,.3,1); }
.lb-pk-fill.lb-l { background: linear-gradient(90deg, color-mix(in srgb, var(--pk-l) 55%, #000), var(--pk-l)); }
.lb-pk-fill.lb-r { background: linear-gradient(270deg, color-mix(in srgb, var(--pk-r) 55%, #000), var(--pk-r)); }
.lb-pk-spark { position: absolute; top: -6px; bottom: -6px; width: 10px; margin-left: -5px; border-radius: 5px; background: #fff; box-shadow: 0 0 16px #fff, 0 0 30px #ffe66b; transition: left .45s cubic-bezier(.2,.9,.3,1); }
.lb-pk-spark.lb-hit { animation: lbSpark .35s ease-out; }
.lb-pk-pts { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; font-size: 25px; font-weight: 900; color: #fff; text-shadow: 0 2px 3px rgba(0,0,0,.9); font-variant-numeric: tabular-nums; }
.lb-pk-pts.lb-l { left: 18px; } .lb-pk-pts.lb-r { right: 18px; }
.lb-pk-res { display: none; }
.lb-pk.lb-result .lb-pk-res { display: block; margin-top: 10px; text-align: center; }
.lb-pk-win { font-family: var(--font-title); font-size: 34px; color: #ffe66b; text-shadow: 0 3px 0 rgba(0,0,0,.6); }
.lb-pk-mvps { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; }
.lb-pk-mvp { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 800; min-width: 0; }
.lb-pk-mvp.lb-r { flex-direction: row-reverse; }
.lb-pk-mvp .lb-tag { padding: 1px 8px; border-radius: 8px; background: rgba(255,255,255,.14); font-size: 16px; color: #ffe66b; }
.lb-pk-mvp .lb-nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-pk.lb-wl { border-color: var(--pk-l); box-shadow: 0 0 40px color-mix(in srgb, var(--pk-l) 70%, transparent); }
.lb-pk.lb-wr { border-color: var(--pk-r); box-shadow: 0 0 40px color-mix(in srgb, var(--pk-r) 70%, transparent); }
@keyframes lbSpark { 0% { transform: scaleY(1.6); box-shadow: 0 0 30px #fff, 0 0 60px #ffe66b; } 100% { transform: none; } }

/* Lời cảm ơn & mốc */
:where(.lb-toasts) { left: 50%; transform: translateX(-50%); top: 34%; width: 820px; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
:where(#stage.landscape .lb-toasts) { top: 300px; }
#stage.lb-layout .lb-toasts { min-height: 60px; }
.lb-toast { display: flex; align-items: center; gap: 10px; max-width: 100%; padding: 8px 22px; border-radius: 999px; background: rgba(60, 10, 40, .9); border: 2px solid #ff9ac8;
  font-size: 25px; font-weight: 800; color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.45); animation: lbPop .45s cubic-bezier(.2,1.4,.4,1) both; }
.lb-toast .lb-tx { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-toast .lb-ico { font-size: 28px; }
.lb-toast.lb-big { padding: 12px 28px; font-size: 32px; background: linear-gradient(90deg, rgba(20, 50, 110, .95), rgba(70, 20, 110, .95)); border-color: #9fe7ff; box-shadow: 0 0 34px rgba(140, 220, 255, .7); }
.lb-toast.lb-out { animation: fOut .5s ease-in forwards; }
.set-row > .chk { flex: 1 1 0; min-width: 0; }
.set-row .lbl { flex-basis: auto; }
.set-row:has(> .chk) .lbl { flex: 0 0 auto; max-width: 34%; }
:where(#stage[data-shape=square] .lb-pk) { top: 20px; width: 860px; }
:where(#stage[data-shape=square] .lb-toasts) { top: 300px; }
/* 3:4 (1080×1440): PK dưới các thông báo, băng rôn thấp hơn để không che thẻ kết quả PK / thanh mục tiêu */
:where(#stage.frame-34 .lb-pk) { top: 400px; }
:where(#stage.frame-34 .lb-toasts) { top: 560px; }
:where(#stage.frame-34) #banner { top: 46%; }

/* Băng rôn phủ ngang cả khung: kit phóng CHỮ bên trong theo cỡ giao diện × độ phân giải (không phóng cả hộp → không tràn) */
#banner .b-ico, #banner .b-big, #banner .b-small { zoom: var(--lb-hud-k, 1); }
