:root {
  --bg: #000000;
  --bg-elev: #0b0b0b;
  --bg-soft: #111111;
  --line: #1f1f1f;
  --text: #f5f5f5;
  --muted: #a3a3a3;
  --accent: #ff6a00;
  --accent-hover: #ff8126;
  --gold: #ff6a00;
  --warn: #d6d6d6;
  --bubble: #111111;
  --bubble-mine: #161616;
  --shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
  --radius: 16px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

a {
  color: var(--text);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent);
}

button,
input {
  font: inherit;
}

.hidden {
  display: none !important;
}

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

body.in-room {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.screen {
  min-height: 100vh;
  min-height: 100dvh;
}

#screen-room.room-screen,
.room-screen {
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

.screen:not(.room-screen):not(#screen-lobby) {
  display: grid;
  place-items: center;
  padding: calc(32px + var(--safe-top)) 16px calc(32px + var(--safe-bottom));
}

.card {
  width: min(440px, 100%);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 32px 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.brand.compact {
  margin-bottom: 0;
}

.logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
  display: block;
}

.wordmark {
  margin: 0;
  font-family: var(--font);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text);
}

.wordmark span {
  color: inherit;
  font-weight: inherit;
}

.topbar .wordmark {
  font-size: 22px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  letter-spacing: 0.01em;
  text-transform: none;
  font-size: 13px;
  font-weight: 500;
}

h1 {
  margin: 0 0 12px;
  font-family: var(--font);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.lede,
.fineprint {
  color: var(--muted);
  line-height: 1.55;
}

.fineprint {
  font-size: 13px;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text);
  border-radius: 10px;
  padding: 11px 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover:not(:disabled) {
  border-color: #2a2a2a;
  background: #171717;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}

.btn.primary:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #000;
}

.btn.ghost {
  background: transparent;
}

.warn {
  color: var(--warn);
  margin-top: 16px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

label {
  font-size: 13px;
  color: var(--muted);
}

input {
  width: 100%;
  background: #0c0c12;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 75, 107, 0.2);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: calc(14px + var(--safe-top)) calc(20px + var(--safe-right)) 14px calc(20px + var(--safe-left));
  border-bottom: 1px solid var(--line);
  background: rgba(8, 8, 13, 0.88);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.room-heading .wordmark {
  margin-bottom: 6px;
}

.who,
.topbar h1 {
  margin: 4px 0 0;
}

.topbar h1 {
  font-size: 18px;
  margin: 6px 0 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.lobby {
  width: min(1100px, calc(100% - 32px));
  margin: 32px auto 64px;
  padding-bottom: var(--safe-bottom);
}

.featured-hero {
  margin: 0 0 20px;
  padding: 20px 0 18px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.featured-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}

.featured-hero h2 {
  margin: 0 0 8px;
  font-family: Syne, Outfit, sans-serif;
  font-size: clamp(36px, 6vw, 64px);
  letter-spacing: -0.05em;
  line-height: 0.95;
}

.featured-copy {
  margin: 0 0 10px;
  color: var(--muted);
  max-width: 46rem;
  font-size: 16px;
  line-height: 1.45;
}

.featured-hero .category-actions {
  margin-top: 4px;
}

.featured-hero .join-cat {
  min-width: 160px;
  font-size: 17px;
  padding: 12px 22px;
}

.lobby-tools {
  margin: 0 0 16px;
}

.lobby-tools input {
  width: 100%;
  max-width: 420px;
}

.grid-heading {
  margin: 0 0 12px;
  font-family: Syne, Outfit, sans-serif;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.current-title {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lobby-head {
  margin-bottom: 20px;
}

.create {
  flex-direction: row;
  margin: 0 0 24px;
  width: 100%;
  flex-wrap: wrap;
}

.create input {
  flex: 1;
  min-width: 180px;
}

.empty-rooms {
  color: var(--muted);
  text-align: center;
  padding: 40px 16px;
  border: 1px dashed var(--line);
  border-radius: 16px;
}

.room-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.room-list li {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.room-list h2 {
  margin: 0;
  font-family: Syne, Outfit, sans-serif;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.room-list p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.room-list .room-video {
  margin-top: 8px;
  word-break: break-all;
}

.room-screen {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

.room-screen .topbar {
  position: relative;
  flex-shrink: 0;
}

.room-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 400px);
  overflow: hidden;
}

.room-layout.has-queue {
  grid-template-columns: minmax(0, 1.25fr) minmax(220px, 280px) minmax(280px, 400px);
}

.suggestion-panel {
  border-left: 1px solid var(--line);
  background: #0b0b10;
  padding: 16px 14px 20px;
  overflow: auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.suggestion-panel.hidden {
  display: none;
}

.suggestion-heading {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent, #ff7a18);
}

.suggestion-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.suggestion-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #12121a;
}

.suggestion-item .thumb,
.suggestion-item .thumb-fallback {
  width: 64px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  background: #1a1a24;
  display: grid;
  place-content: center;
  font-size: 10px;
  color: var(--muted);
}

.suggestion-copy {
  min-width: 0;
}

.suggestion-copy .opt-title {
  margin: 0;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggestion-copy .opt-label {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--muted);
}

.suggestion-upvote {
  min-width: 52px;
  padding: 6px 8px;
  font-size: 13px;
  color: var(--accent, #ff7a18);
  border-color: var(--accent, #ff7a18);
}

.suggestion-upvote.selected {
  background: var(--accent, #ff7a18);
  color: #111;
}

.stage {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

#player-wrap {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  aspect-ratio: 16 / 9;
  max-height: 100%;
  background: #05050a;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.vote-overlay,
#player-wrap .vote-card {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  margin: 0;
  max-height: 46%;
  overflow: auto;
  border-radius: 12px 12px 0 0;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  background: rgba(8, 8, 10, 0.92);
  padding: 8px 10px 10px;
  gap: 8px;
}

#player-wrap .vote-card .vote-option .thumb,
#player-wrap .vote-card .vote-option .thumb-fallback {
  aspect-ratio: 16 / 6;
  max-height: 56px;
}

#player-wrap .vote-card .opt-title {
  margin: 2px 8px 0;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.community-mode-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.community-mode-bar.hidden {
  display: none;
}

.community-mode-bar .mode-label {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.community-mode-btn.selected,
.community-mode-btn[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
}

.stage-meta {
  flex-shrink: 0;
  min-height: 0;
  max-height: 38%;
  overflow: auto;
}

.ad-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin: 0;
}

.ad-slot.hidden {
  display: none;
}

.ad-label {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.ad-slot-inner {
  width: 728px;
  max-width: 100%;
  height: 90px;
  display: grid;
  place-content: center;
  background: #16161d;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  text-align: center;
}

.ad-placeholder-copy {
  margin: 0;
  font-size: 13px;
}


.placeholder,
#video-frame,
#shorts-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.placeholder {
  display: grid;
  place-content: center;
  padding: 32px;
  text-align: center;
  color: var(--muted);
}

.placeholder p {
  margin: 0;
  max-width: 440px;
}

.stage-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.video-form,
.chat-form {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  margin: 0;
  flex-wrap: nowrap;
}

.video-form input,
.chat-form input {
  flex: 1;
  min-width: 0;
}

.video-link {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  word-break: break-all;
}

.video-link a {
  color: var(--gold);
}

.sync-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.chat-panel {
  border-left: 1px solid var(--line);
  background: var(--bg-elev);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.chat-panel h2 {
  margin: 0;
  padding: 16px 16px 10px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  flex-shrink: 0;
}

.chat-log {
  flex: 1;
  overflow: auto;
  padding: 4px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.msg {
  display: flex;
  max-width: 92%;
}

.msg .bubble {
  background: var(--bubble);
  border-radius: 16px 16px 16px 4px;
  padding: 8px 12px 10px;
}

.msg.mine {
  margin-left: auto;
}

.msg.mine .bubble {
  background: var(--bubble-mine);
  border-radius: 16px 16px 4px 16px;
}

.msg .meta,
.sys {
  font-size: 11px;
  color: var(--muted);
}

.msg .name {
  color: var(--gold);
  font-weight: 600;
}

.msg.mine .name {
  color: var(--accent-hover);
}

.msg p {
  margin: 3px 0 0;
  line-height: 1.45;
  word-break: break-word;
}

.sys {
  text-align: center;
  font-style: italic;
  margin: 4px 8px;
}

.chat-form {
  padding: 12px 12px calc(12px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}

.chat-status {
  margin: 0;
  padding: 0 14px 10px;
  color: var(--warn);
  font-size: 12px;
}

@media (max-width: 900px) {
  .card {
    padding: 28px 20px;
  }

  h1 {
    font-size: 28px;
  }

  .lobby {
    width: calc(100% - 24px);
    margin: 20px auto 40px;
  }

  .create {
    flex-direction: column;
  }

  .room-list li {
    flex-direction: column;
    align-items: stretch;
  }

  .room-layout,
  .room-layout.has-queue {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) minmax(160px, 42%);
    overflow: hidden;
  }

  .room-layout.has-queue {
    grid-template-rows: minmax(0, 1fr) minmax(72px, 22%) minmax(140px, 38%);
  }

  .stage {
    padding: 0;
    gap: 0;
    overflow: hidden;
    min-height: 0;
  }

  #player-wrap {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    aspect-ratio: auto;
    height: auto;
  }

  .suggestion-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
    max-height: none;
    min-height: 0;
  }

  #player-wrap .vote-card .vote-options {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  #player-wrap .vote-vs {
    display: none;
  }

  .ad-slot {
    padding: 10px 14px 4px;
  }

  .ad-slot-inner {
    width: 300px;
    height: 250px;
  }

  .stage-meta {
    padding: 8px 14px 10px;
    gap: 8px;
  }

  .chat-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
    min-height: 0;
  }

  .topbar h1 {
    font-size: 16px;
  }

  .topbar .wordmark {
    font-size: 18px;
  }

  .sync-note {
    font-size: 12px;
  }
}

@media (max-width: 520px) {
  .ad-slot-inner {
    width: 320px;
    height: 100px;
  }

  .pill {
    display: none;
  }

  .btn {
    padding: 11px 14px;
  }
}

.wordmark-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.room-heading {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.icon-btn {
  appearance: none;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  margin-top: 2px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.icon-btn:hover {
  border-color: var(--gold);
}

.category-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.category-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.category-card h2 {
  margin: 0;
  font-family: Syne, Outfit, sans-serif;
  font-size: 26px;
  letter-spacing: -0.04em;
}

.category-stats {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.category-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.room-picker {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.room-picker button {
  width: 100%;
  text-align: left;
}

.slot-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.countdown {
  margin: 0;
  font-family: Syne, Outfit, sans-serif;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--gold);
}

.countdown.vote-open {
  color: var(--accent-hover);
}

.vote-card {
  background: var(--bg-elev);
  border: 1px solid var(--gold);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vote-kicker {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}

.vote-options {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: stretch;
}

.vote-vs {
  align-self: center;
  font-family: Syne, Outfit, sans-serif;
  font-weight: 800;
  color: var(--muted);
}

.vote-option {
  appearance: none;
  background: #0c0c12;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  padding: 0 0 10px;
  cursor: pointer;
  text-align: left;
  overflow: hidden;
}

.vote-option:hover,
.vote-option.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(255, 75, 107, 0.25);
}

.vote-option .thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #16161f;
}

.vote-option .thumb-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #16161f;
  color: var(--muted);
  font-size: 12px;
}

.vote-option .opt-label {
  margin: 8px 10px 0;
  font-size: 11px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.vote-option .opt-title {
  margin: 4px 10px 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  word-break: break-word;
}

.vote-option .opt-votes {
  margin: 6px 10px 0;
  color: var(--muted);
  font-size: 13px;
}

.room-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 900px) {
  .vote-options {
    grid-template-columns: 1fr;
  }

  .vote-vs {
    display: none;
  }

  .countdown {
    font-size: 32px;
  }
}

.lobby-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 22px;
}

.lobby-tab {
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  font-weight: 600;
}

.lobby-tab.active,
.lobby-tab[aria-selected="true"] {
  border-color: var(--line);
  background: var(--bg-soft);
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.now-playing {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.thumb-wrap {
  position: relative;
  width: 132px;
  min-width: 132px;
  height: 88px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

.featured-hero .thumb-wrap {
  width: 210px;
  min-width: 210px;
  height: 118px;
}

.now-thumb,
.now-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.now-preview {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.thumb-wrap.previewing .now-preview {
  opacity: 1;
}

.placeholder-thumb {
  background:
    linear-gradient(135deg, var(--bg-soft), var(--bg-elev) 60%, var(--line));
}

.live-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  background: transparent;
  color: var(--text);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0;
  text-transform: none;
  border-radius: 4px;
}

.now-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.slot-left {
  margin: 0;
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
}

body:not(.age-verified) .now-thumb {
  filter: blur(18px);
  transform: scale(1.08);
}

.community-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.community-row {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.community-row .now-playing {
  grid-column: 1 / -1;
}

.community-copy h2 {
  margin: 0;
  font-family: Syne, Outfit, sans-serif;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.related-communities {
  margin: 8px 0 0;
}

.related-communities ul {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.related-communities a {
  color: var(--gold);
  text-decoration: none;
}

.related-communities a:hover {
  text-decoration: underline;
}

.related-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 11px;
  color: var(--muted);
}

.owner-mode-bar {
  margin: 10px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mode-label {
  margin: 0;
  font-size: 14px;
}

@media (max-width: 640px) {
  .thumb-wrap,
  .featured-hero .thumb-wrap {
    width: 112px;
    min-width: 112px;
    height: 76px;
  }
  .community-row {
    grid-template-columns: 1fr;
  }
}

.clickable-card {
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.clickable-card:hover,
.clickable-card:focus-visible {
  border-color: var(--gold);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  transform: translateY(-2px);
  outline: none;
}

.clickable-card:active {
  transform: translateY(0) scale(0.99);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.featured-hero.clickable-card:hover,
.featured-hero.clickable-card:focus-visible {
  transform: translateY(-3px);
}

.create-room-form {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 18px 16px;
  margin: 0 0 22px;
}

.create-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 0 0 14px;
}

.create-grid p,
.create-room-form label {
  margin: 0 0 6px;
  display: block;
  font-size: 13px;
  color: var(--muted);
}

.create-grid input,
.create-grid select,
.browser-tools input,
.browser-tools select {
  width: 100%;
}

.browser-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
  align-items: center;
}

.browser-tools input,
.browser-tools select {
  max-width: 240px;
}

.sort-btns {
  display: flex;
  gap: 8px;
}

.browser-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-elev);
}

.browser-table {
  width: 100%;
  border-collapse: collapse;
}

.browser-table th,
.browser-table td {
  text-align: left;
  padding: 12px 14px;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}

.browser-table th {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.browser-table tr.browser-row:last-child td {
  border-bottom: none;
}

.browser-table .now-playing {
  min-width: 220px;
}

.browser-table .thumb-wrap {
  width: 96px;
  min-width: 96px;
  height: 64px;
}

.owner-picks {
  margin-top: 8px;
}

.owner-pick-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.owner-pick-list button {
  width: 100%;
  text-align: left;
}

/* Text-only home / community / browser lists — no thumbnails */
.category-list,
.community-list,
.text-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.category-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.category-row,
.community-row {
  display: grid;
  grid-template-columns: minmax(8rem, 18rem) auto minmax(0, 1fr);
  gap: 6px 16px;
  align-items: baseline;
  padding: 10px 14px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.community-row {
  grid-template-columns: minmax(0, 1fr);
}

.category-row h2,
.community-row h2,
.featured-hero h2 {
  margin: 0;
  font-size: 16px;
}

.list-meta,
.category-row .current-title,
.featured-hero .current-title,
.community-row .list-meta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.category-row .current-title,
.featured-hero .current-title,
.browser-table .current-title {
  color: var(--text);
  min-width: 0;
}

.related-links {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.related-links a {
  color: var(--gold);
}

.featured-hero {
  padding: 18px 20px;
}

.featured-hero .now-playing,
.category-row .now-playing,
.community-row .now-playing,
.browser-table .now-playing,
.browser-table .thumb-wrap {
  display: none;
}

@media (max-width: 700px) {
  .category-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* Design refresh: quiet lists, chat, ads, legal, focus */
.site-footer {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 20px 16px calc(20px + var(--safe-bottom));
  color: var(--muted);
  font-size: 13px;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--text);
}

.site-footer.compact {
  margin-top: 28px;
  padding: 0;
  justify-content: flex-start;
}

.room-screen {
  display: flex;
  flex-direction: column;
}

.room-footer {
  border-top: 1px solid var(--line);
  justify-content: flex-start;
  padding: 10px 16px calc(10px + var(--safe-bottom));
}

.legal-page {
  min-height: 100vh;
  background: #000;
}

.legal-doc {
  width: min(640px, calc(100% - 40px));
  margin: 0 auto;
  padding: calc(48px + var(--safe-top)) 0 40px;
}

.legal-doc h1 {
  margin: 28px 0 16px;
}

.legal-doc p {
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 14px;
}

.legal-doc a {
  color: var(--text);
}

.gate .lede {
  font-size: 15px;
  line-height: 1.6;
}

.gate .lede a {
  color: var(--text);
}

.category-list,
.community-list,
.text-list {
  gap: 0;
  border-top: 1px solid var(--line);
}

.category-row,
.community-row {
  display: grid;
  grid-template-columns: minmax(8rem, 16rem) auto minmax(0, 1fr);
  gap: 6px 20px;
  align-items: baseline;
  padding: 14px 4px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.community-row {
  grid-template-columns: minmax(0, 1fr);
}

.clickable-card {
  cursor: pointer;
  transition: background 0.15s ease;
}

.clickable-card:hover,
.clickable-card:focus-visible {
  border-color: transparent;
  box-shadow: none;
  transform: none;
  background: #0b0b0b;
  outline: none;
}

.featured-hero.clickable-card:hover,
.featured-hero.clickable-card:focus-visible {
  transform: none;
  background: transparent;
}

.featured-hero.clickable-card:hover .featured-copy-wrap h2,
.category-row.clickable-card:hover h2 {
  color: var(--text);
}

.clickable-card:active {
  transform: none;
  box-shadow: none;
}

.category-row h2,
.community-row h2,
.featured-hero h2 {
  font-size: 16px;
  font-weight: 500;
}

.topbar {
  background: #000;
  border-bottom: 1px solid var(--line);
}

.lobby-tabs {
  border-bottom: 1px solid var(--line);
  gap: 0;
  padding: 0;
}

.lobby-tab {
  background: transparent;
  border: 0;
  border-radius: 0;
  font-weight: 500;
  color: var(--muted);
  padding: 10px 16px 12px;
}

.lobby-tab:hover {
  color: var(--text);
}

.msg .name {
  color: var(--muted);
  font-weight: 500;
}

.msg.mine .name {
  color: var(--muted);
}

.msg .bubble {
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

.msg.mine .bubble {
  background: #141414;
}

.chat-panel {
  background: #000;
}

.ad-slot {
  align-items: stretch;
  gap: 8px;
  margin: 0;
}

.ad-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.ad-slot-inner {
  width: 100%;
  max-width: 728px;
  margin: 0 auto;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 8px;
  border-style: solid;
}

.related-links a {
  color: var(--muted);
}

.related-links a:hover {
  color: var(--accent);
}

.browser-table-wrap {
  border-color: var(--line);
  background: #000;
  border-radius: 0;
}

.create-room-form {
  background: var(--bg-elev);
  border-color: var(--line);
}

input, select, textarea {
  background: #111;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}

input:focus-visible,
select:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 700px) {
  .category-row,
  .community-row {
    grid-template-columns: 1fr;
    padding: 12px 2px;
  }

  .card.gate {
    padding: 32px 22px 24px;
  }
}

#shorts-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  object-fit: contain;
}

#player-wrap video#shorts-video.hidden {
  display: none;
}

.shorts-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 10px 0 0;
}

.shorts-controls .sync-note {
  margin: 0;
  flex: 1 1 220px;
}

.request-room-wrap {
  margin: 0 0 16px;
}

#form-request-room {
  margin-top: 12px;
}

/* —— Shorts vertical snap feed —— */
.shorts-feed {
  display: none;
}

.room-screen.shorts-mode {
  background: #000;
}

.room-screen.shorts-mode .room-footer,
.room-screen.shorts-mode #player-wrap,
.room-screen.shorts-mode .stage-meta,
.room-screen.shorts-mode .slot-bar,
.room-screen.shorts-mode #unaffiliated-note {
  display: none !important;
}

.room-screen.shorts-mode .room-layout {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  background: #000;
}

.room-screen.shorts-mode .stage {
  padding: 0;
  gap: 0;
  overflow: hidden;
  min-height: 0;
  background: #000;
}

.room-screen.shorts-mode .topbar {
  background: #000;
  border-bottom-color: #1f1f1f;
  padding-top: 8px;
  padding-bottom: 8px;
}

.room-screen.shorts-mode .shorts-feed {
  display: block;
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scroll-snap-stop: always;
  overscroll-behavior: contain;
  background: #000;
  outline: none;
  scrollbar-width: thin;
  scrollbar-color: #333 transparent;
}

.shorts-slide {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.shorts-slide video,
.shorts-slide iframe {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  border: 0;
}

.shorts-gesture {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: transparent;
  touch-action: none;
  cursor: grab;
}

.shorts-slide.is-interacting .shorts-gesture {
  pointer-events: none;
}

.shorts-slide-ui {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px 16px calc(16px + var(--safe-bottom, 0px));
}

.shorts-mute {
  pointer-events: auto;
  align-self: flex-start;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #1f1f1f;
  background: rgba(11, 11, 11, 0.72);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: grid;
  place-content: center;
}

.shorts-mute:focus-visible {
  outline: 2px solid #ff6a00;
  outline-offset: 2px;
}

.shorts-hint {
  pointer-events: none;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(11, 11, 11, 0.78);
  color: #f2f2f2;
  font-size: 13px;
  letter-spacing: 0.02em;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.shorts-hint.visible {
  opacity: 1;
}

.chat-toggle {
  display: none;
}

.shorts-ad-mount:empty {
  display: none;
}

.room-screen.shorts-mode .shorts-ad-mount {
  flex-shrink: 0;
  padding: 0 12px 8px;
}

.room-screen.shorts-mode .shorts-ad-mount .ad-slot {
  padding: 0;
}

.room-screen.shorts-mode .shorts-ad-mount .ad-slot-inner {
  width: 100%;
  max-width: 300px;
  height: 100px;
  margin: 0 auto;
}

.room-screen.shorts-mode .chat-panel {
  background: #0b0b0b;
  border-left-color: #1f1f1f;
}

@media (min-width: 901px) {
  .room-screen.shorts-mode .chat-toggle {
    display: none !important;
  }
}

@media (max-width: 900px) {
  .room-screen.shorts-mode .room-layout {
    display: block;
    position: relative;
    overflow: hidden;
  }

  .room-screen.shorts-mode .stage {
    position: absolute;
    inset: 0;
  }

  .room-screen.shorts-mode .chat-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    height: 52px;
    max-height: 52px;
    overflow: hidden;
    border-left: 0;
    border-top: 1px solid #1f1f1f;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.45);
    transition: height 0.25s ease, max-height 0.25s ease;
  }

  .room-screen.shorts-mode.chat-open .chat-panel {
    height: min(58dvh, 460px);
    max-height: min(58dvh, 460px);
  }

  .room-screen.shorts-mode:not(.chat-open) .shorts-ad-mount,
  .room-screen.shorts-mode:not(.chat-open) .chat-log,
  .room-screen.shorts-mode:not(.chat-open) .chat-form,
  .room-screen.shorts-mode:not(.chat-open) .chat-status {
    display: none !important;
  }

  .room-screen.shorts-mode .shorts-slide-ui {
    padding-bottom: 68px;
  }

  .room-screen.shorts-mode .chat-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 52px;
    flex-shrink: 0;
    margin: 0;
    padding: 0 16px;
    border: 0;
    border-bottom: 1px solid #1f1f1f;
    border-radius: 16px 16px 0 0;
    background: #0b0b0b;
    color: #c8c8c8;
    font: inherit;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
  }

  .room-screen.shorts-mode .chat-toggle:focus-visible {
    outline: 2px solid #ff6a00;
    outline-offset: -2px;
  }

  .room-screen.shorts-mode .chat-heading {
    display: none;
  }

  .room-screen.shorts-mode .chat-toggle-chevron {
    display: inline-block;
    transition: transform 0.2s ease;
  }

  .room-screen.shorts-mode.chat-open .chat-toggle-chevron {
    transform: rotate(180deg);
  }

  .room-screen.shorts-mode .shorts-ad-mount .ad-slot-inner {
    width: 100%;
    max-width: 320px;
    height: 100px;
  }
}

/* Ads disabled for now */
.ad-slot.hidden, .ad-slot[hidden], #shorts-ad-mount:empty { display: none !important; }


/* —— Membership / account pages —— */
.legal-doc.legal-wide {
  width: min(960px, calc(100% - 40px));
}
.account-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.account-nav, .account-nav a, .account-nav .linkish {
  color: var(--muted, #b3b3b3);
  font-size: 14px;
}
.inline-form { display: inline; }
button.linkish {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}
.flash {
  padding: 10px 12px;
  border-radius: 8px;
  margin: 0 0 16px;
}
.flash-ok { background: #132015; color: #d8f5de; border: 1px solid #1f3a26; }
.flash-error { background: #2a1212; color: #f5d0d0; border: 1px solid #4a1f1f; }
.account-form p, .account-section p { color: var(--muted, #b3b3b3); }
.account-form label, .account-form legend { display: block; color: #f2f2f2; margin-bottom: 6px; font-size: 14px; }
.account-form input[type="text"],
.account-form input[type="password"],
.account-form input[type="email"],
.account-form input[type="number"],
.account-form select {
  width: 100%;
  max-width: 28rem;
  background: #0b0b0b;
  color: #f2f2f2;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
}
.form-note { font-size: 13px; color: var(--muted, #b3b3b3); }
.account-section { margin: 28px 0; padding-top: 8px; border-top: 1px solid #1f1f1f; }
.tier-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0 28px;
}
.tier-card {
  background: #0b0b0b;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 18px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tier-card.is-current { border-color: #ff6a00; }
.tier-card h2 { margin: 0; color: #f2f2f2; }
.tier-price { color: #f2f2f2; font-size: 28px; font-weight: 600; margin: 0; }
.tier-price span { font-size: 13px; font-weight: 400; color: #b3b3b3; }
.tier-card ul { margin: 0 0 8px; padding-left: 1.1em; color: #cfcfcf; line-height: 1.5; flex: 1; }
.tier-card .btn { width: 100%; }
.color-field { border: 0; padding: 0; margin: 12px 0; }
.color-swatch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 12px 10px 0;
  color: #f2f2f2;
  font-size: 13px;
  cursor: pointer;
}
.color-swatch::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--swatch);
  border: 1px solid #333;
}
.invite-link code {
  display: block;
  word-break: break-all;
  background: #0b0b0b;
  border: 1px solid #2a2a2a;
  padding: 8px 10px;
  border-radius: 8px;
  color: #f2f2f2;
}
.admin-members select, .admin-members input[type="number"] {
  max-width: 9rem;
  margin-right: 6px;
}
@media (max-width: 800px) {
  .tier-grid { grid-template-columns: 1fr; }
}

.member-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid #ff6a00;
  color: #ff6a00;
  font-size: 10px;
  letter-spacing: 0.04em;
  vertical-align: middle;
}
.msg .name.member-name { font-weight: 600; }
.kick-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.kick-list li { display: flex; align-items: center; gap: 6px; color: #cfcfcf; font-size: 13px; }


/* —— CircleJerk dense restyle (Pornhub-like layout, own brand) —— */
:root {
  --bg: #000000;
  --bg-elev: #0d0d0d;
  --bg-soft: #1b1b1b;
  --line: #1b1b1b;
  --text: #ffffff;
  --muted: #b8b8b8;
  --accent: #ff6a00;
  --accent-hover: #ff8126;
  --gold: #ff6a00;
  --radius: 4px;
  --topbar-h: 56px;
  --subnav-h: 40px;
}

body {
  letter-spacing: 0;
}

a:hover {
  color: var(--accent);
}

.btn {
  border-radius: 4px;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 13px;
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #111;
  font-weight: 700;
}

.btn.primary:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #111;
}

input {
  background: #0f0f0f;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  padding: 8px 12px;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(255, 106, 0, 0.25);
}

/* Dense top bar: logo + search + account */
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--topbar-h);
  padding: calc(8px + var(--safe-top)) calc(16px + var(--safe-right)) 8px calc(16px + var(--safe-left));
  background: #000;
  border-bottom: 1px solid #1b1b1b;
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar .brand.compact,
.topbar .wordmark-link {
  margin: 0;
  flex-shrink: 0;
  gap: 8px;
}

.topbar .logo {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.topbar .wordmark {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
}

.top-search {
  display: flex;
  align-items: stretch;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 560px;
  margin: 0 auto;
}

.top-search input {
  flex: 1;
  min-width: 0;
  height: 36px;
  border-radius: 4px 0 0 4px;
  border-right: 0;
  background: #0f0f0f;
  padding: 0 12px;
}

.top-search-btn {
  flex-shrink: 0;
  height: 36px;
  border-radius: 0 4px 4px 0;
  padding: 0 14px;
  font-size: 13px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex-shrink: 0;
}

.topbar .who {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.topbar .who strong {
  color: #fff;
  font-weight: 600;
}

.topbar-account {
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 10px;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  white-space: nowrap;
}

.topbar-account:hover {
  color: #111;
  background: var(--accent);
  border-color: var(--accent);
}

/* Subnav tabs under the top bar */
.lobby-tabs {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-height: var(--subnav-h);
  padding: 0 calc(16px + var(--safe-right)) 0 calc(16px + var(--safe-left));
  margin: 0;
  background: #0d0d0d;
  border-bottom: 1px solid #1b1b1b;
  position: sticky;
  top: calc(var(--topbar-h) + var(--safe-top));
  z-index: 19;
  overflow-x: auto;
}

.lobby-tab {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: #ccc;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 14px;
  cursor: pointer;
  white-space: nowrap;
}

.lobby-tab:hover {
  color: #fff;
}

.lobby-tab.active,
.lobby-tab[aria-selected="true"] {
  color: #fff;
  border-bottom-color: var(--accent);
}

/* Lobby: tight thumbnail grid */
#screen-lobby {
  background: #000;
}

.lobby {
  width: min(1280px, calc(100% - 24px));
  margin: 16px auto 40px;
  padding-bottom: var(--safe-bottom);
}

.lobby-head {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

#panel-categories .lobby-tools,
#panel-shorts .lobby-tools,
#panel-communities .lobby-tools {
  display: none;
}

.grid-heading {
  margin: 0 0 10px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
  color: #fff;
}

.thumb-grid,
#category-grid,
#shorts-grid,
#community-list.thumb-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px 10px;
  border: 0;
}

.featured-hero,
.featured-hero.featured-tile,
.video-tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  min-width: 0;
}

.featured-hero.featured-tile {
  margin: 0 0 16px;
}

#panel-categories .featured-hero.featured-tile,
#panel-shorts .featured-hero.featured-tile {
  display: flex;
  flex-direction: column;
  width: min(480px, 100%);
  margin: 0 0 16px;
}

.video-tile .thumb-wrap,
.featured-hero .thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #141414;
  border-radius: 4px;
  overflow: hidden;
  border: 0;
}

.video-tile .now-thumb,
.featured-hero .now-thumb,
.placeholder-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #141414;
}

.tile-label,
.video-tile h2,
.featured-hero h2.tile-label {
  margin: 0;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.3;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tile-meta {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.3;
}

.clickable-card:hover,
.clickable-card:focus-visible {
  background: transparent;
  transform: none;
  box-shadow: none;
}

.clickable-card:hover .thumb-wrap,
.clickable-card:focus-visible .thumb-wrap {
  outline: 2px solid var(--accent);
  outline-offset: 0;
}

.clickable-card:hover .tile-label,
.clickable-card:focus-visible .tile-label {
  color: var(--accent);
}

/* Compact Pornhub-style site footer (link row for Terms, Privacy, DMCA, 2257, Refunds, etc.) */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 14px;
  padding: 18px 16px calc(18px + var(--safe-bottom));
  margin-top: 12px;
  border-top: 1px solid #1b1b1b;
  background: #000;
  color: #8a8a8a;
  font-size: 12px;
  line-height: 1.4;
}

.site-footer a {
  color: #8a8a8a;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: #fff;
  text-decoration: none;
}

.site-footer span[aria-hidden="true"] {
  color: #333;
}

.site-footer.compact {
  margin-top: 20px;
  padding: 0;
  border: 0;
  justify-content: flex-start;
  background: transparent;
}

/* Age gate and name / auth cards — same look, gate still required */
#screen-age,
#screen-name {
  background: #000;
}

#screen-age .card,
#screen-name .card,
.card.gate {
  width: min(420px, 100%);
  background: #0d0d0d;
  border: 1px solid #1f1f1f;
  border-radius: 6px;
  padding: 28px 24px 20px;
}

#screen-age .wordmark,
#screen-name .wordmark,
.gate .wordmark {
  font-size: 22px;
  font-weight: 700;
}

#screen-age .lede,
#screen-name .lede,
.gate .lede {
  font-size: 14px;
  line-height: 1.5;
  color: #c6c6c6;
}

#screen-age .btn.primary,
#screen-name .btn.primary {
  width: 100%;
  padding: 11px 16px;
  font-size: 15px;
}

/* Rooms: compact header, no page scroll, keep actions (incl. report) visible */
body.in-room,
#screen-room.room-screen,
.room-screen {
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

.room-screen .topbar {
  position: relative;
  flex-shrink: 0;
  min-height: 48px;
  padding-top: calc(6px + var(--safe-top));
  padding-bottom: 6px;
  gap: 10px;
}

.room-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.room-heading > div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: nowrap;
}

.room-heading .brand,
.room-heading .wordmark-link {
  margin: 0;
  flex-shrink: 0;
}

.room-heading .wordmark {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.room-heading h1,
.room-screen .topbar h1 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.room-heading .who,
#room-meta {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

#unaffiliated-note {
  display: none;
}

.room-footer {
  display: none;
}

.room-layout {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.stage {
  padding: 8px 12px 10px;
  gap: 8px;
}

#player-wrap {
  border-radius: 4px;
  border-color: #1b1b1b;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
}

.stage-meta {
  gap: 6px;
  max-height: 32%;
}

.slot-bar,
.countdown,
.sync-note,
.video-link {
  font-size: 12px;
}

.chat-panel h2,
.chat-heading {
  padding: 10px 12px 8px;
  font-size: 11px;
}

.chat-form {
  padding: 8px 8px calc(8px + var(--safe-bottom));
}

.msg .name {
  color: var(--muted);
  font-weight: 500;
}

.msg.mine .name {
  color: var(--muted);
}

/* Keep room action / report controls visible */
.room-actions,
.topbar-actions,
#btn-skip,
#btn-personal-next,
#btn-video-ended,
#btn-report,
#btn-report-room,
.btn-report,
.report-room,
.room-screen [data-action="report"] {
  visibility: visible;
}

.pill {
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
}

/* Shorts: same dense chrome, feed still fills the stage */
.room-screen.shorts-mode .topbar {
  padding-top: calc(6px + var(--safe-top));
  padding-bottom: 6px;
}

.room-screen.shorts-mode .room-layout {
  overflow: hidden;
}

/* Legal / account pages share the dense bar + footer */
.legal-page {
  background: #000;
}

.legal-doc {
  padding-top: calc(24px + var(--safe-top));
}

.legal-doc .account-top,
.legal-doc > .brand,
.legal-doc > .wordmark-link {
  margin-bottom: 20px;
}

.legal-doc h1 {
  margin: 16px 0 12px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

@media (max-width: 1100px) {
  .thumb-grid,
  #category-grid,
  #shorts-grid,
  #community-list.thumb-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .topbar {
    flex-wrap: wrap;
    gap: 8px;
    min-height: 0;
  }

  .top-search {
    order: 3;
    flex: 1 1 100%;
    max-width: none;
  }

  .lobby-tabs {
    top: 0;
    position: sticky;
  }

  .thumb-grid,
  #category-grid,
  #shorts-grid,
  #community-list.thumb-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 8px;
  }

  #panel-categories .featured-hero.featured-tile,
  #panel-shorts .featured-hero.featured-tile {
    display: flex;
    flex-direction: column;
  }

  .topbar .who {
    display: none;
  }

  .lobby {
    width: calc(100% - 16px);
    margin: 12px auto 32px;
  }

  .room-heading .wordmark {
    display: none;
  }

  .stage {
    padding: 0;
    gap: 0;
  }

  .stage-meta {
    padding: 6px 10px 8px;
    max-height: 28%;
  }
}

@media (max-width: 520px) {
  .thumb-grid,
  #category-grid,
  #shorts-grid,
  #community-list.thumb-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 6px;
  }

  .tile-label,
  .video-tile h2,
  .featured-hero h2.tile-label {
    font-size: 12px;
  }

  .topbar .wordmark {
    font-size: 18px;
  }
}

/* —— Second pass: communities + account/memberships —— */

/* Communities lobby list */
#panel-communities > .lede {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.45;
  max-width: 60rem;
  color: var(--muted);
}

#panel-communities .request-room-wrap {
  margin: 0 0 14px;
}

#panel-communities #btn-request-room {
  font-size: 13px;
  padding: 7px 12px;
}

#panel-communities .create-room-form,
#form-request-room.create-room-form {
  background: #0d0d0d;
  border: 1px solid #1f1f1f;
  border-radius: 6px;
  padding: 14px 14px 12px;
  margin: 10px 0 16px;
}

#panel-communities .create-room-form .grid-heading,
#form-request-room .grid-heading {
  font-size: 15px;
  margin: 0 0 10px;
}

.community-tile .tile-label {
  font-size: 13px;
}

.community-tile .tile-meta {
  font-size: 11px;
  color: #8a8a8a;
}

/* In-community mode switcher: compact tabs, same language as the site subnav */
.community-mode-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 0;
  padding: 0 0 2px;
}

.community-mode-bar .mode-label {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a8a8a;
}

.community-mode-bar .category-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
}

.community-mode-btn {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: #ccc;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
}

.community-mode-btn:hover {
  color: #fff;
  background: transparent;
  border-color: transparent;
}

.community-mode-btn.selected,
.community-mode-btn[aria-pressed="true"] {
  color: #fff;
  border-bottom-color: var(--accent);
  background: transparent;
}

#btn-personal-next {
  font-size: 13px;
  padding: 8px 14px;
}

/* Shared community: suggestion queue column matches chat */
.suggestion-panel {
  background: #000;
  border-left: 1px solid #1b1b1b;
  padding: 10px 10px 12px;
  gap: 8px;
}

.suggestion-heading {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a8a8a;
}

.suggestion-item {
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 8px;
  padding: 6px;
  border: 1px solid #1f1f1f;
  border-radius: 4px;
  background: #0d0d0d;
}

.suggestion-item .thumb,
.suggestion-item .thumb-fallback {
  width: 72px;
  height: 40px;
  border-radius: 4px;
  background: #141414;
}

.suggestion-upvote {
  min-width: 48px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.related-communities {
  margin: 4px 0 0;
  font-size: 12px;
}

.related-communities ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.related-kicker {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8a8a8a;
}

/* Personal Shorts inside a community: Shorts feed, keep mode switcher visible */
body.community-shorts .room-layout {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  overflow: hidden;
  background: #000;
}

body.community-shorts .stage {
  position: relative;
  padding: 0;
  gap: 0;
  overflow: hidden;
  min-height: 0;
  background: #000;
}

body.community-shorts .shorts-feed {
  display: block;
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scroll-snap-stop: always;
  overscroll-behavior: contain;
  background: #000;
  outline: none;
  scrollbar-width: thin;
  scrollbar-color: #333 transparent;
}

body.community-shorts #player-wrap,
body.community-shorts .slot-bar,
body.community-shorts .room-actions,
body.community-shorts .video-form,
body.community-shorts .video-link,
body.community-shorts .sync-note,
body.community-shorts .room-footer,
body.community-shorts #unaffiliated-note,
body.community-shorts #owner-mode-bar,
body.community-shorts #kick-list,
body.community-shorts #related-communities {
  display: none !important;
}

body.community-shorts .stage-meta {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  z-index: 8;
  max-height: none;
  overflow: visible;
  padding: 0;
  background: transparent;
  pointer-events: none;
}

body.community-shorts .community-mode-bar {
  pointer-events: auto;
  width: max-content;
  max-width: 100%;
  padding: 4px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.72);
}

body.community-shorts .chat-panel {
  background: #0b0b0b;
  border-left-color: #1f1f1f;
}

@media (max-width: 900px) {
  body.community-shorts .room-layout {
    display: block;
    position: relative;
    overflow: hidden;
  }

  body.community-shorts .stage {
    position: absolute;
    inset: 0;
  }

  body.community-shorts .chat-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    height: 52px;
    max-height: 52px;
    overflow: hidden;
    border-left: 0;
    border-top: 1px solid #1f1f1f;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.45);
    transition: height 0.25s ease, max-height 0.25s ease;
  }

  body.community-shorts.chat-open .chat-panel,
  body.community-shorts .room-screen.chat-open .chat-panel,
  .room-screen.chat-open body.community-shorts .chat-panel {
    height: min(58dvh, 460px);
    max-height: min(58dvh, 460px);
  }

  /* chat-open is on #screen-room, not body — hook that */
  body.community-shorts #screen-room.chat-open .chat-panel {
    height: min(58dvh, 460px);
    max-height: min(58dvh, 460px);
  }

  body.community-shorts #screen-room:not(.chat-open) .shorts-ad-mount,
  body.community-shorts #screen-room:not(.chat-open) .chat-log,
  body.community-shorts #screen-room:not(.chat-open) .chat-form,
  body.community-shorts #screen-room:not(.chat-open) .chat-status {
    display: none !important;
  }

  body.community-shorts .chat-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 52px;
    flex-shrink: 0;
    margin: 0;
    padding: 0 16px;
    border: 0;
    border-bottom: 1px solid #1f1f1f;
    border-radius: 16px 16px 0 0;
    background: #0b0b0b;
    color: #c8c8c8;
    font: inherit;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
  }

  body.community-shorts .chat-heading {
    display: none;
  }

  body.community-shorts .shorts-slide-ui {
    padding-bottom: 68px;
  }

  body.community-shorts .stage-meta {
    top: 8px;
    left: 8px;
    right: 8px;
  }
}

