/* The stream screen and the screens around it. Phone first: the stream is the whole screen above
   the nav. From 900px wide the nav is a rail at the side, and the player sits centred at 9:16 with
   a column to its right for chat (spec §3.2, §3.4). Logical properties throughout, so Arabic and
   Hebrew mirror with dir="rtl". */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--canvas);
  color: var(--ink-1);
  font-family: var(--font-ui);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
  overscroll-behavior: none;
}

button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

#app { height: 100%; }

/* --- the frame --------------------------------------------------------------------------------- */

.shell { position: fixed; inset: 0; }
/* While the viewer types on iOS, the frame is the part of the page above the keyboard (app.js). */
html.is-lifted .shell { inset-block: var(--vv-top, 0px) auto; height: var(--vv-h, 100%); }

.screen {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--canvas);
  container-type: size;
  container-name: screen;
}

.side { display: none; }

.logo {
  display: block;
  width: 132px;
  height: 34px;
  /* the lockup sits in the middle of a 1024² square: this crops it to the wordmark */
  background: url('/assets/brand/logo-a1.png') center / 172px auto no-repeat;
}

@media (min-width: 900px) {
  .shell {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 24px;
    padding: 24px;
  }
  .screen {
    position: relative;
    inset: auto;
    height: 100%;
    aspect-ratio: 9 / 16;
    flex: none;
    border-radius: var(--r-xl);
    box-shadow: 0 0 0 1px var(--line), 0 30px 80px rgba(0, 0, 0, 0.55);
  }
  .side {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 0 1 380px;
    min-width: 300px;
    min-height: 0;
    padding: 16px;
    border-radius: var(--r-lg);
    background: var(--panel);
    box-shadow: inset 0 0 0 1px var(--line);
  }
}

/* --- the stage and the pager ------------------------------------------------------------------- */

.stage { position: absolute; inset: 0; touch-action: none; }

.stage-card { position: absolute; inset: 0; transition: transform 0.18s var(--ease-out); }
.stage-card.enter-up { animation: enter-up 0.34s var(--ease-out); }
.stage-card.enter-down { animation: enter-down 0.34s var(--ease-out); }
@keyframes enter-up { from { transform: translateY(14%); opacity: 0.15; } }
@keyframes enter-down { from { transform: translateY(-14%); opacity: 0.15; } }

.pager-nav {
  position: absolute;
  inset-inline-end: var(--edge);
  /* under the language, captions and sound buttons (three 40px rounds, two 8px gaps, 12px clear),
     clear of the captions and the dock below */
  inset-block-start: calc(var(--safe-top) + var(--edge) + 148px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 5;
}
.pager-btn { width: 44px; height: 44px; }

/* --- the streamer ------------------------------------------------------------------------------ */

.player { position: absolute; inset: 0; background: var(--canvas); }
.loop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.42s ease;
}
.loop-talk { opacity: 0; }
.player.is-talking .loop-talk { opacity: 1; }

.player.is-still { overflow: hidden; }
.portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: drift 6s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: scale(1.02) translate(0, 0); }
  to { transform: scale(1.09) translate(-1.5%, -1%); }
}

.shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(7, 6, 11, 0.62) 0%, rgba(7, 6, 11, 0) 22%),
    linear-gradient(to top, rgba(7, 6, 11, 0.78) 0%, rgba(7, 6, 11, 0.35) 34%, rgba(7, 6, 11, 0) 56%);
}

/* --- shared controls --------------------------------------------------------------------------- */

.round {
  display: inline-grid;
  grid-auto-flow: column;
  place-items: center;
  gap: 4px;
  min-width: 40px;
  height: 40px;
  border-radius: var(--r-pill);
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: var(--ink-1);
  box-shadow: inset 0 0 0 1px var(--line);
}
.round:active { transform: scale(0.94); }
/* Captions off: the CC mark dims and is struck through. */
.round.cc:not(.is-on) { color: var(--ink-3); background-image: linear-gradient(to top right, transparent calc(50% - 1px), currentColor calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)); background-size: 22px 22px; background-position: center; background-repeat: no-repeat; }

/* --- the top bar ------------------------------------------------------------------------------- */

.topbar {
  position: absolute;
  inset-block-start: calc(var(--safe-top) + var(--edge));
  inset-inline: var(--edge);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  z-index: 4;
}

