/*
 * peepshow: Paisley style, after dark.
 * Plum-black ground, Odibee Sans for signage, Alegreya for names,
 * cream ticket stock for the door. Red = the "on" lamp (Live, saved, Ready),
 * gold = where you are, teal = the niche. Minimal: the video is the page.
 */

:root {
  --ground: #0d0a0c;
  --panel: #1a1417;
  --overlay: #241b1f;
  --line: #3a2c31;
  --text: #efe7ea;
  --text-dim: #c4b7bc;
  --text-faint: #a89aa0;

  --paper: #f7f3ec;
  --paper-line: #ddd2c2;
  --ink: #141012;
  --ink-faint: #6d6066;

  --red: #ff4f5e;
  --red-deep: #c22a3a;
  --gold: #f6b04a;
  --teal: #3fc1c9;

  --display: "Odibee Sans", "Arial Narrow", Impact, sans-serif;
  --body: "Alegreya", Georgia, serif;

  --bar: rgba(13, 10, 12, .78);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html, body {
  height: 100%;
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* signage face: always uppercase, open tracking */
.nav, .ticket_meta, .ticket_field_label, .ticket_btn, .ticket_foot,
.mark, .ready_btn, .ready_hint, .dir_name, #toast {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .06em;
}

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


/* ---------- player ---------- */

.full { width: 100%; height: 100%; margin: 0; padding: 0; background: var(--ground); }
#container { height: 100%; opacity: 1; transition: opacity 1s; }
.full_img {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--ground);
}

/* left/right quarters: tap for Prev/Next (handled by tapZone on #container) */
.tap_zone {
  position: fixed;
  top: 0;
  width: 25%;
  height: 100%;
  z-index: 1;
  display: flex;
  align-items: center;
  opacity: 0;
  transition: opacity .25s;
  cursor: pointer;
}
.tap_prev { left: 0; justify-content: flex-start; }
.tap_next { right: 0; justify-content: flex-end; }
.chev {
  width: 22px;
  height: 22px;
  margin: 0 clamp(20px, 4vw, 48px);
  border: solid var(--text);
  border-width: 0 0 1.5px 1.5px;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.6));
}
.tap_prev .chev { transform: rotate(45deg); }
.tap_next .chev { transform: rotate(-135deg); }
/* only with a mouse, so it doesn't stick after a tap on phones */
@media (hover: hover) {
  body.playing .tap_zone:hover { opacity: .85; }  /* only once a video plays */
}

/* creator + niche, top left */
.info {
  position: fixed;
  top: 18px;
  left: 20px;
  z-index: 100;
  max-width: 70%;
  margin-top: env(safe-area-inset-top);
  margin-left: env(safe-area-inset-left);
  pointer-events: none;
}
.caption, .dir_name {
  display: none;
  pointer-events: auto;
  text-shadow: 0 1px 6px rgba(0,0,0,.7);
  line-height: 1.15;
}
.caption { font: italic 500 22px/1.15 var(--body); }
.caption .dir_link { color: var(--text); }
.dir_name { margin-top: 3px; font-size: 14px; }
.dir_name .dir_link { color: var(--teal); }
.dir_link { text-decoration: none; cursor: pointer; transition: color .2s; }
.dir_link:hover { color: var(--gold) !important; }

/* the bar: one quiet line at the bottom */
.nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 18px;
  width: max-content;
  z-index: 100;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px;
  max-width: calc(100% - 32px);
  box-sizing: border-box;
  padding: 6px 10px;
  margin: 0 auto env(safe-area-inset-bottom);
  background: var(--bar);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 15px;
  line-height: 1;
}
.nav:empty { display: none; }

.btn_dir, .btn_off {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 9px;
  color: var(--text-faint);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.btn_dir:hover { color: var(--text); }
.btn_dir:active { transform: translateY(1px); }
/* where you are */
.btn_off { color: var(--gold); border-bottom-color: var(--gold); cursor: default; }

/* the on lamp */
.lamp {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(255,79,94,.18);
  animation: lamp 2.4s ease-in-out infinite;
}
@keyframes lamp { 50% { opacity: .45; } }
.btn_live { color: var(--text); }

/* Saved section */
.btn_saved { color: var(--text-dim); }
.btn_off.btn_saved { color: var(--red); border-bottom-color: var(--red); }

/* player controls: set apart by a hairline */
.btn_tool { color: var(--text-faint); }
#mute-button { margin-left: 8px; padding-left: 17px; border-left: 1px solid var(--line); border-radius: 0; }

/* ♥ save and ✕ not this: first in the bar */
.side_btns {
  display: inline-flex;
  gap: 4px;
  margin-right: 8px;
  padding-right: 10px;
  border-right: 1px solid var(--line);
}
.side_btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  border-radius: 50%;
  text-decoration: none;
  transition: transform .15s var(--ease), color .2s, background .2s;
}
.side_btn svg { display: block; }
.side_btn:hover { color: var(--text); background: rgba(239,231,234,.08); }
.side_btn:active { transform: scale(.88); }
#save-button.is_saved { color: var(--red); animation: heart_pop .35s var(--ease); }
#save-button.is_saved path { fill: currentColor; }
@keyframes heart_pop { 40% { transform: scale(1.28); } }

