:root {
  /* Warm Screening Room palette (OKLCH with crisp sRGB fallbacks) */
  --bg-canvas: #0e0d0c;
  --bg-canvas: oklch(14% 0.008 60);
  --bg-surface: #181614;
  --bg-surface: oklch(18.5% 0.009 60);
  --bg-elevated: #23201d;
  --bg-elevated: oklch(23.5% 0.011 60);

  --rule-subtle: rgba(242, 235, 224, 0.10);
  --rule-strong: rgba(242, 235, 224, 0.22);

  --ink-primary: #f2ebe0;
  --ink-primary: oklch(94% 0.014 80);
  --ink-secondary: #c2b9ab;
  --ink-secondary: oklch(79% 0.014 75);
  --ink-muted: #a39a8c;
  --ink-muted: oklch(69% 0.013 75);

  --accent-full: #dc3b2f;
  --accent-full: oklch(59% 0.20 25);
  --accent-full-tint: rgba(220, 59, 47, 0.16);
  --accent-full-ink: #ffaca4;

  --accent-summary: #dfa542;
  --accent-summary: oklch(76% 0.13 78);
  --accent-summary-tint: rgba(223, 165, 66, 0.16);
  --accent-summary-ink: #f3cc7e;

  --accent-done: #4eb883;
  --accent-done: oklch(70% 0.13 155);
  --accent-done-tint: rgba(78, 184, 131, 0.18);
  --accent-done-ink: #8ce3b5;

  --radius-sharp: 4px;
  --radius-soft: 8px;
  --radius-pill: 999px;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max-width: 1320px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  overflow-x: clip;
  scrollbar-color: var(--bg-elevated) var(--bg-canvas);
  scrollbar-width: thin;
}

body {
  margin: 0;
  min-height: 100dvh;
  overflow-x: clip;
  background-color: var(--bg-canvas);
  color: var(--ink-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  caret-color: var(--accent-full);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--accent-full);
  color: #fff7f5;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-canvas);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border: 2px solid var(--bg-canvas);
  border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
  background: #35302b;
}

button,
input {
  font: inherit;
  color: inherit;
}

button,
a,
summary {
  touch-action: manipulation;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--bg-canvas), 0 0 0 4px var(--ink-primary);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-frame {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 36px 32px 84px;
}

/* ==================== Masthead & Featured Screening ==================== */

.masthead {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(430px, 0.95fr);
  gap: 36px;
  align-items: end;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--rule-subtle);
}

.masthead-title {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4.4vw, 3.45rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ink-primary);
  text-wrap: balance;
}

.masthead-lead {
  margin: 0 0 20px;
  max-width: 58ch;
  font-size: 15.5px;
  line-height: 1.58;
  color: var(--ink-secondary);
}

.masthead-lead em {
  font-style: italic;
  color: var(--ink-primary);
}

/* Editorial Print Key (no icon-tile boxes) */

.editorial-key {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 22px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  font-size: 13.5px;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.editorial-key-item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.editorial-key-item strong {
  font-weight: 600;
  color: var(--ink-primary);
}

.key-swatch {
  width: 8px;
  height: 8px;
  border-radius: 1px;
  flex-shrink: 0;
}

.key-swatch-full {
  background: var(--accent-full);
}

.key-swatch-summary {
  background: var(--accent-summary);
}

/* Thin Cinema Timeline Progress */

.timeline-progress {
  max-width: 540px;
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
  margin-bottom: 10px;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

.timeline-fraction {
  font-weight: 600;
  color: var(--ink-primary);
}

.timeline-remaining {
  color: var(--ink-muted);
}

.reset-link {
  margin-left: auto;
  background: none;
  border: none;
  padding: 2px 4px;
  border-radius: var(--radius-sharp);
  font-size: 13px;
  color: var(--ink-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 150ms ease;
}

.reset-link:hover {
  color: var(--ink-primary);
}

.timeline-rail {
  width: 100%;
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--bg-elevated);
  overflow: hidden;
}

.timeline-bar {
  height: 100%;
  width: 0%;
  background: var(--accent-full);
  transition: width 300ms var(--ease-out), background-color 200ms ease;
}

.timeline-bar.is-complete {
  background: var(--accent-done);
}

/* Featured "Up Next" Screening Stage */

.featured-screening {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--rule-subtle);
  border-radius: var(--radius-sharp);
}

.featured-screening.is-complete {
  grid-template-columns: 1fr;
}

.featured-poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-sharp);
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--rule-subtle);
}

