@font-face {
  font-family: 'Palm Beach';
  src: url('/fonts/PalmBeach.ttf') format('truetype');
  font-display: swap;
}

:root {
  --bg: #141414;
  --surface: #1c1c1c;
  --surface-2: #2b2b2b;
  --line: #3a3a3a;
  --text: #ffffff;
  --muted: #b3b3b3;
  --dim: #808080;
  --pink: #f45b8a;
  --pink-dark: #d63f6f;
  --rose: #ee6fae;
  --peach: #f7a35c;
  --sunset: linear-gradient(100deg, var(--pink) 0%, var(--rose) 45%, var(--peach) 100%);
  --yellow: #ffd60a;
  --ink: #111111;
  /* Palm Beach only has capitals (its lowercase letters are blank), so titles are uppercased. */
  --title: 'Palm Beach', 'Bangers', 'Impact', system-ui, sans-serif;
  --display: 'Bangers', 'Impact', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --halftone: radial-gradient(rgba(255, 255, 255, 0.07) 1.2px, transparent 1.5px) 0 0 / 7px 7px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

/* --- top nav ------------------------------------------------------------ */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px var(--gutter);
  background: linear-gradient(rgba(0, 0, 0, 0.75), transparent);
  transition: background-color 0.3s;
}
.nav.solid { background-color: var(--bg); }
.logo {
  font-family: var(--title);
  text-transform: uppercase;
  font-size: clamp(14px, 1.8vw, 17px);
  letter-spacing: 1.5px;
  line-height: 1;
  color: var(--pink);
  text-shadow: 2px 2px 0 #000, 3px 3px 0 rgba(255, 214, 10, 0.35);
  white-space: nowrap;
}
.nav nav { display: flex; align-items: center; gap: 16px; }
.nav-left { display: flex; align-items: center; gap: clamp(16px, 3vw, 36px); }
.nav-sections { gap: 20px; }
.nav-sections .nav-link { color: #e5e5e5; }
.hello { color: var(--muted); font-size: 14px; }
.nav-avatar { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 4px; overflow: hidden; background: var(--surface); cursor: pointer; }
.nav-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.nav-avatar:hover, .nav-avatar:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.nav-link { font-size: 14px; color: var(--text); background: none; border: 0; padding: 0; cursor: pointer; }
.nav-link:hover { color: var(--muted); }

/* --- buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 26px;
  border: 0;
  border-radius: 4px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s, transform 0.1s;
  white-space: nowrap;
}
.btn svg { width: 22px; height: 22px; fill: currentColor; flex: none; }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn.white { background: #fff; color: #000; }
.btn.white:hover { background: rgba(255, 255, 255, 0.75); }
.btn.grey { background: rgba(109, 109, 110, 0.7); color: #fff; }
.btn.grey:hover { background: rgba(109, 109, 110, 0.45); }
.btn.pink { background: var(--pink); color: #fff; }
.btn.pink:hover { background: var(--pink-dark); }
.btn.block { width: 100%; }

/* --- comic bits --------------------------------------------------------- */

.stamp {
  position: absolute;
  font-family: var(--display);
  letter-spacing: 1px;
  line-height: 1;
  color: var(--ink);
  background: var(--yellow);
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--pink);
  padding: 6px 10px 3px;
  transform: rotate(-6deg);
  z-index: 2;
}
.burst {
  position: absolute;
  font-family: var(--display);
  letter-spacing: 1px;
  line-height: 1;
  color: #fff;
  background: var(--pink);
  padding: 14px 18px 11px;
  transform: rotate(10deg);
  clip-path: polygon(0 12%, 10% 0, 24% 9%, 40% 0, 54% 9%, 70% 0, 84% 8%, 100% 0, 94% 30%, 100% 52%, 93% 72%, 100% 100%, 78% 92%, 60% 100%, 44% 91%, 26% 100%, 10% 92%, 0 100%, 6% 70%, 0 48%, 6% 28%);
  z-index: 2;
}
.bubble {
  position: relative;
  display: inline-block;
  background: #fff;
  color: var(--ink);
  border-radius: 18px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 15px;
}
.bubble::after {
  content: '';
  position: absolute;
  left: 26px;
  bottom: -12px;
  border: 7px solid transparent;
  border-top: 9px solid #fff;
  border-left: 2px solid transparent;
}

