:root {
  --bg: #0f1115;
  --panel: #181b22;
  --panel-2: #20242d;
  --border: #2b303b;
  --text: #e6e8ec;
  --muted: #8b93a3;
  --accent: #e50914;
  --admin: #f5c518;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

button {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 12px;
  font: inherit;
  cursor: pointer;
}
button:hover { border-color: var(--muted); }
button[type="submit"], #sync-btn { background: var(--accent); border-color: var(--accent); color: #fff; }

input {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
}
input:focus { outline: none; border-color: var(--accent); }

/* ---- Login ---- */
.overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--bg);
  z-index: 10;
}
.card {
  width: min(360px, 90vw);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card h1 { margin: 0 0 12px; font-size: 22px; text-align: center; }
.card label { color: var(--muted); font-size: 12px; }
.card input { width: 100%; }
#password-row { display: flex; flex-direction: column; gap: 8px; }
.card button { margin-top: 8px; padding: 10px; }
.error { color: #ff6b6b; min-height: 1.2em; margin: 0; font-size: 13px; }

/* ---- Room layout: video left, users right, chat bottom ---- */
#room {
  height: 100vh;
  display: grid;
  grid-template-columns: 1fr 260px;
  grid-template-rows: minmax(0, 1fr) 260px;
  grid-template-areas:
    "player users"
    "chat   chat";
  gap: 10px;
  padding: 10px;
}

#player {
  grid-area: player;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
#video-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #000;
}
#video { width: 100%; height: 100%; object-fit: contain; display: block; }
.overlay-inner {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .6);
}
#sync-btn { font-size: 18px; padding: 12px 24px; }

#controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  padding: 8px 10px;
  border-top: 1px solid var(--border);
}
#admin-controls { display: flex; align-items: center; gap: 2px; }
#seek { flex: 1; min-width: 120px; padding: 0; accent-color: var(--accent); }
#volume { width: 80px; padding: 0; accent-color: var(--accent); }
#time { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
#viewer-note { margin: 0; padding: 0 10px 8px; color: var(--muted); font-size: 12px; }

#users-panel {
  grid-area: users;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  overflow-y: auto;
}
#users-panel h2 { margin: 0 0 10px; font-size: 14px; color: var(--muted); font-weight: 600; }
#users { list-style: none; margin: 0; padding: 0; }
#users li {
  padding: 6px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
#users li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: #3ecf6e; }
#users li.me { background: var(--panel-2); }
#users li .uname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#users li.is-muted .uname { color: var(--muted); }
.mod-actions { display: flex; gap: 4px; }
.mod-actions button { padding: 2px 6px; font-size: 11px; }
.mod-actions button.danger:hover { border-color: var(--accent); color: #ff6b6b; }
#bans-section { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
#bans { list-style: none; margin: 0; padding: 0; }
#bans li { display: flex; align-items: center; gap: 8px; padding: 4px 8px; }
#bans li span { flex: 1; color: var(--muted); }
.muted-note { color: var(--muted); font-size: 12px; margin: 0; padding: 0 8px; }
#chat-input:disabled { opacity: .5; cursor: not-allowed; }
.badge {
  font-size: 10px;
  font-weight: 700;
  color: #000;
  background: var(--admin);
  border-radius: 4px;
  padding: 1px 5px;
}

#chat-panel {
  grid-area: chat;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  position: relative; /* for the "New messages" button */
}
#messages { flex: 1; overflow-y: auto; padding: 10px 12px; }
.msg { margin: 2px 0; word-wrap: break-word; }
.msg .ts { color: var(--muted); font-size: 11px; margin-right: 6px; }
.msg .name { font-weight: 600; margin-right: 6px; }
.msg .name.admin { color: var(--admin); }
.msg.system { color: var(--muted); font-style: italic; }
#chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border); }
#chat-input { flex: 1; min-width: 0; } /* can shrink so Send (and the bin) always fit beside it */

