:root {
  --bg: #050505;
  --bg-2: #0a0a0a;
  --surface: #111111;
  --surface-2: #181818;
  --line: rgba(255, 255, 255, .08);
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --brand: #7ee032;
  --brand-dark: #5cb824;
  --brand-light: #96ef48;
  --accent-soft: #c8f090;
  --secondary: #e44d1c;
  --link: #5eb3ff;
  --ink: #000;
  --radius: 8px;
  --header: 64px;
  --max: 1240px;
  --shadow: 0 16px 48px rgba(0, 0, 0, .5);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Outfit, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-soft); }
button, input { font: inherit; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0; }
p { margin: 0; }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 50;
  background: var(--brand);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(14px);
  background: rgba(5, 5, 5, .88);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  min-height: var(--header);
  padding: 8px 20px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
}

.header-end {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.brand {
  display: flex;
  align-items: center;
  color: var(--text);
  flex-shrink: 0;
}

.brand-logo {
  width: auto;
  height: 38px;
  max-width: 130px;
  object-fit: contain;
  object-position: left center;
}

.site-nav {
  display: flex;
  gap: 4px;
  justify-content: center;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--muted);
  font-weight: 600;
  font-size: .94rem;
  padding: 8px 14px;
  border-radius: 6px;
  position: relative;
  transition: color .15s ease, background .15s ease;
}

.site-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .04);
}

.site-nav a[aria-current="page"] {
  color: var(--brand);
  background: rgba(126, 224, 50, .1);
  box-shadow: inset 0 -2px 0 var(--brand);
}

.header-search {
  position: relative;
  display: flex;
}

.header-search input,
.hero-search input,
.search-panel input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 44px 10px 14px;
}

.header-search {
  min-width: 220px;
  max-width: 280px;
}

.header-search input:focus,
.hero-search input:focus,
.search-panel input:focus {
  outline: 2px solid var(--brand);
  border-color: transparent;
}

.hero-search button,
.search-panel button,
.btn {
  border: 0;
  cursor: pointer;
  background: var(--brand);
  color: var(--ink);
  font-weight: 700;
  transition: background .15s ease, transform .15s ease;
}

.hero-search button:hover,
.search-panel button:hover,
.btn:hover {
  background: var(--brand-light);
}

.header-search button {
  position: absolute;
  right: 4px;
  top: 4px;
  bottom: 4px;
  border-radius: 6px;
  padding: 0 12px;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: var(--ink);
}

.header-search button:hover {
  background: var(--brand-light);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: var(--surface);
  border-radius: 12px;
  padding: 10px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: #fff;
  margin: 5px 0;
}

.suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  z-index: 20;
}
.suggest a {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  color: var(--text);
}
.suggest a:hover,
.suggest a.is-active { background: rgba(126, 224, 50, .12); }
.suggest img { width: 36px; height: 54px; object-fit: cover; border-radius: 6px; }
.suggest small { color: var(--muted); display: block; }

main { min-height: 60vh; }

.hero {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
}

.hero-bg {
  position: absolute;
  inset: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05);
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5,5,5,.15), rgba(5,5,5,.94) 72%),
    linear-gradient(90deg, rgba(5,5,5,.75), transparent 55%);
}

.hero-inner,
.wrap {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding: 72px 0 48px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-soft);
  font-weight: 700;
  letter-spacing: .14em;
  font-size: .78rem;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 800;
  max-width: 16ch;
  margin: 10px 0 12px;
}

