/* ==================================================================
   Omniryx design system
   Dark bento layout: black canvas, translucent zinc tiles, electric
   purple for actions, emerald glow for LIVE, gold for supporters.
   Change the tokens below to restyle everything.
   ================================================================== */
:root {
  color-scheme: dark;

  /* canvas and tiles */
  --bg: #000;
  --surface: rgba(24, 24, 27, .66);   /* zinc-900, see-through for the blur */
  --surface-solid: #101013;           /* modals, popovers, menus */
  --surface-2: rgba(255, 255, 255, .04);
  --surface-3: rgba(255, 255, 255, .08);
  --border: rgba(255, 255, 255, .1);
  --border-strong: rgba(255, 255, 255, .18);
  --blur: blur(20px) saturate(140%);

  /* text */
  --text: #fafafa;
  --muted: #a1a1aa;   /* zinc-400 */
  --faint: #71717a;   /* zinc-500 */
  --link: #c4b5fd;    /* violet-300 */

  /* accents */
  --accent: #a855f7;                  /* electric purple */
  --accent-strong: #7c3aed;
  --accent-grad: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #d946ef 100%);
  --accent-glow: 0 0 0 1px rgba(168, 85, 247, .5), 0 8px 28px -6px rgba(168, 85, 247, .65);
  --live: #10b981;                    /* emerald */
  --live-grad: linear-gradient(135deg, #059669 0%, #10b981 50%, #34d399 100%);
  --live-glow: 0 0 0 1px rgba(52, 211, 153, .55), 0 0 22px rgba(16, 185, 129, .55);
  --accent-2: #34d399;                /* emerald, for "good" states */
  --on-accent-2: #022c22;
  --gold: #fbbf24;                    /* supporters and tips */
  --on-gold: #2a1800;
  --danger: #f87171;
  --ok: #34d399;

  --badge-broadcaster: #f43f5e;
  --badge-moderator: #10b981;
  --badge-supporter: #fbbf24;
  --badge-tipper: #e879f9;
  --badge-ink: #0a0a0a;

  /* shape and type */
  --radius: 24px;       /* tiles (rounded-3xl) */
  --radius-sm: 16px;    /* inner cards (rounded-2xl) */
  --gap: 12px;
  --chat-width: 360px;
  --topbar: 60px;
  --font: 'Geist', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: var(--font);
  --mono: 'Geist Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(1000px 600px at 15% -10%, rgba(124, 58, 237, .16), transparent 60%),
    radial-gradient(800px 500px at 100% 110%, rgba(16, 185, 129, .08), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 14px/1.5 var(--font);
  letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
a { color: var(--link); text-underline-offset: 3px; }
[hidden] { display: none !important; }
svg { fill: currentColor; }
::selection { background: rgba(168, 85, 247, .45); }
* { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .14) transparent; }

/* A bento tile */
.tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  height: var(--topbar);
  display: flex; align-items: center; gap: 16px;
  padding: 0 16px;
  background: rgba(0, 0, 0, .6);
  border-bottom: 1px solid var(--border);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}
/* Logo: two play shapes side by side (purple, then green) and a spaced-out
   capital wordmark. The mark is the same file as the browser-tab icon. */
.logo {
  display: flex; align-items: center; gap: 11px;
  font: 800 17px/1 var(--display);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
}
.logo span:last-child { margin-right: -.2em; } /* no trailing letter space */
.logo em { font-style: normal; color: inherit; }
.logo-mark {
  width: 30px; height: 30px; flex: none;
  background: url("/favicon.svg") center / contain no-repeat;
}
.status { display: flex; align-items: center; gap: 10px; }
.live-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font: 700 11px/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--muted);
}
.live-pill.on {
  background: var(--live-grad);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--live-glow);
}
.live-pill.on::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .25; } }
.viewers { display: flex; align-items: center; gap: 5px; color: var(--muted); font-family: var(--mono); font-size: 13px; }
.viewers svg { width: 15px; height: 15px; }
.viewers b { color: var(--text); font-weight: 600; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* ---------- buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 14px;
  font-weight: 600; font-size: 13px;
  background: var(--surface-3);
  color: var(--text);
  white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .2s, transform .05s;
}
.btn:hover { background: rgba(255, 255, 255, .12); border-color: var(--border-strong); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent-grad); border-color: transparent; color: #fff; box-shadow: var(--accent-glow); }
.btn.primary:hover { filter: brightness(1.12); }
.btn.danger { background: rgba(248, 113, 113, .1); border-color: rgba(248, 113, 113, .25); color: var(--danger); }
.btn.danger:hover { background: rgba(248, 113, 113, .18); }
.btn.small { padding: 4px 10px; font-size: 12px; border-radius: 10px; }
.btn:disabled { opacity: .45; cursor: default; filter: none; }
.btn svg { width: 15px; height: 15px; flex: none; }
.icon-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 0; border-radius: 12px;
  background: transparent;
  color: var(--text);
}
.icon-btn:hover { background: rgba(255, 255, 255, .1); }
.icon-btn svg { width: 20px; height: 20px; }

.input {
  width: 100%;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, .45);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: var(--faint); }
.input:focus { border-color: rgba(168, 85, 247, .7); box-shadow: 0 0 0 3px rgba(168, 85, 247, .2); }
select.input { appearance: auto; }
label.field { display: grid; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }

.user-btn {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: 999px;
  padding: 3px 12px 3px 3px;
  background: var(--surface-3);
  font-weight: 600; font-size: 13px;
}
.user-btn:hover { border-color: var(--border-strong); background: rgba(255, 255, 255, .12); }

.avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700; font-size: 13px;
  color: var(--badge-ink);
  flex: none;
}

/* ---------- page layout: bento grid ---------- */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--chat-width);
  gap: var(--gap);
  padding: var(--gap);
  height: calc(100dvh - var(--topbar));
}
.stage {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: min-content;
  align-content: start;
  gap: var(--gap);
  overflow-y: auto;
  min-height: 0;
  border-radius: var(--radius);
}

/* video: the anchor tile */
.player {
  grid-column: 1 / -1;
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;
  max-height: calc(100dvh - var(--topbar) - 3 * var(--gap) - 76px);
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  justify-self: center;
}
.player video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }

