/* ============================================================
   MURDER MOVIE CLUB — v2 design tokens
   Same club, new set. The SMPTE bars stay exactly as they were;
   what changed is the hardware. v1 was a broadcast slate: square
   corners, hard rules, everything butted edge to edge. v2 is the
   signal itself — soft phosphor bloom, rounded glass panels that
   float over an inky studio, and one colour ramp reused as the
   thread through the whole thing.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@62..125,400..900&family=Archivo+Black&family=Martian+Mono:wght@300..700&family=Manrope:wght@400..800&display=swap');

:root {
  /* ---- base ---- */
  --bg: #0A0A0C;
  --bg-lift: #101015;
  --panel: rgba(255,255,255,0.042);
  --panel-2: rgba(255,255,255,0.072);
  --panel-3: rgba(255,255,255,0.11);
  --panel-solid: #15151A;

  /* legacy aliases — old class names still reach for these */
  --surface: var(--panel);
  --surface-2: var(--panel-2);
  --surface-3: var(--panel-3);

  --border: rgba(237,234,227,0.09);
  --border-hot: rgba(237,234,227,0.22);

  --text: #EDEAE3;      /* bone */
  --text-dim: #98948C;  /* ash */

  /* ---- SMPTE bars — unchanged from v1 ---- */
  --bar-white:   #E8E7E2;
  --bar-yellow:  #E8CF3A;
  --bar-cyan:    #22C4D6;
  --bar-green:   #37BC6B;
  --bar-magenta: #C93E9B;
  --bar-red:     #E23B2E;
  --bar-blue:    #3A5FE0;

  --accent: var(--bar-red);
  --accent-dim: #7E1F17;
  --accent-2: var(--bar-cyan);

  --spectrum: linear-gradient(90deg,
    var(--bar-white) 0%, var(--bar-yellow) 17%, var(--bar-cyan) 33%,
    var(--bar-green) 50%, var(--bar-magenta) 67%, var(--bar-red) 83%, var(--bar-blue) 100%);

  --font-display: 'Archivo', 'Archivo Black', sans-serif;
  --font-black: 'Archivo Black', sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  --font-mono: 'Martian Mono', ui-monospace, monospace;

  /* ---- the whole point of v2 ---- */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;
  --radius-xl: 34px;
  --pill: 999px;

  --shadow-1: 0 2px 8px rgba(0,0,0,0.35);
  --shadow-2: 0 14px 40px -16px rgba(0,0,0,0.85);
  --shadow-3: 0 30px 80px -28px rgba(0,0,0,0.95);

  --ease: cubic-bezier(0.22, 0.7, 0.28, 1);
  --max-width: 1400px;
}

/* legacy alias — a few rules still say var(--radius-sm) expecting "small" */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background:
    radial-gradient(1100px 620px at 78% -8%, rgba(34,196,214,0.055), transparent 62%),
    radial-gradient(900px 520px at 6% 4%, rgba(226,59,46,0.055), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
}

/* SCANLINES — the one bit of texture. 2.5% opacity, fixed, inert.
   It's what makes glass panels read as a monitor instead of an app. */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 400;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.028) 0px, rgba(255,255,255,0.028) 1px,
    transparent 1px, transparent 3px
  );
  mix-blend-mode: overlay;
}

a { color: var(--bar-cyan); text-decoration: none; transition: color 0.15s var(--ease); }
a:hover { color: var(--text); text-decoration: none; }

:focus-visible { outline: 2px solid var(--bar-cyan); outline-offset: 3px; border-radius: var(--radius-xs); }

img { max-width: 100%; display: block; }

.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 32px; }

/* ============================================================
   TYPE
   Archivo stays — it's the logo's own letterform — but the width
   axis is dialled back from 125% to ~108% and the tracking opened
   up. Same voice, stops shouting. Manrope replaces Inter for body:
   rounder terminals, so paragraphs sit with the new radii.
   ============================================================ */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 108%;
  text-transform: uppercase;
  letter-spacing: -0.012em;
  line-height: 0.98;
  margin: 0 0 0.42em;
  color: var(--text);
}
h1 { font-size: clamp(2.6rem, 6.6vw, 5.2rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); letter-spacing: -0.02em; }
h3 { font-size: 1.05rem; font-stretch: 100%; letter-spacing: 0.005em; }
p { margin: 0 0 1em; color: var(--text-dim); }

