:root {
  color-scheme: light;
  --paper: #f1f1ed;
  --paper-deep: #e7e8e3;
  --surface: #fafaf7;
  --ink: #1a1b1a;
  --ink-soft: #40423f;
  --muted: #73756f;
  --line: #d7d8d1;
  --accent: #c23b30;
  --dark-surface: #222321;
  --sans: "Outfit", "Aptos", "Segoe UI Variable", "Segoe UI", sans-serif;
  --page-width: 1220px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

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

.page-shell {
  width: min(calc(100% - 88px), var(--page-width));
  margin-inline: auto;
}

.site-header {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 25px;
  font-weight: 750;
  letter-spacing: -0.075em;
  text-decoration: none;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
}

.brand-icon span {
  width: 0;
  height: 0;
  margin-left: 2px;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid var(--accent);
}

.brand-accent {
  color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-caption,
.eyebrow,
.overview-label,
.source-badge,
.marquee-group,
.stat-card > span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  line-height: 1.5;
}

.header-caption {
  color: var(--muted);
}

.icon-button {
  display: grid;
  place-items: center;
  min-width: 54px;
  height: 34px;
  padding-inline: 9px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease;
}

.icon-button:hover {
  color: var(--surface);
  background: var(--ink);
  border-color: var(--ink);
}

.settings-mark {
  display: block;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  align-items: center;
  gap: clamp(40px, 7vw, 94px);
  min-height: 580px;
  padding-block: 46px 55px;
}

.hero-copy {
  align-self: center;
  padding-block: 20px;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
}

.eyebrow-line {
  display: inline-block;
  width: 25px;
  height: 1px;
  margin: 0 10px 3px 0;
  background: currentColor;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-weight: 520;
}

h1 {
  max-width: 18ch;
  margin: 23px 0 21px;
  font-size: clamp(54px, 5.4vw, 72px);
  line-height: 0.99;
  letter-spacing: -0.078em;
}

.hero-word {
  display: inline;
}

.inline-art {
  display: inline-block;
  width: 0.92em;
  height: 0.58em;
  margin-inline: 0.08em 0.02em;
  overflow: hidden;
  vertical-align: 0.03em;
  background: var(--paper-deep);
}

.inline-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 76% 72%;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 37ch;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.7;
}

.hero-link,
.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 43px;
  padding: 0 0 2px;
  border: 0;
  border-bottom: 1px solid var(--accent);
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  text-align: left;
  transition:
    color 160ms ease,
    border-color 160ms ease;
}

.hero-link {
  margin-top: 22px;
}

.hero-link span,
.text-link span {
  margin-left: 17px;
  color: var(--accent);
  transition: transform 160ms ease;
}

.hero-link:hover,
.text-link:hover {
  color: var(--accent);
}

.hero-link:hover span,
.text-link:hover span {
  transform: translate(3px, -2px);
}

.hero-art {
  display: grid;
  place-items: center;
  min-width: 0;
}

.hero-art-frame {
  width: min(100%, 430px);
  margin: 0;
}

.hero-art-image {
  display: block;
  width: 100%;
  aspect-ratio: 0.81;
  object-fit: cover;
  object-position: center;
  background: var(--paper-deep);
}

.hero-art-frame figcaption {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 11px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.015em;
}

.hero-art-frame figcaption::before {
  content: "";
  width: 25px;
  height: 1px;
  align-self: center;
  background: var(--accent);
}

.film-marquee {
  margin-inline: calc((min(100vw - 88px, var(--page-width)) - 100vw) / 2);
  overflow: hidden;
  border-block: 1px solid var(--line);
}

.marquee-track {
  display: flex;
  width: max-content;
}

.marquee-group {
  display: flex;
  align-items: center;
  gap: 31px;
  min-height: 48px;
  padding-right: 31px;
  color: var(--ink-soft);
  white-space: nowrap;
}

.marquee-group i {
  display: block;
  width: 4px;
  height: 4px;
  flex: 0 0 auto;
  background: var(--accent);
  transform: rotate(45deg);
}

.overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(100px, 1fr)) minmax(200px, 1.2fr);
  min-height: 132px;
  border-bottom: 1px solid var(--line);
}

.overview > div,
.overview-note {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0;
  padding: 22px 20px;
  border-right: 1px solid var(--line);
}

.overview > div:first-child {
  padding-left: 0;
}

.overview-note {
  align-items: flex-end;
  border: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: right;
}

.overview-number {
  font-size: 32px;
  font-weight: 520;
  line-height: 1;
  letter-spacing: -0.07em;
}