/* stream info tile */
.info {
  grid-column: 1 / -1;
  display: flex; gap: 14px; align-items: center;
  padding: 14px 16px;
  min-width: 0;
}
.info .avatar {
  width: 46px; height: 46px; font-size: 18px; font-weight: 800;
  background: var(--accent-grad); color: #fff;
}
.info .avatar.live { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--live), 0 0 24px rgba(16, 185, 129, .6); }
.info-text { min-width: 0; flex: 1; }
.info h1 {
  margin: 0 0 5px;
  font: 700 18px/1.25 var(--display);
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.meta { display: flex; gap: 10px; align-items: center; color: var(--muted); flex-wrap: wrap; font-size: 13px; }
.uptime { display: inline-flex; align-items: center; gap: 6px; font: 500 12px var(--mono); color: var(--accent-2); }
.uptime::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--live); box-shadow: 0 0 8px var(--live); }
.category {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border-radius: 8px;
  background: rgba(168, 85, 247, .14);
  border: 1px solid rgba(168, 85, 247, .3);
  color: #e9d5ff;
  font-weight: 600; font-size: 12px;
}
.info-actions { display: flex; gap: 8px; flex: none; }

/* theater: just the video and chat */
body.theater .player { max-height: calc(100dvh - var(--topbar) - 2 * var(--gap)); }
body.theater .info, body.theater .about, body.theater .vods, body.theater .ad-slot, body.theater .site-foot { display: none; }

/* ---------- player overlays ---------- */
.offline {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background:
    radial-gradient(60% 70% at 25% 20%, rgba(124, 58, 237, .35), transparent 70%),
    radial-gradient(50% 60% at 85% 90%, rgba(16, 185, 129, .16), transparent 70%),
    #07070a;
  text-align: center;
  padding: 16px;
}
.offline::before {
  /* fine grid texture */
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  pointer-events: none;
}
.offline-card { position: relative; }
.offline-card h2 { font: 800 30px/1.1 var(--display); letter-spacing: -.035em; margin: 18px 0 8px; }
.offline-card p { margin: 0 auto; max-width: 420px; color: var(--muted); }
.offline-icon {
  width: 64px; height: 64px; margin: 0 auto;
  border-radius: 20px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, .05) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c4b5fd' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M5 12.5a7 7 0 0 1 14 0M8.5 12.5a3.5 3.5 0 0 1 7 0'/%3E%3Ccircle cx='12' cy='13' r='1' fill='%23c4b5fd'/%3E%3Cpath d='M3 4l18 16'/%3E%3C/svg%3E") center/30px no-repeat;
  backdrop-filter: var(--blur);
}
.connecting {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 999px;
  background: rgba(0, 0, 0, .7);
  border: 1px solid var(--border);
  backdrop-filter: var(--blur);
  font-weight: 600;
}
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, .2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.unmute {
  position: absolute; left: 14px; top: 14px;
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border-strong); border-radius: 12px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, .6);
  backdrop-filter: var(--blur);
  font-weight: 600;
}
.unmute svg { width: 18px; height: 18px; }

.controls {
  position: absolute; left: 10px; right: 10px; bottom: 10px;
  display: flex; align-items: center; gap: 4px;
  padding: 6px 8px;
  border-radius: 16px;
  background: rgba(0, 0, 0, .55);
  border: 1px solid var(--border);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .2s, transform .2s;
}
.player:hover .controls, .player:focus-within .controls { opacity: 1; transform: none; }
#offline:not([hidden]) ~ .controls { display: none; }
.controls .spacer { flex: 1; }
.controls input[type=range] { width: 90px; accent-color: var(--accent); }
.tech {
  font: 600 10.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-2); margin-left: 6px;
}
.tech:empty { display: none; }
.quality-select {
  height: 30px; padding: 0 8px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: rgba(0, 0, 0, .5);
  color: var(--text);
  font: 600 12px var(--mono);
  cursor: pointer;
}
.quality-select option { background: var(--surface-solid); }

/* ---------- chat tile ---------- */
.chat {
  display: flex; flex-direction: column;
  min-height: 0;
  position: relative;
  overflow: hidden;
}
.chat-head {
  display: flex; align-items: center; gap: 8px;
  height: 50px; flex: none;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  font: 700 14px/1 var(--display);
  letter-spacing: -.01em;
}
.conn { width: 7px; height: 7px; border-radius: 50%; background: var(--danger); margin-left: auto; }
.conn.ok { background: var(--ok); box-shadow: 0 0 8px var(--ok); }