/* EYEBROW → tally light. A live red dot in a soft capsule. Reads as
   "recording" without anyone having to write the word. */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 12px;
  padding: 6px 14px 6px 11px;
  border-radius: var(--pill);
  background: var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(226,59,46,0.6);
  animation: tally 2.6s ease-out infinite;
  flex-shrink: 0;
}
@keyframes tally {
  0%   { box-shadow: 0 0 0 0 rgba(226,59,46,0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(226,59,46,0); }
  100% { box-shadow: 0 0 0 0 rgba(226,59,46,0); }
}

/* ============================================================
   SIGNAL RAIL — v1's diagonal bar tape, re-cut. The bars are the
   same seven colours in the same order; they're now a rounded
   capsule with its own bloom underneath, floating in space
   instead of butting into the content above and below.
   ============================================================ */
.tape {
  position: relative;
  height: 46px;
  width: 100%;
  background: none;
  animation: none;
  overflow: visible;
}
.tape::before, .tape::after {
  content: "";
  position: absolute;
  top: 50%;
  left: max(32px, calc(50% - (var(--max-width) / 2) + 32px));
  right: max(32px, calc(50% - (var(--max-width) / 2) + 32px));
  transform: translateY(-50%);
  border-radius: var(--pill);
  background: repeating-linear-gradient(
    -68deg,
    var(--bar-white)   0 22px,
    var(--bar-yellow)  22px 44px,
    var(--bar-cyan)    44px 66px,
    var(--bar-green)   66px 88px,
    var(--bar-magenta) 88px 110px,
    var(--bar-red)     110px 132px,
    var(--bar-blue)    132px 154px
  );
  background-size: 166px 166px;
  animation: tape-drift 11s linear infinite;
}
.tape::before { height: 7px; z-index: 2; }
.tape::after  { height: 7px; filter: blur(11px); opacity: 0.6; z-index: 1; }
@keyframes tape-drift { to { background-position: 166px 0; } }
@media (prefers-reduced-motion: reduce) { .tape::before, .tape::after { animation: none; } }

.tape.thin { height: 26px; }
.tape.thin::before, .tape.thin::after { height: 4px; }
.tape.smooth::before { background: var(--spectrum); animation: none; }
.tape.smooth::after  { background: var(--spectrum); animation: none; }

/* ============================================================
   NAV — a floating glass capsule. Nothing is butted to the edge
   of the viewport any more.
   ============================================================ */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  padding: 14px 24px 12px;
  background: linear-gradient(to bottom, var(--bg) 30%, rgba(10,10,12,0.72) 72%, transparent);
  border-bottom: none;
  backdrop-filter: none;
}
.site-nav .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
  max-width: calc(var(--max-width) - 16px);
  padding: 9px 10px 9px 18px;
  border-radius: var(--pill);
  background: rgba(21,21,26,0.72);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: var(--shadow-2);
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px; flex-shrink: 0;
  border-radius: 9px;
  transition: transform 0.3s var(--ease);
}
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.06); }
.brand-text {
  font-family: var(--font-display);
  font-weight: 800; font-stretch: 104%;
  font-size: 0.86rem;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
}
.nav-links {
  display: flex; gap: 3px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px;
  border-radius: var(--pill);
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  color: var(--text-dim);
  padding: 9px 15px;
  border-radius: var(--pill);
  white-space: nowrap;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.nav-links a:hover { color: var(--text); background: var(--panel-2); }
.nav-links a.active {
  color: #0A0A0C;
  background: var(--accent);
  box-shadow: 0 4px 18px -4px rgba(226,59,46,0.7);
}

@media (max-width: 780px) {
  .site-nav { padding: 10px 14px 8px; }
  .site-nav .wrap {
    flex-direction: column; align-items: stretch; gap: 10px;
    border-radius: var(--radius-lg);
    padding: 14px;
  }
  .brand-text { font-size: 0.78rem; }
  .nav-links { font-size: 0.58rem; justify-content: flex-start; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  padding: 88px 32px 84px;
  overflow: hidden;
}
/* phosphor bloom instead of v1's ghosted mark cut off at the edge */
.hero::before {
  content: "";
  position: absolute;
  top: -18%; right: -6%;
  width: 620px; height: 620px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 42% 40%, rgba(226,59,46,0.16), transparent 58%),
    radial-gradient(circle at 66% 62%, rgba(34,196,214,0.14), transparent 60%);
  filter: blur(52px);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  top: 50%; right: -4%;
  width: 420px; height: 420px;
  transform: translateY(-50%);
  background: url("../assets/mmc-mark.png") no-repeat center / contain;
  opacity: 0.045;
  pointer-events: none;
}
.hero .wrap { max-width: 920px; position: relative; z-index: 2; }
.hero-h1 { margin: 0; line-height: 0; }
.hero-lockup { width: min(540px, 82vw); margin: 6px 0 30px; }
.hero .tagline {
  font-size: 1.06rem;
  line-height: 1.62;
  color: var(--text-dim);
  max-width: 520px;
  margin: 0 0 34px;
  padding-left: 18px;
  border-left: none;
  position: relative;
}
.hero .tagline::before {
  content: "";
  position: absolute; left: 0; top: 4px; bottom: 4px;
  width: 3px; border-radius: var(--pill);
  background: var(--spectrum);
  background-size: 100% 300%;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

@media (max-width: 780px) { .hero::after { display: none; } }

/* ============================================================
   BUTTONS — pills. Mono caps labels kept: the type is what makes
   them read as broadcast controls, the shape no longer has to.
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  padding: 13px 24px;
  border-radius: var(--pill);
  border: 1px solid var(--border-hot);
  cursor: pointer;
  background: var(--panel-2);
  color: var(--text);
  backdrop-filter: blur(8px);
  transition: transform 0.16s var(--ease), background 0.16s var(--ease),
              border-color 0.16s var(--ease), box-shadow 0.2s var(--ease), color 0.16s var(--ease);
}
.btn:hover { background: var(--panel-3); border-color: var(--border-hot); transform: translateY(-1px); box-shadow: var(--shadow-1); }
.btn:active { transform: translateY(0); }
.btn.solid {
  background: var(--accent); border-color: transparent; color: #0A0A0C;
  box-shadow: 0 6px 22px -8px rgba(226,59,46,0.85);
}
.btn.solid:hover { background: var(--bar-yellow); box-shadow: 0 8px 26px -8px rgba(232,207,58,0.75); color: #0A0A0C; }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--panel-2); }
.btn.danger { background: var(--bar-red); border-color: transparent; color: #fff; }
.btn:disabled { opacity: 0.28; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.sm { padding: 8px 15px; font-size: 0.6rem; letter-spacing: 0.09em; }

/* ============================================================
   SECTIONS
   ============================================================ */
section { padding: 58px 32px 76px; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 18px; flex-wrap: wrap; margin-bottom: 34px;
  padding-bottom: 20px;
  position: relative;
}
.section-head::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; border-radius: var(--pill);
  background: var(--spectrum);
  opacity: 0.55;
}
.section-head h2 { margin: 0; }
.section-head > a {
  font-family: var(--font-mono); font-size: 0.64rem; font-weight: 600;
  letter-spacing: 0.11em; text-transform: uppercase; white-space: nowrap;
  padding: 9px 16px; border-radius: var(--pill);
  background: var(--panel); border: 1px solid var(--border);
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.section-head > a:hover { background: var(--panel-2); color: var(--text); }

/* ============================================================
   CARDS — rounded, borderless-by-default glass. The v1 "tag"
   spine survives as a colour bar tucked under the poster, so the
   SMPTE channel-coding still reads without a hard 4px edge.
   ============================================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 22px;
}
.card {
  --card-accent: var(--bar-red);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  isolation: isolate;
  transition: transform 0.24s var(--ease), border-color 0.2s var(--ease), box-shadow 0.28s var(--ease);
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hot);
  box-shadow: var(--shadow-3), 0 0 0 1px rgba(255,255,255,0.04);
}
.card .tag {
  position: absolute; left: 14px; right: 14px; bottom: 9px;
  height: 3px; width: auto; top: auto;
  border-radius: var(--pill);
  z-index: 4;
  opacity: 0.85;
  transition: opacity 0.2s var(--ease), transform 0.24s var(--ease);
  transform-origin: left center;
}
.card:hover .tag { opacity: 1; }
.card .poster-wrap {
  position: relative; aspect-ratio: 2/3; overflow: hidden;
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
}
.card .poster {
  width: 100%; height: 100%; object-fit: cover;
  background: var(--panel-2);
  transition: transform 0.5s var(--ease), filter 0.3s var(--ease);
  filter: saturate(0.88);
}
.card:hover .poster { transform: scale(1.06); filter: saturate(1.05); }
.card .poster-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8,8,10,0.94) 0%, rgba(8,8,10,0.25) 58%, transparent 100%);
  opacity: 0; transition: opacity 0.22s var(--ease);
  display: flex; align-items: flex-end; padding: 14px;
}
.card:hover .poster-overlay { opacity: 1; }
.card .poster-overlay .ov-title {
  font-family: var(--font-display); font-weight: 800; font-stretch: 104%;
  text-transform: uppercase; font-size: 0.82rem; line-height: 1.05;
  letter-spacing: -0.005em; color: var(--text);
}
.card .info {
  padding: 13px 15px 18px;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.card .info h3 {
  font-family: var(--font-body); font-weight: 700; font-size: 0.82rem;
  text-transform: none; letter-spacing: -0.008em; line-height: 1.3;
  margin: 0; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card .rating {
  font-family: var(--font-mono); font-size: 0.62rem; font-weight: 600; color: var(--bar-yellow);
  flex-shrink: 0;
}
.card .add-btn {
  position: absolute; top: 10px; right: 10px;
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(10,10,12,0.7);
  color: var(--text); font-size: 1rem; font-weight: 700;
  cursor: pointer; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px);
  z-index: 5;
  opacity: 0; transform: scale(0.85);
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease), background 0.15s var(--ease);
}
.card:hover .add-btn, .card:focus-within .add-btn { opacity: 1; transform: scale(1); }
.card .add-btn:hover { background: var(--accent); border-color: transparent; color: #0A0A0C; }
.card .watched-toggle-btn { top: auto; right: auto; bottom: 46px; left: 10px; }
.card .watched-toggle-btn:hover { background: var(--bar-white); border-color: transparent; color: #0A0A0C; }

.trend-scroll {
  display: flex; gap: 20px; overflow-x: auto;
  padding: 4px 4px 18px; scroll-snap-type: x proximity;
  scrollbar-width: thin; scrollbar-color: var(--panel-3) transparent;
}
.trend-scroll .card { min-width: 168px; flex: 0 0 168px; scroll-snap-align: start; }
.trend-scroll::-webkit-scrollbar { height: 6px; }
.trend-scroll::-webkit-scrollbar-thumb { background: var(--panel-3); border-radius: var(--pill); }

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }
.filter-bar input[type="text"], .filter-bar select,
.mmc-toolbar select, #cal-jump, #cal-search {
  font-family: var(--font-body); font-size: 0.88rem; font-weight: 500;
  padding: 12px 18px; border-radius: var(--pill);
  border: 1px solid var(--border);
  background: var(--panel); color: var(--text);
  backdrop-filter: blur(8px);
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
  appearance: none;
}
.filter-bar input[type="text"] { flex: 1; min-width: 180px; }
.filter-bar select, .mmc-toolbar select, #cal-jump {
  padding-right: 38px;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-dim) 50%),
                    linear-gradient(135deg, var(--text-dim) 50%, transparent 50%);
  background-position: calc(100% - 20px) center, calc(100% - 15px) center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}
.filter-bar input:focus, .filter-bar select:focus,
.mmc-toolbar select:focus, #cal-jump:focus, #cal-search:focus {
  border-color: var(--border-hot); background: var(--panel-2); outline: none;
}
.filter-bar input::placeholder, #cal-search::placeholder { color: var(--text-dim); }
.filter-bar select option, .mmc-toolbar select option, #cal-jump option { background: var(--panel-solid); color: var(--text); }

.mmc-toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }

.results-count {
  font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.07em;
  color: var(--text-dim); margin: -4px 0 24px;
}

/* ============================================================
   MODE TABS — segmented control, now a soft capsule
   ============================================================ */
.mode-tabs {
  display: inline-flex; gap: 2px; margin-bottom: 26px; flex-wrap: wrap;
  padding: 4px;
  border-radius: var(--pill);
  background: var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  width: fit-content;
}
.mode-tab {
  font-family: var(--font-mono); font-size: 0.63rem; font-weight: 600;
  letter-spacing: 0.11em; text-transform: uppercase;
  padding: 10px 20px; border: none;
  border-radius: var(--pill);
  background: transparent; color: var(--text-dim); cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.mode-tab.active {
  background: var(--accent); color: #0A0A0C;
  box-shadow: 0 4px 16px -5px rgba(226,59,46,0.8);
}
.mode-tab:hover:not(.active) { background: var(--panel-2); color: var(--text); }

/* ============================================================
   MODAL
   ============================================================ */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(4,4,5,0.78);
  backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  padding: 22px; z-index: 100;
}
.modal-backdrop.open { display: flex; animation: fade-in 0.2s var(--ease); }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--panel-solid);
  border: 1px solid var(--border-hot);
  color: var(--text);
  max-width: 820px; width: 100%; max-height: 88vh;
  overflow-y: auto; overflow-x: hidden;
  border-radius: var(--radius-lg);
  position: relative;
  box-shadow: var(--shadow-3);
  animation: modal-rise 0.28s var(--ease);
}
@keyframes modal-rise { from { transform: translateY(16px) scale(0.985); opacity: 0; } to { transform: none; opacity: 1; } }
.modal::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--spectrum); z-index: 6;
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  background: rgba(10,10,12,0.72); color: var(--text);
  border: 1px solid rgba(255,255,255,0.14);
  width: 34px; height: 34px; border-radius: 50%;
  cursor: pointer; font-size: 1.05rem; line-height: 1; z-index: 8;
  backdrop-filter: blur(8px);
  transition: background 0.15s var(--ease);
}
.modal-close:hover { background: var(--bar-red); border-color: transparent; color: #fff; }
.modal-hero { position: relative; height: 240px; overflow: hidden; }
.modal-hero img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.85); }
.modal-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, var(--panel-solid) 5%, transparent 78%);
}
.modal-body { padding: 0 30px 30px; margin-top: -68px; position: relative; }
.modal-top { display: flex; gap: 20px; align-items: flex-end; margin-bottom: 16px; }
.modal-top img.poster {
  width: 120px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-hot); flex-shrink: 0;
  box-shadow: var(--shadow-2);
}
.modal-top .modal-title h2 { margin-bottom: 8px; }
.modal-meta {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.05em;
  color: var(--text-dim); display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
}
.modal-meta .rate { color: var(--bar-yellow); font-weight: 600; }

