:root {
  --bg: #0B0B0F;
  --surface: #15161B;
  --surface-hover: #1D1F26;
  --line: #262932;
  --line-strong: #363A45;
  --text: #F2F3F5;
  --text-muted: #9BA1AC;

  --accent: #D63C41;
  --accent-hover: #C9353B;
  --accent-text: #E5484D;
  --on-accent: #FFFFFF;

  --font: "Manrope", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --space-section: clamp(56px, 8vw, 112px);

  --shadow-poster: 0 28px 56px -28px rgb(0 0 0 / .85);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

[data-bs-theme="dark"] {
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--text);
  --bs-body-font-family: var(--font);
  --bs-body-font-size: 1rem;
  --bs-body-line-height: 1.5;
  --bs-emphasis-color: var(--text);
  --bs-secondary-color: var(--text-muted);
  --bs-secondary-bg: var(--surface);
  --bs-tertiary-color: var(--text-muted);
  --bs-tertiary-bg: var(--surface-hover);
  --bs-heading-color: var(--text);
  --bs-border-color: var(--line);
  --bs-border-color-translucent: var(--line);
  --bs-border-radius: var(--radius-sm);
  --bs-link-color: var(--text);
  --bs-link-hover-color: var(--text);
  --bs-link-color-rgb: 242, 243, 245;
  --bs-link-hover-color-rgb: 242, 243, 245;
  --bs-form-invalid-color: var(--accent-text);
  --bs-form-invalid-border-color: var(--accent-text);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.1;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color .2s;
}