.messages {
  list-style: none; margin: 0;
  padding: 8px 6px;
  flex: 1; min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
/* compact, scannable rows */
.msg {
  padding: 4px 10px;
  border-radius: 10px;
  line-height: 1.5;
  font-size: 13.5px;
  overflow-wrap: anywhere;
  position: relative;
  animation: pop .16s ease-out;
}
@keyframes pop { from { transform: translateY(3px); opacity: 0; } }
.msg:hover { background: var(--surface-2); }
/* A message that @mentions you */
.msg.mention,
.msg.mention:hover {
  background: linear-gradient(90deg, rgba(168, 85, 247, .24), rgba(168, 85, 247, .08));
  box-shadow: inset 3px 0 0 var(--accent);
}
.msg .at { font-weight: 700; color: var(--link); }
.msg .at.me {
  color: #fff;
  background: var(--accent);
  padding: 1px 6px;
  border-radius: 6px;
}
.msg.system, .msg.notice {
  color: var(--faint);
  font-size: 12px;
  text-align: center;
  padding: 3px 10px;
}
.msg.notice { color: var(--muted); }
.msg.system:hover, .msg.notice:hover { background: none; }
.msg .time { color: var(--faint); font: 500 11px var(--mono); margin-right: 6px; font-variant-numeric: tabular-nums; }
.msg .name {
  font-weight: 700;
  background: none; border: 0; padding: 0;
}
.msg .name:hover { text-decoration: underline; text-underline-offset: 3px; }
.msg .colon { color: var(--faint); }
.msg .text { color: #e4e4e7; }
.msg .text a { word-break: break-all; }
/* Delete / timeout / ban buttons on a message: on hover, or tap on phones */
.msg-actions {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  display: none; gap: 2px; padding: 2px;
  background: var(--surface-solid);
  border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .5);
}
.msg:hover .msg-actions, .msg.show-actions .msg-actions { display: flex; }
.mod-act {
  width: 28px; height: 26px; display: grid; place-items: center;
  border: 0; border-radius: 7px; background: none; color: var(--muted);
}
.mod-act svg { width: 16px; height: 16px; }
.mod-act:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
.mod-act.timeout:hover { color: var(--gold); }
.mod-act.ban:hover, .mod-act.delete:hover { color: var(--danger); }
@media (hover: none) {
  .msg:hover .msg-actions { display: none; }
  .msg.show-actions .msg-actions { display: flex; }
  .mod-act { width: 36px; height: 32px; }
  .msg.show-actions { background: var(--surface-2); }
}

.badges { display: inline-flex; gap: 3px; vertical-align: -3px; margin-right: 5px; }
.badge {
  width: 18px; height: 18px;
  border-radius: 6px;
  display: inline-grid; place-items: center;
  color: var(--badge-ink);
}
.badge svg { width: 12px; height: 12px; }
.badge.broadcaster { background: var(--badge-broadcaster); color: #fff; }
.badge.moderator { background: var(--badge-moderator); }
.badge.supporter { background: var(--badge-supporter); }
.badge.tipper { background: var(--badge-tipper); }

.emote { height: 26px; width: auto; vertical-align: middle; margin: -4px 1px; }
.emote.big { height: 52px; margin: 2px; }

.jump {
  position: absolute; left: 50%; bottom: 84px; transform: translateX(-50%);
  border: 0; border-radius: 999px;
  padding: 6px 14px;
  background: var(--accent-grad); color: #fff;
  font-weight: 600; font-size: 12px;
  box-shadow: var(--accent-glow);
}

.composer { padding: 10px; border-top: 1px solid var(--border); flex: none; }
.composer form { display: flex; gap: 8px; align-items: flex-end; }
.compose-box {
  flex: 1;
  display: flex; align-items: center;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(0, 0, 0, .45);
  transition: border-color .15s, box-shadow .15s;
}
.compose-box:focus-within { border-color: rgba(168, 85, 247, .7); box-shadow: 0 0 0 3px rgba(168, 85, 247, .18); }
.compose-box textarea {
  flex: 1;
  border: 0; outline: none; background: transparent;
  resize: none;
  padding: 9px 0 9px 12px;
  max-height: 120px;
  line-height: 1.4;
}
.compose-box textarea::placeholder { color: var(--faint); }
.compose-box .icon-btn { color: var(--muted); width: 32px; height: 32px; margin-right: 3px; border-radius: 10px; }
.compose-box .icon-btn:hover { color: var(--text); }
.composer .btn.primary { height: 40px; border-radius: 14px; }
.composer .hint { font: 500 11px var(--mono); color: var(--muted); margin-top: 6px; text-align: right; }
.composer .hint:empty { display: none; }
.composer .gate { display: grid; gap: 8px; text-align: center; color: var(--muted); font-size: 13px; }

/* ---------- popovers ---------- */
.popover {
  position: fixed;
  z-index: 20;
  background: rgba(16, 16, 19, .92);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .7);
}
#emojiPicker { width: 320px; max-width: calc(100vw - 32px); padding: 10px; }
.picker-search { margin-bottom: 8px; }
.picker-grid {
  display: grid; grid-template-columns: repeat(auto-fill, 44px);
  gap: 4px; max-height: 240px; overflow-y: auto;
}
.picker-grid button {
  position: relative;
  border: 0; border-radius: 12px;
  background: transparent;
  width: 44px; height: 44px; padding: 0;
  display: grid; place-items: center;
}
.picker-grid button:hover { background: var(--surface-3); }
.picker-grid img { max-width: 34px; max-height: 34px; }
.picker-grid button.locked img { filter: grayscale(1); opacity: .4; }
.picker-grid button.locked::after {
  content: ''; position: absolute; right: 3px; bottom: 3px;
  width: 12px; height: 12px; border-radius: 4px;
  background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%232a1800' d='M7 10V8a5 5 0 0 1 10 0v2h1v11H6V10h1Zm2 0h6V8a3 3 0 0 0-6 0v2Z'/%3E%3C/svg%3E") center/9px no-repeat;
}
.picker-name { font: 500 11px var(--mono); color: var(--muted); margin-top: 8px; min-height: 16px; }
.picker-empty { color: var(--muted); padding: 18px 8px; text-align: center; font-size: 13px; }

.suggest { padding: 4px; min-width: 200px; border-radius: 14px; }
.suggest button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: 0; border-radius: 10px; background: transparent;
  padding: 5px 8px; text-align: left; font-family: var(--mono); font-size: 12px;
}
.suggest button.active, .suggest button:hover { background: var(--surface-3); }
.suggest img { height: 24px; }

.usercard { width: 280px; max-width: calc(100vw - 32px); padding: 16px; }
.usercard .head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.usercard .avatar { width: 44px; height: 44px; font-size: 18px; }
.usercard h3 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.usercard .since { color: var(--muted); font: 500 11px var(--mono); }
.usercard .state { font-size: 12px; color: var(--danger); margin-bottom: 8px; }
.usercard .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 12px; }
.usercard .actions .wide { grid-column: span 2; }
.badge-labels { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.badge-label {
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 10.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em;
  padding: 3px 9px 3px 3px; border-radius: 8px;
  background: var(--surface-3); border: 1px solid var(--border);
}

/* ---------- modal ---------- */
.modal {
  width: min(540px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: 0 40px 100px rgba(0, 0, 0, .8), 0 0 0 1px rgba(168, 85, 247, .08);
}
.modal::backdrop { background: rgba(0, 0, 0, .7); backdrop-filter: blur(8px); }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--surface-solid); z-index: 1;
}
.modal-head h2 { margin: 0; font: 700 18px/1.2 var(--display); letter-spacing: -.02em; }
.modal-body { padding: 20px; display: grid; gap: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; }
.error { color: var(--danger); font-size: 13px; min-height: 1em; margin: 0; }
.muted { color: var(--muted); }
.section-title { font: 600 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin: 6px 0 -4px; }

.tabs { display: flex; gap: 4px; padding: 4px; background: rgba(0, 0, 0, .5); border: 1px solid var(--border); border-radius: 14px; }
.tabs button {
  flex: 1; border: 0; border-radius: 10px; padding: 7px;
  background: transparent; color: var(--muted); font-weight: 600; font-size: 13px;
}
.tabs button.active { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swatch {
  width: 28px; height: 28px; border-radius: 9px;
  border: 2px solid transparent;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .3);
}
.swatch.active { border-color: #fff; box-shadow: 0 0 0 3px rgba(168, 85, 247, .35); }
.swatch-custom { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 9px; background: none; overflow: hidden; }
.swatch-custom::-webkit-color-swatch-wrapper { padding: 0; }
.swatch-custom::-webkit-color-swatch { border: 0; border-radius: 9px; }
.preview {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, .4);
  border: 1px dashed var(--border-strong);
}

.keyrow { display: flex; gap: 8px; }
.keyrow .input { font-family: var(--mono); }
.steps { margin: 0; padding-left: 18px; color: var(--muted); display: grid; gap: 4px; }
code { font-family: var(--mono); }
.steps code, .modal code { background: rgba(0, 0, 0, .5); border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px; color: var(--text); font-size: 12px; }