.tag-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0; }
.tag-pill {
  font-family: var(--font-mono); font-size: 0.58rem; font-weight: 600;
  letter-spacing: 0.09em; text-transform: uppercase;
  padding: 5px 12px; border-radius: var(--pill);
  background: var(--panel); border: 1px solid var(--border); color: var(--text-dim);
}

.tabs {
  display: inline-flex; gap: 2px; margin-bottom: 20px;
  padding: 4px; border-radius: var(--pill);
  background: var(--panel); border: 1px solid var(--border);
}
.tab-btn {
  font-family: var(--font-mono); font-size: 0.63rem; font-weight: 600;
  letter-spacing: 0.11em; text-transform: uppercase;
  background: none; border: none; color: var(--text-dim); cursor: pointer;
  padding: 9px 18px; border-radius: var(--pill);
  transition: background 0.16s var(--ease), color 0.16s var(--ease);
}
.tab-btn.active { color: #0A0A0C; background: var(--bar-white); }
.tab-btn:hover:not(.active) { color: var(--text); background: var(--panel-2); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fade-in 0.22s var(--ease); }
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

.media-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.media-row img { width: 240px; border-radius: var(--radius-sm); flex-shrink: 0; }
.trailer-frame {
  position: relative; width: 100%; aspect-ratio: 16/9;
  border-radius: var(--radius); overflow: hidden; margin-bottom: 14px;
  border: 1px solid var(--border);
}
.trailer-frame iframe { width: 100%; height: 100%; border: 0; }

.cast-row { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 10px; }
.cast-card { width: 104px; flex-shrink: 0; }
.cast-card img {
  width: 104px; height: 104px; object-fit: cover;
  border-radius: 50%; margin-bottom: 9px;
  background: var(--panel-2); filter: saturate(0.85);
  border: 1px solid var(--border);
}
.cast-card .name { font-size: 0.76rem; font-weight: 700; line-height: 1.25; }
.cast-card .role { font-size: 0.68rem; color: var(--text-dim); line-height: 1.3; }
.cast-card .role.eps { font-family: var(--font-mono); font-size: 0.58rem; opacity: 0.65; }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  margin: 40px 24px 24px;
  padding: 52px 32px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel);
  backdrop-filter: blur(10px);
}
.footer-lockup { width: 180px; margin: 0 auto 18px; opacity: 0.85; }
.footer-text {
  font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.05em;
  color: var(--text-dim); margin: 0; line-height: 2;
}

