body:has(.livebox) header.top { z-index: 90; }
body:has(.livebox) .side { z-index: 80; }
.player:has(.livebox) { isolation: isolate; z-index: 0; background: #05060a !important; border-radius: 0; }
.livebox { position: absolute; inset: 0; z-index: 2 !important; background: #05060a; color: #f4f7fb; overflow: hidden; font-family: Inter, Arial, sans-serif; pointer-events: auto; }
.livebox-video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; pointer-events: none; }
.livebox-idle { position: absolute; inset: 0 0 64px 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; pointer-events: none; }
.livebox-idle[hidden] { display: none !important; }
.livebox-status { margin: 0; max-width: 420px; font-size: 14px; line-height: 1.4; color: #d7dee8; pointer-events: none; text-shadow: 0 1px 2px #000; }
.livebox-go { pointer-events: auto; border: 0; border-radius: 8px; background: #d6ff4a; color: #11140a; font-weight: 800; font-size: 15px; padding: 12px 18px; cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.livebox-go:disabled { opacity: .65; cursor: wait; }
.livebox-bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 8; display: flex; align-items: center; gap: 4px; height: 64px; padding: 0 10px 10px; background: linear-gradient(180deg, rgba(5,6,10,0), rgba(5,6,10,.94) 58%); pointer-events: auto; overflow: visible; }
.livebox-bar .kb, .livebox-bar svg, .livebox-bar .picon { pointer-events: none; }
.livebox-bar .kb { pointer-events: auto; flex: 0 0 40px; width: 40px; height: 40px; }
.livebox-bar .kb { width: 40px; height: 40px; padding: 0; border: 1px solid rgba(255,255,255,.1); border-radius: 999px; background: rgba(255,255,255,.08); color: #fff; cursor: pointer; display: grid; place-items: center; touch-action: manipulation; box-shadow: inset 0 1px 0 rgba(255,255,255,.12); transition: background .15s ease, color .15s ease, transform .15s ease; }
.livebox-bar .kb:hover, .livebox-bar .kb:focus-visible { background: rgba(255,255,255,.2); transform: translateY(-1px); }
.livebox-bar .kb.on { background: #d6ff4a; color: #11140a; border-color: transparent; }
.livebox-bar .kb svg, .livebox-bar .ic-play, .livebox-bar .ic-pause, .livebox-bar .ic-vol, .livebox-bar .ic-mute { position: static !important; width: 20px; height: 20px; display: grid; place-items: center; animation: none !important; background: none !important; inset: auto !important; }
.livebox-bar svg { width: 20px; height: 20px; fill: currentColor; display: block; }
.livebox.is-paused .ic-pause, .livebox:not(.is-paused) .ic-play, .livebox.is-muted .ic-vol, .livebox:not(.is-muted) .ic-mute { display: none; }
.livebox-vol { width: 84px; height: 4px; accent-color: #d6ff4a; cursor: pointer; }
.livebox-badge { margin-left: 8px; background: #ff3355; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .08em; border-radius: 4px; padding: 3px 6px; line-height: 1; }
.livebox-spacer { flex: 1; }
.livebox-end { margin: 0 4px 0 0; }
.livebox-end button { height: 32px; border: 0; border-radius: 6px; background: #ff3355; color: #fff; font-weight: 800; font-size: 13px; padding: 0 12px; cursor: pointer; }
.livebox-pop { position: absolute; right: 10px; bottom: 62px; z-index: 6; width: min(280px, calc(100% - 20px)); display: grid; gap: 8px; padding: 12px; background: rgba(12,14,20,.94); color: #f4f7fb; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; box-shadow: 0 18px 50px rgba(0,0,0,.45); backdrop-filter: blur(16px); }
.livebox-pop[hidden] { display: none !important; }
.livebox-pop p { margin: 0; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #9aa3b2; }
.livebox-pop input { width: 100%; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; background: #090b10; color: #fff; padding: 8px 10px; }
.livebox-pop button, .livebox-lens button { height: 32px; border: 0; border-radius: 8px; background: rgba(255,255,255,.08); color: #fff; cursor: pointer; }
.livebox-pop button.on, .livebox-lens button.on, .livebox-pop [data-act="saveclip"] { background: #d6ff4a; color: #11140a; font-weight: 800; }
.livebox-lens { display: flex; gap: 6px; }
.livebox-cc { position: absolute; left: 50%; bottom: 78px; transform: translateX(-50%); z-index: 7; max-width: min(640px, 90%); margin: 0; padding: 6px 10px; border-radius: 8px; background: rgba(0,0,0,.72); color: #fff; font-size: 16px; text-align: center; pointer-events: none; }
.livebox-cc[hidden] { display: none !important; }
.player:has(.livebox) > .stage-dock,
.player:has(.livebox) > .brand-layer,
.player:has(.livebox) > .chat-fab,
.player:has(.livebox) .ticker,
.player:has(.livebox) .yt-bar,
.player:has(.livebox) > .pill { display: none !important; }
body:has(.livebox) { background: #07080d; }
body:has(.livebox) .watch { background: #07080d; }
body:has(.livebox) .chatbox { background: #0c0e14; border-left: 1px solid rgba(255,255,255,.06); }
body:has(.livebox) .watch .channel-row { background: #0c0e14; border-top: 1px solid rgba(255,255,255,.06); }
body:has(.livebox) .watch h1 { font-size: 1.15rem; letter-spacing: -0.03em; }
.watch.stage-wide { grid-template-columns: minmax(0, 1fr) !important; }
.watch.stage-wide .chatbox { display: none !important; }
.watch.stage-wide .player { min-height: calc(100vh - 58px); }
.watch.stage-wide .channel-row { display: none; }
@media (max-width: 720px) {
  .livebox-vol { display: none; }
  .livebox-bar { height: 56px; padding: 0 6px 8px; overflow-x: auto; }
  .livebox-bar .kb { flex: 0 0 40px; width: 40px; height: 40px; }
  .player:has(.livebox) { aspect-ratio: 16 / 9; height: auto; min-height: 0; }
  .watch.stage-wide .player { min-height: 0; aspect-ratio: 16 / 9; }
}