.toggle.on { background: rgba(168, 85, 247, .2); border-color: rgba(168, 85, 247, .5); color: #f3e8ff; }

.emoji-upload { display: grid; grid-template-columns: 72px 1fr; gap: 14px; align-items: center; }
.drop {
  width: 72px; height: 72px; border-radius: var(--radius-sm);
  border: 1.5px dashed var(--border-strong);
  display: grid; place-items: center;
  color: var(--muted); font-size: 11px; text-align: center;
  cursor: pointer; overflow: hidden;
}
.drop:hover { border-color: var(--accent); }
.drop img { max-width: 56px; max-height: 56px; }
.emoji-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.emoji-item {
  display: grid; grid-template-columns: 40px 1fr; gap: 4px 10px; align-items: center;
  padding: 8px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border);
}
.emoji-item img { width: 40px; height: 40px; object-fit: contain; grid-row: span 2; }
.emoji-item code { background: none; padding: 0; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.emoji-item .row { display: flex; gap: 4px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  z-index: 50;
  max-width: calc(100vw - 32px);
  padding: 10px 16px; border-radius: 14px;
  background: rgba(16, 16, 19, .92); border: 1px solid var(--border-strong);
  backdrop-filter: var(--blur);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .6);
  font-weight: 600; font-size: 13px;
}