.who {
  display: flex;
  max-width: 100%;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 4px;
  padding-inline-end: 5px;
  border-radius: var(--r-pill);
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.avatar {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 30%;
  box-shadow: 0 0 0 2px var(--canvas), 0 0 0 4px var(--pink);
  margin: 2px;
}
.who-text { display: flex; flex-direction: column; min-width: 56px; line-height: 1.12; }
.who-name {
  font-family: var(--font-display);
  font-weight: 750;
  font-size: 17px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.who-ai {
  font-size: 12px;
  font-weight: 600;
  color: var(--violet);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.follow {
  flex: none;
  min-height: 36px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  background: var(--lime);
  color: var(--lime-ink);
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
}
.follow.is-on { background: var(--raised); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.follow:active { transform: scale(0.96); }

.topbar-main { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.live-row { display: flex; gap: 6px; align-items: center; padding-inline-start: 2px; }
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  background: var(--pink);
  color: var(--pink-ink);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.06em;
}
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pink-ink); animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.35; } }
.viewers {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: var(--ink-1);
}
.num { font-family: var(--font-mono); font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }
.tools { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: none; }
.lang-code { font-family: var(--font-mono); font-size: 12px; font-weight: 600; padding-inline-end: 4px; }
[data-testid='lang-button'] { padding-inline: 9px; }

/* --- tap for sound ------------------------------------------------------------------------------ */

.sound-gate {
  position: absolute;
  inset-block-start: calc(var(--safe-top) + 128px);
  inset-inline: 0;
  margin-inline: auto;
  width: max-content;
  max-width: calc(100% - 2 * var(--edge));
  display: flex;
  align-items: center;
  gap: 10px;
  padding-block: 8px;
  padding-inline: 8px 22px;
  border-radius: var(--r-pill);
  background: var(--lime);
  color: var(--lime-ink);
  font-weight: 700;
  font-size: 18px;
  z-index: 4;
  animation: ring 2.4s ease-out infinite;
}
.sound-gate-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--lime-ink);
  color: var(--lime);
}
.sound-gate:active { transform: scale(0.97); }
@keyframes ring {
  0% { box-shadow: 0 0 0 0 rgba(200, 255, 77, 0.55), 0 10px 30px rgba(0, 0, 0, 0.4); }
  70%, 100% { box-shadow: 0 0 0 16px rgba(200, 255, 77, 0), 0 10px 30px rgba(0, 0, 0, 0.4); }
}

/* --- captions ---------------------------------------------------------------------------------- */

/* In the dock (below) the captions sit just above the vote card and the chat. */
.captions {
  display: flex;
  justify-content: center;
  padding-inline: 6px;
  pointer-events: none;
}
.caption-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: 34ch;
  transition: opacity 0.12s ease;
  animation: rise 0.12s var(--ease-out);
}
.caption-block.is-ended { opacity: 0.5; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

.caption {
  margin: 0;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 760;
  font-size: clamp(21px, 6.4cqw, 34px);
  line-height: 1.34;
  letter-spacing: -0.012em;
  word-spacing: 0.08em;
  text-wrap: balance;
}
/* Tracking breaks joined and stacked scripts. */
:lang(ar) .caption, :lang(he) .caption, :lang(hi) .caption, :lang(th) .caption,
:lang(ar) .who-name, :lang(he) .who-name, :lang(hi) .who-name, :lang(th) .who-name { letter-spacing: 0; }
.caption-plate {
  display: inline-block;
  padding: 0.1em 0.38em;
  border-radius: 0.36em;
  background: var(--plate);
  animation: chunk-in 0.1s var(--ease-out);
}
@keyframes chunk-in { from { opacity: 0.35; transform: translateY(3px); } }
/* One chunk (≤ 3 words) at a time: the word being spoken in full ink and a touch larger, the rest
   of the chunk dimmed. */
/* The margin keeps the grown word clear of its neighbours, unspaced scripts included. */
.w {
  display: inline-block;
  margin-inline: 0.05em;
  color: color-mix(in srgb, var(--ink-1) 50%, transparent);
  transition: color 0.1s ease, transform 0.1s var(--ease-out);
}
.w.is-focus { color: var(--ink-1); transform: scale(1.05); }
.w.is-name { color: color-mix(in srgb, var(--lime) 55%, transparent); }
.w.is-name.is-focus { color: var(--lime); }
.caption-block.is-ended .w, .caption[data-clock="hold"] .w { color: var(--ink-1); }
.caption-block.is-ended .w.is-name, .caption[data-clock="hold"] .w.is-name { color: var(--lime); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.to-you {
  padding: 4px 12px;
  border-radius: var(--r-pill);
  background: var(--lime);
  color: var(--lime-ink);
  font-weight: 700;
  font-size: 14px;
}

/* --- states and notices ------------------------------------------------------------------------ */

.banner, .toast {
  position: absolute;
  inset-inline: 0;
  margin-inline: auto;
  width: max-content;
  max-width: calc(100% - 2 * var(--edge));
  padding: 9px 16px;
  border-radius: var(--r-pill);
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: var(--ink-1);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}
.banner { inset-block-start: calc(var(--safe-top) + 196px); z-index: 4; }
.toast { position: fixed; inset-block-start: calc(var(--safe-top) + 72px); z-index: 20; box-shadow: inset 0 0 0 1px var(--line); }

.cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 24px;
  background: rgba(7, 6, 11, 0.72);
  text-align: center;
  z-index: 3;
}
.cover-title { margin: 0; font-family: var(--font-display); font-weight: 750; font-size: 26px; max-width: 18ch; }
.cover-hint { margin: 0; color: var(--ink-2); font-size: 16px; }

/* R41: the stream closed for nobody watching; the whole picture is the button that opens it again. */
.idle-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 14px;
  padding: 24px;
  background: rgba(7, 6, 11, 0.78);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  text-align: center;
  z-index: 8;
}
.idle-title { font-family: var(--font-display); font-weight: 750; font-size: 28px; max-width: 18ch; color: var(--ink-1); }
.idle-hint { padding: 10px 22px; border-radius: var(--r-pill); background: var(--lime); color: var(--lime-ink); font-weight: 700; font-size: 17px; }
.idle-cover:active .idle-hint { transform: scale(0.97); }