.lede {
  max-width: 46ch;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-search {
  position: relative;
  margin-top: 24px;
  max-width: 640px;
}
.hero-search input {
  padding: 16px 128px 16px 20px;
  font-size: 1.05rem;
  background: rgba(18, 10, 9, .85);
}
.hero-search button {
  position: absolute;
  right: 6px;
  top: 6px;
  bottom: 6px;
  border-radius: 999px;
  padding: 0 22px;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.quick-links a,
.chip,
.chips a,
.chips span,
.year-cloud a {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 600;
  font-size: .92rem;
}
.quick-links a:hover,
.year-cloud a:hover,
.chips a:hover { border-color: var(--brand); color: #fff; }

.section-space { padding: 28px 0 12px; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin: 8px 0 14px;
}
.section-head h2 { font-size: 1.4rem; }
.section-blurb {
  color: var(--muted);
  font-size: .94rem;
  max-width: 62ch;
  margin: -4px 0 14px;
  line-height: 1.55;
}
.section-blurb a {
  color: var(--link);
  font-weight: 600;
}
.section-blurb a:hover { color: var(--accent-soft); }
.more { color: var(--brand-light); font-weight: 700; }

.rail-wrap { padding: 10px 0 18px; }
.rail,
.cast-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 156px;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  scrollbar-width: thin;
}
.card { scroll-snap-align: start; }
.card-link { display: block; color: var(--text); }

.poster {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: 0 4px 20px rgba(0,0,0,.35);
  transform-origin: center bottom;
  transition: transform .22s ease, box-shadow .22s ease;
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.55));
  opacity: 0;
  transition: opacity .22s ease;
  pointer-events: none;
}

.card:hover .poster {
  transform: scale(1.03);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .45);
}

.card:hover .poster-shade { opacity: 1; }

.card:hover .poster img { filter: brightness(1.06); }

.poster img { transition: filter .22s ease; }
.poster img,
.poster-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.poster-fallback {
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-soft);
  background: linear-gradient(160deg, #1a2610, #0a0a0a);
}
.rating {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,.78);
  color: var(--brand);
  border: 1px solid rgba(126, 224, 50, .45);
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 800;
  padding: 3px 8px;
}
.card-body { padding: 8px 2px 0; }
.card-title { font-size: .98rem; font-weight: 700; }
.card-original, .card-meta, .original, .genre-line { color: var(--muted); font-size: .82rem; margin-top: 3px; }

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
  gap: 16px;
}

.intro-block {
  color: var(--muted);
  max-width: 70ch;
  margin-bottom: 18px;
}

.catalog-hero {
  position: relative;
  min-height: 300px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.catalog-hero-bg {
  position: absolute;
  inset: 0;
}

.catalog-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.catalog-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 5, 5, .35) 0%, rgba(5, 5, 5, .92) 100%),
    linear-gradient(90deg, rgba(5, 5, 5, .85), transparent 60%);
}

.catalog-hero-inner {
  position: relative;
  z-index: 1;
  padding: 40px 0 36px;
}

.catalog-hero h1 {
  max-width: none;
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  margin-top: 8px;
}

.hero-meta {
  color: var(--muted);
  margin-top: 10px;
  font-size: .92rem;
}

.page-hero {
  padding: 36px 0 8px;
}
.page-hero h1 { max-width: none; font-size: clamp(1.8rem, 4vw, 2.6rem); }

.genre-grid,
.year-cloud {
  display: grid;
  gap: 12px;
}
.genre-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 12px 0 28px;
  gap: 14px;
}
.genre-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  gap: 0;
  overflow: hidden;
  border-radius: 18px;
  min-height: 0;
  aspect-ratio: 4 / 5;
  padding: 0;
  color: #fff;
  background:
    linear-gradient(160deg, rgba(126, 224, 50, .12), rgba(5, 5, 5, .35) 55%),
    var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .22);
  isolation: isolate;
}
.genre-tile-media,
.genre-tile-overlay {
  position: absolute;
  inset: 0;
}
.genre-tile-media { z-index: 0; overflow: hidden; }
.genre-tile-media img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 18%;
  transform: scale(1.01);
  transition: transform .45s ease, filter .45s ease;
}
.genre-tile-overlay {
  z-index: 1;
  background: linear-gradient(180deg, rgba(10, 6, 6, .12) 18%, rgba(10, 6, 6, .55) 58%, rgba(7, 4, 4, .92) 100%);
  transition: background .3s ease;
}
.genre-tile-copy {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 8px;
  padding: 14px 40px 14px 14px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .45);
}
.genre-tile-icon {
  grid-row: 1 / span 2;
  align-self: center;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #fff;
  background: rgba(126, 224, 50, .85);
  border-radius: 9px;
}
.genre-tile-icon svg { display: block; }
.genre-tile strong {
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.15;
}
.genre-tile-copy > span:last-child {
  grid-column: 2;
  color: rgba(247, 239, 233, .86);
  font-weight: 500;
  font-size: .78rem;
}
.genre-tile-go {
  position: absolute;
  right: 12px;
  bottom: 16px;
  z-index: 2;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.9);
}
.genre-tile:hover {
  color: #fff;
  border-color: rgba(126, 224, 50, .45);
}
.genre-tile:hover .genre-tile-media img {
  transform: scale(1.08);
  filter: brightness(1.16);
}
.genre-tile:hover .genre-tile-overlay {
  background: linear-gradient(180deg, rgba(10, 6, 6, .04) 12%, rgba(10, 6, 6, .42) 52%, rgba(7, 4, 4, .88) 100%);
}

