/* =========================================================
   PBB Collab 3.0 — Fan Hub
   Token layer -> primitives -> components -> views
   ========================================================= */

:root {
  /* palette */
  --ink-900: #08060f;
  --ink-800: #0b0817;
  --ink-700: #110d20;
  --ink-600: #171129;
  --ink-500: #1e1735;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  --violet: #9c7eff;
  --violet-deep: #6f4bff;
  --cyan: #4ae3d2;
  --pink: #ff5fa2;
  --amber: #ffc65c;

  --text: #f4f1ff;
  --text-dim: #b4acc8;
  --text-mute: #8b83a0;

  /* type */
  --font-display: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* geometry */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --pad: clamp(16px, 3vw, 28px);
  --shell: 1280px;

  --shadow-1: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 18px 40px -24px rgba(0, 0, 0, 0.9);
  --shadow-2: 0 30px 80px -40px rgba(111, 75, 255, 0.55);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(111, 75, 255, 0.30), transparent 62%),
    radial-gradient(760px 460px at 92% 4%, rgba(74, 227, 210, 0.14), transparent 60%),
    radial-gradient(700px 700px at 50% 120%, rgba(255, 95, 162, 0.12), transparent 65%),
    var(--ink-900);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
}

p { margin: 0; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--violet);
  color: #120820;
  padding: 10px 16px;
  border-radius: 0 0 var(--r-sm) 0;
  font-weight: 600;
}
.skip:focus { left: 0; }

/* ---------------- topbar ---------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px var(--pad);
  background: rgba(8, 6, 15, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(140%);
}

.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark { border-radius: 8px; }
.brand-copy { display: flex; flex-direction: column; line-height: 1; }
.brand-copy strong {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.brand-copy strong b { color: var(--violet); }
.brand-copy small {
  margin-top: 3px;
  font-size: 9px;
  letter-spacing: 0.28em;
  color: var(--text-mute);
}

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav button {
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.16s, background 0.16s, border-color 0.16s;
}
.nav button:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav button[aria-current="page"] {
  color: #140a24;
  background: linear-gradient(135deg, var(--violet), #b9a6ff);
  border-color: transparent;
  font-weight: 600;
}

.topbar-actions { display: flex; align-items: center; gap: 8px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.14s, background 0.16s, border-color 0.16s;
}
.btn:hover { background: rgba(255, 255, 255, 0.09); }
.btn:active { transform: translateY(1px); }

.btn.primary {
  background: linear-gradient(135deg, var(--violet-deep), var(--violet));
  border-color: transparent;
  color: #0d0618;
  box-shadow: var(--shadow-2);
}
.btn.primary:hover { background: linear-gradient(135deg, #7d5bff, #b3a1ff); }

.btn.ghost { background: transparent; }
.btn.outline { background: transparent; }
.btn.outline[aria-pressed="true"] {
  background: rgba(156, 126, 255, 0.18);
  border-color: rgba(156, 126, 255, 0.65);
  color: #d9ccff;
}

.only-mobile { display: none; }

/* ---------------- layout ---------------- */

.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding: clamp(20px, 4vw, 44px) var(--pad) 80px;
  outline: none;
}

.stack { display: flex; flex-direction: column; gap: 22px; }

.panel {
  background: linear-gradient(180deg, rgba(23, 17, 41, 0.92), rgba(13, 10, 24, 0.92));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  padding: var(--pad);
}

.eyebrow {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.24em;
  color: var(--cyan);
  text-transform: uppercase;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.section-head h2 { font-size: clamp(20px, 2.4vw, 27px); }
.section-head p { color: var(--text-dim); font-size: 13.5px; margin-top: 7px; max-width: 62ch; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 0 0 rgba(255, 95, 162, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 9px rgba(255, 95, 162, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 95, 162, 0); }
}

/* ---------------- hero ---------------- */

.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  padding: clamp(24px, 4vw, 46px);
  background:
    radial-gradient(680px 340px at 8% 0%, rgba(111, 75, 255, 0.34), transparent 64%),
    radial-gradient(560px 320px at 100% 100%, rgba(74, 227, 210, 0.16), transparent 62%),
    linear-gradient(160deg, rgba(30, 23, 53, 0.96), rgba(10, 8, 18, 0.96));
  box-shadow: var(--shadow-1);
}
.hero::after {
  content: "3.0";
  position: absolute;
  right: -18px;
  bottom: -54px;
  font-family: var(--font-display);
  font-size: clamp(140px, 24vw, 300px);
  font-weight: 800;
  line-height: 1;
  color: rgba(255, 255, 255, 0.028);
  pointer-events: none;
}
.hero h1 {
  font-size: clamp(30px, 5.2vw, 58px);
  max-width: 17ch;
  margin: 14px 0 0;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--violet), var(--cyan) 60%, var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p {
  margin-top: 16px;
  max-width: 54ch;
  color: var(--text-dim);
  font-size: clamp(13.5px, 1.6vw, 15.5px);
  line-height: 1.65;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 30px;
  position: relative;
  z-index: 1;
}
.stat {
  padding: 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
}
.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(19px, 2.4vw, 25px);
  font-weight: 800;
}
.stat span {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
}