.empty { height: 100%; display: grid; place-content: center; justify-items: center; gap: 16px; color: var(--ink-2); padding: 24px; text-align: center; }

/* --- the language sheet ------------------------------------------------------------------------ */

.sheet-scrim {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(3, 2, 6, 0.55);
  animation: fade 0.2s ease;
}
@keyframes fade { from { opacity: 0; } }
.sheet {
  width: 100%;
  max-height: 80dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px 16px calc(var(--safe-bottom) + 20px);
  border-radius: 26px 26px 0 0;
  background: var(--panel);
  box-shadow: 0 -1px 0 var(--line);
  animation: sheet-up 0.3s var(--ease-out);
  outline: none;
}
@keyframes sheet-up { from { transform: translateY(40%); opacity: 0.4; } }
.sheet-grip { width: 40px; height: 5px; margin: 4px auto 10px; border-radius: 3px; background: var(--ink-4); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet-head h2 { margin: 0; font-family: var(--font-display); font-weight: 750; font-size: 24px; }
.sheet-hint { margin: 6px 0 16px; color: var(--ink-2); font-size: 15px; line-height: 1.4; }
.lang-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.lang-option {
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 14px;
  border-radius: var(--r-md);
  background: var(--raised);
  font-size: 16px;
  font-weight: 550;
  text-align: start;
}
.lang-option:hover { background: var(--hover); }
.lang-option[aria-current='true'] { box-shadow: inset 0 0 0 2px var(--lime); color: var(--lime); }
/* R39: a language that is not open yet: listed, greyed, not pickable */
.lang-option.is-soon { color: var(--ink-4); cursor: default; }
.lang-option.is-soon:hover { background: var(--raised); }
.lang-soon { flex: none; padding: 2px 7px; border-radius: 999px; background: var(--hover); color: var(--ink-3); font-size: 11px; font-weight: 600; white-space: nowrap; }

@media (min-width: 900px) {
  .sheet-scrim { align-items: center; }
  .sheet { width: 480px; max-height: 78vh; border-radius: 24px; padding-block-end: 20px; box-shadow: inset 0 0 0 1px var(--line); }
  .sheet-grip { display: none; }
}


/* --- the dock: captions, the vote card, chat and the rail, the input ---------------------------- */

.dock {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-inline: var(--edge);
  padding-block-end: calc(var(--safe-bottom) + 10px);
  z-index: 3;
}
.dock-row { display: flex; align-items: flex-end; justify-content: flex-end; gap: 10px; min-width: 0; margin-block-start: -8px; }

@media (min-width: 900px) {
  .dock { padding-block-end: 22px; gap: 14px; }
}

/* --- chat ---------------------------------------------------------------------------------------- */

.chat { display: flex; flex-direction: column; min-width: 0; }
.chat.is-overlay {
  flex: 1;
  height: clamp(120px, 30cqh, 240px);
  justify-content: flex-end;
  overflow: hidden;
  padding-block-end: 8px; /* room for the newest line's slide-in and border */
  /* the oldest lines fade out upward */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 36%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 36%);
}
.chat-list, .chat-pin {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.chat-pin { margin-block-end: 4px; }
.msg { max-width: 100%; animation: msg-in 0.22s var(--ease-out); }
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } }
.msg-body {
  display: block;
  max-width: 100%;
  padding: 4px 10px 5px;
  border-radius: 12px;
  background: rgba(7, 6, 11, 0.46);
  color: var(--ink-1);
  font-size: 14px;
  line-height: 1.3;
  text-align: start;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}
button.msg-body { cursor: pointer; }
.msg-name { color: var(--cyan); font-weight: 650; }
.msg.is-me .msg-body { background: rgba(200, 255, 77, 0.16); box-shadow: inset 0 0 0 1px rgba(200, 255, 77, 0.6); }
.msg.is-me .msg-name { color: var(--lime); }
.msg.is-streamer .msg-body { background: rgba(16, 14, 23, 0.78); box-shadow: inset 0 0 0 1px rgba(155, 123, 255, 0.6); }
.msg.is-streamer .msg-name { color: var(--violet); }
.msg.is-pinned .msg-body { box-shadow: inset 0 0 0 1.5px var(--violet), 0 6px 18px rgba(0, 0, 0, 0.35); }
.msg-reply { display: block; font-size: 12.5px; font-weight: 750; color: var(--lime); }
.msg.is-gift .msg-body { background: rgba(255, 95, 168, 0.26); }
/* A small dark tile on purpose: the overlay's fade mask isolates the chat, so blending the icon's
   black ground away (as the sheet does) is not possible here. */
.msg-gift-icon { width: 22px; height: 22px; margin-inline: 3px 4px; vertical-align: -6px; border-radius: 6px; box-shadow: 0 0 0 1px var(--line); }
.msg.is-system .msg-line { display: block; padding: 2px 10px; color: var(--ink-2); font-size: 14px; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }
.msg-tr { display: inline-block; margin-inline-start: 6px; color: var(--ink-3); font-size: 11.5px; font-weight: 550; white-space: nowrap; }
.msg-orig {
  display: block;
  margin-block-start: 3px;
  padding-inline-start: 8px;
  border-inline-start: 2px solid var(--ink-4);
  color: var(--ink-2);
  font-size: 14px;
}

