:root {
  --font-main: 'Manrope', system-ui, -apple-system, sans-serif;
  --font-tv: 'VT323', 'Courier New', monospace;
}

:root {
  --bg-dark: #080a0f;
  --bg-card: rgba(16, 18, 26, 0.72);
  --bg-input: rgba(255, 255, 255, 0.05);
  --euphoria-amber: #e6a15c;
  --euphoria-amber-glow: rgba(230, 161, 92, 0.3);
  --euphoria-wine: #80162b;
  --euphoria-wine-glow: rgba(128, 22, 43, 0.45);
  --border-subtle: rgba(230, 161, 92, 0.16);
  --border-active: rgba(230, 161, 92, 0.5);
  --text-main: #f5f3ef;
  --text-muted: #8e899b;
  --tv-text: #f2f2f2;
  --tv-glow: rgba(255, 255, 255, 0.45);
  --tv-glow-soft: rgba(255, 255, 255, 0.3);
  --radius-sm: 6px;
  --radius-md: 14px;
  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --bg-gradient-radial:
    radial-gradient(circle at 10% 85%, rgba(144, 113, 66, 0.28) 0%, rgba(8, 10, 15, 0) 55%),
    radial-gradient(circle at 90% 15%, rgba(20, 55, 95, 0.4) 0%, rgba(8, 10, 15, 0) 60%),
    radial-gradient(circle at 50% 50%, rgba(230, 161, 92, 0.03) 0%, transparent 75%);
}

:root {
  --accent-deep: #bd763d;
  --on-accent: #21160d;
  --color-danger: #e8a0ae;
  --color-danger-strong: #d66e78;
  --danger-surface: #6b2026;
  --danger-border: #d64a50;
  --danger-text: #ffe8e8;
  --danger-icon: #ff9a9f;
  --success-surface: #235e45;
  --success-border: #428363;
  --success-text: #f0fff6;
  --surface-solid: #171a21;
  --surface-poster: #151925;
  --surface-hero: linear-gradient(139deg, #31261d, #10121a 65%, #101b2b);
  --shadow-soft: rgba(0, 0, 0, 0.3);
  --color-favorite: #e38994;
  --danger-solid: #a7343b;
  --on-danger: #fff;
  --neutral-from: #5a5d66;
  --neutral-to: #3d4047;
  --on-neutral: #f5f3ef;
  --surface-sidebar: #030508;
}

:root {
  --control-light: rgba(255, 255, 255, 0.09);
  --control-bottom: rgba(0, 0, 0, 0.4);
  --control-shadow: rgba(0, 0, 0, 0.25);
  --control-raised:
    inset 0 1px 0 var(--control-light), inset 0 -1px 0 var(--control-bottom),
    0 2px 6px var(--control-shadow);
  --shadow-surface-hover: 0 6px 18px rgba(0, 0, 0, 0.18);
}

:root {
  --text-meta: 15px;
  --text-small: 16px;
  --text-control: 16px;
  --text-body: 17px;
  --text-title: 20px;
  --text-large: 24px;
  --text-heading: 28px;
  --text-size-23: 23px;
  --text-size-26: 26px;
  --text-size-30: 30px;
  --text-size-36: 36px;
  --text-size-48: 48px;
}

* {
  box-sizing: border-box;
}

html {
  scrollbar-gutter: stable;
}

html:has(.bare-layout) {
  scrollbar-gutter: auto;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-main);
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--text-main);

  background: var(--surface-solid);
}

button,
input,
textarea,
select {
  font-family: inherit;
  font-size: var(--text-control);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.icon {
  display: block;
  flex: none;
  width: 1.2em;
  height: 1.2em;
}

[data-broken] {
  visibility: hidden;
}

:root[data-loading]::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--euphoria-amber), transparent);
  background-size: 40% 100%;
  background-repeat: no-repeat;
  animation: page-loading 1s ease-in-out infinite;
  pointer-events: none;
}

@keyframes page-loading {
  from {
    background-position: -40% 0;
  }
  to {
    background-position: 140% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root[data-loading]::after {
    background-size: 100% 100%;
    animation: none;
  }
}

.home-page__spotlight {
  margin: 28px 0 36px;
}

.home-page__collections {
  margin: 56px 0 48px;
}

.home-page__note {
  margin: -10px 0 22px;
  color: var(--text-muted);
  font-size: var(--text-small);
  line-height: 22px;
}

.home-page__collection-grid {
  display: grid;
  grid-auto-rows: 1fr;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.home-page__collection-grid > .status-message {
  grid-column: 1 / -1;
}

.section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 20px;
}

.section-heading__title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: var(--text-heading);
  font-weight: 800;
  line-height: 38px;
  letter-spacing: -0.5px;
}

.section-heading__star {
  display: block;
  flex: none;
  width: 22px;
  height: 22px;
}

.section-heading__count {
  margin-left: auto;
  color: var(--euphoria-amber);
  font-size: var(--text-meta);
  line-height: 23.4px;
}

.section-heading__link {
  color: var(--euphoria-amber);
  font-size: var(--text-small);
  line-height: 23.4px;
  text-decoration: none;
}

.section-heading__link:hover {
  text-decoration: underline;
}

.section-heading__link:focus-visible {
  outline: 2px solid var(--euphoria-amber);
  outline-offset: 5px;
}

.status-message {
  margin: 24px 0;
  color: var(--text-muted);
  font-size: var(--text-small);
  line-height: 23.4px;
}

.status-message__retry {
  padding: 0;
  border: 0;
  color: var(--euphoria-amber);
  background: none;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.collection-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  min-height: 174px;
  height: 100%;
  padding: 22px 24px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  color: var(--text-main);
  background: var(--bg-card);
  text-decoration: none;
  transition:
    transform 280ms ease,
    border-color 280ms ease,
    box-shadow 280ms ease;
}

.collection-card::before {
  content: '';
  position: absolute;
  top: -90px;
  right: -90px;
  width: 180px;
  height: 180px;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--euphoria-amber) 16%, transparent),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 280ms ease;
  pointer-events: none;
}

.collection-card:hover {
  border-color: var(--border-active);
  box-shadow: var(--shadow-surface-hover);
  transform: translateY(-4px);
}

.collection-card:hover::before {
  opacity: 1;
}

.collection-card:focus-visible {
  outline: 2px solid var(--euphoria-amber);
  outline-offset: 3px;
}

.collection-card__text {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
}

.collection-card__count {
  display: block;
  margin-bottom: 10px;
  color: var(--text-muted);
  font-size: var(--text-meta);
  font-weight: 700;
  line-height: 15px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.collection-card__title {
  margin: 0 0 6px;
  font-size: var(--text-title);
  font-weight: 700;
  line-height: 28px;
}

.collection-card__description {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--text-meta);
  line-height: 23.4px;
}

.collection-card .poster-stack {
  position: relative;
  z-index: 1;
}

.collection-card:hover .poster-stack__frame:first-child {
  transform: rotate(-11deg) translate(-6px, 0);
}

.collection-card:hover .poster-stack__frame:nth-child(2) {
  transform: translateY(-5px);
}

.collection-card:hover .poster-stack__frame:last-child {
  transform: rotate(11deg) translate(5px, 0);
}

.collection-card__arrow {
  position: absolute;
  right: 15px;
  bottom: 10px;
  color: var(--euphoria-amber);
  opacity: 0;
  transform: translate(-5px, 5px) rotate(-45deg);
  transition:
    opacity 240ms ease,
    transform 240ms ease;
}

.collection-card__arrow .icon {
  width: 18px;
  height: 18px;
}

.collection-card:hover .collection-card__arrow,
.collection-card:focus-visible .collection-card__arrow {
  opacity: 1;
  transform: rotate(-45deg);
}

@media (prefers-reduced-motion: reduce) {
  .collection-card,
  .collection-card:hover .poster-stack__frame {
    transform: none;
  }
}

.poster-stack {
  display: flex;
  flex: none;
  align-items: center;
}

.poster-stack__frame {
  position: relative;
  overflow: hidden;
  border-radius: 3px;
  background: var(--surface-poster);
  box-shadow: -3px 0 8px rgba(0, 0, 0, 0.22);
  transform-origin: center 85%;
  transition: transform 350ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.poster-stack__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-stack--small .poster-stack__frame {
  width: 54px;
  height: 96px;
}

.poster-stack--small .poster-stack__frame:not(:last-child) {
  margin-right: -20px;
}

.poster-stack--large {
  justify-content: center;
  width: 330px;
  height: 280px;
}

.poster-stack--large .poster-stack__frame {
  width: 160px;
  height: 280px;
  margin-right: -100px;
}

.poster-stack--large .poster-stack__frame:first-child {
  transform: rotate(-10deg);
}

.poster-stack--large .poster-stack__frame:nth-child(2) {
  z-index: 1;
  transform: translateY(-10px);
}

.poster-stack--large .poster-stack__frame:last-child {
  margin-right: 0;
  transform: rotate(10deg);
}

@media (prefers-reduced-motion: reduce) {
  .poster-stack__frame {
    transition: none;
  }
}

.film-feed {
  scroll-margin-top: 20px;
}

.film-feed__note {
  margin: -10px 0 22px;
  color: var(--text-muted);
  font-size: var(--text-small);
  line-height: 22px;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 28px 20px;
}

.movie-grid[data-view='list'] {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.movie-card__link {
  display: flex;
  flex: none;
  flex-direction: column;
  min-width: 0;
  color: var(--text-main);
  text-decoration: none;
}

.movie-card__cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface-poster);
  transition: box-shadow 300ms ease;
}