.year-cloud {
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  margin-bottom: 20px;
}
.year-cloud a { justify-content: center; }

.faq { margin: 28px 0 12px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { color: var(--muted); margin-top: 8px; }

.detail-hero {
  position: relative;
  padding: 24px 0 36px;
}
.detail-hero .backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.detail-hero .backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(2px);
}
.detail-hero .backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5,5,5,.5), var(--bg) 88%);
}
.detail-grid {
  position: relative;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  align-items: start;
}
.detail-poster {
  aspect-ratio: 2 / 3;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--surface);
}
.detail-poster img { width: 100%; height: 100%; object-fit: cover; }
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: .92rem;
}
.crumbs li:not(:last-child)::after { content: "/"; margin-left: 6px; color: rgba(255,255,255,.28); }
.original-title { color: var(--peach); margin: 6px 0 10px; }
.jp-title {
  color: var(--accent-soft);
  margin: 6px 0 4px;
  font-size: 1.05rem;
}
.info-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin: 12px 0 8px;
}
.info-list div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
}
.info-list dt {
  color: var(--muted);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.info-list dd { margin: 4px 0 0; font-weight: 600; }
.info-list a { color: var(--brand-light); }
.trailer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.trailer-name {
  margin: 8px 4px 0;
  color: var(--muted);
  font-size: .9rem;
}
.character-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 12px 0;
}
.character-list li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}
.character-list span {
  display: block;
  color: var(--muted);
  font-size: .88rem;
  margin-top: 4px;
}
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.facts span {
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: .88rem;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 12px 0; }
.overview { color: var(--muted); max-width: 68ch; }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 18px 0;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}
.stat b { display: block; font-size: 1.15rem; }
.stat span { color: var(--muted); font-size: .82rem; }

.btn, .btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 11px 16px;
  font-weight: 700;
}
.btn-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid var(--line);
}
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }

.trailer-card {
  margin: 8px 0 18px;
  max-width: 720px;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  background: #000;
}
.trailer-card button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #000;
  cursor: pointer;
  position: relative;
}
.trailer-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; opacity: .85; }
.play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
}
.play span {
  background: var(--brand);
  border-radius: 999px;
  padding: 12px 18px;
}

.seasons { display: grid; gap: 8px; margin: 12px 0 20px; }
.season {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}
.cast-row { grid-auto-columns: 128px; }
.cast-card img, .cast-card .poster-fallback {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: var(--surface-2);
}
.cast-name { font-weight: 700; margin-top: 6px; font-size: .9rem; }
.cast-role { color: var(--muted); font-size: .8rem; }

.results { display: grid; gap: 14px; }
.result a {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--text);
  transition: border-color .15s ease, background .15s ease;
}

.result a:hover {
  border-color: rgba(126, 224, 50, .35);
  background: var(--surface-2);
}
.result img, .result .poster-fallback {
  width: 92px;
  height: 138px;
  object-fit: cover;
  border-radius: 10px;
}
.result h2 { font-size: 1.15rem; }

.search-panel { position: relative; max-width: 720px; margin: 8px 0 22px; }
.search-panel input { padding: 14px 110px 14px 16px; }
.search-panel button {
  position: absolute;
  right: 6px; top: 6px; bottom: 6px;
  border-radius: 999px;
  padding: 0 18px;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 28px 0;
}
.pager a, .pager .disabled, .pager .page-status {
  padding: 8px 12px;
  border-radius: 999px;
}
.pager a { background: var(--surface); border: 1px solid var(--line); }
.pager .disabled { color: #6f615c; }

.legal, .prose { max-width: 76ch; color: var(--muted); }
.legal h2, .prose h2 { color: var(--text); margin: 22px 0 8px; font-size: 1.2rem; }
.legal p, .prose p, .legal li { margin: 0 0 10px; }
.form { display: grid; gap: 12px; max-width: 560px; }
.form input, .form textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
}
.form textarea { min-height: 140px; resize: vertical; }
.form .hp { position: absolute; left: -9999px; }
.notice { padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; }
.notice.ok { background: rgba(46, 160, 80, .16); }
.notice.err { background: rgba(220, 50, 50, .16); }