a:hover {
  color: var(--text);
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

/* Типографіка */

.display {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1;
}

.title {
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  letter-spacing: -.03em;
  line-height: 1.05;
}

.eyebrow {
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.lead {
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  font-weight: 400;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 60ch;
}

.muted {
  color: var(--text-muted);
}

/* Розкладка */

.wrap {
  width: min(var(--wrap), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.section {
  margin-top: var(--space-section);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: 24px;
}

.section-head h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  margin: 0;
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: .9375rem;
}

.section-head a {
  color: var(--text-muted);
  font-size: .9375rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.section-head a:hover {
  color: var(--text);
}

.page-head {
  padding-top: clamp(24px, 4vw, 48px);
  margin-bottom: 32px;
}

.page-head h1 {
  margin: 0 0 12px;
}

.page-head .lead {
  margin: 0;
}

.page-head-center {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
}

.page-head-center .lead {
  margin-inline: auto;
}

.back {
  display: inline-block;
  color: var(--text-muted);
  font-size: .9375rem;
  margin: 24px 0;
}

.back:hover {
  color: var(--text);
}

.empty {
  padding: 64px 0;
  text-align: center;
  color: var(--text-muted);
}

/* Навігація */

.brand {
  font-size: 1.625rem;
  font-weight: 800;
  letter-spacing: -.05em;
  line-height: 1;
  color: var(--text);
  white-space: nowrap;
}

.brand span {
  color: var(--accent-text);
}

.brand-small {
  font-size: 1.125rem;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-list a,
.nav-list button {
  display: inline-block;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--text-muted);
  font: inherit;
  font-size: .9375rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: color .2s, background-color .2s;
}

.nav-list a:hover,
.nav-list button:hover {
  color: var(--text);
  background: var(--surface);
}

.nav-list a[aria-current="page"] {
  color: var(--text);
}

.nav-user {
  padding: 8px 12px;
  color: var(--text-muted);
  font-size: .9375rem;
}

@media (max-width: 767.98px) {
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-list a,
  .nav-list button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px;
    font-size: 1.0625rem;
    border-radius: var(--radius-sm);
  }

  .nav-user {
    padding: 12px;
    border-top: 1px solid var(--line);
    margin-top: 8px;
  }
}

.btn {
  --bs-btn-padding-x: 1.125rem;
  --bs-btn-padding-y: .625rem;
  --bs-btn-font-family: var(--font);
  --bs-btn-font-size: .9375rem;
  --bs-btn-font-weight: 600;
  --bs-btn-line-height: 1.2;
  --bs-btn-border-radius: 999px;
  --bs-btn-border-width: 1px;
  --bs-btn-focus-box-shadow: none;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}

.btn:active {
  transform: scale(.98);
}

.btn:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  box-shadow: none;
}

.btn-primary {
  --bs-btn-color: var(--on-accent);
  --bs-btn-bg: var(--accent);
  --bs-btn-border-color: var(--accent);
  --bs-btn-hover-color: var(--on-accent);
  --bs-btn-hover-bg: var(--accent-hover);
  --bs-btn-hover-border-color: var(--accent-hover);
  --bs-btn-active-color: var(--on-accent);
  --bs-btn-active-bg: var(--accent-hover);
  --bs-btn-active-border-color: var(--accent-hover);
  --bs-btn-disabled-color: var(--on-accent);
  --bs-btn-disabled-bg: var(--accent);
  --bs-btn-disabled-border-color: var(--accent);
}

.btn-secondary {
  --bs-btn-color: var(--text);
  --bs-btn-bg: var(--surface);
  --bs-btn-border-color: var(--line);
  --bs-btn-hover-color: var(--text);
  --bs-btn-hover-bg: var(--surface-hover);
  --bs-btn-hover-border-color: var(--line-strong);
  --bs-btn-active-color: var(--text);
  --bs-btn-active-bg: var(--surface-hover);
  --bs-btn-active-border-color: var(--line-strong);
  --bs-btn-disabled-color: var(--text-muted);
  --bs-btn-disabled-bg: var(--surface);
  --bs-btn-disabled-border-color: var(--line);
}

.btn-danger {
  --bs-btn-color: var(--text-muted);
  --bs-btn-bg: transparent;
  --bs-btn-border-color: var(--line);
  --bs-btn-hover-color: var(--accent-text);
  --bs-btn-hover-bg: transparent;
  --bs-btn-hover-border-color: var(--accent-text);
  --bs-btn-active-color: var(--accent-text);
  --bs-btn-active-bg: transparent;
  --bs-btn-active-border-color: var(--accent-text);
  --bs-btn-disabled-color: var(--line-strong);
  --bs-btn-disabled-bg: transparent;
  --bs-btn-disabled-border-color: var(--line);
}

.btn-sm {
  --bs-btn-padding-x: .875rem;
  --bs-btn-padding-y: .4375rem;
  --bs-btn-font-size: .875rem;
}

.btn-lg {
  --bs-btn-padding-x: 1.5rem;
  --bs-btn-padding-y: .875rem;
  --bs-btn-font-size: 1.0625rem;
}

/* Форми */

.form-control,
.form-select {
  background-color: var(--surface);
  border-color: var(--line);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: .625rem .875rem;
  font-size: .9375rem;
  min-height: 44px;
  transition: border-color .2s, box-shadow .2s;
}

.form-control::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

.form-control:focus,
.form-select:focus {
  background-color: var(--surface);
  color: var(--text);
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgb(242 243 245 / .12);
  outline: 0;
}

.form-select {
  padding-right: 2.5rem;
}

textarea.form-control {
  min-height: 140px;
  resize: vertical;
}

input[type="file"].form-control {
  padding: .5rem .875rem;
}

.form-label {
  display: block;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: .375rem;
}

.form-text {
  color: var(--text-muted);
  font-size: .8125rem;
}

.form-check-input {
  width: 1.125em;
  height: 1.125em;
  margin-top: .1875em;
  background-color: var(--surface);
  border-color: var(--line-strong);
}

.form-check-input:checked {
  background-color: var(--accent);
  border-color: var(--accent);
}

.form-check-input:focus {
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgb(242 243 245 / .12);
}

.form-check-label {
  font-size: .9375rem;
}

.field {
  margin-bottom: 18px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (min-width: 640px) {
  .field-row {
    grid-template-columns: repeat(4, 1fr);
  }
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 18px;
  min-width: 0;
}

legend {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding: 0;
}

.checks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px;
}

@media (min-width: 640px) {
  .checks {
    grid-template-columns: repeat(3, 1fr);
  }
}

.input-validation-error {
  border-color: var(--accent-text) !important;
}

.field-validation-error {
  display: block;
  margin-top: .375rem;
  font-size: .8125rem;
  color: var(--accent-text);
}

.validation-summary-valid {
  display: none;
}

.validation-summary-errors {
  margin-bottom: 20px;
  padding: .75rem 1rem;
  border: 1px solid rgb(229 72 77 / .4);
  border-radius: var(--radius-sm);
  background: rgb(229 72 77 / .08);
  font-size: .9375rem;
}

.validation-summary-errors ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.notice {
  margin-bottom: 24px;
  padding: .75rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: .9375rem;
}

.notice-warn {
  border-color: rgb(229 72 77 / .4);
}

.poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--surface);
  container-type: inline-size;
}