.movie-card__poster {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    transform 500ms cubic-bezier(0.2, 0.7, 0.2, 1),
    filter 300ms ease;
}

.movie-card__no-poster,
.movie-card__cover:has([data-broken])::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-size: var(--text-meta);
  text-align: center;
}

.movie-card__cover:has([data-broken])::after {
  content: 'Нет постера';
}

.movie-card__link:hover .movie-card__poster {
  transform: scale(1.045);
  filter: brightness(1.08);
}

.movie-card__link:focus-visible {
  outline: none;
}

.movie-card__link:focus-visible .movie-card__cover {
  outline: 2px solid var(--euphoria-amber);
  outline-offset: 3px;
  box-shadow: 0 8px 25px color-mix(in srgb, var(--euphoria-amber) 16%, transparent);
}

.movie-card__title {
  display: -webkit-box;
  margin-top: 12px;
  overflow: hidden;
  font-size: var(--text-meta);
  font-weight: 650;
  line-height: 21px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-card__meta {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: var(--text-meta);
  line-height: 20.4px;
}

.movie-card__description {
  display: none;
}

.movie-grid[data-view='list'] .movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--bg-card);
}

.movie-grid[data-view='list'] .movie-card__link {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  column-gap: 20px;
  min-height: 144px;
}

.movie-grid[data-view='list'] .movie-card__cover {
  grid-row: 1 / 4;
  aspect-ratio: auto;
  border-radius: 0;
}

.movie-grid[data-view='list'] .movie-card__poster {
  position: absolute;
  inset: 0;
}

.movie-grid[data-view='list'] .movie-card__link:hover .movie-card__poster {
  transform: none;
}

.movie-grid[data-view='list'] .movie-card__title {
  margin: 16px 64px 6px 0;
  font-size: var(--text-body);
  font-weight: 700;
  line-height: 23px;
}

.movie-grid[data-view='list'] .movie-card__meta {
  margin: 0 64px 10px 0;
  line-height: 20px;
}

.movie-grid[data-view='list'] .movie-card__description {
  display: -webkit-box;
  align-self: start;
  max-width: 760px;
  max-height: 42px;
  margin: 0 52px 16px 0;
  overflow: hidden;
  color: var(--text-muted);
  font-size: var(--text-meta);
  line-height: 21px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-grid[data-view='list'] .movie-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  flex-direction: column;
  margin: 0;
  padding: 0;
}

@media (prefers-reduced-motion: reduce) {
  .movie-card__poster {
    transition: none;
  }

  .movie-card__link:hover .movie-card__poster {
    transform: none;
  }
}

.movie-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.movie-actions__button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0;
  border: 1px solid transparent;
  color: var(--text-muted);
  background: var(--bg-input);
  font: inherit;
  cursor: pointer;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.movie-actions__button:hover {
  border-color: var(--border-active);
  color: var(--text-main);
}

.movie-actions__button:focus-visible {
  outline: 2px solid var(--euphoria-amber);
  outline-offset: 2px;
}

.movie-actions__button[aria-pressed='true'] {
  color: var(--euphoria-amber);
  background: color-mix(in srgb, var(--euphoria-amber) 10%, transparent);
}

.movie-actions__button--favorite[aria-pressed='true'] {
  color: var(--color-favorite);
  background: color-mix(in srgb, var(--color-favorite) 10%, transparent);
}

.movie-actions__button--favorite[aria-pressed='true'] .icon {
  fill: currentColor;
}

.movie-actions--card {
  margin-top: auto;
  padding-top: 7px;
}

.movie-actions--card .movie-actions__button {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.movie-actions--card .movie-actions__button .icon {
  width: 16px;
  height: 16px;
}

.movie-actions--hero {
  gap: 10px;
}

.movie-actions--hero .movie-actions__button {
  width: 46px;
  height: 46px;
  border-radius: 50%;
}

.movie-actions--hero .movie-actions__button .icon {
  width: 20px;
  height: 20px;
}

.movie-actions--hero .movie-actions__label { display: none; }

@media (prefers-reduced-motion: reduce) {
  .movie-actions__button {
    transition: none;
  }
}

.movie-actions--spotlight {
  gap: 8px;
}

.movie-actions--spotlight .movie-actions__button {
  width: 38px;
  height: 38px;
  border-color: var(--border-subtle);
  border-radius: 9px;
}

.movie-actions--spotlight .movie-actions__button .icon {
  width: 20px;
  height: 20px;
}

.view-toggle {
  display: inline-flex;
  flex: none;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: var(--bg-card);
}

.view-toggle__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 10px;
  border: 0;
  border-radius: 7px;
  color: var(--text-muted);
  background: transparent;
  font-size: var(--text-meta);
  line-height: 18px;
  cursor: pointer;
}

.view-toggle__button .icon {
  width: 17px;
  height: 17px;
}

.view-toggle__button:hover {
  color: var(--text-main);
}

.view-toggle__button[aria-pressed='true'] {
  color: var(--euphoria-amber);
  background: color-mix(in srgb, var(--euphoria-amber) 14%, transparent);
  box-shadow: inset 0 0 0 1px var(--border-subtle);
}

.view-toggle__button:focus-visible {
  outline: 2px solid var(--euphoria-amber);
  outline-offset: 2px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  margin: 40px 0 24px;
}

.pagination__pages {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagination__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 40px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: var(--text-main);
  background: var(--bg-input);
  box-shadow: var(--control-raised);
  font-size: var(--text-meta);
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.pagination__item:hover,
.pagination__item:focus-visible,
.pagination__item[aria-current='page'] {
  border-color: var(--euphoria-amber);
  color: var(--euphoria-amber);
  background: var(--euphoria-amber-glow);
}

.pagination__item[aria-current='page'] {
  border-color: var(--border-active);
  font-weight: 800;
}

.pagination__item:focus-visible {
  outline: 2px solid var(--euphoria-amber);
  outline-offset: 3px;
}

.pagination__step {
  padding-inline: 14px;
}

.pagination__step .icon {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

.pagination__gap {
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  min-width: 24px;
  min-height: 40px;
  padding-bottom: 8px;
  color: var(--text-muted);
  letter-spacing: 1px;
  user-select: none;
}

.spotlight {
  position: relative;
  isolation: isolate;
  padding: 24px 28px 12px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--euphoria-amber) 24%, transparent);
  border-radius: 16px;
  color: var(--text-main);
  background: var(--bg-card);
  box-shadow: 0 14px 50px rgba(0, 0, 0, 0.09);
}

.spotlight__atmosphere {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  opacity: 0.32;
  pointer-events: none;
}

.spotlight__atmosphere::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--bg-card), transparent 85%);
  opacity: 0.75;
}

.spotlight__backdrop {
  position: absolute;
  inset: -20%;
  width: 140%;
  height: 140%;
  object-fit: cover;
  object-position: 70% 40%;
  filter: blur(38px) saturate(1.3);
}

.spotlight__slide {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  min-height: 174px;
}

.spotlight__poster {
  position: relative;
  display: block;
  width: 116px;
  height: 174px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: 5px;
  background: var(--surface-poster);
}

.spotlight__poster-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 450ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.spotlight__poster:hover .spotlight__poster-image {
  transform: scale(1.04);
}

.spotlight__text {
  min-width: 0;
  padding-right: 144px;
}