/* ---- "Now showing" bar above the video ---- */
#player-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}
#video-title { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#video-title::before { content: "🎬 "; }
#player-bar button { padding: 4px 10px; font-size: 13px; }

/* ---- Admin console ---- */
#console {
  min-height: 100vh;
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}
.console-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.console-header h1 { margin: 0; font-size: 22px; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.console-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
}
.console-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.console-card h2 { margin: 0 0 4px; font-size: 16px; }
.console-card .muted-note { padding: 0; }
.now-showing { margin: 14px 0 0; }
.now-showing strong { color: var(--admin); }
#console-error:empty { display: none; }
#console-error { margin-top: 10px; }

#video-list { list-style: none; margin: 14px 0 12px; padding: 0; border-top: 1px solid var(--border); }
#video-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
}
#video-list li.current { background: var(--panel-2); border-radius: 8px; padding-left: 10px; padding-right: 10px; }
.video-icon { font-size: 22px; flex: none; }
.video-meta { flex: 1; min-width: 0; }
.video-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.video-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.video-sub .warn { color: #ffb347; }
.tag {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--admin);
  color: #000;
}
#video-list li button { flex: none; }
#video-list li button:disabled { opacity: .45; cursor: not-allowed; }
.empty-library { color: var(--muted); padding: 24px 4px; text-align: center; }
#video-folder code { background: var(--bg); padding: 1px 6px; border-radius: 4px; }

@media (max-width: 560px) {
  #video-list li { flex-wrap: wrap; }
  .video-icon { display: none; }
  .video-meta { flex-basis: 100%; }
}