/* Account, membership, login, signup: full-bleed dense top bar + matching forms */
.legal-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #000;
}

.legal-doc {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 0 40px;
  display: grid;
  grid-template-columns: 1fr min(640px, calc(100% - 40px)) 1fr;
}

.legal-doc.legal-wide {
  width: 100%;
  grid-template-columns: 1fr min(960px, calc(100% - 40px)) 1fr;
}

.legal-doc > * {
  grid-column: 2;
}

.legal-doc > .account-top,
.legal-doc > .brand,
.legal-doc > .wordmark-link {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
  min-height: 56px;
  margin: 0 0 28px;
  padding: calc(8px + var(--safe-top)) calc(16px + var(--safe-right)) 8px calc(16px + var(--safe-left));
  background: #000;
  border-bottom: 1px solid #1b1b1b;
  position: sticky;
  top: 0;
  z-index: 20;
}

.legal-doc > .brand,
.legal-doc > .wordmark-link {
  justify-content: flex-start;
  text-decoration: none;
}

.legal-doc .account-top .brand,
.legal-doc .account-top .wordmark-link {
  margin: 0;
}

.legal-doc .wordmark {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.account-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 0;
}

.account-nav a,
.account-nav .linkish {
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.account-nav a:hover,
.account-nav .linkish:hover,
.account-nav a:focus-visible,
.account-nav .linkish:focus-visible {
  color: var(--accent);
  text-decoration: none;
}

.account-nav span[aria-hidden="true"] {
  color: #333;
}

button.linkish {
  text-decoration: none;
}

.legal-doc h1 {
  margin: 8px 0 12px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
}

.legal-doc > p,
.legal-doc .account-form + p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.flash {
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 13px;
}

.account-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 0 16px;
  max-width: none;
}