.poster img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-blank {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 8cqw;
  color: hsl(var(--hue) 30% 92%);
  background:
    radial-gradient(120% 70% at 15% 0%, hsl(var(--hue) 55% 42% / .35), transparent 60%),
    linear-gradient(165deg, hsl(var(--hue) 38% 24%) 0%, hsl(var(--hue) 42% 12%) 65%, hsl(calc(var(--hue) + 30) 40% 8%) 100%);
  box-shadow: inset 0 0 0 1px hsl(var(--hue) 40% 70% / .12);
}

.poster-blank .year {
  position: absolute;
  top: 8cqw;
  left: 8cqw;
  font-size: clamp(10px, 4.5cqw, 13px);
  font-weight: 600;
  letter-spacing: .1em;
  opacity: .7;
}

.poster-blank .name {
  font-size: clamp(16px, 11cqw, 44px);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.02;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.poster-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line-strong);
  color: var(--text-muted);
  font-size: .875rem;
}

.poster-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(12px, 2vw, 24px);
}

@media (min-width: 640px) {
  .poster-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .poster-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.movie {
  display: block;
  color: inherit;
  border-radius: var(--radius-sm);
}

.movie-poster {
  position: relative;
  transition: transform .4s var(--ease);
}

.movie:hover .movie-poster,
.movie:focus-visible .movie-poster {
  transform: translateY(-4px);
}

.movie .poster {
  box-shadow: 0 0 0 1px var(--line);
  transition: box-shadow .4s var(--ease);
}

.movie:hover .poster,
.movie:focus-visible .poster {
  box-shadow: 0 0 0 1px var(--line-strong), var(--shadow-poster);
}

.movie:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
}

.movie-body {
  padding: 12px 4px 0;
}

.movie-title {
  margin: 0 0 3px;
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

.movie-meta {
  margin: 0;
  font-size: .8125rem;
  color: var(--text-muted);
}

.movie-meta b {
  color: var(--text);
  font-weight: 600;
}

/* Головна */

.hero {
  display: grid;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
  padding-top: clamp(32px, 6vw, 72px);
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.15fr .85fr;
  }
}

.hero > *,
.film > * {
  min-width: 0;
}

.hero .eyebrow {
  margin-bottom: 20px;
}

.hero h1 {
  margin: 0 0 16px;
}

.hero-meta {
  margin: 0 0 20px;
  color: var(--text-muted);
}

.hero .lead {
  margin: 0 0 32px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-poster {
  width: min(100%, 380px);
  margin-inline: auto;
}

.hero-poster .poster {
  border-radius: var(--radius);
  box-shadow: var(--shadow-poster);
}

@media (max-width: 899.98px) {
  .hero-poster {
    width: min(100%, 260px);
  }
}

.stats {
  list-style: none;
  margin: 0;
  padding: 24px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 0;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: .875rem;
}

.stats li:not(:last-child)::after {
  content: "·";
  margin: 0 12px;
}

/* Каталог */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.filters .f-search { flex: 1 1 240px; }
.filters .f-genre { flex: 0 1 180px; }
.filters .f-year { flex: 0 1 110px; }
.filters .f-rating { flex: 0 1 130px; }
.filters .f-sort { flex: 0 1 190px; }

.filters .btn {
  min-height: 44px;
}

@media (max-width: 639.98px) {
  .filters .f-genre,
  .filters .f-year,
  .filters .f-rating,
  .filters .f-sort {
    flex: 1 1 calc(50% - 5px);
  }

  .filters .f-search,
  .filters .f-submit {
    flex-basis: 100%;
  }

  .filters .f-submit .btn {
    width: 100%;
  }
}

.results-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 20px;
  font-size: .9375rem;
  color: var(--text-muted);
}

.results-line a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pages {
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.pages a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: .9375rem;
  font-weight: 600;
  transition: background-color .2s, color .2s;
}

.pages a:hover {
  background: var(--surface);
  color: var(--text);
}

.pages a[aria-current="page"] {
  background: var(--text);
  color: var(--bg);
}

/* Сторінка фільму */

.film {
  display: grid;
  gap: clamp(28px, 4vw, 56px);
}

@media (min-width: 820px) {
  .film {
    grid-template-columns: minmax(240px, 340px) 1fr;
    align-items: start;
  }

  .film-poster {
    position: sticky;
    top: 84px;
  }
}