.featured-poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 280ms var(--ease-out);
}

.featured-poster-link:hover .featured-poster-img {
  transform: scale(1.03);
}

.featured-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.featured-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.featured-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink-primary);
}

.featured-title a {
  text-decoration: none;
}

.featured-title a:hover {
  text-decoration: underline;
}

.featured-note {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-secondary);
}

.featured-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

/* Buttons (ranked by importance) */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 15px;
  border-radius: var(--radius-sharp);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.btn-primary {
  background: var(--ink-primary);
  color: var(--bg-canvas);
}

.btn-primary:hover {
  background: #ffffff;
}

.btn-primary:active {
  background: #dcd3c4;
}

.btn-secondary {
  background: var(--bg-elevated);
  border-color: var(--rule-subtle);
  color: var(--ink-primary);
}

.btn-secondary:hover {
  background: #2d2925;
  border-color: var(--rule-strong);
}

.btn-secondary:active {
  background: #1d1a17;
}

.btn-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* ==================== Editorial Filter Toolbar ==================== */

.toolbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  margin-bottom: 32px;
  background: var(--bg-canvas);
  border-bottom: 1px solid var(--rule-subtle);
}

.toolbar-primary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 13px;
  border-radius: var(--radius-sharp);
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.tab-btn:hover {
  color: var(--ink-primary);
  background: var(--bg-surface);
}

.tab-btn.is-active {
  background: var(--ink-primary);
  color: var(--bg-canvas);
}

.tab-btn-full.is-active {
  background: var(--accent-full);
  color: #fff7f6;
}

.tab-btn-summary.is-active {
  background: var(--accent-summary);
  color: #161209;
}

.tab-count {
  font-size: 12.5px;
  opacity: 0.78;
  font-variant-numeric: tabular-nums;
}

.toolbar-secondary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.segmented-control,
.view-control {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius-sharp);
  background: var(--bg-surface);
  border: 1px solid var(--rule-subtle);
}

.seg-btn,
.view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border: none;
  border-radius: 3px;
  background: transparent;
  color: var(--ink-muted);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

.seg-btn {
  padding: 4px 10px;
  font-variant-numeric: tabular-nums;
}

.view-btn {
  width: 34px;
  padding: 4px;
}

.view-btn svg {
  width: 16px;
  height: 16px;
}

.seg-btn:hover,
.view-btn:hover {
  color: var(--ink-primary);
}

.seg-btn.is-active,
.view-btn.is-active {
  background: var(--bg-elevated);
  color: var(--ink-primary);
}

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 11px;
  width: 16px;
  height: 16px;
  color: var(--ink-muted);
  pointer-events: none;
}

.search-wrap input {
  width: 224px;
  min-height: 38px;
  padding: 7px 12px 7px 34px;
  background: var(--bg-surface);
  border: 1px solid var(--rule-subtle);
  border-radius: var(--radius-sharp);
  font-size: 14px;
  color: var(--ink-primary);
  transition: border-color 150ms ease, background-color 150ms ease;
}

.search-wrap input::placeholder {
  color: var(--ink-muted);
}

.search-wrap input:hover {
  border-color: var(--rule-strong);
}

.search-wrap input:focus {
  border-color: var(--ink-secondary);
  background: var(--bg-elevated);
  outline: none;
  box-shadow: 0 0 0 2px var(--bg-canvas), 0 0 0 4px var(--rule-strong);
}

/* ==================== Phase Sections ==================== */

.watchlist-root {
  display: flex;
  flex-direction: column;
  gap: 52px;
}

.phase-section {
  margin: 0;
}

.phase-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 0 12px;
  margin-bottom: 24px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rule-strong);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.phase-bar:hover .phase-name {
  color: #ffffff;
}

.phase-bar:hover .phase-chevron {
  color: var(--ink-primary);
}

.phase-section.is-collapsed .phase-bar {
  margin-bottom: 0;
  padding: 14px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--rule-subtle);
  border-radius: var(--radius-sharp);
}