.overview-label {
  margin-top: 9px;
  color: var(--muted);
}

.section-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: clamp(22px, 4vw, 54px);
  min-height: 66px;
  margin-inline: calc((min(100vw - 88px, var(--page-width)) - 100vw) / 2);
  padding-inline: max(44px, calc((100vw - var(--page-width)) / 2));
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 93%, transparent);
  backdrop-filter: blur(12px);
}

.nav-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition:
    color 160ms ease,
    border-color 160ms ease;
}

.nav-button span {
  color: #999b94;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.nav-button:hover,
.nav-button.is-active {
  color: var(--ink);
}

.nav-button.is-active {
  border-bottom-color: var(--accent);
}

.nav-button.is-active span {
  color: var(--accent);
}

.app-section {
  min-height: 490px;
  padding-block: 74px 98px;
  scroll-margin-top: 80px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 32px;
}

.section-heading h2 {
  max-width: 22ch;
  margin: 11px 0 0;
  font-size: clamp(35px, 4.4vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.065em;
}

.source-badge {
  max-width: 32ch;
  margin: 0 0 6px;
  color: var(--muted);
  text-align: right;
}

.section-aside {
  max-width: 36ch;
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  text-align: right;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 13px;
  max-width: 650px;
  min-height: 58px;
  padding: 6px 7px 6px 18px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.search-symbol {
  color: var(--accent);
  font-size: 22px;
  line-height: 1;
}

.search-form input {
  flex: 1;
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
}

.search-form input::placeholder {
  color: #888a84;
}

.search-form:focus-within {
  border-color: var(--ink);
}

.search-form button,
.primary-button {
  min-height: 43px;
  padding: 0 17px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: white;
  font-size: 13px;
  font-weight: 650;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease;
}

.search-form button:hover,
.primary-button:hover {
  border-color: var(--accent);
  background: var(--accent);
  filter: brightness(0.92);
}

.search-form button span,
.primary-button span {
  margin-left: 12px;
}

.catalog-toolbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin: 41px 0 15px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.catalog-toolbar p {
  margin: 0;
}

.catalog-toolbar p:first-child {
  font-size: 15px;
  font-weight: 600;
}

#catalog-count {
  color: var(--muted);
  font-size: 12px;
}

.feedback-message {
  margin: 18px 0;
  padding: 13px 15px;
  border-left: 2px solid var(--accent);
  background: var(--paper-deep);
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

.film-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px 18px;
}

.skeleton-card {
  min-width: 0;
  color: transparent;
}

.skeleton-poster,
.skeleton-line {
  background: linear-gradient(100deg, #e3e4de 24%, #f8f8f4 45%, #e3e4de 66%);
  background-size: 220% 100%;
  animation: skeleton-sweep 1.55s ease-in-out infinite;
}

.skeleton-poster {
  aspect-ratio: 0.68;
}

.skeleton-line {
  height: 11px;
  margin-top: 13px;
}

.skeleton-title {
  width: 75%;
}

.skeleton-meta {
  width: 45%;
  height: 8px;
  margin-top: 8px;
}

@keyframes skeleton-sweep {
  to {
    background-position: -220% 0;
  }
}

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

.film-cover-button {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  text-align: left;
}

.film-poster {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  aspect-ratio: 0.68;
  padding: 15px;
  overflow: hidden;
  background: var(--poster-bg, linear-gradient(150deg, #c9bcb3, #5b3434 80%));
  color: #fff;
  isolation: isolate;
}

.film-poster::before,
.film-poster::after {
  position: absolute;
  z-index: -1;
  content: "";
  pointer-events: none;
}

.film-poster::before {
  inset: 8% 10% 16%;
  border: 1px solid #ffffff80;
  transform: rotate(4deg);
  transition: transform 500ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.film-poster::after {
  right: -15%;
  bottom: -14%;
  width: 80%;
  aspect-ratio: 1;
  border: 1px solid #ffffff65;
  border-radius: 50%;
  box-shadow: 0 0 0 22px #ffffff15;
}

.film-cover-button:hover .film-poster::before {
  transform: rotate(0deg) scale(0.96);
}

.film-poster.has-image {
  padding: 0;
  background: #dedfd9;
}

.film-poster.has-image::before,
.film-poster.has-image::after {
  display: none;
}

.film-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 650ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.film-cover-button:hover .film-poster img {
  transform: scale(1.035);
}

.poster-top,
.poster-title,
.poster-mark {
  position: relative;
  z-index: 1;
}

.poster-top {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.poster-mark {
  display: grid;
  place-items: center;
  align-self: center;
  width: 54px;
  height: 54px;
  margin: auto 0;
  border: 1px solid #ffffffb0;
  font-family: var(--sans);
  font-size: 18px;
  letter-spacing: 0.03em;
}

.poster-title {
  max-width: 12ch;
  font-size: clamp(20px, 2.3vw, 31px);
  font-weight: 520;
  line-height: 0.99;
  letter-spacing: -0.055em;
  overflow-wrap: anywhere;
}

.card-info {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 9px;
  padding-top: 12px;
}

.card-title {
  margin: 0 0 5px;
  font-size: 15px;
  font-weight: 620;
  line-height: 1.3;
  letter-spacing: -0.025em;
}

.card-meta {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.quick-add {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 31px;
  height: 31px;
  margin-top: 1px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-size: 19px;
  line-height: 1;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease;
}

.quick-add:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}

.quick-add.is-saved {
  border-color: var(--accent);
  color: var(--accent);
}

.rating-line {
  margin-top: 8px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.library-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 36px 0 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.filter-button {
  min-height: 35px;
  padding: 0 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease;
}

.filter-button:hover {
  color: var(--ink);
}

.filter-button.is-active {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.sort-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.sort-label select {
  max-width: 180px;
  padding: 8px 28px 8px 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.stat-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-block: 1px solid var(--line);
}

.stat-card,
.insight-card {
  min-width: 0;
  padding: 24px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  min-height: 164px;
  border-right: 1px solid var(--line);
}

.stat-card:first-child {
  padding-left: 0;
}

.stat-card:last-child {
  border-right: 0;
}

.stat-card > span {
  color: var(--muted);
}

.stat-card strong {
  margin-top: 12px;
  font-size: 52px;
  font-weight: 520;
  line-height: 1;
  letter-spacing: -0.075em;
}

.stat-card small {
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
}

.insight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}

.insight-card {
  padding: 25px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.insight-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.insight-card h3 {
  margin: 14px 0 21px;
  font-size: 22px;
  font-weight: 540;
  letter-spacing: -0.045em;
}

.genre-chart {
  display: grid;
  gap: 15px;
}

.genre-row {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) minmax(60px, 1.4fr) 24px;
  align-items: center;
  gap: 13px;
  font-size: 12px;
}

.genre-row > span:first-child {
  color: var(--ink-soft);
}

.genre-row > span:last-child {
  color: var(--muted);
  text-align: right;
}

.genre-track {
  height: 3px;
  background: var(--paper-deep);
}

.genre-fill {
  height: 100%;
  background: var(--accent);
}

.genre-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.quote-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--dark-surface);
  color: white;
}

.quote-card .eyebrow {
  color: #ee8e83;
}

.quote-card h3 {
  margin-bottom: 12px;
  color: white;
  font-size: 25px;
}

.quote-card .text-link {
  margin-top: auto;
  border-bottom-color: #ee8e83;
  color: white;
}

.quote-card .text-link:hover {
  color: white;
}

.quote-card .text-link span {
  color: #ee8e83;
}

.memory-empty {
  max-width: 38ch;
  margin: 0 0 23px;
  color: #c8c9c5;
  font-size: 14px;
  line-height: 1.65;
}

.memory-carousel {
  width: 100%;
  margin-bottom: 24px;
}

.memory-carousel blockquote {
  margin: 0;
}

.memory-carousel blockquote > p {
  min-height: 4.8em;
  margin: 0 0 18px;
  color: white;
  font-family: var(--sans);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.42;
}

.memory-carousel blockquote footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  color: #c8c9c5;
  font-size: 11px;
}

.memory-carousel cite {
  color: white;
  font-style: normal;
  font-weight: 600;
}

.memory-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 17px;
}

.memory-position {
  margin-right: auto;
  color: #c8c9c5;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.memory-controls button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid #5b5c57;
  border-radius: 50%;
  background: transparent;
  color: white;
}

.memory-controls button:hover:not(:disabled) {
  border-color: #ef7064;
  color: #ef7064;
}

.memory-controls button:disabled {
  opacity: 0.4;
  cursor: default;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 124px;
  padding-block: 25px;
  border-top: 1px solid var(--line);
}

.site-footer > span {
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.07em;
}

.site-footer > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.tmdb-credit {
  display: flex;
  align-items: center;
  gap: 11px;
}

.tmdb-credit a {
  flex: 0 0 auto;
}

.tmdb-credit img {
  display: block;
  width: 76px;
  height: auto;
}

.tmdb-credit p {
  max-width: 225px;
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.modal {
  position: fixed;
  width: min(920px, calc(100% - 32px));
  max-width: 920px;
  max-height: min(92dvh, 900px);
  padding: 31px;
  overflow: auto;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 80px #15161435;
}

.modal::backdrop {
  background: #151614a6;
  backdrop-filter: blur(4px);
}

.modal-close {
  position: absolute;
  top: 13px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  transition:
    color 160ms ease,
    background-color 160ms ease;
}

.modal-close:hover {
  background: var(--ink);
  color: white;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(190px, 0.58fr) minmax(0, 1fr);
  gap: 30px;
}

.detail-poster .film-poster {
  position: sticky;
  top: 0;
}

.detail-content {
  min-width: 0;
  padding: 4px 26px 0 0;
}

.detail-content h2,
.settings-modal h2 {
  max-width: 18ch;
  margin: 12px 0 8px;
  font-size: clamp(29px, 4vw, 42px);
  font-weight: 550;
  line-height: 1.05;
  letter-spacing: -0.06em;
  overflow-wrap: anywhere;
}

.detail-meta {
  margin: 0 0 17px;
  color: var(--muted);
  font-size: 12px;
}

.detail-overview {
  margin: 0 0 25px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.65;
}

.detail-content form,
.settings-modal form {
  display: grid;
  gap: 15px;
}

.detail-content label,
.settings-modal label {
  display: grid;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 620;
}

.detail-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.detail-content select,
.detail-content input[type="date"],
.detail-content textarea,
.settings-modal input {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
}

.detail-content textarea {
  min-height: 92px;
  resize: vertical;
}

.detail-content :disabled {
  background: var(--paper-deep);
  color: var(--muted);
  cursor: not-allowed;
}

.detail-content .primary-button {
  justify-self: start;
}

.settings-modal {
  width: min(560px, calc(100% - 32px));
  max-width: 560px;
  padding: 38px;
}

.settings-modal h2 {
  margin-bottom: 14px;
}

.settings-modal > p:not(.eyebrow) {
  max-width: 50ch;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.65;
}

.settings-modal .primary-button {
  justify-self: start;
}

.form-error {
  margin: -7px 0 0;
  color: var(--accent);
  font-size: 12px;
  line-height: 1.5;
}

.settings-help {
  margin: 21px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.settings-help a {
  text-underline-offset: 3px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  max-width: min(420px, calc(100% - 40px));
  padding: 14px 18px;
  background: var(--ink);
  color: white;
  box-shadow: 0 12px 40px #1516142b;
  font-size: 13px;
  line-height: 1.45;
}

button:active:not(:disabled) {
  transform: scale(0.985);
}

@media (max-width: 980px) {
  .page-shell {
    width: min(calc(100% - 56px), var(--page-width));
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.82fr);
    gap: 35px;
    min-height: 500px;
  }

  h1 {
    font-size: clamp(53px, 6.4vw, 74px);
  }

  .film-marquee,
  .section-nav {
    margin-inline: calc((min(100vw - 56px, var(--page-width)) - 100vw) / 2);
  }

  .section-nav {
    padding-inline: max(28px, calc((100vw - var(--page-width)) / 2));
  }

  .film-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px 16px;
  }

  .site-footer {
    grid-template-columns: 1fr auto;
  }

  .site-footer > p {
    display: none;
  }
}

@media (max-width: 720px) {
  html {
    scroll-padding-top: 74px;
  }

  .page-shell {
    width: min(calc(100% - 40px), var(--page-width));
  }

  .site-header {
    min-height: 72px;
  }

  .brand {
    gap: 9px;
    font-size: 22px;
  }

  .brand-icon {
    width: 27px;
    height: 27px;
  }

  .header-caption {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    min-height: auto;
    padding-block: 52px 39px;
  }

  .hero-copy {
    padding: 0;
  }

  h1 {
    max-width: 15ch;
    margin-block: 18px;
    font-size: clamp(44px, 9vw, 64px);
    line-height: 1.02;
  }

  .hero-copy > p:not(.eyebrow) {
    max-width: 44ch;
    font-size: 15px;
  }

  .hero-art {
    justify-items: end;
  }

  .hero-art-frame {
    width: min(87%, 370px);
  }

  .hero-art-image {
    aspect-ratio: 0.9;
    object-position: center 60%;
  }

  .film-marquee,
  .section-nav {
    margin-inline: -20px;
  }

  .marquee-group {
    min-height: 43px;
    gap: 23px;
    padding-right: 23px;
    font-size: 9px;
  }

  .overview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-height: auto;
  }

  .overview > div,
  .overview-note {
    padding: 19px 8px;
  }

  .overview > div:first-child {
    padding-left: 0;
  }

  .overview > div:nth-child(3) {
    border-right: 0;
  }

  .overview-number {
    font-size: 28px;
  }

  .overview-label {
    max-width: 12ch;
    font-size: 9px;
    letter-spacing: 0.08em;
  }

  .overview-note {
    display: none;
  }

  .section-nav {
    top: 0;
    justify-content: space-between;
    gap: 10px;
    min-height: 58px;
    padding-inline: 20px;
  }

  .nav-button {
    gap: 6px;
    font-size: 12px;
  }

  .nav-button span {
    font-size: 9px;
  }

  .app-section {
    min-height: 430px;
    padding-block: 57px 72px;
    scroll-margin-top: 68px;
  }

  .section-heading {
    display: block;
    margin-bottom: 23px;
  }

  .section-heading h2 {
    max-width: 18ch;
    margin-top: 9px;
    font-size: clamp(35px, 9vw, 49px);
  }

  .source-badge,
  .section-aside {
    margin-top: 12px;
    text-align: left;
  }

  .source-badge {
    max-width: none;
  }

  .search-form {
    min-height: 54px;
    gap: 8px;
    padding-left: 12px;
  }

  .search-form input {
    font-size: 13px;
  }

  .search-form button {
    min-height: 40px;
    padding-inline: 12px;
    font-size: 12px;
  }

  .search-form button span {
    margin-left: 5px;
  }

  .catalog-toolbar {
    margin-top: 34px;
  }

  .film-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 25px 13px;
  }

  .film-poster {
    padding: 11px;
  }

  .poster-title {
    font-size: clamp(20px, 6.3vw, 28px);
  }

  .card-info {
    gap: 5px;
    padding-top: 9px;
  }

  .card-title {
    font-size: 13px;
  }

  .card-meta {
    font-size: 10px;
  }

  .quick-add {
    width: 28px;
    height: 28px;
  }

  .library-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
    margin-top: 28px;
  }

  .filter-group {
    gap: 4px;
  }

  .filter-button {
    min-height: 33px;
    padding-inline: 9px;
  }

  .sort-label {
    width: 100%;
    justify-content: space-between;
  }

  .sort-label select {
    flex: 1;
    max-width: 220px;
  }

  .stat-card,
  .insight-card {
    padding: 17px;
  }

  .stat-card {
    min-height: 138px;
  }

  .stat-card:first-child {
    padding-left: 0;
  }

  .stat-card > span {
    max-width: 12ch;
    font-size: 9px;
    letter-spacing: 0.08em;
  }

  .stat-card strong {
    font-size: 40px;
  }

  .stat-card small {
    font-size: 10px;
  }

  .insight-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .insight-card {
    padding: 19px;
  }

  .quote-card h3 {
    font-size: 23px;
  }

  .site-footer {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 13px;
    padding-block: 25px;
  }

  .site-footer > p {
    display: block;
  }

  .tmdb-credit {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .tmdb-credit p {
    max-width: 32ch;
  }

  .modal {
    padding: 23px 18px;
  }

  .detail-layout {
    grid-template-columns: minmax(105px, 0.65fr) minmax(0, 1fr);
    gap: 17px;
  }

  .detail-poster .film-poster {
    position: static;
  }

  .detail-content {
    padding: 0 0 0 0;
  }

  .detail-content .eyebrow {
    padding-right: 29px;
    font-size: 8px;
    letter-spacing: 0.1em;
  }

  .detail-content h2 {
    font-size: clamp(25px, 7vw, 34px);
  }

  .detail-overview {
    grid-column: 1 / -1;
  }

  .detail-fields {
    grid-template-columns: 1fr;
  }

  .detail-content label {
    font-size: 11px;
  }

  .detail-content select,
  .detail-content input[type="date"],
  .detail-content textarea {
    font-size: 12px;
  }

  .settings-modal {
    padding: 31px 22px 25px;
  }
}

@media (max-width: 380px) {
  .page-shell {
    width: min(calc(100% - 32px), var(--page-width));
  }

  h1 {
    font-size: clamp(41px, 10.5vw, 46px);
  }

  .film-marquee,
  .section-nav {
    margin-inline: -16px;
  }

  .section-nav {
    padding-inline: 16px;
  }

  .nav-button {
    gap: 4px;
    font-size: 11px;
  }

  .nav-button span {
    display: none;
  }

  .overview-number {
    font-size: 25px;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: min(135px, 42vw);
  }
}

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