* { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: clip; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; padding: 1rem var(--space-xxl); background: var(--color-background); color: var(--color-body-1); overflow-x: clip;}
:root {
  color-scheme: light dark;

  --font-caption2: 0.6875rem;
  --font-caption1: 0.75rem;
  --font-footnote: 0.8125rem;
  --font-subhead: 0.9375rem;
  --font-callout: 1rem;
  --font-body: 1.0625rem;
  --font-headline: 1.0625rem;
  --font-title3: 1.25rem;
  --font-title2: 1.375rem;
  --font-title1: 1.75rem;
  --font-largeTitle: 2.125rem;
  --font-display1: 2.5rem;
  --font-display2: 3.25rem;
  --font-display3: 5rem;

  --space-xs: 0.5rem;
  --space-s: 1rem;
  --space-m: 1.5rem;
  --space-l: 2.5rem;
  --space-xl: 3.75rem;
  --space-xxl: 5rem;
  --space-row: 6.25rem;

  --color-background: light-dark(#fbfbfd, #000);
  --color-background-2: light-dark(rgba(120, 120, 128, 0.16), rgba(120, 120, 128, 0.32));
  --color-card: light-dark(#ffffff, #1d1d1f);
  --color-title: light-dark(#1d1d1f, #f5f5f7);
  --color-heading: light-dark(#1d1d1f, #f5f5f7);
  --color-subheading: light-dark(#1d1d1f, #f5f5f7);
  --color-body-1: light-dark(#1d1d1f, #f5f5f7);
  --color-body-2: light-dark(#6e6e73, #ccc);
  --color-hdr-ftr: light-dark(#86868b, #aeaeb2);
  --color-watch-btn: #0071E3;
  --color-watch-btn-hvr: #0077ED;
  --color-on-dark: #f5f5f7;
  --color-scrim: rgba(0, 0, 0, 0.4);
  --color-scrim-hover: rgba(0, 0, 0, 0.7);

  --header-height: 3rem;
  --box-shadow: rgba(0,0,0,0.9);

  --skeleton-base: light-dark(#e8e8ed, #2a2a2e);
  --skeleton-highlight: light-dark(#f5f5f7, #3a3a3e);
  --skeleton-shimmer: light-dark(rgba(0,0,0,0.06), rgba(255,255,255,0.10));
  --skeleton-radius: 1rem;
}

:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"]  { color-scheme: dark;  }

/* Views */
body[data-view="home"] #homeView { display: block; }
body[data-view="home"] #gridView { display: none; }
body[data-view="home"] #trashView { display: none; }
body[data-view="search"] #homeView { display: none; }
body[data-view="search"] #gridView { display: none; }
body[data-view="search"] #trashView { display: none; }
body[data-view="grid"] #homeView { display: none; }
body[data-view="grid"] #gridView { display: block; }
body[data-view="grid"] #trashView { display: none; }
body[data-view="trash"] #homeView { display: none; }
body[data-view="trash"] #searchView { display: none; }
body[data-view="trash"] #trashView { display: block; }
body[data-view="trash"] #gridView { display: none; }

#tangerineContainer { display: none; }
body[data-view="search"] #tangerineContainer {
  display: flex;
  flex-direction: column;
  gap: var(--space-l);
}

#trashTangerineContainer { display: none; }
body[data-view="trash"] #trashTangerineContainer {
  display: flex;
  flex-direction: column;
  gap: var(--space-l);
}

body[data-view="trash"] #trashView { padding-top: var(--space-l); }

#linesContainer {
  display: flex;
  flex-direction: column;
  gap: var(--space-row);
  padding-top: var(--space-row);
}

/* Header */
.header {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  height: var(--header-height);
  padding: 0 calc(var(--font-largeTitle) + var(--space-xxl));
  background: transparent;
  transition: background-color 0.25s ease-out, backdrop-filter 0.25s ease-out;
}
.header.header-scrolled {
  background: color-mix(in srgb, var(--color-background) 85%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}
body[data-view="search"] .header.header-hidden {
  transform: translateY(-100%);
}
.header h1 {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  flex: 0 0 auto;
  flex-shrink: 0;
  font-family: 'Monoton', sans-serif;
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
  color: var(--color-body-1);
  margin: 0;
  cursor: pointer;
}

/* Search */
.search-icon {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  flex-shrink: 0;
  font-size: var(--font-title3);
  line-height: 1;
  font-variation-settings: 'opsz' 20, 'wght' 400, 'FILL' 0, 'GRAD' 0;
  color: var(--color-body-1);
  transition: color 0.2s ease;
  user-select: none;
  cursor: pointer;
}
.search-icon.dimmed { color: var(--color-hdr-ftr); }
.search-icon.searching { display: none; }
body[data-view="search"] .search-icon { font-size: var(--font-title1); }
body[data-view="search"] .search-spinner { width: 28px; height: 28px; }
body[data-view="search"] .search-spinner .spinner { width: 28px; height: 28px; }
.search-spinner {
  display: none;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}
.search-spinner.visible { display: flex; }
.search-panel { display: none; flex: 1; margin: 0; padding: 0; background: none; position: relative; }
body[data-view="search"] .search-panel { display: block; }
.search-panel input {
  width: 100%;
  display: block;
  padding: 0;
  font-size: var(--font-largeTitle);
  line-height: 1;
  color: var(--color-body-1);
  text-align: center;
  outline: none;
  background: none;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
  border: none;
}
.search-panel input:focus { color: var(--color-body-1); border: none; outline: none; box-shadow: none; background: none; }
.search-clear {
  display: none !important;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-hdr-ftr);
  font-size: var(--font-title2);
  user-select: none;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.2s ease;
}
.search-clear:hover { color: var(--color-body-1); }
.search-clear.visible { display: flex !important; }

/* Profile icon */
.header-actions { display: flex; align-items: center; gap: var(--space-s); flex: 0 0 auto; }
.profile-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: var(--font-title2);
  line-height: 1;
  font-variation-settings: 'opsz' 20, 'wght' 400, 'FILL' 0, 'GRAD' 0;
  color: var(--color-body-1);
  transition: color 0.2s ease;
  user-select: none;
  cursor: pointer;
}

.trash-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: var(--font-title2);
  line-height: 1;
  font-variation-settings: 'opsz' 20, 'wght' 400, 'FILL' 0, 'GRAD' 0;
  color: var(--color-body-1);
  transition: color 0.2s ease;
  user-select: none;
  cursor: pointer;
}
.trash-icon:hover { color: var(--color-hdr-ftr); }
.trash-icon:focus-visible { outline: 2px solid var(--color-watch-btn); outline-offset: 4px; border-radius: 50%; }
.profile-icon:hover { color: var(--color-hdr-ftr); }
.profile-icon:focus-visible { outline: 2px solid var(--color-watch-btn); outline-offset: 4px; border-radius: 50%; }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  width: calc(100% + 2 * var(--space-xxl));
  margin-left: calc(-1 * var(--space-xxl));
  margin-right: calc(-1 * var(--space-xxl));
  margin-top: -1rem;
  margin-bottom: 0;
  height: 720px;
  background: var(--color-background);
  z-index: 1;
}
.hero-slide { display: flex; transition: transform 0.5s ease; height: 100%; }
.hero-item { position: relative; flex: 0 0 100%; height: 100%; overflow: hidden; border-radius: 1rem; }
.hero-item .placeholder { width: 100%; height: 100%; background: var(--color-background); }
.hero-image-wrapper {
  position: absolute;
  top: 80px;
  bottom: 32px;
  right: var(--space-xxl);
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 1rem;
}
.hero-image-wrapper img { width: 100%; height: 100%; object-fit: contain; }
.hero-image-wrapper img.yt { transform: scale(2.85) scaleY(1.07); transform-origin: center; }
.hero-image-wrapper img.yt-alt { object-fit: cover; object-position: center; }
.hero-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--color-scrim);
  color: var(--color-on-dark);
  border: none;
  padding: 12px 18px;
  cursor: pointer;
  border-radius: 50%;
  font-size: var(--font-title2);
  z-index: 2;
  transition: background 0.2s;
  backdrop-filter: blur(4px);
}
.hero-btn:hover { background: var(--color-scrim-hover); }
.hero-btn.prev { left: var(--space-xs); }
.hero-btn.next { right: var(--space-xs); }
.hero-btn.hidden { display: none; }
.hero-text {
  position: absolute;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: var(--color-body-1);
  bottom: var(--space-l);
  left: var(--space-l);
  padding: var(--space-l);
  gap: 0;
  max-width: 45%;
  pointer-events: none;
}
.hero-text .title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: var(--font-display3);
  font-weight: 600;
  margin: 0 0 4px;
}
.hero-text .subheading { font-size: var(--font-largeTitle); color: var(--color-body-2); margin: 2px 0; }
.hero-text .hero-plot {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: var(--font-callout);
}
.hero-text .hero-meta { font-size: var(--font-callout); color: var(--color-body-2); margin: 2px 0; }

/* Header buttons */
.line-header-btn,
.hero-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  background: none;
  border: none;
  padding: 14px 8px;
  margin: -14px -8px;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.hero-filter-btn { pointer-events: auto; }
.line-header-btn:hover,
.hero-filter-btn:hover { color: var(--color-hdr-ftr); }
.line-header-btn:focus-visible,
.hero-filter-btn:focus-visible { outline: 2px solid var(--color-watch-btn); outline-offset: 4px; border-radius: 6px; }
.line-header-chevron { font-size: var(--font-title2); line-height: 1; }
.line-header-btn .line-header-chevron { transform: translateY(-1px); }
.hero-filter-btn .line-header-chevron { font-size: var(--font-largeTitle); }

/* Hero action buttons */
.hero-watch-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-family: inherit;
  font-size: var(--font-callout);
  font-weight: 500;
  color: var(--color-on-dark) !important;
  text-decoration: none;
  line-height: 1;
  padding: var(--font-caption1) var(--font-title2);
  cursor: pointer;
  border: none;
  border-radius: calc(var(--font-callout) * 2);
  pointer-events: auto;
  background: var(--color-watch-btn);
  transition: background 0.2s;
}
.hero-watch-btn:hover { background: var(--color-watch-btn-hvr); }
.hero-actions { display: flex; gap: var(--space-xs); margin-top: var(--space-s); align-items: center; }
.hero-watch-btn.round {
  width: calc(var(--font-callout) * 2.5);
  height: calc(var(--font-callout) * 2.5);
  padding: 0;
  border-radius: 50%;
  font-size: var(--font-title2);
  background: var(--color-background-2);
  color: var(--color-body-1) !important;
}
.hero-watch-btn.round:hover { background: color-mix(in srgb, var(--color-background-2) 80%, var(--color-body-1)); }