.side-title { margin: 0; font-family: var(--font-display); font-weight: 750; font-size: 18px; }
.chat.is-column { flex: 1; min-height: 0; }
.chat.is-column .chat-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  gap: 6px;
  padding-inline-end: 4px;
}
.chat.is-column .msg-body { background: var(--raised); text-shadow: none; }
.chat.is-column .msg.is-gift .msg-body { background: rgba(255, 95, 168, 0.18); }
.chat.is-column .msg.is-system .msg-line { text-shadow: none; }

/* --- the input ----------------------------------------------------------------------------------- */

.composer {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  height: 50px;
  padding: 4px;
  border-radius: var(--r-pill);
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: inset 0 0 0 1px var(--line);
}
.side .composer { flex: none; background: var(--raised); }
.name-chip {
  flex: none;
  max-width: 40%;
  display: flex;
  align-items: center;
  gap: 5px;
  height: 42px;
  padding-inline: 12px 10px;
  border-radius: var(--r-pill);
  background: var(--raised);
  color: var(--lime);
  font-size: 14px;
  font-weight: 700;
}
.side .name-chip { background: var(--hover); }
.name-chip-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.name-chip-icon { display: grid; flex: none; color: var(--ink-3); }
.name-chip.is-guest { color: var(--ink-1); box-shadow: inset 0 0 0 1.5px var(--lime); }
.name-chip.is-guest .name-chip-icon { color: var(--lime); }
.composer-input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--ink-1);
  font: inherit;
  font-size: 16px; /* under 16px iOS zooms the page on focus */
  outline: none;
}
.composer-input::placeholder { color: var(--ink-3); opacity: 1; }
.chars-left { flex: none; color: var(--ink-3); font-family: var(--font-mono); font-size: 12px; }
.send {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--lime-ink);
}
.send:disabled { background: var(--raised); color: var(--ink-4); cursor: default; }
.send:not(:disabled):active { transform: scale(0.94); }

/* --- the rail: like, gift, share ---------------------------------------------------------------- */

.rail { flex: none; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.rail-item { position: relative; }
.rail-btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: var(--ink-1);
  box-shadow: inset 0 0 0 1px var(--line);
}
.rail-btn:active { transform: scale(0.92); }
.rail-btn[data-testid='like'] { color: var(--pink); }
.rail-btn.is-gift { color: var(--lime); }
.hearts { position: absolute; inset-inline: 0; inset-block-end: 100%; pointer-events: none; }
.float-heart {
  position: absolute;
  inset-block-end: 0;
  inset-inline-start: 10px;
  display: grid;
  animation: float-heart 1.6s ease-out forwards;
}
@keyframes float-heart {
  0% { transform: translate(0, 10px) scale(0.5); opacity: 0; }
  14% { transform: translate(0, -10px) scale(1.12); opacity: 1; }
  100% { transform: translate(var(--drift), -200px) scale(0.9) rotate(var(--tilt)); opacity: 0; }
}

/* --- the vote and quiz cards -------------------------------------------------------------------- */