/* ============================================================
   NOTICES
   ============================================================ */
.setup-note {
  background: var(--panel);
  border: 1px solid rgba(226,59,46,0.35);
  padding: 16px 22px; border-radius: var(--radius);
  font-family: var(--font-mono); font-size: 0.7rem; line-height: 1.8; margin: 20px 0;
  color: var(--text-dim);
}
.setup-note code { color: var(--bar-yellow); }
.hint {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.04em;
  color: var(--text-dim); margin-top: 10px; opacity: 0.85;
}
.page-intro { max-width: 620px; margin: -10px 0 38px; font-size: 1rem; }

.skeleton {
  background: linear-gradient(100deg, var(--panel-2) 30%, rgba(237,234,227,0.09) 50%, var(--panel-2) 70%);
  background-size: 220% 100%; animation: shimmer 1.5s ease infinite;
}
@keyframes shimmer { 0% { background-position: 140% 0; } 100% { background-position: -140% 0; } }

/* ============================================================
   BADGES
   ============================================================ */
.card-badges { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 5px; z-index: 5; }
.badge {
  font-family: var(--font-mono); font-size: 0.53rem; font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase;
  padding: 5px 10px; border-radius: var(--pill);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-1);
}
.badge-watched { background: var(--bar-white); color: #0A0A0C; }
.badge-tag { background: rgba(10,10,12,0.8); color: var(--bar-yellow); border: 1px solid rgba(232,207,58,0.4); }
.badge-again { background: var(--bar-red); color: #fff; }

/* ============================================================
   WHEEL
   ============================================================ */
body.wheel-page { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.wheel-main {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  padding: 14px 32px 14px;
  max-width: var(--max-width); width: 100%; margin: 0 auto;
}
.wheel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; }
.wheel-head h2 { margin: 0; font-size: clamp(1.3rem, 2.4vw, 1.9rem); }
.wheel-head .eyebrow { margin: 0 0 6px; }

.wheel-layout {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: 310px 1fr 310px;
  gap: 22px; align-items: stretch;
}
.picks-panel { display: flex; flex-direction: column; min-height: 0; }
.picks-panel .picks-list { flex: 1; min-height: 0; max-height: none; }

.wheel-footer {
  font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: 0.06em;
  color: var(--text-dim); text-align: center; padding: 8px 20px 14px;
  opacity: 0.7;
}

.reel-stage { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; min-height: 0; }
.reel-wrap { width: min(46dvh, 480px, 100%); position: relative; aspect-ratio: 1; }

.result-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(4,4,5,0.78);
  backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.result-overlay.show { display: flex; animation: fade-in 0.2s var(--ease); }
.result-overlay .result-card {
  display: block; margin-top: 0;
  max-width: 560px; width: 100%;
  background: var(--panel-solid);
  border: 1px solid var(--border-hot);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-3);
  animation: winner-pop 0.32s cubic-bezier(0.2, 1.1, 0.35, 1);
  position: relative;
  padding: 28px 30px 26px;
  overflow: hidden;
}
.result-overlay .result-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--spectrum);
}
@keyframes winner-pop {
  from { transform: scale(0.9) translateY(16px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
.result-close {
  position: absolute; top: 14px; right: 14px;
  background: rgba(10,10,12,0.7); color: var(--text);
  border: 1px solid rgba(255,255,255,0.14); width: 32px; height: 32px;
  border-radius: 50%; cursor: pointer; font-size: 1rem; line-height: 1;
}
.result-close:hover { background: var(--bar-red); border-color: transparent; color: #fff; }

@media (max-width: 1180px) {
  body.wheel-page { height: auto; overflow: auto; }
  .wheel-main { padding: 26px 20px; }
  .wheel-layout { grid-template-columns: 1fr; gap: 20px; }
  .reel-stage { order: -1; }
  .picks-panel .picks-list { max-height: 300px; }
  .reel-wrap { width: min(420px, 86vw); }
}

.reel-pointer {
  width: 0; height: 0;
  border-left: 13px solid transparent; border-right: 13px solid transparent;
  border-top: 20px solid var(--accent);
  margin-bottom: -8px; z-index: 5;
  filter: drop-shadow(0 3px 10px rgba(226,59,46,0.6));
}
.reel-disc {
  width: 100%; height: 100%; border-radius: 50%; position: relative;
  border: 8px solid rgba(21,21,26,0.9);
  box-shadow:
    0 0 0 1px var(--border-hot),
    0 0 60px -10px rgba(34,196,214,0.25),
    0 30px 70px -24px rgba(0,0,0,0.9);
  transition: transform 4s cubic-bezier(0.15,0.85,0.1,1);
  transform: rotate(0deg);
}
.reel-hub {
  position: absolute; top: 50%; left: 50%; width: 20%; height: 20%;
  transform: translate(-50%, -50%);
  background: var(--bg); border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.1); z-index: 3;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.7);
}
.reel-hub .hub-dot {
  width: 34%; height: 34%; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 14px rgba(226,59,46,0.7);
}
.slice-label {
  position: absolute; font-family: var(--font-mono); font-size: 0.6rem; font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap; max-width: 110px; overflow: hidden; text-overflow: ellipsis;
  pointer-events: none;
}
.reel-empty { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-dim); text-align: center; padding: 40px 20px; }

.result-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }
.result-card h3 { font-size: 1.5rem; margin: 8px 0 4px; }
.result-card-body { display: flex; gap: 18px; align-items: flex-start; text-align: left; margin-top: 10px; }
.result-card-poster { width: 100px; height: 150px; border-radius: var(--radius-sm); overflow: hidden; background: var(--panel-2); flex-shrink: 0; box-shadow: var(--shadow-2); }
.result-card-poster img { width: 100%; height: 100%; object-fit: cover; }
.result-card-info { flex: 1; min-width: 0; }
.result-rating { display: block; font-family: var(--font-mono); font-size: 0.7rem; color: var(--bar-yellow); margin-bottom: 8px; }
.result-overview { font-size: 0.82rem; color: var(--text-dim); margin: 0 0 14px; max-height: 4.8em; overflow: hidden; }
.result-card-actions { display: flex; gap: 7px; flex-wrap: wrap; }