/* ============================================================
   Line structure
   ============================================================ */

.line { margin: 0; }
.line-header {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-s);
}
.line-header h2 {
  display: flex;
  align-items: center;
  font-size: var(--font-callout);
  font-weight: 600;
  color: var(--color-body-1);
  margin: 0;
}
.line-carousel-wrapper {
  position: relative;
  overflow: visible;
  clip-path: inset(0 calc(-1 * var(--space-l)));
  padding: var(--space-xl) 0;
  margin: calc(-1 * var(--space-xl)) 0;
}
.line-track {
  display: flex;
  align-items: stretch;
  transition: transform 0.3s ease;
  gap: var(--space-l);
}
.line-item {
  display: flex;
  flex-direction: column;
  flex: 0 0 calc((100% - 5 * var(--space-l)) / 6);
  min-width: 0;
  background: transparent;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
  text-align: left;
  cursor: pointer;
}
.line-item .line-image-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
  box-shadow: none;
  border-radius: 1rem;
}
.line-item .line-image-wrapper::before {
  content: "";
  display: block;
  padding-bottom: 56.25%;
}
.line-item .line-image-wrapper.portrait::before {
  padding-bottom: 150%;
}
.line-item .line-image-wrapper img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.line-item .line-image-wrapper.portrait.yt img {
  transform: scale(2.85) scaleY(1.07);
  transform-origin: center;
}
.line-item .line-image-wrapper.portrait.yt-alt img {
  object-fit: cover;
  object-position: center;
}
.line-item .title {
  padding: var(--space-s) 0 0 0;
  font-size: var(--font-callout);
  font-weight: 500;
  line-height: 1.3;
  height: calc(var(--space-s) + 1.3em);
  color: var(--color-body-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.line-placeholder {
  flex: 0 0 calc((100% - 5 * var(--space-l)) / 6);
  background: var(--color-background);
  border-radius: 10px;
  aspect-ratio: 16 / 9;
}
.line-placeholder.portrait { aspect-ratio: 2 / 3; }
.line-item .line-image-wrapper.square {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1d1d1f 0%, #2a2a2e 100%);
  border-radius: 1rem;
  box-shadow: none;
}
.line-item .line-image-wrapper.square::before { padding-bottom: 100%; }
.line-item .line-image-wrapper.square .tile-icon {
  font-size: var(--font-display3);
  color: var(--color-on-dark);
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 48;
}
.line-item.square-tile {
  position: relative;
  z-index: 1;
  background: transparent;
  border-radius: 1rem;
}
.line-item.square-tile .title { color: var(--color-body-1); }
.line-placeholder.square { aspect-ratio: 1 / 1; }
.line-secondary .line-track { gap: var(--space-l); }
.line-secondary .line-item { flex: 0 0 calc((100% - 5 * var(--space-l)) / 6); }
.line-secondary .line-placeholder { flex: 0 0 calc((100% - 5 * var(--space-l)) / 6); }
.line-tertiary .line-track { gap: var(--space-l); }
.line-tertiary .line-item { flex: 0 0 calc((100% - 5 * var(--space-l)) / 6); }
.line-tertiary .line-placeholder { flex: 0 0 calc((100% - 5 * var(--space-l)) / 6); }

/* ============================================================
   Line arrows
   ============================================================ */

.line-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--color-scrim);
  color: var(--color-on-dark);
  border: none;
  padding: 12px 18px;
  cursor: pointer;
  border-radius: 50%;
  font-size: var(--font-title2);
  z-index: 2;
  transition: background 0.2s;
  backdrop-filter: blur(4px);
}
.line-arrow:hover { background: var(--color-scrim-hover); }
.line-arrow.prev { left: var(--space-xs); }
.line-arrow.next { right: var(--space-xs); }
.line-arrow.hidden { display: none; }
.line-arrow.disabled { opacity: 0.3; pointer-events: none; cursor: default; }