.card {
  align-self: flex-start;
  width: min(calc(100% - 54px), 340px); /* clear of the pager's buttons at the end side */
  padding: 11px 12px 10px;
  border-radius: var(--r-lg);
  background: rgba(16, 14, 23, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: inset 0 0 0 1px var(--line);
  animation: rise 0.28s var(--ease-out);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-block-end: 3px; }
.card-kicker { color: var(--pink); font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.card-time { color: var(--ink-2); font-size: 13px; }
.card-q { margin: 0 0 8px; font-family: var(--font-display); font-weight: 720; font-size: 17px; line-height: 1.25; }
.card-foot { margin: 8px 0 0; color: var(--ink-2); font-size: 13px; line-height: 1.3; }
.poll-options { display: flex; flex-direction: column; gap: 6px; }
.poll-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  overflow: hidden;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.08);
  font-size: 15px;
  font-weight: 650;
  text-align: start;
}
.poll-option:disabled { cursor: default; }
.poll-option:not(:disabled):active { transform: scale(0.98); }
.poll-fill { position: absolute; inset-block: 0; inset-inline-start: 0; background: rgba(155, 123, 255, 0.42); transition: inline-size 0.5s var(--ease-out); }
.poll-option.is-mine .poll-fill, .poll-option.is-winner .poll-fill { background: rgba(200, 255, 77, 0.36); }
.poll-option.is-mine, .poll-option.is-winner { box-shadow: inset 0 0 0 2px var(--lime); }
.poll-label, .poll-pct { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.poll-card.is-ended .poll-option:not(.is-winner) { opacity: 0.6; }
.quiz-result { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 0; font-size: 15px; }
.quiz-result b { color: var(--lime); }
.quiz-board { list-style: none; display: grid; gap: 3px; margin: 8px 0 0; padding: 8px 0 0; border-block-start: 1px solid var(--line); font-size: 14px; }
.quiz-board li { display: flex; gap: 8px; }
.quiz-board-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- the hud (the game streamers) --------------------------------------------------------------- */

.hud {
  position: absolute;
  inset-block-start: calc(var(--safe-top) + 190px);
  inset-inline-start: var(--edge);
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 8px 10px;
  border-radius: var(--r-md);
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  z-index: 4;
}
.hud-item { display: flex; align-items: center; gap: 8px; }
.hud-item dt { min-width: 28px; color: var(--ink-2); font-size: 12px; font-weight: 800; letter-spacing: 0.04em; }
.hud-item dd { display: flex; align-items: center; gap: 8px; margin: 0; }
.hud-bar { display: block; width: 92px; height: 8px; overflow: hidden; border-radius: 4px; background: rgba(255, 255, 255, 0.14); }
.hud-bar i { display: block; height: 100%; border-radius: inherit; background: var(--lime); transition: inline-size 0.4s var(--ease-out); }
.hud-bar.is-low i { background: var(--pink); }

/* --- a gift landing ----------------------------------------------------------------------------- */

/* The icon's black ground disappears by blending with the stream (screen). The container must not
   be a stacking context (no z-index, no opacity), or the icon would blend with it, not the stream;
   the icon and the label carry the z-index themselves. */
.gift-burst {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}
.gift-burst-icon, .gift-burst-label { position: relative; z-index: 6; }
.gift-burst-icon {
  width: min(48cqw, 240px);
  aspect-ratio: 1;
  mix-blend-mode: screen;
  animation: burst-pop 1.4s var(--ease-out) forwards;
}
.gift-burst-label {
  max-width: calc(100% - 2 * var(--edge));
  padding: 6px 14px;
  border-radius: var(--r-pill);
  background: var(--pink);
  color: var(--pink-ink);
  font-weight: 800;
  font-size: 16px;
  animation: burst-label 1.4s ease-out forwards;
}
.gift-burst.is-mine .gift-burst-label { background: var(--lime); color: var(--lime-ink); }
@keyframes burst-pop {
  0% { transform: translateY(40px) scale(0.3); opacity: 0; }
  24% { transform: translateY(0) scale(1.1); opacity: 1; }
  42% { transform: scale(1); }
  78% { opacity: 1; }
  100% { transform: translateY(-50px) scale(1.04); opacity: 0; }
}
@keyframes burst-label {
  0%, 12% { transform: translateY(10px); opacity: 0; }
  28%, 80% { transform: none; opacity: 1; }
  100% { opacity: 0; }
}

/* --- the name and gift sheets ------------------------------------------------------------------- */

.sheet-scrim.is-light { background: rgba(3, 2, 6, 0.3); }
.sheet-head-end { display: flex; align-items: center; gap: 8px; }
.coins-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding-inline: 8px 12px;
  border-radius: var(--r-pill);
  background: var(--raised);
  box-shadow: inset 0 0 0 1px var(--line);
  font-weight: 700;
}
.coins-chip .num { font-size: 15px; }
.gift-grid { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 12px 0 0; padding: 0; }
.gift-option {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px 9px;
  border-radius: var(--r-md);
  background: var(--raised);
}
.gift-option:not(:disabled):hover { background: var(--hover); }
.gift-option[aria-pressed='true'] { background: var(--hover); box-shadow: inset 0 0 0 2px var(--lime); }
.gift-option:disabled { opacity: 0.38; cursor: not-allowed; }
.gift-icon { width: 56px; height: 56px; mix-blend-mode: lighten; } /* the icon's near-black ground takes the tile's colour */
.gift-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 650; }
.gift-price { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); }
.gift-price .num { font-size: 12px; }
.sheet-note { margin: 10px 2px 0; color: var(--ink-2); font-size: 14px; line-height: 1.35; }
.field {
  width: 100%;
  height: 50px;
  margin-block-start: 12px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--r-md);
  background: var(--raised);
  color: var(--ink-1);
  font: inherit;
  font-size: 16px;
  box-shadow: inset 0 0 0 1px var(--line);
  outline: none;
}
.field::placeholder { color: var(--ink-3); opacity: 1; }
.field:focus { box-shadow: inset 0 0 0 2px var(--lime); }
.primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  margin-block-start: 10px;
  border-radius: var(--r-pill);
  background: var(--lime);
  color: var(--lime-ink);
  font-size: 17px;
  font-weight: 800;
}
.primary:disabled { background: var(--raised); color: var(--ink-4); cursor: default; }
.primary:not(:disabled):active { transform: scale(0.98); }
.gift-send-price { display: inline-flex; align-items: center; gap: 4px; }
.gift-sheet-form, .name-form { display: flex; flex-direction: column; }
.sheet-small .sheet-hint { margin-block: 12px 4px; }

/* --- the navigation ---------------------------------------------------------------------------- */

:root {
  --nav-h: calc(58px + var(--safe-bottom));
  --rail-w: 216px;
}

.nav {
  position: fixed;
  inset-inline: 0;
  inset-block-end: 0;
  height: var(--nav-h);
  padding-block-end: var(--safe-bottom);
  display: flex;
  align-items: stretch;
  background: var(--panel);
  box-shadow: 0 -1px 0 var(--line);
  z-index: 10;
}
.nav-brand { display: none; }
.nav-item {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 650;
  text-decoration: none;
}
.nav-item[aria-current='page'] { color: var(--ink-1); }
.nav-icon { display: grid; place-items: center; }
.nav-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-inline: 2px; }
.nav-item.is-plus .nav-icon { width: 46px; height: 32px; border-radius: 11px; background: var(--lime); color: var(--lime-ink); }
.nav-item.is-plus .nav-label { display: none; }
.nav-item.is-plus:active .nav-icon { transform: scale(0.94); }