.account-form p {
  margin: 0;
}

.account-form input[type="text"],
.account-form input[type="password"],
.account-form input[type="email"],
.account-form input[type="number"],
.account-form select {
  width: 100%;
  max-width: none;
  background: #0f0f0f;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  padding: 10px 12px;
  color: #fff;
}

.account-form input:focus,
.account-form select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(255, 106, 0, 0.25);
  outline: none;
}

.account-form .form-actions .btn,
.account-form button.btn.primary {
  width: auto;
  min-width: 8rem;
}

.account-section {
  margin: 24px 0 0;
  padding-top: 18px;
  border-top: 1px solid #1b1b1b;
}

.account-section h2 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.tier-grid {
  gap: 12px;
  margin: 16px 0 24px;
}

.tier-card {
  background: #0d0d0d;
  border: 1px solid #1f1f1f;
  border-radius: 6px;
  padding: 16px 14px 14px;
  gap: 8px;
}

.tier-card.is-current {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.tier-card h2 {
  font-size: 16px;
  font-weight: 700;
}

.tier-price {
  font-size: 26px;
  font-weight: 700;
}

.tier-card .btn {
  border-radius: 4px;
}

.color-swatch {
  font-size: 13px;
}

.invite-link code {
  border-radius: 4px;
  background: #0f0f0f;
  border-color: #2a2a2a;
}

.legal-page > .site-footer {
  margin-top: auto;
}

@media (max-width: 800px) {
  .legal-doc,
  .legal-doc.legal-wide {
    grid-template-columns: 1fr min(100% - 32px, 960px) 1fr;
  }

  .legal-doc h1 {
    font-size: 22px;
  }

  .tier-grid {
    grid-template-columns: 1fr;
  }

  .legal-doc .wordmark {
    font-size: 18px;
  }
}



/* Second-pass fixes: community mode layout + mode-tab buttons */
.community-mode-btn.btn,
.community-mode-btn.btn.ghost,
.community-mode-btn.btn:hover:not(:disabled),
.community-mode-btn.btn.ghost:hover:not(:disabled) {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  box-shadow: none;
  color: #ccc;
  padding: 6px 10px;
}

.community-mode-btn.btn.selected,
.community-mode-btn.btn[aria-pressed="true"],
.community-mode-btn.btn.ghost.selected,
.community-mode-btn.btn.ghost[aria-pressed="true"],
.community-mode-btn.btn.selected:hover:not(:disabled),
.community-mode-btn.btn[aria-pressed="true"]:hover:not(:disabled) {
  background: transparent;
  color: #fff;
  border: 0;
  border-bottom: 2px solid var(--accent);
  box-shadow: none;
}

body.community-personal-full .suggestion-panel,
body.community-shorts .suggestion-panel {
  display: none !important;
}

body.community-personal-full .room-layout.has-queue,
body.community-shorts .room-layout,
body.community-shorts .room-layout.has-queue {
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 400px);
}