/* ---------- support & tips ---------- */
.btn.gold { background: linear-gradient(135deg, #f59e0b, #fbbf24 60%, #fde68a); border-color: transparent; color: var(--on-gold); box-shadow: 0 8px 24px -8px rgba(251, 191, 36, .6); }
.btn.gold:hover { filter: brightness(1.08); }

.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip {
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 10px;
  padding: 4px 11px;
  font: 600 12px var(--mono);
}
.chip:hover { border-color: var(--border-strong); background: var(--surface-3); }
.chip.active { background: var(--accent-grad); border-color: transparent; color: #fff; box-shadow: var(--accent-glow); }

.support-card {
  display: grid; gap: 14px;
  padding: 18px;
  border-radius: 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.support-card.featured {
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(168, 85, 247, .22), transparent 60%),
    radial-gradient(80% 80% at 100% 100%, rgba(251, 191, 36, .1), transparent 60%),
    rgba(255, 255, 255, .03);
  border-color: rgba(168, 85, 247, .35);
}
.support-head { display: flex; gap: 14px; align-items: center; }
.support-head h3 { margin: 0; font: 700 18px/1.2 var(--display); letter-spacing: -.02em; }
.support-head .muted { font-size: 13px; }
.price { font: 600 13px var(--mono); color: var(--gold); }
.badge.big { width: 44px; height: 44px; flex: none; border-radius: 14px; }
.badge.big svg { width: 22px; height: 22px; }
.perks { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 13.5px; }
.perks li::before { content: "✓"; color: var(--accent-2); font-weight: 800; margin-right: 8px; }
.support-done { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fine { font-size: 12px; margin: 0; text-align: center; }

.msg.celebrate {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 6px 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: radial-gradient(120% 140% at 0% 0%, rgba(168, 85, 247, .28), transparent 60%), rgba(255, 255, 255, .04);
  border: 1px solid rgba(168, 85, 247, .45);
  box-shadow: 0 0 24px -8px rgba(168, 85, 247, .6);
}
.msg.celebrate.supporter {
  background: radial-gradient(120% 140% at 0% 0%, rgba(251, 191, 36, .22), transparent 60%), rgba(255, 255, 255, .04);
  border-color: rgba(251, 191, 36, .45);
  box-shadow: 0 0 24px -8px rgba(251, 191, 36, .55);
}
.msg.celebrate:hover { background-color: rgba(255, 255, 255, .06); }
.celebrate-icon {
  width: 30px; height: 30px; flex: none;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--gold); color: var(--on-gold);
}
.celebrate.tip .celebrate-icon { background: var(--badge-tipper); color: var(--badge-ink); }
.celebrate-icon svg { width: 16px; height: 16px; }
.msg.celebrate .text { margin-top: 2px; }

.ad-slot {
  grid-column: 1 / -1;
  padding: 10px 14px 14px;
}
.ad-label { display: flex; justify-content: space-between; font: 600 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }
.linklike { border: 0; background: none; padding: 0; color: var(--link); font-weight: 600; font-size: 12px; text-transform: none; letter-spacing: 0; font-family: var(--font); }
.linklike:hover { text-decoration: underline; }

/* ---------- footer & forms ---------- */
.site-foot { grid-column: 1 / -1; display: flex; gap: 18px; justify-content: center; padding: 2px 0 6px; font-size: 12px; }
.site-foot a { color: var(--faint); text-decoration: none; }
.site-foot a:hover { color: var(--text); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.modal-body .linklike { justify-self: start; }

/* ---------- profile pictures ---------- */
.avatar.has-img { background: var(--surface-3); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.avatar.big { width: 72px; height: 72px; font-size: 28px; }
.avatar.tiny { width: 20px; height: 20px; font-size: 10px; }
.profile { display: grid; gap: 14px; }
.profile-row { display: flex; gap: 16px; align-items: center; }
.profile-pic-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.profile-pic-actions small { flex-basis: 100%; }
.usercard .bio { margin: 0 0 10px; color: #d4d4d8; font-size: 13px; overflow-wrap: anywhere; }
.chat-head .icon-btn.small { width: 28px; height: 28px; border-radius: 8px; color: var(--muted); }
.chat-head .icon-btn.small svg { width: 16px; height: 16px; }
.chat-head .icon-btn.small:hover { color: var(--text); }
.chat-head .conn { margin-left: auto; margin-right: 4px; }

/* ---------- about & past broadcasts ---------- */
/* Desktop: the wrapper and phone-only parts stay out of the bento grid. */
.more { display: contents; }
.mobile-tabs, .more-empty { display: none; }
.more-empty { color: var(--muted); text-align: center; padding: 32px 16px; margin: 0; font-size: 13.5px; }
.about, .vods, .schedule { grid-column: 1 / -1; padding: 16px 18px; display: grid; gap: 10px; }
.about h2, .vods h2 { margin: 0; font: 700 14px/1.2 var(--display); letter-spacing: -.01em; }
.about-text { margin: 0; color: #d4d4d8; white-space: pre-line; overflow-wrap: anywhere; max-width: 70ch; }
.about-links { display: flex; flex-wrap: wrap; gap: 8px; }
.about-links:empty { display: none; }
.about-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 10px;
  background: var(--surface-3); border: 1px solid var(--border);
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 13px;
}
.about-link:hover { border-color: rgba(168, 85, 247, .5); box-shadow: var(--accent-glow); }
.about-link svg { width: 14px; height: 14px; color: var(--link); }
.vod-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.vod-card { display: grid; gap: 4px; color: var(--text); text-decoration: none; min-width: 0; }
.vod-thumb {
  position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--border);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5.5v13l11-6.5L8 5.5Z' fill='%23ffffff' fill-opacity='.8'/%3E%3C/svg%3E") center/34px no-repeat,
    radial-gradient(80% 90% at 20% 10%, rgba(124, 58, 237, .45), transparent 70%),
    radial-gradient(60% 70% at 90% 100%, rgba(16, 185, 129, .2), transparent 70%), #0b0b0f;
  transition: border-color .15s, box-shadow .2s;
}
.vod-card:hover .vod-thumb { border-color: rgba(168, 85, 247, .6); box-shadow: var(--accent-glow); }
.vod-dur { position: absolute; right: 6px; bottom: 6px; padding: 2px 6px; border-radius: 6px; background: rgba(0, 0, 0, .75); font: 600 11px var(--mono); }
.vod-title { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vod-meta { color: var(--muted); font: 500 11.5px var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- dashboard embeds ---------- */
body.embed-chat { background: var(--surface-solid); }
body.embed-chat .topbar, body.embed-chat .stage { display: none; }
body.embed-preview .site-foot a { pointer-events: none; }
body.embed-chat .layout { grid-template-columns: 1fr; grid-template-rows: 1fr; padding: 0; gap: 0; height: 100dvh; }
body.embed-chat .chat { border: 0; border-radius: 0; box-shadow: none; background: transparent; backdrop-filter: none; }
body.embed-chat .chat-head { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  :root { --chat-width: 320px; }
}

/* Phones and small tablets: an app-style screen that doesn't scroll as a page.
   Video and stream info stay on top; tabs switch the rest between chat,
   past broadcasts and the about section, each scrolling on its own. */
@media (max-width: 760px) {
  :root { --gap: 8px; --radius: 20px; }
  .layout {
    display: flex; flex-direction: column;
    height: calc(100dvh - var(--topbar));
    padding: 0; gap: 0;
    overflow: hidden;
  }
  .stage { display: contents; }
  .player {
    order: 1; flex: none;
    max-height: 42dvh;
    border-radius: 0; border-width: 0 0 1px;
  }
  .info { order: 2; flex: none; margin: var(--gap) var(--gap) 0; padding: 10px 12px; gap: 10px; }
  .info .avatar { display: none; }
  .info h1 { font-size: 15px; margin-bottom: 4px; }
  .info-actions .btn { padding: 7px 12px; }

  .mobile-tabs {
    order: 3; flex: none;
    display: flex; gap: 2px;
    margin: var(--gap) var(--gap) 0; padding: 4px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  }
  .mobile-tabs button {
    flex: 1; border: 0; border-radius: 10px; padding: 8px 0;
    background: none; color: var(--muted); font-weight: 700; font-size: 13.5px;
  }
  .mobile-tabs button.active { background: var(--surface-3); color: var(--text); }

  .chat { order: 4; flex: 1; min-height: 0; height: auto; margin: var(--gap); }
  .more {
    order: 4; flex: 1; min-height: 0;
    display: none; flex-direction: column; gap: var(--gap);
    padding: var(--gap);
    overflow-y: auto; overscroll-behavior: contain;
  }
  body[data-tab=videos] .chat, body[data-tab=about] .chat { display: none; }
  body[data-tab=videos] .more, body[data-tab=about] .more { display: flex; }
  body[data-tab=videos] .about, body[data-tab=videos] .about-empty, body[data-tab=videos] .schedule { display: none; }
  body[data-tab=about] .vods, body[data-tab=about] .vods-empty { display: none; }
  body[data-tab=videos] #vods[hidden] ~ .vods-empty,
  body[data-tab=about] .about-empty.show { display: block; }
  .vod-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .offline-card h2 { font-size: 20px; margin-top: 12px; }
  .offline-card p { font-size: 13px; }
  .offline-icon { width: 48px; height: 48px; background-size: 24px; border-radius: 14px; }
  .controls { opacity: 1; transform: none; }
  #theaterBtn { display: none; }
  .topbar { gap: 10px; padding: 0 12px; }
  .logo { font-size: 15px; gap: 9px; }
  .logo-mark { width: 26px; height: 26px; }
  .user-btn .uname { display: none; }
  .user-btn { padding: 3px; }
  .support-top { display: none; }
  .emoji-upload { grid-template-columns: 1fr; }
  body.embed-chat .layout { padding: 0; }
  body.embed-chat .chat { height: 100dvh; min-height: 0; margin: 0; }
}

/* user card: one-tap timeout durations */
.usercard .timeout-row { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.usercard .timeout-row .label { font-size: 12px; font-weight: 700; color: var(--muted); margin-right: 4px; }
.usercard .timeout-row .chip {
  flex: 1; min-width: 40px; padding: 7px 0;
  border: 1px solid var(--border); border-radius: 9px;
  background: var(--surface-2); color: var(--text); font: 600 12.5px var(--mono);
}
.usercard .timeout-row .chip:hover { border-color: rgba(251, 191, 36, .5); color: var(--gold); }

/* ---------- two-factor login ---------- */
.stack { display: grid; gap: 12px; }
.twofa { display: grid; gap: 12px; }
.twofa-warn { margin: 0; padding: 10px 12px; border-radius: 12px; background: rgba(251, 191, 36, .1); border: 1px solid rgba(251, 191, 36, .3); color: var(--gold); font-weight: 600; font-size: 13px; }
.twofa-on { margin: 0; color: var(--accent-2); font-weight: 700; }
.twofa-steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; color: var(--muted); font-size: 13.5px; }
.twofa-qr { justify-self: center; width: min(200px, 100%); aspect-ratio: 1; box-sizing: border-box; padding: 8px; background: #fff; border-radius: 16px; }
.twofa-qr svg { width: 100%; height: 100%; display: block; }
.twofa-key { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; }
.twofa-key code { font: 600 13px var(--mono); letter-spacing: .04em; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); overflow-wrap: anywhere; }
.code-input { font: 700 20px var(--mono); letter-spacing: .25em; text-align: center; }
.backup-codes { margin: 0; padding: 12px 12px 12px 34px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.backup-codes code { font: 600 14px var(--mono); }
.twofa-off summary { cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 600; }
.twofa-off[open] summary { margin-bottom: 12px; }
.twofa-step { display: grid; gap: 12px; }
.twofa-step .linklike { justify-self: start; }

/* pinned message */
.pinned {
  display: flex; gap: 8px; align-items: flex-start;
  margin: 8px 10px 0; padding: 8px 10px; border-radius: 14px;
  background: rgba(168, 85, 247, .12); border: 1px solid rgba(168, 85, 247, .35);
  font-size: 13px; cursor: pointer;
}
.pin-ico { color: var(--accent); flex: none; padding-top: 2px; }
.pin-ico svg { width: 15px; height: 15px; display: block; }
.pin-body { flex: 1; min-width: 0; }
.pin-text { overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pinned.open .pin-text { -webkit-line-clamp: unset; display: block; }
.pin-by { color: var(--faint); font-size: 11px; }
.pinned .icon-btn { width: 26px; height: 26px; flex: none; color: var(--muted); }
.mod-act.pin:hover { color: var(--accent); }

/* chat command replies */
.msg.bot { background: rgba(255, 255, 255, .03); }
.bot-tag { font: 700 9.5px/1 var(--mono); letter-spacing: .06em; padding: 3px 5px; border-radius: 5px; background: var(--surface-3); color: var(--muted); margin-right: 5px; vertical-align: 1px; }
.bot-name { color: var(--text); }

/* lockdown badge in the chat header */
.lock-pill { font: 700 10.5px/1 var(--mono); letter-spacing: .04em; padding: 4px 7px; border-radius: 8px; background: rgba(248, 113, 113, .15); color: var(--danger); border: 1px solid rgba(248, 113, 113, .35); }

/* ---------- schedule ---------- */
.schedule h2 { margin: 0; }
.schedule-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.sched-item {
  display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 9px 12px; border-radius: 14px; background: rgba(255, 255, 255, .03);
}
.sched-when { display: grid; line-height: 1.3; }
.sched-when b { font-size: 13.5px; }
.sched-when span { font: 500 12px var(--mono); color: var(--muted); }
.sched-what { display: grid; min-width: 0; line-height: 1.35; }
.sched-what span { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sched-what small { color: var(--muted); }
.sched-item.cancelled .sched-when, .sched-item.cancelled .sched-what { text-decoration: line-through; opacity: .5; }
.sched-item.now { background: rgba(16, 185, 129, .1); box-shadow: inset 2px 0 0 var(--live); }
.sched-tag { font: 700 10px/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; padding: 4px 7px; border-radius: 7px; background: var(--surface-3); color: var(--muted); }
.sched-tag.off { color: var(--danger); }
.sched-tag.on { color: var(--live); }
@media (max-width: 560px) {
  .sched-item { grid-template-columns: minmax(0, 1fr) auto; }
  .sched-what { grid-column: 1 / -1; grid-row: 2; }
}

/* "Next stream" on the offline screen */
.next-stream {
  display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 8px;
  margin: 14px auto 0; padding: 10px 16px; border-radius: 16px;
  background: rgba(0, 0, 0, .45); border: 1px solid var(--border); backdrop-filter: var(--blur);
}
.next-stream .label { font: 600 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.next-stream b { font-size: 15px; }
.next-stream .until { color: var(--accent-2); font-weight: 700; font-size: 13.5px; }
.next-stream small { flex-basis: 100%; color: var(--muted); }
.next-stream[hidden] { display: none; }

/* email */
.email-box { display: grid; gap: 12px; }
.email-ok { color: var(--accent-2); font-weight: 600; overflow-wrap: anywhere; }
.row-between { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.row-between .input { flex: 1 1 160px; width: auto; }
.forgot { display: grid; gap: 8px; }
.forgot[hidden] { display: none; }

/* ---------- mod notes (user card and dashboard) ---------- */
.notes { display: grid; gap: 8px; text-align: left; }
.notes.compact { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.notes-head { font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.note-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 180px; overflow-y: auto; }
.note-list li { padding: 8px 10px; border-radius: 10px; background: var(--surface-3); }
.note-list p { margin: 0 0 4px; font-size: 13px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.note-list small { font-size: 11.5px; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.note-add { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: end; }
.note-add textarea { font-size: 13px; resize: vertical; }
.link-btn { background: none; border: 0; padding: 0; margin-left: auto; color: var(--muted); font: inherit; text-decoration: underline; cursor: pointer; }
.link-btn:hover { color: var(--danger); }

/* ---------- ban appeal (viewer side) ---------- */
.appeal textarea { resize: vertical; }
.appeal-last { display: grid; gap: 6px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.appeal-last.denied b { color: var(--danger); }
.appeal-last.approved b { color: var(--accent-2, #34d399); }
.appeal-last p { margin: 0; font-size: 12.5px; }
.appeal blockquote, .appeal-last blockquote { margin: 0; padding: 8px 12px; border-left: 3px solid var(--border-strong); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }

/* offline screen: last stream + links */
.offline-actions { display: grid; justify-items: center; gap: 12px; margin-top: 18px; }
.offline-actions[hidden] { display: none; }
.last-stream { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.last-stream svg { width: 18px; height: 18px; fill: currentColor; }
.last-stream small { font: 600 11.5px var(--mono); opacity: .8; }
.offline-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
/* calendar links under the schedule */
.cal-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.cal-label { margin-right: 4px; }
.cal-links .btn { text-decoration: none; color: var(--text); }
@media (max-width: 760px) { .cal-label { flex-basis: 100%; margin: 0; } }
/* A small player (narrow window, phones) gets a tighter offline screen, so
   the next stream and the last-stream button fit inside the video area. */
.player { container: player / inline-size; }
@container player (max-width: 760px) {
  .offline { padding: 10px; }
  .offline-icon { display: none; }
  .offline-card h2 { font-size: 20px; margin: 0 0 4px; }
  .offline-card p { font-size: 13px; }
  .next-stream { margin-top: 8px; padding: 6px 12px; gap: 2px 8px; }
  .next-stream b { font-size: 13.5px; }
  .next-stream small { display: none; }
  .offline-actions { margin-top: 8px; gap: 6px; }
  .offline-links { display: none; }
  .last-stream { padding: 7px 12px; font-size: 13px; }
}
@container player (max-width: 460px) {
  #offlineText { display: none; }
}

/* ---------- chat viewer list ---------- */
.chat-head .icon-btn.small.on { color: var(--text); background: var(--surface-3); }
.viewer-list {
  position: absolute; inset: 50px 0 0; z-index: 5;
  display: flex; flex-direction: column;
  background: rgba(10, 10, 13, .97); backdrop-filter: var(--blur);
  border-radius: 0 0 var(--radius) var(--radius);
}
.viewer-list[hidden] { display: none; }
.viewer-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px 8px; }
.viewer-head .muted { font-size: 12.5px; }
.viewer-head .icon-btn { margin-left: auto; width: 28px; height: 28px; font-size: 13px; }
.viewer-search { margin: 0 16px 8px; width: auto; }
.viewer-groups { flex: 1; overflow-y: auto; padding: 0 8px 12px; }
.viewer-groups section { margin-top: 8px; }
.viewer-groups h3 {
  display: flex; align-items: center; gap: 6px; margin: 4px 8px 4px;
  font: 700 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint);
}
.viewer-groups h3 .count { color: var(--muted); }
.viewer-groups ul { list-style: none; margin: 0; padding: 0; }
.viewer {
  display: flex; align-items: center; gap: 6px; width: 100%;
  padding: 6px 8px; border: 0; border-radius: 10px; background: none;
  font: 700 13.5px var(--font); text-align: left; cursor: pointer;
}
.viewer:hover { background: var(--surface-2); }
.viewer > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-empty { padding: 16px 8px; margin: 0; font-size: 13px; }
.viewer-foot { margin: 0; padding: 10px 16px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted); }
/* the pop-out chat window keeps its header (for the viewer list) */
body.embed-chat.popout .chat-head { display: flex; }
body.popout #popoutBtn { display: none; }
body.embed-chat:not(.popout) .viewer-list { inset: 0; }

/* ---------- replies and first messages ---------- */
.reply-ctx {
  display: flex; align-items: center; gap: 5px; width: 100%; min-width: 0;
  margin: 0 0 1px; padding: 0; border: 0; background: none;
  font: 500 11.5px var(--font); color: var(--faint); text-align: left; cursor: pointer;
}
.reply-ctx svg { width: 13px; height: 13px; flex: none; }
.reply-ctx b { font-weight: 700; flex: none; }
.reply-ctx span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-ctx:hover span { color: var(--muted); }
.msg.flash { animation: flash 1.6s ease-out; }
@keyframes flash { 0%, 30% { background: rgba(168, 85, 247, .35); } 100% { background: transparent; } }
.reply-bar {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px;
  margin-bottom: 8px; padding: 6px 6px 6px 12px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border); font-size: 12.5px;
}
.reply-bar[hidden] { display: none; }
.reply-label { color: var(--muted); white-space: nowrap; }
.reply-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--faint); }
.mod-act.reply:hover { color: var(--link); }
/* someone's first message in this chat */
.msg.first { box-shadow: inset 3px 0 0 var(--accent-2); background: rgba(52, 211, 153, .07); }
.first-tag {
  display: block; width: fit-content; margin-bottom: 2px; padding: 1px 7px; border-radius: 6px;
  font: 700 10px/1.6 var(--mono); letter-spacing: .06em; text-transform: uppercase;
  color: var(--on-accent-2); background: var(--accent-2);
}

/* ---------- reports ---------- */
.mod-act.report:hover { color: var(--danger); }
.report-reasons { display: flex; flex-wrap: wrap; gap: 6px; }
.report-reasons .chip[aria-checked=true] { border-color: var(--accent); background: rgba(168, 85, 247, .18); color: var(--text); }
.report-quote { margin: 0; padding: 8px 12px; border-left: 3px solid var(--border-strong); font-size: 13.5px; overflow-wrap: anywhere; }
.report-link { display: block; margin: 10px auto 0; font-size: 12px; }

/* ---------- polls ---------- */
.poll {
  margin: 8px 10px 0; padding: 10px 12px; border-radius: 14px;
  background: rgba(52, 211, 153, .08); border: 1px solid rgba(52, 211, 153, .35);
  display: grid; gap: 8px; font-size: 13px;
}
.poll.ended { background: rgba(255, 255, 255, .04); border-color: var(--border-strong); }
.poll-head { display: flex; align-items: flex-start; gap: 8px; }
.poll-tag { flex: none; padding: 1px 6px; border-radius: 6px; font: 700 10px/1.6 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--on-accent-2); background: var(--accent-2); }
.poll.ended .poll-tag { background: var(--surface-3); color: var(--muted); }
.poll-q { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.poll-head .btn, .poll-head .icon-btn { flex: none; }
.poll-options { display: grid; gap: 5px; }
.poll-opt {
  position: relative; display: flex; justify-content: space-between; gap: 8px; align-items: center;
  padding: 7px 10px; border-radius: 10px; border: 1px solid var(--border); overflow: hidden;
  background: var(--surface-2); color: var(--text); font: 600 13px var(--font); text-align: left;
}
button.poll-opt { cursor: pointer; }
button.poll-opt:hover { border-color: var(--accent-2); }
div.poll-opt::before {
  content: ''; position: absolute; inset: 0 auto 0 0; width: var(--pct, 0%);
  background: rgba(52, 211, 153, .22); transition: width .4s ease;
}
.poll-opt.mine { border-color: var(--accent-2); }
.poll-opt.winner::before { background: rgba(52, 211, 153, .4); }
.poll-text, .poll-pct { position: relative; }
.poll-text { overflow-wrap: anywhere; }
.poll-pct { font: 700 12px var(--mono); color: var(--muted); }
.poll-foot { display: flex; gap: 10px; font-size: 11.5px; color: var(--faint); }
.poll-left { margin-left: auto; font-family: var(--mono); }
.poll-form { display: grid; gap: 14px; }
.poll-answers { display: grid; gap: 6px; margin: 6px 0; }

/* ---------- mature content ---------- */
.mature-gate {
  position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; padding: 16px;
  background: rgba(7, 7, 10, .96); backdrop-filter: blur(24px); text-align: center;
}
.mature-card { max-width: 440px; display: grid; justify-items: center; gap: 10px; }
.mature-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; background: rgba(251, 191, 36, .14); color: var(--gold); }
.mature-icon svg { width: 26px; height: 26px; fill: currentColor; }
.mature-card h2 { margin: 4px 0 0; font: 800 24px/1.1 var(--display); letter-spacing: -.02em; }
.mature-card p { margin: 0; color: var(--muted); font-size: 14px; }
.mature-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px; }
.mature-actions a { text-decoration: none; }
.mature-tag { padding: 2px 7px; border-radius: 6px; font: 700 11px/1.5 var(--mono); color: var(--on-gold); background: var(--gold); }
.mature-tag[hidden] { display: none; }
@container player (max-width: 460px) {
  .mature-icon { display: none; }
  .mature-card h2 { font-size: 18px; }
  .mature-card p { font-size: 12.5px; }
}

/* ---------- clips ---------- */
.clip-thumb { background: radial-gradient(80% 90% at 30% 20%, rgba(52, 211, 153, .35), transparent 70%), #0b0b10; }
.clip-lengths { display: flex; flex-wrap: wrap; gap: 6px; }
.clip-lengths .chip[aria-checked=true] { border-color: var(--accent); background: rgba(168, 85, 247, .18); color: var(--text); }
.clip-dialog .modal-body { display: grid; gap: 14px; }
body[data-tab=about] .clips { display: none; }

/* "Notify me" bell */
.info-actions { flex-wrap: wrap; justify-content: flex-end; }
.notify-btn { display: inline-flex; align-items: center; gap: 6px; }
.notify-btn svg { width: 16px; height: 16px; fill: currentColor; }
.notify-btn.on { color: var(--accent-2); border-color: rgba(52, 211, 153, .45); }

/* ---------- loyalty number on the supporter badge ---------- */
.badge.loyal { position: relative; }
.badge .months {
  position: absolute; right: -5px; bottom: -4px; min-width: 12px; height: 12px; padding: 0 2px;
  border-radius: 6px; background: var(--surface-solid); color: var(--gold);
  font: 800 8.5px/12px var(--mono); font-style: normal; text-align: center; box-shadow: 0 0 0 1px var(--gold);
}
.badges .badge.loyal { margin-right: 4px; }
.gift-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.gift-btn svg { width: 15px; height: 15px; fill: var(--gold); }
.msg.celebrate.gift { background-color: rgba(251, 191, 36, .1); }

/* ---------- goal bar ---------- */
.goal { grid-column: 1 / -1; padding: 12px 16px; display: grid; gap: 8px; }
.goal[hidden] { display: none; }
.goal-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.goal-head b { overflow-wrap: anywhere; }
.goal-num { font: 700 13px var(--mono); color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.goal-bar { height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.goal-bar span { display: block; height: 100%; border-radius: inherit; background: var(--accent-grad); transition: width .6s ease; }
.goal-done { font-size: 12.5px; color: var(--accent-2); font-weight: 700; }
body.theater .goal { display: none; }

/* ---------- live rewind ---------- */
.dvr { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; margin-left: 4px; }
.dvr[hidden] { display: none; }
.dvr input[type=range] { flex: 1; width: auto; min-width: 60px; }
.dvr-behind { font: 600 12px var(--mono); color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.go-live { white-space: nowrap; }
.dvr:not([hidden]) ~ .spacer { display: none; }

/* ---------- captions ---------- */
.captions {
  position: absolute; left: 50%; bottom: 64px; transform: translateX(-50%); z-index: 4;
  width: min(86%, 760px); display: grid; justify-items: center; gap: 4px; pointer-events: none; text-align: center;
}
.captions[hidden] { display: none; }
.captions span {
  padding: 3px 10px; border-radius: 8px; background: rgba(0, 0, 0, .78); color: #fff;
  font: 600 clamp(14px, 2.2vw, 22px)/1.35 var(--font); box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.captions .partial { color: #e4e4e7; }
#ccBtn.on, #rewindBtn:hover { color: var(--text); }
#ccBtn.on svg { fill: var(--accent-2); }
@container player (max-width: 560px) { .captions { bottom: 52px; } .captions span { font-size: 13px; } }

/* ---------- now playing ---------- */
.now-playing {
  display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%;
  padding: 3px 9px; border-radius: 999px; background: rgba(30, 215, 96, .1); border: 1px solid rgba(30, 215, 96, .3);
  color: var(--text); font-size: 12.5px; text-decoration: none;
}
.now-playing[hidden] { display: none; }
.now-playing svg { width: 13px; height: 13px; flex: none; fill: #1ed760; }
.now-playing span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.now-playing[href]:hover { border-color: rgba(30, 215, 96, .6); }

/* ---------- consistency pass ---------- */
/* All section headings under the stream look the same. */
.about h2, .vods h2, .schedule h2 { margin: 0; font: 700 15px/1.2 var(--display); letter-spacing: -.01em; }
/* Clip cards get the same play mark as past broadcasts. */
.clip-thumb::after {
  content: ''; position: absolute; inset: 0; margin: auto; width: 34px; height: 34px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M8 5.5v13l11-6.5-11-6.5Z'/%3E%3C/svg%3E") center / 22px no-repeat;
  opacity: .85;
}
.vod-thumb { position: relative; }
/* Profile & settings tabs */
.settings-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); position: sticky; top: -20px; z-index: 2; }
.settings-tabs button { flex: 1; padding: 8px 6px; border: 0; border-radius: 10px; background: none; color: var(--muted); font: 700 13px var(--font); white-space: nowrap; }
.settings-tabs button[aria-selected=true] { background: var(--surface-3); color: var(--text); }
.settings-group { display: grid; gap: 16px; }
.settings-group[hidden] { display: none; }

@media (max-width: 760px) {
  /* Top bar: one sign-in button (the window switches between log in and sign up). */
  .login-btn { display: none; }
  .nav .btn { padding: 7px 12px; }
  .topbar .status { gap: 6px; }
  /* Goal under the stream info, slim. */
  .goal { order: 2; margin: var(--gap) var(--gap) 0; padding: 8px 12px; gap: 6px; font-size: 13px; }
  .goal-bar { height: 6px; }
  .goal-done { display: none; }
  /* The stream title gets the room: the bell shrinks to an icon. */
  .notify-btn .btn-label { display: none; }
  .notify-btn { padding: 7px 10px; }
  .info h1 { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .settings-tabs button { font-size: 12px; }
}

/* ---------- AutoMod (moderators only) ---------- */
.msg.held { background: rgba(251, 191, 36, .08); box-shadow: inset 3px 0 0 var(--gold); display: grid; gap: 4px; }
.msg.held:hover { background: rgba(251, 191, 36, .12); }
.held-head { display: flex; gap: 6px; align-items: center; }
.held-tag { padding: 1px 6px; border-radius: 6px; font: 700 10px/1.6 var(--mono); letter-spacing: .06em; text-transform: uppercase; background: var(--gold); color: var(--on-gold); }
.held-why { font-size: 11.5px; color: var(--muted); }
.held .text { opacity: .85; }
.held-actions { display: flex; gap: 6px; }

/* ---------- standard emoji in the picker ---------- */
.picker-tabs { display: flex; gap: 2px; margin-bottom: 6px; }
.picker-tabs button { flex: 1; height: 32px; padding: 0; border: 0; border-radius: 8px; background: none; font-size: 17px; line-height: 1; cursor: pointer; }
.picker-tabs button:hover { background: var(--surface-3); }
.picker-grid { position: relative; }
.picker-heading { grid-column: 1 / -1; padding: 6px 4px 2px; font: 600 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.picker-grid .emoji-char { font-size: 25px; line-height: 1; }
.suggest-char { width: 24px; font-size: 20px; line-height: 24px; text-align: center; }

/* ---------- emoji artwork (Twemoji) ---------- */
img.emoji { display: inline-block; width: 1.25em; height: 1.25em; margin: 0 .05em; vertical-align: -.25em; }
.picker-grid img.emoji { margin: 0; }
.suggest img.emoji { height: 22px; width: 22px; margin: 0; vertical-align: middle; }
