@font-face {
  font-family: Unbounded;
  src: url('/assets/Unbounded-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap
}
/* One system for discovery, the personal library and film pages. */
:root {
  color-scheme: dark;
  --bg: #101014;
  --surface: #1a1a21;
  --raised: #23232d;
  --line: #303039;
  --muted: #aaaab8;
  --text: #f3f2f7;
  --accent: #c4a2ff;
  --fill: #8c50e9;
  --display: Unbounded, system-ui, sans-serif;
  --control-height: 44px;
  --compact-control-height: 40px;
  --control-radius: 10px;
  --control-gap: 8px;
  --group-gap: 16px
}
* {
  box-sizing: border-box
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif
}
button, input, select, textarea {
  font: inherit
}
a, button, input, select, textarea {
  -webkit-tap-highlight-color: transparent
}
button, a {
  touch-action: manipulation
}
button {
  cursor: pointer;
  color: inherit;
  border: 1px solid var(--line);
  background: var(--surface);
  min-height: var(--control-height);
  padding: 10px 16px;
  border-radius: var(--control-radius);
  transition: background .15s, border-color .15s
}
button:hover {
  background: var(--raised);
  border-color: #696978
}
button:disabled {
  opacity: .45;
  cursor: wait
}
a {
  color: inherit;
  text-decoration: none
}
a:hover {
  color: var(--accent)
}
svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0
}
img {
  display: block;
  max-width: 100%;
  object-fit: cover
}
h1, h2, h3, h4, p {
  margin-top: 0
}
h1, h2, h3 {
  line-height: 1.25;
  letter-spacing: -.025em
}
h1 {
  font-size: 30px;
  margin-bottom: 0;
  font-weight: 700
}
h2 {
  font-size: 25px
}
h3 {
  font-size: 20px
}
input, select, textarea {
  color: var(--text);
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  min-height: var(--control-height);
  padding: 10px 12px;
  min-width: 0
}
input::placeholder, textarea::placeholder {
  color: #9494a4
}
textarea {
  resize: vertical
}
input[type=checkbox] {
  width: 18px;
  height: 18px;
  min-height: 0;
  accent-color: var(--fill);
  padding: 0;
  flex-shrink: 0
}
fieldset {
  min-width: 0
}
.primary {
  background: var(--fill);
  border-color: var(--fill);
  color: white;
  font-weight: 600
}
.primary:hover {
  background: #9150e9;
  border-color: #9150e9
}
.secondary {
  background: var(--surface)
}
.text-button {
  border: 0;
  background: transparent;
  padding: 10px 0;
  color: var(--muted);
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px
}
.text-button:hover {
  background: transparent;
  color: var(--text)
}
.text-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px
}
.muted, .footnote, .original-title, .genre-line {
  color: var(--muted)
}
.accent {
  color: var(--accent)
}
.remove {
  color: #f49caa
}
.eyebrow {
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--muted)
}
/* Navigation follows the two tasks: find a film, return to your films. */
.shell {
  min-height: 100dvh
}
.sidebar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 48px;
  min-height: 72px;
  padding: 10px max(32px, calc((100vw - 1280px)/2));
  background: #101014f5;
  border-bottom: 1px solid #ffffff0b
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  font: 700 17px/1.3 var(--display);
  letter-spacing: -.06em
}
.brand img {
  width: 30px;
  height: 30px;
  border-radius: 7px
}
.edition, .back-link {
  display: none
}
.navigation {
  display: flex;
  align-items: center;
  gap: 8px
}
.navigation a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 16px;
  color: var(--muted);
  font-weight: 500;
  font-size: 15px;
  border-radius: 10px
}
.navigation a[aria-current] {
  color: var(--text);
  background: var(--raised)
}
.count {
  font-size: 11px;
  color: var(--muted)
}
.sidebar-bottom {
  margin-left: auto;
  display: flex;
  align-items: center
}
.account {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  background: none;
  border: 0;
  padding: 10px
}
.random-link {
  font-size: 13px;
  color: var(--muted)
}
main {
  max-width: 1280px;
  margin: auto;
  padding: 16px 32px 72px;
  min-width: 0
}
.section-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 0 0 16px;
  border-bottom: 1px solid #ffffff0b;
  overflow-x: auto;
  scrollbar-width: none
}
.section-nav a {
  padding: 8px 0 10px;
  min-height: 44px;
  white-space: nowrap;
  font-size: 14px;
  color: var(--muted);
  border-bottom: 2px solid transparent
}
.section-nav a[aria-current] {
  color: var(--text);
  border-color: var(--accent)
}
.section-nav span {
  font-size: 12px;
  margin-left: 4px;
  color: var(--muted)
}
.page-header {
  margin: 0 0 18px
}
.page-header .eyebrow, .issue {
  display: none
}
.section-description {
  color: var(--muted);
  font-size: 15px;
  max-width: 640px;
  margin-bottom: 24px
}
.section-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap
}
.section-tools>.section-description {
  margin: 0;
  flex: 1
}
.segments {
  display: flex;
  gap: 8px;
  flex-wrap: wrap
}
.segments button {
  font-size: 14px;
  color: var(--muted);
  border-color: transparent;
  background: none
}
.segments button[aria-pressed=true] {
  background: var(--raised);
  color: var(--text)
}
/* Catalogue: generous poster grid, quiet controls, filters on request. */
.catalog-hero {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-bottom: 16px;
}
.catalog-heading {
  flex-shrink: 0;
  max-width: 44%;
}
.catalog-hero .catalog-search {
  flex: 1;
  margin-bottom: 0;
}
@media(max-width:900px) {
  .catalog-hero { display: block; }
  .catalog-heading { max-width: none; margin-bottom: 20px; }
}
.catalog-search {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 6px 6px 18px;
  border: 1px solid #454550;
  border-radius: 14px;
  background: var(--surface);
  max-width: 820px;
  margin-bottom: 12px
}
.catalog-search svg {
  color: var(--muted)
}
.catalog-search input {
  border: 0;
  outline-offset: 0;
  background: none;
  padding: 8px 0;
  flex: 1;
  font-size: 16px
}
.catalog-search button {
  min-width: 88px
}
.discovery-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 18px;
  font-size: 13px
}
.discovery-shortcuts>span {
  color: var(--muted);
  margin-right: 4px
}
.discovery-shortcuts a {
  padding: 7px 12px;
  background: var(--surface);
  border-radius: 20px;
  min-height: 36px;
  display: flex;
  align-items: center
}
.discovery-shortcuts .shortcut-all {
  color: var(--accent);
  background: none
}
.catalog-filter-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 16px
}
.toggle-filters {
  font-size: 14px;
  background: none
}
.active-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap
}
.filter-chip {
  font-size: 13px;
  background: #2a203b;
  color: #e1cfff;
  border-color: transparent;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 20px
}
.catalog-filter-controls:has(.active-filters[hidden]) {
  display: none
}
.catalog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px
}
.catalog-content {
  min-width: 0
}
.catalog-filters {
  display: none
}