.spotlight__eyebrow {
  margin: 0 0 6px;
  color: var(--euphoria-amber);
  font-size: var(--text-meta);
  font-weight: 700;
  line-height: 15px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.spotlight__title {
  margin: 0 0 2px;
  overflow: hidden;
  font-size: var(--text-size-26);
  font-weight: 800;
  line-height: 32px;
  letter-spacing: -0.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.spotlight__title-link:hover {
  color: var(--euphoria-amber);
}

.spotlight__original,
.spotlight__meta {
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--text-muted);
  font-size: var(--text-meta);
  line-height: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spotlight__meta {
  margin-bottom: 10px;
}

.spotlight__description {
  display: -webkit-box;
  height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  font-size: var(--text-small);
  line-height: 22px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.spotlight__about {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 6px 16px;
  border: 1px solid var(--border-active);
  border-radius: 7px;
  color: var(--text-main);
  box-shadow: var(--control-raised);
  font-size: var(--text-small);
  line-height: 20px;
  text-decoration: none;
}

.spotlight__about .icon {
  width: 16px;
  height: 16px;
}

.spotlight__about:hover {
  border-color: var(--euphoria-amber);
  background: var(--bg-input);
}

.spotlight__actions {
  position: absolute;
  top: 24px;
  right: 28px;
}

.spotlight__rubrics {
  display: flex;
  gap: 6px;
  margin-top: 14px;
  padding: 13px 0 3px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.spotlight__rubric {
  position: relative;
  flex: none;
  min-height: 34px;
  padding: 7px 10px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--text-muted);
  background: transparent;
  font: inherit;
  font-size: var(--text-meta);
  line-height: 18px;
  white-space: nowrap;
  cursor: pointer;
}

.spotlight__rubric:hover {
  color: var(--text-main);
  background: var(--bg-input);
}

.spotlight__rubric[aria-pressed='true'] {
  border-color: var(--border-active);
  color: var(--euphoria-amber);
  background: color-mix(in srgb, var(--euphoria-amber) 12%, transparent);
}

.spotlight :focus-visible {
  outline: 2px solid var(--euphoria-amber);
  outline-offset: 3px;
}

.spotlight__rubric:focus-visible {
  outline-offset: -2px;
}

.spotlight__progress {
  position: absolute;
  right: 10px;
  bottom: 4px;
  left: 10px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

.spotlight__rubric[aria-pressed='true'] .spotlight__progress {
  opacity: 0.55;
}

.spotlight.is-paused .spotlight__progress {
  opacity: 0.25;
}

@media (prefers-reduced-motion: reduce) {
  .spotlight__poster-image {
    transition: none;
  }

  .spotlight__poster:hover .spotlight__poster-image {
    transform: none;
  }
}

.watch-later {
  margin-top: 56px;
}

.watch-later__row {
  display: grid;
  grid-auto-columns: minmax(260px, 1fr);
  grid-auto-flow: column;
  gap: 16px;
  padding-bottom: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.watch-later .movie-card {
  position: relative;
  padding: 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  background: var(--bg-card);
  scroll-snap-align: start;
}

.watch-later .movie-card__link {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  grid-template-rows: 1fr 1fr;
  column-gap: 16px;
  height: 120px;
}

.watch-later .movie-card__cover {
  grid-row: 1 / 3;
  width: 80px;
  height: 120px;
  border-radius: 5px;
}

.watch-later .movie-card__title {
  align-self: end;
  margin: 0 28px 6px 0;
}

.watch-later .movie-card__meta {
  align-self: start;
  margin: 0 28px 0 0;
  line-height: 18px;
}

.watch-later .movie-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  flex-direction: column;
  padding: 0;
}

.watch-later__empty {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  border: 1px dashed var(--border-active);
  border-radius: 14px;
  background: var(--bg-card);
}

.watch-later__empty-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: var(--euphoria-amber);
  background: color-mix(in srgb, var(--euphoria-amber) 12%, transparent);
}

.watch-later__empty-icon .icon {
  width: 24px;
  height: 24px;
}

.watch-later__empty-title {
  font-size: var(--text-body);
}

.watch-later__empty-text {
  margin: 2px 0 0;
  color: var(--text-muted);
  font-size: var(--text-meta);
}

.watch-later__empty-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 8px 16px;
  border: 1px solid var(--border-active);
  border-radius: 8px;
  color: var(--text-main);
  box-shadow: var(--control-raised);
  font-size: var(--text-small);
  text-decoration: none;
  white-space: nowrap;
}

.watch-later__empty-link .icon {
  width: 16px;
  height: 16px;
}

.watch-later__empty-link:hover {
  border-color: var(--euphoria-amber);
  background: var(--bg-input);
}

.catalog-page {
  padding-top: 32px;
}

.collections-page {
  padding-top: 32px;
}

.collections-page .section-heading {
  margin-bottom: 8px;
}

.collections-page__note {
  margin: 0 0 28px;
  color: var(--text-muted);
  font-size: var(--text-small);
}

.collections-page__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  grid-auto-rows: 1fr;
  align-items: stretch;
}

.collections-page__grid > .status-message {
  grid-column: 1 / -1;
}

.collection-page {
  padding-top: 28px;
}

.collection-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: 382px;
  margin-bottom: 48px;
  padding: 56px;
  border: 1px solid var(--border-subtle);
  border-radius: 22px;
  color: var(--text-main);
  background: var(--surface-hero);
}

.collection-hero__text {
  flex: 1;
  min-width: 0;
}