@media (max-width: 899px) {
  /* The stream ends where the nav begins, so the nav never covers the input or the chat. */
  .shell.is-stream .screen { inset-block-end: var(--nav-h); }
  .shell.is-stream .dock { padding-block-end: 10px; }
  /* Typing: the nav steps aside and the stream takes the whole height again (app.js useTyping). */
  html.is-typing .nav { display: none; }
  html.is-typing .shell.is-stream .screen { inset-block-end: 0; }
  html.is-typing .shell.is-stream .dock { padding-block-end: calc(var(--safe-bottom) + 10px); }
}

@media (min-width: 900px) {
  .shell { padding-inline-start: calc(var(--rail-w) + 24px); }
  .nav {
    inset-block: 0;
    inset-inline: 0 auto;
    width: var(--rail-w);
    height: auto;
    flex-direction: column;
    gap: 4px;
    padding: 22px 14px;
    box-shadow: 1px 0 0 var(--line);
  }
  [dir='rtl'] .nav { box-shadow: -1px 0 0 var(--line); }
  .nav-brand { display: block; margin: 2px 4px 20px; border-radius: var(--r-sm); }
  .nav-item {
    flex: none;
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    height: 48px;
    padding-inline: 12px;
    border-radius: var(--r-md);
    color: var(--ink-2);
    font-size: 16px;
  }
  .nav-item:hover { background: var(--raised); color: var(--ink-1); }
  .nav-item[aria-current='page'] { background: var(--raised); color: var(--ink-1); box-shadow: inset 0 0 0 1px var(--line); }
  .nav-item.is-plus .nav-icon { width: 32px; height: 28px; border-radius: 9px; margin-inline-start: -4px; }
  .nav-item.is-plus .nav-label { display: inline; }
  /* The player shrinks before the row of rail, player and chat would overflow a narrow window. */
  .shell.is-stream .screen { height: min(100%, calc((100vw - var(--rail-w) - 72px - 300px) * 16 / 9)); align-self: center; }
}

/* --- the screens around the stream ------------------------------------------------------------- */

.page {
  position: absolute;
  inset: 0;
  inset-block-end: var(--nav-h);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.page-inner { position: relative; max-width: 640px; margin-inline: auto; padding: calc(var(--safe-top) + 14px) 16px 36px; }
.page-inner.is-wide { max-width: 1040px; }
@media (min-width: 900px) {
  .page { position: relative; inset: auto; flex: 1; min-width: 0; height: 100%; }
  .page-inner { padding-block-start: 4px; }
}
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-block-end: 12px; }
@media (min-width: 900px) { .page-logo { visibility: hidden; } }
.page-title { margin: 18px 0 12px; font-family: var(--font-display); font-weight: 750; font-size: 27px; letter-spacing: -0.015em; line-height: 1.15; }
.page-title.is-first { margin-block-start: 8px; }
.page-empty { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.45; }
.section-hint, .profile-section .section-hint { margin: 8px 0 0; color: var(--ink-3); font-size: 14px; line-height: 1.4; }
.flip-rtl { display: grid; }
[dir='rtl'] .flip-rtl { transform: scaleX(-1); }

/* Discover: chips, then tiles. */
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-inline: -16px;
  padding: 2px 16px 4px;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding-inline: 15px;
  border-radius: var(--r-pill);
  background: var(--raised);
  color: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 15px;
  font-weight: 650;
}
.chip:has(.chip-cover) { padding-inline-start: 5px; }
.chip-cover { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.chip:hover { color: var(--ink-1); }
.chip[aria-pressed='true'] { background: var(--ink-1); color: var(--canvas); box-shadow: none; }

.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
@media (min-width: 900px) { .tiles { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; } }
.tile {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--raised);
  color: var(--ink-1);
  text-decoration: none;
}
.tile::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--line);
  background:
    linear-gradient(to bottom, rgba(7, 6, 11, 0.5) 0%, rgba(7, 6, 11, 0) 28%),
    linear-gradient(to top, rgba(7, 6, 11, 0.88) 0%, rgba(7, 6, 11, 0) 46%);
}
.tile-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; transition: transform 0.35s var(--ease-out); }
.tile:hover .tile-poster { transform: scale(1.04); }
.tile:active { transform: scale(0.985); }
.tile-top { position: absolute; z-index: 1; inset-block-start: 8px; inset-inline: 8px; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.tile-live { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 6px; background: var(--pink); color: var(--pink-ink); font-size: 11px; font-weight: 800; letter-spacing: 0.06em; }
.tile-viewers { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border-radius: 6px; background: var(--glass); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.tile-viewers .num { font-size: 12px; }
.tile-foot { position: absolute; z-index: 1; inset-inline: 11px; inset-block-end: 10px; display: flex; flex-direction: column; gap: 1px; }
.tile-name { font-family: var(--font-display); font-weight: 750; font-size: 19px; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-category { color: var(--ink-2); font-size: 13px; font-weight: 600; }

/* The streamer's page. */
.profile-banner { position: absolute; inset-block-start: 0; inset-inline: 0; height: calc(var(--safe-top) + 210px); overflow: hidden; }
.profile-banner img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%; filter: blur(16px) saturate(1.15); transform: scale(1.2); }
.profile-banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(7, 6, 11, 0.3) 0%, rgba(7, 6, 11, 0.55) 55%, var(--canvas) 100%); }
@media (min-width: 900px) { .profile-banner { border-radius: var(--r-lg); } }
.profile-bar { position: relative; display: flex; }
.profile-head { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; margin-block-start: 64px; text-align: center; }
.profile-avatar { position: relative; display: block; width: 104px; height: 104px; border-radius: 50%; box-shadow: 0 0 0 3px var(--canvas), 0 0 0 6px var(--pink); }
.profile-avatar-clip { display: block; width: 100%; height: 100%; overflow: hidden; border-radius: 50%; }
/* The poster is the whole scene; the avatar comes in towards the upper middle, where the face is. */
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.6); transform-origin: 50% 34%; }
.profile-live {
  position: absolute;
  inset-inline: 0;
  inset-block-end: -11px;
  width: max-content;
  margin-inline: auto;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--pink);
  color: var(--pink-ink);
  box-shadow: 0 0 0 3px var(--canvas);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.profile-name { margin: 16px 0 0; font-family: var(--font-display); font-weight: 780; font-size: 34px; letter-spacing: -0.02em; line-height: 1.05; }