/* ---------------- camera wall ---------------- */

.view-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.view-controls .spacer { flex: 1 1 20px; }

.camera-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.camera-grid[data-layout="single"] { grid-template-columns: 1fr; }
.camera-grid[data-layout="dual"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.camera-tile {
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #05040a;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.camera-tile.audio-active {
  border-color: rgba(156, 126, 255, 0.72);
  box-shadow: 0 0 0 1px rgba(156, 126, 255, 0.32), 0 22px 48px -30px rgba(111, 75, 255, 0.9);
}

.camera-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.035);
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
}
.camera-top strong { font-weight: 600; letter-spacing: 0.01em; }
.camera-top span {
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.camera-feed {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #05040a;
}
.camera-feed video,
.camera-feed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
  background: #05040a;
}

.audio-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(8, 6, 15, 0.82);
  border: 1px solid rgba(156, 126, 255, 0.55);
  color: #d9ccff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  z-index: 2;
  pointer-events: none;
}

/* tap-to-listen pill — replaces the "Tap to unmute" hint, one button instead of a label */
.tile-tap {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(8, 6, 15, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.16s, border-color 0.16s, transform 0.16s;
  animation: tile-tap-pulse 2.2s ease-in-out infinite;
}
.tile-tap:hover { background: rgba(20, 16, 34, 0.9); transform: translateX(-50%) translateY(-1px); }
.tile-tap:focus-visible { outline: 2px solid #9c7eff; outline-offset: 2px; }
.tile-tap.is-live {
  background: rgba(156, 126, 255, 0.24);
  border-color: rgba(156, 126, 255, 0.65);
  color: #e6dcff;
  animation: none;
}

@keyframes tile-tap-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(156, 126, 255, 0.0), 0 6px 22px rgba(0, 0, 0, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(156, 126, 255, 0.18), 0 6px 26px rgba(0, 0, 0, 0.5); }
}
@media (prefers-reduced-motion: reduce) { .tile-tap { animation: none; } }

.tile-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.tile-footer small { color: var(--text-mute); font-size: 10.5px; letter-spacing: 0.04em; }
.tile-footer button {
  border: 0;
  background: transparent;
  color: var(--violet);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}
.tile-footer button:hover { background: rgba(156, 126, 255, 0.14); }

.player-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 11px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
}
.player-bar button {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s;
}
.player-bar button:hover { background: rgba(255, 255, 255, 0.1); }
.player-bar #bedToggle { min-height: 36px; border-radius: 999px; font-weight: 700; letter-spacing: 0.04em; }
.player-bar #bedToggle.is-on { background: rgba(156, 126, 255, 0.22); border-color: rgba(156, 126, 255, 0.55); color: #e6dcff; }
.player-bar #bedToggle.is-off { background: rgba(255, 82, 82, 0.16); border-color: rgba(255, 82, 82, 0.45); color: #ffb3b3; }

.volume {
  -webkit-appearance: none;
  appearance: none;
  width: clamp(80px, 16vw, 150px);
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  cursor: pointer;
}
.volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--violet-deep);
  cursor: pointer;
}
.volume::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 2px solid var(--violet-deep);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.audio-picker { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; color: var(--text-mute); }
.audio-picker select {
  background: var(--ink-600);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 6px 9px;
  font-size: 11.5px;
  cursor: pointer;
}

.note {
  margin-top: 12px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--text-mute);
}

/* ---------------- embed ---------------- */