body.community-personal-full #form-post,
body.community-personal-full #pending-note,
body.community-personal-full #owner-mode-bar,
body.community-personal-full #related-communities {
  display: none !important;
}

body.community-personal-full .stage-meta {
  max-height: none;
  overflow: visible;
}

body.community-personal-full .room-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

body.community-shorts .community-mode-bar {
  background: rgba(0, 0, 0, 0.88);
  border: 1px solid #1f1f1f;
}

body.community-shorts .community-mode-bar .mode-label {
  color: #c8c8c8;
}

.legal-doc h1 + .account-section {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}


@media (max-width: 900px) {
  body.community-personal-full .room-layout,
  body.community-personal-full .room-layout.has-queue {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) minmax(160px, 38%);
  }

  body.community-shorts .room-layout,
  body.community-shorts .room-layout.has-queue {
    grid-template-columns: 1fr;
  }

  body.community-shorts .community-mode-bar .mode-label {
    display: none;
  }
}

/* —— Shared community: skip pill + tidy suggestion queue —— */
body.community-shared .stage-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 10px;
  max-height: 32%;
  overflow: auto;
  padding-top: 2px;
}

body.community-shared .community-mode-bar {
  grid-column: 1;
  grid-row: 1;
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
}

body.community-shared .room-actions {
  grid-column: 2;
  grid-row: 1;
  flex: 0 0 auto;
  margin: 0;
  align-self: center;
}