/* "Saved" / "Hiding this clip · Undo", center */
#toast {
  position: fixed;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -8px);
  z-index: 3000;
  padding: 10px 16px;
  font-size: 16px;
  color: var(--text);
  background: var(--overlay);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s var(--ease);
  white-space: nowrap;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#toast a { color: var(--gold); margin-left: 14px; text-decoration: none; border-bottom: 1px solid currentColor; }

/* middle tap: hide everything */

/* click in the middle: fade everything out, hide the cursor (the mouse brings it back) */
.nav, .info { transition: opacity .35s; }
body.idle .nav,
body.idle .info { opacity: 0 !important; pointer-events: none; }
body.idle, body.idle * { cursor: none !important; }

.nav_break { display: none; }

@media screen and (max-width: 710px) {
  .info { top: 12px; left: 16px; max-width: 80%; }
  .caption { font-size: 19px; }
  .dir_name { font-size: 13px; }
  .nav { bottom: 12px; width: calc(100% - 32px); padding: 6px; row-gap: 4px; }
  .side_btn { width: 40px; height: 40px; }
  .btn_dir, .btn_off { min-height: 36px; padding: 0 8px; }
}


/* ---------- the door: a booth ticket ---------- */

.gate {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--ground);
}
.ticket {
  position: relative;
  width: 100%;
  max-width: 360px;
  box-sizing: border-box;
  padding: 30px 28px 24px;
  background: var(--paper);
  color: var(--ink);
  border-radius: 3px;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
  animation: deal .5s var(--ease) both;
}
/* punched edges */
.ticket::before, .ticket::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 8px;
  background: radial-gradient(circle at 6px 0, var(--ground) 5px, transparent 5.5px) 0 0 / 12px 8px repeat-x;
  pointer-events: none;
}
.ticket::before { top: 0; }
.ticket::after { bottom: 0; transform: scaleY(-1); }
@keyframes deal { from { opacity: 0; transform: translateY(24px); } }