/* ============================================================
   Tangerine
   ============================================================ */

.tangerine-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-l);
}
.tangerine-row .line { padding-top: 0; margin: 0; min-width: 0; }
.tangerine-row .line-header { position: relative; }
.tangerine-row .line-item { flex: 0 0 100%; min-width: 100%; max-width: 100%; }
.tangerine-row .line-placeholder { flex: 0 0 100%; aspect-ratio: 1 / 1; }
.tangerine-row .line-item .line-image-wrapper,
.tangerine-row .line-item .line-image-wrapper.portrait {
  aspect-ratio: 1 / 1;
  border-radius: 1rem;
  box-shadow: none;
}
.tangerine-row .line-item .line-image-wrapper::before,
.tangerine-row .line-item .line-image-wrapper.portrait::before {
  content: none;
  display: none;
}
.tangerine-row .line-item .line-image-wrapper.omdb-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: none;
}
.tangerine-row .line-item .line-image-wrapper.yt img {
  transform: scale(2.85) scaleY(1.07);
  transform-origin: center;
}
.tangerine-row .line-item .line-image-wrapper.yt-alt img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: none;
}
.tangerine-row .line-track { gap: var(--space-l); }
.tangerine-row .line-carousel-wrapper {
  padding: var(--space-xl) 0;
  margin: calc(-1 * var(--space-xl)) 0;
  clip-path: inset(0 calc(-1 * var(--space-l)));
}
.tangerine-placeholder { min-width: 0; }
.tangerine-delete-btn {
  position: absolute;
  top: 0;
  right: 0;
  cursor: pointer;
  color: var(--color-hdr-ftr);
  font-size: var(--font-callout);
  user-select: none;
  transition: color 0.2s ease;
  padding: 0 4px;
  line-height: 1;
}
.tangerine-delete-btn:hover { color: var(--color-body-1); }
.tangerine-trash-actions {
  display: flex;
  gap: var(--space-xs);
  cursor: pointer;
  color: var(--color-hdr-ftr);
  font-size: var(--font-callout);
  user-select: none;
}
.tangerine-trash-actions .material-symbols-outlined {
  transition: color 0.2s ease;
  padding: 0 4px;
  line-height: 1;
}
.tangerine-trash-actions .material-symbols-outlined:hover { color: var(--color-body-1); }

/* ============================================================
   Grid
   ============================================================ */