/* --- login -------------------------------------------------------------- */

.login-screen {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 100px 16px 48px;
  background:
    var(--halftone),
    radial-gradient(ellipse at 20% 10%, rgba(244, 91, 138, 0.35), transparent 55%),
    radial-gradient(ellipse 90% 45% at 60% 100%, rgba(247, 163, 92, 0.35), transparent 70%),
    #000;
}
/* Three layers of sunset waves rolling along the bottom, each at its own speed.
   Each layer moves a whole number of tiles per loop, so the animation never jumps. */
.login-screen::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 34vh;
  pointer-events: none;
  background-image:
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 200' preserveAspectRatio='none'><path fill='%23f45b8a' fill-opacity='.85' d='M0 100C240 40 480 40 720 100S1200 160 1440 100V200H0Z'/></svg>"),
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 200' preserveAspectRatio='none'><path fill='%23ee6fae' fill-opacity='.55' d='M0 100C240 40 480 40 720 100S1200 160 1440 100V200H0Z'/></svg>"),
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 200' preserveAspectRatio='none'><path fill='%23f7a35c' fill-opacity='.4' d='M0 100C240 40 480 40 720 100S1200 160 1440 100V200H0Z'/></svg>");
  background-repeat: repeat-x;
  background-size: 1440px 45%, 1100px 70%, 1700px 100%;
  background-position: 0 100%, 300px 100%, 800px 100%;
  animation: waves 60s linear infinite;
}
@keyframes waves {
  to { background-position: -2880px 100%, 1400px 100%, -900px 100%; }
}
.login-card {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  padding: 48px clamp(20px, 6vw, 56px) 24px;
  background: rgba(0, 0, 0, 0.78);
  border-radius: 6px;
}
.login-card .burst { top: -22px; right: -14px; font-size: 18px; }
.login-card h1 {
  font-family: var(--title);
  text-transform: uppercase;
  font-weight: 400;
  font-size: clamp(24px, 5vw, 30px);
  letter-spacing: 1.5px;
  line-height: 1;
  margin: 22px 0 10px;
}
.login-card p { margin: 0 0 22px; color: var(--muted); }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.field input {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  border: 1px solid #555;
  border-radius: 4px;
  background: rgba(22, 22, 22, 0.8);
  font-size: 17px;
}
.field input:focus { border-color: #fff; outline: none; }
.field input.code { font-family: var(--display); font-size: 32px; letter-spacing: 12px; text-align: center; }
.login-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.linkish { background: none; border: 0; padding: 0; color: var(--muted); font-size: 14px; cursor: pointer; }
.linkish:hover { color: #fff; text-decoration: underline; }
.msg { min-height: 1.5em; margin-top: 16px; font-size: 14px; color: var(--muted); }
.msg.error { color: #ff6b6b; }

/* --- billboard ---------------------------------------------------------- */

.billboard {
  position: relative;
  min-height: clamp(460px, 56.25vw, 86vh);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #000;
}
.billboard-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.billboard-video { opacity: 0; transition: opacity 0.8s; }
.billboard-video.playing { opacity: 1; }
.billboard-mute {
  position: absolute;
  z-index: 2;
  right: var(--gutter);
  bottom: clamp(48px, 9vw, 120px);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}
.billboard-mute:hover { border-color: #fff; background: rgba(255, 255, 255, 0.15); }
.billboard::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    var(--halftone),
    linear-gradient(77deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.45) 40%, transparent 75%),
    linear-gradient(to top, var(--bg) 0%, rgba(20, 20, 20, 0) 30%);
}
.billboard-copy {
  position: relative;
  z-index: 2;
  width: min(640px, 100%);
  padding: 0 var(--gutter) clamp(48px, 9vw, 120px);
}
.eyebrow { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: 4px; color: var(--muted); text-transform: uppercase; }
.eyebrow b { font-family: var(--display); font-weight: 400; font-size: 28px; letter-spacing: 0; color: var(--pink); line-height: 1; text-shadow: 2px 2px 0 #000; }
.billboard h1 {
  font-family: var(--title);
  text-transform: uppercase;
  font-weight: 400;
  font-size: clamp(20px, 2.6vw, 30px);
  line-height: 1;
  letter-spacing: 1px;
  margin: 10px 0 12px;
  text-shadow: 4px 4px 0 #000, 7px 7px 0 var(--pink);
}
.billboard p { margin: 0 0 22px; font-size: clamp(16px, 1.6vw, 20px); text-shadow: 1px 1px 2px #000; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.resume-line { display: flex; align-items: center; gap: 12px; margin-top: 16px; font-size: 14px; color: var(--muted); }
.resume-line .track { width: 160px; }
.closes { margin-top: 14px; font-size: 14px; color: var(--muted); }
.closes b { color: var(--yellow); font-weight: 600; }

/* --- shelves ------------------------------------------------------------ */

.content { padding: 0 0 64px; position: relative; z-index: 3; margin-top: -24px; }
.shelf-title {
  font-weight: 700;
  font-size: clamp(20px, 2vw, 24px);
  margin: 0 0 14px;
}
.shelf-title small { font-weight: 400; font-size: 15px; color: var(--muted); margin-left: 10px; }

.track { height: 4px; background: #4d4d4d; border-radius: 2px; overflow: hidden; }
.track > i { display: block; height: 100%; background: var(--pink); }

.episode-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.ep {
  display: grid;
  grid-template-columns: 48px minmax(160px, 260px) 1fr;
  align-items: center;
  gap: 20px;
  padding: 22px 18px;
  border-bottom: 1px solid var(--line);
  border-radius: 4px;
  transition: background-color 0.15s;
}
.ep.open:hover { background: var(--surface-2); }
.ep-num { font-size: 40px; color: var(--muted); text-align: center; }
.thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface-2);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .track { position: absolute; left: 8px; right: 8px; bottom: 8px; }
.thumb .play-icon {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.15s;
}
.thumb .play-icon svg { width: 20px; height: 20px; fill: #fff; margin-left: 3px; }
.ep.open:hover .play-icon, .thumb:focus-visible .play-icon { opacity: 1; }
.thumb .stamp { right: 8px; bottom: 12px; font-size: 18px; }
.thumb .burst { top: 6px; left: 6px; font-size: 15px; padding: 10px 13px 8px; transform: rotate(-8deg); }
.mystery {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--halftone), repeating-linear-gradient(135deg, #262626 0 14px, #1e1e1e 14px 28px);
  font-family: var(--display);
  font-size: 56px;
  letter-spacing: 4px;
  color: var(--yellow);
  text-shadow: 3px 3px 0 var(--pink);
}
.ep-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 6px; }
.ep h3 { margin: 0; font-size: 18px; font-weight: 700; }
.ep-meta { color: var(--muted); font-size: 14px; white-space: nowrap; }
.ep p { margin: 0; color: var(--muted); font-size: 15px; }
.ep .veil { filter: blur(5px); user-select: none; -webkit-user-select: none; cursor: help; }
.ep.locked h3 { opacity: 0.85; }
.ep.locked .thumb { filter: grayscale(0.4); }
.countdown { display: inline-block; margin-top: 10px; font-weight: 600; font-size: 15px; color: var(--yellow); }

/* --- rows of cards -------------------------------------------------------- */

.row { margin-bottom: 40px; scroll-margin-top: 90px; }
.row-title { margin: 0 var(--gutter) 10px; font-size: clamp(18px, 1.8vw, 22px); font-weight: 700; }
.row-cards {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter);
  padding: 10px var(--gutter) 16px;
  scrollbar-width: none;
}
.row-cards::-webkit-scrollbar { display: none; }
.card {
  flex: 0 0 clamp(220px, 24vw, 320px);
  scroll-snap-align: start;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: var(--surface);
  color: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card .thumb { border-radius: 0; }
.card:hover, .card:focus-visible { transform: scale(1.05); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6); }
.card:hover .play-icon, .card:focus-visible .play-icon { opacity: 1; }
.card.locked .thumb { filter: grayscale(0.6); }
.card-body { padding: 10px 12px 12px; }
.card-kicker { font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--pink); }
.card-title { margin-top: 2px; font-weight: 700; font-size: 15px; }
.card-meta { margin-top: 4px; color: var(--muted); font-size: 13px; }

/* On the home page the episodes are a vertical list, with room for each description. */
.row > .episode-list { margin: 0 var(--gutter); max-width: 1100px; }
.row > .episode-list .ep p { max-width: 62ch; line-height: 1.5; }

/* --- details dialog ------------------------------------------------------- */

.details {
  width: min(860px, calc(100% - 24px));
  max-height: calc(100% - 48px);
  margin: 24px auto;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  overflow-y: auto;
}
.details::backdrop { background: rgba(0, 0, 0, 0.7); }
.details-hero { position: relative; aspect-ratio: 16 / 8; background: #000; display: flex; align-items: flex-end; }
.details-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, var(--surface) 0%, rgba(28, 28, 28, 0) 55%);
}
.details-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.details-close {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}
.details-hero-copy { position: relative; z-index: 2; padding: 0 clamp(20px, 5vw, 48px) 20px; }
.details-title {
  font-family: var(--title);
  text-transform: uppercase;
  font-weight: 400;
  font-size: clamp(22px, 3.4vw, 36px);
  line-height: 1;
  margin: 0 0 16px;
}
.details-body { padding: 4px clamp(20px, 5vw, 48px) 32px; }
.details-meta { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.details-body > p { margin: 0 0 24px; }
.details .shelf-title { margin-top: 8px; }

.closed-screen { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 24px; background: var(--halftone), #000; }
.closed-screen h1 { font-family: var(--title); text-transform: uppercase; font-weight: 400; font-size: clamp(32px, 6.5vw, 56px); letter-spacing: 2px; margin: 0; text-shadow: 5px 5px 0 var(--pink); }
.closed-screen p { color: var(--muted); }

.footer { padding: 0 var(--gutter) 40px; color: var(--dim); font-size: 13px; }

/* --- watch -------------------------------------------------------------- */

body.theater { background: #000; overflow: hidden; }
.player {
  position: fixed;
  inset: 0;
  background: #000;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.player video { width: 100%; height: 100%; object-fit: contain; }
.player.hide-ui { cursor: none; }
.player.hide-ui .player-top, .player.hide-ui .controls { opacity: 0; pointer-events: none; }

.player-top {
  position: absolute;
  inset: 0 0 auto;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px var(--gutter) 40px;
  background: linear-gradient(rgba(0, 0, 0, 0.7), transparent);
  transition: opacity 0.3s;
}
.back { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; }
.back:hover { background: rgba(255, 255, 255, 0.12); }
.back svg { width: 30px; height: 30px; fill: #fff; }
.now-kicker { font-size: 13px; letter-spacing: 3px; color: var(--muted); text-transform: uppercase; }
.now-title { font-family: var(--title); text-transform: uppercase; font-weight: 400; letter-spacing: 1.2px; font-size: clamp(17px, 2.2vw, 24px); line-height: 1.05; margin: 0; }

.watermark {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  font-size: clamp(11px, 1.4vw, 16px);
  color: rgba(255, 255, 255, 0.3);
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
  transition: top 1.5s ease, left 1.5s ease;
}

.big-play {
  position: absolute;
  z-index: 4;
  inset: 0;
  margin: auto;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  border: 0;
  background: var(--pink);
  color: #fff;
  font-family: var(--display);
  font-size: 30px;
  letter-spacing: 1px;
  box-shadow: 5px 5px 0 #000, 5px 5px 0 2px var(--yellow);
  cursor: pointer;
  transition: transform 0.15s;
}
.big-play:hover { transform: scale(1.06); }

.next-card {
  position: absolute;
  z-index: 6;
  right: clamp(16px, 3vw, 40px);
  bottom: clamp(110px, 14vh, 150px);
  width: min(360px, calc(100% - 32px));
  padding: 18px 20px 20px;
  border-radius: 8px;
  background: rgba(20, 20, 20, 0.92);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}
.next-kicker { font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--pink); }
.next-title { margin-top: 4px; font-size: 18px; font-weight: 700; }
.next-sub { margin-top: 4px; color: var(--muted); font-size: 14px; }
.next-sub:empty { display: none; }
.next-actions { display: flex; gap: 10px; margin-top: 14px; }
.next-actions .btn { flex: 1; font-size: 16px; padding: 8px 14px; }

.splash {
  position: absolute;
  z-index: 5;
  top: 22%;
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  font-family: var(--display);
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: 1px;
  color: var(--ink);
  background: var(--yellow);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--pink);
  padding: 6px 18px 3px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.splash.show { opacity: 1; }

.controls {
  position: absolute;
  inset: auto 0 0;
  z-index: 4;
  padding: 48px var(--gutter) 18px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  transition: opacity 0.3s;
}
.seek-row { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.seek {
  flex: 1;
  appearance: none;
  -webkit-appearance: none;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--pink) var(--pct, 0%), rgba(255, 255, 255, 0.3) var(--pct, 0%));
  cursor: pointer;
  transition: height 0.1s;
}
.seek:hover { height: 8px; }
.seek::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--pink); border: 0; }
.seek::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--pink); border: 0; }
.time { font-size: 14px; font-variant-numeric: tabular-nums; color: #ddd; white-space: nowrap; }
.ctrl-row { display: flex; align-items: center; gap: clamp(4px, 1.5vw, 18px); }
.ctrl {
  flex: none;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  cursor: pointer;
  transition: transform 0.1s;
}
.ctrl:hover { transform: scale(1.18); }
.ctrl svg { width: 30px; height: 30px; fill: #fff; }
.vol { width: 90px; accent-color: var(--pink); }
.ctrl-title { flex: 1; text-align: center; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctrl-title span { color: var(--muted); font-weight: 400; }

.loading, .error-screen { position: fixed; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; }
.loading { font-family: var(--display); font-size: 28px; letter-spacing: 1.5px; color: var(--muted); }
.error-screen { background: var(--halftone), #000; }
.error-screen h1 { font-family: var(--title); text-transform: uppercase; font-weight: 400; font-size: clamp(30px, 6vw, 50px); letter-spacing: 2px; margin: 0 0 8px; text-shadow: 5px 5px 0 var(--pink); }
.error-screen p { color: var(--muted); margin: 0 0 24px; }

/* --- admin -------------------------------------------------------------- */

.page { padding: 110px var(--gutter) 64px; }
.page-intro { color: var(--muted); margin: -4px 0 22px; font-size: 14px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { font-family: var(--display); font-weight: 400; letter-spacing: 1px; font-size: 18px; color: var(--muted); }
tbody tr:hover { background: var(--surface); }
td .track { width: 130px; margin: 6px 0; }
.dim { color: var(--dim); font-size: 13px; }

/* --- welcome page --------------------------------------------------------- */

.lobby { padding-top: 100px; }
.lobby-intro { padding: 0 var(--gutter); max-width: 760px; margin-bottom: 28px; }
.lobby-hello {
  font-family: var(--title);
  text-transform: uppercase;
  font-weight: 400;
  font-size: clamp(20px, 2.6vw, 30px);
  line-height: 1;
  margin: 0 0 6px;
}
.lobby-intro p { margin: 0; color: var(--muted); font-size: clamp(16px, 1.5vw, 18px); line-height: 1.5; }

.feature {
  position: relative;
  display: block;
  max-width: 1100px;
  min-height: 320px;
  aspect-ratio: 21 / 9;
  margin: 0 var(--gutter) 44px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--halftone), var(--surface);
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
}
.feature:hover, .feature:focus-visible { transform: scale(1.01); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6); }
.feature-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(77deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 55%, transparent 85%);
}
.feature .burst { top: 18px; right: 18px; font-size: 18px; }
.feature-copy { position: absolute; left: 0; bottom: 0; z-index: 2; max-width: 560px; padding: clamp(20px, 4vw, 40px); }
.feature-kicker { font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--pink); }
.feature-title {
  font-family: var(--title);
  text-transform: uppercase;
  font-weight: 400;
  font-size: clamp(18px, 2.3vw, 27px);
  line-height: 1;
  margin: 4px 0 8px;
}
.feature-copy p { margin: 0 0 18px; text-shadow: 1px 1px 2px #000; }

.tips {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  max-width: 1100px;
  margin: 0 var(--gutter);
  padding: 0;
}
.tips li { padding: 18px; border-radius: 6px; background: var(--surface); color: var(--muted); font-size: 15px; line-height: 1.5; }
.tips b { display: block; margin-bottom: 2px; color: var(--text); }
.tip-icon { display: block; margin-bottom: 8px; font-size: 26px; line-height: 1; }

.joke {
  flex: 0 0 clamp(200px, 22vw, 280px);
  aspect-ratio: 16 / 9;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  border-radius: 6px;
  background: var(--halftone), repeating-linear-gradient(135deg, #262626 0 14px, #1e1e1e 14px 28px);
  color: var(--muted);
  font-size: 14px;
}
.joke b { font-family: var(--display); font-weight: 400; font-size: 22px; letter-spacing: 1px; color: var(--yellow); text-shadow: 2px 2px 0 var(--pink); }

/* News feed: a column on the right on wide screens, below everything on smaller ones. */
.lobby-layout { display: grid; grid-template-columns: minmax(0, 1fr); }
.lobby-main { min-width: 0; }
@media (min-width: 1000px) {
  .lobby-layout { grid-template-columns: minmax(0, 1fr) clamp(380px, 30vw, 460px); align-items: start; }
  .news { position: sticky; top: 84px; max-height: calc(100vh - 110px); margin: 0 var(--gutter) 0 0; }
}
.news {
  display: flex;
  flex-direction: column;
  max-height: 70vh;
  margin: 0 var(--gutter) 40px;
  padding: 18px 0 8px;
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}
.news .row-title { margin: 0 18px 12px; }
.news-live {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 18px 12px;
  padding: 10px 12px;
  border-radius: 6px;
  background: rgba(244, 91, 138, 0.12);
  font-size: 14px;
  font-weight: 600;
  min-height: 44px;
}
.news-live-badge {
  flex: none;
  padding: 3px 7px;
  border-radius: 4px;
  background: var(--pink);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  animation: live 1.6s ease-in-out infinite;
}
@keyframes live { 50% { opacity: 0.55; } }
.news-live-text.in { animation: news-in 0.5s ease-out; }
@keyframes news-in { from { opacity: 0; transform: translateY(6px); } }
/* min-height: 0 lets the list shrink inside the panel and scroll, instead of the panel cutting it off. */
.news-list { flex: 1; min-height: 0; list-style: none; margin: 0; padding: 0 18px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.news-item { padding: 14px 0; border-top: 1px solid var(--line); }
.news-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; color: var(--dim); font-size: 12px; }
.news-tag { padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text); font-weight: 600; }
.news-tag.surf { background: rgba(46, 196, 182, 0.18); color: #7fe3d9; }
.news-tag.documentario { background: rgba(247, 163, 92, 0.18); color: var(--peach); }
.news-tag.food { background: rgba(255, 214, 10, 0.16); color: var(--yellow); }
.news-item h3 { margin: 0 0 4px; font-size: 15px; font-weight: 700; line-height: 1.35; }
.news-item p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.news-empty { padding: 14px 0; color: var(--dim); font-size: 14px; text-align: center; }

/* --- intro ---------------------------------------------------------------- */

.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #000;
  cursor: pointer;
  transition: opacity 0.4s;
}
.intro.done { opacity: 0; }
.intro-w { position: relative; width: min(40vw, 260px); opacity: 0; }
.intro.play .intro-w { animation: intro-w 2.8s cubic-bezier(0.6, 0, 0.4, 1) forwards; }
@keyframes intro-w {
  0% { opacity: 0; transform: scale(0.55); filter: blur(10px); }
  18% { opacity: 1; transform: scale(1); filter: blur(0) drop-shadow(0 0 0 rgba(244, 91, 138, 0)); }
  48% { transform: scale(1.06); filter: drop-shadow(0 0 32px rgba(244, 91, 138, 0.85)); }
  60% { opacity: 1; transform: scale(1.06); }
  100% { opacity: 0; transform: scale(16); filter: drop-shadow(0 0 32px rgba(244, 91, 138, 0.85)); }
}

/* Light ribbons in the sunset colours that tear across the screen as we dive into the W. */
.intro-ribbons { position: absolute; inset: 0; display: flex; justify-content: center; pointer-events: none; }
.intro-ribbons i {
  --colour: var(--pink);
  width: 2.4vw;
  height: 100%;
  opacity: 0;
  transform: scaleY(0);
  background: linear-gradient(transparent, var(--colour) 30%, var(--colour) 70%, transparent);
  filter: blur(1px);
}
.intro-ribbons i:nth-child(1) { --x: -44vw; --colour: var(--peach); }
.intro-ribbons i:nth-child(2) { --x: -32vw; --colour: var(--rose); }
.intro-ribbons i:nth-child(3) { --x: -21vw; --colour: var(--yellow); }
.intro-ribbons i:nth-child(4) { --x: -10vw; --colour: var(--pink); }
.intro-ribbons i:nth-child(5) { --x: 0vw; --colour: #fff; }
.intro-ribbons i:nth-child(6) { --x: 10vw; --colour: var(--pink); }
.intro-ribbons i:nth-child(7) { --x: 21vw; --colour: var(--yellow); }
.intro-ribbons i:nth-child(8) { --x: 32vw; --colour: var(--rose); }
.intro-ribbons i:nth-child(9) { --x: 44vw; --colour: var(--peach); }
.intro.play .intro-ribbons i { animation: ribbon 1.2s ease-out 1.65s forwards; }
.intro.play .intro-ribbons i:nth-child(odd) { animation-delay: 1.75s; }
@keyframes ribbon {
  0% { opacity: 0; transform: translateX(0) scaleY(0); }
  30% { opacity: 0.9; }
  100% { opacity: 0; transform: translateX(var(--x)) scaleY(1) scaleX(2.5); }
}

/* --- profile icons -------------------------------------------------------- */

.profiles {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px var(--gutter) 60px;
  text-align: center;
}
.profiles-title {
  font-family: var(--title);
  text-transform: uppercase;
  font-weight: 400;
  font-size: clamp(20px, 2.6vw, 30px);
  line-height: 1;
  margin: 0 0 10px;
}
.profiles-sub { max-width: 520px; margin: 0 0 32px; color: var(--muted); font-size: clamp(15px, 1.4vw, 17px); line-height: 1.5; }
.avatar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 130px));
  justify-content: center;
  gap: clamp(12px, 2vw, 24px);
  width: min(820px, 100%);
  margin-bottom: 32px;
}
.avatar-choice {
  aspect-ratio: 1;
  padding: 0;
  border: 3px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}