:lang(ar) .profile-name, :lang(he) .profile-name, :lang(hi) .profile-name, :lang(th) .profile-name { letter-spacing: 0; }
.profile-marks { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; }
.boqo-mark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding-inline: 9px 11px;
  border-radius: var(--r-pill);
  background: rgba(155, 123, 255, 0.13);
  box-shadow: inset 0 0 0 1px rgba(155, 123, 255, 0.5);
  color: var(--violet);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.boqo-mark::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.boqo-mark:hover { background: rgba(155, 123, 255, 0.22); }
.profile-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin: 4px 0 0; color: var(--ink-2); font-size: 14.5px; }
.profile-watching { display: inline-flex; align-items: center; gap: 5px; }
.profile-actions { display: flex; gap: 10px; margin-block-start: 12px; }
.profile-actions .follow { min-height: 46px; padding-inline: 26px; font-size: 16px; }
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding-inline: 20px;
  border-radius: var(--r-pill);
  background: var(--raised);
  color: var(--ink-1);
  box-shadow: inset 0 0 0 1px var(--line);
  font-weight: 700;
  text-decoration: none;
}
.secondary:hover { background: var(--hover); }
.live-dot.is-pink { background: var(--pink); }
.profile-section { margin-block-start: 28px; }
.profile-section h2 { margin: 0 0 8px; font-family: var(--font-display); font-weight: 740; font-size: 19px; }
.profile-section p { margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.5; }
.clips { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.clip { position: relative; aspect-ratio: 9 / 16; overflow: hidden; border-radius: var(--r-md); background: var(--raised); }
.clip img { width: 100%; height: 100%; object-fit: cover; }
.clip::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--line); background: linear-gradient(to top, rgba(7, 6, 11, 0.45), rgba(7, 6, 11, 0) 40%); }
/* The door to boqo: violet, boqo's own mark. */
.boqo-door { padding: 16px; border-radius: var(--r-lg); background: var(--panel); box-shadow: inset 0 0 0 1px rgba(155, 123, 255, 0.4); }
.boqo-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding-inline: 16px;
  border-radius: var(--r-pill);
  background: var(--violet);
  color: #0d0a19;
  font-size: 17px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}
.boqo-button:active { transform: scale(0.98); }

/* The wallet. */
.balance { display: flex; flex-direction: column; align-items: stretch; padding: 18px; border-radius: var(--r-lg); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.balance-label { color: var(--ink-2); font-size: 14px; font-weight: 650; }
.balance-amount { display: flex; align-items: center; gap: 10px; margin-block-start: 4px; }
.balance-amount .num { font-size: 46px; font-weight: 600; line-height: 1.1; }
.balance .primary { margin-block-start: 16px; }
.gift-option.is-static { cursor: default; }
.packs { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.pack {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 56px;
  padding-inline: 16px;
  border-radius: var(--r-md);
  background: var(--raised);
  box-shadow: inset 0 0 0 1px var(--line);
}
.pack:hover { background: var(--hover); }
.pack:active { transform: scale(0.98); }
.pack-coins { display: inline-flex; align-items: center; gap: 8px; }
.pack-coins .num { font-size: 18px; }
.pack-price { color: var(--lime); font-weight: 800; }

/* The viewer's own page. */
.me-head { display: flex; flex-direction: column; align-items: center; padding-block-start: 12px; text-align: center; }
.me-avatar {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--raised);
  color: var(--lime);
  box-shadow: 0 0 0 2px var(--canvas), 0 0 0 4px var(--lime);
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 750;
}
.me-head .page-title { margin: 14px 0 0; max-width: 100%; overflow-wrap: anywhere; }
.settings { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 14px; }
.setting {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding-inline: 16px;
  border-radius: var(--r-md);
  background: var(--raised);
  box-shadow: inset 0 0 0 1px var(--line);
  text-align: start;
}
.setting:hover { background: var(--hover); }
.setting-label { flex: none; font-size: 16px; font-weight: 650; }
.setting-value { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: var(--ink-2); white-space: nowrap; overflow: hidden; }
.setting-hint { margin: 6px 4px 0; color: var(--ink-3); font-size: 13.5px; line-height: 1.4; }
.switch { position: relative; flex: none; width: 46px; height: 28px; border-radius: 14px; background: var(--ink-4); transition: background 0.15s ease; }
.switch i { position: absolute; inset-block-start: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--ink-1); transition: transform 0.15s var(--ease-out); }
.switch.is-on { background: var(--lime); }
.switch.is-on i { background: var(--lime-ink); transform: translateX(18px); }
[dir='rtl'] .switch.is-on i { transform: translateX(-18px); }
.follows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.follow-row { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: var(--r-md); background: var(--raised); color: var(--ink-1); text-decoration: none; }
.follow-row:hover { background: var(--hover); }
.follow-row img { flex: none; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: 50% 28%; }
.follow-row-text { display: flex; flex-direction: column; min-width: 0; }
.follow-row-name { font-weight: 700; }
.follow-row-sub { color: var(--ink-3); font-size: 13px; }