.grid { margin: 0 auto; }
.grid-title {
  font-size: var(--font-callout);
  font-weight: 600;
  margin-bottom: var(--space-m);
  color: var(--color-body-1);
}
body[data-view="search"] #moviesTitle {
  font-size: var(--font-callout);
  color: var(--color-hdr-ftr);
  font-weight: 500;
}
body[data-view="grid"] #searchView,
body[data-view="search"] #searchView {
  padding-top: var(--space-l);
}
.chain-block-header {
  grid-column: 1 / -1;
  font-size: var(--font-title2);
  font-weight: 600;
  color: var(--color-body-1);
  margin: var(--space-xl) 0 var(--space-s) 0;
}
.grid-container {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-l);
}
.grid-item {
  background: transparent;
  border-radius: 10px;
  overflow: visible;
  box-shadow: none;
  cursor: pointer;
  position: relative;
  min-width: 0;
}
.grid-item .grid-image-wrapper {
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 1rem;
}
.grid-item .grid-image-wrapper.portrait { aspect-ratio: 2 / 3; }
.grid-item .grid-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.grid-item .grid-image-wrapper.portrait.yt img {
  object-fit: contain;
  transform: scale(2.85) scaleY(1.07);
  transform-origin: center;
}
.grid-item .grid-image-wrapper.portrait.yt-alt img {
  object-fit: cover;
  object-position: center;
}
.grid-item .title {
  padding: var(--space-s) 0 0 0;
  font-size: var(--font-callout);
  font-weight: 500;
  line-height: 1.3;
  height: calc(var(--space-s) + 1.3em);
  color: var(--color-body-1);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#gridSentinel { height: 1px; }
.grid-item-delete-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-scrim);
  border-radius: 50%;
  cursor: pointer;
  z-index: 5;
  transition: background 0.2s ease;
}
.grid-item-delete-btn:hover { background: var(--color-scrim-hover); }
.grid-item-delete-btn .material-symbols-outlined {
  font-size: var(--font-callout);
  color: var(--color-on-dark);
}
.trash-item-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: var(--space-xs);
  z-index: 5;
}
.trash-item-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-scrim);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease;
}
.trash-item-btn:hover { background: var(--color-scrim-hover); }
.trash-item-btn .material-symbols-outlined {
  font-size: var(--font-callout);
  color: var(--color-on-dark);
}

/* ============================================================
   Report dialog
   ============================================================ */

.report-dialog {
  display: none;
  position: fixed;
  z-index: 3000;
  width: 320px;
  padding: var(--space-s);
  background: rgba(29, 29, 31, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  flex-direction: column;
  gap: var(--space-s);
}
.report-dialog.visible { display: flex; }
.report-dialog-arrow {
  position: absolute;
  width: 12px;
  height: 12px;
  background: rgba(29, 29, 31, 0.85);
  transform: rotate(45deg);
}
.report-dialog.arrow-bottom .report-dialog-arrow {
  bottom: -6px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.report-dialog.arrow-top .report-dialog-arrow {
  top: -6px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.report-dialog-title { font-size: var(--font-callout); font-weight: 600; color: var(--color-on-dark); }
.report-dialog textarea {
  width: 100%;
  min-height: 80px;
  padding: var(--space-xs) var(--space-s);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--color-on-dark);
  font-family: inherit;
  font-size: var(--font-caption1);
  resize: none;
}
.report-dialog textarea::placeholder { color: var(--color-on-dark); opacity: 0.6; }
.report-dialog textarea:focus { outline: none; border-color: var(--color-watch-btn); }
.report-dialog-actions { display: flex; justify-content: flex-end; gap: var(--space-xs); }
.report-dialog-btn {
  padding: var(--space-xs) var(--space-s);
  border: none;
  border-radius: 8px;
  font-size: var(--font-caption1);
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
}
.report-dialog-btn.cancel { background: rgba(255, 255, 255, 0.1); color: var(--color-on-dark); }
.report-dialog-btn.cancel:hover { background: rgba(255, 255, 255, 0.15); }
.report-dialog-btn.send { background: var(--color-watch-btn); color: var(--color-on-dark); }
.report-dialog-btn.send:hover { background: var(--color-watch-btn-hvr); }

/* ============================================================
   Touch handling
   ============================================================ */

.line-item, .grid-item {
  -webkit-touch-callout: none;
  user-select: none;
  touch-action: manipulation;
}

/* ============================================================
   Loading states (skeletons, spinner, fade-in)
   ============================================================ */

@keyframes skeleton-shimmer {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.skeleton,
.skeleton-tile,
.skeleton-hero {
  position: relative;
  overflow: hidden;
  background: var(--skeleton-base);
}

.skeleton::after,
.skeleton-tile::after,
.skeleton-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--skeleton-shimmer) 50%,
    transparent 100%
  );
  transform: translateX(-100%);
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  pointer-events: none;
}

.skeleton-hero {
  width: calc(100% + 2 * var(--space-xxl));
  margin: -1rem calc(-1 * var(--space-xxl)) 0;
  height: 720px;
}

.skeleton-hero-image {
  position: absolute;
  top: 80px;
  bottom: 32px;
  right: 7rem;
  aspect-ratio: 2 / 3;
  background: var(--skeleton-highlight);
  border-radius: 1rem;
}

.skeleton-hero-text {
  position: absolute;
  bottom: 32px;
  left: 5rem;
  max-width: 45%;
  padding: var(--space-l);
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
}

.skeleton-bar { background: var(--skeleton-highlight); border-radius: 6px; height: 16px; }
.skeleton-bar-lg { height: 56px; width: 80%; }
.skeleton-bar-md { height: 24px; width: 50%; }
.skeleton-bar-sm { height: 16px; width: 95%; }

.skeleton-line { margin: 0; padding-top: var(--space-row); }
.skeleton-line-header {
  height: 24px;
  width: 180px;
  background: var(--skeleton-highlight);
  border-radius: 6px;
  margin-bottom: 15px;
}
.skeleton-line-track { display: flex; gap: var(--space-l); }