.picks-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}
.picks-panel::before {
  content: ""; position: absolute; top: 0; left: 22px; right: 22px; height: 3px;
  border-radius: var(--pill); background: var(--accent);
}
.results-panel::before { background: var(--bar-cyan); }
.picks-panel h3 { margin-bottom: 14px; }
.picks-list {
  list-style: none; margin: 0 0 14px; padding: 0;
  display: flex; flex-direction: column; gap: 6px;
  max-height: 340px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--panel-3) transparent;
}
.picks-list::-webkit-scrollbar { width: 6px; }
.picks-list::-webkit-scrollbar-thumb { background: var(--panel-3); border-radius: var(--pill); }
.picks-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--panel-2); padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  border-left: 3px solid var(--accent);
  transition: background 0.15s var(--ease);
}
.picks-list li:hover { background: var(--panel-3); }
.picks-list button {
  background: none; border: none; color: var(--text-dim); cursor: pointer;
  font-size: 0.6rem; font-family: var(--font-mono); font-weight: 600;
  letter-spacing: 0.07em; text-transform: uppercase;
  padding: 4px 6px; border-radius: var(--radius-xs);
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.picks-list button:hover { color: var(--bar-red); background: var(--panel-2); }
.picks-list button:disabled { opacity: 0.35; cursor: default; }
.add-manual { display: flex; gap: 6px; margin-top: 6px; }
.add-manual input {
  flex: 1; padding: 11px 16px; border-radius: var(--pill);
  border: 1px solid var(--border); background: var(--panel-2); color: var(--text);
  font-family: var(--font-body); min-width: 0; font-size: 0.85rem;
}
.add-manual input:focus { border-color: var(--border-hot); outline: none; }

.results-panel .picks-list li { border-left-color: var(--bar-cyan); }
.result-item { display: flex; align-items: center; gap: 10px; }
.result-item .result-thumb { width: 34px; height: 51px; border-radius: 6px; overflow: hidden; background: var(--panel); flex-shrink: 0; }
.result-item .result-thumb img { width: 100%; height: 100%; object-fit: cover; }
.result-item .result-info { flex: 1; min-width: 0; }
.result-item .result-title { font-size: 0.79rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-item .result-date { font-size: 0.56rem; color: var(--text-dim); font-family: var(--font-mono); margin-top: 2px; }
.result-item .result-actions { display: flex; gap: 1px; flex-shrink: 0; }
.result-item .result-actions button { font-size: 0.82rem; padding: 3px 5px; }

/* ============================================================
   WATCHED — stats
   ============================================================ */
.watch-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px; margin-bottom: 32px;
  background: none; border: none;
}
.watch-stat {
  font-family: var(--font-mono);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  backdrop-filter: blur(10px);
  position: relative; overflow: hidden;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.watch-stat:hover { border-color: var(--border-hot); transform: translateY(-2px); }
.watch-stat::before {
  content: ""; position: absolute; top: 0; left: 22px; width: 26px; height: 3px;
  border-radius: var(--pill);
}
.watch-stat:nth-child(1)::before { background: var(--bar-red); }
.watch-stat:nth-child(2)::before { background: var(--bar-yellow); }
.watch-stat:nth-child(3)::before { background: var(--bar-cyan); }
.watch-stat:nth-child(4)::before { background: var(--bar-green); }
.watch-stat .num {
  font-family: var(--font-display); font-weight: 800; font-stretch: 112%;
  font-size: 2.6rem; line-height: 1; display: block; margin-bottom: 8px;
  letter-spacing: -0.03em;
  background: var(--spectrum); -webkit-background-clip: text; background-clip: text;
  color: transparent; width: fit-content;
  font-variant-numeric: tabular-nums;
}
.watch-stat .lbl { font-size: 0.58rem; font-weight: 600; letter-spacing: 0.13em; text-transform: uppercase; color: var(--text-dim); }
.watch-stat .sub {
  display: block; margin-top: 8px;
  font-size: 0.56rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-dim); opacity: 0.65;
}

/* ============================================================
   WATCHED — list
   ============================================================ */
.watch-controls {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
}
.watch-list { display: flex; flex-direction: column; gap: 8px; }
.watch-row {
  display: grid; grid-template-columns: 48px 52px 1fr auto auto; align-items: center; gap: 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 20px 12px 16px; cursor: pointer;
  transition: border-color 0.16s var(--ease), background 0.16s var(--ease), transform 0.16s var(--ease);
  position: relative;
}
.watch-row:hover {
  border-color: var(--border-hot);
  background: var(--panel-2);
  transform: translateX(3px);
}
.watch-pos {
  font-family: var(--font-mono); font-weight: 600;
  font-size: 0.8rem; line-height: 1; color: var(--text-dim);
  text-align: center;
  font-variant-numeric: tabular-nums;
  border-right: none;
  padding: 0;
  opacity: 0.6;
}
.watch-row:hover .watch-pos { color: var(--accent); opacity: 1; }
.watch-thumb { width: 52px; height: 78px; border-radius: 9px; overflow: hidden; background: var(--panel-2); flex-shrink: 0; box-shadow: var(--shadow-1); }
.watch-thumb img { width: 100%; height: 100%; object-fit: cover; }
.watch-main { min-width: 0; }
.watch-main .watch-title {
  font-family: var(--font-display); font-weight: 800; font-stretch: 104%;
  text-transform: uppercase; font-size: 0.95rem; line-height: 1.15;
  letter-spacing: -0.012em; margin-bottom: 6px;
}
.watch-main .watch-sub { font-family: var(--font-mono); font-size: 0.62rem; color: var(--text-dim); display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.pill-genre { border: 1px solid var(--border); background: var(--panel-2); border-radius: var(--pill); padding: 3px 10px; }
.pill-rewatch {
  border: 1px solid rgba(34,196,214,0.4); color: var(--bar-cyan);
  border-radius: var(--pill); padding: 3px 10px;
  font-size: 0.58rem; letter-spacing: 0.06em; text-transform: uppercase;
}
.watch-no { font-variant-numeric: tabular-nums; opacity: 0.6; }
.unmark-btn {
  background: var(--panel-2); border: 1px solid var(--border); color: var(--bar-cyan);
  font-family: var(--font-mono); font-size: 0.56rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.07em;
  text-decoration: none; cursor: pointer;
  padding: 3px 10px; border-radius: var(--pill);
}
.unmark-btn:hover { color: var(--bar-red); border-color: rgba(226,59,46,0.4); }
.watch-date { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-dim); text-align: right; white-space: nowrap; }
.watch-rating {
  font-family: var(--font-mono); font-size: 0.82rem; font-weight: 600; color: var(--bar-yellow);
  text-align: center; min-width: 62px;
  background: rgba(232,207,58,0.09);
  border: 1px solid rgba(232,207,58,0.22);
  border-radius: var(--pill);
  padding: 7px 12px;
}
.watch-rating .again { display: block; font-size: 0.5rem; color: var(--bar-red); letter-spacing: 0.07em; text-transform: uppercase; margin-top: 3px; }

@media (max-width: 720px) {
  .watch-row { grid-template-columns: 34px 44px 1fr; gap: 11px; padding: 10px 14px; }
  .watch-date, .watch-rating { display: none; }
}

/* ============================================================
   HOVER TOOLTIP — now leads with the title
   ============================================================ */
.hover-tooltip {
  position: fixed; z-index: 300; opacity: 0; pointer-events: none;
  transform: translateY(6px) scale(0.98);
  transition: opacity 0.14s var(--ease), transform 0.14s var(--ease);
  background: rgba(21,21,26,0.94);
  border: 1px solid var(--border-hot);
  border-radius: var(--radius);
  padding: 14px 16px 15px;
  box-shadow: var(--shadow-3);
  backdrop-filter: blur(16px) saturate(1.3);
  font-family: var(--font-body); font-size: 0.76rem; line-height: 1.55; color: var(--text-dim);
  overflow: hidden;
}
.hover-tooltip::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--spectrum);
}
.hover-tooltip.show { opacity: 1; transform: translateY(0) scale(1); }
.hover-tooltip strong { color: var(--text); }
.tt-title {
  display: block;
  font-family: var(--font-display); font-weight: 800; font-stretch: 106%;
  text-transform: uppercase; letter-spacing: -0.012em;
  font-size: 0.94rem; line-height: 1.12; color: var(--text);
  margin-bottom: 7px;
}
.tt-meta {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  font-family: var(--font-mono); font-size: 0.57rem; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--text-dim);
  margin-bottom: 9px;
}
.tt-meta .tt-chip {
  padding: 3px 9px; border-radius: var(--pill);
  background: var(--panel-2); border: 1px solid var(--border);
}
.tt-meta .tt-chip.ours { color: var(--bar-yellow); border-color: rgba(232,207,58,0.28); }
.tt-meta .tt-chip.tmdb { color: var(--bar-cyan); border-color: rgba(34,196,214,0.28); }
.tt-rate { color: var(--bar-yellow); font-family: var(--font-mono); font-size: 0.66rem; font-weight: 600; margin-bottom: 6px; display: block; }
.tt-body { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }

/* ============================================================
   WATCHED — CALENDAR
   The whole point of this view is that a year of movie nights
   should be legible at a glance, so it locks to the viewport:
   the board is sized in JS so every cell stays poster-shaped and
   the last week never falls below the fold.
   ============================================================ */
.cal-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 5px;
  border-radius: var(--pill);
  background: var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}
.cal-nav-btn {
  width: 34px; height: 34px; flex-shrink: 0; padding: 0;
  border-radius: 50%; border: 1px solid var(--border);
  background: var(--panel-2); color: var(--text);
  font-size: 0.85rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.cal-nav-btn:hover:not(:disabled) { background: var(--accent); color: #0A0A0C; border-color: transparent; }
.cal-nav-btn:disabled { opacity: 0.25; cursor: not-allowed; }
.cal-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; padding: 0 6px; }
.cal-title h3 {
  font-family: var(--font-display); font-weight: 800; font-stretch: 108%;
  font-size: 1.15rem; margin: 0; line-height: 1; letter-spacing: -0.02em;
  white-space: nowrap;
}
.cal-sub {
  font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-dim); white-space: nowrap;
}
.cal-spacer { flex: 1; min-width: 8px; }
#cal-jump, #cal-search { padding: 9px 16px; font-size: 0.8rem; }
#cal-jump { padding-right: 34px; }
#cal-search { width: 190px; }

.cal-view { display: flex; flex-direction: column; min-height: 0; }
.cal-board { display: flex; flex-direction: column; min-height: 0; width: 100%; }

.cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: var(--cal-gap, 8px); margin-bottom: 7px; flex: 0 0 auto; }
.cal-dow span {
  font-family: var(--font-mono); font-size: 0.52rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim);
  text-align: center; opacity: 0.6;
}

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: var(--cal-gap, 8px); flex: 0 0 auto; align-content: start; }
.cal-cell {
  position: relative;
  aspect-ratio: 4/3;
  border: 1px solid rgba(237,234,227,0.055);
  border-radius: 14px;
  background: rgba(255,255,255,0.016);
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.cal-cell.is-pad { border-color: transparent; background: transparent; }
.cal-cell.has-watch { background: rgba(255,255,255,0.038); border-color: rgba(237,234,227,0.1); }
.cal-cell.has-watch:hover { border-color: var(--border-hot); }
.cal-cell.is-today { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(226,59,46,0.3), 0 0 26px -8px rgba(226,59,46,0.55); }

.cal-daynum {
  position: absolute; top: 6px; left: 7px; z-index: 5;
  font-family: var(--font-mono); font-size: 0.55rem; font-weight: 600;
  color: var(--text-dim);
  padding: 2px 6px; border-radius: var(--pill);
  font-variant-numeric: tabular-nums;
  transition: opacity 0.18s var(--ease);
  pointer-events: none;
}
.cal-cell.has-watch .cal-daynum {
  color: var(--text);
  background: rgba(8,8,10,0.78);
  backdrop-filter: blur(6px);
}
.cal-cell.is-today .cal-daynum { color: #0A0A0C; background: var(--accent); }
.cal-cell.has-watch:hover .cal-daynum { opacity: 0; }

/* Posters keep their real 2:3 shape and sit centred in the day's slot,
   so a wide grid never has to crop a poster down to a letterbox strip.
   The gutter either side of them is what makes the row read as a
   schedule rather than a contact sheet. */
.cal-posters {
  position: absolute; inset: 6px;
  display: flex; gap: 3px; justify-content: center; align-items: stretch;
  z-index: 2;
}
.cal-poster {
  position: relative;
  height: 100%; aspect-ratio: 2/3;
  flex: 0 1 auto; min-width: 0;
  padding: 0; border: 0; cursor: pointer;
  background: var(--panel-2);
  border-radius: 9px; overflow: hidden;
  box-shadow: 0 8px 20px -10px rgba(0,0,0,0.95);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
.cal-poster:hover, .cal-poster:focus-visible {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 14px 32px -10px rgba(0,0,0,1);
  z-index: 7;
}
.cal-poster img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: filter 0.25s var(--ease);
  filter: saturate(0.84) brightness(0.9);
}
.cal-poster:hover img, .cal-poster:focus-visible img { filter: saturate(1.06) brightness(1); }
.cal-poster:focus-visible { outline: 2px solid var(--bar-cyan); outline-offset: 2px; }

/* the hover caption — the title, right on the tile */
.cal-cap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  padding: 16px 5px 5px;
  background: linear-gradient(to top, rgba(6,6,8,0.97) 8%, rgba(6,6,8,0.78) 55%, transparent 100%);
  font-family: var(--font-mono); font-size: 0.48rem; font-weight: 600;
  line-height: 1.22; letter-spacing: 0; text-transform: uppercase;
  color: var(--text); text-align: left;
  opacity: 0; transform: translateY(5px);
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
  pointer-events: none;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cal-cap .cal-cap-rate { color: var(--bar-yellow); }
.cal-poster:hover .cal-cap, .cal-poster:focus-visible .cal-cap { opacity: 1; transform: translateY(0); }

.cal-more {
  position: absolute; right: 6px; bottom: 6px; z-index: 6;
  font-family: var(--font-mono); font-size: 0.48rem; font-weight: 700;
  background: rgba(8,8,10,0.9); color: var(--text);
  border: 1px solid var(--border-hot); border-radius: var(--pill);
  padding: 2px 7px;
  backdrop-filter: blur(6px);
  pointer-events: none;
}

/* LOCKED MODE — the calendar owns the viewport */
@media (min-width: 780px) {
  body.cal-mode { height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
  body.cal-mode .site-nav { flex: 0 0 auto; }
  body.cal-mode .tape { flex: 0 0 auto; height: 20px; }
  body.cal-mode .tape::before, body.cal-mode .tape::after { height: 4px; }
  body.cal-mode .watch-section {
    flex: 1; min-height: 0; width: 100%;
    display: flex; flex-direction: column;
    padding-top: 6px; padding-bottom: 16px;
  }
  body.cal-mode .section-head,
  body.cal-mode .watch-stats,
  body.cal-mode .filter-bar,
  body.cal-mode .results-count,
  body.cal-mode footer { display: none; }
  body.cal-mode .watch-controls { margin-bottom: 12px; flex: 0 0 auto; }
  body.cal-mode .mode-tabs { margin-bottom: 0; }
  body.cal-mode .cal-view { flex: 1; min-height: 0; }
  body.cal-mode .cal-board { flex: 1; min-height: 0; justify-content: flex-start; }
  body.cal-mode .cal-cell { aspect-ratio: auto; }
}

/* Below the lock threshold there's no room for gutters, so posters go
   back to filling their cell and the board scrolls with the page. */
@media (max-width: 779px) {
  .cal-bar { border-radius: var(--radius); }
  .cal-spacer { display: none; }
  #cal-search { display: none; }
  .cal-grid { grid-template-rows: none !important; --cal-gap: 4px; }
  .cal-dow { --cal-gap: 4px; }
  .cal-cell { aspect-ratio: 3/4 !important; border-radius: 9px; }
  .cal-posters { inset: 0; gap: 1px; }
  .cal-poster { aspect-ratio: auto; flex: 1 1 0; border-radius: 0; box-shadow: none; }
  .cal-poster:hover, .cal-poster:focus-visible { transform: none; }
  .cal-daynum { font-size: 0.46rem; padding: 1px 5px; top: 3px; left: 3px; }
  .cal-cap { font-size: 0.4rem; padding: 10px 3px 3px; }
}

/* ============================================================
   SERIES — roster
   ============================================================ */
.series-grid { grid-template-columns: repeat(auto-fill, minmax(206px, 1fr)); }
.series-card { display: flex; flex-direction: column; }
.series-card .info { padding-bottom: 3px; }
.series-card.is-dead { opacity: 0.42; cursor: default; }
.series-card.is-dead:hover { transform: none; border-color: var(--border); box-shadow: none; }
.series-meta {
  font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.04em;
  color: var(--text-dim); margin: 0; padding: 0 15px 18px;
}

/* ============================================================
   SERIES — show hero
   ============================================================ */
.show-hero {
  position: relative;
  margin: 0 24px;
  padding: 44px 32px 48px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  border-bottom: 1px solid var(--border);
}
.show-hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 18%;
  opacity: 0.3; filter: saturate(0.6) contrast(1.05);
}
.show-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, var(--bg) 2%, rgba(10,10,12,0.62) 62%, rgba(10,10,12,0.82) 100%);
}
.show-hero-inner { position: relative; z-index: 2; }

.crumbs { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.crumb {
  font-family: var(--font-mono); font-size: 0.6rem; font-weight: 600;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-dim);
  padding: 5px 12px; border-radius: var(--pill);
  background: var(--panel); border: 1px solid var(--border);
}
.crumb:hover { color: var(--text); background: var(--panel-2); }
.crumb-sep { color: var(--text-dim); opacity: 0.3; font-size: 0.6rem; }
.crumb.current { color: var(--text); background: var(--panel-2); }

.show-hero-grid { display: grid; grid-template-columns: 214px 1fr; gap: 40px; align-items: start; margin-top: 14px; }
.show-poster { width: 100%; border-radius: var(--radius); border: 1px solid var(--border-hot); box-shadow: var(--shadow-3); }
.show-hero-text h1 { margin-top: 6px; font-size: clamp(1.9rem, 4.6vw, 3.3rem); }
.show-meta { margin-bottom: 8px; }
.show-meta .cert { border: 1px solid var(--border-hot); border-radius: var(--pill); padding: 2px 9px; }
.show-overview { max-width: 680px; margin-bottom: 20px; }

.show-facts { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; font-family: var(--font-mono); font-size: 0.7rem; }
.show-facts div, .show-facts > * { }
.show-facts dt { color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.11em; font-size: 0.53rem; font-weight: 600; margin-bottom: 4px; }
.show-facts dd { margin: 0 26px 0 0; color: var(--text); }

.show-error { padding: 44px 0 24px; }

@media (max-width: 760px) {
  .show-hero { margin: 0 14px; padding: 30px 20px 34px; border-radius: var(--radius-lg); }
  .show-hero-grid { grid-template-columns: 108px 1fr; gap: 16px; }
  .show-facts { gap: 10px; }
}

/* ============================================================
   SERIES — blocks + season tabs
   ============================================================ */
.show-block { margin-bottom: 58px; }
.block-head {
  font-family: var(--font-mono); font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim);
  padding-bottom: 12px; margin-bottom: 20px;
  position: relative;
  background: none;
}
.block-head::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; border-radius: var(--pill); background: var(--spectrum); opacity: 0.5;
}
.season-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.season-head .block-head {
  flex: 1; color: var(--text); font-size: 1.3rem;
  font-family: var(--font-display); font-weight: 800; font-stretch: 108%; letter-spacing: -0.02em;
  text-transform: uppercase;
}
.season-head .results-count { margin: 0 0 20px; flex-shrink: 0; }

