/*! Copyright (c) 2026 BamByte (bambyte.net). All rights reserved.
 * Proprietary code: no copying, redistribution, or use to train or prompt
 * AI / machine-learning systems without written permission from BamByte. */
:root{
  --bg:#0b0f16;
  --panel:#151c24;
  --panel-2:#0c121a;
  --text:#e6eef6;
  --muted:#93a1b1;
  --line: rgba(24, 186, 255, 0.85);
  --accent:#18baff;
  /* Same hover/press feel as the main site's .btn/.pill (style.css) --
     kept as our own copy rather than linking style.css, since this page
     deliberately doesn't load the main site's stylesheet at all. */
  --bb-zoom: 1.08;
  --bb-press: 0.98;
  --bb-dur: 180ms;
  --bb-ease: cubic-bezier(.2,.8,.2,1);
}

/* ---- Interactive feedback for every clickable control on this page ---- */
.bb-btn, .bb-reaction, .bb-play-gate, .bb-make-host, .gif-result{
  transform-origin:center;
  transition: transform var(--bb-dur) var(--bb-ease), box-shadow var(--bb-dur) var(--bb-ease);
}
.bb-btn:hover:not(:disabled),
.bb-reaction:hover,
.bb-play-gate:hover,
.bb-make-host:hover,
.gif-result:hover{
  transform: scale(var(--bb-zoom));
  box-shadow: 0 0 0.5rem rgba(255,255,255,.25);
}
.bb-btn:focus-visible,
.bb-reaction:focus-visible,
.bb-play-gate:focus-visible{
  transform: scale(var(--bb-zoom));
  outline: 2px solid #7dd3fc;
  outline-offset: 2px;
}
.bb-btn:active:not(:disabled),
.bb-reaction:active,
.bb-play-gate:active,
.bb-make-host:active,
.gif-result:active{
  transform: scale(var(--bb-press));
}
@media (prefers-reduced-motion: reduce){
  .bb-btn, .bb-reaction, .bb-play-gate, .bb-make-host, .gif-result{ transition:none; }
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}