.phase-section.is-collapsed .phase-bar:hover {
  background: var(--bg-elevated);
  border-color: var(--rule-strong);
}

.phase-section.is-complete.is-collapsed .phase-bar {
  border-color: rgba(78, 184, 131, 0.28);
}

.phase-heading {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 14px;
  min-width: 0;
}

.phase-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 1.95rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink-primary);
  transition: color 150ms ease;
}

.phase-section.is-collapsed .phase-name {
  font-size: clamp(1.25rem, 2vw, 1.45rem);
}

.phase-sub {
  font-size: 14.5px;
  color: var(--ink-muted);
}

.phase-right {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.phase-complete-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 3px;
  background: var(--accent-done-tint);
  color: var(--accent-done-ink);
  font-size: 12px;
  font-weight: 600;
}

.phase-complete-badge svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.phase-tally {
  font-size: 13.5px;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.phase-chevron {
  width: 18px;
  height: 18px;
  color: var(--ink-muted);
  flex-shrink: 0;
  transform: rotate(180deg);
  transition: transform 200ms var(--ease-out), color 150ms ease;
}

.phase-section.is-collapsed .phase-chevron {
  transform: rotate(0deg);
}

.phase-content[hidden] {
  display: none;
}

/* ==================== Poster Wall (Default View) ==================== */

.poster-wall {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 36px 22px;
}

.poster-entry {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  transition: opacity 200ms var(--ease-out);
}

.poster-entry.is-watched {
  opacity: 0.56;
}

.poster-entry.is-watched:hover,
.poster-entry.is-watched:focus-within {
  opacity: 0.92;
}

.poster-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  width: 100%;
  border-radius: var(--radius-sharp);
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--rule-subtle);
  transition: border-color 180ms ease;
}

.poster-entry:hover .poster-frame {
  border-color: var(--rule-strong);
}

.poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 240ms var(--ease-out), opacity 200ms ease;
}

/* Distinct visual treatment: Summary Videos carry a warm muted film-print tone until hovered */
.poster-entry[data-mode='summary'] .poster-img {
  filter: saturate(0.45) contrast(0.95) brightness(0.86);
}

.poster-entry[data-mode='summary']:hover .poster-img,
.poster-entry[data-mode='summary']:focus-within .poster-img {
  filter: saturate(1) contrast(1) brightness(1);
}

.poster-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(14, 13, 12, 0.72) 0%, rgba(14, 13, 12, 0) 34%),
    linear-gradient(0deg, rgba(14, 13, 12, 0.76) 0%, rgba(14, 13, 12, 0) 28%);
  pointer-events: none;
}

.poster-top-bar {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.order-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 26px;
  padding: 0 7px;
  border-radius: var(--radius-sharp);
  background: rgba(14, 13, 12, 0.84);
  border: 1px solid rgba(242, 235, 224, 0.16);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-primary);
  font-variant-numeric: tabular-nums;
}

/* Independent circular watched toggle above stretched TMDB link */
.watch-circle {
  position: relative;
  z-index: 3;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-pill);
  background: rgba(14, 13, 12, 0.84);
  border: 1px solid rgba(242, 235, 224, 0.24);
  color: var(--ink-secondary);
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms var(--ease-out);
}

.watch-circle:hover {
  background: var(--bg-elevated);
  border-color: var(--ink-primary);
  color: var(--ink-primary);
}

.watch-circle:active {
  transform: scale(0.94);
}

.watch-circle[aria-pressed='true'] {
  background: var(--accent-done);
  border-color: var(--accent-done);
  color: #0b1912;
}

.watch-circle svg {
  width: 16px;
  height: 16px;
}

.poster-bottom-bar {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  pointer-events: none;
}

.mode-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.mode-tag-full {
  background: var(--accent-full);
  color: #fff8f7;
}

.mode-tag-summary {
  background: var(--accent-summary);
  color: #171209;
}

.series-tag {
  padding: 4px 8px;
  border-radius: var(--radius-sharp);
  background: rgba(14, 13, 12, 0.86);
  border: 1px solid rgba(242, 235, 224, 0.2);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-primary);
}

/* Open Editorial Typography Below Poster */

.poster-copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.entry-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink-primary);
}

.entry-link {
  text-decoration: none;
  color: inherit;
}