.filters-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  grid-column: 1/-1
}
.filters-heading h2 {
  font-size: 18px;
  margin: 0
}
.filters-heading .text-button {
  min-height: 32px;
  padding: 0
}
.catalog-field {
  display: grid;
  gap: 8px
}
.catalog-field label, .catalog-filters legend {
  font-size: 13px;
  color: var(--muted)
}
.catalog-field select {
  width: 100%;
  background: var(--bg);
  font-size: 14px
}
.catalog-filters fieldset {
  border: 0;
  padding: 0;
  margin: 0
}
.catalog-filters legend {
  margin-bottom: 8px
}
.year-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: center
}
.year-fields input {
  width: 100%;
  background: var(--bg);
  font-size: 14px;
  padding: 10px
}
.year-fields span {
  color: var(--muted)
}
.filter-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  min-height: 44px
}
.apply-filters {
  justify-self: end;
  grid-column: -2;
  font-size: 14px
}
.catalog-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 0 0 20px;
  min-height: 44px
}
.catalog-toolbar p {
  margin: 0 auto 0 0;
  font-size: 14px;
  color: var(--muted)
}
.catalog-order {
  display: flex;
  gap: 12px;
  align-items: center
}
.catalog-order select {
  font-size: 13px;
  border: 0;
  background: none;
  max-width: 200px
}
.view-switch {
  display: flex;
  background: var(--surface);
  border-radius: 10px;
  padding: 2px
}
.view-switch button {
  border: 0;
  background: none;
  color: var(--muted);
  padding: 4px 10px;
  font-size: 20px;
  min-width: 40px;
  min-height: var(--control-height);
  border-radius: 7px
}
.view-switch button[aria-pressed=true] {
  background: #3a3448;
  color: var(--text)
}
.movie-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 32px 20px
}
.movie-tile {
  position: relative;
  min-width: 0;
  align-self: start
}
.tile-open {
  display: block;
  border: 0;
  background: none;
  width: 100%;
  padding: 0;
  text-align: left;
  min-width: 0
}
.tile-open:hover {
  background: none
}
.tile-cover, .film-poster {
  position: relative;
  overflow: hidden;
  background: var(--raised);
  border-radius: 12px;
  isolation: isolate
}
.tile-cover {
  aspect-ratio: 2/3
}
.tile-cover img, .film-poster img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
  z-index: 1
}
/* Обложка трейлера вместо постера (см. stillCrop в app.js). */
.is-still img {
  top: var(--still-top, 0);
  bottom: auto;
  height: var(--still-height, 100%);
  object-fit: cover;
  object-position: var(--still-x, 50%) 50%
}
.tile-fallback, .poster-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 20px;
  text-align: center;
  font-weight: 600;
  color: var(--muted)
}
.tile-rating, .tile-personal-rating, .tile-saved {
  position: absolute;
  z-index: 2;
  bottom: 10px;
  left: 10px;
  background: #111018e8;
  color: #f9f3ff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 7px;
  border-radius: 6px
}
.tile-personal-rating {
  left: auto;
  right: 10px;
  background: #6c3dab
}
.tile-saved {
  display: none
}
.tile-info {
  padding-top: 12px;
  padding-right: 0
}
.tile-info h3 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
  margin: 0 0 5px;
  overflow-wrap: anywhere
}
.tile-info p {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 3px;
  line-height: 1.5
}
.tile-genres {
  font-size: 12px!important
}
.tile-tools {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: flex;
  gap: 4px
}
.tile-tools .tile-save, .movie-more {
  width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #17141de8;
  color: #fff;
  box-shadow: 0 2px 8px #0003;
  font-size: 25px
}
.tile-tools .tile-save:hover, .movie-more:hover {
  background: #59416d
}
.tile-tools .tile-save.is-saved {
  background: #7751a9
}
.movie-more {
  font-size: 16px
}
.tile-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap
}
.tile-actions button {
  font-size: 14px
}
.tile-rate {
  font-size: 14px;
  color: var(--accent);
  background: none;
  border: 0;
  text-align: left
}
.movie-grid.as-list {
  display: flex;
  flex-direction: column;
  gap: 0
}
.as-list .movie-tile {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 18px 0;
  width: 100%;
  border-bottom: 1px solid #ffffff0d
}
.as-list .tile-open {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 20px;
  align-items: center
}
.as-list .tile-info {
  padding: 0
}
.as-list .tile-info h3 {
  font-size: 18px
}
.as-list .tile-cover {
  width: 80px;
  border-radius: 8px
}
.as-list .tile-rating {
  font-size: 10px;
  bottom: 5px;
  left: 5px;
  padding: 3px 5px
}
.as-list .tile-personal-rating {
  display: none
}
.as-list .tile-tools {
  position: static;
  padding: 0
}
.as-list .tile-tools button {
  background: var(--surface);
  box-shadow: none;
  border-radius: 10px
}
.as-list .movie-select {
  grid-column: 1/-1
}
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin-top: 36px;
  padding-top: 24px
}
.pagination span {
  font-size: 13px;
  color: var(--muted)
}
.pagination button {
  font-size: 14px
}
.active-shelf {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  background: var(--surface);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 24px
}
.active-shelf h2 {
  font-size: 22px;
  margin: 4px 0
}
.active-shelf .eyebrow {
  margin: 0;
  font-size: 10px
}
.active-shelf button {
  white-space: nowrap
}
.plus-checked {
  color: var(--accent)!important;
  font-size: 12px!important
}
/* Collections, curations and selection. */
.shelf-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 24px
}
.shelf-tile {
  border: 0;
  background: none;
  text-align: left;
  padding: 0;
  min-width: 0
}
.shelf-tile:hover {
  background: none
}
.shelf-cover {
  display: flex;
  aspect-ratio: 2/1;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(140deg, #4b3869, #252332);
  position: relative
}
.shelf-cover img {
  height: 100%;
  flex: 1;
  width: 0;
  min-width: 0;
  object-fit: cover
}
.shelf-cover:empty::after {
  content: 'cinemarium';
  font: 700 22px var(--display);
  color: #d0b6f2;
  position: absolute;
  left: 20px;
  bottom: 20px;
  letter-spacing: -.06em
}
.shelf-color-1 {
  background: linear-gradient(120deg, #57414e, #272b42)
}
.shelf-color-2 {
  background: linear-gradient(120deg, #454062, #303649)
}
.shelf-color-3 {
  background: linear-gradient(120deg, #30534b, #252d40)
}
.shelf-tile h3 {
  font-size: 20px;
  margin: 16px 0 8px
}
.shelf-tile p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0
}
.curated-tabs {
  margin: 0 0 24px
}
.personal-gate {
  padding: 40px;
  border-radius: 18px;
  background: var(--surface);
  display: flex;
  justify-content: space-between;
  gap: 32px;
  align-items: center
}
.personal-gate h2 {
  font-size: 25px;
  margin-bottom: 12px
}
.personal-gate p {
  max-width: 480px;
  color: var(--muted);
  margin: 0;
  font-size: 15px
}
.gate-actions {
  display: grid;
  gap: 8px;
  flex-shrink: 0
}
.collection-tools {
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 16px
}
.collection-tools button, .collection-tools a {
  font-size: 13px
}
.collection-tools #refresh-collection {
  margin-left: auto;
  font-size: 22px;
  padding: 0 10px
}

.unrated-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
  font-size: 14px;
  color: var(--muted)
}
.collection-query {
  width: 100%;
  max-width: 620px;
  margin-bottom: 28px;
  font-size: 15px
}
.movie-select {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  margin-bottom: 8px;
  min-height: 44px;
  white-space: nowrap;
  cursor: pointer
}
/* Both poster overlays follow the selection row, including the info button. */
.movie-tile:has(.movie-select) .tile-tools,
.movie-tile:has(.movie-select) > .movie-info {
  top: 60px
}
.as-list .movie-tile:has(.movie-select) .tile-tools {
  top: auto
}
.movie-tile.is-selected {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
  border-radius: 12px
}
.bulk-bar {
  position: sticky;
  top: 90px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 18px;
  background: #2b223c;
  border-radius: 14px;
  margin-bottom: 24px;
  box-shadow: 0 8px 30px #0004
}
.bulk-bar p {
  margin: 0;
  font-size: 14px
}
.bulk-bar button, .bulk-bar select {
  font-size: 13px
}
.bulk-bar #bulk-hint {
  width: 100%
}
.is-dragging {
  opacity: .4
}
.list-detail-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: start;
  margin: 16px 0
}
.list-title-copy { flex-basis: 100%; min-width: 0; }
.list-detail-heading h1 {
  margin: 0 0 8px
}
.list-detail-heading p {
  font-size: 14px;
  white-space: pre-line
}
.list-detail-heading>button {
  font-size: 14px
}
.list-detail-heading>button:first-child {
  flex-basis: 100%;
  justify-content: flex-start
}
.list-form {
  display: grid;
  gap: 12px
}
.list-form label {
  font-size: 14px;
  color: var(--muted)
}
.list-form h2 {
  margin-bottom: 12px
}
.list-form .primary {
  margin-top: 8px
}
#list-order-hint {
  font-size: 13px
}
.list-picker {
  padding: 20px;
  background: var(--raised);
  border-radius: 12px;
  margin: 20px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap
}
.list-picker h3 {
  width: 100%;
  margin: 0
}
.list-picker select {
  flex: 1;
  min-width: 140px
}
.list-picker p {
  font-size: 14px
}
.order-button {
  min-width: 44px
}
.choice-controls {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center
}
.choice-controls label {
  font-size: 14px
}
.choice-controls .filter-toggle {
  display: flex
}
.choice-controls input {
  accent-color: var(--fill)
}
#choice-results {
  margin: 24px 0;
  grid-template-columns: repeat(3, minmax(0, 1fr))
}
#choice-status {
  font-size: 14px
}