.collection-hero__eyebrow {
  margin: 0 0 18px;
  color: var(--euphoria-amber);
  font-size: var(--text-meta);
  font-weight: 700;
  line-height: 15px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.collection-hero__title {
  margin: 0 0 6px;
  font-size: var(--text-size-30);
  font-weight: 800;
  line-height: 41px;
  letter-spacing: -0.5px;
}

.collection-hero__description {
  margin: 10px 0 24px;
  color: var(--text-muted);
  font-size: var(--text-meta);
  line-height: 23.4px;
}

.collection-hero .button--secondary {
  width: auto;
  min-height: 0;
  padding: 8px 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text-muted);
  font-size: var(--text-meta);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.collection-hero .button--secondary:hover {
  background: transparent;
  box-shadow: none;
  color: var(--text-main);
  filter: none;
  transform: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border: none;
  border-radius: 100px;
  color: var(--bg-dark);
  background: linear-gradient(135deg, var(--euphoria-amber) 0%, var(--accent-deep) 100%);
  box-shadow: 0 8px 25px var(--euphoria-amber-glow);
  font-size: var(--text-meta);
  font-weight: 800;
  letter-spacing: 1px;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
}

.button:hover {
  filter: brightness(1.15);
  box-shadow: 0 12px 30px color-mix(in srgb, var(--euphoria-amber) 45%, transparent);
  transform: translateY(-2px);
}

.button:focus-visible {
  outline: 2px solid var(--euphoria-amber);
  outline-offset: 4px;
}

.button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.button .icon {
  width: 16px;
  height: 16px;
}

.button--secondary {
  color: var(--on-neutral);
  background: linear-gradient(135deg, var(--neutral-from) 0%, var(--neutral-to) 100%);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
}

.button--secondary:hover {
  filter: brightness(1.2);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.library-list-page {
  padding-top: 32px;
}

.library-list-page__note {
  color: var(--text-muted);
  font-size: var(--text-small);
}

.library-list-page__login {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  color: var(--euphoria-amber);
  font-size: var(--text-small);
  text-decoration: none;
}

.library-list-page__login .icon {
  width: 16px;
  height: 16px;
}

.auth-page {
  --auth-gradient: linear-gradient(168deg, var(--euphoria-amber), var(--accent-deep));

  display: grid;
  grid-template-columns: minmax(0, 1229fr) minmax(448px, 691fr);
  width: 100%;

  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  color: var(--text-main);
  background: var(--bg-gradient-radial), var(--bg-dark);
  color-scheme: dark;
}

.auth-page__panel {
  --auth-content-height: 620px;

  display: flex;
  align-items: flex-start;
  justify-content: center;

  overflow-y: auto;

  padding: max(24px, calc((100dvh - var(--auth-content-height)) / 2)) 32px 24px;
  border-left: 1px solid var(--border-subtle);
  grid-column: 2;
  grid-row: 1;
  background: rgba(10, 12, 18, 0.85);
  backdrop-filter: blur(8px);
}

.auth-page__content {
  width: 384px;
  max-width: 100%;
}

.auth-page__brand {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}

.auth-page .logo__mark {
  width: 50px;
  height: 50px;
}

.auth-page .logo__word {
  font-size: var(--text-size-48);
}

.auth-page__tabs {
  position: relative;
  isolation: isolate;
  display: flex;
  height: 50px;
  margin-bottom: 24px;
  padding: 4px;
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  background: var(--bg-input);
}

.auth-page__tabs::before {
  content: '';
  position: absolute;
  inset: 4px auto 4px 4px;
  z-index: -1;
  width: calc((100% - 8px) / 2);
  border-radius: 100px;
  background: var(--auth-gradient);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--euphoria-amber) 30%, transparent);
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-page__tabs[data-active='register']::before {
  transform: translateX(100%);
}

.auth-page__tab {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  border-radius: 100px;
  color: var(--text-muted);
  font-size: var(--text-meta);
  line-height: 23.4px;
  text-decoration: none;
  transition: color 260ms ease;
}

.auth-page__tab[aria-current='page'] {
  color: var(--bg-dark);
}

.auth-page__tab:focus-visible {
  outline: 2px solid var(--euphoria-amber);
  outline-offset: 4px;
}

@media (max-height: 860px) {
  .auth-page__panel {
    --auth-content-height: 540px;
  }

  .auth-page__brand {
    margin-bottom: 18px;
  }

  .auth-page .logo__mark {
    width: 40px;
    height: 40px;
  }

  .auth-page .logo__word {
    font-size: var(--text-size-36);
  }

  .auth-page__tabs {
    height: 44px;
    margin-bottom: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-page__tabs::before,
  .auth-page__tab {
    transition: none;
  }
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
  text-decoration: none;
  white-space: nowrap;
}

.logo:focus-visible {
  outline: 2px solid var(--euphoria-amber);
  outline-offset: 5px;
  border-radius: 4px;
}

.logo__mark {
  display: block;
  flex: none;
  width: 40px;
  height: 40px;
}

.logo__word {
  font-size: var(--text-size-36);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.2;
}

.logo__accent {
  color: var(--euphoria-amber);
}

.auth-form {
  min-height: 434px;
}

.auth-form__heading--changed {
  animation: auth-heading-in 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes auth-heading-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

.auth-form__username {
  display: grid;
  grid-template-rows: 1fr;
  transition:
    grid-template-rows 280ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 220ms ease;
}

.auth-form__username[data-open='false'] {
  grid-template-rows: 0fr;
  opacity: 0;
}

.auth-form__username-inner {
  min-height: 0;

  margin: 0 -20px;
  padding: 0 20px;
  overflow: hidden;
}

.auth-form__title {
  margin: 0 0 8px;
  font-size: var(--text-size-30);
  font-weight: 800;
  line-height: 41px;
  letter-spacing: -0.5px;
}

.auth-form__subtitle {
  margin: 0 0 20px;
  color: var(--text-muted);
  font-size: var(--text-meta);
  line-height: 23.4px;
}

.auth-form__error {
  margin: 0 0 18px;
  padding: 12px 16px;
  border: 1px solid var(--euphoria-wine);
  border-radius: var(--radius-sm);
  color: var(--color-danger);
  background: color-mix(in srgb, var(--euphoria-wine) 18%, transparent);
  font-size: var(--text-meta);
}

.auth-form__error:empty {
  display: none;
}

.auth-form__submit {
  width: 100%;
  height: 46px;
  margin-top: 4px;
  padding: 0 24px;
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  font-family: inherit;
  font-size: var(--text-meta);
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.auth-form__submit:disabled {
  cursor: not-allowed;
}

.auth-form__submit--ready {
  border-color: transparent;
  color: var(--bg-dark);
  background: var(--auth-gradient);
  box-shadow: 0 6px 24px color-mix(in srgb, var(--euphoria-amber) 30%, transparent);
}

.auth-form__submit--ready:hover {
  box-shadow: 0 8px 30px color-mix(in srgb, var(--euphoria-amber) 45%, transparent);
}

.auth-form__switch {
  margin: 16px 0 0;
  color: var(--text-muted);
  font-size: var(--text-meta);
  line-height: 18px;
  text-align: center;
}

.auth-form__switch-link {
  color: var(--euphoria-amber);
  font-weight: 600;
  text-decoration: none;
}

.auth-form__switch-link:hover {
  text-shadow: 0 0 10px var(--euphoria-amber-glow);
}

.auth-form__submit:focus-visible,
.auth-form__switch-link:focus-visible {
  outline: 2px solid var(--euphoria-amber);
  outline-offset: 4px;
}

@media (max-height: 860px) {
  .auth-form {
    min-height: 391px;
  }

  .auth-form__title {
    font-size: var(--text-size-26);
    line-height: 34px;
  }

  .auth-form__subtitle {
    margin-bottom: 12px;
  }

  .auth-form__error {
    margin-bottom: 12px;
    padding: 8px 14px;
  }

  .auth-form .text-field {
    margin-bottom: 12px;
  }

  .auth-form .text-field__label {
    margin-bottom: 6px;
  }

  .auth-form .text-field__hint {
    margin-top: 4px;
  }

  .auth-form__switch {
    margin-top: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-form__heading--changed {
    animation: none;
  }

  .auth-form__username {
    transition: none;
  }
}

.text-field {
  margin-bottom: 18px;
}

.text-field__label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: var(--text-meta);
  font-weight: 700;
  line-height: 15px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.text-field__control {
  position: relative;
}

.text-field__input {
  width: 100%;
  height: 45px;
  padding: 12px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  color: var(--text-main);
  background: var(--bg-input);
  font-family: inherit;
  font-size: var(--text-small);
  line-height: 20px;
  transition:
    border-color 200ms ease,
    box-shadow 200ms ease,
    background 200ms ease;
}

.text-field__input:focus {
  outline: none;
  border-color: var(--euphoria-amber);
  box-shadow: 0 0 20px var(--euphoria-amber-glow);
}

.text-field--invalid .text-field__input {
  border-color: var(--color-danger-strong);
}

.text-field--invalid .text-field__input:focus {
  box-shadow: 0 0 20px var(--euphoria-wine-glow);
}

.text-field--password .text-field__input {
  padding-right: 84px;
}

.text-field__hint {
  display: block;
  margin-top: 6px;
  color: var(--color-danger);
  font-size: var(--text-meta);
}

.text-field__hint:empty {
  display: none;
}

.text-field__toggle {
  position: absolute;
  top: 0;
  right: 6px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 45px;
  padding: 0;
  border: 0;
  border-radius: 100px;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
}

.text-field__toggle:hover {
  color: var(--text-main);
}

.text-field__toggle .icon {
  width: 20px;
  height: 20px;
}

.text-field__eye-off,
.text-field__toggle[aria-pressed='true'] .text-field__eye {
  display: none;
}

.text-field__toggle[aria-pressed='true'] .text-field__eye-off {
  display: block;
}

.text-field__caps {
  position: absolute;
  top: 0;
  right: 46px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 45px;
  color: var(--euphoria-amber);
  cursor: help;
}

.text-field__caps[hidden] {
  display: none;
}

.text-field__caps .icon {
  width: 18px;
  height: 18px;
}

.auth-scene {
  grid-column: 1;
  grid-row: 1;
  --scene-film: #090b0e;
  --scene-film-edge: #2c2621;
  --scene-film-mid: #141314;
  --scene-rec: #e5484d;

  position: relative;
  min-width: 0;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
}

.auth-scene__canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1229px;
  height: 1080px;
  transform: translate(-50%, -50%);
}

.auth-scene__reels {
  position: absolute;
  top: -238px;
  left: 98px;
  width: 1204px;
  height: 1555px;
  transform: rotate(-8deg);
}

.auth-scene__strip {
  position: absolute;
  top: 0;
  width: 230px;
  height: 1555px;
  overflow: hidden;
  filter: drop-shadow(0 0 25px rgba(0, 0, 0, 0.65));
}

.auth-scene__strip--1 {
  left: 231px;
}

.auth-scene__strip--2 {
  left: 487px;
}

.auth-scene__strip--3 {
  left: 743px;
}

.auth-scene__track {
  position: relative;
  top: -60px;

  animation: auth-film-scroll 55s linear infinite;
  will-change: transform;
}

.auth-scene__strip--2 .auth-scene__track {
  animation-duration: 65s;
  animation-direction: reverse;
}

.auth-scene__strip--3 .auth-scene__track {
  animation-duration: 60s;
}

@keyframes auth-film-scroll {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-1400px);
  }
}

.auth-scene__tile {
  position: relative;
  height: 1400px;
  overflow: hidden;
  background: linear-gradient(
    90deg,
    var(--scene-film-edge),
    var(--scene-film-mid) 9%,
    var(--scene-film) 50%,
    var(--scene-film-mid) 91%,
    var(--scene-film-edge)
  );
  box-shadow:
    inset 1px 0 color-mix(in srgb, var(--euphoria-amber) 30%, transparent),
    inset -1px 0 color-mix(in srgb, var(--euphoria-amber) 20%, transparent);
  -webkit-mask-image: url(/assets/film-perforation-mask.3fdb2fda0ebdd7dc294e.svg);
  mask-image: url(/assets/film-perforation-mask.3fdb2fda0ebdd7dc294e.svg);
  -webkit-mask-size: 230px 28px;
  mask-size: 230px 28px;
  -webkit-mask-repeat: repeat-y;
  mask-repeat: repeat-y;
}

.auth-scene__frame {
  height: 350px;
  margin: 0 24px;
}

.auth-scene__poster {
  display: block;
  width: 182px;
  height: 324px;
  border: 1px solid color-mix(in srgb, var(--euphoria-amber) 18%, transparent);
  border-radius: 2px;
  object-fit: contain;
  background: var(--bg-dark);
  filter: brightness(0.82);
  -webkit-user-drag: none;
}

.auth-scene__caption {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: color-mix(in srgb, var(--euphoria-amber) 65%, transparent);
  font-family: var(--font-tv);
  font-size: 11px;
  font-weight: 700;
  line-height: 13px;
  white-space: nowrap;
  letter-spacing: 0.6px;
}

.auth-scene__shade {
  position: absolute;
  inset: 0;
  opacity: 0.94;
  background:
    linear-gradient(
      180deg,
      var(--bg-dark) 0%,
      transparent 18%,
      transparent 52%,
      var(--bg-dark) 96%,
      var(--bg-dark) 100%
    ),
    linear-gradient(90deg, var(--bg-dark) 0%, transparent 34%);
  pointer-events: none;
}

.auth-scene__copy {
  position: absolute;
  bottom: 52px;
  left: 44px;
  width: 372px;
  max-width: calc(100% - 88px);
}

.auth-scene__rec {
  margin: 0 0 13px;
  color: var(--text-muted);
  font-size: var(--text-meta);
  font-weight: 700;
  line-height: 15px;
  letter-spacing: 1px;
}

.auth-scene__rec-dot {
  color: var(--scene-rec);
}

.auth-scene__title {
  margin: 0;
  font-size: var(--text-size-30);
  font-weight: 800;
  line-height: 41px;
  letter-spacing: -0.5px;
}

.auth-scene__description {
  width: 340px;
  max-width: 100%;
  margin: 42px 0 0;
  color: var(--text-muted);
  font-size: var(--text-meta);
  line-height: 23.4px;
}

@media (prefers-reduced-motion: reduce) {
  .auth-scene__track {
    animation: none;
    will-change: auto;
  }
}

.film-page {
  display: grid;
  gap: 24px;
  min-width: 0;
  padding-top: 32px;
}

.film-hero {
  --film-hero-surface: var(--surface-solid);
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  align-items: center;
  gap: 36px;
  min-height: 360px;
  padding: 32px;
  overflow: hidden;
  border: 1px solid var(--border-active);
  border-radius: 16px;
  background: var(--film-hero-surface);
}

.film-hero__backdrop {
  position: absolute;
  z-index: -2;
  inset: -40px -40px -40px 30%;
  width: calc(70% + 80px);
  height: calc(100% + 80px);
  object-fit: cover;
  filter: blur(28px) saturate(1.2);
  opacity: 0.55;
  pointer-events: none;
}

.film-hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, var(--film-hero-surface) 25%, transparent 100%);
  pointer-events: none;
}

.film-hero__cover {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 10px;
  background: var(--bg-input);
  box-shadow: 0 14px 30px var(--shadow-soft);
}

.film-hero__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.film-hero__no-poster,
.film-hero__cover:has([data-broken])::after {
  color: var(--text-muted);
  font-size: var(--text-meta);
}