@media (max-width: 819.98px) {
  .film-poster {
    width: min(100%, 260px);
  }
}

.film-poster .poster {
  border-radius: var(--radius);
  box-shadow: var(--shadow-poster);
}

.film-body h1 {
  margin: 0 0 6px;
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  letter-spacing: -.03em;
}

.film-original {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 1.0625rem;
}

.film-meta {
  margin: 0 0 28px;
  color: var(--text-muted);
}

.rating {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 28px;
}

.rating b {
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1;
}

.rating span {
  color: var(--text-muted);
}

.film-desc {
  max-width: 62ch;
  margin: 0 0 32px;
  font-size: 1.0625rem;
  line-height: 1.65;
}

.specs {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0 24px;
  max-width: 560px;
  margin: 0;
  font-size: .9375rem;
}

.specs dt,
.specs dd {
  margin: 0;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.specs dt {
  color: var(--text-muted);
  font-weight: 500;
}

.specs dt:first-of-type,
.specs dd:first-of-type {
  border-top: 0;
}

.specs a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tag {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--text);
}

/* Відгуки */

.reviews-form {
  margin-bottom: 32px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.reviews-form .form-control {
  background-color: var(--bg);
}

.reviews-hint {
  margin-bottom: 32px;
}

.score-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.score-picker label {
  cursor: pointer;
}

.score-picker span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: .9375rem;
  font-weight: 600;
  transition: background-color .2s, color .2s, border-color .2s;
}

.score-picker label:hover span {
  border-color: var(--text);
  color: var(--text);
}

.score-picker input:checked + span {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.score-picker input:focus-visible + span {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.row-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.row-inline .form-control {
  flex: 1 1 260px;
}

.review-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.review {
  padding: 20px 0;
}

.review-list > li + li {
  border-top: 1px solid var(--line);
}

.review-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.review-head b {
  font-weight: 600;
}

.review-score {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-hover);
  font-size: .8125rem;
  font-weight: 600;
}

.review-date {
  color: var(--text-muted);
  font-size: .8125rem;
}

.review-head form {
  margin-left: auto;
}

.review p {
  max-width: 70ch;
  margin: 10px 0 0;
  line-height: 1.6;
}

/* Тарифи */

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 32px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color .3s;
}

.plan:hover {
  border-color: var(--line-strong);
}

.plan-best,
.plan-best:hover {
  border-color: rgb(229 72 77 / .6);
}

.plan .tag {
  position: absolute;
  top: 20px;
  right: 20px;
}

.plan h2 {
  margin: 0 0 20px;
  font-size: 1.125rem;
  font-weight: 600;
}

.plan-price {
  margin-bottom: 6px;
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1;
}

.plan-price small {
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text-muted);
}

.plan-perday {
  margin-bottom: 20px;
  color: var(--text-muted);
  font-size: .875rem;
}

.plan p {
  margin: 0 0 20px;
  color: var(--text-muted);
}

.plan .plan-levels {
  flex: 1;
}

.plan-current {
  border-color: var(--line-strong);
}

.plans-note {
  margin: 20px 0 0;
  text-align: center;
  color: var(--text-muted);
  font-size: .8125rem;
}

.plan-days {
  margin-bottom: 20px;
  color: var(--text-muted);
  font-size: .875rem;
}

.plan-detail {
  max-width: 560px;
}

.plan-detail h1 {
  margin: 8px 0 12px;
}

.plan-detail .plan-price {
  margin: 28px 0;
}

/* Вхід і реєстрація */

.auth {
  max-width: 400px;
  margin: clamp(32px, 8vw, 96px) auto 0;
}

.auth h1 {
  margin: 0 0 28px;
  font-size: 2rem;
  letter-spacing: -.03em;
}

.auth .btn {
  width: 100%;
  margin-top: 8px;
}

.auth-alt {
  margin: 20px 0 0;
  color: var(--text-muted);
  font-size: .9375rem;
}

.auth-alt a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.status {
  padding: clamp(48px, 12vw, 140px) 0;
  text-align: center;
}

.status .code {
  margin-bottom: -.04em;
  font-size: clamp(5rem, 16vw, 11rem);
  font-weight: 800;
  letter-spacing: -.06em;
  line-height: 1;
  color: var(--surface-hover);
  user-select: none;
}

.status h1 {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  letter-spacing: -.03em;
}

.status p {
  max-width: 46ch;
  margin: 0 auto 32px;
  color: var(--text-muted);
}