/* ---- Conversion & format warnings ---- */
.video-actions { display: flex; gap: 6px; flex: none; }
.job-status { margin-top: 6px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.job-status progress { width: 160px; height: 8px; accent-color: var(--accent); }
.job-status.done { color: #3ecf6e; }
.job-status.error { color: #ff6b6b; }
#video-error p { max-width: 420px; margin: 0; padding: 16px 20px; text-align: center; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; }
@media (max-width: 560px) { .video-actions { width: 100%; justify-content: flex-end; } }

.video-issue { font-size: 12px; color: #ffb347; margin-top: 3px; }
#video-notice {
  margin: 0;
  padding: 8px 12px;
  font-size: 13px;
  color: #1a1400;
  background: var(--admin);
}

/* ---- Audio track & subtitle menus ---- */
#controls select {
  max-width: 150px;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 6px;
  font: inherit;
  font-size: 12px;
}
video::cue { background: rgba(0, 0, 0, .75); color: #fff; font-size: 1.05em; line-height: 1.3; }

/* ---- Library filters ---- */
.library-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
#video-search { flex: 1; min-width: 180px; }
#folder-filter {
  background: var(--bg); color: var(--text); border: 1px solid var(--border);
  border-radius: 6px; padding: 8px 10px; font: inherit;
}
.library-filters .check { display: flex; align-items: center; gap: 6px; color: var(--muted); cursor: pointer; user-select: none; white-space: nowrap; }
.library-filters .check input { accent-color: var(--accent); margin: 0; }
#filter-summary { margin: 10px 0 0; }
#filter-summary:empty { display: none; }

/* ---- Toasts ---- */
#toasts {
  position: fixed;
  right: 16px;
  bottom: 76px; /* above the chat box, so Send stays clickable */
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  padding: 12px 12px 12px 14px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--muted);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
  animation: toast-in .2s ease-out;
}
.toast.success { border-left-color: #3ecf6e; }
.toast.error { border-left-color: #ff6b6b; }
.toast.info { border-left-color: var(--admin); }
.toast.leaving { opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; }
.toast-text strong { display: block; margin-bottom: 2px; }
.toast-body { color: var(--muted); font-size: 13px; word-break: break-word; }
.toast-close { background: none; border: none; color: var(--muted); font-size: 18px; line-height: 1; padding: 0 4px; align-self: start; }
.toast-close:hover { color: var(--text); }
.toast-actions { grid-column: 1 / -1; display: flex; gap: 8px; margin-top: 6px; }
.toast-actions button { padding: 5px 10px; font-size: 13px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

#debug-box {
  position: fixed; left: 8px; top: 8px; z-index: 100; max-width: calc(100vw - 16px);
  margin: 0; padding: 8px 10px; font: 11px/1.4 ui-monospace, Menlo, monospace; white-space: pre-wrap;
  color: #9fffb0; background: rgba(0, 0, 0, .85); border-radius: 6px; pointer-events: none;
}

.users-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
#users-panel .users-head h2 { margin: 0; }
#logout { padding: 3px 8px; font-size: 12px; }
#use-here { background: var(--panel-2); }

/* ---- Renaming videos ---- */
.rename-btn { padding: 5px 8px; }
.video-file { color: var(--muted); font-size: 12px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rename-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rename-form input { flex: 1; min-width: 180px; padding: 6px 8px; }
.rename-form button { padding: 6px 10px; }
.rename-form .video-sub { flex-basis: 100%; }

/* ---- Player control icons ---- */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  border-color: transparent;
  color: var(--text);
  flex: none;
  transition: background .15s, transform .1s;
}
.icon-btn svg { width: 22px; height: 22px; display: block; }
.icon-btn:hover { background: var(--panel-2); border-color: var(--border); }
.icon-btn:active { transform: scale(.92); }
.icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.play-btn { width: 44px; height: 44px; background: var(--accent); border-color: var(--accent); color: #fff; }
.play-btn:hover { background: #ff1f2b; border-color: #ff1f2b; }
.play-btn svg { width: 24px; height: 24px; }
#pip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
#clear-chat { background: transparent; color: var(--muted); }
#clear-chat:hover { color: #ff6b6b; border-color: #ff6b6b; }
#rewind svg, #forward svg { width: 26px; height: 26px; }

/* ---- YouTube streams ---- */
#stream-card { margin-top: 18px; }
#stream-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
#stream-url { flex: 2; min-width: 220px; }
#stream-title { flex: 1; min-width: 160px; }
#stream-error:empty { display: none; }
#stream-error { margin-top: 10px; }
#stream-list { list-style: none; margin: 14px 0 0; padding: 0; border-top: 1px solid var(--border); }
#stream-list li { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--border); }
#stream-list li.current { background: var(--panel-2); border-radius: 8px; padding-left: 10px; padding-right: 10px; }
#stream-list a.video-sub { display: block; color: var(--muted); text-decoration: none; }
#stream-list a.video-sub:hover { text-decoration: underline; }
.stream-thumb { width: 96px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; background: #000; flex: none; }
.remove-btn { background: transparent; color: var(--muted); }
.remove-btn:hover { color: #ff6b6b; border-color: #ff6b6b; }

#yt-wrap { position: absolute; inset: 0; background: #000; }
#yt-player-box, #yt-player-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
#yt-shield { position: absolute; inset: 0; z-index: 1; } /* invisible: stops viewers pausing YouTube directly */
#yt-message {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; margin: 0;
  max-width: min(420px, 90%); padding: 12px 16px; text-align: center; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--border); pointer-events: none;
}
#yt-message.tap { top: auto; bottom: 12px; transform: translateX(-50%); background: var(--accent); border-color: var(--accent); color: #fff; }
@media (max-width: 560px) { .stream-thumb { width: 72px; } #stream-list li { flex-wrap: wrap; } }

/* ---- YouTube link check ---- */
#stream-check {
  display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 10px 12px;
  border-radius: 8px; border: 1px solid var(--border); background: var(--bg);
}
#stream-check.good { border-color: #2f8f55; background: rgba(62, 207, 110, .08); }
#stream-check.good strong { color: #3ecf6e; }
#stream-check.bad { border-color: #a13a3a; background: rgba(255, 107, 107, .08); }
#stream-check.bad strong, #stream-check.bad .check-icon { color: #ff6b6b; }
#stream-check.checking { color: var(--muted); }
#stream-check .check-icon { font-weight: 700; }
.check-text { min-width: 0; }
.check-title { margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#stream-check .stream-thumb { width: 88px; }
.embed-badge { display: inline-block; margin-right: 6px; font-weight: 700; }
.embed-badge.good { color: #3ecf6e; }
.embed-badge.bad { color: #ff6b6b; }
#stream-form button:disabled { opacity: .45; cursor: not-allowed; }

#click-to-sync { z-index: 3; } /* above the YouTube click shield */

/* ================= Phones: app-style layout =================
   The room fills exactly the visible screen (above the keyboard, when it's open). The video stays at
   the top; Chat and People share the space below as tabs, and only the messages scroll. */
#mobile-tabs { display: none; }

@media (max-width: 760px), (max-height: 500px) and (min-width: 561px) {
  body.room-open { overflow: hidden; }
  #room {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--vv-top, 0px);
    height: var(--vv-height, 100dvh);
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  #player { flex: none; border-radius: 0; border-width: 0 0 1px; }
  #player-bar { padding: 6px 10px; padding-top: max(6px, env(safe-area-inset-top)); }
  #video-wrap { flex: none; aspect-ratio: 16 / 9; max-height: 45vh; }
  #controls { padding: 6px 8px; gap: 4px 6px; }
  #viewer-note { display: none; }
  #controls .icon-btn { width: 34px; height: 34px; }
  #controls .play-btn { width: 40px; height: 40px; }

  #mobile-tabs { display: flex; flex: none; background: var(--panel); border-bottom: 1px solid var(--border); }
  #mobile-tabs button {
    flex: 1; border: none; border-radius: 0; background: none; color: var(--muted);
    padding: 10px 0; font-weight: 600; border-bottom: 2px solid transparent;
  }
  #mobile-tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
  #unread-badge { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; line-height: 18px; }
  #people-count { color: var(--muted); font-weight: 400; }

  /* Only one tab's panel is shown; it takes all the remaining height. */
  #users-panel, #chat-panel { flex: 1; min-height: 0; border-radius: 0; border: none; }
  #room.tab-chat #users-panel, #room.tab-people #chat-panel { display: none; }
  #users-panel .users-head h2 { display: none; } /* the tab already says "People" */
  #users-panel .users-head { justify-content: flex-end; }
  #chat-form { padding: 8px; padding-bottom: max(8px, env(safe-area-inset-bottom)); }

  /* iPhones zoom the whole page into any text box smaller than 16px. */
  #chat-input, #chat-form button, #username, #password, #room-code { font-size: 16px; }

  /* While typing: tuck the controls away so the video and the newest messages both fit above the keyboard. */
  #room.typing #controls, #room.typing #player-bar, #room.typing #mobile-tabs { display: none; }
  #room.typing #chat-form { padding-bottom: 8px; }

  /* Toasts sit above the chat box and keyboard. */
  #toasts { bottom: calc(64px + env(safe-area-inset-bottom)); right: 8px; width: calc(100vw - 16px); }
}

/* Phones held sideways: video on the left, chat/people on the right. ("Sideways" is judged by width, not by
   being wider than tall: an upright Android phone with its keyboard open is briefly wider than tall.) */
@media (max-height: 500px) and (min-width: 561px) {
  #room { display: grid; grid-template-columns: minmax(0, 1fr) min(40vw, 340px); grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "player tabs" "player side"; }
  #player { grid-area: player; border-width: 0 1px 0 0; min-height: 0; display: flex; flex-direction: column; }
  #video-wrap { flex: 1; aspect-ratio: auto; max-height: none; min-height: 0; }
  #mobile-tabs { grid-area: tabs; }
  #users-panel, #chat-panel { grid-area: side; }
  #room.typing #player-bar, #room.typing #controls { display: flex; } /* plenty of width sideways */
  #room.typing #mobile-tabs { display: none; }
}

/* ---- One row for audio / subtitles / volume / PiP / fullscreen ---- */
#media-options { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; min-width: 0; margin-left: auto; }
#media-options select { flex: 0 1 150px; min-width: 64px; max-width: 150px; text-overflow: ellipsis; }
#media-options #volume { flex: 0 1 80px; min-width: 44px; }
@media (max-width: 760px), (max-height: 500px) and (min-width: 561px) {
  /* Phones: the seek bar gets the first row, and these share the second, shrinking to fit. */
  #media-options { flex: 1 1 100%; margin-left: 0; gap: 4px; }
  #media-options select { flex: 1 1 0; max-width: none; min-width: 52px; font-size: 12px; padding: 5px 4px; }
  #media-options #volume { flex: 0 3 64px; min-width: 32px; } /* gives up space before the menus do */
}
@media (max-height: 500px) and (min-width: 561px) { #media-options #volume { flex: 0 1 50px; min-width: 32px; } }
/* Phones: "Clear chat" becomes a small bin icon so the chat box keeps its width (still labelled for screen readers). */
@media (max-width: 760px) {
  #chat-form #clear-chat { font-size: 0; padding: 0 12px; flex: none; }
  #chat-form #clear-chat::before { content: "🗑"; font-size: 17px; }
}
@media (max-width: 360px) { #media-options #volume { flex-basis: 40px; } }

/* ---- Scheduled showings ---- */
#up-next { margin: 0; padding: 6px 12px; font-size: 13px; color: var(--text); background: var(--panel-2); border-bottom: 1px solid var(--border); }
#schedule-section { margin-top: 14px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); }
#schedule-section h3 { margin: 0 0 6px; font-size: 14px; }
#schedule-list { list-style: none; margin: 0; padding: 0; }
#schedule-list li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); }
#schedule-list li:first-child { border-top: none; }
.schedule-when { flex: none; min-width: 120px; font-weight: 600; color: var(--admin); }
.schedule-what { flex: 1; min-width: 0; }
.schedule-tag { background: var(--panel-2); color: var(--admin); border: 1px solid var(--admin); }
.schedule-btn { padding: 5px 8px; }
.schedule-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.schedule-form input { padding: 6px 8px; color-scheme: dark; }
.schedule-form button { padding: 6px 10px; }
.schedule-form .video-sub { flex-basis: 100%; }
@media (max-width: 760px) { #up-next { font-size: 12px; padding: 4px 10px; } #room.typing #up-next { display: none; } }

/* "↓ New messages": shown when messages arrive while you're scrolled up reading older ones */
#new-messages {
  position: absolute; left: 50%; bottom: 64px; transform: translateX(-50%); z-index: 2;
  padding: 5px 12px; font-size: 12px; border-radius: 999px;
  background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .4);
}

/* ---- Room code ---- */
#code-card { margin-bottom: 18px; }
.code-display { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
#set-code-input {
  width: 150px; padding: 8px 12px; text-align: center;
  font: 700 26px/1.1 ui-monospace, Menlo, monospace; letter-spacing: .25em; color: var(--admin);
}
#set-code-input::placeholder { color: var(--muted); }
#set-code-form button { padding: 8px 14px; }
#set-code-form button:disabled { opacity: .45; cursor: not-allowed; }
#code-row { display: flex; flex-direction: column; gap: 8px; }
#room-code { letter-spacing: .3em; font-variant-numeric: tabular-nums; }
#room-code::placeholder { letter-spacing: normal; }

/* ---- Console: is the now-showing video playing, and where ---- */
.now-status { flex: none; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.now-status:empty { display: none; }
.now-status[data-kind="playing"] { color: #3ecf6e; }
.now-status[data-kind="paused"] { color: var(--muted); }
.now-showing .now-status { margin-left: 6px; font-size: 13px; }

/* Logging back in with a saved pass: just the message, not the login form */
#login.rejoining #login-form > :not(h1):not(#login-error) { display: none; }
#login.rejoining #login-error { color: var(--muted); text-align: center; }