.avatar-choice img { display: block; width: 100%; height: 100%; object-fit: cover; }
.avatar-choice:hover, .avatar-choice:focus-visible { transform: scale(1.06); border-color: #fff; outline: none; }
.avatar-choice.current { border-color: var(--pink); }

/* --- small screens ------------------------------------------------------ */

@media (max-width: 760px) {
  .lobby { padding-top: 80px; }
  .feature { aspect-ratio: auto; min-height: 380px; }
  .hello, .nav .nav-sections { display: none; }
  .billboard { min-height: 74vh; }
  .billboard::before {
    background: var(--halftone), linear-gradient(to top, var(--bg) 12%, rgba(20, 20, 20, 0.85) 50%, rgba(0, 0, 0, 0.2) 85%);
  }
  .btn { flex: 1; padding: 8px 16px; }
  .ep { grid-template-columns: 1fr; gap: 12px; padding: 18px 0; }
  .ep.open:hover { background: none; }
  .ep-num { display: none; }
  .ep-head { flex-direction: column; gap: 2px; }
  .vol, .ctrl-title { display: none; }
  .ctrl-row { justify-content: space-between; }
  .ctrl { width: 42px; height: 42px; }
  .ctrl svg { width: 26px; height: 26px; }
  .big-play { width: 88px; height: 88px; font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .login-screen::after { animation: none; }
  .news-live-badge, .news-live-text.in { animation: none; }
}

/* --- title colour --------------------------------------------------------- */

/* The sunset gradient from the title artwork, painted inside the letters. */
.logo, .login-card h1, .billboard h1, .lobby-hello, .feature-title, .profiles-title, .details-title, .now-title, .closed-screen h1, .error-screen h1 {
  background: var(--sunset);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.55));
  /* The palm-leaf letters stand about 0.2em taller than the font says, and the gradient only
     paints inside the box, so the extra top padding keeps their tops from being cut off. */
  padding: 0.25em 0.08em 0.05em;
}