/* The provider bar over boqo's creator (spec §6.1); its colours are boqo's own, in boqo.css. */
.boqo-bar {
  margin: calc(-14px - var(--safe-top)) -16px 0;
  padding: calc(var(--safe-top) + 9px) 16px 9px;
  background: rgba(155, 123, 255, 0.14);
  box-shadow: inset 0 -1px 0 rgba(155, 123, 255, 0.4);
  color: var(--violet);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
@media (min-width: 900px) { .boqo-bar { margin: 0; padding-block-start: 9px; border-radius: var(--r-md); } }

/* The stream's top bar: the streamer is a link to their page. */
.who-link { display: flex; align-items: center; gap: 9px; min-width: 0; color: inherit; text-decoration: none; border-radius: var(--r-pill); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .w.is-focus { transform: none; } /* the focus stays in its colour; nothing grows */
}

/* --- off air (ruling R27) ----------------------------------------------------------------------- */

/* A streamer outside its slot, in the pager: the portrait dimmed and still, and when it is on. */
.offair { position: absolute; inset: 0; overflow: hidden; background: var(--canvas); }
.offair-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.85) brightness(0.42); }
.offair::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(7, 6, 11, 0.92) 0%, rgba(7, 6, 11, 0.35) 55%, rgba(7, 6, 11, 0.2) 100%); }
.offair-body {
  position: absolute;
  z-index: 1;
  inset-inline: 0;
  inset-block-end: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 24px 20px calc(36px + 6cqh);
  text-align: center;
}
.offair-name { margin: 0; font-family: var(--font-display); font-weight: 750; font-size: 34px; letter-spacing: -0.015em; line-height: 1.1; }
.offair-time { margin: 10px 0 0; font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--ink-1); }
.offair-countdown { margin: 0; color: var(--ink-2); font-size: 16px; }
.offair-countdown .num, .offline-count .num { color: var(--pink); font-size: inherit; }
.watch-onair {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  margin-block-start: 14px;
  padding-inline: 22px;
  border-radius: var(--r-pill);
  background: var(--lime);
  color: var(--lime-ink);
  font-size: 16px;
  font-weight: 800;
}
.watch-onair .live-dot { background: var(--pink); }
.watch-onair:active { transform: scale(0.97); }

/* "/" outside the window: the hours, a countdown and the night's line-up. */
.shell.is-offline .page-inner { max-width: 560px; }
.offline-hero { margin-block: 26px 8px; padding: 22px 18px; border-radius: var(--r-lg); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); text-align: center; }
.offline-title { margin: 0; font-family: var(--font-display); font-weight: 750; font-size: 28px; letter-spacing: -0.015em; line-height: 1.15; text-wrap: balance; }
.offline-window { margin: 10px 0 0; color: var(--ink-1); font-size: 16.5px; font-weight: 600; line-height: 1.4; }
.offline-local { margin: 4px 0 0; color: var(--ink-2); font-size: 15px; }
.offline-count { margin: 16px 0 0; color: var(--ink-2); font-size: 18px; font-weight: 600; }
.offline-count .num { font-size: 22px; }
.lineup-section { margin-block-start: 22px; }
.lineup-title { margin: 0 0 10px; font-family: var(--font-display); font-weight: 740; font-size: 19px; }
.lineup { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.lineup-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border-radius: var(--r-md); background: var(--raised); }
.lineup-row img { flex: none; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: 50% 28%; }
.lineup-name { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lineup-time { color: var(--ink-2); }

/* Discover's later tiles and the streamer's page off air. */
.tile-time { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 6px; background: var(--glass-strong); color: var(--ink-1); font-size: 12px; }
.tile.is-later .tile-poster { filter: grayscale(0.6) brightness(0.7); }
.profile-avatar.is-off { box-shadow: 0 0 0 3px var(--canvas), 0 0 0 6px var(--ink-4); }
.profile-avatar.is-off img { filter: grayscale(0.6); }
.secondary.is-quiet { color: var(--ink-2); font-weight: 650; }
