/* Jimbo Social: Live Battles + Live lane in Scrolls */
.bt-i { width: 20px; height: 20px; flex: none; }
.bt-spin { width: 30px; height: 30px; border-radius: 50%; border: 3px solid rgb(255 255 255 / .25); border-top-color: #fff; animation: lv-spin .8s linear infinite; }
.bt-v { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; background: #0b0b0b; }
.bt-v.is-on { opacity: 1; }
.bt-buf { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.bt-buf[hidden] { display: none; }

/* host's Battle button in the live bar */
.lv__bar { gap: .6rem; }
.bt-open { display: inline-flex; align-items: center; gap: .45rem; min-height: 48px; padding: 0 1.15rem; border: 0; border-radius: 999px; font: inherit; font-weight: 900; letter-spacing: .02em; color: #fff; cursor: pointer;
  background: linear-gradient(100deg, #e5262b 0 49%, #2f6fff 51% 100%); box-shadow: 0 6px 22px rgb(229 38 43 / .35), 0 6px 22px rgb(47 111 255 / .3); }
.bt-open:hover { filter: brightness(1.1); }
.lv.is-battle .bt-open { display: none; }

/* ---- battle layout ---- */
.lv { --bt-w: min(100vw, calc(100dvh * 9 / 16)); --bt-top: calc(max(.75rem, env(safe-area-inset-top)) + 112px); --bt-h: min(calc(var(--bt-w) / 2 * 1.42), 50dvh); }
.lv.is-battle .lv__stage { inset: auto; top: var(--bt-top); left: calc(50% - var(--bt-w) / 2); width: calc(var(--bt-w) / 2); height: var(--bt-h); max-width: none; margin: 0; border-radius: 0; overflow: hidden; }
.lv.is-battle .lv__shade { background: linear-gradient(180deg, rgb(0 0 0 / .35), transparent 30%); }
.lv.is-battle .lv__feed { bottom: calc(76px + env(safe-area-inset-bottom)); max-height: calc(100dvh - var(--bt-top) - var(--bt-h) - 200px); overflow: hidden; justify-content: flex-end; }
.lv--cast.is-battle .lv__feed { bottom: calc(96px + env(safe-area-inset-bottom)); }
.lv.is-battle .lv__floats { display: none; }
.lv.is-battle:has(.bt.is-over) .lv__sound { display: none; }
.lv.is-battle .lv__sound { top: calc(var(--bt-top) + var(--bt-h) - 4.4rem); left: calc(50% - var(--bt-w) / 4); font-size: .82rem; padding: .55rem .8rem; }
.lv.is-battle .lv__buf { left: calc(50% - var(--bt-w) / 2); right: auto; width: calc(var(--bt-w) / 2); top: var(--bt-top); bottom: auto; height: var(--bt-h); }

.bt { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.bt > * { pointer-events: auto; }
.bt-opp, .bt-me { position: absolute; top: var(--bt-top); height: var(--bt-h); width: calc(var(--bt-w) / 2); overflow: hidden; }
.bt-opp { left: 50%; background: #0b0b0b; box-shadow: inset 3px 0 0 #050505; }
.bt-me { left: calc(50% - var(--bt-w) / 2); pointer-events: none; }
.bt-me > * { pointer-events: none; }
.bt-opp::before, .bt-me::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; transition: box-shadow .3s; }
.bt.is-lead-l .bt-me::after { box-shadow: inset 0 0 0 3px #ff4d4f, inset 0 0 40px rgb(229 38 43 / .35); }
.bt.is-lead-r .bt-opp::before { box-shadow: inset 0 0 0 3px #4c8dff, inset 0 0 40px rgb(47 111 255 / .35); }
.bt-tag { position: absolute; left: .5rem; bottom: .5rem; z-index: 2; display: inline-flex; align-items: center; gap: .35rem; max-width: calc(100% - 1rem); padding: .2rem .55rem .2rem .2rem; border-radius: 999px; background: rgb(0 0 0 / .55); backdrop-filter: blur(6px); font-size: .78rem; }
.bt-tag b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-snd, .bt-jump { position: absolute; z-index: 3; border: 0; color: #fff; cursor: pointer; background: rgb(0 0 0 / .5); backdrop-filter: blur(6px); font: inherit; }
.bt-snd { top: 2.3rem; right: .45rem; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; }
.bt-snd .bt-i { width: 18px; height: 18px; }
.bt-jump { top: 2.3rem; left: .45rem; display: inline-flex; align-items: center; gap: .25rem; padding: .35rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 800; }
.bt-jump .bt-i { width: 14px; height: 14px; }

/* score bar + clock */
.bt-score { position: absolute; top: calc(var(--bt-top) - 52px); left: calc(50% - var(--bt-w) / 2); width: var(--bt-w); height: 52px; padding: 0 .55rem; display: grid; align-content: center; }
.bt-score__bar { position: relative; display: flex; height: 26px; border-radius: 999px; overflow: hidden; background: #222; box-shadow: 0 4px 18px rgb(0 0 0 / .45); }
.bt-score__l, .bt-score__r { display: block; height: 100%; transition: width .45s cubic-bezier(.2, .9, .3, 1.2); }
.bt-score__l { width: 50%; background: linear-gradient(90deg, #b3141a, #ff4d4f); }
.bt-score__r { width: 50%; background: linear-gradient(90deg, #4c8dff, #1d4fd8); }
.bt-score__n { position: absolute; top: 50%; transform: translateY(-50%); font-weight: 900; font-size: .9rem; font-variant-numeric: tabular-nums; text-shadow: 0 1px 3px rgb(0 0 0 / .6); }
.bt-score__n--l { left: .7rem; } .bt-score__n--r { right: .7rem; }
.bt-score__spark { position: absolute; top: -4px; bottom: -4px; width: 6px; margin-left: -3px; border-radius: 3px; background: #fff; box-shadow: 0 0 12px 4px rgb(255 220 120 / .9); transition: left .45s cubic-bezier(.2, .9, .3, 1.2); }
.bt-clock { position: absolute; left: 50%; top: calc(100% - 4px); transform: translateX(-50%); display: inline-flex; align-items: center; gap: .4rem; padding: .22rem .65rem; border-radius: 0 0 10px 10px; background: rgb(0 0 0 / .72); font-size: .74rem; z-index: 3; }
.bt-clock__k { display: inline-flex; align-items: center; gap: .25rem; font-weight: 900; letter-spacing: .1em; color: #ffcf6b; }
.bt-clock__k .bt-i { width: 14px; height: 14px; }
.bt-clock__t { font-variant-numeric: tabular-nums; font-size: .9rem; }
.bt.is-final .bt-clock { background: #e5262b; animation: lv-pulse .9s infinite; }

/* countdown + effects */
.bt-cd { position: absolute; top: calc(var(--bt-top) + var(--bt-h) / 2); left: 50%; transform: translate(-50%, -50%); z-index: 5; font-family: var(--font-display); font-size: clamp(4rem, 22vw, 7rem); font-weight: 900; color: #fff; text-shadow: 0 0 30px rgb(255 180 40 / .9), 0 6px 20px rgb(0 0 0 / .6); pointer-events: none; }
.bt-cd.is-pop { animation: bt-pop .9s ease-out; }
.bt-fx { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.bt-fl { position: absolute; bottom: 8%; color: #ffcf6b; animation: bt-rise 1.5s ease-out forwards; }
.bt-fx--l .bt-fl { color: #ff7b7d; } .bt-fx--r .bt-fl { color: #8bb4ff; }
.bt-fl .bt-i { width: 30px; height: 30px; filter: drop-shadow(0 2px 4px rgb(0 0 0 / .6)); }
.bt-res { position: absolute; inset: 0; z-index: 4; display: grid; place-content: center; justify-items: center; gap: .2rem; pointer-events: none; animation: lv-in .4s ease-out; }
.bt-res b { font-family: var(--font-display); font-size: 2.2rem; font-weight: 900; letter-spacing: .06em; text-shadow: 0 4px 18px rgb(0 0 0 / .7); }
.bt-res .bt-i { width: 40px; height: 40px; color: #ffcf6b; fill: rgb(255 207 107 / .3); filter: drop-shadow(0 0 10px rgb(255 180 40 / .8)); }
.bt-res.is-win { background: radial-gradient(circle, rgb(255 180 40 / .28), transparent 70%); }
.bt-res.is-lose { background: rgb(0 0 0 / .5); } .bt-res.is-lose b { font-size: 1.4rem; opacity: .8; }
.bt-res.is-tie b { color: #ffcf6b; }
.bt-conf { position: absolute; top: -10px; width: 8px; height: 12px; border-radius: 2px; z-index: 5; animation: bt-conf 2.4s ease-in forwards; }

/* under the panes */
.bt-under { position: absolute; top: calc(var(--bt-top) + var(--bt-h) + .4rem); left: calc(50% - var(--bt-w) / 2); width: var(--bt-w); display: flex; justify-content: space-between; padding: 0 .55rem; }
.bt-tops { display: flex; gap: .3rem; align-items: center; min-height: 26px; }
.bt-tops small { font-size: .7rem; opacity: .6; }
.bt-top { position: relative; }
.bt-top i { position: absolute; right: -3px; bottom: -3px; width: 14px; height: 14px; border-radius: 50%; display: grid; place-items: center; font-size: .6rem; font-style: normal; font-weight: 900; background: #ffb428; color: #1a1a1a; }
.bt-cheer { position: absolute; top: calc(var(--bt-top) + var(--bt-h) + 2.6rem); left: calc(50% - var(--bt-w) / 2); width: var(--bt-w); display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; padding: 0 .55rem; }
.bt-horn { display: flex; align-items: center; justify-content: center; gap: .4rem; min-height: 48px; padding: .4rem .6rem; border: 0; border-radius: 14px; color: #fff; font: inherit; font-size: .82rem; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.bt-horn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-horn--l { background: linear-gradient(135deg, #c41d22, #ff4d4f); box-shadow: 0 6px 18px rgb(229 38 43 / .35); }
.bt-horn--r { background: linear-gradient(135deg, #1d4fd8, #4c8dff); box-shadow: 0 6px 18px rgb(47 111 255 / .35); }
.bt-horn.is-hit { animation: bt-hit .25s ease-out; }
.bt.is-over .bt-cheer { opacity: .35; pointer-events: none; }
.bt-hostnote { position: absolute; top: calc(var(--bt-top) + var(--bt-h) + 2.5rem); left: 50%; transform: translateX(-50%); width: calc(var(--bt-w) - 1.4rem); margin: 0; font-size: .74rem; line-height: 1.4; opacity: .75; text-align: center; }

/* final card */
.bt-final { position: absolute; left: 50%; top: calc(var(--bt-top) + var(--bt-h) - 1rem); transform: translateX(-50%); width: min(92vw, 380px); z-index: 6; display: grid; justify-items: center; gap: .5rem; padding: 1rem 1.1rem 1.1rem; border-radius: 20px; background: rgb(14 14 14 / .92); backdrop-filter: blur(14px); text-align: center; box-shadow: 0 18px 50px rgb(0 0 0 / .55); animation: lv-in .35s ease-out; }
.bt-final h3 { margin: 0; font-family: var(--font-display); font-size: 1.3rem; font-weight: 900; }
.bt-final__k { display: inline-flex; align-items: center; gap: .35rem; margin: 0; font-size: .72rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: #ffcf6b; }
.bt-final__k .bt-i { width: 15px; height: 15px; }
.bt-final__s { margin: 0; font-size: .86rem; opacity: .8; }
.bt-row { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.bt-go { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 46px; padding: .6rem 1.15rem; border: 0; border-radius: 999px; background: #e5262b; color: #fff; font: inherit; font-weight: 900; cursor: pointer; }
.bt-go:hover { background: #ff3338; } .bt-go:disabled { opacity: .6; }
.bt-go--sm { min-height: 38px; padding: .4rem .9rem; font-size: .85rem; }
.bt-ghost { min-height: 46px; padding: .6rem 1.1rem; border-radius: 999px; border: 1px solid rgb(255 255 255 / .3); background: transparent; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }

/* invite card */
.bt-inv { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(92vw, 380px); z-index: 7; display: grid; justify-items: center; gap: .55rem; padding: 1.3rem 1.2rem; border-radius: 22px; text-align: center;
  background: linear-gradient(160deg, rgb(70 12 14 / .95), rgb(14 14 14 / .95) 45%, rgb(12 26 70 / .95)); border: 1px solid rgb(255 255 255 / .12); box-shadow: 0 20px 60px rgb(0 0 0 / .6); animation: lv-in .3s ease-out; }
.bt-inv h3 { margin: 0; font-family: var(--font-display); font-size: 1.25rem; font-weight: 900; }
.bt-inv p { margin: 0; font-size: .88rem; line-height: 1.45; opacity: .85; }
.bt-inv__vs { display: flex; align-items: center; gap: .7rem; }
.bt-inv__vs .js-av:first-child { box-shadow: 0 0 0 3px #e5262b; } .bt-inv__vs .js-av:last-child { box-shadow: 0 0 0 3px #2f6fff; }
.bt-inv__x { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #ffb428; color: #1a1a1a; animation: bt-hit 1.2s ease-in-out infinite; }

/* host sheet */
.bt-sheet { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: min(100vw, 460px); max-height: 78dvh; overflow-y: auto; z-index: 8; display: grid; gap: .7rem; padding: 1.1rem 1.1rem calc(1.1rem + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; background: rgb(16 16 16 / .96); backdrop-filter: blur(16px); box-shadow: 0 -12px 40px rgb(0 0 0 / .5); animation: bt-up .25s ease-out; }
.bt-sheet__hd { display: flex; align-items: center; justify-content: space-between; }
.bt-sheet h3 { margin: -.3rem 0 0; font-family: var(--font-display); font-size: 1.35rem; font-weight: 900; }
.bt-eyebrow { display: inline-flex; align-items: center; gap: .4rem; margin: 0; font-size: .74rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: #ffcf6b; }
.bt-eyebrow .bt-i { width: 16px; height: 16px; }
.bt-x { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgb(255 255 255 / .08); color: #fff; cursor: pointer; }
.bt-fine { margin: 0; font-size: .84rem; line-height: 1.45; opacity: .78; }
.bt-durs { display: flex; gap: .45rem; }
.bt-dur { flex: 1; min-height: 42px; border-radius: 12px; border: 1px solid rgb(255 255 255 / .18); background: rgb(255 255 255 / .05); color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.bt-dur[aria-checked=true] { background: #ffb428; border-color: #ffb428; color: #1a1a1a; }
.bt-rivals { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.bt-rv { display: flex; align-items: center; gap: .7rem; padding: .6rem; border-radius: 14px; background: rgb(255 255 255 / .06); }
.bt-rv .js-av { box-shadow: 0 0 0 2px #e5262b; }
.bt-rv > span { flex: 1; display: grid; min-width: 0; }
.bt-rv small { font-size: .78rem; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-rv em { display: inline-flex; align-items: center; gap: .25rem; font-style: normal; font-size: .72rem; opacity: .65; }
.bt-rv em .bt-i { width: 13px; height: 13px; }
.bt-load, .bt-empty { display: grid; justify-items: center; gap: .45rem; padding: 1.2rem .6rem; text-align: center; font-size: .88rem; }
.bt-empty .bt-i { width: 28px; height: 28px; color: #ff6b6d; }
.bt-empty small { opacity: .7; line-height: 1.4; }
.lv button:focus-visible { outline: 2px solid var(--amber, #ffb428); outline-offset: 2px; }

@keyframes bt-pop { 0% { transform: translate(-50%, -50%) scale(2); opacity: 0; } 25% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(.8); } }
@keyframes bt-rise { 0% { opacity: 0; transform: translateY(0) scale(.5); } 15% { opacity: 1; transform: translateY(-20px) scale(1.1); } 100% { opacity: 0; transform: translateY(-180px) scale(.9) rotate(-12deg); } }
@keyframes bt-hit { 50% { transform: scale(.94); } }
@keyframes bt-conf { to { transform: translate(var(--dx, 0), 60vh) rotate(540deg); opacity: 0; } }
@keyframes bt-up { from { transform: translate(-50%, 30px); opacity: 0; } }

/* ---- Live lane in Scrolls ---- */
.sx-tabs [data-sxtab=live] { position: relative; }
.sx-tabs [data-sxtab=live].has-live::after { content: ''; position: absolute; top: .2rem; right: -.1rem; width: 8px; height: 8px; border-radius: 50%; background: #ff3b3f; box-shadow: 0 0 0 2px #000; animation: lv-pulse 1.4s infinite; }
.sxl__stage { position: relative; overflow: hidden; background: #0b0b0b; }
.sxl__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(18px) brightness(.55); transform: scale(1.1); }
.sxl__vid { position: absolute; inset: 0; }
.sxl__shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgb(0 0 0 / .5) 0, transparent 20%, transparent 50%, rgb(0 0 0 / .8) 100%); }
.sxl__hit { position: absolute; inset: 0; z-index: 1; border: 0; background: transparent; cursor: pointer; }
.sxl__badges { position: absolute; top: calc(max(.75rem, env(safe-area-inset-top)) + 96px); left: .8rem; z-index: 2; display: flex; gap: .4rem; pointer-events: none; }
.sxl__live { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .6rem; border-radius: 6px; background: #e5262b; font-size: .76rem; font-weight: 900; letter-spacing: .08em; }
.sxl__live i { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: lv-pulse 1.2s infinite; }
.sxl.is-ended .sxl__live { background: rgb(0 0 0 / .6); }
.sxl__w, .sxl__bt { display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .55rem; border-radius: 6px; background: rgb(0 0 0 / .5); font-size: .78rem; font-weight: 800; }
.sxl__w .bt-i, .sxl__bt .bt-i { width: 15px; height: 15px; }
.sxl__bt { background: linear-gradient(100deg, #e5262b, #2f6fff); }
.sxl__bt[hidden] { display: none; }
.sxl__cm { position: absolute; left: .8rem; right: 4.5rem; bottom: calc(150px + env(safe-area-inset-bottom)); z-index: 2; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .35rem; pointer-events: none; -webkit-mask-image: linear-gradient(transparent, #000 35%); mask-image: linear-gradient(transparent, #000 35%); }
.sxl__cm li { display: flex; align-items: flex-start; gap: .45rem; font-size: .86rem; line-height: 1.35; text-shadow: 0 1px 3px rgb(0 0 0 / .8); }
.sxl__cm li span { padding: .3rem .6rem; border-radius: 14px; background: rgb(0 0 0 / .38); overflow-wrap: anywhere; }
.sxl__cm li.is-new { animation: lv-in .35s ease-out; }
.sxl__foot { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: grid; gap: .6rem; padding: .8rem .8rem calc(.9rem + env(safe-area-inset-bottom)); }
.sxl__who { display: flex; align-items: center; gap: .6rem; min-width: 0; pointer-events: none; }
.sxl__who .js-av { box-shadow: 0 0 0 2px #000, 0 0 0 4px #e5262b; }
.sxl__who span { display: grid; min-width: 0; } .sxl__who b { font-size: 1rem; text-shadow: 0 1px 4px rgb(0 0 0 / .7); }
.sxl__who small { font-size: .82rem; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sxl__say { display: flex; align-items: center; gap: .45rem; margin: 0; }
.sxl__say input { flex: 1; min-width: 0; height: 44px; padding: 0 1rem; border-radius: 999px; border: 1px solid rgb(255 255 255 / .25); background: rgb(0 0 0 / .45); color: #fff; font: inherit; font-size: 1rem; backdrop-filter: blur(6px); }
.sxl__say input::placeholder { color: rgb(255 255 255 / .7); }
.sxl__say button[type=submit] { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; background: rgb(0 0 0 / .45); color: #fff; cursor: pointer; }
.sxl__join { flex: none; min-height: 44px; padding: 0 1.1rem; border: 0; border-radius: 999px; background: #e5262b; color: #fff; font: inherit; font-weight: 900; cursor: pointer; box-shadow: 0 6px 18px rgb(229 38 43 / .4); }
.sxl__say:not(:has(input)) .sxl__join { flex: 1; }
.sc-qt--live .sc-qt__i { background: #e5262b; color: #fff; }
@media (prefers-reduced-motion: reduce) { .bt-fl, .bt-conf, .bt-cd.is-pop, .bt-inv__x, .sxl__live i { animation: none !important; } }