body.community-shared #video-link {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.community-shared #form-post {
  grid-column: 1 / -1;
  margin: 0;
  width: 100%;
  max-width: 100%;
}

body.community-shared #owner-mode-bar {
  grid-column: 1 / -1;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #1f1f1f;
  background: #0d0d0d;
}

body.community-shared #related-communities,
body.community-shared #kick-list,
body.community-shared #pending-note:empty,
body.community-shared #playback-note,
body.community-shared .slot-bar {
  display: none !important;
}

/* Hide owner chrome for regular Shared viewers; owners still see compact controls */
body.community-shared #owner-mode-bar:has(#owner-mode-controls.hidden) {
  display: none !important;
}

body.community-shared #btn-skip {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  appearance: none;
  border: 1px solid #2a2a2a;
  border-radius: 999px;
  background: #141414;
  color: #f2f2f2;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  padding: 7px 12px;
  min-width: 5.75rem;
  text-align: center;
  box-shadow: none;
}

body.community-shared #btn-skip::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--skip-progress, 0) * 100%);
  background: rgba(255, 106, 0, 0.22);
  z-index: -1;
  transition: width 0.2s ease;
}

body.community-shared #btn-skip:hover:not(:disabled) {
  border-color: #3a3a3a;
  background: #141414;
  color: #fff;
}

