/* ---------- Reset ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }
body { min-height: 100%; }
body.room-page { height: 100%; overflow: hidden; }
a.logo { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
[hidden] { display: none !important; }

/* ---------- Theme values ----------
   Classic is the default. The other themes further down change these values (and a few shapes).
   Themes people make in Config set these same values on the page. */
body {
  --font-family: Verdana, Arial, sans-serif;
  --title-font: Verdana, Arial, sans-serif;
  --chat-font: Arial, sans-serif;
  --page: #1f4f95;
  --bg-image: none;
  --bg-dim: #04070d;
  --text: #fff;
  --muted: #8c9bb5;
  --hint: #5d7090;
  --header-bg: linear-gradient(#7ab9f8 0%, #3a82e0 48%, #123f96 50%, #1f5ec2 100%);
  --header-text: #fff;
  --header-line: #0a1f40;
  --tab-bg: linear-gradient(#b4dcff 0%, #5aa2f2 48%, #1a55b8 50%, #2f7be0 100%);
  --btn-bg: linear-gradient(#9fd0fd 0%, #4f97ec 48%, #1b58bc 50%, #3d88e8 100%);
  --btn-text: #fff;
  --btn-border: #0e2f66;
  --panel: #0f2a52;
  --panel-2: #0a1f40;
  --line: #5d7090;
  --accent: #9fd0fd;
  --selected: #173a6e;
  --bubble: #e6eefb;
  --bubble-text: #000;
  --bubble-mine: #9cc7ff;
  --bubble-mine-text: #000;
  --field: #000;
  --screen: #000;
}

/* ---------- Page ---------- */
body {
  display: flex;
  flex-direction: column;
  background: var(--bg-image) center / cover no-repeat, var(--page);
  color: var(--text);
  font: 12px var(--font-family);
  transition: background .5s;
}

/* Glossy bar used by the header and the dialog titles */
header, .dialog-title {
  background: var(--header-bg);
  color: var(--header-text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}

header {
  flex: none;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border-bottom: 2px solid var(--header-line);
}
.logo {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  font: bold 18px var(--title-font);
  text-shadow: 1px 1px 0 #000;
  white-space: nowrap;
}
.header-buttons { display: flex; gap: 6px; }
/* Clock in the corner (only the Kobe theme shows it) */
.clock {
  display: none;
  min-width: 70px;
  margin-left: 22px;
  text-align: right;
  font: 300 22px var(--title-font);
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* Holiday mark next to the title (a Santa hat sits on the M at Christmas) */
.logo-mark { display: inline-flex; width: 1.25em; height: 1.25em; flex: none; }
.logo-mark svg { width: 100%; height: 100%; display: block; overflow: visible; }
.logo[data-mark="hat"] .logo-mark {
  position: absolute;
  left: -.28em;
  top: -.36em;
  width: 1.05em;
  height: .8em;
  transform: rotate(-16deg);
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.4));
}

/* ---------- Buttons ---------- */
.btn {
  cursor: pointer;
  color: var(--btn-text);
  font-weight: bold;
  text-shadow: 1px 1px 0 rgba(0,0,0,.45);
  padding: 4px 12px;
  border: 1px solid var(--btn-border);
  border-radius: 4px;
  background: var(--btn-bg);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), inset 0 -1px 0 rgba(0,0,0,.3), 0 1px 2px rgba(0,0,0,.5);
  white-space: nowrap;
}
.btn:hover  { filter: brightness(1.12); }
.btn:active { filter: brightness(.9); }
.btn:disabled { opacity: .5; cursor: default; filter: none; }

/* ---------- Room tab ---------- */
.room-bar { flex: none; display: flex; background: var(--panel-2); border-bottom: 2px solid #000; }
.room-bar .tab {
  flex: 1;
  text-align: center;
  cursor: default;
  user-select: none;
  pointer-events: none;
  color: var(--header-text);
  font: bold 15px/32px var(--title-font);
  letter-spacing: 1px;
  text-shadow: 1px 1px 0 var(--header-line), 0 0 6px rgba(255,255,255,.35);
  background: var(--tab-bg);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), inset 0 -2px 0 rgba(0,0,0,.25);
}

/* ---------- Layout ---------- */
.room-main { flex: 1; min-height: 0; display: flex; gap: 8px; padding: 8px; }

.player {
  position: relative;
  flex: 1;
  min-width: 0;
  background: #000;
  border: 2px solid #000;
  outline: 1px solid var(--header-line);
  overflow: hidden;
}
/* Nothing on yet: show the theme's (or the holiday's) screen instead of a black box */
.player.empty { background: var(--screen); }
.player.empty video, .player.empty .yt-frame { visibility: hidden; }
video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
/* YouTube player sits in the same spot as the video */
.yt-frame { position: absolute; inset: 0; background: #000; }
.yt-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

.player-hint {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  text-align: center;
  color: var(--hint);
  font-size: 13px;
  pointer-events: none;
  z-index: 1;
}

/* ---------- Holidays: art on the empty screen ---------- */
.particles { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.holiday-art svg {
  width: clamp(80px, 22vh, 150px);
  height: clamp(80px, 22vh, 150px);
  display: block;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.55));
  animation: settle .6s cubic-bezier(.2,.9,.3,1.2);
}
.holiday-greeting {
  font: bold 24px var(--title-font);
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.7);
  letter-spacing: .5px;
}
body[data-holiday] .player-hint #player-hint { color: rgba(255,255,255,.72); text-shadow: 0 1px 4px rgba(0,0,0,.8); }

body[data-holiday="christmas"]    :is(.player.empty, .hp-screen) { background: radial-gradient(ellipse at 50% 115%, #23593f 0%, #0e2620 45%, #070c14 100%); }
body[data-holiday="thanksgiving"] :is(.player.empty, .hp-screen) { background: radial-gradient(ellipse at 50% 120%, #8a4316 0%, #3d1e10 45%, #140b08 100%); }
body[data-holiday="valentines"]   :is(.player.empty, .hp-screen) { background: radial-gradient(ellipse at 50% 115%, #6a1838 0%, #2c0b1b 50%, #0e0509 100%); }
body[data-holiday="halloween"]    :is(.player.empty, .hp-screen) {
  background:
    radial-gradient(circle at 80% 20%, #f3dc9c 0 24px, rgba(243,220,156,.18) 27px, transparent 70px),
    radial-gradient(ellipse at 50% 110%, #3a2352 0%, #170d24 50%, #07040c 100%);
}
body[data-holiday="newyear"]      :is(.player.empty, .hp-screen) { background: radial-gradient(ellipse at 50% -10%, #23306a 0%, #0c1130 50%, #04050c 100%); }
body[data-holiday="july4"]        :is(.player.empty, .hp-screen) { background: radial-gradient(ellipse at 50% -10%, #1f3270 0%, #0b1433 55%, #05070f 100%); }
body[data-holiday="stpatricks"]   :is(.player.empty, .hp-screen) { background: radial-gradient(ellipse at 50% 115%, #22673a 0%, #0e2c18 50%, #050d08 100%); }
body[data-holiday="easter"]       :is(.player.empty, .hp-screen) { background: radial-gradient(ellipse at 50% 120%, #6d5196 0%, #2e2649 50%, #121222 100%); }

/* ---------- Loading bar (bottom of the player) ---------- */
.loadbar { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 2; pointer-events: none; }
.player:not(.empty) .loadbar { bottom: 58px; }  /* stay above the video's own controls */
.loadbar-lane { position: relative; height: 40px; clip-path: inset(-24px 0 -4px 0); }
.loadbar-runner {
  position: absolute;
  bottom: 1px;
  left: 0;
  height: 38px;
  transform: translateX(-50%);
  transition: left .4s ease;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.7));
}
.loadbar-runner svg { width: 100%; height: 100%; display: block; overflow: visible; }
.loadbar-track { height: 5px; border-radius: 3px; background: rgba(255,255,255,.18); overflow: hidden; }
.loadbar-fill { height: 100%; width: 0; border-radius: 3px; background: var(--accent); transition: width .4s ease; }
.loadbar-label { margin-top: 6px; font: 11px var(--chat-font); color: rgba(255,255,255,.85); text-shadow: 0 1px 2px #000; }
/* No percent to show: the icon keeps travelling along the bar */
.loadbar.waiting .loadbar-runner { animation: travel 2.6s linear infinite; transition: none; }
.loadbar.waiting .loadbar-fill { width: 30%; animation: sweep 2.6s linear infinite; transition: none; }
@keyframes travel { from { left: 0%; } to { left: 133.33%; } }
@keyframes sweep  { from { transform: translateX(-100%); } to { transform: translateX(344.4%); } }

/* How each holiday's little traveller moves */
.run-bob svg     { animation: bob .6s ease-in-out infinite alternate; }
.run-waddle svg  { animation: waddle .32s ease-in-out infinite alternate; transform-origin: 50% 100%; }
.run-flap svg    { animation: flap .2s ease-in-out infinite alternate; }
.run-flutter svg { animation: flutter .3s ease-in-out infinite alternate; }
.run-roll svg    { animation: roll 1.1s linear infinite; }
.run-hop svg     { animation: hop .42s cubic-bezier(.3,0,.7,1) infinite alternate; }
.run-zip svg     { animation: zip .1s linear infinite alternate; }
.run-zip .spark  { animation: twinkle .25s ease-in-out infinite alternate; }
.run-zip .spark:nth-of-type(2n) { animation-delay: .12s; }
.run-walk svg    { animation: bob .22s ease-in-out infinite alternate; }
.run-walk .leg   { transform-box: fill-box; transform-origin: 50% 0; animation: stride .44s ease-in-out infinite alternate; }
.run-walk .leg.back { animation-delay: -.44s; }
@keyframes twinkle { from { opacity: 1; } to { opacity: .2; } }
@keyframes stride  { from { transform: rotate(-24deg); } to { transform: rotate(24deg); } }
@keyframes bob     { to { transform: translateY(-3px); } }
@keyframes waddle  { from { transform: rotate(-9deg); } to { transform: rotate(9deg); } }
@keyframes flap    { to { transform: scaleY(.5); } }
@keyframes flutter { to { transform: translateY(-3px) scale(1.06); } }
@keyframes roll    { to { transform: rotate(360deg); } }
@keyframes hop     { to { transform: translateY(-9px); } }
@keyframes zip     { from { transform: translateY(-.6px); } to { transform: translateY(.6px); } }

/* ---------- Chat ---------- */
.chat-panel {
  width: 320px;
  flex: none;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--panel-2);
}

.messages {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 8px;
}
/* Keeps messages at the bottom, with overflow going downward where the
   old-message cleanup can see it */
.messages > :first-child { margin-top: auto; }

.msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 92%;
  flex: none;
  animation: pop .15s ease-out;
}
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }

/* "Adrian joined", "You paused at 12:30" */
.system {
  flex: none;
  align-self: center;
  max-width: 92%;
  text-align: center;
  color: var(--muted);
  font: 11px var(--chat-font);
  animation: pop .15s ease-out;
}

.avatar {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border: 2px solid #000;
  background: var(--line);
  flex: none;
}

.msg-name { font: bold 11px var(--chat-font); margin: 0 0 2px 2px; }
.msg.mine .msg-name { text-align: right; margin: 0 2px 2px 0; }

.bubble {
  position: relative;
  background: var(--bubble);
  color: var(--bubble-text);
  border: 1px solid #000;
  border-radius: 8px;
  padding: 4px 9px;
  font: 12px var(--chat-font);
  word-break: break-word;
}
/* Little speech-bubble tail */
.bubble::after {
  content: "";
  position: absolute;
  bottom: 7px;
  left: -5px;
  width: 8px;
  height: 8px;
  background: inherit;
  border-left: 1px solid #000;
  border-bottom: 1px solid #000;
  transform: rotate(45deg);
}
.msg.mine .bubble { background: var(--bubble-mine); color: var(--bubble-mine-text); }
.msg.mine .bubble::after {
  left: auto;
  right: -5px;
  border: 0;
  border-top: 1px solid #000;
  border-right: 1px solid #000;
}

/* "..." typing indicator */
.typing-area { flex: none; padding: 0 8px 8px; display: flex; flex-direction: column; gap: 6px; }
.typing { display: flex; align-items: center; gap: 8px; animation: pop .15s ease-out; }
.typing .bubble { padding: 5px 10px; letter-spacing: 2px; }
.typing .bubble i { font-style: normal; animation: blink 1s infinite; }
.typing .bubble i:nth-child(2) { animation-delay: .2s; }
.typing .bubble i:nth-child(3) { animation-delay: .4s; }

.chat-form { flex: none; display: flex; gap: 4px; padding: 6px; background: var(--panel-2); }
.chat-form input {
  flex: 1;
  min-width: 0;
  background: var(--field);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 4px 6px;
  outline: none;
  font: 12px var(--chat-font);
}
.chat-form input::placeholder { color: var(--muted); }
.chat-form input:focus { border-color: var(--text); }

/* ---------- Dialogs ---------- */
dialog, .card {
  border: 2px solid #000;
  background: var(--panel);
  color: var(--text);
}
dialog { margin: auto; width: 340px; max-width: 92vw; }
dialog::backdrop { background: rgba(0,0,0,.6); }

.dialog-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 26px;
  padding: 3px 4px 3px 8px;
  font-weight: bold;
  text-shadow: 1px 1px 0 #000;
}
.close-btn {
  width: 22px;
  height: 20px;
  line-height: 1;
  cursor: pointer;
  border-radius: 2px;
  border: 1px solid #5e0f09;
  color: #fff;
  font-weight: bold;
  background: linear-gradient(#e86a5e, #b3271b);
}
.dialog-body { padding: 12px; }
.dialog-body p { margin-bottom: 8px; }
.dialog-body .note { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.dialog-body .or { margin: 10px 0; text-align: center; color: var(--muted); }
.link-row { display: flex; gap: 4px; }
.link-row input {
  flex: 1;
  min-width: 0;
  border: 1px solid #000;
  padding: 4px 6px;
  background: var(--field);
  color: var(--text);
  outline: none;
}
.link-row input:focus { border-color: var(--text); }
.wide { width: 100%; }
.row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

select.field, input.field {
  background: var(--field);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 4px 6px;
  outline: none;
}
select.field option { background: var(--panel); color: var(--text); }
.field:focus { border-color: var(--text); }

/* Config dialog */
#config-dialog { width: 440px; }
#config-dialog .dialog-body { max-height: calc(100vh - 90px); overflow-y: auto; }
.dialog-body .section-title {
  margin: 16px 0 6px;
  color: var(--accent);
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.dialog-body > .section-title:first-child { margin-top: 0; }

/* Same Wi-Fi / Online, Everyone / Host and other choices */
.choice {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  margin-bottom: 6px;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
}
.choice:hover { border-color: var(--accent); }
.choice b { display: block; font-size: 13px; margin-bottom: 2px; }
.choice span { opacity: .78; font-size: 11px; }
.choice.selected { background: var(--selected); border-color: var(--text); box-shadow: inset 0 0 0 1px var(--accent); }
.choice.selected b::after { content: "  (on)"; color: #7fe0a0; font-weight: normal; font-size: 11px; }

.warning {
  margin-top: 8px;
  padding: 6px 8px;
  background: #3a2a08;
  border: 1px solid #ffd36a;
  color: #ffe7a8;
  font-size: 11px;
}

/* File sharing progress */
.progress { height: 14px; margin: 6px 0 8px; background: var(--field); border: 1px solid #000; outline: 1px solid var(--line); }
.progress-fill {
  width: 0;
  height: 100%;
  background: var(--btn-bg);
  transition: width .2s;
}

/* ---------- Theme picker ---------- */
.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.theme-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.theme-card.selected { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--accent); }
.theme-pick {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0 0 6px;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.theme-pick:disabled { cursor: default; }
.theme-pick b, .theme-pick small {
  display: block;
  padding: 0 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.theme-pick b { padding-top: 5px; font-size: 11.5px; }
.theme-card.selected .theme-pick b::after { content: " (on)"; color: #7fe0a0; font-weight: normal; font-size: 10px; }
.theme-pick small { color: var(--muted); font-size: 10px; }
/* Tiny drawing of the theme: header strip, screen and chat */
.swatch { position: relative; display: block; height: 50px; background: var(--sw-page); }
.swatch::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 10px; background: var(--sw-head); }
.swatch .sw-screen { position: absolute; left: 5px; top: 15px; bottom: 5px; right: 42%; background: #05070c; border-radius: 2px; }
.swatch .sw-chat { position: absolute; right: 5px; top: 15px; bottom: 5px; width: 34%; background: var(--sw-panel); border-radius: 2px; }
.swatch .sw-chat::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 5px;
  width: 60%;
  height: 6px;
  border-radius: 3px;
  background: var(--sw-accent);
}
.theme-card-actions { display: flex; border-top: 1px solid var(--line); }
.theme-card-actions a, .theme-card-actions button {
  flex: 1;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: 10.5px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.theme-card-actions > * + * { border-left: 1px solid var(--line); }
.theme-card-actions a:hover, .theme-card-actions button:hover { text-decoration: underline; }

/* Theme maker */
.maker {
  margin-top: 10px;
  padding: 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.maker-field { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.maker-field > span:first-child { width: 96px; flex: none; color: var(--muted); font-size: 11px; }
.maker-field .field { flex: 1; min-width: 0; }
.maker-colors { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; margin: 2px 0 10px; }
.maker-colors label { display: flex; align-items: center; gap: 7px; font-size: 11px; cursor: pointer; }
.maker-colors input {
  width: 30px;
  height: 22px;
  padding: 0;
  border: 1px solid var(--line);
  background: none;
  cursor: pointer;
}
.maker-image-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11px; }

/* ---------- Phones / narrow windows ---------- */
@media (max-width: 760px) {
  .room-main { flex-direction: column; }
  .chat-panel { width: auto; height: 44%; }
  .theme-grid { grid-template-columns: repeat(2, 1fr); }
}

@keyframes pop    { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes blink  { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@keyframes settle { from { transform: translateY(10px) scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }


/* =====================================================================
   KOBE: console style. A big open background, flat dark panels with
   sharp corners, thin type, a clock up top, and a white focus frame that
   pops out around whatever you point at. Quick, smooth motion.
   ===================================================================== */
body[data-theme="kobe"] {
  --font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --title-font: "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --chat-font: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --bg: #060910;
  --page: linear-gradient(180deg,
            color-mix(in srgb, var(--accent) 24%, var(--bg)) 0%,
            var(--bg) 52%,
            color-mix(in srgb, #000 45%, var(--bg)) 100%);
  --bg-dim: #020306;
  --text: #f1f4f9;
  --muted: #8d97ad;
  --hint: #8d97ad;
  --header-bg: transparent;
  --header-text: #fff;
  --header-line: transparent;
  --btn-bg: rgba(255,255,255,.1);
  --btn-text: #fff;
  --btn-border: transparent;
  --panel: #111723;
  --panel-2: #0b0f18;
  --line: #273041;
  --accent: #2f74e8;
  --selected: #17233d;
  --bubble: #1d2535;
  --bubble-text: #e9eef8;
  --bubble-mine: #2f74e8;
  --bubble-mine-text: #fff;
  --field: #0a0e16;
  --screen: linear-gradient(180deg, #0d1528 0%, #070b14 100%);
}
/* Light washing slowly across the background */
body[data-theme="kobe"]::before {
  content: "";
  position: fixed;
  inset: -15%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 55% at 50% -5%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%),
    linear-gradient(112deg, transparent 38%, rgba(255,255,255,.04) 46%, transparent 54%),
    linear-gradient(112deg, transparent 58%, rgba(255,255,255,.025) 63%, transparent 68%);
  animation: kobe-drift 36s ease-in-out infinite alternate;
}
@keyframes kobe-drift { from { transform: translate3d(-4%, 0, 0); } to { transform: translate3d(4%, 2%, 0); } }

/* Everything slides into place when the page opens */
body[data-theme="kobe"] header      { animation: kobe-down .5s var(--ease) backwards; }
body[data-theme="kobe"] .room-bar         { animation: kobe-up .5s .05s var(--ease) backwards; }
body[data-theme="kobe"] .player     { animation: kobe-up .55s .1s var(--ease) backwards; }
body[data-theme="kobe"] .chat-panel { animation: kobe-left .55s .16s var(--ease) backwards; }
@keyframes kobe-down { from { opacity: 0; transform: translateY(-12px); } }
@keyframes kobe-up   { from { opacity: 0; transform: translateY(16px); } }
@keyframes kobe-left { from { opacity: 0; transform: translateX(26px); } }

body[data-theme="kobe"] header { height: 70px; padding: 0 40px; box-shadow: none; border-bottom: 0; }
body[data-theme="kobe"] .logo { font: 300 25px var(--title-font); letter-spacing: .2px; text-shadow: none; }
body[data-theme="kobe"] .header-buttons { gap: 8px; align-items: center; }
body[data-theme="kobe"] .clock { display: block; }

/* Buttons: flat, then they pop out white with a frame around them */
body[data-theme="kobe"] .btn {
  padding: 8px 18px;
  border: 0;
  border-radius: 3px;
  font: 600 13px var(--font-family);
  letter-spacing: .2px;
  text-shadow: none;
  box-shadow: none;
  outline: 2px solid transparent;
  outline-offset: 3px;
  transition: transform .22s var(--ease), background .16s, color .16s, outline-color .16s;
}
body[data-theme="kobe"] .btn:hover,
body[data-theme="kobe"] .btn:focus-visible {
  background: #fff;
  color: #0a0e16;
  filter: none;
  transform: scale(1.06);
  outline-color: rgba(255,255,255,.9);
}
body[data-theme="kobe"] .btn:active { transform: scale(1); }
body[data-theme="kobe"] .btn:disabled { transform: none; background: var(--btn-bg); color: var(--btn-text); outline-color: transparent; }

/* Tab row, like Games / Media */
body[data-theme="kobe"] .room-bar { background: none; border: 0; padding: 0 40px; }
body[data-theme="kobe"] .room-bar .tab {
  position: relative;
  flex: none;
  text-align: left;
  font: 600 14px/34px var(--title-font);
  letter-spacing: .2px;
  color: var(--text);
  background: none;
  box-shadow: none;
  text-shadow: none;
}
body[data-theme="kobe"] .room-bar .tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  background: var(--text);
}

body[data-theme="kobe"] .room-main { gap: 20px; padding: 14px 40px 32px; }
body[data-theme="kobe"] .player {
  border: 0;
  border-radius: 3px;
  outline: 2px solid transparent;
  outline-offset: 4px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0,0,0,.55);
  transition: outline-color .25s;
}
body[data-theme="kobe"] .player.empty:hover { outline-color: rgba(255,255,255,.85); }
body[data-theme="kobe"] .player-hint { font-size: 14px; }
body[data-theme="kobe"] .holiday-greeting { font-weight: 300; font-size: 32px; letter-spacing: .2px; }

body[data-theme="kobe"] .chat-panel {
  width: 340px;
  border: 0;
  border-radius: 3px;
  overflow: hidden;
  background: color-mix(in srgb, var(--panel) 84%, transparent);
  backdrop-filter: blur(24px) saturate(1.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 30px 70px rgba(0,0,0,.45);
}
body[data-theme="kobe"] .messages { gap: 10px; padding: 16px; }
body[data-theme="kobe"] .msg,
body[data-theme="kobe"] .system,
body[data-theme="kobe"] .typing { animation: kobe-msg .28s var(--ease); }
@keyframes kobe-msg { from { opacity: 0; transform: translateY(8px); } }
body[data-theme="kobe"] .avatar { width: 30px; height: 30px; border: 0; border-radius: 50%; }
body[data-theme="kobe"] .msg-name { font-weight: 600; font-size: 11.5px; }
body[data-theme="kobe"] .bubble { border: 0; border-radius: 3px; padding: 7px 11px; font-size: 13px; }
body[data-theme="kobe"] .bubble::after { display: none; }
body[data-theme="kobe"] .system { font-size: 11.5px; letter-spacing: .2px; }
body[data-theme="kobe"] .typing-area { padding: 0 16px 10px; }
body[data-theme="kobe"] .chat-form { background: rgba(0,0,0,.2); padding: 12px 14px; gap: 8px; border-top: 1px solid rgba(255,255,255,.06); }
body[data-theme="kobe"] .chat-form input,
body[data-theme="kobe"] .link-row input,
body[data-theme="kobe"] .field {
  border-radius: 3px;
  padding: 9px 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid transparent;
  font-size: 13px;
  transition: border-color .16s, background .16s;
}
body[data-theme="kobe"] .chat-form input:focus,
body[data-theme="kobe"] .link-row input:focus,
body[data-theme="kobe"] .field:focus { border-color: #fff; background: rgba(255,255,255,.1); }
body[data-theme="kobe"] select.field option { background: #111723; }

/* Menus open with a quick scale-up */
body[data-theme="kobe"] dialog, body[data-theme="kobe"] .card {
  border: 0;
  border-radius: 4px;
  background: color-mix(in srgb, var(--panel) 95%, transparent);
  backdrop-filter: blur(30px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 40px 100px rgba(0,0,0,.7);
}
body[data-theme="kobe"] dialog[open] { animation: kobe-open .28s var(--ease); }
body[data-theme="kobe"] dialog::backdrop { background: rgba(2,4,10,.7); backdrop-filter: blur(8px); }
@keyframes kobe-open { from { opacity: 0; transform: scale(.96) translateY(10px); } }
body[data-theme="kobe"] .dialog-title {
  background: none;
  box-shadow: none;
  text-shadow: none;
  color: var(--text);
  padding: 22px 18px 6px 26px;
  font: 300 24px var(--title-font);
}
body[data-theme="kobe"] .close-btn {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 3px;
  background: rgba(255,255,255,.08);
  font-weight: 400;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: background .16s, color .16s, outline-color .16s;
}
body[data-theme="kobe"] .close-btn:hover { background: #fff; color: #0a0e16; outline-color: rgba(255,255,255,.9); }
body[data-theme="kobe"] .dialog-body { padding: 14px 26px 26px; }
body[data-theme="kobe"] .dialog-body .section-title { color: var(--muted); font-weight: 600; letter-spacing: 1.2px; margin-top: 26px; }
body[data-theme="kobe"] .dialog-body > .section-title:first-child { margin-top: 0; }
body[data-theme="kobe"] .choice {
  border: 0;
  border-radius: 3px;
  padding: 13px 16px;
  background: rgba(255,255,255,.045);
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: background .16s, outline-color .16s, transform .22s var(--ease);
}
body[data-theme="kobe"] .choice:hover { background: rgba(255,255,255,.09); outline-color: rgba(255,255,255,.85); transform: scale(1.015); }
body[data-theme="kobe"] .choice.selected { background: rgba(255,255,255,.08); box-shadow: inset 3px 0 0 var(--accent); }
body[data-theme="kobe"] .choice.selected b::after,
body[data-theme="kobe"] .theme-card.selected .theme-pick b::after { color: #8fb3ff; }
body[data-theme="kobe"] .warning { border-radius: 3px; background: rgba(255,200,60,.07); border-color: rgba(255,211,106,.4); }
body[data-theme="kobe"] .progress { height: 4px; border: 0; outline: 0; background: rgba(255,255,255,.12); }
body[data-theme="kobe"] .progress-fill { background: var(--accent); }
/* Theme tiles grow with a frame, like game tiles */
body[data-theme="kobe"] .theme-grid { padding: 6px; margin: -6px; }
body[data-theme="kobe"] .theme-card {
  position: relative;
  border: 0;
  border-radius: 3px;
  background: rgba(255,255,255,.045);
  overflow: visible;
  outline: 2px solid transparent;
  outline-offset: 3px;
  transition: transform .22s var(--ease), outline-color .16s;
}
body[data-theme="kobe"] .theme-card .swatch { border-radius: 3px 3px 0 0; overflow: hidden; }
body[data-theme="kobe"] .theme-card:hover { transform: scale(1.06); outline-color: rgba(255,255,255,.9); z-index: 1; }
body[data-theme="kobe"] .theme-card.selected { box-shadow: inset 0 -3px 0 var(--accent); }
body[data-theme="kobe"] .theme-card-actions { border-top-color: rgba(255,255,255,.08); }
body[data-theme="kobe"] .theme-card-actions > * + * { border-left-color: rgba(255,255,255,.08); }
body[data-theme="kobe"] .maker { border: 0; border-radius: 3px; background: rgba(255,255,255,.04); }


/* =====================================================================
   DRIVE-IN: a night at an old drive-in. The title sits on a backlit
   changeable-letter board framed by bulbs, the room line is the
   marquee's "Now showing" strip, the player is the big outdoor screen,
   and the chat is the speaker post by your car window. Fine film grain
   over the lot. The bulbs stop and dim when the movie starts.
   ===================================================================== */
body[data-theme="drivein"] {
  --font-family: "Segoe UI", Tahoma, sans-serif;
  --title-font: "Bahnschrift SemiBold Condensed", "Bahnschrift", "Arial Narrow", Impact, sans-serif;
  --chat-font: "Segoe UI", Tahoma, sans-serif;
  --bg: #101116;
  --page: linear-gradient(#08090d 0%, var(--bg) 45%, #17171a 100%);
  --text: #efe6d2;
  --muted: #9a927f;
  --hint: #a89f8a;
  --panel: #15181b;
  --panel-2: #0f1113;
  --line: #363a3c;
  --accent: #c7362b;
  --selected: #1d2124;
  --bubble: #efe6d2;
  --bubble-text: #1c1914;
  --bubble-mine: #c7362b;
  --bubble-mine-text: #fbf3e2;
  --field: #0c0e10;
  --header-bg: #0c0d11;
  --header-text: #efe6d2;
  --header-line: rgba(239,230,210,.08);
  --board: #f7f0de;
  --board-ink: #17140f;
  --btn-bg: transparent;
  --btn-text: #efe6d2;
  --btn-border: rgba(239,230,210,.45);
  --bulb: #ffcf70;
  --screen: radial-gradient(ellipse at 50% 38%, #262a33 0%, #121419 65%, #0a0b0e 100%);
}
/* Fine film grain over the lot */
body[data-theme="drivein"]::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .08;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .7 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
body[data-theme="drivein"] header { height: 76px; padding: 0 24px; box-shadow: none; border-bottom: 1px solid var(--header-line); }

/* The title on a backlit letter board, with a row of bulbs above and below */
body[data-theme="drivein"] .logo {
  margin-left: 4px;
  padding: 7px 16px 6px;
  color: var(--board-ink);
  font: 25px/1 var(--title-font);
  letter-spacing: 4px;
  text-transform: uppercase;
  text-shadow: none;
  background:
    repeating-linear-gradient(transparent 0 9px, rgba(0,0,0,.075) 9px 10px),
    linear-gradient(#fffbf2, var(--board));
  box-shadow: 0 0 0 3px #25221c, 0 0 0 4px #4a443a, 0 0 30px rgba(255,214,140,.14);
}
body[data-theme="drivein"] .logo::before,
body[data-theme="drivein"] .logo::after {
  content: "";
  position: absolute;
  left: -1px;
  right: -1px;
  height: 7px;
  pointer-events: none;
  background:
    radial-gradient(circle at 3.5px 3.5px, #fffbe8 0 1.1px, var(--bulb) 2.1px, rgba(255,207,112,.3) 3px, transparent 3.5px) 0 0 / 14px 7px repeat-x,
    radial-gradient(circle at 10.5px 3.5px, #7a6440 0 1.8px, transparent 2.3px) 0 0 / 14px 7px repeat-x;
  animation: chase 1.2s steps(1) infinite;
  transition: opacity .5s;
}
body[data-theme="drivein"] .logo::before { top: -13px; }
body[data-theme="drivein"] .logo::after { bottom: -13px; }
@keyframes chase { 50% { background-position: 7px 0, 7px 0; } }
body.dimmed[data-theme="drivein"] .logo::before,
body.dimmed[data-theme="drivein"] .logo::after { animation-play-state: paused; opacity: .3; }

/* Outlined sign-shop buttons; the chat button is the one red one */
body[data-theme="drivein"] .btn {
  font: 14px var(--title-font);
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 6px 14px 5px;
  border-radius: 1px;
  text-shadow: none;
  box-shadow: none;
  transition: background .15s, color .15s, border-color .15s;
}
body[data-theme="drivein"] .btn:hover { background: var(--text); color: var(--board-ink); border-color: var(--text); filter: none; }
body[data-theme="drivein"] .chat-form .btn,
body[data-theme="drivein"] #maker-share { background: var(--accent); border-color: var(--accent); color: #fbf3e2; }
body[data-theme="drivein"] .chat-form .btn:hover,
body[data-theme="drivein"] #maker-share:hover { filter: brightness(1.12); background: var(--accent); color: #fbf3e2; }

/* "Now showing" strip */
body[data-theme="drivein"] .room-bar { background: none; border: 0; align-items: center; gap: 16px; padding: 12px 24px 2px; }
body[data-theme="drivein"] .room-bar::before,
body[data-theme="drivein"] .room-bar::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(239,230,210,.22)); }
body[data-theme="drivein"] .room-bar::after { background: linear-gradient(90deg, rgba(239,230,210,.22), transparent); }
body[data-theme="drivein"] .room-bar .tab {
  flex: none;
  color: var(--text);
  font: 15px/24px var(--title-font);
  letter-spacing: 3px;
  text-transform: uppercase;
  background: none;
  box-shadow: none;
  text-shadow: none;
}
body[data-theme="drivein"] .room-bar .tab::before { content: "Now showing"; color: var(--accent); margin-right: 14px; }

body[data-theme="drivein"] .room-main { gap: 16px; padding: 14px 24px 22px; }
/* The big outdoor screen */
body[data-theme="drivein"] .player {
  border: 5px solid #d9d2c1;
  border-radius: 0;
  outline: 0;
  box-shadow: 0 0 0 1px #4a4538, 0 24px 50px rgba(0,0,0,.6);
}
body[data-theme="drivein"] .player-hint { font: 16px var(--title-font); letter-spacing: 3px; text-transform: uppercase; }
body[data-theme="drivein"] .holiday-greeting { font-size: 32px; letter-spacing: 4px; text-transform: uppercase; font-weight: normal; }

/* The speaker post: a grille on top, then the messages */
body[data-theme="drivein"] .chat-panel {
  border: 0;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), 0 20px 44px rgba(0,0,0,.5);
}
body[data-theme="drivein"] .chat-panel::before {
  content: "";
  flex: none;
  height: 26px;
  margin: 10px 10px 0;
  border-radius: 2px;
  background:
    radial-gradient(circle, #050607 0 1.4px, transparent 1.9px) 0 0 / 7px 7px,
    linear-gradient(#272b2f, #1b1e21);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.6), 0 1px 0 rgba(255,255,255,.05);
}
body[data-theme="drivein"] .messages { gap: 8px; padding: 12px; }
body[data-theme="drivein"] .avatar { width: 26px; height: 26px; border: 0; border-radius: 1px; }
body[data-theme="drivein"] .msg-name { font: 12px var(--title-font); letter-spacing: 1.5px; text-transform: uppercase; }
body[data-theme="drivein"] .bubble { border: 0; border-radius: 1px; padding: 6px 10px; font-size: 12.5px; }
body[data-theme="drivein"] .bubble::after { display: none; }
body[data-theme="drivein"] .system { letter-spacing: .3px; }
body[data-theme="drivein"] .chat-form { border-top: 1px solid rgba(255,255,255,.05); padding: 8px; gap: 6px; }
body[data-theme="drivein"] .chat-form input,
body[data-theme="drivein"] .link-row input,
body[data-theme="drivein"] .field { border-radius: 1px; border: 1px solid var(--line); }
body[data-theme="drivein"] .chat-form input:focus,
body[data-theme="drivein"] .link-row input:focus,
body[data-theme="drivein"] .field:focus { border-color: var(--text); }

body[data-theme="drivein"] dialog, body[data-theme="drivein"] .card { border: 1px solid rgba(239,230,210,.12); border-radius: 2px; box-shadow: 0 30px 80px rgba(0,0,0,.7); }
body[data-theme="drivein"] .dialog-title {
  background: none;
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--accent);
  text-shadow: none;
  padding: 12px 10px 10px 16px;
  font: 18px var(--title-font);
  letter-spacing: 3px;
  text-transform: uppercase;
}
body[data-theme="drivein"] .close-btn {
  width: 26px;
  height: 24px;
  border: 1px solid rgba(239,230,210,.4);
  border-radius: 1px;
  background: none;
  color: var(--text);
  font-weight: normal;
}
body[data-theme="drivein"] .close-btn:hover { background: var(--text); color: var(--board-ink); }
body[data-theme="drivein"] .dialog-body { padding: 14px 16px 16px; }
body[data-theme="drivein"] .dialog-body .section-title { color: var(--accent); font: 13px var(--title-font); letter-spacing: 3px; }
body[data-theme="drivein"] .choice { border-radius: 1px; border-color: rgba(239,230,210,.14); background: transparent; }
body[data-theme="drivein"] .choice:hover { border-color: rgba(239,230,210,.5); }
body[data-theme="drivein"] .choice.selected { background: rgba(239,230,210,.05); border-color: rgba(239,230,210,.5); box-shadow: inset 3px 0 0 var(--accent); }
body[data-theme="drivein"] .choice b { font: 15px var(--title-font); letter-spacing: 1.5px; text-transform: uppercase; }
body[data-theme="drivein"] .choice.selected b::after,
body[data-theme="drivein"] .theme-card.selected .theme-pick b::after { color: var(--bulb); }
body[data-theme="drivein"] .warning { border-radius: 0; }
body[data-theme="drivein"] .progress { height: 6px; border: 0; outline: 0; }
body[data-theme="drivein"] .progress-fill { background: var(--accent); }
body[data-theme="drivein"] .theme-card { border-radius: 1px; border-color: rgba(239,230,210,.14); }
body[data-theme="drivein"] .theme-card.selected { border-color: rgba(239,230,210,.6); box-shadow: inset 0 -3px 0 var(--accent); }
body[data-theme="drivein"] .theme-pick b { font: 14px var(--title-font); letter-spacing: 1.5px; text-transform: uppercase; }
body[data-theme="drivein"] .maker { border-radius: 1px; }


/* ---------- Dim the room while the movie plays (after the themes, so it wins) ---------- */
header, .room-bar, .chat-panel { transition: opacity .5s; }
body.dimmed { background: var(--bg-dim); }
body.dimmed header,
body.dimmed .room-bar,
body.dimmed .chat-panel { opacity: .3; }
body.dimmed header:hover,
body.dimmed .room-bar:hover,
body.dimmed .chat-panel:hover,
body.dimmed .chat-panel:focus-within { opacity: 1; }

@media (max-width: 760px) {
  body[data-theme] .room-main { padding: 8px; gap: 8px; }
  body[data-theme] header { padding: 0 10px; }
  body[data-theme] .room-bar { padding-left: 10px; padding-right: 10px; }
  body[data-theme] .chat-panel { width: auto; height: 44%; }
}

@media (prefers-reduced-motion: reduce) {
  .loadbar-runner svg, .loadbar-runner svg *, .holiday-art svg, body[data-theme="kobe"]::before,
  body[data-theme="drivein"] .logo::before, body[data-theme="drivein"] .logo::after { animation: none !important; }
}


/* =====================================================================
   WEBSITE PAGES: home, how it works, privacy, help, and the room error page.
   They use the same theme values, so whichever theme you pick covers the whole site.
   ===================================================================== */
body.site-page { min-height: 100vh; }
.site-nav { display: flex; gap: 2px; margin: 0 auto 0 18px; }
.site-nav a {
  color: var(--header-text);
  text-decoration: none;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 3px;
  text-shadow: 1px 1px 0 rgba(0,0,0,.45);
  white-space: nowrap;
}
.site-nav a:hover { background: rgba(255,255,255,.18); }
.site-nav a[aria-current="page"] { background: rgba(0,0,0,.22); box-shadow: inset 0 1px 2px rgba(0,0,0,.45); }
a.btn { display: inline-block; text-decoration: none; }
.btn.big { padding: 7px 18px; font-size: 14px; }

.site-main {
  flex: 1;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 24px 16px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 13px;
  line-height: 1.55;
}
.site-main h1 { font: bold 30px/1.2 var(--title-font); text-shadow: 1px 1px 0 #000; margin-bottom: 10px; }
.site-main a:not(.btn) { color: var(--accent); }
.lead { font-size: 15px; max-width: 34em; }
.muted { color: var(--muted); }
.card .dialog-title { margin: 0; font-size: 13px; }
.card .dialog-body { padding: 14px 16px 16px; }
.card .dialog-body > :last-child { margin-bottom: 0; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 16px; align-items: start; }
.page-head { padding: 8px 2px 0; }
.page-head p { color: var(--muted); }

/* Home: the opening section, with a small picture of a room in the current theme */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; padding: 18px 2px 8px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.join-form { max-width: 440px; margin-top: 12px; }
.hero-note { margin-top: 8px; color: var(--muted); font-size: 11.5px; }
.form-message { margin-top: 8px; color: #ffd36a; font-size: 12px; }

.hero-preview {
  display: flex;
  flex-direction: column;
  aspect-ratio: 16 / 10.5;
  background: var(--bg-image) center / cover no-repeat, var(--page);
  border: 2px solid #000;
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
  overflow: hidden;
}
.hp-bar { flex: none; height: 13%; display: flex; align-items: center; gap: 4%; padding: 0 4%; background: var(--header-bg); border-bottom: 1px solid var(--header-line); }
.hp-bar i { display: block; height: 30%; background: var(--header-text); opacity: .85; border-radius: 1px; }
.hp-bar i:first-child { width: 26%; }
.hp-bar i:not(:first-child) { width: 9%; opacity: .45; }
.hp-bar i:nth-child(2) { margin-left: auto; }
.hp-body { flex: 1; min-height: 0; display: flex; gap: 3%; padding: 3%; }
.hp-screen {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4%;
  background: var(--screen);
  border: 1px solid #000;
  overflow: hidden;
}
.hp-screen .holiday-art { position: relative; width: 34%; }
.hp-screen .holiday-art svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 3px 8px rgba(0,0,0,.5)); }
.hp-screen p { position: relative; color: rgba(255,255,255,.8); font: 11px var(--title-font); text-shadow: 0 1px 3px #000; }
.hp-chat { flex: none; width: 31%; display: flex; flex-direction: column; justify-content: flex-end; gap: 7%; padding: 5%; background: var(--panel); }
.hp-chat i { display: block; height: 9%; width: 78%; background: var(--bubble); border-radius: 2px; }
.hp-chat i.mine { align-self: flex-end; width: 62%; background: var(--bubble-mine); }
.hp-chat i:nth-child(3) { width: 54%; }
.hp-chat b { display: block; height: 10%; margin-top: 6%; background: var(--field); border: 1px solid var(--line); }

/* Your rooms (remembered on this device) */
.room-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.room-item { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px; }
.room-item code { font: bold 13px "Courier New", monospace; letter-spacing: 1px; }
.room-item .status { flex: 1; min-width: 120px; color: var(--muted); font-size: 11.5px; }
.room-item .status.open { color: var(--text); }
.room-item .status.open::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #7fe0a0; }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); font-size: 11px; text-decoration: underline; cursor: pointer; }
.link-btn:hover { color: var(--text); }

.steps { list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 12px; }
.steps li { counter-increment: step; display: flex; gap: 10px; }
.steps li::before {
  content: counter(step);
  flex: none;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  font-weight: bold;
  color: var(--btn-text);
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  border-radius: 50%;
}
.steps b, .features b { display: block; }
.features { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.features li { padding-left: 12px; border-left: 2px solid var(--accent); }

/* Made by */
.creators { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 4px; }
.creator { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px; }
.creator b { display: block; font-size: 13.5px; overflow-wrap: anywhere; }
.creator small { color: var(--muted); }
.monogram {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font: bold 15px var(--title-font);
  color: var(--btn-text);
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  border-radius: 50%;
  text-shadow: 1px 1px 0 rgba(0,0,0,.4);
}

/* Help keep it online */
.donate { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; }
.donate-links { display: flex; flex-wrap: wrap; gap: 8px; }
.donate-soon { padding: 8px 12px; border: 1px dashed var(--line); color: var(--muted); font-size: 12px; }

/* Privacy, How it works, Help */
.prose h3 { margin: 20px 0 6px; font: bold 14px var(--title-font); color: var(--accent); }
.prose > h3:first-child { margin-top: 0; }
.prose p { margin-bottom: 10px; }
.prose ul { margin: 0 0 10px; padding-left: 18px; }
.prose li { margin-bottom: 5px; }
.prose code { font: 12px "Courier New", monospace; }
.help-item { margin-bottom: 10px; padding: 10px 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px; scroll-margin-top: 16px; }
.help-item:target { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.help-item h3 { margin-top: 0; }
.help-item p:last-child { margin-bottom: 0; }
.error-tag { font: bold 11px "Courier New", monospace; letter-spacing: 1.5px; color: var(--muted); }

/* Bad room link page */
.error-card { width: 100%; max-width: 560px; margin: 40px auto 0; }
.error-card h1 { font-size: 24px; margin: 4px 0 8px; }
.error-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 4px; }

.site-footer {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 14px 24px;
  background: var(--panel-2);
  border-top: 2px solid #000;
  color: var(--muted);
  font-size: 11.5px;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 14px; }
.site-footer a { color: var(--text); }

/* The welcome questions */
#welcome-dialog { width: 420px; }
.welcome-count { color: var(--muted); font-size: 11px; margin-bottom: 2px; }
.welcome-title { font: bold 17px var(--title-font); margin-bottom: 6px; }
.welcome-actions { display: flex; gap: 6px; margin-top: 14px; }
.welcome-actions .back { margin-right: auto; }
input.field.wide { display: block; width: 100%; padding: 6px 8px; font-size: 13px; }

/* Open video: YouTube / Video file / Link */
#open-dialog { width: 420px; }
.tabs { display: flex; margin: -2px 0 12px; border-bottom: 1px solid var(--line); }
.tabs button {
  flex: 1;
  margin-bottom: -1px;
  padding: 7px 4px;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-weight: bold;
  cursor: pointer;
}
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.formats { margin-top: 8px; color: var(--muted); font: 10.5px/1.6 "Courier New", monospace; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-preview { max-width: 460px; }
  .creators { grid-template-columns: 1fr; }
  .donate { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .site-nav { display: none; }
  header .logo { font-size: 15px; }
  #create-btn { display: none; }
}

/* ---------- Kobe on the website ---------- */
body[data-theme="kobe"] .site-nav { gap: 4px; margin-left: 30px; }
body[data-theme="kobe"] .site-nav a {
  padding: 8px 14px;
  font: 600 14px var(--title-font);
  text-shadow: none;
  color: var(--muted);
  border-radius: 3px;
  transition: color .16s, background .16s;
}
body[data-theme="kobe"] .site-nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
body[data-theme="kobe"] .site-nav a[aria-current="page"] { color: #fff; background: none; box-shadow: inset 0 -2px 0 #fff; border-radius: 0; }
body[data-theme="kobe"] .btn.primary { background: #fff; color: #0a0e16; }
body[data-theme="kobe"] .site-main { max-width: 1120px; padding: 18px 40px 56px; gap: 22px; }
body[data-theme="kobe"] .site-main h1 { font: 300 46px/1.1 var(--title-font); letter-spacing: -.4px; text-shadow: none; }
body[data-theme="kobe"] .lead { color: #c9d1e0; font-size: 16px; }
body[data-theme="kobe"] .hero { animation: kobe-up .55s var(--ease) backwards; }
body[data-theme="kobe"] .site-main > .card,
body[data-theme="kobe"] .card-grid > .card { animation: kobe-up .55s .12s var(--ease) backwards; }
body[data-theme="kobe"] .card-grid > .card:nth-child(2) { animation-delay: .18s; }
body[data-theme="kobe"] .card-grid > .card:nth-child(3) { animation-delay: .24s; }
body[data-theme="kobe"] .card .dialog-title { padding: 20px 24px 2px; font: 300 22px var(--title-font); }
body[data-theme="kobe"] .card .dialog-body { padding: 10px 24px 24px; }
body[data-theme="kobe"] .hero-preview { border: 0; border-radius: 4px; box-shadow: 0 40px 90px rgba(0,0,0,.6); outline: 2px solid rgba(255,255,255,.85); outline-offset: 5px; }
body[data-theme="kobe"] .hp-bar { border: 0; }
body[data-theme="kobe"] .hp-screen, body[data-theme="kobe"] .hp-chat { border: 0; border-radius: 2px; }
body[data-theme="kobe"] .hp-chat i { border-radius: 1px; }
body[data-theme="kobe"] .room-item,
body[data-theme="kobe"] .creator,
body[data-theme="kobe"] .help-item { border: 0; border-radius: 3px; background: rgba(255,255,255,.045); }
body[data-theme="kobe"] .creator { outline: 2px solid transparent; outline-offset: 3px; transition: transform .22s var(--ease), outline-color .16s; }
body[data-theme="kobe"] .creator:hover { transform: scale(1.04); outline-color: rgba(255,255,255,.9); }
body[data-theme="kobe"] .help-item:target { box-shadow: inset 3px 0 0 var(--accent); }
body[data-theme="kobe"] .monogram,
body[data-theme="kobe"] .steps li::before { border: 0; background: rgba(255,255,255,.1); color: #fff; text-shadow: none; font-weight: 600; }
body[data-theme="kobe"] .steps li::before { border-radius: 3px; }
body[data-theme="kobe"] .features li { border-left-color: rgba(255,255,255,.25); }
body[data-theme="kobe"] .prose h3 { color: #fff; font: 600 15px var(--title-font); }
body[data-theme="kobe"] .site-main a:not(.btn) { color: #8fb3ff; }
body[data-theme="kobe"] .site-footer { background: none; border-top: 1px solid rgba(255,255,255,.07); padding: 20px 40px; }
body[data-theme="kobe"] .tabs { border-bottom-color: rgba(255,255,255,.1); }
body[data-theme="kobe"] .tabs button { font: 600 13px var(--title-font); }
body[data-theme="kobe"] .tabs button[aria-selected="true"] { border-bottom-color: #fff; }
body[data-theme="kobe"] .welcome-title { font: 300 22px var(--title-font); }
body[data-theme="kobe"] .donate-soon { border-radius: 3px; border: 0; background: rgba(255,255,255,.045); }

/* ---------- Drive-In on the website ---------- */
body[data-theme="drivein"] .site-nav { gap: 6px; margin-left: 28px; }
body[data-theme="drivein"] .site-nav a {
  padding: 5px 8px 4px;
  font: 15px var(--title-font);
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: none;
  color: var(--muted);
  border-radius: 0;
}
body[data-theme="drivein"] .site-nav a:hover { color: var(--text); background: none; }
body[data-theme="drivein"] .site-nav a[aria-current="page"] { color: var(--text); background: none; box-shadow: inset 0 -2px 0 var(--accent); }
body[data-theme="drivein"] .btn.primary { background: var(--accent); border-color: var(--accent); color: #fbf3e2; }
body[data-theme="drivein"] .btn.primary:hover { background: var(--accent); color: #fbf3e2; filter: brightness(1.12); }
body[data-theme="drivein"] .site-main { padding: 28px 24px 48px; }
body[data-theme="drivein"] .site-main h1 { font: 42px/1.08 var(--title-font); letter-spacing: 2px; text-transform: uppercase; text-shadow: none; }
body[data-theme="drivein"] .card .dialog-title { font-size: 16px; }
body[data-theme="drivein"] .hero-preview { border: 5px solid #d9d2c1; box-shadow: 0 0 0 1px #4a4538, 0 24px 50px rgba(0,0,0,.6); }
body[data-theme="drivein"] .hp-bar i:first-child { background: var(--board); opacity: 1; height: 42%; }
body[data-theme="drivein"] .room-item,
body[data-theme="drivein"] .creator,
body[data-theme="drivein"] .help-item { border-radius: 1px; border-color: rgba(239,230,210,.14); background: transparent; }
body[data-theme="drivein"] .monogram,
body[data-theme="drivein"] .steps li::before { border: 0; border-radius: 1px; background: var(--board); color: var(--board-ink); text-shadow: none; font: 17px var(--title-font); }
body[data-theme="drivein"] .prose h3 { font: 16px var(--title-font); letter-spacing: 2px; text-transform: uppercase; }
body[data-theme="drivein"] .creator b { font: 16px var(--title-font); letter-spacing: 1px; }
body[data-theme="drivein"] .site-footer { background: #0c0d11; border-top: 1px solid var(--header-line); }
body[data-theme="drivein"] .tabs button { font: 14px var(--title-font); letter-spacing: 2px; text-transform: uppercase; }
body[data-theme="drivein"] .welcome-title { font: 20px var(--title-font); letter-spacing: 2px; text-transform: uppercase; }
body[data-theme="drivein"] .donate-soon { border-radius: 0; }

/* Config: no gap above the first heading */
#config-room > .section-title:first-child, #config-room:empty + .section-title { margin-top: 0; }