.status .actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* Адміністрування */

.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: clamp(24px, 4vw, 48px);
  margin-bottom: 28px;
}

.admin-head h1 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
}

.back + .admin-head {
  padding-top: 0;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}

@media (min-width: 720px) {
  .stat-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
}

.stat {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.stat b {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.1;
}

.stat span {
  color: var(--text-muted);
  font-size: .875rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.list-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9375rem;
}

.list-table-wide {
  min-width: 720px;
}

.list-table th {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.list-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.list-table tr:last-child td {
  border-bottom: 0;
}

.list-table tbody tr:hover {
  background: var(--surface-hover);
}

.list-table td b {
  font-weight: 600;
}

.list-table .actions {
  text-align: right;
  white-space: nowrap;
}

.list-table .actions form {
  display: inline;
}

.list-table .actions .btn + form {
  margin-left: 6px;
}

.row-hidden td {
  color: var(--text-muted);
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--text);
  vertical-align: middle;
}

.row-hidden .status-dot {
  background: var(--line-strong);
}

.admin-form {
  display: grid;
  gap: 32px;
}

@media (min-width: 900px) {
  .admin-form {
    grid-template-columns: 1fr 300px;
  }
}

.admin-form-main {
  min-width: 0;
}

.poster-field .poster {
  margin-bottom: 14px;
  box-shadow: 0 0 0 1px var(--line);
}

.poster-field .form-text {
  margin-top: 6px;
}

.inline-form {
  display: flex;
  gap: 10px;
  max-width: 480px;
  margin-bottom: 24px;
}

.inline-form .form-control {
  flex: 1;
}

.footer-brand p {
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: .875rem;
}

.footer-ntu {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: .8125rem;
  line-height: 1.35;
}

.footer-ntu:hover {
  color: var(--text);
}

.ntu-mark {
  flex: none;
  width: 40px;
  height: 54px;
}

.ntu-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ntu-text b {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--text);
}

.ntu-text em {
  margin-left: 6px;
  font-style: normal;
  font-weight: 700;
  color: #1AB1EE;
}

.js .footer-ntu[data-reveal] rect {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}

.js .footer-ntu[data-reveal].in rect {
  opacity: 1;
  transform: none;
}

.footer-ntu rect:nth-child(2) { transition-delay: .05s; }
.footer-ntu rect:nth-child(3) { transition-delay: .1s; }
.footer-ntu rect:nth-child(4) { transition-delay: .15s; }
.footer-ntu rect:nth-child(5) { transition-delay: .2s; }
.footer-ntu rect:nth-child(6) { transition-delay: .25s; }
.footer-ntu rect:nth-child(7) { transition-delay: .3s; }
.footer-ntu rect:nth-child(8) { transition-delay: .35s; }
.footer-ntu rect:nth-child(9) { transition-delay: .4s; }

/* Рівні доступу */

.tier {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgb(11 11 15 / .72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--text);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1.2;
  white-space: nowrap;
}

.tier::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tier-color);
}