.embed-frame {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #05040a;
  aspect-ratio: 16 / 10;
}
.embed-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.embed-fallback {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  background: radial-gradient(420px 260px at 50% 30%, rgba(111, 75, 255, 0.28), transparent 70%), var(--ink-800);
}
.embed-frame.is-blocked .embed-fallback { display: flex; }
.embed-fallback h4 { font-size: 16px; }
.embed-fallback p { font-size: 12.5px; color: var(--text-dim); max-width: 42ch; line-height: 1.6; }

/* ---------------- housemates ---------------- */

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s, color 0.16s, border-color 0.16s;
}
.chip:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.chip[aria-pressed="true"] {
  background: rgba(156, 126, 255, 0.18);
  border-color: rgba(156, 126, 255, 0.62);
  color: #e2d9ff;
}
.chip span { font-size: 10px; color: var(--text-mute); }
.chip[aria-pressed="true"] span { color: #c7b8ff; }

.housemate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}


/* Nominations block: compact portrait cards, automatically populated by nominations.json. */
.nomination-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 14px;
}
.nominee-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 18px 12px 16px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, var(--ink-600), var(--ink-800));
}
.nominee-avatar {
  width: 112px;
  height: 112px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.72);
  background: linear-gradient(150deg, #2a2046, #14101f);
  color: rgba(255,255,255,.7);
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
}
.nominee-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.nominee-info { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.nominee-info h3 { font-family: var(--font-display); font-size: 17px; line-height: 1.2; }
.nominee-info p { font-size: 12px; color: var(--text-dim); line-height: 1.35; }
.nominee-status {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255,112,132,.42);
  background: rgba(255,112,132,.12);
  color: #ff9eab;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}
.nominations-empty { grid-column: 1 / -1; margin: 0; padding: 18px; color: var(--text-dim); text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--r-md); }
@media (max-width: 480px) {
  .nomination-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .nominee-card { padding: 14px 8px 13px; }
  .nominee-avatar { width: 94px; height: 94px; }
  .nominee-info h3 { font-size: 15px; }
}

.hm {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--ink-600), var(--ink-800));
  display: flex;
  flex-direction: column;
  transition: transform 0.18s, border-color 0.18s;
}
.hm:hover { transform: translateY(-3px); border-color: rgba(156, 126, 255, 0.45); }

.hm-photo {
  position: relative;
  aspect-ratio: 3 / 4;
  background: linear-gradient(150deg, #2a2046, #14101f);
  overflow: hidden;
}
.hm-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.5s ease;
}
.hm-photo-landscape { aspect-ratio: 599 / 371; }
.hm-photo-landscape img { object-fit: cover; object-position: center center; }
.hm:hover .hm-photo img { transform: scale(1.045); }
.hm-initials {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.13);
  letter-spacing: 0.06em;
}

.hm-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  gap: 6px;
}
.badge {
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}
.badge.kapamilya { background: rgba(74, 227, 210, 0.16); color: #8ff2e6; border: 1px solid rgba(74, 227, 210, 0.42); }
.badge.kapuso { background: rgba(255, 95, 162, 0.16); color: #ffa7c9; border: 1px solid rgba(255, 95, 162, 0.42); }
.badge.status { background: rgba(8, 6, 15, 0.72); color: var(--text-dim); border: 1px solid var(--line-strong); }
.badge.status.nominated { background: rgba(255, 198, 92, 0.16); color: #ffd891; border-color: rgba(255, 198, 92, 0.45); }

.hm-body { padding: 13px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.hm-body h3 { font-size: 16px; }
.hm-body h3 small { display: block; font-family: var(--font-body); font-size: 10.5px; font-weight: 500; letter-spacing: 0.02em; color: var(--text-mute); margin-top: 3px; }
.hm-body p { font-size: 12px; line-height: 1.55; color: var(--text-dim); }
.hm-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.hm-foot span { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-mute); }
.hm-foot a { font-size: 11px; font-weight: 600; color: var(--violet); }
.hm-foot a:hover { color: #c9b9ff; }

/* ---------------- vote ---------------- */

.vote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}
.vote-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(156, 126, 255, 0.14), rgba(13, 10, 24, 0.9));
  transition: border-color 0.18s, transform 0.18s;
}
.vote-card:hover { transform: translateY(-3px); border-color: rgba(156, 126, 255, 0.5); }
.vote-card h3 { font-size: 16px; }
.vote-card p { font-size: 12.5px; line-height: 1.6; color: var(--text-dim); }
.vote-card .btn { margin-top: auto; align-self: flex-start; }
.vote-tag {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
}

/* ---------------- embed wrap ---------------- */

.embed-wrap { display: flex; flex-direction: column; gap: 12px; }
.embed-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-mute);
}
.embed-caption span { max-width: 60ch; }