.season-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 22px; }
.season-tab {
  --season-color: var(--accent);
  --season-text: #0A0A0C;
  display: flex; flex-direction: column; gap: 2px; align-items: flex-start;
  font-family: var(--font-mono); cursor: pointer;
  padding: 9px 18px; border-radius: var(--radius-sm);
  background: var(--panel); color: var(--text-dim);
  border: 1px solid var(--border);
  border-left: 3px solid var(--season-color);
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.season-tab:hover { color: var(--text); background: var(--panel-2); }
.season-tab.active { background: var(--season-color); color: var(--season-text); border-color: var(--season-color); }
.season-tab-n { font-size: 0.76rem; font-weight: 700; letter-spacing: 0.05em; }
.season-tab-eps { font-size: 0.53rem; font-weight: 600; opacity: 0.82; letter-spacing: 0.09em; text-transform: uppercase; }

.season-overview { font-size: 0.86rem; max-width: 700px; margin: -4px 0 22px; }

/* ============================================================
   SERIES — episode grid
   ============================================================ */
.episode-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.ep-card {
  --season-color: var(--accent);
  --season-text: #0A0A0C;
  display: flex; flex-direction: column;
  background: var(--panel); color: inherit;
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  transition: border-color 0.18s var(--ease), transform 0.2s var(--ease), box-shadow 0.24s var(--ease);
}
.ep-card:hover { transform: translateY(-4px); border-color: var(--border-hot); box-shadow: var(--shadow-2); text-decoration: none; }
.ep-card:hover .ep-still img { transform: scale(1.05); }
.ep-still { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--panel-2); }
.ep-still img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); filter: saturate(0.85); }
.ep-num {
  position: absolute; top: 10px; left: 10px;
  font-family: var(--font-mono); font-size: 0.58rem; font-weight: 700; letter-spacing: 0.05em;
  background: var(--season-color); color: var(--season-text);
  padding: 4px 11px; border-radius: var(--pill);
  box-shadow: var(--shadow-1);
}
.ep-flag {
  position: absolute; top: 10px; right: 10px;
  font-family: var(--font-mono); font-size: 0.52rem; font-weight: 700;
  letter-spacing: 0.09em; text-transform: uppercase;
  background: rgba(10,10,12,0.82); color: var(--bar-yellow);
  border: 1px solid rgba(232,207,58,0.4);
  padding: 4px 10px; border-radius: var(--pill); backdrop-filter: blur(6px);
}
.ep-upcoming .ep-still img { opacity: 0.3; }
.ep-body { padding: 16px 18px 20px; }
.ep-title {
  font-family: var(--font-display); font-size: 0.92rem; font-weight: 800; font-stretch: 104%;
  text-transform: uppercase; line-height: 1.12; letter-spacing: -0.012em;
  margin: 0 0 8px; color: var(--text);
}
.ep-sub { font-family: var(--font-mono); font-size: 0.58rem; color: var(--text-dim); display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 9px; }
.ep-sub .ep-rate { color: var(--bar-yellow); font-weight: 600; }
.ep-overview { font-size: 0.78rem; color: var(--text-dim); margin: 0; line-height: 1.55; }

/* ============================================================
   EPISODE PAGE
   ============================================================ */
.ep-hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: start; margin-bottom: 32px; }
.ep-hero-still { position: relative; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border-hot); background: var(--panel-2); box-shadow: var(--shadow-2); }
.ep-hero-still img { width: 100%; aspect-ratio: 16/9; object-fit: cover; filter: saturate(0.88); }
.ep-hero-code {
  position: absolute; top: 14px; left: 14px;
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.07em;
  background: var(--season-color, var(--accent)); color: var(--season-text, #0A0A0C);
  padding: 6px 14px; border-radius: var(--pill);
  box-shadow: var(--shadow-1);
}
.ep-hero-title { font-size: clamp(1.7rem, 3.6vw, 2.6rem); margin-top: 8px; }
.ep-hero-overview { max-width: 580px; margin-bottom: 20px; }

@media (max-width: 860px) { .ep-hero { grid-template-columns: 1fr; gap: 20px; } }

.ep-steps { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; margin-bottom: 56px; }
.ep-step {
  display: flex; flex-direction: column; gap: 4px; justify-content: center;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 20px; color: inherit;
  min-width: 0; transition: border-color 0.16s var(--ease), background 0.16s var(--ease);
}
.ep-step:hover { border-color: var(--border-hot); background: var(--panel-2); text-decoration: none; }
.ep-step.is-off { opacity: 0.3; }
.ep-step.is-off:hover { border-color: var(--border); background: var(--panel); }
.ep-step-dir { font-family: var(--font-mono); font-size: 0.54rem; font-weight: 600; letter-spacing: 0.13em; text-transform: uppercase; color: var(--text-dim); }
.ep-step-title { font-size: 0.83rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-step-mid { text-align: center; align-items: center; }
.ep-step-next { text-align: right; align-items: flex-end; }

@media (max-width: 720px) {
  .ep-steps { grid-template-columns: 1fr 1fr; }
  .ep-step-mid { grid-column: 1 / -1; order: 3; }
}

/* ============================================================
   WHERE TO WATCH
   ============================================================ */
.provider-groups { display: flex; gap: 24px; flex-wrap: wrap; }
.provider-group { display: flex; flex-direction: column; gap: 9px; }
.provider-label { font-family: var(--font-mono); font-size: 0.53rem; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; color: var(--text-dim); }
.provider-logos { display: flex; gap: 7px; flex-wrap: wrap; }
.provider-chip {
  width: 44px; height: 44px; border-radius: 13px; overflow: hidden;
  border: 1px solid var(--border-hot); background: var(--panel-2); flex-shrink: 0;
}
.provider-chip img { width: 100%; height: 100%; object-fit: cover; }

/* ============================================================
   POSTER SHINE
   ============================================================ */
.card .poster-wrap::after {
  content: "";
  position: absolute;
  top: -50%; bottom: -50%; left: -60%; width: 45%;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.08) 38%,
    rgba(255,255,255,0.34) 50%,
    rgba(255,255,255,0.08) 62%,
    rgba(255,255,255,0) 100%
  );
  transform: rotate(18deg) translateX(0);
  transition: transform 0.8s var(--ease);
}
.card:hover .poster-wrap::after,
.card:focus-visible .poster-wrap::after { transform: rotate(18deg) translateX(420%); }

/* ============================================================
   TITLE LOGOS
   ============================================================ */
.title-logo-h { margin: 0 0 12px; line-height: 0; }
.title-logo {
  max-height: 78px;
  max-width: min(340px, 100%);
  width: auto; height: auto;
  object-fit: contain;
  object-position: left bottom;
  filter: drop-shadow(0 3px 16px rgba(0,0,0,0.85));
}
.show-hero-text .title-logo { max-height: 124px; max-width: min(440px, 100%); }

@media (max-width: 760px) {
  .title-logo { max-height: 56px; max-width: min(240px, 100%); }
  .show-hero-text .title-logo { max-height: 74px; max-width: min(280px, 100%); }
}

/* ============================================================
   SMALL SCREENS
   ============================================================ */
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  section { padding: 34px 16px 52px; }
  .hero { padding: 54px 16px 48px; }
  .grid { gap: 12px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .wheel-main { padding: 20px 14px; }
  footer { margin: 26px 14px 14px; padding: 36px 20px; }
  .watch-stats { gap: 8px; grid-template-columns: repeat(2, 1fr); }
  .watch-stat { padding: 16px 16px 14px; }
  .watch-stat .num { font-size: 1.9rem; }
}