body.community-shared #btn-skip.skip-close {
  border-color: var(--accent);
  color: #fff;
}

body.community-shared #btn-skip.skip-close::before {
  background: rgba(255, 106, 0, 0.42);
}

/* Tidy suggestion queue: thumb or index, title, who suggested */
body.community-shared .suggestion-panel {
  background: #000;
  border-left: 1px solid #1b1b1b;
  padding: 10px 10px 12px;
  gap: 8px;
}

body.community-shared .suggestion-heading {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a8a8a;
}

body.community-shared #suggestion-help {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: #8a8a8a;
}

body.community-shared .suggestion-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: queue;
}

body.community-shared .suggestion-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin: 0;
  padding: 6px;
  background: #0d0d0d;
  border: 1px solid #1f1f1f;
  border-radius: 4px;
  counter-increment: queue;
}

body.community-shared .suggestion-item .thumb,
body.community-shared .suggestion-item .thumb-fallback {
  width: 64px;
  height: 36px;
  object-fit: cover;
  border-radius: 3px;
  background: #1a1a1a;
  display: grid;
  place-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #c8c8c8;
}

body.community-shared .suggestion-copy {
  min-width: 0;
}

body.community-shared .suggestion-copy .opt-title {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.community-shared .suggestion-copy .opt-label {
  margin: 2px 0 0;
  font-size: 11px;
  color: #8a8a8a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.community-shared .suggestion-upvote {
  min-width: 44px;
  padding: 5px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  border-color: #2a2a2a;
}

body.community-shared .suggestion-upvote.selected,
body.community-shared .suggestion-upvote[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #111;
}

@media (max-width: 900px) {
  body.community-shared .room-layout.has-queue {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) minmax(110px, 26%) minmax(130px, 32%);
  }

  body.community-shared .suggestion-panel {
    border-left: 0;
    border-top: 1px solid #1b1b1b;
    padding: 8px 10px;
    min-height: 0;
  }

  body.community-shared .suggestion-item {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    padding: 4px;
    gap: 6px;
  }

  body.community-shared .suggestion-item .thumb,
  body.community-shared .suggestion-item .thumb-fallback {
    width: 48px;
    height: 28px;
  }

  body.community-shared .stage-meta {
    max-height: none;
    padding: 6px 10px 8px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  body.community-shared #btn-skip {
    padding: 6px 10px;
  }

  body.community-shared #owner-mode-bar {
    padding: 6px 8px;
  }
}


/* —— Behavior overrides (keep after restyle passes) —— */
#featured-hero,
#featured-shorts-hero {
  display: none !important;
}

.top-search,
#global-search,
.top-search-btn {
  display: none !important;
}