/* Stretched link makes entire poster + copy open TMDB without nesting buttons inside anchors */
.entry-link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

.poster-entry:hover .entry-link {
  text-decoration: underline;
}

.poster-entry.is-watched .entry-link {
  text-decoration: line-through;
  text-decoration-color: var(--ink-muted);
}

.entry-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 13px;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.entry-meta-recap {
  color: var(--accent-summary-ink);
  font-weight: 500;
}

.entry-dest,
.row-dest-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-secondary);
  font-size: 12.5px;
  font-weight: 500;
}

.entry-dest {
  margin-left: auto;
}

.row-dest-inline {
  display: none;
}

.entry-dest-yt {
  color: var(--accent-summary-ink);
}

.entry-dest svg,
.row-dest-inline svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.row-order-inline {
  display: none;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.entry-note {
  margin: 2px 0 0;
  font-size: 13.5px;
  line-height: 1.48;
  color: var(--ink-secondary);
}

/* ==================== Compact Checklist View ==================== */

.checklist-rows {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--rule-subtle);
}

.checklist-row {
  position: relative;
  display: grid;
  grid-template-columns: 34px 48px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 8px;
  border-bottom: 1px solid var(--rule-subtle);
  transition: background-color 150ms ease, opacity 180ms ease;
}

.checklist-row:hover {
  background: var(--bg-surface);
}

.checklist-row.is-watched {
  opacity: 0.58;
}

.checklist-row.is-watched:hover {
  opacity: 0.92;
}

.row-order {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.row-thumb {
  width: 48px;
  height: 72px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--rule-subtle);
  flex-shrink: 0;
}

.row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.checklist-row[data-mode='summary'] .row-thumb img {
  filter: saturate(0.48) brightness(0.9);
}

.checklist-row[data-mode='summary']:hover .row-thumb img {
  filter: none;
}

.row-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.row-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ==================== Empty State ==================== */

.empty-state {
  text-align: center;
  padding: 64px 24px;
  background: var(--bg-surface);
  border: 1px solid var(--rule-subtle);
  border-radius: var(--radius-soft);
}

.empty-state h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
}

.empty-state p {
  margin: 0 0 22px;
  color: var(--ink-secondary);
}

/* ==================== Colophon & Skipped Drawer ==================== */

.colophon {
  margin-top: 76px;
  padding-top: 32px;
  border-top: 1px solid var(--rule-subtle);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.skipped-drawer {
  background: var(--bg-surface);
  border: 1px solid var(--rule-subtle);
  border-radius: var(--radius-soft);
}

.skipped-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-secondary);
  cursor: pointer;
  list-style: none;
  transition: color 150ms ease, background-color 150ms ease;
}

.skipped-trigger::-webkit-details-marker {
  display: none;
}

.skipped-trigger:hover {
  color: var(--ink-primary);
  background: var(--bg-elevated);
}

.chevron-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 200ms var(--ease-out);
}

.skipped-drawer[open] .chevron-icon {
  transform: rotate(180deg);
}

.skipped-panel {
  padding: 0 20px 20px;
  border-top: 1px solid var(--rule-subtle);
}

.skipped-panel p {
  margin: 14px 0;
  max-width: 68ch;
  font-size: 14px;
  color: var(--ink-secondary);
}

.skipped-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.skipped-list li {
  padding: 5px 11px;
  border-radius: var(--radius-sharp);
  background: var(--bg-canvas);
  border: 1px solid var(--rule-subtle);
  font-size: 13px;
  color: var(--ink-muted);
}

.colophon-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  font-size: 13.5px;
  color: var(--ink-muted);
}

.colophon-meta a {
  color: var(--ink-secondary);
}

.colophon-meta a:hover {
  color: var(--ink-primary);
}

/* ==================== Responsive Breakpoints ==================== */