.skeleton-tile { border-radius: var(--skeleton-radius); }
.skeleton-tile.portrait  { aspect-ratio: 2 / 3; }
.skeleton-tile.landscape { aspect-ratio: 16 / 9; }
.skeleton-tile.square    { aspect-ratio: 1 / 1; }

.skeleton-line-track .skeleton-tile {
  flex: 0 0 calc((100% - 5 * var(--space-l)) / 6);
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-l);
  padding-top: var(--font-title2);
}
.skeleton-grid .skeleton-tile { aspect-ratio: 2 / 3; width: 100%; }

.skeleton-tangerine-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-l);
  padding-top: var(--space-row);
  margin-bottom: var(--space-m);
}
.skeleton-tangerine-row .skeleton-tile { aspect-ratio: 1 / 1; }

body[data-view="search"] .skeleton-grid,
body[data-view="search"] .skeleton-tangerine-row {
  padding-top: var(--font-callout);
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-hdr-ftr);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.spinner-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px 0;
}
.fade-in { animation: fade-in 200ms ease-out; }
.skeleton-hero-fill { position: absolute; inset: 0; }

.hero-image-wrapper:not(.img-loaded),
.line-item .line-image-wrapper:not(.square):not(.img-loaded),
.grid-item .grid-image-wrapper:not(.img-loaded) {
  background: var(--skeleton-base);
}

.line-item .line-image-wrapper,
.grid-item .grid-image-wrapper { position: relative; }

.hero-image-wrapper:not(.img-loaded)::after,
.line-item .line-image-wrapper:not(.square):not(.img-loaded)::after,
.grid-item .grid-image-wrapper:not(.img-loaded)::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--skeleton-shimmer) 50%,
    transparent 100%
  );
  transform: translateX(-100%);
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

.hero-image-wrapper img,
.line-item .line-image-wrapper:not(.square) img,
.grid-item .grid-image-wrapper img {
  opacity: 0;
  transition: opacity 300ms ease-out;
}
.hero-image-wrapper img.loaded,
.line-item .line-image-wrapper:not(.square) img.loaded,
.grid-item .grid-image-wrapper img.loaded {
  opacity: 1;
}

/* ============================================================
   Error states
   ============================================================ */

.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--font-callout);
  padding: var(--font-display3) var(--font-title2);
  text-align: center;
}
.error-state-icon { font-size: var(--font-display2); color: var(--color-hdr-ftr); line-height: 1; user-select: none; }
.error-state-title { font-size: var(--font-title2); font-weight: 600; color: var(--color-body-1); margin: 0; }
.error-state-message { font-size: var(--font-callout); color: var(--color-body-2); max-width: 32ch; margin: 0; }
.error-state-retry {
  margin-top: var(--font-caption1);
  padding: var(--font-caption1) var(--font-title2);
  background: var(--color-watch-btn);
  color: var(--color-body-1);
  border: none;
  border-radius: var(--font-title2);
  font-family: inherit;
  font-size: var(--font-callout);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}
.error-state-retry:hover { background: var(--color-watch-btn-hvr); }
.error-state-retry:active { transform: scale(0.97); }

/* ============================================================
   Empty states
   ============================================================ */

.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--font-display3) var(--font-title2);
  text-align: center;
}
.empty-state-icon { font-size: var(--font-display2); color: var(--color-hdr-ftr); line-height: 1; user-select: none; }
.empty-state-message { font-size: var(--font-callout); color: var(--color-hdr-ftr); margin: 0; }

/* ============================================================
   Detail Modal
   ============================================================ */

.detail-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2500;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: var(--space-l) var(--space-m);
  overflow-y: auto;
}
.detail-modal-overlay.visible { display: flex; }

.detail-modal-handle {
  display: none;
  width: 36px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  margin: var(--space-xs) auto 0;
  flex-shrink: 0;
  touch-action: none;
  cursor: grab;
  position: relative;
  z-index: 11;
}
.detail-modal-close {
  position: absolute;
  top: var(--space-s);
  right: var(--space-s);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-scrim);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: none;
  border-radius: 50%;
  color: var(--color-on-dark);
  cursor: pointer;
  z-index: 10;
  padding: 0;
}
.detail-modal-close:hover { background: var(--color-scrim-hover); }
.detail-modal-close .material-symbols-outlined { font-size: var(--font-title2); }
.detail-modal {
  display: flex;
  flex-direction: column;
  width: 65vw;
  max-width: 900px;
  min-width: 280px;
  max-height: calc(100vh - 96px);
  background: var(--color-card);
  border-radius: 20px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  position: relative;
}
.detail-modal-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  -webkit-overflow-scrolling: touch;
}
.detail-modal-image-wrapper {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 20px;
  background: var(--color-background-2);
}
.detail-modal-image-wrapper:has(img.yt)::before,
.detail-modal-image-wrapper:has(img.yt)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 33%;
  pointer-events: none;
  z-index: 2;
}
.detail-modal-image-wrapper:has(img.yt)::before {
  top: 0;
  background: linear-gradient(to bottom, var(--color-card) 0%, var(--color-card) 50%, transparent 100%);
  animation: modal-edge-top 20s ease-in-out infinite alternate;
}
.detail-modal-image-wrapper:has(img.yt)::after {
  bottom: 0;
  background: linear-gradient(to top, var(--color-card) 0%, var(--color-card) 50%, transparent 100%);
  animation: modal-edge-bottom 20s ease-in-out infinite alternate;
}
@keyframes modal-edge-top {
  0%   { opacity: 1; }
  15%  { opacity: 1; }
  40%  { opacity: 0; }
  100% { opacity: 0; }
}
@keyframes modal-edge-bottom {
  0%   { opacity: 0; }
  60%  { opacity: 0; }
  85%  { opacity: 1; }
  100% { opacity: 1; }
}
.detail-modal-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
.detail-modal-image-wrapper img:not(.yt-alt) {
  animation: modal-poster-pan 20s ease-in-out infinite alternate;
}
.detail-modal-image-wrapper img.yt {
  transform: scale(2.9);
  animation: modal-yt-pan 20s ease-in-out infinite alternate;
}
@keyframes modal-yt-pan {
  0% { transform-origin: center top; }
  100% { transform-origin: center bottom; }
}
.detail-modal-image-wrapper img.yt-alt { object-fit: cover; object-position: center; }
@keyframes modal-poster-pan {
  0% { object-position: center top; }
  100% { object-position: center bottom; }
}
.detail-modal-content {
  flex: 0 0 auto;
  padding: var(--space-s);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}