.film-hero__cover:has([data-broken])::after {
  content: 'Нет постера';
}

.film-hero__info {
  min-width: 0;
}

.film-hero__title {
  margin: 14px 0 0;
  font-size: clamp(30px, 3.4vw, 46px);
  font-weight: 650;
  line-height: 1.16;
  letter-spacing: -1px;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.film-hero__original {
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: var(--text-body);
}

.film-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-small);
}

.film-hero__meta-item + .film-hero__meta-item::before {
  content: '·';
  margin-right: 10px;
  color: var(--text-muted);
}

.film-hero__audience {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.film-hero__audience-value {
  color: var(--euphoria-amber);
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.film-hero__audience-count {
  color: var(--text-muted);
  font-size: var(--text-meta);
  white-space: pre-line;
}

.film-hero__description {
  display: -webkit-box;
  max-width: 620px;
  margin: 18px 0 0;
  overflow: hidden;
  color: var(--text-muted);
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.film-hero .movie-actions {
  margin-top: 24px;
}

.film-about__panel {
  padding: 24px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.film-about__title {
  margin: 0;
  font-size: var(--text-title);
}

.film-about__description {
  max-width: 760px;
  margin: 12px 0 0;
  line-height: 1.65;
}

.film-about__details {
  display: grid;
  gap: 12px;
  margin: 22px 0 0;
}

.film-about__row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 16px;
}

.film-about__term {
  color: var(--text-muted);
  font-size: var(--text-meta);
}

.film-about__value {
  margin: 0;
  font-size: var(--text-meta);
}

.film-about__similar {
  margin-top: 40px;
}

.film-people {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.film-people__title {
  margin: 0;
  font-size: var(--text-title);
}

.film-people__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
  gap: 20px 16px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.film-people__link {
  display: grid;
  gap: 4px;
  color: inherit;
  text-decoration: none;
}

.film-people__photo {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 4;
  margin-bottom: 6px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--bg-input);
}

.film-people__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}

.film-people__initials {
  color: var(--euphoria-amber);
  font-size: var(--text-large);
  font-weight: 800;
}

.film-people__name {
  font-size: var(--text-meta);
  font-weight: 700;
  line-height: 1.3;
}

.film-people__role {
  color: var(--text-muted);
  font-size: var(--text-meta);
  line-height: 1.3;
}

.film-people__link:hover .film-people__name {
  color: var(--euphoria-amber);
}

.film-people__link:hover .film-people__image {
  transform: scale(1.04);
}

.film-people__link:focus-visible {
  outline: 2px solid var(--euphoria-amber);
  outline-offset: 4px;
  border-radius: 10px;
}

@media (prefers-reduced-motion: reduce) {
  .film-people__image {
    transition: none;
  }
}

.film-rating {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.film-rating__title {
  margin: 0;
  font-size: var(--text-title);
}

.film-rating__columns {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: center;
  gap: 32px;
  margin-top: 18px;
}

.film-rating__audience {
  display: grid;
  gap: 6px;
}

.film-rating__average {
  color: var(--euphoria-amber);
  font-size: var(--text-size-48);
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.film-rating__count,
.film-rating__guest {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--text-meta);
}

.film-rating__mine {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.film-rating__label {
  font-weight: 700;
}

.film-rating__value {
  display: inline-block;
  color: var(--euphoria-amber);
}

.film-rating__changed {
  animation: film-rating-change 320ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

@keyframes film-rating-change {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.film-rating__reset:disabled {
  cursor: progress;
}

.film-rating__reset[hidden] {
  display: none;
}

.film-rating__reset:focus-visible {
  outline: 2px solid var(--euphoria-amber);
  outline-offset: 2px;
}

.film-rating__reset {
  justify-self: start;
  padding: 4px 0;
  border: 0;
  color: var(--text-muted);
  background: none;
  font: inherit;
  font-size: var(--text-meta);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.film-rating__reset:hover {
  color: var(--text-main);
}

.film-rating__login {
  color: var(--euphoria-amber);
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  .film-rating__changed {
    animation: none;
  }
}

.film-rating__count { white-space: pre-line; }

.score-scale {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 0;
  max-width: 560px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
}

.score-scale__score {
  min-width: 0;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-right: 1px solid var(--border-subtle);
  border-radius: 0;
  color: var(--text-main);
  background: var(--bg-input);
  font: inherit;
  font-size: var(--text-body);
  font-weight: 750;
  cursor: pointer;
  transition:
    background-color 240ms ease,
    color 240ms ease,
    border-color 240ms ease;
}

.score-scale__score:last-child {
  border-right: 0;
}

.score-scale__score--filled {
  border-color: transparent;
  color: var(--bg-dark);
  background: var(--euphoria-amber);
}

:where(.score-scale:has(.score-scale__score:not(:disabled):hover))
  .score-scale__score:not(:disabled) {
  border-color: var(--border-subtle);
  color: var(--text-main);
  background: var(--bg-input);
}

.score-scale__score:not(:disabled):hover,
.score-scale__score:not(:disabled):has(~ .score-scale__score:not(:disabled):hover) {
  border-color: transparent;
  color: var(--bg-dark);
  background: color-mix(in srgb, var(--euphoria-amber) 75%, var(--bg-dark));
}

.score-scale__score:disabled {
  cursor: progress;
}

.score-scale__score:focus-visible {
  outline: 2px solid var(--euphoria-amber);
  outline-offset: -3px;
}

@media (prefers-reduced-motion: reduce) {
  .score-scale__score {
    transition: none;
  }
}

.film-reviews {
  display: grid;
  gap: 20px;
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.film-reviews__title {
  margin: 0;
  font-size: var(--text-title);
}

.film-reviews__guest {
  margin: 0;
  color: var(--text-muted);
}

.film-reviews__login {
  color: var(--euphoria-amber);
  font-weight: 700;
}

.my-review {
  display: grid;
  gap: 10px;
}

.my-review__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.my-review__label {
  font-weight: 700;
}

.my-review__edit {
  padding: 4px 0;
  border: 0;
  color: var(--text-muted);
  background: none;
  font: inherit;
  font-size: var(--text-meta);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.my-review__edit:hover {
  color: var(--euphoria-amber);
}

.my-review__edit:focus-visible {
  outline: 2px solid var(--euphoria-amber);
  outline-offset: 3px;
}

.review-card {
  padding: 20px 22px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  scroll-margin-top: 112px;
}

.review-card__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.review-card__avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--on-accent);
  background: var(--euphoria-amber);
  font-size: var(--text-meta);
  font-weight: 800;
}

.review-card__who {
  display: grid;
  min-width: 0;
}

.review-card__author {
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-card__date {
  color: var(--text-muted);
  font-size: var(--text-meta);
}

.review-card__title {
  margin: 14px 0 0;
  font-size: var(--text-title);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.review-card__text {
  margin: 8px 0 0;
  line-height: 1.6;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.review-card__spoiler {
  position: relative;
}

.review-card__text--hidden {
  filter: blur(6px);
  opacity: 0.7;
  user-select: none;
  pointer-events: none;
  transition: filter var(--spoiler-reveal-duration, 650ms) ease, opacity var(--spoiler-reveal-duration, 650ms) ease;
}

.review-card__spoiler--revealing .review-card__text--hidden {
  filter: blur(0);
  opacity: 1;
}

.review-card__spoiler--revealing .review-card__reveal {
  opacity: 0;
  pointer-events: none;
}

.review-card__reveal {
  position: absolute;
  top: 50%;
  left: 50%;
  padding: 8px 16px;
  border: 1px solid var(--border-active);
  border-radius: 999px;
  color: var(--text-main);
  background: var(--bg-dark);
  font: inherit;
  font-size: var(--text-meta);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: opacity var(--spoiler-reveal-duration, 650ms) ease, border-color 160ms ease, color 160ms ease;
}

.review-card__reveal:hover {
  border-color: var(--euphoria-amber);
  color: var(--euphoria-amber);
}

.review-card__reveal:focus-visible {
  outline: 2px solid var(--euphoria-amber);
  outline-offset: 3px;
}

.review-card__head { grid-template-columns: auto minmax(0, 1fr) auto; }
.review-card__score { color: var(--euphoria-amber); font-weight: 700; white-space: nowrap; }
.review-card__text--collapsed { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; overflow: hidden; }
.review-card__toggle { margin-top: 12px; margin-right: 16px; padding: 0; border: 0; color: var(--euphoria-amber); background: transparent; font: inherit; cursor: pointer; }
.review-card__toggle[hidden] { display: none; }
.review-card__toggle:focus-visible { outline: 2px solid var(--euphoria-amber); outline-offset: 4px; }

.review-form {
  display: grid;
  gap: 10px;
}

.review-form__label {
  font-weight: 700;
}

.review-form__title,
.review-form__text {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  background: var(--bg-input);
  font: inherit;
  line-height: 1.55;
  transition: border-color 200ms ease;
}

.review-form__text {
  min-height: 120px;
  resize: vertical;
}

.review-form__title::placeholder,
.review-form__text::placeholder {
  color: var(--text-muted);
}

.review-form__title:focus,
.review-form__text:focus {
  border-color: var(--border-active);
  outline: none;
}

.review-form__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.review-form__spoiler {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: var(--text-meta);
  cursor: pointer;
}

.review-form__checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--euphoria-amber);
}

.review-form__counter {
  color: var(--text-muted);
  font-size: var(--text-meta);
  font-variant-numeric: tabular-nums;
}

.review-form__actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.review-form__save {
  padding: 12px 22px;
  border: none;
  border-radius: 100px;
  color: var(--on-accent);
  background: linear-gradient(135deg, var(--euphoria-amber) 0%, var(--accent-deep) 100%);
  font: inherit;
  font-size: var(--text-meta);
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: filter 200ms ease;
}

.review-form__save:hover:not(:disabled) {
  filter: brightness(1.12);
}

.review-form__save:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.review-form__cancel,
.review-form__remove {
  padding: 4px 0;
  border: 0;
  color: var(--text-muted);
  background: none;
  font: inherit;
  font-size: var(--text-meta);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.review-form__cancel:hover:not(:disabled) {
  color: var(--text-main);
}

.review-form__remove:hover:not(:disabled) {
  color: var(--color-danger);
}

.review-form__save:focus-visible,
.review-form__cancel:focus-visible,
.review-form__remove:focus-visible,
.review-form__checkbox:focus-visible {
  outline: 2px solid var(--euphoria-amber);
  outline-offset: 3px;
}

.review-form__sync {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--text-meta);
}

.review-list__items {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.review-list__empty {
  margin: 0;
  color: var(--text-muted);
}

.review-list__more {
  justify-self: start;
  margin-top: 16px;
  padding: 10px 20px;
  border: 1px solid var(--border-active);
  border-radius: 100px;
  color: var(--text-main);
  background: transparent;
  font: inherit;
  font-size: var(--text-meta);
  font-weight: 700;
  cursor: pointer;
  transition:
    border-color 200ms ease,
    color 200ms ease;
}

.review-list__more:hover:not(:disabled) {
  border-color: var(--euphoria-amber);
  color: var(--euphoria-amber);
}

.review-list__more:disabled {
  opacity: 0.6;
  cursor: wait;
}

.review-list__more:focus-visible {
  outline: 2px solid var(--euphoria-amber);
  outline-offset: 3px;
}

.person-page {
  padding-top: 32px;
}

.person-profile__hero {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  align-items: center;
  gap: 36px;
  padding: 32px;
  border: 1px solid var(--border-active);
  border-radius: 16px;
  background: var(--surface-solid);
}

.person-profile__photo {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 12px;
  background: var(--bg-input);
  box-shadow: 0 14px 30px var(--shadow-soft);
}

.person-profile__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.person-profile__initials {
  color: var(--euphoria-amber);
  font-size: var(--text-size-48);
  font-weight: 800;
}

.person-profile__info {
  min-width: 0;
}

.person-profile__roles {
  margin: 0;
  color: var(--euphoria-amber);
  font-size: var(--text-meta);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.person-profile__name {
  margin: 10px 0 0;
  font-size: clamp(30px, 3.4vw, 46px);
  font-weight: 650;
  line-height: 1.16;
  letter-spacing: -1px;
  overflow-wrap: anywhere;
}

.person-profile__original {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: var(--text-body);
}

.person-profile__facts {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
}

.person-profile__fact {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 16px;
}

.person-profile__term {
  color: var(--text-muted);
  font-size: var(--text-meta);
}

.person-profile__value {
  margin: 0;
  font-size: var(--text-meta);
}

.person-profile__biography {
  max-width: 820px;
  margin: 24px 0 0;
  padding: 24px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  line-height: 1.65;
}

.person-profile__works {
  display: grid;
  gap: 32px;
  margin-top: 40px;
}

.profile-page {
  --profile-avatar-size: 176px;
  --profile-photo-size: 144px;
  --profile-amber-gradient: linear-gradient(135deg, var(--euphoria-amber), #b8783d);
  --profile-hero-gradient: linear-gradient(145.38deg, #3a2614, #1c1611 38%, #10121a 62%, #101b2b);
  width: 100%;
  margin-inline: auto;
  padding-bottom: 48px;
  font-size: 13px;
  line-height: 1.8;
}

[data-theme="light"] .profile-page {
  --profile-hero-gradient: linear-gradient(145.38deg, #f0dac3, #f4e7da 38%, #f7f4ef 62%, #e1e8f4);
}

.profile-page :is(h1, h2, h3, p, dl, dd) { margin: 0; }
.profile-page :is(a, button, input):focus-visible,
.profile-page__photo-control:focus-within {
  outline: 2px solid var(--euphoria-amber);
  outline-offset: 3px;
}

.profile-page__content { position: relative; margin-top: 32px; }
.profile-page__content:has(.profile-page__form:not([hidden])) { margin-top: 40px; }
.profile-page__settings:not(:has(.profile-page__form:not([hidden]))) { display: none; }

.profile-page__hero {
  min-height: 410px;
  padding: 56px;
  display: grid;
  grid-template-columns: var(--profile-avatar-size) minmax(0, 1fr) 330px;
  align-items: center;
  gap: 32px;
  overflow: hidden;
  background: var(--profile-hero-gradient);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}
.profile-page__avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--profile-avatar-size);
  height: var(--profile-avatar-size);
  background: url(/assets/avatar-frame.6a1623363a31996f4eed.svg) center / contain no-repeat;
  pointer-events: none;
}
.profile-page__content:has(.profile-page__form:not([hidden])) .profile-page__avatar {
  position: absolute;
  top: 142px;
  left: 29px;
}
.profile-page__avatar :is(span, img) {
  grid-area: 1 / 1;
  width: var(--profile-photo-size);
  height: var(--profile-photo-size);
  border-radius: 50%;
}
.profile-page__avatar span {
  display: grid;
  place-items: center;
  background: var(--profile-amber-gradient);
  color: #080a0f;
  font-size: 30px;
  font-weight: 800;
}
.profile-page__avatar img { object-fit: cover; }

.profile-page__eyebrow,
.profile-page__slate dt,
.profile-page__field label {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.profile-page__intro h1, .profile-page__section-heading h1, .profile-page__section-heading h2 {
  font-size: 30px;
  line-height: 41px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.profile-page__intro h1 { margin-top: 12px; overflow-wrap: anywhere; }
.profile-page__intro .profile-page__email { margin-top: 4px; color: var(--text-muted); overflow-wrap: anywhere; }
.profile-page__buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.profile-page .profile-page__button {
  width: 220px;
  min-height: 46px;
  max-width: 100%;
  margin: 0;
}
.profile-page .profile-page__button:disabled { opacity: 0.65; cursor: not-allowed; filter: none; transform: none; }

.profile-page__slate {
  position: relative;
  width: 330px;
  min-height: 246px;
  align-self: center;
  padding-top: 48px;
  rotate: 3deg;
  color: #f5f3ef;
  filter: drop-shadow(0 24px 20px rgba(0, 0, 0, 0.6));
}
.profile-page__slate-arm {
  position: absolute;
  left: 0;
  width: 330px;
  height: 24px;
  mask: url(/assets/slate-mask.b79525dd00baf46a6e36.svg) center no-repeat;
}
.profile-page__slate-arm--bottom {
  top: 24px;
  background: url(/assets/slate-bottom.700ab3e1539f9e6a2ee9.svg) -44px 0 no-repeat;
}
.profile-page__slate-arm--top {
  top: 24px;
  transform: rotate(-17deg);
  transform-origin: 0 100%;
  background: url(/assets/slate-top.b8cb7bab6611888d0985.svg) -44px 0 no-repeat;
}
.profile-page__slate-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #10121a;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0 0 10px 10px;
}
.profile-page__slate-row {
  min-width: 0;
  padding: 9px 12px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.profile-page__slate-row:not(.profile-page__slate-row--wide) + .profile-page__slate-row:not(.profile-page__slate-row--wide) {
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}
.profile-page__slate-row--wide { grid-column: 1 / -1; }
.profile-page__slate-row:first-child { border-top: 0; }
.profile-page__slate dt { color: #8e899b; }
.profile-page__slate dd { margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-page__slate-row:not(.profile-page__slate-row--wide) dd {
  color: #e6a15c;
  font-size: 30px;
  font-weight: 800;
  line-height: 41px;
}

.profile-page__favorites { margin-top: 48px; }
.profile-page__section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}
.profile-page__section-heading :is(h1, h2) { display: flex; align-items: center; gap: 12px; }
.profile-page__settings .profile-page__section-heading h1 { white-space: nowrap; }
.profile-page__section-heading :is(h1, h2)::before {
  content: "";
  flex: 0 0 22px;
  height: 22px;
  background: url(/assets/spark-title.cef505d109792cfd9fbf.svg) center no-repeat;
}
.profile-page__section-heading :is(a, span) { color: var(--euphoria-amber); white-space: nowrap; text-decoration: none; }
.profile-page__settings .profile-page__section-heading a { font-size: 16px; font-weight: 700; }
.profile-page__section-heading a:hover { text-decoration: underline; }
.profile-page__empty {
  display: grid;
  justify-items: center;
  padding: 40px 32px;
  text-align: center;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}
.profile-page__empty h3 { margin-top: 16px; }
.profile-page__empty h3, .profile-page__card h2 { font-size: 20px; line-height: 28px; font-weight: 700; }
.profile-page__empty p { max-width: 380px; margin: 8px 0 20px; color: var(--text-muted); }

.profile-page__settings-grid { display: grid; grid-template-columns: minmax(0, 644fr) minmax(0, 456fr); gap: 20px; align-items: start; }
.profile-page__card {
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}
.profile-page__card h2 { margin-bottom: 20px; }
.profile-page__form-grid { display: grid; grid-template-columns: var(--profile-avatar-size) minmax(0, 1fr); gap: 24px; }
.profile-page__photo { text-align: center; }
.profile-page__photo-control {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--profile-avatar-size);
  height: var(--profile-avatar-size);
  border-radius: var(--radius-md);
  cursor: pointer;
}
.profile-page__photo-control span {
  display: grid;
  place-items: center;
  width: var(--profile-photo-size);
  height: var(--profile-photo-size);
  border-radius: 50%;
  background: rgba(8, 10, 15, 0.72);
  color: #f5f3ef;
  font-size: 12px;
}
.profile-page__photo-control input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: inherit;
}
.profile-page__photo-control:has(input:disabled) { cursor: wait; }
.profile-page__photo p { margin-top: 10px; font-size: 12px; line-height: 20.4px; color: var(--text-muted); }
.profile-page__fields { display: grid; align-content: start; gap: 18px; min-width: 0; max-width: 384px; }
.profile-page__field { display: grid; gap: 8px; min-width: 0; }
.profile-page__field input {
  width: 100%;
  height: 45px;
  padding: 0 16px;
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  background-color: var(--bg-input);
  color: var(--text-main);
  font: inherit;
  font-size: 14px;
}
.profile-page__field--password input {
  padding-right: 44px;
  background-image: url(/assets/password-eye.24e5260fce67af78ee70.svg);
  background-position: right 16px center;
  background-repeat: no-repeat;
}
.profile-page__password-rules { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 8px 0 0; padding: 0; }
.profile-page__password-rules li {
  padding: 5px 10px 5px 20px;
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  background: url(/assets/password-rule.d9db793922acdafe6ee0.svg) 8px center no-repeat;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 20.4px;
}
.profile-page__status:not(:empty) { margin-top: 12px; color: var(--euphoria-amber); overflow-wrap: anywhere; }

@media (max-width: 1100px) {
  .profile-page__hero { padding-inline: 40px; grid-template-columns: var(--profile-avatar-size) minmax(0, 1fr) 330px; gap: 24px; }
  .profile-page__intro .profile-page__buttons { flex-wrap: wrap; }
}

@media (max-width: 900px) {
  .profile-page__hero { min-height: 264px; padding-block: 32px; grid-template-columns: var(--profile-avatar-size) minmax(0, 1fr); }
  .profile-page__slate { display: none; }
  .profile-page__settings-grid { grid-template-columns: minmax(0, 1fr); }
  .profile-page .site-logo { width: auto; }
}

@media (max-width: 620px) {
  .profile-page { width: calc(100% - 32px); }
  .profile-page__hero { grid-template-columns: minmax(0, 1fr); padding: 24px 20px; text-align: center; }
  .profile-page__hero .profile-page__avatar { margin-inline: auto; }
  .profile-page__content:has(.profile-page__form:not([hidden])) .profile-page__avatar {
    top: 126px;
    left: calc(50% - var(--profile-avatar-size) / 2);
  }
  .profile-page__buttons { justify-content: center; }
  .profile-page__section-heading { align-items: flex-start; }
  .profile-page__section-heading :is(h1, h2) { font-size: 23px; line-height: 32px; }
  .profile-page__section-heading a { padding-top: 4px; }
  .profile-page__form-grid { grid-template-columns: minmax(0, 1fr); }
  .profile-page__photo-control { margin-inline: auto; }
  .profile-page__card { padding: 20px; }
}

.profile-page__field {
  position: relative;
}

.profile-page__field input[aria-invalid="true"] {
  border-color: var(--euphoria-wine);
}

.profile-page__field-error,
.profile-page__photo-control[data-invalid] + p {
  color: #eea0ae;
  font-size: 12px;
  line-height: 1.5;
}

[data-theme="light"] .profile-page__field-error,
[data-theme="light"] .profile-page__photo-control[data-invalid] + p {
  color: var(--euphoria-wine);
}

.profile-page__field-error:empty,
.profile-page__status:empty {
  display: none;
}

.profile-page__field--password input {
  background-image: none;
}

.profile-page__password-toggle {
  position: absolute;
  top: 26px;
  right: 8px;
  width: 39px;
  height: 39px;
  border: 0;
  border-radius: 50%;
  background: url(/assets/password-eye.24e5260fce67af78ee70.svg) center no-repeat;
  cursor: pointer;
}

.profile-page__password-toggle[aria-pressed="true"] {
  background-color: var(--bg-input);
}

.profile-page__password-rules li.is-met {
  border-color: var(--border-active);
  background-color: var(--euphoria-amber-glow);
  color: var(--euphoria-amber);
}

.profile-page__content:has(.profile-page__photo-control[data-invalid]) .profile-page__avatar {
  background-image: none;
}

.profile-page__photo-control[data-invalid]::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url(/assets/avatar-frame.6a1623363a31996f4eed.svg) center / contain no-repeat;
  filter: hue-rotate(310deg) saturate(1.6) brightness(.64);
  pointer-events: none;
}

.profile-page__photo-control[data-invalid] span {
  color: #eea0ae;
}

.profile-page__status[data-state="error"] {
  padding: 12px 16px;
  border: 1px solid var(--euphoria-wine);
  border-radius: var(--radius-sm);
  background: rgba(128, 22, 43, .18);
  color: #eea0ae;
}

[data-theme="light"] .profile-page__status[data-state="error"] {
  color: var(--euphoria-wine);
}

.profile-page__status[data-state="success"] {
  position: fixed;
  bottom: 40px;
  left: 50%;
  z-index: 3;
  max-width: calc(100vw - 32px);
  width: max-content;
  transform: translateX(-50%);
  padding: 14px 22px 14px 44px;
  border: 1px solid var(--border-active);
  border-radius: 100px;
  background: var(--surface-solid) url(/assets/spark-title.cef505d109792cfd9fbf.svg) 16px center / 18px no-repeat;
  box-shadow: 0 20px 25px rgb(0 0 0 / 40%);
  color: var(--text-main);
}

.profile-page__film-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 170px);
  gap: 24px 20px;
}

.profile-page__tile {
  color: var(--text-main);
  text-decoration: none;
}

.profile-page__poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 170 / 302;
  border-radius: 4px;
  background: var(--bg-card);
}

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

.profile-page__poster-badges {
  position: absolute;
  inset: 10px 10px auto;
  display: flex;
  justify-content: space-between;
  gap: 5px;
}

.profile-page__poster-badges span {
  padding: 3px 7px;
  border-radius: 6px;
  background: #080a0fc7;
  color: #f5f3ef;
  font-size: 11px;
  font-weight: 700;
}

.profile-page__poster-badges span:first-child { color: #e6a15c; }
.profile-page__tile h3 { margin-top: 12px; font-size: 13px; font-weight: 600; }
.profile-page__tile p { color: var(--text-muted); font-size: 12px; }
.profile-page__tile:hover h3 { color: var(--euphoria-amber); }

@media (max-width: 620px) {
  .profile-page__film-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .profile-page__status[data-state="success"] { bottom: 18px; }
}

.profile-page [hidden] { display: none; }

.modal {
  --control-raised:
    inset 0 1px 0 rgba(255, 255, 255, 0.09), inset 0 -1px 0 rgba(0, 0, 0, 0.4),
    0 2px 6px rgba(0, 0, 0, 0.25);

  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 26px;
  overflow-y: auto;
  border: 1px solid var(--border-active);
  border-radius: 18px;
  color: var(--text-main);
  background: var(--bg-dark);
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(5px);
}

.modal__header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.modal__eyebrow {
  margin: 0 0 3px;
  color: var(--euphoria-amber);
  font-size: var(--text-meta);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.modal__title {
  margin: 0;
  font-size: var(--text-size-23);
  line-height: 31px;
  overflow-wrap: anywhere;
}

.modal__text {
  margin: 14px 0 0;
  color: var(--text-muted);
  font-size: var(--text-small);
  line-height: 1.5;
}

.modal__close {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  color: var(--text-muted);
  background: var(--bg-input);
  cursor: pointer;
}

.modal__close .icon {
  width: 20px;
  height: 20px;
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.modal__button {
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  color: var(--text-main);
  background: var(--bg-input);
  font: inherit;
  font-size: var(--text-meta);
  font-weight: 700;
  cursor: pointer;
}

.modal__button--primary {
  border-color: var(--border-active);
  color: var(--on-accent);
  background: linear-gradient(160deg, var(--euphoria-amber), var(--accent-deep));
  box-shadow: var(--control-raised);
}

.modal__button--danger {
  border-color: var(--danger-border);
  color: var(--on-danger);
  background: var(--danger-solid);
}

.modal :focus-visible {
  outline: 2px solid var(--euphoria-amber);
  outline-offset: 3px;
}

.modal :disabled {
  opacity: 0.5;
  cursor: wait;
}

.not-found {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  padding: 24px 20px 40px;
  background:
    radial-gradient(
      ellipse 1000px 600px at 50% 0,
      color-mix(in srgb, var(--euphoria-amber) 4.5%, transparent),
      transparent 75%
    ),
    var(--surface-solid);
}

.not-found::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url(/assets/grain.2ba720d435f1cba21206.svg) repeat;
  opacity: 0.15;
  pointer-events: none;
}

.not-found__tv {
  --tv-ratio: 1.5145;

  position: relative;
  container-type: inline-size;
  flex: none;
  width: min(600px, 86vw, calc((100dvh - 300px) * var(--tv-ratio)));
  aspect-ratio: 2402 / 1586;
  margin-bottom: 16px;
}

.not-found__tv-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 3;
  user-select: none;
  -webkit-user-select: none;
}

.not-found__noise {
  position: absolute;
  left: 6%;
  top: 8%;
  width: 68%;
  height: 74%;
  object-fit: cover;
  user-select: none;
  -webkit-user-select: none;
}

.not-found__signal {
  position: absolute;
  left: 6%;
  top: 8%;
  width: 68%;
  height: 74%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.not-found__number {
  font-family: var(--font-tv);

  font-size: 19.5cqi;
  line-height: 0.85;
  font-weight: 400;
  letter-spacing: 1cqi;
  color: var(--tv-text);
  text-shadow: 0 0 18px var(--tv-glow);
}

.not-found__signal-text {
  margin-top: 1.5cqi;
  font-family: var(--font-tv);
  font-size: max(11px, 2.3cqi);
  font-weight: 700;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--tv-text);
  text-shadow:
    0 0 10px var(--tv-glow-soft),
    0.6px 0 currentColor;
}

.not-found__title {
  margin: 0 0 8px;
  font-size: var(--text-large);
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
}

.not-found__text {
  max-width: 520px;
  margin: 0 0 20px;
  font-size: var(--text-small);
  line-height: 1.5;
  color: var(--text-muted);
  text-align: center;
}

.not-found__signal {
  animation: tv-flicker 3s infinite;
}

@keyframes tv-flicker {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.88;
  }
  52% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .not-found__signal {
    animation: none;
  }
}

.app-layout {
  --sidebar-width: 192px;
  --sidebar-ease: cubic-bezier(0.22, 1, 0.36, 1);

  position: relative;
  isolation: isolate;
  min-height: 100vh;
  padding: 0 0 100px var(--sidebar-width);
  color: var(--text-main);
  background:
    radial-gradient(
      ellipse 1000px 600px at 55% 0,
      color-mix(in srgb, var(--euphoria-amber) 4.5%, transparent),
      transparent 75%
    ),
    var(--surface-solid);
  transition: padding-left 340ms var(--sidebar-ease);
}

.app-layout[data-sidebar-collapsed='true'] {
  --sidebar-width: 64px;
}

.app-layout::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url(/assets/grain.2ba720d435f1cba21206.svg) repeat;
  opacity: 0.15;
  pointer-events: none;
}

.app-layout__column {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

@media (prefers-reduced-motion: reduce) {
  .app-layout {
    transition: none;
  }
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  padding: 20px 10px;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.018), transparent 48%), var(--surface-sidebar);
  box-shadow:
    12px 0 36px -18px rgba(0, 0, 0, 0.8),
    inset -1px 0 rgba(255, 255, 255, 0.025);
  transition: width 340ms var(--sidebar-ease);
}

.sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url(/assets/grain.2ba720d435f1cba21206.svg) repeat;
  opacity: 0.075;
  pointer-events: none;
}

.sidebar__head {
  display: flex;
  flex: none;
  align-items: center;
  gap: 10px;
  width: 172px;
  min-height: 54px;
  margin-bottom: 14px;
  padding: 0 4px;
}

.sidebar__brand {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  margin-bottom: 8px;
  padding: 0 9px;
  overflow: hidden;
}

.sidebar__brand .logo { gap: 7px; }
.sidebar__brand .logo__mark { width: 30px; height: 30px; }
.sidebar__brand .logo__word { font-size: 25px; }
[data-sidebar-collapsed='true'] .sidebar__brand { padding: 0 5px; }
[data-sidebar-collapsed='true'] .sidebar__brand .logo__word { display: none; }

.sidebar__title {
  color: var(--text-muted);
  font-size: var(--text-meta);
  white-space: nowrap;
}

.sidebar__toggle {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  color: var(--text-muted);
  background: var(--bg-card);
  cursor: pointer;
}

.sidebar__toggle:hover {
  border-color: var(--border-active);
  color: var(--text-main);
}

.sidebar__toggle .icon {
  width: 21px;
  height: 21px;
  transition: transform 340ms var(--sidebar-ease);
}

.sidebar__nav {
  flex: 1;
  min-height: 100px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
}

.sidebar__group + .sidebar__group {
  margin-top: 20px;
}

.sidebar__caption {
  margin: 0 10px 7px;
  color: #fff;
  font-size: var(--text-meta);
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0.2px;
  text-transform: none;
  white-space: nowrap;
}

.sidebar__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  margin: 3px 0;

  padding: 8px 8px 8px 12px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 20px;
  text-decoration: none;
  transition:
    background 160ms ease,
    color 160ms ease;
}

.sidebar__link .icon {
  width: 19px;
  height: 19px;
}

.sidebar__link:hover {
  color: var(--text-main);
  background: var(--bg-input);
}

.sidebar__link[aria-current='page'] {
  color: var(--euphoria-amber);
  background: color-mix(in srgb, var(--euphoria-amber) 12%, transparent);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.045),
    inset 0 -1px rgba(0, 0, 0, 0.22);
}

.sidebar__link:focus-visible,
.sidebar__toggle:focus-visible {
  outline: 2px solid var(--euphoria-amber);
  outline-offset: 2px;
}

.sidebar__text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar__count {
  position: absolute;
  top: 3px;
  right: calc(100% - 39px);
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border: 2px solid var(--bg-dark);
  border-radius: 999px;
  color: var(--on-accent);
  background: var(--euphoria-amber);
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 13px;
  text-align: center;
  pointer-events: none;
}

.sidebar__title,
.sidebar__text,
.sidebar__caption {
  transition: opacity 170ms ease 90ms;
}

[data-sidebar-collapsed='true'] .sidebar__title,
[data-sidebar-collapsed='true'] .sidebar__text,
[data-sidebar-collapsed='true'] .sidebar__caption {
  opacity: 0;
  transition-delay: 0ms;
}

[data-sidebar-collapsed='true'] .sidebar__toggle .icon {
  transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
  .sidebar,
  .sidebar * {
    transition: none;
  }
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  min-height: 95px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-header__login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  height: 46px;
  padding: 10px 24px;
  border: 1px solid var(--border-active);
  border-radius: 100px;
  color: var(--text-main);
  background: var(--bg-input);
  font-size: var(--text-meta);
  text-transform: uppercase;
  text-decoration: none;
}

.site-header__login:hover {
  color: var(--euphoria-amber);
  background: var(--euphoria-amber-glow);
}

.site-header__account {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  max-width: 240px;
  padding: 6px 14px 6px 6px;
  border: 1px solid var(--border-active);
  border-radius: 24px;
  color: var(--text-main);
  background: var(--bg-input);
  text-decoration: none;
}

.site-header__account:hover,
.site-header__account[aria-current='page'] {
  background: var(--bg-card);
}

.site-header__account:hover .site-header__name {
  color: var(--euphoria-amber);
}

.site-header__avatar {
  display: grid;
  flex: 0 0 30px;
  place-items: center;
  width: 30px;
  height: 30px;
  overflow: hidden;
  border-radius: 50%;
  color: var(--on-accent);
  background: var(--euphoria-amber);
  font-size: 12px;
  font-weight: 750;
}

.site-header__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-header__name {
  display: block;
  min-width: 0;
  max-width: 170px;
  overflow: hidden;
  font-size: var(--text-small);
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-header__login:focus-visible,
.site-header__account:focus-visible {
  outline: 2px solid var(--euphoria-amber);
  outline-offset: 5px;
}

.bare-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.toast-stack {
  --toast-room: 48px;

  position: fixed;
  inset: calc(100px - var(--toast-room)) calc(16px - var(--toast-room)) auto auto;
  width: min(calc(460px + 2 * var(--toast-room)), calc(100vw - 32px + 2 * var(--toast-room)));
  max-height: calc(100dvh - 120px + 2 * var(--toast-room));
  margin: 0;
  padding: var(--toast-room);
  border: 0;
  overflow: auto;
  color: var(--text-main);
  background: transparent;

  pointer-events: none;
}

.toast-stack:popover-open {
  display: grid;
  gap: 10px;
}

.toast-stack::backdrop {
  display: none;
}

.toast {
  display: flex;
  align-items: start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border-active);
  border-radius: 14px;
  background: var(--bg-dark);

  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.18),
    0 14px 34px -6px rgba(0, 0, 0, 0.42);
  font-size: var(--text-body);
  line-height: 1.55;
  animation: toast-in 320ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: auto;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(16px);
  }
}

.toast--error {
  border-color: var(--danger-border);
  color: var(--danger-text);
  background: var(--danger-surface);
}

.toast--success {
  border-color: var(--success-border);
  color: var(--success-text);
  background: var(--success-surface);
}

.toast__icon {
  display: grid;
  flex: 0 0 25px;
  place-items: center;
  height: 25px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.toast__icon .icon {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
}

.toast--error .toast__icon {
  color: var(--danger-icon);
}

.toast__body {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.toast__text {
  margin: 0;
}

.toast__close,
.toast__action {
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.toast__close {
  display: grid;
  flex: 0 0 32px;
  place-items: center;
  height: 32px;
  padding: 0;
}

.toast__close .icon {
  width: 20px;
  height: 20px;
}

.toast__action {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin-top: 8px;
  padding: 4px 12px;
  border: 1px solid currentColor;
  border-radius: 7px;
  font-size: var(--text-control);
  text-decoration: none;
}

.toast__close:focus-visible,
.toast__action:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .toast {
    animation: none;
  }
}