@media (max-width: 1120px) {
  .masthead {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .poster-wall {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .page-frame {
    padding: 28px max(16px, env(safe-area-inset-left)) max(64px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-right));
  }

  .masthead {
    padding-bottom: 24px;
  }

  .toolbar {
    position: static;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px 0;
    margin-bottom: 28px;
  }

  /* Single-row touch-scrollable filter rail strictly contained inside page gutter */
  .toolbar {
    min-width: 0;
    max-width: 100%;
  }

  .toolbar-primary {
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    margin: 0;
    padding: 2px 0;
    gap: 6px;
  }

  .toolbar-primary::-webkit-scrollbar {
    display: none;
  }

  .tab-btn {
    flex-shrink: 0;
    min-height: 40px;
    padding: 8px 14px;
    scroll-snap-align: start;
  }

  .toolbar-secondary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    width: 100%;
    min-width: 0;
  }

  .toolbar-secondary > * {
    min-width: 0;
  }

  .search-wrap {
    grid-column: 1 / -1;
    order: -1;
    width: 100%;
    min-width: 0;
  }

  /* 16px prevents iOS Safari auto-zoom on focus */
  .search-wrap input {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    font-size: 16px;
    padding: 10px 14px 10px 38px;
  }

  .search-icon {
    left: 13px;
  }

  .segmented-control {
    display: flex;
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .segmented-control::-webkit-scrollbar {
    display: none;
  }

  .seg-btn {
    flex: 1 0 auto;
    min-width: 31px;
    min-height: 38px;
    padding: 6px 5px;
    font-size: 12.5px;
    white-space: nowrap;
  }

  .view-control {
    flex-shrink: 0;
  }

  .view-btn {
    width: 38px;
    min-height: 38px;
  }

  .watchlist-root {
    gap: 44px;
  }

  .phase-bar {
    padding-bottom: 10px;
    margin-bottom: 18px;
  }

  .poster-wall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 14px;
  }
}

@media (max-width: 600px) {
  .masthead-title {
    font-size: clamp(2rem, 8.5vw, 2.5rem);
  }

  .masthead-lead {
    font-size: 15px;
    margin-bottom: 16px;
  }

  .editorial-key {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 18px;
  }

  .timeline-meta {
    gap: 4px 12px;
  }

  .featured-screening {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
    align-items: start;
  }

  .featured-title {
    font-size: 19px;
  }

  .featured-note {
    font-size: 13.5px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .featured-actions {
    gap: 8px;
  }

  .featured-actions .btn {
    min-height: 42px;
    padding: 8px 12px;
    font-size: 13.5px;
    flex: 1 1 auto;
  }

  .phase-bar {
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-bottom: 16px;
  }

  .phase-section.is-collapsed .phase-bar {
    padding: 12px 14px;
  }

  .phase-right {
    gap: 8px;
  }

  .poster-wall {
    gap: 24px 12px;
  }

  .poster-top-bar {
    top: 7px;
    left: 7px;
    right: 7px;
  }

  .poster-bottom-bar {
    left: 7px;
    right: 7px;
    bottom: 7px;
  }

  .order-chip {
    min-width: 24px;
    height: 24px;
    padding: 0 5px;
    font-size: 11px;
  }

  .watch-circle {
    width: 38px;
    height: 38px;
  }

  .mode-tag {
    padding: 3px 6px;
    font-size: 11px;
  }

  .series-tag {
    padding: 3px 6px;
    font-size: 10.5px;
  }

  .entry-title {
    font-size: 14.5px;
    line-height: 1.25;
  }

  .entry-meta {
    font-size: 12px;
    gap: 4px 8px;
  }

  .entry-dest {
    font-size: 12px;
  }

  .entry-note {
    font-size: 12.5px;
    line-height: 1.44;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* Mobile Compact Checklist: crisp 3-column thumb + copy + watch circle */
  .checklist-row {
    grid-template-columns: 48px minmax(0, 1fr) 40px;
    gap: 12px;
    padding: 12px 2px;
    align-items: start;
  }

  .row-order,
  .row-actions .entry-dest {
    display: none;
  }

  .row-order-inline {
    display: inline;
  }

  .row-dest-inline {
    display: inline-flex;
  }

  .row-thumb {
    width: 48px;
    height: 72px;
  }

  .row-actions {
    gap: 0;
    justify-content: flex-end;
  }

  .skipped-trigger {
    padding: 14px 16px;
    font-size: 14px;
  }

  .skipped-panel {
    padding: 0 16px 16px;
  }

  .colophon {
    margin-top: 56px;
  }
}

@media (max-width: 400px) {
  .featured-screening {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 12px;
  }

  .featured-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .featured-actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