/* ---------------- toast ---------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 24px);
  z-index: 120;
  max-width: min(92vw, 460px);
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(17, 13, 32, 0.96);
  backdrop-filter: blur(12px);
  font-size: 12.5px;
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- footer ---------------- */

.footer {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 30px var(--pad) 46px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  color: var(--text-mute);
  font-size: 11.5px;
  line-height: 1.65;
}
.footer-brand { display: flex; gap: 14px; max-width: 66ch; }
.footer-brand img { border-radius: 8px; flex-shrink: 0; }
.footer-brand strong { display: block; color: var(--text-dim); font-size: 11px; letter-spacing: 0.18em; margin-bottom: 7px; }
.footer-links { display: flex; flex-direction: column; gap: 7px; }
.footer-links a { color: var(--text-dim); }
.footer-links a:hover { color: var(--violet); }

/* ---------------- episodes ---------------- */

.episode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.episode-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--ink-600), var(--ink-800));
  transition: transform 0.18s, border-color 0.18s;
}
.episode-card:hover { transform: translateY(-3px); border-color: rgba(156, 126, 255, 0.5); }

.episode-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(260px 140px at 30% 30%, rgba(111, 75, 255, 0.45), transparent 70%),
    radial-gradient(220px 120px at 80% 80%, rgba(74, 227, 210, 0.22), transparent 70%),
    linear-gradient(135deg, #1a1330, #0a0814);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 10px 12px;
}
.ep-num {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
  line-height: 1;
}
.ep-date {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  font-weight: 600;
}