.ticket_meta { display: flex; justify-content: space-between; align-items: baseline; }
.ticket_index { color: var(--red-deep); font-size: 34px; line-height: 1; }
.ticket_label { color: var(--ink-faint); font-size: 15px; }
.ticket_title {
  margin: 18px 0 2px;
  font: 500 clamp(2.6rem, 12vw, 3.4rem)/1 var(--body);
  text-align: center;
  letter-spacing: -.01em;
}
.ticket_sub { margin: 0 0 22px; text-align: center; font-style: italic; color: var(--ink-faint); }
.ticket_form { display: grid; gap: 10px; padding-top: 18px; border-top: 1px dashed var(--paper-line); }
.ticket_field_label { font-size: 14px; color: var(--ink-faint); }
.ticket_input {
  width: 100%;
  box-sizing: border-box;
  height: 48px;
  padding: 0 14px;
  font: 22px var(--body);
  letter-spacing: .2em;
  color: var(--ink);
  background: #fffdf8;
  border: 1px solid var(--paper-line);
  border-radius: 6px;
  outline: none;
  transition: border-color .2s;
}
.ticket_input:focus { border-color: var(--ink); }
.ticket_input::placeholder { font: 15px var(--body); letter-spacing: 0; color: var(--red-deep); }
.ticket_btn {
  height: 56px;
  font-size: 22px;
  color: var(--paper);
  background: var(--red-deep);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  transition: background .2s, transform .1s;
}
.ticket_btn:hover { background: #9c1f2d; }
.ticket_btn:active { transform: translateY(1px) scale(.98); }
.ticket_foot {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
  font-size: 13px;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}


/* ---------- Ready: hold 2s before anything plays ---------- */

.ready {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: var(--ground);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  transition: opacity .4s;
  -webkit-user-select: none;
  user-select: none;
}
.ready.ready_gone { opacity: 0; pointer-events: none; }
.mark { display: flex; align-items: center; gap: 10px; font-size: 18px; color: var(--text-faint); letter-spacing: .3em; margin-bottom: 18px; }
.ready_btn {
  position: relative;
  width: 140px;
  height: 140px;
  border: 0;
  border-radius: 50%;
  background: var(--panel);
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
  touch-action: none;
  -webkit-touch-callout: none;
  transition: transform .2s var(--ease), background .2s;
}
.ready_btn.holding { transform: scale(.95); background: var(--overlay); }
.ready_btn:focus { outline: none; }
.ready_btn svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ready_btn span { position: relative; }
.ready_track { fill: none; stroke: var(--line); stroke-width: 1.5; }
.ready_ring { fill: none; stroke: var(--red); stroke-width: 3; stroke-linecap: round; }
.ready_hint { color: var(--text-faint); font-size: 14px; letter-spacing: .14em; }

@media (prefers-reduced-motion: reduce) {
  .ticket, .lamp, #save-button.is_saved { animation: none; }
}



/* =====================================================================
 * Look switch: html[data-theme="motel"] (default) or "modern" (above).
 * ===================================================================== */
html[data-theme="motel"] .only-modern,
html:not([data-theme="motel"]) .only-motel { display: none !important; }


/* =====================================================================
 * 70s MOTEL: neon script, oxblood velvet, mirror tiles, triple stripes.
 * Hot pink = on / you, tangerine = the niche, gold = Undo and the sign.
 * ===================================================================== */
html[data-theme="motel"] {
  --ground: #1c0610;
  --panel: #2b0a18;
  --overlay: #34101f;
  --line: #5a1d34;
  --text: #fde8d0;
  --text-dim: #f3cdb0;
  --text-faint: #dcae92;

  --pink: #ff3fa4;
  --orange: #ff7a1a;
  --sun: #ffc93c;

  --script: "Yellowtail", "Brush Script MT", cursive;
  --groovy: "Fraunces", "Cooper Black", Georgia, serif;
  --neon: 0 0 2px #fff3, 0 0 8px rgba(255,63,164,.85), 0 0 22px rgba(255,63,164,.45);
  --stripes: linear-gradient(to bottom, var(--orange) 0 2px, var(--pink) 2px 4px, var(--sun) 4px 6px);
  --bar: rgba(28, 6, 16, .86);
}

/* velvet with a faint mirror-tile ceiling */
html[data-theme="motel"] body {
  background:
    repeating-linear-gradient(45deg, rgba(255,214,190,.035) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(-45deg, rgba(255,214,190,.035) 0 1px, transparent 1px 46px),
    radial-gradient(ellipse at 50% 35%, #45102a 0%, #1c0610 62%, #0f0308 100%);
  background-attachment: fixed;
}
html[data-theme="motel"] .full,
html[data-theme="motel"] .full_img { background: transparent; }

/* soft, round, a little Cooper: no uppercase signage here */
html[data-theme="motel"] .nav,
html[data-theme="motel"] .ticket_field_label,
html[data-theme="motel"] .ticket_btn,
html[data-theme="motel"] .ticket_foot,
html[data-theme="motel"] .dir_name,
html[data-theme="motel"] .ready_hint,
html[data-theme="motel"] #toast {
  font-family: var(--groovy);
  font-weight: 700;
  font-variation-settings: "SOFT" 100;
  text-transform: none;
  letter-spacing: .01em;
}
html[data-theme="motel"] :focus-visible { outline-color: var(--sun); }

/* creator in neon script, niche in tangerine */
html[data-theme="motel"] .caption { font: 400 32px/1.1 var(--script); text-shadow: var(--neon); }
html[data-theme="motel"] .caption .dir_link { color: #ffd1ea; }
html[data-theme="motel"] .dir_name { margin-top: 2px; font-size: 15px; text-shadow: 0 1px 6px rgba(0,0,0,.8); }
html[data-theme="motel"] .dir_name .dir_link { color: var(--orange); }
html[data-theme="motel"] .dir_link:hover { color: var(--sun) !important; }

/* chevrons: pink neon tube */
html[data-theme="motel"] .chev { border-color: #ffd1ea; border-width: 0 0 2px 2px; filter: drop-shadow(0 0 4px var(--pink)) drop-shadow(0 0 10px rgba(255,63,164,.6)); }

/* the bar: velvet, round, triple stripe on top */
html[data-theme="motel"] .nav {
  overflow: hidden;
  padding-top: 10px;
  border: 0;
  border-radius: 16px;
  font-size: 16px;
}
html[data-theme="motel"] .nav::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--stripes);
}
html[data-theme="motel"] .btn_dir { color: var(--text-faint); }
html[data-theme="motel"] .btn_dir:hover { color: var(--text); }
html[data-theme="motel"] .btn_off { color: var(--pink); border-bottom: 2px solid var(--pink); text-shadow: 0 0 10px rgba(255,63,164,.6); }
html[data-theme="motel"] .btn_live { color: var(--text); }
html[data-theme="motel"] .lamp { background: var(--pink); box-shadow: 0 0 8px var(--pink); }
html[data-theme="motel"] .btn_off.btn_saved { color: var(--pink); border-bottom-color: var(--pink); }
html[data-theme="motel"] #save-button.is_saved { color: var(--pink); filter: drop-shadow(0 0 6px rgba(255,63,164,.7)); }
html[data-theme="motel"] .side_btn { color: var(--text-dim); }
html[data-theme="motel"] .side_btn:hover { background: rgba(255,63,164,.12); color: #ffd1ea; }

html[data-theme="motel"] #toast {
  font-size: 17px;
  background: var(--overlay);
  border: 1.5px solid var(--pink);
  border-radius: 14px;
  box-shadow: 0 0 14px rgba(255,63,164,.45), 0 10px 30px rgba(0,0,0,.5);
}
html[data-theme="motel"] #toast a { color: var(--sun); }

/* the door: a neon motel sign */
html[data-theme="motel"] .gate { background: transparent; }
html[data-theme="motel"] .ticket {
  max-width: 380px;
  padding: 34px 28px 22px;
  background: rgba(28, 6, 16, .92);
  color: var(--text);
  border: 2px solid var(--pink);
  border-radius: 22px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset, 0 0 18px rgba(255,63,164,.55), 0 0 60px rgba(255,63,164,.2), 0 20px 50px rgba(0,0,0,.6);
  overflow: hidden;
}
html[data-theme="motel"] .ticket::before {
  height: 6px;
  background: var(--stripes);
}
html[data-theme="motel"] .ticket::after { display: none; }

.sign { text-align: center; }
.sign_top {
  display: inline-block;
  padding: 3px 12px 4px;
  font: 700 13px/1 var(--groovy);
  font-variation-settings: "SOFT" 100;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--sun);
  border: 1.5px solid var(--sun);
  border-radius: 999px;
  box-shadow: 0 0 10px rgba(255,201,60,.35);
}
.sign_title {
  margin: 6px 0 0;
  font: 400 clamp(4.4rem, 22vw, 6rem)/1.05 var(--script);
  color: #ffe1f1;
  text-shadow: var(--neon);
  transform: rotate(-4deg);
  animation: neon_on 3.2s 1;
}
.sign_sub { margin: 8px 0 24px; font: italic 600 15px var(--groovy); color: var(--orange); }
@keyframes neon_on { 0%, 8%, 12%, 20% { opacity: 1; } 10%, 16% { opacity: .35; } }

html[data-theme="motel"] .ticket_form { border-top: 0; padding-top: 0; }
html[data-theme="motel"] .ticket_field_label { font-size: 15px; color: var(--text-faint); }
html[data-theme="motel"] .ticket_input {
  height: 52px;
  color: var(--text);
  background: rgba(0,0,0,.35);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 0 20px;
  text-align: center;
}
html[data-theme="motel"] .ticket_input:focus { border-color: var(--pink); box-shadow: 0 0 10px rgba(255,63,164,.4); }
html[data-theme="motel"] .ticket_input::placeholder { color: var(--sun); font-family: var(--groovy); }
html[data-theme="motel"] .ticket_btn {
  height: 56px;
  font-size: 22px;
  color: #2a0612;
  background: var(--pink);
  border-radius: 999px;
  box-shadow: 0 0 16px rgba(255,63,164,.55);
}
html[data-theme="motel"] .ticket_btn:hover { background: #ff69b8; }
html[data-theme="motel"] .ticket_foot { margin-top: 20px; font-size: 14px; color: var(--text-faint); }
.vacancy { color: var(--sun); text-shadow: 0 0 8px rgba(255,201,60,.7); animation: lamp 2.4s ease-in-out infinite; }

/* Ready: a neon heart that fills while you hold */
html[data-theme="motel"] .ready { background: transparent; }
html[data-theme="motel"] .mark {
  margin-bottom: 4px;
  font: 400 64px/1 var(--script);
  letter-spacing: 0;
  text-transform: none;
  color: #ffe1f1;
  text-shadow: var(--neon);
  transform: rotate(-4deg);
}
html[data-theme="motel"] .mark .lamp { display: none; }
html[data-theme="motel"] .ready_btn {
  width: 180px;
  height: 180px;
  background: transparent;
  font: 400 40px/1 var(--script);
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
}
html[data-theme="motel"] .ready_btn span { top: -6px; }
html[data-theme="motel"] .ready_btn svg { transform: none; overflow: visible; }
html[data-theme="motel"] .ready_btn.holding { background: transparent; }
html[data-theme="motel"] .ready_track { stroke: var(--line); stroke-width: 2.5; fill: rgba(255,63,164,.06); }
html[data-theme="motel"] .ready_ring { stroke: var(--pink); stroke-width: 3.5; filter: drop-shadow(0 0 4px var(--pink)) drop-shadow(0 0 10px rgba(255,63,164,.6)); }
html[data-theme="motel"] .ready_hint { font-size: 15px; color: var(--text-faint); }

@media screen and (max-width: 710px) {
  html[data-theme="motel"] .caption { font-size: 27px; }
  html[data-theme="motel"] .nav { padding-top: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .sign_title, .vacancy { animation: none; }
}


/* =====================================================================
 * Bar layout: ♥ ✕ on their own line over the channels.
 * Laptop:  [source switch] channels [style switch] | Unmute Mini Fullscreen
 * Phones:  [source] Unmute [style] / channels
 * ===================================================================== */
.nav > .side_btns { order: 0; flex-basis: 100%; justify-content: center; margin: 0 0 2px; padding: 0; border: 0; }
.nav > #vault-button { order: 1; }
.nav > .channels { order: 2; }
.nav > #look-button { order: 3; }
.nav > .btn_tool { order: 4; }
.nav > .nav_break { display: none; }
#mute-button { margin-left: 6px; padding-left: 14px; border-left: 1px solid var(--line); border-radius: 0; }
.channels { display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; margin: 0 6px; }

@media screen and (max-width: 710px) {
  .nav > #vault-button { order: 1; }
  .nav > .btn_tool { order: 2; }
  .nav > #look-button { order: 3; }
  .nav > .nav_break { order: 4; display: block; flex-basis: 100%; height: 0; border-top: 1px solid var(--line); margin: 4px 0 2px; }
  .nav > .channels { order: 5; margin: 0; }
  .nav { justify-content: space-between; }
  .nav > .channels { flex-basis: 100%; }
  #mute-button { margin: 0; padding: 0 8px; border-left: 0; }
}

/* channel numbers */
.ch { font-variant-numeric: tabular-nums; }
.ch .only-modern { color: var(--text-faint); opacity: .6; margin-right: 5px; font-size: .85em; }
.btn_off .ch .only-modern { color: inherit; opacity: .8; }

/* the switch: small label on top, two options, a knob on the active one */
.switch {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 0 4px;
  text-decoration: none;
  cursor: pointer;
}
.switch_label { font-size: 10px; letter-spacing: .14em; color: var(--text-faint); opacity: .8; }
.switch_track {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  height: 24px;
  padding: 2px;
  background: rgba(0,0,0,.35);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.switch_knob {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 2px;
  width: calc(50% - 2px);
  background: var(--overlay);
  border: 1px solid var(--line);
  border-radius: 4px;
  transition: transform .25s var(--ease);
}
.switch.is_b .switch_knob { transform: translateX(100%); }
.switch_opt {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 44px;
  padding: 0 8px;
  font-size: 13px;
  color: var(--text-faint);
  transition: color .2s;
}
.switch:not(.is_b) .opt_a, .switch.is_b .opt_b { color: var(--gold); }
#vault-button.is_b .opt_b { color: var(--text); }
.switch .lamp { opacity: .35; animation: none; box-shadow: none; }
.switch.is_b .lamp { opacity: 1; animation: lamp 2.4s ease-in-out infinite; }
.switch.is_loading .switch_knob { animation: lamp 1s ease-in-out infinite; }
.switch:active .switch_knob { filter: brightness(1.3); }

/* 70s: chunky rocker, round dial numbers on the channels */
html[data-theme="motel"] .switch_label { font: 700 11px var(--groovy); font-variation-settings: "SOFT" 100; letter-spacing: .12em; text-transform: uppercase; color: var(--sun); opacity: .9; }
html[data-theme="motel"] .switch_track { height: 26px; border-radius: 999px; background: rgba(0,0,0,.45); border-color: var(--line); }
html[data-theme="motel"] .switch_knob { border-radius: 999px; background: var(--pink); border: 0; box-shadow: 0 0 10px rgba(255,63,164,.55); }
html[data-theme="motel"] .switch_opt { font-size: 14px; }
html[data-theme="motel"] .switch:not(.is_b) .opt_a,
html[data-theme="motel"] .switch.is_b .opt_b { color: #2a0612; }
html[data-theme="motel"] .switch .lamp { background: #2a0612; box-shadow: none; }
html[data-theme="motel"] .switch:not(.is_b) .lamp { background: var(--text-faint); }

html[data-theme="motel"] .ch .only-motel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-right: 6px;
  font-size: 11px;
  font-weight: 800;
  color: var(--sun);
  border: 1.5px solid currentColor;
  border-radius: 50%;
}
html[data-theme="motel"] .btn_off .ch .only-motel { color: #2a0612; background: var(--pink); border-color: var(--pink); box-shadow: 0 0 8px rgba(255,63,164,.6); }
html[data-theme="motel"] .btn_off { border-bottom-color: transparent; }

/* tools are icons */
.btn_tool { padding: 0 7px; }
.btn_tool svg { display: block; }
#mute-button { margin-left: 4px; padding-left: 12px; }
@media screen and (max-width: 710px) {
  .btn_tool { min-width: 40px; justify-content: center; }
  #mute-button { padding-left: 8px; }
}
html[data-theme="motel"] .btn_tool { color: var(--text-dim); }
html[data-theme="motel"] .btn_tool:hover { color: #ffd1ea; filter: drop-shadow(0 0 6px rgba(255,63,164,.6)); }
.nav > .side_btns .side_btn svg { width: 21px; height: 21px; }
@media screen and (max-width: 710px) {
  .btn_tool { min-width: 34px; padding: 0 4px; }
  #mute-button { padding-left: 4px; }
}

/* top line: ♥ ✕ | speaker mini fullscreen; then source, channels, style */
.nav > .side_btns { order: 0; flex-basis: auto; margin: 0; }
.nav > .btn_tool { order: 1; }
.nav > .nav_break_top { order: 2; display: block; flex-basis: 100%; height: 0; }
.nav > #vault-button { order: 3; }
.nav > .channels { order: 4; }
.nav > #look-button { order: 5; }
#mute-button { margin-left: 6px; padding-left: 12px; border-left: 1px solid var(--line); }
@media screen and (max-width: 710px) {
  .nav { justify-content: center; }
  .nav > #vault-button { order: 3; margin-right: auto; }
  .nav > #look-button { order: 4; margin-left: auto; }
  .nav > .nav_break { order: 5; }
  .nav > .channels { order: 6; }
  #mute-button { margin-left: 6px; padding-left: 10px; }
}

/* =====================================================================
 * One selected style everywhere: outline + white text
 * (channels, both switches). Unselected = faint text, no outline.
 * ===================================================================== */
:root { --sel: var(--gold); }
html[data-theme="motel"] { --sel: var(--pink); }

.btn_dir, .btn_off { border: 1px solid transparent; border-radius: 6px; }
.btn_off,
.btn_off.btn_saved,
html[data-theme="motel"] .btn_off,
html[data-theme="motel"] .btn_off.btn_saved {
  color: #fff;
  border: 1px solid var(--sel);
  border-bottom: 1px solid var(--sel);
  text-shadow: none;
  background: transparent;
}
html[data-theme="motel"] .btn_dir, html[data-theme="motel"] .btn_off { border-radius: 999px; }

/* switches: same outline on the active side, no fill */
.switch { padding: 0 2px; }
.switch_track,
html[data-theme="motel"] .switch_track { height: 32px; padding: 0; background: transparent; border: 0; }
.switch_knob,
html[data-theme="motel"] .switch_knob {
  top: 0; bottom: 0; left: 0; width: 50%;
  background: transparent;
  border: 1px solid var(--sel);
  box-shadow: none;
}
.switch_opt, html[data-theme="motel"] .switch_opt { font-size: inherit; color: var(--text-faint); padding: 0 10px; }
.switch:not(.is_b) .opt_a, .switch.is_b .opt_b,
#vault-button.is_b .opt_b,
html[data-theme="motel"] .switch:not(.is_b) .opt_a,
html[data-theme="motel"] .switch.is_b .opt_b { color: #fff; }
html[data-theme="motel"] .switch .lamp,
html[data-theme="motel"] .switch:not(.is_b) .lamp { background: var(--pink); box-shadow: 0 0 6px var(--pink); }
.switch:not(.is_b) .lamp { opacity: .35; animation: none; }

/* icon buttons: same height as the rest (36px), 24px icons */
.side_btn, .btn_tool { width: 36px; height: 36px; min-height: 36px; padding: 0; justify-content: center; border-radius: 50%; }
.side_btn svg, .btn_tool svg, .nav > .side_btns .side_btn svg { width: 24px; height: 24px; }
.btn_tool { border: 0; }
#mute-button { width: auto; margin-left: 6px; padding: 0 6px 0 12px; border-left: 1px solid var(--line); border-radius: 0; }

/* phones: tuck the bar away, bring it back with the tab */
.nav_min, #nav_tab { display: none; }
@media screen and (max-width: 710px) {
  .nav { position: fixed; }
  .nav_min {
    display: flex;
    position: absolute;
    top: 8px;
    right: 6px;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    color: var(--text-faint);
  }
  html[data-theme="motel"] .nav_min { top: 12px; }
  body.nav_tucked .nav { display: none !important; }
  body.nav_tucked #nav_tab {
    display: flex;
    position: fixed;
    left: 50%;
    bottom: 12px;
    margin-bottom: env(safe-area-inset-bottom);
    transform: translateX(-50%);
    z-index: 100;
    width: 56px;
    height: 30px;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    background: var(--bar);
    border: 1px solid var(--line);
    border-radius: 999px;
  }
  html[data-theme="motel"] body.nav_tucked #nav_tab { border-color: var(--pink); color: #ffd1ea; box-shadow: 0 0 10px rgba(255,63,164,.4); }
  body.idle #nav_tab { display: none !important; }
}
/* switches read as toggles: a faint track around both options */
.switch_track, html[data-theme="motel"] .switch_track { border: 1px solid var(--line); border-radius: 6px; }
html[data-theme="motel"] .switch_track { border-radius: 999px; }
.switch_knob, html[data-theme="motel"] .switch_knob { top: -1px; bottom: -1px; left: -1px; }
.nav > #vault-button { margin-right: 6px; }
.nav > #look-button { margin-left: 6px; }

/* the selected channel's outline is one piece that slides */
.channels { position: relative; }
.ch_sel {
  position: absolute;
  top: 0;
  left: 0;
  border: 1px solid var(--sel);
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  box-sizing: border-box;
  transition: transform .38s var(--ease), width .38s var(--ease), height .38s var(--ease);
}
html[data-theme="motel"] .ch_sel { border-radius: 999px; box-shadow: 0 0 8px rgba(255,63,164,.35); }
.channels .btn_off,
html[data-theme="motel"] .channels .btn_off { border-color: transparent; }
.switch_knob, html[data-theme="motel"] .switch_knob { transition: transform .38s var(--ease); }
@media (prefers-reduced-motion: reduce) {
  .ch_sel, .switch_knob { transition: none !important; }
}

/* video: centered between the notch and the bottom of the screen */
.full_img {
  top: env(safe-area-inset-top);
  bottom: env(safe-area-inset-bottom);
  height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  object-position: 50% 50%;
}

/* next / prev: dark until the new clip's first frame is ready, then a quick fade in */
.full_img { transition: opacity .18s ease-out; }
.full_img.switching { opacity: 0; transition: none; }

/* Prev / Next edges: 15% each, at least 56px (matches edgeWidth() in peeps.js) */
.tap_zone { width: max(15%, 56px); }

/* top line: vault | ♥ ✕ | speaker mini fullscreen; channels underneath */
.nav > #vault-button, .nav > #vault-button { order: 0; margin: 0 4px 0 0; }
.nav > .side_btns { order: 1; margin-left: 4px; padding-left: 10px; border-left: 1px solid var(--line); }
.nav > .btn_tool { order: 2; }
.nav > .nav_break_top { order: 3; }
.nav > .channels { order: 4; }
.nav > .nav_break { display: none !important; }
@media screen and (max-width: 710px) {
  .nav > #vault-button { order: 0; margin: 0 4px 0 0; }
  .nav > .side_btns { order: 1; }
  .nav > .btn_tool { order: 2; }
  .nav > .nav_break_top { order: 3; height: 0; margin: 4px 0 2px; border-top: 1px solid var(--line); }
  .nav > .channels { order: 4; flex-basis: 100%; }
}

/* ❤️ 🐍 🍑: the site's emojis as a neon sign, lighting up one by one */
.hsp {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 18px 0 2px;
  font: 40px/1 "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}
.hsp span {
  display: inline-block;
  filter: drop-shadow(0 0 4px rgba(255,63,164,.9)) drop-shadow(0 0 14px rgba(255,63,164,.55));
  animation: hsp_on 1.6s steps(1, end) both;
}
.hsp span:nth-child(1) { animation-delay: .2s; }
.hsp span:nth-child(2) { animation-delay: .6s; transform: translateY(4px); }
.hsp span:nth-child(3) { animation-delay: 1s; }
@keyframes hsp_on {
  0% { opacity: .12; filter: none; }
  20% { opacity: 1; }
  30% { opacity: .25; filter: none; }
  45%, 100% { opacity: 1; }
}
.ready .hsp { margin: 0 0 6px; font-size: 46px; }
html[data-theme="motel"] .ready .mark { margin-top: 0; }
@media (prefers-reduced-motion: reduce) { .hsp span { animation: none; } }

/* Ready (70s): "Peeps" is the button; the outline draws around it while you hold,
   ❤️ 🐍 🍑 light up one by one (the peach as the outline closes) */
html[data-theme="motel"] .ready_btn {
  width: 280px;
  height: 120px;
  border-radius: 999px;
  font: 400 72px/1 var(--script);
  color: #ffe1f1;
  text-shadow: var(--neon);
}
html[data-theme="motel"] .ready_btn span { top: -4px; display: inline-block; transform: rotate(-4deg); }
html[data-theme="motel"] .ready_btn.holding { transform: scale(.97); }
html[data-theme="motel"] .ready_track { fill: none; stroke: var(--line); stroke-width: 2; }
html[data-theme="motel"] .ready_ring { stroke-width: 3.5; }
.ready .hsp { margin: 0 0 4px; font-size: 52px; gap: 22px; }
.ready .hsp span {
  animation: none;
  opacity: .16;
  filter: grayscale(.7);
  transform: scale(.9);
  transition: opacity .2s, transform .35s var(--ease), filter .2s;
}
.ready .hsp span:nth-child(2) { transform: translateY(5px) scale(.9); }
.ready .hsp span.lit {
  opacity: 1;
  transform: scale(1.08);
  filter: drop-shadow(0 0 5px rgba(255,63,164,.95)) drop-shadow(0 0 16px rgba(255,63,164,.6));
}
.ready .hsp span:nth-child(2).lit { transform: translateY(5px) scale(1.08); }
@media screen and (max-width: 710px) {
  html[data-theme="motel"] .ready_btn { width: 240px; height: 103px; font-size: 62px; }
  .ready .hsp { font-size: 44px; }
}

/* Ready complete: all lit, flash twice, then fade into the video */
@keyframes win_flash {
  0%, 40%, 80% { opacity: 1; filter: brightness(1.6) drop-shadow(0 0 10px rgba(255,63,164,1)) drop-shadow(0 0 26px rgba(255,63,164,.7)); }
  20%, 60% { opacity: .2; filter: none; }
  100% { opacity: 1; }
}
.ready_win .hsp span,
.ready_win .ready_btn > span,
.ready_win .ready_ring { animation: win_flash .8s steps(1, end) both; }
.ready_win .ready_hint { opacity: 0; transition: opacity .2s; }
@media (prefers-reduced-motion: reduce) {
  .ready_win .hsp span, .ready_win .ready_btn > span, .ready_win .ready_ring { animation: none; }
}

/* Prev / Next chevrons: thick neon tube, like the creator's name */
html[data-theme="motel"] .chev {
  width: 34px;
  height: 34px;
  border-width: 0 0 6.5px 6.5px;
  border-radius: 0 0 0 5px;
  border-color: #ffe1f1;
  filter: drop-shadow(0 0 3px var(--pink)) drop-shadow(0 0 10px rgba(255,63,164,.85)) drop-shadow(0 0 22px rgba(255,63,164,.45));
}

/* the vault: a faint safe icon, hold to open (it glows while held), lit pink while open */
#vault-button { color: var(--text-faint); opacity: .55; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; touch-action: none; transition: opacity .2s, transform .7s var(--ease), filter .7s; }
#vault-button.holding { opacity: 1; transform: scale(1.18); filter: drop-shadow(0 0 8px rgba(255,63,164,.8)); }
#vault-button.is_open { opacity: 1; color: #ffd1ea; filter: drop-shadow(0 0 6px rgba(255,63,164,.7)); }
#vault-button.is_loading { animation: lamp 1s ease-in-out infinite; }

/* ad break = breath break (js/breath.js draws it): ♥ ✕ and the names hide meanwhile */
body.ad_on .side_btns { opacity: 0; pointer-events: none; }
body.ad_on .info { visibility: hidden; }

/* the logo: a pyramid of neon frames (no fill), ❤️ / 🐍 / 🍑 floating in them.
   peeps.js places every frame and emoji (matrix3d) and sets their brightness. */
.pyr_box {
  position: fixed;
  top: calc(18px + env(safe-area-inset-top));
  right: calc(10px + env(safe-area-inset-right));
  z-index: 50;
  width: 72px;
  height: 72px;
  perspective: 380px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .6s;
  /* the names' neon (--neon): soft white halo, then the pink glow */
  filter: drop-shadow(0 0 2px rgba(255,255,255,.35)) drop-shadow(0 0 6px rgba(255,63,164,.9)) drop-shadow(0 0 18px rgba(255,63,164,.5));
}
body.playing .pyr_box { opacity: 1; }
.pyr { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; visibility: hidden; }
.pyr.ready { visibility: visible; }
.pyr_frame, .pyr_emo {
  position: absolute;
  left: 0;
  top: 0;
  width: 54px;
  height: 46.77px;
  transform-origin: 0 0;
}
/* the edge only, a soft neon tube bent round at the corners (an svg stroke as a mask), a little blurred */
.pyr_frame {
  background: #ffd1ea;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 54 46.77'%3E%3Cpath d='M23.99 8.05 Q27.00 2.86 30.01 8.05 L48.65 40.28 Q51.66 45.47 45.66 45.47 L8.34 45.47 Q2.34 45.47 5.35 40.28 Z' fill='none' stroke='%23000' stroke-width='2.6' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 54 46.77'%3E%3Cpath d='M23.99 8.05 Q27.00 2.86 30.01 8.05 L48.65 40.28 Q51.66 45.47 45.66 45.47 L8.34 45.47 Q2.34 45.47 5.35 40.28 Z' fill='none' stroke='%23000' stroke-width='2.6' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  filter: blur(.5px);
}
.pyr_emo {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 8px;
  box-sizing: border-box;
  font: 19px/1 "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}
.pyr_base { font-size: 11px; letter-spacing: -1px; padding-bottom: 11px; }
@media screen and (max-width: 710px) {
  .pyr_box { top: calc(10px + env(safe-area-inset-top)); right: calc(4px + env(safe-area-inset-right)); }
}

/* the logo leads to the lobby (lobby.php), once it shows */
a.pyr_box { display: block; }
body.playing a.pyr_box { pointer-events: auto; cursor: pointer; }