.empty {
  padding: 28px;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--muted);
}

.site-footer {
  margin-top: 48px;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 36px 0 20px;
}
.footer-inner {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 32px;
}

.footer-brand p {
  color: var(--muted);
  margin-top: 14px;
  max-width: 36ch;
  font-size: .94rem;
  line-height: 1.6;
}

.footer-col h2,
.site-footer h2 {
  font-size: .78rem;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text);
  font-weight: 700;
}

.footer-bottom, .tmdb-note { color: var(--muted); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0 0 7px; }
.footer-bottom {
  width: min(var(--max), calc(100% - 32px));
  margin: 26px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: .88rem;
}
.tmdb-note { margin-top: 8px; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.72);
  display: grid;
  place-items: center;
  z-index: 40;
  padding: 16px;
}
.modal[hidden] { display: none; }
.modal-card {
  width: min(900px, 100%);
  background: var(--surface);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.modal-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
}
.modal-close {
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
}
.modal-frame { aspect-ratio: 16 / 9; background: #000; }
.modal-frame iframe { width: 100%; height: 100%; border: 0; }

.error-page { text-align: center; padding: 48px 0 24px; }
.error-page h1 { margin-left: auto; margin-right: auto; }

.search-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: var(--surface);
  color: #fff;
  border-radius: 12px;
  padding: 0;
  place-items: center;
  cursor: pointer;
}

.featured-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 22px;
  align-items: start;
  background: linear-gradient(160deg, rgba(126, 224, 50, .08), rgba(5, 5, 5, .4) 42%), var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.featured-poster {
  position: relative;
  display: block;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: var(--surface-2);
}
.featured-poster img,
.featured-poster .poster-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.featured-card h3 {
  font-size: clamp(1.3rem, 3vw, 2rem);
  margin-bottom: 6px;
}
.summary-facts {
  margin-top: 14px;
  color: var(--accent-soft);
  max-width: 68ch;
  font-size: .95rem;
}
.error-mark {
  margin: 0 auto 12px;
  border-radius: 18px;
}
.genre-line a { color: var(--brand-light); }

.form label { display: grid; gap: 6px; font-weight: 700; color: var(--text); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

@media (min-width: 980px) {
  .rail, .cast-row {
    display: grid;
    grid-auto-flow: unset;
    grid-template-columns: repeat(8, 1fr);
    overflow: visible;
    grid-auto-columns: unset;
  }
  .home-rail .rail { grid-template-columns: repeat(6, 1fr); }
}

@media (max-width: 1100px) {
  .genre-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
  }
  .site-nav {
    display: none;
    position: absolute;
    top: var(--header);
    left: 0;
    right: 0;
    background: rgba(5,5,5,.96);
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-bottom: 1px solid var(--line);
  }
  .site-nav a { text-align: left; }
  .site-nav.is-open { display: flex; }
  .nav-toggle { display: block; }
  .header-search { min-width: 0; max-width: none; flex: 1; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-poster { max-width: 240px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .featured-card { grid-template-columns: 140px 1fr; }
  .genre-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
  }
  .header-end {
    grid-column: 2 / -1;
    justify-content: flex-end;
  }
  .search-toggle { display: grid; }
  .header-search {
    display: none;
  }
  .header-search.is-mobile-visible {
    display: flex;
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
  }
  .site-nav { grid-column: 1 / -1; }
  .hero-inner { padding-top: 42px; }
  .footer-inner { grid-template-columns: 1fr; }
  .result a { grid-template-columns: 72px 1fr; }
  .featured-card { grid-template-columns: 1fr; }
  .featured-poster { max-width: 180px; }
  .genre-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .genre-tile { aspect-ratio: 1 / 1.05; }
  .genre-tile strong { font-size: .95rem; }
}

body.nav-lock { overflow: hidden; }