.episode-body {
  padding: 12px 13px 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ep-links { display: flex; gap: 10px; margin-top: 4px; }
.ep-links a { font-size: 11px; font-weight: 600; color: var(--violet); }
.ep-links a:hover { color: #c9b9ff; }
.episode-thumb { display: block; text-decoration: none; color: inherit; cursor: pointer; }
.episode-body strong { font-family: var(--font-display); font-size: 13.5px; font-weight: 700; }
.ep-meta { font-size: 11px; color: var(--text-mute); letter-spacing: 0.02em; }
.ep-cta { font-size: 11px; font-weight: 600; color: var(--violet); margin-top: 2px; }

/* ---------------- cast stats ---------------- */

.cast-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  font-size: 11.5px;
  color: var(--text-dim);
}
.cast-stats span b {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  margin-right: 5px;
}

/* ---------------- responsive ---------------- */

@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .camera-grid { grid-template-columns: 1fr; }
  .camera-grid[data-layout="dual"] { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .only-mobile { display: inline-flex; }
  .nav {
    position: absolute;
    top: 100%;
    left: var(--pad);
    right: var(--pad);
    flex-direction: column;
    gap: 2px;
    padding: 10px;
    margin-left: 0;
    border-radius: var(--r-md);
    border: 1px solid var(--line-strong);
    background: rgba(11, 8, 23, 0.98);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-1);
    display: none;
  }
  .nav.open { display: flex; }
  .nav button { text-align: left; border-radius: 10px; padding: 11px 13px; }
  .topbar-actions .btn.primary { display: none; }
  .footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- live fan chat ---------- */
.chat-fab {
  position: fixed;
  right: clamp(14px, 2vw, 28px);
  bottom: clamp(14px, 2vw, 28px);
  z-index: 40;
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: linear-gradient(160deg, #171129, #0d0a1c);
  box-shadow: 0 10px 28px rgba(0,0,0,0.5), 0 0 0 1px rgba(156,126,255,0.18) inset;
  font-size: 24px;
  cursor: pointer;
  display: grid; place-items: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.chat-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0,0,0,0.55), 0 0 0 1px rgba(156,126,255,0.3) inset; }
.chat-unread {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 22px; height: 22px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ff375f;
  color: #fff;
  font-size: 11px; font-weight: 800;
  display: grid; place-items: center;
  border: 2px solid #08060f;
}
.chat-panel[hidden] { display: none; }
.chat-panel {
  position: fixed;
  right: clamp(14px, 2vw, 28px);
  bottom: calc(clamp(14px, 2vw, 28px) + 68px);
  z-index: 39;
  width: min(360px, calc(100vw - 28px));
  height: min(440px, 60vh);
  display: flex;
  flex-direction: column;
  border-radius: var(--r-md, 14px);
  border: 1px solid var(--line-strong);
  background: rgba(11, 8, 23, 0.96);
  backdrop-filter: blur(14px);
  box-shadow: 0 22px 60px rgba(0,0,0,0.55);
  overflow: hidden;
}
.chat-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--line);
}
.chat-title { font-size: 13px; letter-spacing: 0.12em; }
.chat-sub { display: block; font-size: 10px; color: var(--text-mute); letter-spacing: 0.18em; margin-top: 2px; }
.chat-close {
  border: 0; background: transparent; color: var(--text-mute);
  font-size: 16px; cursor: pointer; padding: 6px 8px; border-radius: 8px;
}
.chat-close:hover { background: rgba(255,255,255,0.07); color: var(--text); }
.chat-note { margin: 0; padding: 8px 14px; font-size: 10.5px; color: var(--text-mute); border-bottom: 1px solid var(--line); }
.chat-messages {
  flex: 1 1 auto;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
  padding: 12px 14px;
}
.chat-msg { animation: chat-in 0.18s ease-out; }
@keyframes chat-in { from { opacity: 0; transform: translateY(4px); } }
.chat-msg-head { display: flex; align-items: baseline; gap: 8px; }
.chat-msg-name { font-size: 11px; font-weight: 700; color: #d9ccff; letter-spacing: 0.02em; }
.chat-msg-time { font-size: 9px; color: var(--text-mute); }
.chat-msg-text { font-size: 12.5px; line-height: 1.45; color: var(--text); overflow-wrap: anywhere; }
.chat-msg-fatal { font-size: 11px; color: #ffb3b3; }
.chat-form { padding: 10px 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.chat-input-row { display: flex; gap: 8px; }
#chatName, #chatText {
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  color: var(--text);
  padding: 8px 10px; font-size: 13px; outline: none;
}
#chatName:focus, #chatText:focus { border-color: rgba(156, 126, 255, 0.55); }
#chatName { width: 120px; }
#chatText { flex: 1 1 auto; min-width: 0; }
.chat-send { white-space: nowrap; }
@media (max-width: 560px) {
  .chat-panel { right: 8px; left: 8px; width: auto; bottom: 76px; height: 55vh; }
  #chatName { width: 96px; }
}
@media (prefers-reduced-motion: reduce) { .chat-msg { animation: none; } }


/* ---------------- daily schedule tab ---------------- */
.schedule-panel { max-width: 920px; margin-inline: auto; }
.schedule-hours {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: center;
  margin: 22px 0 16px;
  padding: 18px;
  border: 1px solid rgba(156, 126, 255, 0.28);
  border-radius: var(--r-md);
  background: linear-gradient(120deg, rgba(111, 75, 255, 0.16), rgba(74, 227, 210, 0.06));
}
.schedule-slot { text-align: center; padding: 12px 8px; }
.schedule-slot small, .schedule-details span {
  display: block;
  color: var(--text-mute);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.schedule-slot strong {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font: 800 clamp(26px, 5vw, 42px)/1.1 var(--font-display);
}
.schedule-divider { color: var(--violet); font-size: 11px; font-weight: 800; letter-spacing: 0.18em; }
.schedule-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.schedule-details > div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: rgba(255,255,255,0.025);
}
.schedule-details strong { display: block; margin-top: 7px; font-size: 13px; line-height: 1.5; }
@media (max-width: 680px) {
  .schedule-hours { gap: 6px; padding: 12px 8px; }
  .schedule-details { grid-template-columns: 1fr; }
}


/* ---------- refreshed auto-preview, offline notice and fullscreen chat ---------- */
.camera-stage { position: relative; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.camera-stage:fullscreen { width: 100vw; height: 100vh; max-height: 100vh; overflow: auto; padding: clamp(8px, 1.5vw, 20px); background: #05040a; color: var(--text); }
.camera-stage:fullscreen .camera-grid { flex: 1 1 auto; min-height: 0; align-content: center; }
.camera-stage:fullscreen .camera-grid[data-layout="single"] .camera-tile { max-height: calc(100vh - 190px); }
.camera-stage:fullscreen .camera-feed { aspect-ratio: 16 / 9; }
.camera-stage:fullscreen .player-bar { border-radius: 16px; flex: 0 0 auto; }
.camera-stage:fullscreen .inline-schedule { flex: 0 0 auto; }
.camera-stage:fullscreen .chat-fab { z-index: 10010; right: 18px; bottom: 18px; }
.camera-stage:fullscreen .chat-panel { z-index: 10009; right: 18px; bottom: 86px; }
.inline-schedule { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:12px 15px; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.035); }
.inline-schedule strong { display:block; font-size:11px; letter-spacing:.12em; color:#d8caff; }
.inline-schedule span { display:block; margin-top:4px; font-size:11px; color:var(--text-mute); }
.inline-schedule-time { text-align:right; flex:0 0 auto; }
.inline-schedule-time b { display:block; font-size:13px; }
.inline-schedule-time small { display:block; margin-top:3px; color:var(--text-mute); font-size:10px; }
.inline-schedule.is-closed { border-color:rgba(255,160,120,.35); background:rgba(255,120,70,.055); }
.inline-schedule.is-closed strong { color:#ffc49c; }
.install-app-btn { white-space:nowrap; }
.offline-notice[hidden] { display:none; }
.offline-notice { position:fixed; inset:0; z-index:20000; display:grid; place-items:center; padding:22px; background:rgba(3,2,8,.78); backdrop-filter:blur(9px); }
.offline-card { width:min(440px,100%); padding:26px; border:1px solid var(--line-strong); border-radius:20px; background:#100c1d; box-shadow:0 24px 80px rgba(0,0,0,.6); text-align:center; }
.offline-card h2 { margin:10px 0 8px; font-size:clamp(20px,4vw,27px); }
.offline-card p { color:var(--text-mute); font-size:13px; line-height:1.55; }
.offline-hours { margin:18px 0; padding:13px; border-radius:12px; background:rgba(156,126,255,.1); }
.offline-hours span { display:block; color:var(--text-mute); font-size:10px; letter-spacing:.14em; }
.offline-hours strong { display:block; margin-top:6px; font-size:18px; }
@media (max-width:640px) {
  .inline-schedule { align-items:flex-start; flex-direction:column; }
  .inline-schedule-time { text-align:left; }
  .camera-stage:fullscreen { padding:8px; }
  .camera-stage:fullscreen .camera-grid { grid-template-columns:1fr; }
  .camera-stage:fullscreen .camera-grid[data-layout="single"] .camera-tile { max-height:none; }
  .camera-stage:fullscreen .player-bar { border-radius:12px; padding:9px; }
}
@media (max-width: 760px) {
  .topbar-actions .install-app-btn { display: inline-flex !important; }
  .install-app-btn { padding: 7px 10px; font-size: 11px; }
}
.camera-stage:fullscreen .camera-grid[data-layout="single"] { display: flex; justify-content: center; align-items: center; flex: 1 1 auto; min-height: 0; }
.camera-stage:fullscreen .camera-grid[data-layout="single"] .camera-tile { width: min(100%, 160vh); max-height: calc(100vh - 190px); }
.camera-stage:fullscreen .camera-grid[data-layout="single"] .camera-feed { aspect-ratio: 16 / 9; max-height: calc(100vh - 260px); }


/* ---------- adaptive AI Auto Cam ---------- */
.auto-cam-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 14px 0 12px;
  padding: 11px 13px;
  border: 1px solid rgba(156, 126, 255, 0.28);
  border-radius: 14px;
  background: linear-gradient(115deg, rgba(111, 75, 255, 0.10), rgba(255,255,255,0.025));
}
.auto-cam-bar .btn.selected { box-shadow: 0 0 0 1px rgba(192, 171, 255, 0.45) inset; }
.auto-cam-status { flex: 1 1 280px; min-width: 180px; color: var(--text); font-size: 12px; line-height: 1.5; }
.auto-cam-local { color: var(--text-mute); font-size: 10px; letter-spacing: .04em; }
.auto-cam-monitor {
  position: fixed !important;
  left: -340px !important;
  top: 8px !important;
  width: 320px !important;
  height: 180px !important;
  overflow: hidden !important;
  opacity: .02 !important;
  pointer-events: none !important;
  z-index: -1 !important;
  contain: layout paint;
}
.auto-cam-monitor video {
  display: block !important;
  width: 320px !important;
  height: 180px !important;
  min-width: 320px !important;
  min-height: 180px !important;
  object-fit: cover;
}
@media (max-width: 640px) {
  .auto-cam-bar { align-items: flex-start; }
  .auto-cam-status { flex-basis: 100%; }
}

/* ---------- restored Donate button and payment panel ---------- */
.donate-button { color: #e4d7ff; border-color: rgba(156,126,255,.42); white-space: nowrap; }
.donate-button:hover { border-color: rgba(156,126,255,.85); background: rgba(156,126,255,.12); }
.donate-overlay[hidden] { display: none; }
.donate-overlay { position: fixed; inset: 0; z-index: 21000; display: grid; place-items: center; padding: 18px; background: rgba(3,2,8,.82); backdrop-filter: blur(10px); }
.donate-card { position: relative; width: min(430px, 100%); max-height: min(92vh, 760px); overflow: auto; padding: 28px; border: 1px solid var(--line-strong); border-radius: 22px; background: #100c1d; box-shadow: 0 24px 80px rgba(0,0,0,.65); text-align: center; }
.donate-card h2 { margin: 10px 24px 8px; font-size: clamp(20px,4vw,26px); }
.donate-card p { color: var(--text-dim); font-size: 13px; line-height: 1.55; }
.donation-qr { display: block; width: min(290px, 100%); height: auto; margin: 18px auto 12px; border-radius: 12px; background: #fff; padding: 8px; }
.donate-caption { font-size: 11px !important; color: var(--text-mute) !important; }
.donate-close { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 10px; background: rgba(255,255,255,.06); color: var(--text); font-size: 18px; cursor: pointer; }
@media (max-width: 560px) { .topbar-actions { gap: 5px; } .donate-button { padding: 7px 10px; font-size: 11px; } .donate-card { padding: 24px 18px; } }

/* ---------- chat administrator controls ---------- */
.chat-head-actions { display: flex; align-items: center; gap: 7px; }
.chat-admin-toggle { border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(156,126,255,.1); color: #ded3ff; padding: 6px 10px; font-size: 10px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.chat-admin-panel[hidden] { display: none; }
.chat-admin-panel { padding: 10px 12px; border-bottom: 1px solid var(--line); background: rgba(156,126,255,.07); }
.chat-admin-login { display: flex; flex-direction: column; gap: 7px; }
.chat-admin-login label { color: var(--text-dim); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
#chatAdminPassword { flex: 1 1 auto; min-width: 0; border: 1px solid var(--line-strong); border-radius: 8px; background: rgba(255,255,255,.05); color: var(--text); padding: 8px 10px; font-size: 12px; }
.chat-admin-status { margin: 2px 0 0; color: var(--text-mute); font-size: 10px; line-height: 1.45; }
.chat-admin-status.is-error { color: #ffb3b3; }
.chat-admin-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chat-admin-tools span { color: #bcebd9; font-size: 10px; font-weight: 700; margin-right: auto; }
.chat-admin-tools .btn { padding: 6px 10px; font-size: 10px; }
.chat-msg-actions { display: flex; justify-content: flex-end; margin-top: 3px; }
.chat-delete-btn { border: 0; background: transparent; color: #ffaaa9; font-size: 10px; text-decoration: underline; cursor: pointer; padding: 2px 4px; }
.chat-delete-btn:disabled, .chat-admin-tools button:disabled { opacity: .55; cursor: wait; }
.offline-help { margin-top: 10px; font-size: 11px !important; }
.offline-help a { color: #cbbaff; text-decoration: underline; }
.inline-schedule.is-open { border-color: rgba(74,227,210,.25); }
.inline-schedule.is-closed { border-color: rgba(255,160,120,.35); background: rgba(255,120,70,.055); }
.inline-schedule.is-closed strong { color: #ffc49c; }

.inline-schedule-time b a { color: #d9ccff; text-decoration: underline; text-underline-offset: 3px; }


/* Offline notice: make the official viewing route explicit and easy to reach. */
.offline-actions { display:flex; justify-content:center; align-items:center; flex-wrap:wrap; gap:10px; margin-top:14px; }
.offline-actions .btn { text-decoration:none; }
#offlineClose { cursor:pointer; }

/* ---------- floating help ---------- */
.help-fab{position:fixed!important;right:clamp(14px,2vw,28px)!important;bottom:calc(clamp(14px,2vw,28px) + 68px)!important;z-index:2147483000!important;display:inline-flex!important;align-items:center;justify-content:center;gap:7px;border:0;border-radius:999px;padding:11px 16px;font:700 14px/1 Inter,sans-serif;cursor:pointer;background:#fff;color:#171225;box-shadow:0 8px 24px rgba(0,0,0,.32);visibility:visible!important;opacity:1!important}
.help-fab:hover{transform:translateY(-1px)}
.help-overlay[hidden]{display:none!important}.help-overlay{position:fixed;inset:0;z-index:2147483001;background:rgba(5,4,10,.68);display:grid;place-items:end center;padding:18px}
.help-card{width:min(430px,100%);max-height:min(720px,88vh);overflow:auto;background:#161120;color:#fff;border:1px solid rgba(255,255,255,.14);border-radius:22px;padding:22px;box-shadow:0 24px 70px rgba(0,0,0,.45);position:relative}
.help-card h2{margin:0 36px 12px 0;font-size:22px}.help-card p{line-height:1.55;color:#ddd}.help-list{display:grid;gap:12px;margin:16px 0}.help-item{padding:12px 14px;border-radius:14px;background:rgba(255,255,255,.06)}.help-item strong{display:block;margin-bottom:4px}.help-close{position:absolute;right:14px;top:12px;border:0;background:transparent;color:#fff;font-size:22px;cursor:pointer}.help-note{font-size:12px;margin-bottom:0}
@media(max-width:600px){.help-fab{right:14px!important;bottom:82px!important;padding:10px 14px;font-size:13px}.help-overlay{padding:12px}.help-card{border-radius:20px}}


/* Admin / Staff role badges and emoji picker */
.chat-admin-toggle {
  border: 1px solid rgba(184, 164, 255, .35);
  background: rgba(136, 106, 255, .12);
  color: #e8ddff;
  border-radius: 8px;
  padding: 6px 9px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}
.chat-role-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .04em;
  line-height: 1.4;
  white-space: nowrap;
}
.chat-role-admin {
  color: #241400;
  background: linear-gradient(90deg, #ffd46b, #fff0b8);
}
.chat-role-staff {
  color: #071c35;
  background: linear-gradient(90deg, #8bd5ff, #d3efff);
}
.chat-admin-panel {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(144, 117, 255, .07);
}
.chat-admin-panel[hidden], .chat-emoji-picker[hidden] { display: none; }
.chat-admin-login { display: grid; gap: 6px; }
.chat-admin-login label { color: var(--text-dim); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
#chatAdminPassword {
  flex: 1 1 auto; min-width: 0; border: 1px solid var(--line-strong);
  border-radius: 8px; background: rgba(255,255,255,.05); color: var(--text);
  padding: 8px 10px; font-size: 12px;
}
.chat-admin-status { margin: 2px 0 0; color: var(--text-mute); font-size: 10px; line-height: 1.45; }
.chat-admin-status.is-error { color: #ffb3b3; }
.chat-admin-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chat-admin-tools span { color: #bcebd9; font-size: 10px; font-weight: 800; margin-right: auto; }
.chat-admin-tools .btn { padding: 6px 10px; font-size: 10px; }
.chat-emoji-wrap { position: relative; display: flex; justify-content: flex-end; padding: 5px 12px 0; }
.chat-emoji-toggle {
  border: 1px solid var(--line-strong); border-radius: 8px; background: rgba(255,255,255,.06);
  color: var(--text); cursor: pointer; padding: 5px 9px; font-size: 18px;
}
.chat-emoji-picker {
  position: absolute; z-index: 50; right: 12px; bottom: calc(100% + 6px);
  width: min(270px, calc(100vw - 54px)); max-height: 170px; overflow-y: auto;
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px;
  padding: 8px; border: 1px solid var(--line-strong); border-radius: 12px;
  background: #171329; box-shadow: 0 12px 35px rgba(0,0,0,.45);
}
.chat-emoji { border: 0; background: transparent; border-radius: 6px; padding: 4px 0; font-size: 20px; cursor: pointer; }
.chat-emoji:hover { background: rgba(255,255,255,.12); }
.chat-msg-actions { display: flex; justify-content: flex-end; margin-top: 3px; }
.chat-delete-btn { border: 0; background: transparent; color: #ffaaa9; font-size: 10px; text-decoration: underline; cursor: pointer; padding: 2px 4px; }
.chat-delete-btn:disabled, .chat-admin-tools button:disabled { opacity: .55; cursor: wait; }


.chat-admin-login[hidden] { display: none !important; }