.tonight-status {
  font-size: 16px;
  margin-bottom: 8px
}
.tonight-grid {
  max-width: 960px;
  margin-bottom: 24px
}
.tonight-overview {
  color: #d5d4df!important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.6!important;
  margin-top: 8px!important
}
.tonight-reason {
  color: var(--accent)!important;
  font-size: 13px!important;
  margin-top: 8px!important
}
.tonight-alternatives {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0
}
.footnote {
  font-size: 13px;
  margin-top: 24px
}
.desktop-hint {
  font-size: 13px;
  color: var(--muted)
}
#choose {
  max-width: 900px;
  margin: auto
}
.film-card {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  overflow: hidden;
  background: var(--surface);
  border-radius: 18px;
  min-height: 440px
}
.film-card>.film-poster {
  border-radius: 0
}
.film-copy {
  padding: 32px
}
.film-copy h2 {
  font-size: 30px
}
.reason {
  font-size: 12px;
  color: var(--accent)
}
.overview {
  font-size: 15px;
  line-height: 1.8
}
.details-link {
  background: none;
  color: var(--accent);
  border: 0;
  padding-left: 0
}
.deck-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px
}
.vote {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px
}
.vote.save {
  background: #64418b;
  border-color: #64418b
}
.metadata {
  display: flex;
  gap: 8px 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px
}
.original-title {
  font-size: 14px;
  margin-bottom: 14px
}
.genre-line {
  font-size: 14px;
  margin: 12px 0
}
.poster-index {
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: 2;
  font-size: 10px;
  background: #101014cc;
  padding: 8px
}
/* Film page: description and decisions first, supporting information below. */
dialog {
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 0;
  width: min(600px, calc(100% - 40px));
  max-height: 90dvh;
  overscroll-behavior: contain;
  box-shadow: 0 24px 100px #0008
}
dialog::backdrop {
  background: #08080cba;
  backdrop-filter: blur(5px)
}
body:has(dialog[open]) {
  overflow: hidden
}
.dialog-top {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 24px;
  border-bottom: 1px solid #ffffff0b;
  background: #101014f5;
  backdrop-filter: blur(16px)
}
.dialog-top>span {
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--muted)
}
.icon-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: none;
  border-radius: 50%;
  margin-left: auto
}
.icon-button svg {
  width: 20px;
  height: 20px
}
#detail {
  width: min(1040px, calc(100% - 64px))
}
#detail-back {
  font-size: 14px;
  color: var(--text)
}
#copy-movie-link {
  margin-left: auto;
  font-size: 13px
}
#detail .icon-button {
  margin-left: 0
}
.detail-hero {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 12px 28px;
  padding: 24px 32px
}
.detail-hero>.film-poster {
  grid-column: 1;
  grid-row: 1/3;
  aspect-ratio: 2/3;
  align-self: start
}
.detail-hero>div:not(.film-poster) {
  min-width: 0
}
.detail-hero h2 {
  font-size: 32px;
  line-height: 1.25;
  margin-bottom: 10px
}
.hero-overview {
  font-size: 16px;
  line-height: 1.8;
  margin: 20px 0
}
.detail-body {
  padding: 0 32px 32px
}
.movie-section {
  padding: 32px 0;
  border-top: 1px solid #ffffff0d;
  scroll-margin-top: 90px
}
.movie-section h3 {
  font-size: 22px;
  margin: 0 0 20px
}
.movie-section h4 {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
  margin: 24px 0 12px
}
.movie-section p {
  font-size: 15px;
  line-height: 1.7
}
.movie-section:last-child {
  padding-bottom: 0
}
.person-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap
}
.person-link {
  font-size: 14px;
  background: var(--surface);
  border: 0;
  padding: 9px 12px
}
.person-list {
  padding: 0;
  list-style: none
}
.person-list li {
  padding: 8px 0
}
.facts {
  padding-left: 22px;
  font-size: 15px;
  line-height: 1.8
}
.facts li {
  padding-left: 6px;
  margin-bottom: 16px
}
.facts .show-more-row {
  list-style: none;
  padding-left: 0
}
.show-more {
  color: var(--accent);
  font-size: 14px
}
.trailer-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px
}
.trailer-controls button {
  font-size: 14px
}
.trailer-controls button[aria-pressed=true] {
  background: #3a2b50;
  border-color: #72568e
}
.trailer-stage {
  aspect-ratio: 16/9;
  background: var(--surface);
  overflow: hidden;
  border-radius: 14px
}
.trailer-stage iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0
}
.trailer-placeholder {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 100%;
  padding: 24px;
  background: radial-gradient(ellipse at center, #322640, #1a1a21 75%)
}
.play-symbol {
  font-size: 52px;
  color: var(--accent);
  line-height: 1
}
.trailer-placeholder p {
  font-size: 14px;
  color: var(--muted);
  margin: 14px 0 0
}
.player-fallback {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
  margin-top: 14px
}
.watch-heading {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px
}
.watch-heading h3 {
  margin: 0
}
.watch-heading select {
  font-size: 13px;
  max-width: 220px
}
.watch-providers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px
}
.provider-card {
  padding: 18px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  border: 1px solid #574569;
  border-radius: 12px;
  background: #272031
}
.provider-card strong {
  font-size: 16px
}
.provider-card>span:not(.provider-arrow) {
  grid-row: 2;
  font-size: 13px;
  color: var(--muted)
}
.provider-arrow {
  grid-column: 2;
  grid-row: 1/3;
  align-self: center;
  color: var(--accent);
  font-size: 22px
}
.watch-status {
  color: #dbd1e7
}
.availability-date, .watch-explanation {
  font-size: 13px!important;
  color: var(--muted);
  line-height: 1.7
}
.check-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px
}
.check-link {
  font-size: 14px;
  padding: 10px 14px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: 10px;
  background: var(--surface)
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px 16px
}
.related-tile {
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
  min-width: 0;
  align-self: start
}
.related-tile:hover {
  background: none
}
.related-tile strong {
  display: block;
  font-size: 14px;
  line-height: 1.5;
  margin: 10px 0 4px
}
.related-tile>span {
  display: block;
  font-size: 12px;
  color: var(--muted)
}
.related-section>h3:not(:first-child) {
  margin-top: 32px
}
.recent-movies {
  margin-top: 48px
}
.recent-movies h2 {
  font-size: 22px;
  margin-bottom: 20px
}
.recent-movies .related-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr))
}
.rating-control {
  border: 0;
  padding: 0;
  margin: 12px 0 0
}
.rating-control legend {
  font-size: 14px;
  margin-bottom: 12px
}
.rating-scale {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 6px
}
.rating-score {
  padding: 8px 0;
  font-size: 14px
}
.rating-score[aria-pressed=true] {
  background: var(--fill);
  border-color: var(--fill);
  color: white
}
.rating-control-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 8px
}
.rating-explanation {
  font-size: 12px;
  color: var(--muted)
}
.clear-rating {
  font-size: 12px
}
.rating-row {
  display: flex;
  align-items: center;
  gap: 14px
}
.note-form {
  display: grid;
  gap: 12px
}
.note-form textarea {
  width: 100%;
  min-height: 110px;
  font-size: 15px
}
.note-form button {
  justify-self: start
}
.note-hint {
  font-size: 13px!important;
  color: var(--accent);
  margin: 0
}
.note-warning {
  position: sticky;
  top: var(--dialog-top, 69px);
  z-index: 4
}
.profile-body {
  padding: 28px
}
.profile-body h2 {
  font-size: 25px;
  margin-bottom: 16px
}
.profile-body p {
  font-size: 14px;
  line-height: 1.7
}
.providers {
  display: grid;
  gap: 10px;
  margin-top: 24px
}
.providers button {
  width: 100%;
  font-size: 15px
}
.legal-note {
  font-size: 12px!important;
  color: var(--muted);
  margin-top: 24px
}
.legal-note a {
  text-decoration: underline
}
.subscriptions {
  padding: 20px;
  background: var(--surface);
  border-radius: 12px;
  margin: 24px 0
}
.subscriptions h3 {
  font-size: 18px;
  margin-bottom: 14px
}
.subscriptions p {
  font-size: 13px!important
}
.subscriptions button {
  font-size: 14px
}
.profile-body>details {
  border-top: 1px solid var(--line);
  padding: 16px 0;
  font-size: 14px
}
.profile-body summary {
  cursor: pointer;
  min-height: 44px
}
.profile-body details form {
  display: grid;
  gap: 12px
}
.quick-list-options {
  display: grid;
  gap: 10px;
  margin: 24px 0
}
.quick-list-option {
  text-align: left;
  font-size: 14px
}
.quick-list-option:disabled {
  color: var(--accent)
}
#quick-lists, #movie-actions {
  max-width: 500px
}
#quick-rating {
  max-width: 620px
}
#list-editor {
  max-width: 600px
}
#list-choice {
  max-width: 1000px;
  width: calc(100% - 40px)
}
#movie-actions-content .tile-actions {
  display: grid;
  gap: 10px
}
#movie-actions-content button {
  width: 100%;
  text-align: left;
  min-height: 44px
}
#movie-actions-content .tile-rate {
  margin-top: 12px
}
#list-initial-movie {
  color: var(--accent)
}
/* Feedback and accessibility. */
.empty {
  grid-column: 1/-1;
  width: 100%;
  padding: 48px 24px;
  background: var(--surface);
  border-radius: 16px;
  text-align: center
}
.empty h2 {
  font-size: 23px;
  margin-bottom: 12px
}
.empty p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 20px
}
.empty button {
  font-size: 14px
}
.empty>.text-button {
  display: flex;
  margin: 12px auto 0
}
.notice {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  background: #35253b;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
  font-size: 14px
}
.notice button {
  font-size: 13px
}
.dialog-notice {
  margin: 16px 24px
}
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  background: #e9ddfa;
  color: #241a32;
  box-shadow: 0 8px 40px #0006;
  border-radius: 14px;
  padding: 14px 20px;
  max-width: calc(100vw - 32px);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 16px
}
.toast-action {
  background: none;
  border-color: #695979;
  color: #241a32;
  min-height: 36px;
  padding: 6px 12px;
  font-size: 13px
}
.search-correction {
  white-space: normal
}
.svg-library {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap
}
.noscript {
  position: fixed;
  inset: 0;
  padding: 40px;
  background: var(--bg);
  z-index: 20
}
[hidden] {
  display: none!important
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px
}
[aria-busy=true] {
  opacity: .6
}
@media(max-width:1100px) {
  .sidebar {
    gap: 24px
  }
  .account>span {
    display: none
  }
  .movie-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr))
  }

  .shelf-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }
  .detail-hero {
    grid-template-columns: 160px minmax(0, 1fr)
  }
  .detail-hero h2 {
    font-size: 28px
  }

  .recent-movies .related-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr))
  }
}
@media(max-width:760px) {
  /* 16px fields keep iOS Safari from zooming the page on focus. */
  input, select, textarea {
    font-size: 16px!important;
  }

  .sidebar {
    padding: 12px 20px;
    min-height: 64px;
    gap: 16px
  }
  .brand {
    font-size: 16px
  }
  .brand img {
    width: 28px;
    height: 28px
  }
  .navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 5;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px max(8px, env(safe-area-inset-bottom));
    background: #19191ff8;
    border-top: 1px solid #ffffff12;
    backdrop-filter: blur(16px)
  }
  .navigation a {
    flex: 1;
    justify-content: center;
    max-width: 260px;
    gap: 10px;
    font-size: 14px;
    padding: 10px 12px;
    min-height: 48px
  }
  .navigation a[aria-current] {
    background: #352a47;
    color: #e3d0ff
  }
  .navigation .count {
    display: none
  }
  .account {
    padding: 4px;
    min-width: 44px
  }
  .account svg {
    width: 22px;
    height: 22px
  }
  main {
    padding: 16px 20px 112px
  }
  .section-nav {
    margin-bottom: 24px;
    gap: 24px
  }
  .section-nav a {
    font-size: 14px;
    min-height: 44px;
    padding-bottom: 12px
  }
  .page-header {
    margin-bottom: 20px
  }
  h1 {
    font-size: 28px
  }
  .catalog-search {
    gap: 10px;
    padding-left: 14px;
    margin-bottom: 14px
  }
  .catalog-search input {
    font-size: 15px
  }
  .catalog-search button {
    font-size: 14px;
    min-width: 72px;
    padding: 10px 14px
  }
  .catalog-search svg {
    width: 20px;
    height: 20px
  }
  .discovery-shortcuts {
    margin-bottom: 24px;
    gap: 8px
  }
  .discovery-shortcuts>span {
    width: 100%;
    margin-bottom: 2px
  }
  .discovery-shortcuts .shortcut-all {
    padding-left: 0
  }
  .catalog-layout {
    gap: 16px
  }

  .catalog-toolbar {
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px
  }
  .catalog-toolbar p {
    font-size: 13px
  }
  .catalog-order {
    margin-left: auto;
    gap: 8px
  }
  .catalog-order select {
    font-size: 12px;
    padding: 8px 4px;
    max-width: 180px
  }
  .view-switch button {
    min-width: 40px;
    min-height: 40px
  }
  .movie-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px 16px
  }
  .tile-info h3 {
    font-size: 15px
  }
  .tile-info p {
    font-size: 13px
  }
  .tile-cover {
    border-radius: 10px
  }
  .tile-tools {
    top: 6px;
    right: 6px
  }
  .tile-rating, .tile-personal-rating {
    font-size: 11px;
    bottom: 8px;
    left: 8px
  }
  .tile-personal-rating {
    left: auto;
    right: 8px
  }
  .tile-tools .tile-save, .movie-more {
    width: 44px;
    min-height: 44px
  }
  .as-list .movie-tile {
    gap: 12px;
    padding: 16px 0
  }
  .as-list .tile-open {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 16px
  }
  .as-list .tile-cover {
    width: 72px
  }
  .as-list .tile-info h3 {
    font-size: 17px
  }
  .as-list .tile-tools {
    gap: 4px
  }
  .as-list .tile-tools button {
    width: 40px;
    min-height: 44px
  }
  .shelf-grid {
    gap: 28px 20px
  }
  .shelf-tile h3 {
    font-size: 19px
  }
  .shelf-tile p {
    font-size: 14px
  }
  .curated-tabs {
    gap: 4px
  }
  .curated-tabs button {
    padding: 8px 12px
  }
  .personal-gate {
    padding: 24px;
    flex-direction: column;
    align-items: start;
    gap: 24px
  }
  .personal-gate h2 {
    font-size: 23px
  }
  .gate-actions {
    width: 100%
  }
  .collection-tools {
    gap: 8px
  }
  .collection-tools button, .collection-tools a {
    font-size: 13px
  }

  .unrated-filter {
    font-size: 13px
  }

  .collection-query {
    margin-bottom: 24px
  }
  .bulk-bar {
    top: 72px;
    padding: 14px
  }
  .bulk-bar select {
    max-width: 100%;
    flex: 1
  }
  .bulk-bar .primary {
    width: 100%
  }
  .list-detail-heading {
    gap: 12px
  }
  .list-detail-heading>div {
    min-width: 100%
  }
  .list-detail-heading h1 {
    font-size: 24px
  }

  .tonight-overview {
    font-size: 14px!important
  }
  .tonight-status {
    font-size: 15px
  }
  #choice-results {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }
  .film-card {
    grid-template-columns: 1fr 1.2fr;
    min-height: 360px
  }
  .film-copy {
    padding: 24px
  }
  .film-copy h2 {
    font-size: 24px
  }
  .film-copy .overview {
    font-size: 14px
  }
  .film-copy .genre-line {
    font-size: 13px
  }
  .deck-actions {
    gap: 8px
  }
  .vote {
    font-size: 12px;
    flex-direction: column;
    padding: 10px 6px
  }
  .desktop-hint {
    display: none
  }
  /* A routed full-screen film page on phones, retaining native focus handling. */
  #detail {
    position: fixed;
    inset: 0;
    margin: 0;
    width: 100%;
    max-width: none;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0
  }
  #detail .dialog-top {
    padding: 8px 20px;
    padding-top: max(8px, env(safe-area-inset-top))
  }
  #detail .icon-button {
    display: none
  }
  #detail-back {
    min-height: 44px
  }
  #copy-movie-link {
    font-size: 14px
  }
  .detail-hero {
    padding: 20px;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 16px
  }
  .detail-hero>.film-poster { grid-row: 1; grid-column: 1; aspect-ratio: 2/3; }
  .detail-hero>.detail-copy { grid-column: 2; }
  .detail-hero>.detail-library { grid-column: 1/-1; }
  .detail-hero h2 { font-size: 27px; }
  .detail-hero .metadata, .detail-hero .genre-line, .detail-hero .original-title { font-size: 13px; }
  .detail-body {
    padding: 0 20px 32px
  }
  .movie-section {
    padding: 28px 0;
    scroll-margin-top: 80px
  }
  .movie-section h3 {
    font-size: 22px
  }
  .watch-heading {
    gap: 12px
  }
  .watch-heading select {
    max-width: 170px;
    font-size: 12px
  }
  .watch-providers {
    grid-template-columns: 1fr
  }
  .trailer-controls button {
    font-size: 13px
  }
  .player-fallback {
    font-size: 13px
  }
  .related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 14px
  }
  .recent-movies .related-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr))
  }
  .recent-movies h2 {
    font-size: 21px
  }
  .rating-control-foot {
    align-items: start
  }
  .rating-explanation {
    font-size: 12px
  }
  .toast {
    bottom: 92px
  }
  .toast-action {
    white-space: nowrap
  }
  .notice {
    padding: 14px;
    gap: 12px
  }
  .profile-body {
    padding: 24px
  }
  dialog {
    width: calc(100% - 24px);
    max-height: 90dvh;
    border-radius: 16px
  }
  .dialog-top {
    padding: 10px 20px
  }
  .dialog-top>span {
    font-size: 10px
  }
  .profile-body h2 {
    font-size: 24px
  }
  .section-tools>.section-description {
    flex-basis: 100%
  }
  .footnote {
    font-size: 12px
  }
  .pagination {
    gap: 12px
  }
  .pagination button {
    font-size: 13px;
    padding: 10px 12px
  }
  .pagination span {
    font-size: 12px
  }
}
@media(max-width:480px) {
  .discovery-shortcuts {
    display: none
  }
  main {
    padding-left: 16px;
    padding-right: 16px
  }
  .sidebar {
    padding: 10px 16px
  }
  .section-nav {
    gap: 22px
  }
  .section-nav a {
    font-size: 13px
  }
  .page-header h1 {
    font-size: 27px
  }
  .catalog-search>svg {
    display: none
  }
  .catalog-search {
    padding-left: 14px
  }
  .catalog-search input {
    font-size: 14px
  }
  .discovery-shortcuts {
    font-size: 12px;
    gap: 6px
  }
  .discovery-shortcuts a {
    padding: 7px 10px
  }
  .discovery-shortcuts .shortcut-all {
    padding-left: 0
  }

  .apply-filters {
    grid-column: 1;
    justify-self: stretch
  }
  .catalog-order {
    gap: 4px
  }
  .catalog-order select {
    max-width: 160px
  }
  .catalog-toolbar p {
    flex: 1
  }
  .catalog-order {
    margin: 0;
    width: 100%;
    justify-content: space-between
  }
  .movie-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 16px
  }
  .tile-info h3 {
    font-size: 16px
  }
  .tile-genres {
    font-size: 12px!important
  }
  .as-list .tile-open {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 14px
  }
  .as-list .tile-cover {
    width: 64px
  }
  .as-list .tile-info h3 {
    font-size: 16px
  }
  .as-list .tile-info p {
    font-size: 12px
  }
  .as-list .tile-tools {
    flex-direction: column
  }
  .as-list .tile-info .tonight-overview {
    font-size: 13px!important
  }
  .shelf-grid {
    grid-template-columns: 1fr
  }
  .shelf-cover {
    aspect-ratio: 2.2/1
  }

  .unrated-filter {
    width: 100%
  }

  .collection-tools>a {
    order: 2
  }
  .collection-tools #refresh-collection {
    margin-left: 0
  }
  .film-card {
    display: block
  }
  .film-card>.film-poster {
    height: 300px
  }
  .film-card>.film-poster img {
    object-fit: contain
  }
  .film-copy {
    padding: 22px
  }
  .film-copy .overview {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden
  }
  .film-copy .reason {
    display: none
  }
  .recent-movies .related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr))
  }
  .detail-hero h2 {
    font-size: 25px
  }
  .detail-hero {
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 16px
  }
  .watch-heading {
    align-items: start;
    flex-direction: column
  }
  .watch-heading select {
    max-width: 100%;
    width: 100%
  }
  .rating-scale {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px
  }
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }
  .facts {
    font-size: 15px
  }
  .dialog-top {
    gap: 10px
  }
  .profile-body {
    padding: 20px
  }
  .choice-controls {
    align-items: start
  }
  #choice-results {
    grid-template-columns: 1fr
  }
  .note-form button {
    width: 100%
  }
  .rating-control-foot {
    flex-wrap: wrap
  }
  .navigation a {
    font-size: 14px
  }
  .personal-gate {
    padding: 24px 20px
  }
}
@media(prefers-reduced-motion:reduce) {
  *, *::before, *::after {
    animation: none!important;
    transition: none!important;
    scroll-behavior: auto!important
  }
}