.tier-0::before { display: none; }
.tier-1 { --tier-color: #9BA1AC; }
.tier-2 { --tier-color: var(--accent-text); }
.tier-3 { --tier-color: #F5B942; }

.tier-locked {
  color: var(--text-muted);
}

.tier-lock {
  width: 10px;
  height: 10px;
  fill: currentColor;
}

.movie-poster .tier {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
}

.movie-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  overflow: hidden;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: rgb(255 255 255 / .25);
}

.movie-progress span {
  display: block;
  height: 100%;
  background: var(--accent-text);
}

.video-field {
  margin-top: 24px;
}

.hero-meta .tier {
  margin-left: 8px;
  vertical-align: middle;
}

.access {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin: 0 0 28px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.access .tier {
  background: var(--bg);
}

.access p {
  flex: 1 1 220px;
  margin: 0;
  font-size: .9375rem;
  color: var(--text-muted);
}

.access-locked p {
  color: var(--text);
}

.access-note {
  font-size: .875rem;
  color: var(--text-muted);
}

.plan-levels {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: .9375rem;
}

.plan-levels li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.plan-levels li::before {
  content: "✓";
  width: 18px;
  font-weight: 700;
  color: var(--text);
}

.plan-levels li.off {
  color: var(--text-muted);
}

.plan-levels li.off::before {
  content: "–";
  color: var(--line-strong);
}

/* Оформлення підписки */

.checkout {
  display: grid;
  gap: clamp(28px, 5vw, 64px);
  padding-top: 8px;
}

@media (min-width: 900px) {
  .checkout {
    grid-template-columns: 1fr 460px;
    align-items: start;
  }

  .checkout-form {
    position: sticky;
    top: 84px;
  }
}

.checkout-summary .lead {
  margin-bottom: 24px;
}

.checkout-form {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.checkout-form .form-control {
  background-color: var(--bg);
}

.checkout-form .btn {
  width: 100%;
  margin-top: 8px;
}

.checkout-form .form-text {
  margin-top: 14px;
  text-align: center;
}

.period-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.period-picker label {
  cursor: pointer;
}

.period-picker span {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  text-align: center;
  color: var(--text-muted);
  font-size: .8125rem;
  transition: border-color .2s, background-color .2s;
}

.period-picker b {
  color: var(--text);
  font-size: .9375rem;
}

.period-picker em {
  font-style: normal;
}

.period-picker small {
  color: var(--accent-text);
  font-weight: 600;
}

.period-picker label:hover span {
  border-color: var(--text);
}

.period-picker input:checked + span {
  border-color: var(--text);
  background: var(--bg);
}

.period-picker input:focus-visible + span {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.field-row-2 {
  grid-template-columns: repeat(2, 1fr);
}

.field-narrow {
  max-width: 320px;
}

.processing {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgb(11 11 15 / .78);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.processing-card {
  width: min(100%, 340px);
  padding: 36px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
}

.processing-card p {
  margin: 0;
  font-weight: 500;
}

.spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto 20px;
  border: 3px solid var(--line-strong);
  border-top-color: var(--accent-text);
  border-radius: 50%;
  animation: spin .9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Квитанція і сторінка підписки */

.done {
  max-width: 560px;
  margin: clamp(24px, 6vw, 72px) auto 0;
}

.done-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 24px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
}

.done-mark svg {
  width: 28px;
  height: 28px;
}

.done .title {
  margin: 8px 0 12px;
}

.done .specs {
  margin: 28px 0;
}

.done-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.sub-card {
  display: grid;
  gap: 24px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

@media (min-width: 720px) {
  .sub-card {
    grid-template-columns: 1fr auto;
    align-items: start;
  }
}

.sub-main h2 {
  margin: 12px 0 6px;
  font-size: 1.75rem;
  letter-spacing: -.02em;
}

.sub-main p {
  margin: 0;
}

.sub-main .plan-levels {
  margin: 18px 0 0;
}

.sub-empty h2 {
  margin-top: 0;
}

.sub-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 200px;
}

.section-tight {
  margin-top: 48px;
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}

.js [data-reveal].in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js [data-reveal],
  .js .footer-ntu[data-reveal] rect {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .movie .poster,
  .movie-poster,
  .btn {
    transition: none;
  }

  .spinner {
    animation: none;
    border-top-color: var(--text);
  }
}

/* Підготовка відео */

.queue-panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.queue-panel h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.queue-panel p {
  max-width: 72ch;
  margin: 0 0 20px;
}

.queue-panel code {
  font-size: .85em;
  color: var(--text);
}

.queue-form {
  display: grid;
  gap: 14px;
}

@media (min-width: 900px) {
  .queue-form {
    grid-template-columns: 1fr 1fr auto;
    align-items: end;
  }
}

.job-status {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

[data-status="Running"] .job-status,
[data-status="Done"] .job-status {
  color: var(--text);
}

[data-status="Running"] .job-status {
  border-color: var(--accent);
}

[data-status="Failed"] .job-status {
  border-color: var(--accent);
  color: var(--accent-text);
}

.job-progress {
  min-width: 150px;
}

.job-bar {
  height: 4px;
  margin-bottom: 6px;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
}

.job-bar span {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width .6s var(--ease);
}

[data-status="Done"] .job-bar span {
  background: var(--text-muted);
}

[data-status="Cancelled"] .job-bar span,
[data-status="Failed"] .job-bar span {
  background: var(--line-strong);
}

.job-error {
  max-width: 44ch;
  margin-top: 4px;
  font-size: .8rem;
  color: var(--accent-text);
  white-space: normal;
}

.list-table .small {
  font-size: .8rem;
}

.list-table td:has(.status-dot) {
  white-space: nowrap;
}

.cleanup-trash-head {
  margin-top: 40px;
}

.section-head form {
  margin: 0;
}