.bb-page{
  height:var(--bb-vh, 100vh);
  /* dvh tracks mobile browser chrome; --bb-app-h is the visualViewport
     height bingebyte.js sets on touch devices (iOS keyboard). Desktop has
     neither var nor a dvh/vh difference, so this resolves to 100vh there. */
  height:var(--bb-app-h, var(--bb-vh, 100dvh));
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

/* ---- Sidebar HUD panel (the old topbar's controls, moved 2026-11-11) ----
   Same shape as every other game's sidebar: a grey control pill of round
   /assets/shared buttons on top (Switch / Home / Chat / HUD / Layout), the
   Room: Public | Private switch under it (net/room_privacy.js inserts it
   right after .bb-ctrlbar), then the room code + Copy Link. The Chat / HUD
   buttons choose what fills the rest: the chat panel, or .bb-hud-body. */
.bb-hud-panel{
  flex:0 0 auto;
  gap:8px;
  padding:10px;
  position:relative;
  z-index:5; /* its popovers hang over the chat panel below */
}
.bb-ctrlbar{
  position:relative; /* the two popovers anchor to the whole pill */
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:6px 10px;
  border-radius:16px;
  background:#4a4a4a;
  border:2px solid #6d6d6d;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08), 0 2px 6px rgba(0,0,0,.45);
}
/* The wraps exist for bingebyte.js's outside-click checks; the menus anchor
   to the pill, not to their button, so they always fit the sidebar. */
.bb-switch-menu-wrap, .bb-layout-menu-wrap{ position:static; display:contents; }
.bb-ctrl-btn{
  flex:0 0 auto;
  display:block;
  width:40px;
  height:40px;
  padding:0;
  border:0;
  background:transparent;
  cursor:pointer;
  transition:filter .15s ease, transform .15s ease, opacity .15s ease;
}
.bb-ctrl-btn img{ display:block; width:100%; height:100%; object-fit:contain; pointer-events:none; }
.bb-ctrl-btn[hidden]{ display:none; }
.bb-ctrl-btn:hover,
.bb-ctrl-btn:focus-visible{ filter:brightness(1.18); transform:translateY(-1px); outline:none; }
/* Chat / HUD: the one you're on is lit, the other dimmed (as in hud_view.js). */
.bb-view-btn{ opacity:.62; }
.bb-view-btn:hover{ opacity:.85; }
.bb-view-btn.is-active{ opacity:1; }
/* New message while you're on the HUD: the Chat button throbs + glows. */
@keyframes bb-chat-alert{
  0%, 100%{ opacity:.35; scale:1; filter:drop-shadow(0 0 0 rgba(255,150,30,0)) brightness(.9); }
  50%     { opacity:1;   scale:1.16; filter:drop-shadow(0 0 10px rgba(255,150,30,.95)) brightness(1.55); }
}
#bb-view-chat-btn.bb-chat-alert{ animation:bb-chat-alert 1.8s ease-in-out infinite; }

.bb-hud-panel > .bb-room-privacy{ margin:0 auto !important; }
/* Room id + Copy Link, at the right end of the reactions bar under the video. */
.bb-room-row{
  display:flex;
  align-items:center;
  gap:8px;
  margin-left:auto;
  min-width:0;
}
.bb-room-row #bb-copy-link{ padding:6px 12px; white-space:nowrap; }
.bb-room-row .bb-room-code{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }

/* HUD view: logo + room info fill the sidebar instead of the chat. */
.bb-sidebar.is-hud-view .bb-hud-panel{ flex:1 1 auto; overflow-y:auto; }
.bb-sidebar.is-hud-view .bb-chat-panel{ display:none; }
.bb-hud-body{ display:flex; flex-direction:column; align-items:center; gap:12px; padding-top:6px; }
.bb-hud-body[hidden]{ display:none; }
.bb-hud-logo{ width:min(100%, 240px); height:auto; display:block; user-select:none; }
.bb-hud-info{
  width:100%;
  margin:0;
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:8px 12px;
  font-size:13px;
  background:var(--panel-2);
  border:1px solid var(--line);
  border-radius:10px;
  padding:10px 12px;
}
.bb-hud-info dt{ color:var(--muted); font-weight:600; }
.bb-hud-info dd{ margin:0; color:var(--text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* ---- Layout menu (dock chat left/right, see bingebyte.js) ---- */
.bb-layout-menu.popover{
  /* Overrides .popover's own chat-composer-specific anchoring (left/right/
     bottom, sized to sit above the chat input) -- this one hangs below the
     control pill, at its right end where the Layout button is. */
  left:auto;
  right:0;
  bottom:auto;
  top:calc(100% + 8px);
  width:max-content;
  max-height:none;
  display:flex;
  flex-direction:column;
  gap:6px;
  z-index:50;
}
.bb-layout-menu-item{ width:100%; text-align:left; white-space:nowrap; }

/* ---- Quick Switch (host-only game-picker, see bingebyte.js) ---- */
.bb-switch-menu.popover{
  /* Hangs below the control pill, full pill width. Chrome -- dark panel,
     gold border, radius/padding/shadow -- is matched to Connecto's
     .cn-online-switch-menu so every game's switch menu is identical. */
  left:0;
  right:0;
  bottom:auto;
  top:calc(100% + 8px);
  min-width:0;
  max-height:min(60vh, 520px);
  overflow-y:auto;
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:8px;
  background:#10131a;
  border:3px solid #c9a227;
  border-radius:14px;
  box-shadow:0 10px 30px rgba(0,0,0,.5);
  backdrop-filter:none;
  z-index:50;
}
/* Matches Connecto's .cn-online-switch-item exactly -- a plain button (no
   .bb-btn chrome; see bingebyte.js, which now builds these without that
   class), transparent with a green-bordered thumbnail. */
.bb-switch-menu-item{
  display:flex; align-items:center; gap:12px;
  width:100%; text-align:left; white-space:nowrap;
  background:transparent;
  border-radius:10px;
  cursor:pointer;
  padding:8px 10px;
  color:#eaeefb;
  font-size:15px; font-weight:600;
  transition:background .15s ease, transform .15s ease;
}
.bb-switch-menu-item:hover,
.bb-switch-menu-item:focus-visible{
  background:rgba(255,255,255,.08);
  transform:scale(1.02);
  outline:none;
}
.bb-switch-menu-item img{
  width:46px; height:28px; object-fit:cover; border-radius:6px; flex:none; border:2px solid #0cd337;
}

.bb-room-code{
  font-weight:700;
  letter-spacing:.02em;
  background:#0e1622;
  border:1px solid var(--line);
  border-radius:8px;
  padding:6px 10px;
  font-size:13px;
}

/* ---- Buttons ---- */
.bb-btn{
  cursor:pointer;
  color:var(--text);
  background:#12324a;
  border:1px solid var(--line);
  border-radius:8px;
  padding:8px 14px;
  font-weight:600;
  font-size:13px;
}
.bb-btn:hover{ background:#17415f }
.bb-btn:disabled{ opacity:.5; cursor:not-allowed }
.bb-btn-ghost{ background:transparent }
.bb-icon-btn{
  width:40px; height:40px;
  padding:0;
  display:flex; align-items:center; justify-content:center;
  font-size:16px;
  border-radius:50%;
}

/* Same site-wide "glass button" art used elsewhere (nav pills, other
   buttons) -- center/100% 100% stretches the art to exactly fill the
   button's own box, matching how style.css's own .btn/.pill rules use
   these same PNGs, rather than tiling or letterboxing them. */
#bb-load-btn{
  background: url('../../assets/img/purple_glass_button.webp') center/100% 100% no-repeat;
  border:0;
  color:#fff;
  text-shadow:0 1px 0 rgba(0,0,0,.35);
  min-width:84px;
  height:40px;
  padding:0 18px;
}
/* Emoji / GIF / camera / mic / Send art comes ONLY from /chat_buttons.js (the
   shared round sprite buttons, which hide the button text). Old per-button
   glass rules here used to paint over that art, leaving blank coloured
   rectangles -- don't add backgrounds or sizes for those ids in this file. */
.bb-chat-tool-btn{ flex-shrink:0; }
/* ---- Main layout ---- */
/* --bb-sidebar-w is read/written by bingebyte.js's resize-handle drag
   (and restored from localStorage on load) -- the fallback here only
   matters before that JS ever runs (first paint). */
.bb-main{
  flex:1;
  display:grid;
  grid-template-columns: minmax(0,1fr) 10px var(--bb-sidebar-w, 320px);
  gap:16px 0;
  padding:16px 18px;
  min-height:0;
}
/* Chat docked right (default): stage, handle, sidebar left-to-right in
   that source order already, so no explicit `order` needed here -- only
   .bb-dock-left below has to override anything. */
@media (max-width: 900px), (orientation: portrait) and (max-width: 1024px){
  /* Stage + sidebar no longer fit side-by-side, so they stack -- their
     combined content can easily exceed one viewport's height on a small
     screen, unlike the two-column desktop layout this file is otherwise
     built to fit without scrolling. Scope the scroll to just this region
     rather than the whole page, since .bb-page is deliberately
     overflow:hidden. Dragging a column splitter makes no sense once
     everything's stacked in one column, and left/right docking is a
     wide-screen-only concept -- both collapse to the same single-column,
     handle-less layout here regardless of .bb-dock-left. */
  .bb-main, .bb-main.bb-dock-left{ grid-template-columns: minmax(0,1fr); overflow-y:auto; }
  .bb-resize-handle{ display:none; }
}

/* ---- Dock left/right (layout menu, see bingebyte.js) ---- */
.bb-main.bb-dock-left{
  grid-template-columns: var(--bb-sidebar-w, 320px) 10px minmax(0,1fr);
}
.bb-main.bb-dock-left .bb-stage{ order:3; }
.bb-main.bb-dock-left .bb-resize-handle{ order:2; }
.bb-main.bb-dock-left .bb-sidebar{ order:1; }

/* ---- Resize handle (drag to resize the chat/sidebar column) ---- */
.bb-resize-handle{
  cursor:col-resize;
  position:relative;
  background:transparent;
}
/* A slim visible line centered in the handle's own 10px hit area -- the
   full 10px stays the actual drag/hover target so it's easy to grab, not
   just the thin painted line. */
.bb-resize-handle::before{
  content:"";
  position:absolute;
  top:0; bottom:0;
  left:50%;
  width:2px;
  transform:translateX(-50%);
  background:var(--line);
  opacity:.35;
  border-radius:2px;
  transition:opacity var(--bb-dur) var(--bb-ease), background var(--bb-dur) var(--bb-ease);
}
.bb-resize-handle:hover::before,
.bb-resize-handle.bb-resizing::before{
  opacity:1;
  background:var(--accent);
}
/* Set on <body> while actively dragging so the cursor stays col-resize
   (and text/selection doesn't fight the drag) even when the mouse briefly
   moves off the thin handle itself between mousemove events. */
body.bb-resizing-cursor{ cursor:col-resize !important; user-select:none; }

/* ---- Sidebar fold arrow (net/sidebar_collapse.js, auto-mounted by
   net/site_nav.js on every game) ----
   That script drops its arrow button straight into .bb-main, as if the row
   were a flex row like the other games'. Here it's a 3-column GRID
   (sidebar | handle | stage), so a 4th child shoved the stage into the
   sidebar's column and left the right side empty (2026-11-11). So the arrow
   is taken out of the grid entirely and parked over the resize handle --
   the 10px column between the sidebar and the stage. */
.bb-main{ position:relative; }
.bb-main > .bb-sidebar-collapse-btn{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  margin:0;
}
/* Handle centre = padding 18 + sidebar + 5; minus half the 18px arrow. */
.bb-main > .bb-sidebar-collapse-btn[data-side="right"]{ left:auto; right:calc(var(--bb-sidebar-w, 320px) + 14px); }
.bb-main > .bb-sidebar-collapse-btn[data-side="left"]{ right:auto; left:calc(var(--bb-sidebar-w, 320px) + 14px); }

/* ---- Stage ---- */
.bb-stage{
  display:flex;
  flex-direction:column;
  gap:10px;
  min-width:0;
  min-height:0;
}
.bb-player-wrap{
  position:relative;
  width:100%;
  flex:1 1 auto;
  min-height:0;
  background:#000;
  border:3px solid var(--line);
  border-radius:14px;
  overflow:hidden;
}
@media (max-width: 900px), (orientation: portrait) and (max-width: 1024px){
  /* Below the breakpoint that stacks stage/sidebar into one column (see
     .bb-main), there's no longer a fixed-height row for the player to flex
     within -- fall back to a normal aspect-ratio box so it still gets a
     sane height instead of collapsing to 0. */
  .bb-player-wrap{ flex:none; aspect-ratio:16/9; }
}
.bb-player-wrap #bb-player-mount,
.bb-player-wrap #bb-player-mount iframe{
  width:100%;
  height:100%;
  border:0;
  display:block;
}
.bb-placeholder{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:24px;
  color:var(--muted);
  background:radial-gradient(circle at center, #131a24, #0a0e14);
  pointer-events:none;
}
/* [hidden] and a plain class selector both have equal specificity, so
   without this the `display:flex` above silently wins over the browser's
   default `[hidden]{display:none}` -- bingebyte.js's `placeholderEl.hidden
   = true` would then do nothing, leaving this opaque panel covering the
   video underneath even though it's actually loaded and playing. */
.bb-placeholder[hidden]{ display:none; }

/* Shown whenever THIS tab's player was started programmatically off a
   `media:sync` it didn't itself just trigger (a late join, or any reload
   that rejoins a room where the video is already playing) rather than a
   fresh Load/Play click -- browsers block that with-sound autoplay
   regardless of whether this tab happens to be the host. This button IS
   the real click that satisfies the policy; see bingebyte.js's
   lastLocalActionAt. */
.bb-play-gate{
  position:absolute;
  inset:0;
  z-index:6;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  margin:auto;
  width:max-content;
  height:max-content;
  padding:14px 22px;
  font-size:16px;
  font-weight:700;
  color:var(--text);
  background:rgba(12,18,26,.92);
  border:2px solid var(--line);
  border-radius:999px;
  cursor:pointer;
}
.bb-play-gate:hover{ background:#17415f }
.bb-play-gate[hidden]{ display:none; }

/* ---- Screen share (screen_share.js) ---- */
.bb-share-view{
  position:absolute;
  inset:0;
  z-index:7; /* over the player AND its Click-to-Watch gate */
  background:#000;
}
.bb-share-view[hidden]{ display:none; }
.bb-share-view video{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
  background:#000;
}
.bb-share-badge{
  position:absolute;
  top:10px; left:10px;
  max-width:calc(100% - 20px);
  padding:5px 10px;
  border-radius:999px;
  background:rgba(12,18,26,.82);
  border:1px solid var(--line);
  color:var(--text);
  font-size:12px;
  font-weight:600;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  pointer-events:none;
}
.bb-share-wait{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  text-align:center;
  color:var(--muted);
  pointer-events:none;
}
.bb-share-wait[hidden]{ display:none; }
.bb-share-sound-gate{
  position:absolute;
  left:50%; bottom:64px;
  transform:translateX(-50%);
  padding:10px 18px;
  border-radius:999px;
  border:2px solid var(--line);
  background:rgba(12,18,26,.92);
  color:var(--text);
  font-size:14px;
  font-weight:700;
  cursor:pointer;
}
.bb-share-sound-gate:hover{ background:#17415f }
.bb-share-sound-gate[hidden]{ display:none; }
.bb-share-tools{
  position:absolute;
  right:10px; bottom:10px;
  display:flex;
  align-items:center;
  gap:6px;
  padding:4px 6px;
  border-radius:10px;
  background:rgba(12,18,26,.82);
  opacity:.35;
  transition:opacity var(--bb-dur) var(--bb-ease);
}
.bb-share-view:hover .bb-share-tools,
.bb-share-tools:focus-within{ opacity:1; }
@media (hover: none){ .bb-share-tools{ opacity:1; } }
.bb-share-tools[hidden], .bb-share-tools [hidden]{ display:none; }
.bb-share-tools .bb-icon-btn{ width:34px; height:34px; padding:0; }
.bb-share-volume{ width:90px; accent-color:var(--accent); }

/* Sits in the sidebar HUD panel, under Room: Public | Private (it used to be
   its own row under the video -- removed so the player gets that height). */
.bb-share-bar{
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:4px;
}
/* Clicking Share Screen opens this under it: Quality, Sound, Start Sharing. */
.bb-share-settings.popover{
  position:absolute;
  top:calc(100% + 6px);
  left:50%; right:auto; bottom:auto;   /* override the composer .popover anchoring */
  max-height:none; overflow:visible;
  translate:-50% 0;
  z-index:30;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:8px;
  width:max-content;
  max-width:calc(100% + 8px);
  padding:10px 12px;
  background:var(--panel);
  border:1px solid #ecca08e4;
  border-radius:12px;
  box-shadow:0 10px 26px rgba(0,0,0,.55);
}
.bb-share-settings[hidden]{ display:none; }
.bb-share-settings .bb-share-field{ justify-content:space-between; }
.bb-share-go{ padding:7px 14px; font-weight:700; }
/* The Share Screen button IS the art (share_screen_btn.webp, 3:1 with a thin
   transparent edge) -- no .bb-btn chrome behind it. */
.bb-share-btn{
  display:inline-flex;
  align-items:center;
  height:42px;
  padding:0;
  border:0;
  background:none;
  cursor:pointer;
  transition:transform var(--bb-dur) var(--bb-ease), filter var(--bb-dur) var(--bb-ease);
}
.bb-share-btn-art{ height:100%; width:auto; display:block; user-select:none; pointer-events:none; }
.bb-share-btn:hover:not(:disabled),
.bb-share-btn:focus-visible{ transform:scale(1.05); filter:brightness(1.08); }
.bb-share-btn:active:not(:disabled){ transform:scale(var(--bb-press)); }
.bb-share-btn:focus-visible{ outline:2px solid var(--accent); outline-offset:3px; border-radius:999px; }
.bb-share-btn:disabled{ cursor:not-allowed; }
.bb-share-btn.is-picking .bb-share-btn-art{ opacity:.6; } /* browser's picker is open */
/* While sharing: the art steps aside for a red Stop pill of the same height. */
.bb-share-btn-stop{ display:none; }
.bb-share-btn.is-sharing .bb-share-btn-art{ display:none; }
.bb-share-btn.is-sharing .bb-share-btn-stop{
  display:inline-flex;
  align-items:center;
  height:100%;
  padding:0 18px;
  border-radius:999px;
  border:2px solid #ff5a6a;
  background:#5a1a22;
  color:var(--text);
  font-weight:700;
  font-size:14px;
}
.bb-share-btn.is-sharing:hover .bb-share-btn-stop{ background:#7a2230; }
@media (prefers-reduced-motion: reduce){ .bb-share-btn{ transition:none; } }
.bb-share-field{
  display:flex;
  align-items:center;
  gap:6px;
  color:var(--muted);
  font-size:12px;
}
.bb-share-field select{
  background:#0b1220;
  color:var(--text);
  border:1px solid var(--line);
  border-radius:8px;
  padding:5px 8px;
  font-size:13px;
}
.bb-share-note{
  color:var(--muted);
  font-size:12px;
  font-weight:600;
  text-align:center;
}
.bb-share-note:empty{ display:none; }
/* Not the host: the whole row is greyed out and says why. */
.bb-share-bar.is-locked{ filter:grayscale(1); opacity:.55; cursor:not-allowed; }
.bb-share-bar.is-locked *{ cursor:not-allowed; }
.bb-share-bar.is-locked .bb-share-note{ color:var(--text); }
.bb-share-bar select:disabled{ opacity:.6; }

.bb-host-bar{
  display:flex;
  gap:8px;
}
.bb-host-bar input{
  flex:1;
  background:#0b1220;
  color:var(--text);
  border:3px solid var(--line);
  border-radius:10px;
  padding:9px 10px;
  font-size:14px;
}

.bb-controls{
  display:flex;
  align-items:center;
  gap:12px;
  background:var(--panel-2);
  border:1px solid #ecd108e0;
  border-radius:12px;
  padding:8px 14px;
}
.bb-seek{
  flex:1;
  accent-color:var(--accent);
}
.bb-time{
  font-variant-numeric:tabular-nums;
  color:var(--muted);
  font-size:12px;
  white-space:nowrap;
}

.bb-reactions{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
}
/* Logo in the middle of the emote bar. Equal auto margins centre it in the
   space between the emotes and the room id (which drops its own auto margin
   here); the negative block margin keeps the bar from getting taller. */
.bb-bar-logo{
  height:40px; width:auto; max-width:30%;
  object-fit:contain;
  margin:-4px auto;
  flex:0 1 auto; min-width:0;
  user-select:none; -webkit-user-drag:none; pointer-events:none;
}
.bb-bar-logo + .bb-room-row{ margin-left:0; }
/* Scoped to the emote bar's ID on purpose. chat_reactions.js -- which
   bingebyte.js imports for the chat's message-reaction pills -- injects its
   OWN .bb-reaction rule into <head> at runtime: same specificity as a bare
   .bb-reaction, but later in the cascade, and it opens with `all:unset`. That
   quietly wiped the turquoise glass button off these emote buttons; nobody
   removed it (user, 2026-10-30).

   It has to be #bb-reactions and not .bb-reactions: chat_reactions.js builds
   each message's pill bar as a .bb-reactions div of its own, so the class
   would dress every reaction pill in the chat as a glass button too. The emote
   bar is the only one carrying the id (see index.html).

   `all:unset` also resets display and colour, which this rule never set, so
   they are stated here now. */
#bb-reactions .bb-reaction{
  cursor:pointer;
  background: url('../../assets/img/turq_glass_button.webp') center/100% 100% no-repeat;
  border:0;
  border-radius:6px;
  padding:6px 12px;
  font-size:18px;
  line-height:1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:inherit;
}

/* Floating emoji burst */
.bb-float-emoji{
  position:absolute;
  font-size:28px;
  pointer-events:none;
  animation: bb-float-up 1.6s ease-out forwards;
  z-index:5;
}
@keyframes bb-float-up{
  0%   { transform: translateY(0) scale(0.8); opacity:1; }
  100% { transform: translateY(-120px) scale(1.2); opacity:0; }
}

/* ---- Sidebar ---- */
.bb-sidebar{
  display:flex;
  flex-direction:column;
  gap:16px;
  min-height:0;
}
.bb-panel{
  background:var(--panel);
  border:3px solid var(--line);
  border-radius:14px;
  padding:12px;
  display:flex;
  flex-direction:column;
  min-height:0;
}
.bb-panel h3{
  margin:0 0 8px;
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:var(--muted);
}
/* The sidebar's panels wear the old topbar's yellow (owner, 2026-11-11);
   the video frame keeps the blue. */
.bb-sidebar .bb-panel{ border-color:#ecca08e4; }

/* ---- Chat | Watching tabs (like the other games' Chat | Players) ---- */
.bb-tabs{
  display:flex;
  gap:8px;
  margin:0 0 10px;
  flex:0 0 auto;
}
.bb-tab{
  cursor:pointer;
  padding:6px 12px;
  border-radius:8px;
  border:1px solid rgba(255,255,255,.18);
  background:var(--panel-2);
  color:var(--muted);
  font:700 12px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.bb-tab:hover{ color:var(--text); }
.bb-tab.is-active{ color:var(--text); outline:2px solid #ecca08e4; outline-offset:-1px; }
/* A new message while you're on Watching. */
.bb-tab.has-unread::after{
  content:"";
  display:inline-block;
  width:7px; height:7px;
  margin-left:6px;
  vertical-align:middle;
  border-radius:50%;
  background:#ff8a1e;
  box-shadow:0 0 6px rgba(255,138,30,.9);
}
/* Watching tab: the list fills the panel and every part of the chat (log,
   typing line, composer, and whatever chat_images / chat_voice add beside
   the composer) steps aside. Chat tab: the list is hidden. */
.bb-chat-panel.is-watching > :not(.bb-tabs):not(.bb-watching-list){ display:none !important; }
.bb-chat-panel:not(.is-watching) > .bb-watching-list{ display:none; }
.bb-watching-list{ flex:1 1 auto; min-height:0; }

.bb-participants{
  list-style:none;
  margin:0;
  padding:0;
  overflow-y:auto;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.bb-participants li{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:13px;
  padding:4px 0;
}
.bb-participants .bb-host-tag{
  font-size:10px;
  font-weight:700;
  color:#0b0f16;
  background:var(--accent);
  border-radius:6px;
  padding:1px 6px;
}
.bb-participants .bb-make-host{
  margin-left:auto;
  cursor:pointer;
  font-size:11px;
  color:var(--muted);
  background:transparent;
  border:1px solid var(--line);
  border-radius:6px;
  padding:2px 6px;
}
.bb-participants .bb-make-host:hover{ color:var(--text) }

.bb-chat-panel{ flex:1; position:relative }
.bb-chat-log{
  flex:1;
  min-height:120px;
  max-height:100%;
  overflow-y:auto;
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-bottom:8px;
}
/* Discord-style row: avatar left, bold name over the message. */
.bb-chat-log .bb-chat-line{
  font-size:13px;
  line-height:1.4;
  display:flex;
  align-items:flex-start;
  gap:8px;
  margin-bottom:6px;
}
.bb-chat-log .bb-chat-avatar{
  width:32px; height:32px; border-radius:50%; object-fit:cover;
  flex:0 0 32px; margin-top:1px; background:#2b2f3a;
}
.bb-chat-log .bb-chat-body{ min-width:0; flex:1 1 auto; }
.bb-chat-log .bb-chat-name{
  font-weight:700;
  color:var(--accent);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  display:block;
}
.bb-chat-log .bb-chat-text{ overflow-wrap:anywhere; word-break:break-word; }
/* Emoji/GIF sit on their own row above input+send instead of to the
   input's left (that squeezed the input too narrow to be usable) -- same
   2-row CSS grid fix as BB_Connecto/BB_PocketKings' own chat composers,
   just against this game's own bb-*-btn ids instead of chat_core.js's
   shared classes, since BingeByte has its own purpose-built chat form
   rather than using that shared widget. */
.bb-chat-form{
  display:grid;
  grid-template-columns: auto auto auto auto 1fr auto;
  grid-template-areas:
    "emoji gif   photo mic   .     .   "
    "input input input input input send";
  gap:6px;
  align-items:center;
}
#bb-emoji-btn{ grid-area: emoji; }
#bb-gif-btn{ grid-area: gif; }
/* How the chat buttons LOOK (emoji / GIF / camera / mic / Send) comes from
   /chat_buttons.js, which bingebyte.js calls. This file only places them.
   The mic gets its own cell: chat_buttons.js sets margin:0 on it, so a
   margin-left nudge can't move it off the camera. */
#bb-image-btn{ grid-area: photo; }
#bb-mic-btn{ grid-area: mic; }
#bb-send-btn{ grid-area: send; }
.bb-chat-form input{
  grid-area: input;
  background:#0b1220;
  color:var(--text);
  border:3px solid var(--line);
  border-radius:10px;
  padding:8px 10px;
  font-size:13px;
  min-width:0;
}

/* Same emoji picker (emoji_lib.js -- emoji-mart) and GIF search
   (gif_lib.js -- Giphy) as the site's other chats, e.g. bb_social.html --
   themed to BingeByte's own dark/cyan panel look rather than the main
   site's, since this widget doesn't load style.css at all. */
.bb-chat-gif{
  max-width:min(300px, 100%);
  max-height:300px;
  border-radius:8px;
  display:block;
  margin-top:4px;
}
/* Uploaded pictures are small click-to-open thumbnails (chat_images.js).
   BingeByte's log is short, so cap them lower than the shared 150px so one
   picture + the name row fits without the log growing a scrollbar. */
.bb-chat-log .bb-image-link .bb-chat-thumb{
  max-height:96px;
}

/* Same dark/blurred popover chrome as style.css's shared .popover (used
   by emoji_lib.js everywhere else on the site) -- positioned against
   .bb-chat-panel (see that rule's position:relative) instead of the
   viewport, so it stays anchored above the composer inside this one panel. */
.popover{
  position:absolute;
  left:12px;
  right:12px;
  bottom:56px;
  max-height:260px;
  overflow:auto;
  background:rgba(0,0,0,.85);
  border:1px solid var(--line);
  border-radius:12px;
  padding:8px;
  z-index:20;
  backdrop-filter:blur(4px);
}
.popover[hidden]{ display:none; }
.popover em-emoji-picker{ --rgb-background:12,18,26; width:100%; }

/* ---- GIF picker dialog ---- */
.bb-dialog{
  background:var(--panel);
  color:var(--text);
  border:3px solid var(--line);
  border-radius:14px;
  padding:0;
  width:min(520px, 92vw);
  max-height:calc(var(--bb-vh, 100vh) * .8);
}
.bb-dialog::backdrop{ background:rgba(0,0,0,.6); }
.bb-dialog-head{
  font-weight:700;
  padding:14px 16px;
  border-bottom:1px solid var(--line);
}
.bb-dialog-body{ padding:14px 16px; overflow-y:auto; max-height:calc(var(--bb-vh, 100vh) * .56) }
.bb-dialog-search{
  width:100%;
  background:#0b1220;
  color:var(--text);
  border:3px solid var(--line);
  border-radius:10px;
  padding:9px 10px;
  font-size:14px;
  margin-bottom:12px;
}
.bb-gif-grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:8px;
}
.gif-result{
  padding:0;
  border:0;
  border-radius:8px;
  overflow:hidden;
  cursor:pointer;
  background:var(--panel-2);
  line-height:0;
}
.gif-result img{ width:100%; display:block }
.bb-dialog-foot{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:12px 16px;
  border-top:1px solid var(--line);
  color:var(--muted);
  font-size:12px;
}

/* ---- Status bar ---- */
.bb-status{
  padding:6px 18px;
  font-size:12px;
  color:var(--muted);
  border-top:1px solid var(--line);
  background:var(--panel-2);
  min-height:26px;
}

/* =====================================================================
   Phones / tablets. Everything below is behind media queries (layout) or
   (pointer:coarse)/(hover:none) (touch affordances), so a desktop window
   at normal size renders exactly as before.
   "Stacked" = the (max-width:900px) / portrait<=1024px queries above;
   "landscape phone" = short landscape screens, which go back to side by
   side with a narrow chat column (see the last block).
   ===================================================================== */

/* ---- Stacked (portrait phones/tablets): video on top, chat below ---- */
@media (max-width: 900px), (orientation: portrait) and (max-width: 1024px){
  /* Stage row takes its natural height; the sidebar fills whatever is left
     (at least 320px -- .bb-main scrolls when the screen is shorter). */
  .bb-main, .bb-main.bb-dock-left{ grid-template-rows: auto 1fr; }
  /* One column, docked left too. The desktop ".bb-main.bb-dock-left" columns
     rule sits AFTER the first stacked block near the top of this file, so it
     won there -- and dock-left is the default -- leaving phones on the
     3-column desktop grid with a 10px-wide chat. (Here, not at the end of
     the file, so the landscape-phone block below still overrides it.) */
  .bb-main, .bb-main.bb-dock-left{ grid-template-columns:minmax(0,1fr); }
  /* The chat never squeezes below a usable height (its composer used to
     spill out of the panel); when there isn't room, .bb-main scrolls. */
  .bb-stage, .bb-sidebar{ min-height:auto; }
  .bb-chat-panel{ flex:1 0 auto; min-height:300px; }
  /* Docking left/right means nothing in one column: video always on top,
     and the layout menu (its only items are the dock buttons) is hidden. */
  .bb-main.bb-dock-left .bb-stage,
  .bb-main.bb-dock-left .bb-sidebar{ order:0; }
  .bb-layout-menu-wrap{ display:none; }
}

/* ---- Narrow phones ---- */
@media (max-width: 600px){
  .bb-room-code{ font-size:12px; padding:6px 8px; }
  .bb-main{ padding:10px; gap:10px 0; }
  .bb-reactions{ justify-content:space-between; }
  .bb-bar-logo{ display:none; }   /* no room beside the emotes on a phone */
  .bb-bar-logo + .bb-room-row{ margin-left:auto; }
}

/* ---- Landscape phones: side by side, ~220px scrollable chat column ---- */
@media (orientation: landscape) and (max-height: 500px) and (min-width: 560px) and (max-width: 1024px){
  .bb-layout-menu-wrap{ display:contents; }
  /* 220px column: smaller round buttons so all five fit the pill. */
  .bb-ctrlbar{ gap:4px; padding:4px 6px; }
  .bb-ctrl-btn{ width:32px; height:32px; }
  .bb-room-row .bb-room-code{ display:none; }

  .bb-main, .bb-main.bb-dock-left{
    grid-template-columns: minmax(0,1fr) 220px;
    grid-template-rows: minmax(0,1fr);
    gap:0 8px;
    padding:8px max(8px, env(safe-area-inset-right)) 8px max(8px, env(safe-area-inset-left));
    overflow:hidden;
  }
  .bb-main.bb-dock-left{ grid-template-columns: 220px minmax(0,1fr); }
  .bb-main.bb-dock-left .bb-stage{ order:3; }
  .bb-main.bb-dock-left .bb-sidebar{ order:1; }
  .bb-resize-handle{ display:none; }

  /* Player fills the height left over; load bar below it, then play
     controls and reactions share one row. */
  .bb-stage{
    display:grid;
    grid-template-columns: minmax(0,1fr) auto;
    grid-template-rows: minmax(0,1fr) auto auto;
    gap:6px 8px;
  }
  .bb-player-wrap{ grid-column:1 / -1; flex:none; aspect-ratio:auto; height:auto; min-height:0; }
  .bb-host-bar{ grid-column:1 / -1; }
  .bb-controls{ grid-column:1; padding:2px 10px; gap:8px; }
  .bb-reactions{ grid-column:2; gap:6px; align-items:center; flex-wrap:nowrap; }
  /* Room id is hidden here (above); smaller emotes so they + Copy Link leave
     the seek bar room on the same row. */
  #bb-reactions .bb-reaction{ min-width:36px; padding:4px 6px; font-size:16px; }
  .bb-bar-logo{ display:none; }   /* that row is shared with the seek bar here */
  .bb-bar-logo + .bb-room-row{ margin-left:auto; }
  .bb-room-row #bb-copy-link{ padding:5px 8px; }
  /* 220px column: four tool buttons + Send must fit across. */
  .bb-chat-form{ --bb-chat-btn:32px; gap:4px; }

  .bb-sidebar{ gap:8px; overflow-y:auto; overscroll-behavior:contain; }
  .bb-panel{ padding:8px; }
  .bb-chat-panel{ min-height:200px; }
  .bb-chat-log{ min-height:60px; }

  .bb-status{ min-height:20px; padding:2px 12px; font-size:11px; }

  .bb-switch-menu.popover,
  .bb-layout-menu.popover{
    max-height:calc(var(--bb-app-h, var(--bb-vh, 100dvh)) - 60px);
    overflow-y:auto;
  }
  .bb-dialog{ max-height:calc(var(--bb-vh, 100dvh) * .94); }
  .bb-dialog-body{ max-height:calc(calc(var(--bb-vh, 100dvh) * .94) - 110px); }
}

/* ---- Touch: finger-sized targets, no zoom-on-focus, no sticky hover ---- */
@media (pointer: coarse){
  .bb-btn{ min-height:40px; }
  .bb-icon-btn{ min-width:40px; }
  /* Scoped to the emote bar: chat_reactions.js injects its own later
     `.bb-reaction` rule (message reaction pills) that would win otherwise.
     By ID, not class -- a message's pill bar is a .bb-reactions div too, and
     finger-sizing those would blow the chat rows apart (2026-10-30). */
  #bb-reactions .bb-reaction{ min-width:44px; min-height:40px; font-size:20px; justify-content:center; }
  .bb-participants .bb-make-host{ min-height:36px; padding:6px 10px; font-size:12px; }
  .bb-participants li{ min-height:40px; }
  .bb-seek{ height:40px; }
  /* iOS zooms the page when focusing an input under 16px. */
  .bb-host-bar input,
  .bb-chat-form input,
  .bb-dialog-search{ font-size:16px; }
  /* Wider invisible grab area for the splitter (iPad landscape). */
  .bb-resize-handle{ touch-action:none; }
  .bb-resize-handle::after{ content:""; position:absolute; top:0; bottom:0; left:-10px; right:-10px; }
  .bb-switch-menu-item{ min-height:44px; }
}
@media (hover: none){
  .bb-btn:hover:not(:disabled),
  .bb-reaction:hover,
  .bb-play-gate:hover,
  .bb-make-host:hover,
  .gif-result:hover{ transform:none; box-shadow:none; }
}

/* ---- Fold arrow: phone layouts + folded state (see "Sidebar fold arrow"
   near the top). Last in the file so they win over the layouts above. ---- */
/* Stacked (chat under the video): no side column to sit against, so the
   arrow waits in the top-right corner of the content. */
@media (max-width: 900px), (orientation: portrait) and (max-width: 1024px){
  .bb-main > .bb-sidebar-collapse-btn[data-side]{ top:0; right:0; left:auto; transform:none; }
}
/* Landscape phones: 220px chat column, 8px gap. */
@media (orientation: landscape) and (max-height: 500px) and (min-width: 560px) and (max-width: 1024px){
  .bb-main > .bb-sidebar-collapse-btn[data-side]{ top:50%; transform:translateY(-50%); }
  .bb-main > .bb-sidebar-collapse-btn[data-side="right"]{ left:auto; right:223px; }
  .bb-main > .bb-sidebar-collapse-btn[data-side="left"]{ right:auto; left:223px; }
}
/* Folded: the sidebar and handle are gone, so the stage takes the whole row
   (otherwise it is auto-placed into the empty sidebar column), and the arrow
   rests in the row's edge padding to bring the chat back. */
body.bb-sidebar-folded-page .bb-main,
body.bb-sidebar-folded-page .bb-main.bb-dock-left{ grid-template-columns:minmax(0,1fr); }
body.bb-sidebar-folded-page .bb-main > .bb-sidebar-collapse-btn[data-side="right"]{ left:auto; right:0; }
body.bb-sidebar-folded-page .bb-main > .bb-sidebar-collapse-btn[data-side="left"]{ right:auto; left:0; }