.detail-modal-title { font-size: var(--font-title1); font-weight: 600; line-height: 1.1; color: var(--color-body-1); flex-shrink: 0; }
.detail-modal-meta { font-size: var(--font-caption1); color: var(--color-hdr-ftr); flex-shrink: 0; }
.detail-modal-plot { font-size: var(--font-callout); color: var(--color-body-1); line-height: 1.4; }
.detail-modal-credits { display: flex; flex-direction: column; gap: var(--space-xs); margin-top: var(--space-xs); }
.detail-modal-credit-line { display: flex; flex-direction: column; gap: 1px; line-height: 1.3; }
.detail-modal-credit-label { color: var(--color-hdr-ftr); font-weight: 600; font-size: var(--font-caption1); text-transform: uppercase; letter-spacing: 0.04em; }
.detail-modal-credit-value { color: var(--color-body-1); font-size: var(--font-callout); }
.detail-modal-actions {
  display: flex;
  gap: var(--space-xs);
  align-items: center;
  padding: var(--space-s);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
.detail-watch-btn {
  flex: 1;
  padding: var(--space-s);
  background: var(--color-watch-btn);
  color: var(--color-on-dark);
  border: none;
  border-radius: 999px;
  font-size: var(--font-callout);
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.detail-watch-btn:hover { background: var(--color-watch-btn-hvr); }
.detail-action-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-background-2);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: var(--color-body-1);
  padding: 0;
}
.detail-action-btn:hover { background: color-mix(in srgb, var(--color-background-2) 80%, var(--color-body-1)); }
.detail-action-btn .material-symbols-outlined { font-size: var(--font-title2); }

/* ============================================================
   Hover elevation
   ============================================================ */

@media (hover: hover) {
  .line-item {
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  .line-item:hover {
    transform: scale(1.04);
    z-index: 2;
  }
  .line-item:hover .line-image-wrapper:not(.square) {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7);
  }
  .grid-item {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  .grid-item:hover {
    transform: scale(1.02);
    z-index: 2;
  }
  .grid-item:hover .grid-image-wrapper {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7);
  }
  .line-item.square-tile:hover .line-image-wrapper.square {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7);
  }
  .tangerine-row .line-item:hover {
    transform: scale(1.04);
  }
  .tangerine-row .line-item:hover .line-image-wrapper {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7);
  }
}

/* ============================================================
   Settings modal
   ============================================================ */

.settings-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2500;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: var(--space-l) var(--space-m);
  overflow-y: auto;
}
.settings-modal-overlay.visible { display: flex; }
.settings-modal {
  display: flex;
  flex-direction: column;
  width: 65vw;
  max-width: 560px;
  min-width: 280px;
  max-height: calc(100vh - 96px);
  background: var(--color-card);
  border-radius: 20px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  position: relative;
}
.settings-modal-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-l) var(--space-s) var(--space-m);
}
.settings-modal-handle {
  display: none;
  width: 36px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  margin: 0 auto var(--space-xs);
  flex-shrink: 0;
}
.settings-modal-close {
  position: absolute;
  top: var(--space-s);
  right: var(--space-s);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: none;
  border-radius: 50%;
  color: var(--color-body-1);
  cursor: pointer;
  z-index: 10;
  padding: 0;
}
.settings-modal-close:hover { background: rgba(0, 0, 0, 0.15); }
.settings-modal-close .material-symbols-outlined { font-size: var(--font-title2); }
.settings-modal-title {
  font-size: var(--font-title1);
  font-weight: 600;
  color: var(--color-body-1);
  padding: 0 var(--space-s);
  margin-bottom: var(--space-s);
}
.settings-section-title {
  font-size: var(--font-caption1);
  font-weight: 600;
  color: var(--color-hdr-ftr);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: var(--space-xs) var(--space-s);
  margin-top: var(--space-l);
}
.settings-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-s);
  border-radius: 10px;
  font-size: var(--font-callout);
  color: var(--color-body-1);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease;
}
.settings-option:hover { background: color-mix(in srgb, var(--color-body-1) 8%, transparent); }
.settings-option.selected::after {
  content: "check";
  font-family: 'Material Symbols Outlined';
  font-size: var(--font-title2);
  font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 20;
  color: var(--color-watch-btn);
}
.settings-option:focus-visible { outline: 2px solid var(--color-watch-btn); outline-offset: 2px; }

.settings-link {
  justify-content: space-between;
  text-decoration: none;
  color: var(--color-body-1);
}
.settings-link .material-symbols-outlined {
  font-size: var(--font-title3);
  color: var(--color-hdr-ftr);
}

.settings-data-block {
  padding: var(--space-s);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}
