/* Gambit VIP welcome lobby (lobby.js). Everything is scoped under .gambit-lobby.
   Visual language is /play's: flat solid surfaces, no hairlines, chunky buttons with a solid
   bottom "depth" shadow, bold uppercase labels. Values come from reel.css and interface-theme.css;
   the browse button and chat chips reuse .reel-button and .reel-sort-tag directly. */

.gambit-lobby {
  --gl-bg: var(--ui-bg, #111);
  --gl-panel: var(--reel-panel, #202621);
  --gl-control: var(--reel-control, #303a32);
  --gl-control-hover: #3e4b40;
  --gl-depth: var(--reel-depth, #161d17);
  --gl-screen: var(--reel-screen, #0a0d0b);
  --gl-ink: var(--reel-ink, #f3f6f2);
  --gl-muted: var(--reel-muted, #a5b1a8);
  --gl-green: var(--reel-green, #c0ed9b);
  --gl-action: var(--ui-action, #69ae55);
  --gl-action-hover: var(--ui-action-hover, #79bc64);
  --gl-action-depth: var(--ui-action-depth, #416e36);
  --gl-action-ink: #101810;
  --gl-gold: var(--ui-gold, #f2c749);
  --gl-focus: var(--ui-focus, #f3c851);
  --gl-radius: var(--reel-radius, 12px);
  --gl-gutter: 12px;
  --gl-ease: cubic-bezier(.22, 1, .36, 1);

  position: fixed;
  inset: 0;
  z-index: 9000;
  color: var(--gl-ink);
  background: var(--gl-bg);
  opacity: 0;
  transition: opacity 260ms ease;
  overflow: hidden;
  outline: none;
}
.gambit-lobby.is-in { opacity: 1; }
.gambit-lobby.is-closing { opacity: 0; pointer-events: none; }
.gambit-lobby *,
.gambit-lobby *::before,
.gambit-lobby *::after { box-sizing: border-box; }
.gambit-lobby :is(button, a):focus-visible { outline: 2px solid var(--gl-focus); outline-offset: 2px; }
.gambit-lobby :is(button, a):focus:not(:focus-visible) { outline: none; }
.gambit-lobby svg.mdi-icon { width: 22px; height: 22px; fill: currentColor; display: block; flex: none; }

.gl-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.gl-backdrop { position: absolute; inset: 0; background: var(--gl-bg); }

/* ---------- layout: phone first ---------- */
.gl-shell {
  position: relative;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "head" "hero" "games";
  align-content: start;
}

/* ---------- header: brand left, MY BALANCE centred ---------- */
.gl-header {
  grid-area: head;
  /* Stays floating at the top while home scrolls (mobile and desktop). */
  position: sticky;
  top: 0;
  z-index: 6;
  background: var(--gl-bg);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: calc(env(safe-area-inset-top) + 10px) var(--gl-gutter) 10px;
}
.gl-header > .gb-brand { justify-self: start; grid-column: 1; }
.gl-brand {
  justify-self: start;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px 0 10px;
  border-radius: var(--gl-radius);
  background: var(--gl-panel);
  box-shadow: 0 3px 0 var(--gl-depth);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.gl-brand-vip { color: var(--gl-gold); }
.gl-emblem {
  display: inline-block;
  width: 20px;
  height: 20px;
  background: #fff;
  -webkit-mask: url(/gambit/assets/gambit-bunny.svg) center / contain no-repeat;
  mask: url(/gambit/assets/gambit-bunny.svg) center / contain no-repeat;
}
.gl-wordmark {
  display: inline-block;
  width: 78px;
  height: 13px;
  background: var(--gl-ink);
  -webkit-mask: url(/gambit/assets/gambit-wordmark.svg) left center / contain no-repeat;
  mask: url(/gambit/assets/gambit-wordmark.svg) left center / contain no-repeat;
}
/* /play's green "MY BALANCE" pill (.reel-connect) with its DEMO badge. */
.gl-balance {
  grid-column: 2;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 17px;
  border: 0;
  border-radius: var(--ui-pill-radius, 100px);
  background: var(--gl-action);
  color: var(--gl-action-ink);
  font: inherit;
  font-size: 12.1px;
  font-weight: 700;
  line-height: 1.3;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 3px 0 var(--gl-action-depth), 0 6px 14px #00000033;
}
.gl-balance:hover { background: var(--gl-action-hover); }
.gl-balance[data-button-pressed] { box-shadow: 0 1px 0 var(--gl-action-depth); }
.gl-balance-label { display: inline-block; transform: translateY(-2.5px); }
.gl-balance-badge {
  position: absolute;
  left: 50%;
  top: calc(100% - 12px);
  transform: translateX(-50%);
  padding: 2px 8px;
  border-radius: 999px;
  background: #141c16;
  color: #e8f3ea;
  font-size: 9.4px;
  font-weight: 800;
  letter-spacing: .11em;
  line-height: 1.1;
  pointer-events: none;
}
.gl-balance-badge[hidden] { display: none; }
/* /play's DEPOSIT fab (.reel-deposit-fab), top right of the home header. */
.gl-deposit {
  grid-column: 3;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 100px;
  border: 1.5px solid #69ae55;
  background: rgb(18 28 20 / 90%);
  color: #e8f7e6;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 3px 0 #2a4923, 0 6px 16px rgb(0 0 0 / 38%);
}
.gl-deposit:hover { background: rgb(28 44 31 / 96%); }
.gl-deposit[hidden] { display: none; }
.gl-deposit[data-button-pressed] { box-shadow: 0 1px 0 #2a4923; }
.gambit-lobby .gl-deposit svg { width: 13px; height: 13px; fill: none; stroke: #7ae064; stroke-width: 2.7; stroke-linecap: round; stroke-linejoin: round; }
.gl-balance:has(.gl-balance-badge[hidden]) .gl-balance-label { transform: none; }

/* ---------- hero: tall host stream, roster on top, live chat at the bottom ---------- */
.gl-hero {
  grid-area: hero;
  position: relative;
  height: max(560px, calc(100dvh - 70px));
  overflow: hidden;
  isolation: isolate;
  background: var(--gl-screen);
}
.gl-media {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--gl-screen);
}
.gl-poster,
.gl-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 12%;
}
.gl-poster:not([src]) { visibility: hidden; }
/* Stacked clips: the incoming one fades in on top only after its first frame is presented. */
.gl-video { opacity: 0; transition: none; z-index: 1; }
.gl-video.is-shown { opacity: 1; transition: opacity 320ms ease; }

/* Light scrims so overlaid text stays legible (top: roster, bottom: chat). */
.gl-hero::before,
.gl-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  z-index: 0;
  pointer-events: none;
}
.gl-hero::before { top: 0; height: 120px; background: linear-gradient(to bottom, rgb(0 0 0 / .5), transparent); }
.gl-hero::after { bottom: 0; height: 62%; background: linear-gradient(to top, rgb(0 0 0 / .72), rgb(0 0 0 / .34) 55%, transparent); }

.gl-hero-top {
  position: absolute;
  z-index: 3;
  top: 10px;
  left: 0;
  right: 0;
  /* Same header as the in-game overlay: name + LIVE + tagline left, Change Host + X right. */
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 0 var(--gl-gutter);
}

/* Meet other hosts: compact avatars overlaid on the stream. */
.gl-roster[hidden] { display: none; }
.gl-roster-title {
  margin: 0 var(--gl-gutter) 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 1px 2px #000, 0 1px 8px rgb(0 0 0 / 80%);
}
.gl-roster-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px var(--gl-gutter) 6px;
  scrollbar-width: none;
}
/* Sideways rows over her stream (h-scroll.js): full width, fade into the dark scrim. */
.gl-hero .hscroll { --hscroll-fade: rgb(0 0 0 / .6); }
.gl-hero-bottom > .hscroll { margin: 0 calc(-1 * var(--gl-gutter)); width: auto; }
.gl-roster-list::-webkit-scrollbar { display: none; }
.gl-host-chip {
  flex: none;
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 58px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  font: inherit;
  cursor: pointer;
}
.gl-avatar {
  position: relative;
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  padding: 3px;
  background: rgb(255 255 255 / .85);
  box-shadow: 0 3px 0 rgb(0 0 0 / .45);
  transition: background-color 160ms ease, box-shadow 160ms ease;
}
.gl-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 18%;
}
.gl-host-chip:hover .gl-avatar { background: var(--gl-focus); }
.gl-host-chip[data-button-pressed] .gl-avatar { box-shadow: 0 0 0 rgb(0 0 0 / .45); }
.gl-host-chip.is-current .gl-avatar { background: var(--gl-action); box-shadow: 0 3px 0 var(--gl-action-depth); }
.gl-host-chip-name {
  max-width: 100%;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px #000, 0 1px 6px rgb(0 0 0 / 80%);
}
.gl-host-chip.is-current .gl-host-chip-name { color: var(--gl-green); }

/* Live chat, like the in-game overlay: text straight on the video. */
.gl-hero-bottom {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  padding: 0 var(--gl-gutter) calc(var(--gl-gutter) + env(safe-area-inset-bottom));
  color: #fff;
}
.gl-host-meta { text-shadow: 0 2px 0 rgb(0 0 0 / .6), 0 1px 10px rgb(0 0 0 / .85); }
.gl-name-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
/* LIVE marker inline after her name (same red pill as the in-game host). */
.gl-live {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px 3px 8px;
  border-radius: 999px;
  background: #e5383b;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  line-height: 1.2;
  text-transform: uppercase;
  text-shadow: none;
  box-shadow: 0 2px 0 rgb(0 0 0 / .45);
}
.gl-live i { width: 5px; height: 5px; border-radius: 50%; background: #fff; animation: gl-pulse 1.4s ease-in-out infinite; }
.gl-host-name {
  margin: 0;
  font-size: 24px;
  line-height: 1.05;
  font-weight: 700;
  text-transform: uppercase;
}
.gl-host-tagline {
  margin: 2px 0 0;
  font-size: 12.5px;
  font-weight: 700;
  color: rgb(255 255 255 / .86);
}
.gl-log {
  flex: 0 1 auto;
  /* About half of her stream on phones, ~57% on desktop (below); her face stays clear. */
  max-height: calc(max(560px, 100dvh - 70px) * .5);
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 40px 0 6px;
  margin-top: 4px;
  /* Older lines fade out well before they reach the host's name. */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, transparent 16px, #000 52px);
  mask-image: linear-gradient(to bottom, transparent 0, transparent 16px, #000 52px);
}
/* Slim visible scrollbar: dark track, light rounded thumb (Firefox: standard properties). */
.gl-log { scrollbar-width: thin; scrollbar-color: rgb(255 255 255 / .72) rgb(0 0 0 / .38); }
@supports selector(::-webkit-scrollbar) { .gl-log { scrollbar-width: auto; scrollbar-color: auto; } }
.gl-log::-webkit-scrollbar { width: 6px; }
.gl-log::-webkit-scrollbar-track { background: rgb(0 0 0 / .38); border-radius: 3px; margin-top: 40px; }
.gl-log::-webkit-scrollbar-thumb { background: rgb(255 255 255 / .72); border-radius: 3px; }
.gl-log::-webkit-scrollbar-thumb:hover { background: #fff; }
.gl-log > .gl-msg { padding-right: 4px; }
.gl-log:focus-visible { outline: 2px solid var(--gl-focus); outline-offset: 2px; }
.gl-msg {
  max-width: 92%;
  color: #fff;
  font-size: 14.5px;
  font-weight: 500; /* message text medium; speaker labels stay bold */
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 2px #000, 0 1px 1px #000, 0 2px 10px rgb(0 0 0 / 80%);
}
.gl-msg p { margin: 0; }
.gl-msg-name { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--gl-gold); margin-right: 2px; }
.gl-msg--host { align-self: flex-start; }
.gl-msg--user { align-self: flex-end; text-align: right; }
.gl-msg--user .gl-msg-name { color: var(--gl-action); }
.gl-typing { display: inline-flex; gap: 4px; align-items: center; height: 1.4em; }
.gl-typing[hidden] { display: none; }
.gl-typing i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px #000;
  opacity: .4;
  animation: gl-dot 1.1s ease-in-out infinite;
}
.gl-typing i:nth-child(2) { animation-delay: .15s; }
.gl-typing i:nth-child(3) { animation-delay: .3s; }

/* Quick replies / answer choices are /play sort tags. */
.gl-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px var(--gl-gutter) 10px;
  scrollbar-width: none;
}
.gl-chips::-webkit-scrollbar { display: none; }
.gl-chips.has-choices { flex-wrap: nowrap; } /* choices stay one sideways-scrolling row */
.gl-chip { flex: none; }

.gl-form { display: flex; gap: 8px; align-items: center; }
.gl-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--gl-radius);
  background: var(--gl-panel);
  color: var(--gl-ink);
  font: inherit;
  font-size: 16px; /* prevents iOS zoom on focus */
  font-weight: 700;
  box-shadow: 0 4px 0 var(--gl-depth);
}
.gl-input::placeholder { color: var(--gl-muted); font-weight: 400; }
.gl-input:focus { outline: 2px solid var(--gl-focus); outline-offset: 0; }
.gl-send {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0; min-width: 46px; justify-content: center;
  border: 0;
  border-radius: var(--ui-pill-radius, 100px);
  background: var(--gl-action);
  color: var(--gl-action-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--gl-action-depth);
}
.gl-send:hover { background: var(--gl-action-hover); }
.gl-send[data-button-pressed] { box-shadow: 0 1px 0 var(--gl-action-depth); }
.gambit-lobby .gl-send svg.mdi-icon { width: 18px; height: 18px; }

/* ---------- games panel (modelled on the /play library) ---------- */
.gl-games {
  grid-area: games;
  min-width: 0;
  padding: 14px 0 calc(16px + env(safe-area-inset-bottom));
  background: var(--gl-panel);
}
.gl-games-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 var(--gl-gutter);
  margin-bottom: 12px;
}
.gl-section-title {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--gl-ink);
}
.gl-browse {
  display: none; /* removed on all sizes: the SELECT GAME grid with filters/search replaces it */
  flex: none;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px 0 11px;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.gambit-lobby .gl-browse svg.mdi-icon { width: 17px; height: 17px; }

/* Continuous poster grid like the /play library: her picks, then the whole catalogue. */
.gl-cards {
  display: grid;
  /* Same physical poster size everywhere (~105-120px on phones, ~150-170px on desktop):
     the column count follows the available width. */
  grid-template-columns: repeat(auto-fill, minmax(min(105px, 30%), 1fr));
  gap: 8px;
  padding: 2px var(--gl-gutter) 4px;
}
.gl-cards-group { display: contents; }
.gl-more-label {
  grid-column: 1 / -1;
  margin: 10px 0 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gl-muted);
}
.gl-more-label[hidden] { display: none; }
.gl-sentinel { height: 1px; }
.gl-card-playing {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--gl-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.gl-card-playing strong { color: var(--gl-ink); font-weight: 700; }
.gl-card-item {
  min-width: 0;
  animation: gl-card-in 300ms var(--gl-ease) both;
}
.gl-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: var(--gl-radius);
  background: transparent;
  color: var(--gl-ink);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.gl-card .game-art {
  border-radius: var(--gl-radius);
  background: var(--gl-screen);
  font-weight: 700;
}
.gl-card .game-art > span:not(.poster-viewport) { padding: 8px; font-size: 12px; }
.gl-card.is-recommended .game-art { box-shadow: 0 0 0 2px var(--gl-gold); }
.gl-card.is-chosen .game-art,
.gl-card:hover .game-art { box-shadow: 0 0 0 2px var(--gl-green); }
.gl-card-meta {
  display: grid;
  gap: 1px;
  margin-top: 5px;
  padding-inline: 2px;
  min-width: 0;
}
.gl-card-reason {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  font-size: 10.5px;
  line-height: 1.3;
  white-space: nowrap;
}
.gl-card-reason strong { overflow: hidden; text-overflow: ellipsis; font-weight: 700; color: var(--gl-ink); }
.gl-card.is-recommended .gl-card-reason strong { color: var(--gl-gold); }
.gl-card-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gl-action); flex: none; }
.gl-card.is-recommended .gl-card-dot { background: var(--gl-gold); }
.gl-card-stats {
  display: none;
  font-size: 11px;
  line-height: 1.3;
  font-weight: 500;
  color: var(--gl-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}
.gl-card-skeleton { cursor: default; pointer-events: none; }
.gl-card-skeleton .game-art,
.gl-line {
  background: var(--gl-control);
  animation: gl-wait 1.2s ease-in-out infinite;
}
.gl-line { display: block; height: 9px; border-radius: 5px; width: 70%; }
.gl-empty { grid-column: 1 / -1; margin: 0; padding: 20px 0; color: var(--gl-muted); }

/* ---------- tablet ---------- */
@media (min-width: 600px) and (max-width: 959px) {
  .gambit-lobby { --gl-gutter: 16px; }
  .gl-hero { height: min(82dvh, 900px); }
  .gl-hero-bottom { right: auto; width: min(560px, 100%); }
  .gl-log { max-height: calc(min(82dvh, 900px) * .5); }
  .gl-card-stats { display: block; }
  .gl-cards { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
}

/* ---------- desktop: tall portrait host column left, picks right ---------- */
@media (min-width: 960px) {
  .gambit-lobby { --gl-gutter: 20px; }
  /* Anchored to the left edge and full width (no centring cap), matching the in-game view.
     The whole page scrolls; her stream stays sticky on the left below the sticky header. */
  .gambit-lobby { --gl-head-h: 68px; }
  .gl-shell {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto;
    grid-template-areas:
      "head head"
      "hero games";
    column-gap: 20px;
    align-items: start;
    padding: 0 var(--gl-gutter) var(--gl-gutter);
  }
  .gl-header {
    position: sticky;
    top: 0;
    z-index: 4;
    height: var(--gl-head-h);
    padding: 0;
    background: var(--gl-bg);
  }
  .gl-balance { min-height: 42px; padding-inline: 19px; font-size: 13.4px; }
  .gl-deposit { min-height: 40px; padding: 0 16px; gap: 6px; font-size: 12.5px; }
  .gambit-lobby .gl-deposit svg { width: 15px; height: 15px; }
  /* ~520px 9:16 stream box, top-left under the header, capped to the viewport (video covers it). */
  .gl-hero {
    --gl-hero-w: clamp(260px, calc(22vw + 40px), 520px); /* same as the in-game dock (host.css --gh-dock-w) */
    --gl-hero-h: min(calc(var(--gl-hero-w) * 16 / 9), calc(100dvh - var(--gl-head-h) - var(--gl-gutter)));
    position: sticky;
    top: var(--gl-head-h); /* top-aligned under the header */
    width: var(--gl-hero-w);
    height: var(--gl-hero-h);
    min-height: 0;
    border-radius: var(--ui-panel-radius, 12px);
    transition: width 260ms cubic-bezier(.22, 1, .36, 1), height 260ms cubic-bezier(.22, 1, .36, 1), border-radius 260ms ease;
  }
  /* Collapse / expand (remembered, shared with in-game). */

  .gambit-lobby.gl-collapsed .gl-hero { --gl-hero-w: 96px; --gl-hero-h: 96px; top: var(--gl-head-h); border-radius: 50%; overflow: visible; }
  .gambit-lobby.gl-collapsed .gl-media { border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 3px var(--gl-panel), 0 5px 0 1px var(--gl-depth); }
  .gambit-lobby.gl-collapsed .gl-hero::before,
  .gambit-lobby.gl-collapsed .gl-hero::after,
  .gambit-lobby.gl-collapsed .gl-hero-top,
  .gambit-lobby.gl-collapsed .gl-hero-bottom,
  .gambit-lobby.gl-collapsed .gl-collapse { display: none; }
  .gambit-lobby.gl-collapsed .gl-expand { display: block; }
  .gl-hero-top { top: 12px; }
  .gl-hero-bottom { padding: 0 14px 14px; }
  .gl-log { max-height: calc(var(--gl-hero-h) * .57); }
  .gl-roster-title { margin-inline: 0; padding-inline: 14px; }
  .gl-roster-list { padding-inline: 14px; }
  .gl-hero-bottom > .hscroll { margin: 0 -14px; }
  .gl-roster-title { margin: 0 0 6px; }
  .gl-roster-list { gap: 10px; }
  .gl-host-chip { width: 64px; }
  .gl-avatar { width: 56px; height: 56px; }
  .gl-host-chip-name { font-size: 12px; }
  .gl-host-name { font-size: 28px; }
  .gl-chips { padding-inline: 14px; }
  /* Picks flow on the right of her stream: no panel, the grid adapts to the width. */
  .gl-games {
    min-height: 0;
    padding: 4px 0 14px;
    background: none;
    border-radius: 0;
  }
  .gl-games-head { padding: 4px 0 10px; margin: 0; }
  .gl-cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding: 2px 0 4px; }
  .gl-card-playing { font-size: 12.5px; gap: 6px; }
  .gl-card-meta { margin-top: 6px; }
  .gl-card-reason { font-size: 12.5px; gap: 6px; }
  .gl-card-stats { display: block; font-size: 12px; }
}

/* ---------- motion ---------- */
@keyframes gl-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@keyframes gl-dot { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
@keyframes gl-wait { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes gl-card-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .gambit-lobby,
  .gambit-lobby *,
  .gambit-lobby *::before,
  .gambit-lobby *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Small screens: the bunny emblem stands in for the wordmark. */
@media (max-width: 599px) {
  .gl-wordmark { display: none; }
  .gl-emblem { width: 22px; height: 22px; }
}

/* Browse all opens /play's library on top of home (desktop drawer lives in #reel-layout). */
body[data-gambit-home-library="open"] #reel-layout .reel-library { z-index: 9500; }

.gl-msg:has(.ga-actions), .gl-msg--card { max-width: 100%; }

/* Expand button covers the collapsed bubble; unread badge like the in-game bubble. */
.gl-expand { display: none; position: absolute; inset: 0; z-index: 3; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.gl-expand:focus-visible { outline: 3px solid var(--gl-focus); outline-offset: 3px; }
.gl-unread {
  position: absolute;
  /* Inset so the sticky header and the column edge never clip it. */
  top: 2px;
  right: 2px;
  z-index: 2;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--gl-action);
  color: var(--gl-action-ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 22px;
  text-align: center;
}
.gl-unread[hidden] { display: none; }

.gl-roster.is-flash .gl-host-chip.is-current .gl-avatar { animation: gl-flash 900ms ease 2; }
@keyframes gl-flash { 50% { box-shadow: 0 0 0 4px var(--gl-focus); } }

/* ---------- desktop in-game: home stays as the persistent host panel (lobby.js enterGameMode) ---------- */
.gambit-lobby.gl-ingame { z-index: 25; background: transparent; pointer-events: none; }
.gambit-lobby.gl-ingame .gl-backdrop { display: none; }
.gambit-lobby.gl-ingame .gl-shell { scrollbar-width: none; }
.gambit-lobby.gl-ingame .gl-shell::-webkit-scrollbar { display: none; }
.gambit-lobby.gl-ingame .gl-header { background: transparent; }
.gambit-lobby.gl-ingame .gl-balance,
.gambit-lobby.gl-ingame .gl-deposit { visibility: hidden; }
.gambit-lobby.gl-ingame .gl-games { visibility: hidden; }
.gambit-lobby.gl-ingame .gl-hero,
.gambit-lobby.gl-ingame .gb-brand { pointer-events: auto; }

/* ---------- Browse games: /play's sort tags + search, always visible ---------- */
.gl-browse-tools {
  display: grid;
  gap: 8px;
  padding: 0 var(--gl-gutter) 12px;
  background: var(--gl-panel);
}
.gl-browse-tools > .hscroll { min-width: 0; margin: 0 calc(-1 * var(--gl-gutter)); width: auto; --hscroll-fade: var(--gl-panel); }
.gambit-lobby .gl-sort-tags { flex-wrap: nowrap; transform: none; padding: 4px var(--gl-gutter) 8px; gap: 8px; }
.gambit-lobby .gl-search { margin-top: 0; transform: none; }
.gambit-lobby .gl-search svg.mdi-icon { width: 18px; height: 18px; }
.gambit-lobby .gl-search input::-webkit-search-cancel-button { filter: invert(1); }
@media (min-width: 960px) {
  .gl-browse { display: none; }
  .gl-games-head { position: static; padding: 4px 0 8px; }
  /* One row: tags on the left (scroll sideways if needed), search on the right; stays in view. */
  .gl-browse-tools {
    position: sticky;
    top: var(--gl-head-h);
    z-index: 2;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
    align-items: center;
    gap: 14px;
    padding: 0 0 12px;
    background: var(--gl-bg);
  }
  .gl-browse-tools > .hscroll { margin: 0; --hscroll-fade: var(--gl-bg); }
  .gambit-lobby .gl-sort-tags { padding: 4px 0 8px; }
}

.gl-hero-top .gl-host-meta { min-width: 0; padding-top: 2px; }
.gl-hero-actions { display: flex; gap: 8px; flex: none; }
.gl-icon-btn { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; }
.gambit-lobby .gl-icon-btn svg.mdi-icon { width: 22px; height: 22px; }
@media (max-width: 959px) { .gl-hero-actions .gl-collapse { display: none; } }
@media (min-width: 960px) {
  .gl-hero-top { padding: 0 12px 0 14px; }
  .gl-icon-btn { width: 40px; height: 40px; }
  .gl-host-name { font-size: 22px; }
}

/* Search results: title line with matches in bold /play green. */
.gl-card-title { display: block; font-size: 12px; font-weight: 500; line-height: 1.3; color: var(--gl-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gl-search-match { background: transparent; color: var(--gl-action); font-weight: 800; }

/* MY BALANCE at the exact horizontal centre of the window (not of the header's content box). */
.gl-balance { position: fixed; z-index: 5; left: 50%; top: calc(env(safe-area-inset-top) + 10px); transform: translateX(-50%); }
@media (min-width: 960px) { .gl-balance { top: 13px; } }

/* Reset chip: smaller, /play gold, returns to the main suggestions. */
.gl-chips .gl-chip--reset {
  flex: none; min-height: 28px; padding: 0 10px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  border: 0; border-radius: 100px; cursor: pointer;
  background: var(--ui-gold, #f2c749); color: var(--ui-gold-ink, #000); box-shadow: 0 3px 0 #9f8228;
}
.gl-chips .gl-chip--reset:hover { background: var(--ui-gold-hover, #f3c851); }

/* One background colour site-wide: her panel's backdrop matches the page and the game area. */
.gambit-lobby .gl-hero, .gambit-lobby .gl-media { background: #111; }

/* Phones: the home chat doesn't scroll; the oldest lines dissolve to make room (lobby.js HOME_NO_SCROLL). */
@media (max-width: 768px), (hover: none) {
  /* A swipe that starts on the chat must move the page like anywhere else on her stream:
     the log is not a scroller here, so it neither eats vertical pans nor contains them. */
  .gl-log { overflow: hidden; scrollbar-width: none; touch-action: pan-y; overscroll-behavior: auto; }
  .gl-log::-webkit-scrollbar { display: none; }
  .gl-hero-bottom :is(.gc-latest, .gc-scroll-ind) { display: none !important; }
  /* No rubber-band bounce at the top or bottom of the page. */
  .gl-shell { overscroll-behavior-y: none; }
}
/* Phones: stable heights while the browser bars show and hide (dvh resized her stream mid-swipe). */
@media (max-width: 599px) {
  .gl-hero { height: max(560px, calc(100svh - 70px)); }
  .gl-log { max-height: calc(max(560px, 100svh - 70px) * .5); }
}
/* While home is open nothing behind it may scroll or bounce (iOS chained swipes into the feed). */
html:has(body[data-gambit-lobby="open"]),
body[data-gambit-lobby="open"] { overflow: hidden; overscroll-behavior: none; }