/* Audience confidence is readable on touch screens, not hidden in a tooltip. */
.tile-info .tile-audience-rating { color: var(--text); font-size: 12px; margin-top: 7px; }
.catalog-order-note { font-size: 13px; margin: 0 0 20px; }
.shelf-back { margin: -8px 0 12px; justify-content: flex-start; }
.is-shelf .catalog-hero { display: block; margin-bottom: 20px; }
.is-shelf .catalog-heading { max-width: none; margin-bottom: 18px; }
.is-shelf .catalog-search { max-width: 620px; }
#profile-settings { margin-top: 16px; }
#profile-settings .subscriptions { margin: 0; }

/* Personal ratings are available without opening an action menu. */
.tile-quick-rate {
  margin-top: 8px;
  padding: 8px 10px;
  min-height: 44px;
  max-width: 100%;
  font-size: 13px;
  text-align: left;
  color: var(--accent);
  border-radius: 8px;
  background: var(--surface);
}
.as-list .tile-quick-rate {
  grid-column: 1 / -1;
  margin: -12px 0 0 100px;
  justify-self: start;
}
.watch-country-setting { display: grid; gap: 8px; margin: 20px 0; max-width: 320px; }
.field-error { color: #ffb1b1; font-size: 13px; margin: 8px 0 0; }
[aria-invalid="true"] { border-color: #ffb1b1; }
@media (max-width: 760px) {
  .as-list .tile-quick-rate { margin-left: 88px; }
}
@media (max-width: 480px) {
  .as-list .tile-quick-rate { margin-left: 78px; }
}

/* Film detail: people, awards and a short route through the card. */
.catalog-types {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
}
.catalog-types button {
  padding: 10px 22px;
  border-radius: 24px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}
.catalog-types button[aria-pressed="true"] {
  color: var(--text);
  background: var(--surface);
  border-color: var(--line);
}
.movie-section .section-intro { color: var(--muted); margin: -8px 0 20px; font-size: 14px; }
.people-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 20px; }
.person-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 3px;
  align-content: center;
  text-align: left;
  min-height: 68px;
  padding: 6px 8px;
  background: none;
  border: 0;
  border-radius: 10px;
  min-width: 0;
}
.person-photo {
  position: relative;
  display: grid;
  place-items: center;
  grid-column: 1;
  grid-row: 1 / 3;
  width: 56px;
  height: 56px;
  overflow: hidden;
  background: var(--surface);
  border-radius: 50%;
}
.person-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.person-initials { color: var(--muted); font-size: 18px; font-weight: 500; }
.person-name { grid-column: 2; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; align-self: end; }
.person-character { grid-column: 2; font-size: 12px; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; align-self: start; }
.person-card:not(:has(.person-character)) .person-name { grid-row: 1 / 3; align-self: center; }
.person-card:hover { background: var(--surface); }
.person-card:hover .person-name { color: var(--accent); }
#movie-people, #movie-awards { padding-block: 24px; }
#movie-people h3, #movie-awards h3 { margin-bottom: 14px; }
.directors-grid { margin-bottom: 8px; }
.people-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; margin-top: 12px; }
.people-credits-wrap:has(details[open]) { flex-basis: 100%; }
#movie-people h4 { margin: 12px 0 6px; }
.cast-more { margin: 0; }
.photo-credits { color: var(--muted); font-size: 12px; margin: 0; }
.photo-credits summary { cursor: pointer; padding: 8px 0; }
.photo-credits ul { padding-left: 18px; line-height: 1.7; }
.photo-credits li { margin-bottom: 8px; overflow-wrap: anywhere; }
.awards-grid { display: grid; align-items: start; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
.award-card { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(135deg, #e4c78908, transparent 65%); }
.award-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.movie-section .award-name { margin: 0; min-width: 0; font-size: 16px; line-height: 1.4; font-weight: 650; }
.award-wins { color: #e4c789; font-size: 13px; white-space: nowrap; }
.award-categories { list-style: none; margin: 0; padding: 0; font-size: 13px; line-height: 1.6; }
.award-categories li { position: relative; padding-left: 16px; }
.award-categories li::before { content: ''; position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #e4c789; left: 0; top: .65em; }
.award-categories li + li { margin-top: 8px; }
.award-more summary { width: fit-content; color: var(--muted); cursor: pointer; font-size: 13px; min-height: 44px; padding-block: 14px 8px; }
.award-more summary:hover { color: var(--text); }
.award-more .award-categories { margin-top: 4px; }
.season-row { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.season-row span { color: var(--muted); text-align: right; }
@media (max-width: 760px) {
  .people-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; }
  .awards-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .people-grid { grid-template-columns: 1fr; }
  .person-card { padding-inline: 0; }
}

.data-credit { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 24px 0 0; }

/* Все личные действия доступны у названия, трейлер и площадки — перед справкой. */
.detail-copy { grid-column: 2; align-self: start; }
.detail-copy .genre-line { margin-bottom: 0; }
.detail-library { grid-column: 2; min-width: 0; }
.detail-library > .primary { min-width: 160px; margin-bottom: 12px; font-size: 14px; }
.detail-library-actions { display: flex; flex-wrap: wrap; gap: var(--control-gap); max-width: 700px; }
.detail-library-actions button { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; min-height: 44px; padding: 10px; font-size: 13px; line-height: 1.35; text-align: center; }
.detail-library-actions svg { width: 18px; height: 18px; }
.detail-library-actions button[aria-pressed="true"], .detail-library-actions button[data-selected="true"] { border-color: var(--accent); color: var(--accent); background: #8c50e914; }
.detail-media { display: grid; grid-template-columns: 1fr; gap: 28px; padding: 0 32px 24px; align-items: start; }
.detail-media.has-trailer { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.detail-media .movie-section { padding: 0; border: 0; min-width: 0; scroll-margin-top: calc(var(--dialog-top, 70px) + 16px); }
.detail-media .movie-section h3 { font-size: 16px; margin-bottom: 12px; }
.detail-media .watch-heading { margin-bottom: 12px; gap: 12px; align-items: center; flex-direction: row; }
.detail-media .watch-heading h3 { margin: 0; }
.detail-media .watch-heading select { width: auto; max-width: 160px; padding: 8px 10px; font-size: 12px; }
.detail-media .watch-status { font-size: 13px; margin-bottom: 8px; }
.detail-media .watch-explanation { margin-bottom: 8px; }
.detail-media .check-links { gap: 8px; margin-top: 8px; }
.detail-media .check-link { font-size: 13px; padding: 8px 10px; }
.detail-media .watch-providers { grid-template-columns: 1fr; gap: 8px; }
.detail-media .provider-card { padding: 12px; }
.detail-media .player-fallback { margin: 8px 0 0; }
.detail-media .player-fallback button { min-height: 36px; padding: 4px 0; font-size: 12px; }
.more-platforms { margin-top: 8px; }
.more-platforms summary { color: var(--muted); font-size: 13px; cursor: pointer; padding: 10px 0; min-height: 44px; }
.movie-section h3[tabindex="-1"]:focus { outline: none; }
@media (max-width: 760px) {
  .detail-media, .detail-media.has-trailer { grid-template-columns: 1fr; padding: 0 20px 24px; gap: 24px; }
  .detail-library > .primary { width: 100%; }
  .detail-library-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Keep discovery close to the posters; personal filters stay together. */
.catalog-heading:has(#page-title.sr-only) { flex: 0 0 0; max-width: 0; margin: 0; }
.catalog-hero:has(#page-title.sr-only) { gap: 0; }
.catalog-types { margin-bottom: 12px; flex-wrap: wrap; }
.catalog-hero { margin-bottom: 12px; }
.discovery-shortcuts { margin-top: 12px; }

.shelf-choice { border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin: 16px 0 24px; }
.shelf-choice h2 { font-size: 20px; margin: 0 0 12px; }
.shelf-choice form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.shelf-choice form label { color: var(--muted); font-size: 14px; }
.shelf-choice .movie-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.shelf-choice .movie-grid:empty { display: none; }
.shelf-choice .tile-cover { max-height: 300px; }
.detail-intro { margin-top: 14px; max-width: 70ch; }
.detail-intro p { line-height: 1.65; margin: 0; color: var(--text); overflow-wrap: anywhere; }
@media(max-width:600px) {

  .shelf-choice { padding: 14px; }
  .shelf-choice form label { flex-basis: 100%; }
  .shelf-choice form select { flex: 1; min-width: 0; }
  .shelf-choice .movie-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
}

/* Discovery controls use the same typography and targets as movie actions. */
a.tile-open, a.related-tile, a.details-link { text-decoration: none; color: inherit; cursor: pointer; }
a.tile-open:focus-visible, a.related-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.catalog-search { position: relative; overflow: visible; }
.search-suggestions { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0; padding: 6px; max-height: min(480px,60vh); overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 12px 36px #0008; }
.search-suggestion { display: flex; align-items: center; gap: 12px; padding: 8px; min-height: 64px; border-radius: 8px; text-decoration: none; color: var(--text); }
.search-suggestion:hover, .search-suggestion[aria-selected="true"] { background: #ffffff0e; }
.suggestion-poster, .suggestion-photo { width: 34px; height: 50px; flex-shrink: 0; background: #ffffff0a; border-radius: 4px; overflow: hidden; }
.suggestion-photo { height: 34px; border-radius: 50%; }
.suggestion-poster img, .suggestion-photo img { width: 100%; height: 100%; object-fit: cover; }
.suggestion-copy { display: grid; gap: 4px; min-width: 0; font-size: 14px; }
.suggestion-copy strong { overflow-wrap: anywhere; }
.suggestion-copy .muted { font-size: 12px; }
.catalog-person { display: flex; gap: 14px; align-items: center; margin-bottom: 20px; }
.catalog-person img { width: 64px; height: 64px; object-fit: cover; border-radius: 50%; }
.catalog-person h2 { font-size: 24px; margin: 0 0 4px; }
.catalog-person p, #shelf-description { margin-top: 0; font-size: 14px; line-height: 1.5; }
.shelf-all-title { font-size: 20px; margin: 24px 0 16px; }
.watch-service-settings { margin-top: 24px; }
#watch-service-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
#watch-service-options label { display: flex; gap: 8px; align-items: center; min-height: 44px; font-size: 14px; }
.direct-watch { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

@media(max-width:600px) {
}

/* Account sections follow tasks: identity, viewing preferences, personal data. */
#profile .account-section { border-top: 1px solid var(--line); padding-block: 24px; margin: 0; }
#profile .account-section h3 { font-size: 18px; margin: 0 0 16px; }
#profile .account-section h4 { font-size: 15px; margin: 0 0 8px; }
.account-heading { display: flex; gap: 14px; align-items: center; margin-bottom: 20px; }
#profile .account-heading h3 { margin-bottom: 4px; }
.account-heading p { margin: 0; }
.account-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--raised); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; font-weight: 650; }
.account-name-fields { display: flex; gap: 8px; margin-top: 8px; }
.account-name-fields input { min-width: 0; flex: 1; width: 100%; }
.account-name-fields button { flex-shrink: 0; font-size: 13px; }
#watch-settings-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
#profile-settings .watch-country-setting { margin-top: 0; max-width: none; }
#watch-service-settings { margin: 20px 0; }
#watch-service-options { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.plus-option { margin-top: 16px; }
#profile .account-danger { border-top: 1px solid var(--line); padding-top: 16px; }
.account-danger summary { color: #ffb1b1; min-height: 44px; }
#delete-account-form { display: grid; gap: 12px; }
#delete-account { color: #ffb1b1; border-color: #84505a; }
#account-status:empty { display: none; }
@media (max-width: 480px) { .account-name-fields { flex-direction: column; } .account-name-fields button { align-self: start; } }

.account-avatar svg { width: 24px; height: 24px; }
/* Collection controls stay behind the films instead of taking the first screen. */
.collection-controls { margin-bottom:24px }

.tile-note { color:var(--muted); font-style:italic; overflow-wrap:anywhere; white-space:normal }
.list-add-search { display:flex; gap:10px; margin-bottom:12px }
.list-add-search input { flex:1; min-width:0 }
.list-add-results { display:grid; gap:10px }
.list-add-row { display:flex; gap:12px; align-items:center; padding:12px 0; border-bottom:1px solid var(--line) }
.picker-poster { width:44px; height:66px; flex:none; position:relative; overflow:hidden; border-radius:5px; background:var(--surface) }
.picker-poster img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover }
.picker-poster>span { display:none }
.list-add-info { flex:1; min-width:0; display:grid; gap:4px }
.list-add-info strong { overflow-wrap:anywhere }
#list-add { max-width:720px }
#list-add-title { font-size:20px; overflow-wrap:anywhere }
#country-search { margin: 8px 0; width: 100%; }
.account-support { display:block; width:fit-content; margin:24px 0; color:var(--accent) }
#profile-extra>summary { cursor:pointer; padding:16px 0; color:var(--muted) }
.request-error { grid-column:1/-1; margin:0 0 16px; padding:20px }
@media(max-width:600px) {

 .list-add-row { gap:8px }
 .list-add-row button { padding:10px; font-size:13px }
 .list-add-info strong { font-size:15px }
}
.director-shelf { min-width:0; display:flex; flex-direction:column; gap:12px }
.director-shelf .shelf-tile { width:100%; flex:1 }
.director-works { font-size:14px; overflow-wrap:anywhere }
.movie-report { display:block; width:fit-content; margin-top:28px; color:var(--muted); font-size:14px }

/* Return to familiar films without another poster wall. */
#recent-movies { margin: 12px 0 24px; padding: 14px 0; border-block: 1px solid var(--line); }
#recent-movies h2 { font-size: 15px; margin: 0 0 12px; }
#recent-movies-grid { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; }
#recent-movies-grid > a { display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: center; gap: 10px; flex: 0 0 190px; min-width: 0; }
#recent-movies-grid .tile-cover { width: 36px; border-radius: 4px; }
#recent-movies-grid h4, #recent-movies-grid h3 { font-size: 12px; margin: 0; }
#recent-movies-grid p { font-size: 11px; margin: 4px 0 0; }
#catalog-results.as-list, #collection-results.as-list, #list-movies.as-list { max-width: 980px; }
.as-list .tile-overview { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; line-height: 1.5; max-width: 64ch; margin: 6px 0; }
#detail .dialog-top { position: sticky; }
.detail-dock { position: absolute; top: 100%; left: 0; right: 0; display: flex; align-items: center; gap: 12px; padding: 10px 24px; background: var(--bg, #101014); border-bottom: 1px solid var(--line); box-shadow: 0 8px 16px #0003; }
.detail-dock[hidden] { display: none; }
.detail-dock-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.detail-dock-actions { display: flex; align-items: center; gap: 8px; }
.detail-dock-actions button { display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 10px; font-size: 12px; }
.detail-dock-actions svg { width: 16px; height: 16px; }
.detail-library-actions { min-height: 44px; }
#tonight-status { scroll-margin-top: 90px; }
#export-format { display: block; margin: 8px 0 12px; max-width: 100%; }
@media(max-width:600px) {
  .detail-dock { flex-wrap: wrap; gap: 6px; padding: 8px 20px; }
  .detail-dock-title { flex-basis: 100%; }
  .detail-dock-actions { width: 100%; }
  .detail-dock-actions button { flex: 1; }
  .detail-library-actions { min-height: 96px; }
}
#recent-movies-grid .recent-movie strong { display: block; font-size: 12px; line-height: 1.35; }
#recent-movies-grid .recent-movie span { display: block; font-size: 11px; margin-top: 4px; }
.filter-apply-note { font-size: 12px; grid-column: 1/-1; margin: 0; }
.is-shelf .catalog-types { display: none; }
.is-shelf .catalog-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 16px; }
.is-shelf .catalog-heading { flex: 1; margin: 0; }
.is-shelf .catalog-search { flex: 0 1 400px; margin: 0; }
.is-shelf #page-title { margin: 0; }
@media(max-width:800px) { .is-shelf .catalog-hero { display: block; } .is-shelf .catalog-search { margin-top: 16px; } }

@media(max-width:760px) { .detail-library-actions { min-height: 96px; } }
#detail .movie-section { scroll-margin-top: calc(var(--dialog-top, 69px) + 76px); }
@media(max-width:600px) { #detail .movie-section { scroll-margin-top: calc(var(--dialog-top, 61px) + 110px); } }

/* Continuous catalogue: existing cards remain connected while the next batch arrives. */
.catalog-continuation { padding: 24px 0 12px; text-align: center; overflow-anchor: none; }
.catalog-continuation p { font-size: 13px; margin: 0 0 12px; }
#catalog-sentinel { height: 1px; }
.catalog-pages { margin: 12px 0 24px; text-align: center; color: var(--muted); font-size: 13px; overflow-anchor: none; }
.catalog-pages summary { display: inline-block; padding: 10px; cursor: pointer; }
.catalog-pages .pagination { margin-top: 8px; }
.catalog-skeleton { min-width: 0; }
.skeleton-cover { aspect-ratio: 2/3; border-radius: 12px; background: var(--surface); }
.skeleton-title { width: 70%; height: 16px; background: var(--surface); border-radius: 4px; margin: 14px 0 22px; }
.movie-info { display: inline-flex; align-items: center; justify-content: center; width: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 50%; background: #17141de8; color: #fff; box-shadow: 0 2px 8px #0003; }
.movie-info svg { width: 21px; height: 21px; }
.movie-info:hover, .movie-info[aria-expanded="true"] { background: #59416d; }
.related-item { position: relative; min-width: 0; }
.related-item > .movie-info { position: absolute; top: 8px; right: 8px; z-index: 2; }
.movie-preview { position: fixed; inset: auto; margin: 0; padding: 20px; max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); overflow: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: 0 16px 64px #0009; z-index: 1000; font: 14px/1.55 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.movie-preview::backdrop { background: transparent; pointer-events: none; }
.preview-heading { display: flex; align-items: start; gap: 12px; }
.preview-heading h3 { flex: 1; margin: 0; font-size: 19px; line-height: 1.35; }
.preview-heading .icon-button { flex: 0 0 32px; display: inline-flex!important; width: 32px; height: 32px; min-height: 32px; font-size: 24px; }
.preview-original { font-size: 12px; margin: 4px 0 12px; }
.preview-meta { color: var(--muted); margin: 12px 0; }
.preview-rating { color: var(--accent); margin: 4px 0; }
.preview-overview { margin: 16px 0; }
.preview-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 12px; margin: 16px 0; }
.preview-facts dt { color: var(--muted); }
.preview-facts dd { margin: 0; }
.preview-open { display: inline-flex; padding: 8px 0; min-height: 40px; align-items: center; }
@media(max-width:500px) { .movie-preview { padding: 16px; } .tile-tools { gap: 2px; right: 4px; top: 4px; } .tile-tools .movie-info { width: 40px; min-height: 40px; } }
.movie-tile > .movie-info { position: absolute; top: 8px; left: 8px; z-index: 2; }

/* Let the browser skip layout/paint of distant rows after a long browse. */
.long-catalog > .measured-tile { content-visibility: auto; }
.catalog-top { position: fixed; right: 24px; bottom: 24px; z-index: 20; box-shadow: 0 4px 20px #0006; }
@media(max-width:760px) { .catalog-top { right: 16px; bottom: calc(88px + env(safe-area-inset-bottom)); } }
#catalog-refresh { white-space: nowrap; }

/* Catalog filters keep one form and become a native modal on narrow screens. */
#close-catalog-filters { display: flex; }
.filter-footer { grid-column: 1/-1; display: flex; justify-content: flex-end; gap: 12px; align-items: center; }
.filter-footer .apply-filters { grid-column: auto; margin: 0; }
#catalog-filter-dialog { padding: 0; }
.dialog-top h2 { margin: 0; font-size: 20px; line-height: 1.3; }


@media(max-width:1099px) {
  #catalog-filter-dialog { width: 100%; max-width: 100%; max-height: 92dvh; margin: auto 0 0; border-radius: 20px 20px 0 0; }
  #catalog-filter-dialog .catalog-filters.is-open { display: grid; grid-template-columns: 1fr; margin: 0; padding: 0 20px; gap: 18px; border-radius: 0; }
  #catalog-filter-dialog .filters-heading { position: sticky; top: 0; z-index: 2; background: var(--surface); padding: 14px 0 10px; }
  #close-catalog-filters { display: flex; }
  #catalog-filter-dialog .filter-footer { position: sticky; bottom: 0; background: var(--surface); padding: 14px 0 max(14px, env(safe-area-inset-bottom)); z-index: 2; border-top: 1px solid var(--line); }
  #catalog-filter-dialog .apply-filters { flex: 1; }
  .catalog-search { margin-bottom: 12px; }
  .discovery-shortcuts { margin-bottom: 12px; }
  .discovery-shortcuts > span { display: none; }
  .catalog-toolbar { gap: 8px; margin-bottom: 12px; }
  .catalog-toolbar p { margin: 0; }
  #catalog-refresh { order: 0; margin: 0; min-width: 44px; min-height: 44px; padding: 8px; font-size: 0; }
  #catalog-refresh::before { content: "↻"; font-size: 24px; line-height: 1; }
  .list-detail-heading { margin-top: 8px; gap: 12px; }
}

/* Shared controls: content determines width; only search grows across a toolbar. */
.control-toolbar, .control-group { display: flex; align-items: center; gap: var(--control-gap); flex-wrap: wrap; }
.control-toolbar, .control-fields { --control-height: var(--compact-control-height); }
.control-toolbar :is(button, input, select), .control-fields :is(button, input, select), .catalog-filters :is(input, select) { font-size: 14px; padding: 8px 12px; }
.control-toolbar .icon-button { padding: 8px; }
.control-group { flex-shrink: 0; }
.control-fields { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; }
.control-field, .control-fields > div:not(.filters-heading):not(.filter-footer) { display: grid; gap: 4px; min-width: 0; }
.control-field > span, .control-fields label:not(.filter-toggle) { font-size: 13px; color: var(--muted); }
.control-field select { width: 100%; }
.collection-toolbar { gap: 12px; margin-bottom: 12px; }
.collection-toolbar .collection-query { flex: 1 1 240px; width: auto; max-width: 520px; margin: 0; }
.collection-display { margin-left: 0; }
.collection-display select { width: 200px; max-width: 100%; }
#toggle-collection-filters { position: relative; }
.filter-count { position: absolute; top: -6px; right: -6px; display: grid; place-items: center; min-width: 20px; height: 20px; border-radius: 10px; background: var(--accent); color: var(--bg); font-size: 11px; }
#toggle-collection-filters, .collection-filter-heading, .collection-filter-footer { display: none; }
.collection-refinements { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 20px; margin-bottom: 12px; }
.collection-filter-fields { margin: 0; padding: 0; }
.collection-filter-fields .control-field { width: 190px; }
.collection-filter-fields .runtime-field { width: 230px; }
.collection-filter-fields .filter-toggle { margin: 0; min-height: 40px; }
#collection-availability-note { flex-basis: 100%; font-size: 13px; margin: 0; }
.collection-utilities { justify-content: flex-start; gap: 8px 16px; }
.collection-utilities > p { margin: 0; }
.collection-utilities button { padding-inline: 0; }
.tonight-form { max-width: 820px; margin: 20px 0 24px; padding: 0; }
.tonight-form > div { width: 240px; }
.tonight-form select { width: 100%; background: var(--surface); }
.tonight-form > .primary { flex: none; }
.list-heading-actions { flex-basis: 100%; }
.list-access { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 20px; }
.list-access p { font-size: 13px; margin: 0; max-width: 560px; }
.list-access button { font-size: 14px; }
.catalog-hero { gap: 16px; }
.catalog-hero .catalog-types { margin: 0; flex-shrink: 0; }
.catalog-hero:has(#page-title.sr-only) { gap: 16px; }
.catalog-hero .catalog-search { max-width: none; min-width: 240px; }
.catalog-filters.is-open { --control-height: var(--compact-control-height); display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 12px; margin: 0; padding: 16px; background: var(--surface); border-radius: 12px; }
.catalog-filters .filters-heading h2 { font-size: 16px; }
.country-search-details summary { cursor: pointer; color: var(--muted); font-size: 13px; padding: 4px 0; }
.catalog-field:has(.country-search-details) { gap: 4px; }
.catalog-filters .filter-footer { flex-wrap: wrap; gap: 8px; }
.catalog-filters .filter-footer .primary { flex: 1; padding-inline: 10px; }
@media(min-width:1100px) {
 .catalog-layout.has-filters { grid-template-columns: 232px minmax(0,1fr); gap: 20px; align-items: start; }
 .catalog-layout.has-filters .catalog-filters { position: sticky; top: 88px; max-height: calc(100dvh - 104px); overflow-y: auto; }
 .catalog-layout.has-filters .movie-grid:not(.as-list) { grid-template-columns: repeat(auto-fill, minmax(min(160px,100%),1fr)); }
 .catalog-filters .filters-heading { position: sticky; top: -16px; z-index: 1; margin: -16px -16px 0; padding: 8px 16px; background: var(--surface); }
 .catalog-filters .filter-footer { position: sticky; bottom: -16px; margin: 0 -16px -16px; padding: 12px 16px; background: var(--surface); border-top: 1px solid var(--line); }
}
@media(min-width:761px) and (max-width:1099px) {
 #catalog-filter-dialog { width: min(520px, calc(100% - 48px)); max-height: 88dvh; margin: auto; border-radius: 16px; }
 #catalog-filter-dialog .catalog-filters.is-open { padding: 0 20px; }
}
@media(max-width:760px) {
 .catalog-hero .catalog-types { margin-bottom: 12px; }
 .control-toolbar, .control-fields, .catalog-filters { --control-height: 44px; --compact-control-height: 44px; }
 .control-toolbar :is(button, input, select), .control-fields :is(button, input, select) { min-height: 44px; }
 .control-toolbar .view-switch button { min-width: 44px; }
 .collection-toolbar { gap: 8px; }
 .collection-utilities { gap: 4px 6px; font-size: 13px; }
 .collection-utilities button { font-size: 13px; white-space: nowrap; }
 .collection-toolbar .collection-query { flex: 1 1 100%; width: 100%; max-width: none; }
 #toggle-collection-filters { display: inline-flex; align-items: center; }
 .collection-display { flex: 1; min-width: 0; margin: 0; justify-content: flex-end; }
 .collection-display select { width: 170px; min-width: 0; flex: 1; }
 #collection-options { display: none; }
 #collection-filter-dialog { padding: 0; width: 100%; max-width: 100%; max-height: 92dvh; margin: auto 0 0; border-radius: 20px 20px 0 0; }
 #collection-filter-dialog #collection-options { display: flex; flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 16px; margin: 0; padding: 0 20px; background: var(--surface); }
 #collection-filter-dialog .collection-filter-heading { display: flex; position: sticky; top: 0; padding: 12px 0; background: var(--surface); z-index: 1; }
 #collection-filter-dialog .control-field { width: 100%; }
 #collection-filter-dialog .collection-filter-footer { display: flex; position: sticky; bottom: 0; padding: 12px 0 max(12px,env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
 .collection-filter-footer .primary { flex: 1; }
 .tonight-form { display: grid; grid-template-columns: 1fr; gap: 12px; }
 .tonight-form > div { width: 100%; }
 .tonight-form > .primary { justify-self: start; }
 .list-access p { flex-basis: 100%; }
}
@media(pointer:coarse) { :root { --compact-control-height: 44px; } .view-switch button { min-width: 44px; } }

/* Incomplete series use readable cards, without a fabricated or empty poster.
   The grid stays the same as for films: series cards must not be larger. */
.movie-tile.text-tile { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.text-tile .tile-open { display: block; flex: 1; min-width: 0; }
.text-tile .tile-info { padding: 0; }
.text-tile .tile-info h3 { margin: 0 0 8px; font-size: 16px; }
.text-tile .tile-info p { margin: 6px 0; }
.text-tile .tile-tools { position: static; display: flex; justify-content: flex-end; gap: 8px; }
.text-tile .tile-overview { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; line-height: 1.5; color: var(--text); }
.text-tile .tile-series-meta { font-size: 13px; }
.text-tile .tile-saved-text, .text-tile .tile-personal-text { color: var(--accent); font-size: 13px; }
.movie-grid.as-list .text-tile { grid-template-columns: 1fr; }
.watch-option { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 140px; }
.watch-option-title { font-weight: 600; }
.watch-option-access { color: var(--muted); font-size: 12px; }
.watch-option-access.is-confirmed { color: var(--accent); }
.watch-option-date { color: var(--muted); font-size: 11px; }
.player-fallback { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.detail-library > .direct-watch { display: inline-flex; align-items: center; justify-content: center; width: fit-content; min-height: 44px; padding: 10px 16px; border-radius: var(--control-radius); font-size: 14px; font-weight: 600; }
.watch-option { min-height: 44px; }

.detail-hero:has(> .film-poster.has-no-poster) { grid-template-columns: minmax(0, 1fr); }
.detail-hero > .film-poster.has-no-poster { display: none; }
.detail-hero:has(> .film-poster.has-no-poster) > :is(.detail-copy, .detail-library) { grid-column: 1; grid-row: auto; }
.as-list .text-tile .tile-quick-rate { margin: 0; }
.movie-tile.text-tile { align-items: stretch; }
.movie-grid.as-list .text-tile { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px 16px; margin-bottom: 12px; }
.as-list .text-tile .tile-tools { align-self: start; }

.related-grid:has(.related-text-item) { grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); align-items: start; }
.related-tile.related-text { display: block; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.related-tile.related-text:hover { border-color: var(--accent); }
.related-text strong { padding-right: 36px; margin: 0 0 8px; font-size: 16px; }
.related-text .related-overview { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 10px 0; font-size: 14px; line-height: 1.5; }
.related-text .related-reason { color: var(--accent); }

/* Trailer sources remain explicit; changing a rating never recreates this player. */
.trailer-controls { display:flex; flex-wrap:wrap; align-items:center; gap:8px 16px; margin-top:8px; font-size:13px; }
.trailer-sources { display:flex; gap:4px; }
.trailer-sources button { min-height:44px; padding:8px 12px; font-size:13px; }
.trailer-sources button[aria-pressed="true"] { background:var(--accent); color:var(--bg); border-color:var(--accent); }
.trailer-controls > a { display:inline-flex; align-items:center; min-height:44px; }
.watch-retry { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; margin-top:8px; }
.watch-retry .watch-status { margin:0; }
.watch-retry button { min-height:44px; padding:8px 12px; font-size:13px; }
.film-card>.film-poster.is-still img {
  object-fit: cover
}