.settings-data-label {
  font-size: var(--font-caption1);
  font-weight: 600;
  color: var(--color-hdr-ftr);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.settings-data-row {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}
.settings-data-value {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--font-footnote);
  color: var(--color-body-1);
  background: var(--color-background-2);
  padding: var(--space-xs) var(--space-s);
  border-radius: 8px;
  word-break: break-all;
  user-select: all;
}
.settings-data-copy {
  flex-shrink: 0;
  min-width: 84px;
  padding: var(--space-xs) var(--space-s);
  background: var(--color-background-2);
  color: var(--color-body-1);
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: var(--font-callout);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}
.settings-data-copy:hover {
  background: color-mix(in srgb, var(--color-background-2) 80%, var(--color-body-1));
}
.settings-data-copy:active { transform: scale(0.97); }
.settings-data-hint {
  font-size: var(--font-caption1);
  color: var(--color-hdr-ftr);
  line-height: 1.4;
  margin: 0;
}

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

@media (max-width: 1024px) {
  :root { --space-row: var(--space-xxl); }
  .header { padding: 0 var(--space-xxl); }
  .hero {
    width: calc(100% + 2 * var(--space-m));
    margin-left: calc(-1 * var(--space-m));
    margin-right: calc(-1 * var(--space-m));
    margin-top: 3rem;
    height: auto;
    display: flex;
    flex-direction: column;
    background: var(--color-background);
    padding-top: 1rem;
  }
  .hero-slide { height: auto; }
  .hero-item { height: auto; display: flex; flex-direction: column; }
  .hero-image-wrapper {
    position: relative;
    top: auto;
    bottom: auto;
    right: auto;
    height: auto;
    width: 40vw;
    max-width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 1rem;
    order: 1;
    margin: 0 auto;
  }
  .hero-image-wrapper img { object-fit: contain; object-position: center; }
  .hero-image-wrapper img.yt { transform: scale(2.85) scaleY(1.07); transform-origin: center; }
  .hero-image-wrapper img.yt-alt { object-fit: cover; object-position: center; }
  .hero-text {
    position: relative;
    bottom: auto;
    left: auto;
    padding: var(--space-m);
    max-width: 100%;
    pointer-events: auto;
    order: 2;
    background: var(--color-background);
    align-self: stretch;
  }
  .hero-text .title {
    font-size: var(--font-display2);
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .hero-text .subheading { font-size: var(--font-title1); }
  .hero-text .hero-meta { font-size: var(--font-callout); }
  .hero-text .hero-plot {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .skeleton-hero {
    height: auto;
    margin: 0 calc(-1 * var(--space-m));
    width: calc(100% + 2 * var(--space-m));
    display: flex;
    flex-direction: column;
  }
  .skeleton-hero-image {
    position: relative;
    top: auto;
    bottom: auto;
    right: auto;
    height: auto;
    width: 40vw;
    max-width: 100%;
    aspect-ratio: 2 / 3;
    order: 1;
    margin: 1rem auto 0;
  }
  .skeleton-hero-text {
    position: relative;
    bottom: auto;
    left: auto;
    padding: var(--space-m);
    max-width: 100%;
    order: 2;
  }
  .skeleton-line-track { gap: var(--space-m); }
  .skeleton-line-track .skeleton-tile { flex: 0 0 calc((100% - 3 * var(--space-m)) / 4); }
  .skeleton-tangerine-row { grid-template-columns: repeat(2, 1fr); gap: var(--space-m); }
  .skeleton-grid { grid-template-columns: repeat(4, 1fr); gap: var(--space-m); }
  .tangerine-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .header { padding: 0 var(--space-xl); }
  .grid-container { grid-template-columns: repeat(4, 1fr); }
  .line-secondary .line-track { gap: var(--space-m); }
  .line-secondary .line-item { flex: 0 0 calc((100% - 3 * var(--space-m)) / 4); }
  .line-secondary .line-placeholder { flex: 0 0 calc((100% - 3 * var(--space-m)) / 4); }
  .line-tertiary .line-track { gap: var(--space-m); }
  .line-tertiary .line-item { flex: 0 0 calc((100% - 3 * var(--space-m)) / 4); }
  .line-tertiary .line-placeholder { flex: 0 0 calc((100% - 3 * var(--space-m)) / 4); }
}

@media (max-width: 768px) {
  :root { --space-row: var(--space-xl); }
  .header { padding: 0 var(--space-l); }
  .detail-modal { width: 80vw; max-width: 640px; }
  .grid-container { grid-template-columns: repeat(3, 1fr); }
  .line-secondary .line-item { flex: 0 0 calc((100% - 2 * var(--space-m)) / 3); }
  .line-secondary .line-placeholder { flex: 0 0 calc((100% - 2 * var(--space-m)) / 3); }
  .line-tertiary .line-item { flex: 0 0 calc((100% - 2 * var(--space-m)) / 3); }
  .line-tertiary .line-placeholder { flex: 0 0 calc((100% - 2 * var(--space-m)) / 3); }
  .skeleton-line-track .skeleton-tile { flex: 0 0 calc((100% - 2 * var(--space-m)) / 3); }
  .skeleton-tangerine-row { grid-template-columns: repeat(2, 1fr); }
  .skeleton-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
  :root { --space-row: var(--space-l); }
  body { padding: 1rem var(--space-m) calc(1rem + env(safe-area-inset-bottom)) var(--space-m); }
  .header { padding: 0 var(--space-m); }
  .hero {
    width: calc(100% + 2 * var(--space-m));
    margin-left: calc(-1 * var(--space-m));
    margin-right: calc(-1 * var(--space-m));
    margin-top: 3rem;
    height: auto;
    display: flex;
    flex-direction: column;
    background: var(--color-background);
    padding-top: 1rem;
  }
  .hero-slide { height: auto; }
  .hero-item { height: auto; display: flex; flex-direction: column; }
  .hero-image-wrapper {
    position: relative;
    top: auto;
    bottom: auto;
    right: auto;
    height: auto;
    width: 70vw;
    max-width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 1rem;
    order: 1;
    margin: 0 auto;
  }
  .hero-image-wrapper img { object-fit: contain; object-position: center; }
  .hero-image-wrapper img.yt { transform: scale(2.85) scaleY(1.07); transform-origin: center; }
  .hero-image-wrapper img.yt-alt { object-fit: cover; object-position: center; }
  .hero-text {
    position: relative;
    bottom: auto;
    left: auto;
    padding: var(--space-s);
    max-width: 100%;
    pointer-events: auto;
    order: 2;
    background: var(--color-background);
    align-self: stretch;
  }
  .hero-text .title {
    font-size: var(--font-display2);
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .hero-text .subheading { font-size: var(--font-title2); }
  .hero-text .hero-meta { font-size: var(--font-callout); }
  .hero-text .hero-plot { display: none; }
  .hero-actions {
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
    margin-top: 0.75rem;
  }
  .hero-btn { padding: 8px 14px; font-size: var(--font-callout); }
  .line-secondary .line-track { gap: var(--space-m); }
  .line-secondary .line-item { flex: 0 0 calc(66.666% - 16px); }
  .line-secondary .line-placeholder { flex: 0 0 calc(66.666% - 16px); }
  .line-tertiary .line-track { gap: var(--space-m); }
  .line-tertiary .line-item { flex: 0 0 calc(66.666% - 16px); }
  .line-tertiary .line-placeholder { flex: 0 0 calc(66.666% - 16px); }
  .line-item .title { font-size: var(--font-callout); }
  .line-header h2 { font-size: var(--font-title2); }
  .tangerine-row { grid-template-columns: 1fr; gap: var(--space-m); }
  .grid-container { gap: var(--space-m); grid-template-columns: repeat(2, 1fr); }
  .grid-item .title { font-size: var(--font-callout); }
  .detail-modal-overlay { padding: 0; align-items: flex-end; background: rgba(0, 0, 0, 0.6); }
  .detail-modal {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    aspect-ratio: auto;
    max-height: 90vh;
    border-radius: 20px 20px 0 0;
  }
  .detail-modal-handle { display: block; }
  .detail-modal-image-wrapper { flex: 0 0 auto; aspect-ratio: 16 / 9; }
  .detail-modal-image-wrapper img.yt { transform: scale(2.3); }
  .detail-modal-content { padding: var(--space-s); }
  .detail-modal-actions {
    padding: var(--space-s);
    padding-bottom: calc(var(--space-s) + env(safe-area-inset-bottom));
  }
  .settings-modal-overlay { padding: 0; align-items: flex-end; background: rgba(0, 0, 0, 0.6); }
  .settings-modal {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    max-height: 90vh;
    border-radius: 20px 20px 0 0;
  }
  .settings-modal-scroll {
    padding-top: var(--space-m);
    padding-bottom: calc(var(--space-m) + env(safe-area-inset-bottom));
  }
  .settings-modal-handle { display: block; }
  .skeleton-line-track { gap: var(--space-m); }
  .skeleton-line-track .skeleton-tile { flex: 0 0 calc(66.666% - 16px); }
  .skeleton-grid { grid-template-columns: repeat(2, 1fr); }
  .skeleton-tangerine-row { grid-template-columns: 1fr; }
  .skeleton-hero {
    height: 60vh;
    margin: 0 calc(-1 * var(--space-m));
    width: calc(100% + 2 * var(--space-m));
  }
  .skeleton-hero-text {
    position: relative;
    bottom: auto;
    left: auto;
    padding: var(--space-s);
    max-width: 100%;
    order: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton::after,
  .skeleton-tile::after,
  .skeleton-hero::after {
    animation: none;
    background: none;
  }
  .spinner {
    animation: none;
    border-color: var(--color-hdr-ftr);
    border-top-color: var(--color-hdr-ftr);
    opacity: 0.5;
  }
  .fade-in { animation: none; }
}

@media (max-width: 600px) {
  .header {
    padding: env(safe-area-inset-top) var(--space-m) 0 var(--space-m);
    height: calc(var(--header-height) + env(safe-area-inset-top));
  }
}

.apple-sign-in-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  width: 100%;
  padding: var(--space-s);
  background: #000;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: var(--font-callout);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}
.apple-sign-in-btn:hover { background: #1d1d1f; }
.apple-sign-in-btn:active { transform: scale(0.98); }
.apple-sign-in-btn svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}


.paywall-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: var(--color-background);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-l);
}
.paywall {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-s);
  width: 100%;
  max-width: 380px;
  text-align: center;
}
.paywall-title {
  font-family: 'Monoton', sans-serif;
  font-size: 2.5rem;
  color: var(--color-body-1);
  line-height: 1;
}
.paywall-subtitle {
  font-size: var(--font-callout);
  color: var(--color-body-2);
  margin-bottom: var(--space-s);
}
.paywall-price {
  font-size: var(--font-title3);
  font-weight: 600;
  color: var(--color-body-1);
  margin-bottom: var(--space-s);
}
.paywall-buy {
  width: 100%;
  padding: var(--space-s);
  background: var(--color-watch-btn);
  color: var(--color-on-dark);
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: var(--font-callout);
  font-weight: 600;
  cursor: pointer;
}
.paywall-buy:hover { background: var(--color-watch-btn-hvr); }
.paywall-buy:disabled { opacity: 0.5; cursor: not-allowed; }
.paywall-restore {
  background: none;
  border: none;
  color: var(--color-body-2);
  font-family: inherit;
  font-size: var(--font-callout);
  cursor: pointer;
  padding: var(--space-xs);
}
.paywall-restore:hover { color: var(--color-body-1); }
.paywall-legal {
  margin-top: var(--space-s);
  font-size: var(--font-caption1);
  color: var(--color-hdr-ftr);
}
.paywall-legal a {
  color: var(--color-hdr-ftr);
  text-decoration: underline;
}