/* suckling web - "dim editorial" design system (2026-07 redesign).
   Replaces the M6 "vhs" system wholesale. Reference mockups live in
   design/mockup/. Rules of the system:
   - neutral dark gray canvas, cream ink, one amber accent
   - Fraunces serif for titles and member quotes, Inter for UI
   - full-width layout, no thin borders around containers, no gradients
     except the hero/film backdrop fade
   - sections separated by a faint full-width hairline above the kicker
   - posters are the interface: large, captionless, self-explanatory */

:root {
  --bg: #161719;
  --surface: #1e2023;
  --surface-2: #26292d;
  --surface-3: #2e3237;
  --ink: #eceef0;
  --muted: #9aa0a8;
  --faint: #6b7178;
  --hairline: rgba(236, 238, 240, 0.09);
  --accent: #e8b05f;
  --green: #9ec98f;
  --red: #e2938a;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: dark; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; }

.wrap { width: 100%; padding: 0 56px; }
main { padding-bottom: 90px; }

/* ---------- nav ---------- */
.nav {
  display: flex; align-items: center; gap: 32px;
  padding: 26px 0;
  position: relative; z-index: 5;
}
.wordmark {
  font-family: "Bytesized", var(--sans); font-size: 34px; font-weight: 400;
  color: #fff; letter-spacing: .02em; flex: none; line-height: 1;
}
.nav-links { display: flex; gap: 28px; font-size: 15px; color: var(--muted); align-items: center; }
.nav-links > a:hover { color: var(--ink); }
.nav-links > a.active { color: var(--ink); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 18px; }

/* dropdown menus (club menu, avatar menu) */
details.menu { position: relative; }
details.menu > summary {
  list-style: none; cursor: pointer; color: var(--muted);
  display: flex; align-items: center; gap: 6px;
}
details.menu > summary::-webkit-details-marker { display: none; }
details.menu > summary:hover { color: var(--ink); }
details.menu[open] > summary { color: var(--ink); }
.menu-list {
  position: absolute; top: calc(100% + 12px); left: -14px; z-index: 30;
  min-width: 170px;
  background: var(--surface-2); border-radius: 14px;
  padding: 10px 0;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
}
.menu-list a { display: block; padding: 9px 20px; font-size: 14.5px; color: var(--muted); }
.menu-list a:hover { color: var(--ink); background: var(--surface-3); }
details.menu--right .menu-list { left: auto; right: 0; }

/* search */
.search-box { position: relative; }
.search-box input {
  background: var(--surface); border: none; border-radius: 99px;
  padding: 10px 18px; color: var(--ink); font-size: 14.5px; font-family: var(--sans);
  width: 220px; outline: none;
}
.search-box input::placeholder { color: var(--faint); }
.search-box input:focus { background: var(--surface-2); }
.search-results {
  position: absolute; top: calc(100% + 12px); right: 0; z-index: 30;
  width: 320px; max-height: 420px; overflow-y: auto;
  background: var(--surface-2); border-radius: 14px;
  padding: 8px 0;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
}
.search-section h5 {
  font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--faint); font-weight: 500; padding: 10px 18px 4px;
}
.search-result {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 18px; font-size: 14.5px; color: var(--ink);
}
.search-result:hover { background: var(--surface-3); }
.search-result-thumb {
  width: 30px; height: 42px; object-fit: cover; border-radius: 4px;
  background: var(--surface-3); flex: none;
}
.search-result-thumb-fallback {
  display: flex; align-items: center; justify-content: center;
  color: var(--faint); font-family: var(--serif);
}
.search-result-avatar { height: 30px; border-radius: 50%; }
.search-empty { padding: 14px 18px; font-size: 14px; color: var(--faint); }

.avatar { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: var(--surface-2); flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--sm { width: 26px; height: 26px; }
.avatar-fallback {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; color: var(--muted); font-size: 15px;
}

/* ---------- type + sections ---------- */
.kicker {
  font-size: 13px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--faint); font-weight: 500;
}
section { margin-top: 84px; }
section > .kicker { display: block; }
section > .kicker::before {
  content: ""; display: block; width: 100%; height: 1px;
  background: var(--hairline);
  margin-bottom: 22px;
}
section.no-rule > .kicker::before { display: none; }
h1, h2, .serif { font-family: var(--serif); font-weight: 500; }
.page-title { font-size: 44px; margin-top: 26px; line-height: 1.1; }
.page-sub { color: var(--muted); font-size: 16px; margin-top: 10px; }
.meta { color: var(--faint); font-size: 14px; }
.meta a { color: var(--muted); }
.meta a:hover { color: var(--ink); }

/* ---------- posters ---------- */
.poster {
  border-radius: 10px; overflow: hidden; background: var(--surface-2);
  aspect-ratio: 2 / 3; position: relative;
  box-shadow: 0 8px 26px rgba(0, 0, 0, .4);
  transition: transform .18s ease, box-shadow .18s ease;
}
/* checked-out posters carry the return grammar's amber hairline */
.poster--out { border: 1px solid rgba(232, 176, 95, .3); }
/* frosted member bar across the bottom of a poster */
.poster-bar {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 9px;
  padding: 8px 12px;
  background: rgba(22, 23, 25, .55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  font-size: 13.5px; font-weight: 500; color: var(--ink);
}
.poster-bar .avatar { width: 26px; height: 26px; }
.poster-bar .bar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a:hover > .poster { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(0, 0, 0, .5); }
.poster img { width: 100%; height: 100%; object-fit: cover; }
.poster-fallback {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  font-family: var(--serif); font-size: 34px; color: var(--faint);
}

/* horizontal shelf of posters */
.shelf-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: 218px;
  gap: 32px; overflow-x: auto; padding: 28px 6px 16px;
  scrollbar-width: none;
}
.shelf-row::-webkit-scrollbar { display: none; }
.shelf-row figure { position: relative; min-width: 0; }

/* wrapped grid of posters (films page, watchlist) */
.poster-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 32px; margin-top: 28px;
}
.poster-grid figure { position: relative; min-width: 0; }

/* scroll arrows for overflowing shelf rows (injected by shelf.js) -
   low profile, sitting on the section header line, top-right */
.shelf-wrap { position: relative; }
.shelf-nav {
  position: absolute; top: -26px; right: 0;
  display: flex; gap: 4px; z-index: 3;
}
.shelf-arrow {
  width: 28px; height: 28px; border-radius: 50%; border: none;
  background: transparent; color: var(--faint);
  font-size: 20px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding-bottom: 3px;
}
.shelf-arrow:hover { color: var(--ink); background: var(--surface-2); }
.shelf-arrow[disabled] { opacity: .3; pointer-events: none; }
@media (hover: none), (max-width: 680px) {
  .shelf-nav { display: none; }
}


/* ---------- chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 500;
  padding: 5px 14px; border-radius: 99px;
  background: var(--surface-2); color: var(--muted);
  max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chip--due { background: rgba(232, 176, 95, .15); color: var(--accent); }
.chip--late { background: rgba(226, 147, 138, .15); color: var(--red); }
.chip--in { background: rgba(158, 201, 143, .14); color: var(--green); }
.chip--ghost { background: transparent; color: var(--faint); box-shadow: inset 0 0 0 1px var(--hairline); }
a.chip:hover { color: var(--ink); }

/* ---------- buttons + forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 15px; font-weight: 600; font-family: var(--sans);
  padding: 12px 26px; border-radius: 99px; border: none;
  color: var(--ink); cursor: pointer; background: var(--surface-2);
}
.btn:hover { background: var(--surface-3); }
.btn--primary { background: var(--accent); color: #241a0e; }
.btn--primary:hover { filter: brightness(1.06); background: var(--accent); }
.btn--sm { padding: 8px 18px; font-size: 14px; }
.link-btn {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--muted); font-size: inherit; font-family: inherit;
}
.link-btn:hover { color: var(--ink); }

.field { margin-top: 22px; max-width: 460px; }
.field label { display: block; margin-bottom: 8px; }
.field input[type="text"], .field input[type="date"], .field select, .field textarea {
  width: 100%; background: var(--surface); border: none; border-radius: 12px;
  padding: 12px 16px; color: var(--ink); font-size: 15px; font-family: var(--sans);
  outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus { background: var(--surface-2); }
.field input[type="file"] { color: var(--muted); font-size: 14.5px; }
.field textarea { resize: vertical; }
.check { display: flex; gap: 12px; align-items: flex-start; margin-top: 26px; cursor: pointer; }
.check input { margin-top: 5px; accent-color: var(--accent); }
.check .meta { display: block; margin-top: 4px; max-width: 52ch; }

.flash {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 22px; padding: 12px 20px; border-radius: 12px;
  background: rgba(158, 201, 143, .12); color: var(--green); font-size: 14.5px;
}
.flash--error { background: rgba(226, 147, 138, .12); color: var(--red); }

/* ---------- stars ---------- */
.stars { color: var(--accent); font-size: 14.5px; letter-spacing: 2.5px; white-space: nowrap; }
.stars .off { color: var(--faint); opacity: .45; }

/* ---------- feed cards ---------- */
.feed { list-style: none; margin-top: 18px; display: flex; flex-direction: column; gap: 18px; }
.feed li {
  display: flex; gap: 24px; align-items: flex-start;
  background: var(--surface); border-radius: 16px;
  padding: 26px 30px;
  border: 1px solid transparent;
}
/* event containers (design/feed-events.html) - the sanctioned exception
   to "no borders": these carry event-type meaning, not decoration.
   glowing = a tape came back, solid = logged here, hollow = imported. */
.feed li.card--return {
  box-shadow: inset 0 0 44px rgba(232, 176, 95, .07);
  border-color: rgba(232, 176, 95, .18);
}
.feed li.card--ghost { background: transparent; border-color: var(--hairline); }
/* collection events (macguffin pulls, badge unlocks) step back */
.feed li.compact { padding: 15px 30px; align-items: center; }
.token {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); font-size: 19px;
}
.token--rare { box-shadow: inset 0 0 14px rgba(143, 179, 217, .22); }
.token--iconic { box-shadow: inset 0 0 14px rgba(232, 176, 95, .28); }
.feed .subject--badge { font-family: var(--serif); font-style: italic; color: var(--accent); font-size: 16.5px; }
.feed .subject--mac { color: var(--ink); }
.feed .subject--mac.rare { color: #8fb3d9; }
.feed .subject--mac.iconic { color: var(--accent); }
.feed .thumb {
  width: 60px; flex: none; border-radius: 7px; overflow: hidden;
  aspect-ratio: 2 / 3; background: var(--surface-2);
}
.feed .thumb img { width: 100%; height: 100%; object-fit: cover; }
.feed .thumb .poster-fallback { font-size: 20px; }
.feed .who { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--muted); flex-wrap: wrap; }
.feed .who b { color: var(--ink); font-weight: 600; }
.feed .who a:hover { color: var(--accent); }
.feed .who .subject { color: var(--accent); font-weight: 600; }
.feed .title { font-family: var(--serif); font-size: 20px; margin-top: 6px; display: inline-block; }
.feed .title:hover { color: var(--accent); }
.feed .thought {
  font-family: var(--serif); font-style: italic; color: var(--muted);
  font-size: 16.5px; margin-top: 10px; max-width: 64ch;
}
.feed .entry-body { min-width: 0; }
.feed time, .feed .when { margin-left: auto; font-size: 13.5px; color: var(--faint); flex: none; padding-top: 4px; }
.feed .row-actions { display: inline-flex; gap: 12px; font-size: 13.5px; }
.feed .row-actions a, .feed .row-actions .link-btn { color: var(--faint); font-size: 13.5px; }
.feed .row-actions a:hover, .feed .row-actions .link-btn:hover { color: var(--ink); }

/* ---------- home: marquee hero ---------- */
.hero { position: relative; margin: 8px -56px 0; }
.hero-bg { position: absolute; inset: 0; overflow: hidden; }
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover; opacity: .42;
  transition: opacity .3s ease, transform 14s ease-out;
  transform: scale(1.06);
}
.hero.loaded .hero-bg img { transform: scale(1); }
.hero-bg img.swapping { opacity: 0; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  /* extra left-side scrim keeps the featured title/kicker readable on
     bright backdrops - the text always sits bottom-left */
  background:
    linear-gradient(to right, rgba(22, 23, 25, .6), rgba(22, 23, 25, 0) 60%),
    linear-gradient(to bottom, rgba(22, 23, 25, .15), var(--bg) 97%);
}
.hero-inner {
  position: relative; min-height: 400px;
  padding: 110px 56px 36px;
  display: flex; align-items: flex-end;
}
.hero-feature { max-width: 72%; text-shadow: 0 2px 20px rgba(0, 0, 0, .65); }
.hero-feature .kicker { color: var(--muted); }
.hero-feature h1 { font-size: 56px; line-height: 1.05; margin-top: 14px; }
.hero-feature h1 a:hover { color: var(--accent); }
.hero-feature .year { color: var(--muted); font-size: 27px; font-style: italic; }
.hero-meta { display: flex; gap: 14px; align-items: center; margin-top: 22px; }
.hero-meta .note { color: var(--muted); font-size: 14.5px; }
.hero-titles { display: flex; gap: 30px; margin-top: 34px; flex-wrap: wrap; }
.hero-titles a {
  font-size: 15px; color: var(--faint); position: relative;
  padding-top: 10px; transition: color .2s ease;
}
.hero-titles a::before {
  content: ""; position: absolute; top: 0; left: 0; width: 26px; height: 2px;
  border-radius: 2px; background: var(--faint); opacity: .35;
  transition: background .2s ease, opacity .2s ease;
}
.hero-titles a:hover { color: var(--muted); }
.hero-titles a.on { color: var(--ink); }
.hero-titles a.on::before { background: var(--accent); opacity: .9; }

/* ---------- film page ---------- */
.backdrop { position: relative; height: 340px; overflow: hidden; margin: 8px -56px 0; }
.backdrop img { width: 100%; height: 100%; object-fit: cover; opacity: .45; }
.backdrop::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(22, 23, 25, .15), var(--bg) 97%);
}
/* poster bottom-aligns with the CTA row (the body's last line) */
.film-head { display: flex; gap: 44px; margin-top: -150px; position: relative; align-items: flex-end; }
.film-head--flat { margin-top: 40px; }
.film-head .poster { width: 220px; flex: none; box-shadow: 0 18px 44px rgba(0, 0, 0, .6); }
.film-head-body { padding-top: 158px; min-width: 0; }
.film-head--flat .film-head-body { padding-top: 20px; }
.film-head h1 { font-size: 48px; line-height: 1.08; }
.film-head .year { color: var(--muted); font-size: 27px; font-style: italic; font-weight: 400; }
.byline { color: var(--muted); font-size: 16px; margin-top: 14px; }
.byline b { color: var(--ink); font-weight: 500; }
.factline { color: var(--faint); font-size: 15px; margin-top: 6px; }
.cta { display: flex; align-items: center; gap: 16px; margin-top: 30px; flex-wrap: wrap; }
.synopsis {
  font-family: var(--serif); font-size: 19px; line-height: 1.7; color: var(--ink);
  opacity: .92; max-width: 64ch; margin-top: 48px;
}
.scoreband { display: flex; gap: 24px; margin-top: 48px; }
.scoreband > div { flex: 1; text-align: center; background: var(--surface); border-radius: 16px; padding: 28px 20px; }
.score-num { font-family: var(--serif); font-size: 38px; margin-top: 6px; }
.score-num.green { color: var(--green); }
.score-num.amber { color: var(--accent); }
.score-num.dim { color: var(--muted); font-size: 24px; padding-top: 10px; }
.score-note { color: var(--faint); font-size: 13px; margin-top: 4px; }

/* ---------- profile ---------- */
.profile-head { display: flex; gap: 32px; align-items: center; position: relative; }
.profile-head .avatar { width: 96px; height: 96px; }
.profile-head h1 { font-size: 44px; line-height: 1.1; }
.earned-title {
  display: inline-block; font-family: var(--serif); font-style: italic;
  font-size: 20px; color: var(--accent); margin-top: 6px;
}
.profile-head .sub { color: var(--muted); font-size: 15px; margin-top: 10px; display: flex; gap: 18px; flex-wrap: wrap; }
.profile-head .sub a:hover { color: var(--ink); }

.stat-band { display: flex; gap: 24px; margin-top: 44px; }
.stat-band > div { flex: 1; text-align: center; background: var(--surface); border-radius: 16px; padding: 26px 20px; }
.stat-band .score-num { font-size: 34px; }
.stat-band .score-den { color: var(--faint); font-size: 20px; }

.tabs { display: flex; gap: 34px; margin-top: 70px; }
.tabs a {
  font-size: 15.5px; color: var(--faint); position: relative; padding-top: 12px;
  transition: color .2s ease;
  background: none; border: none; border-radius: 0; min-height: 0; font-weight: 400;
}
.tabs a::before {
  content: ""; position: absolute; top: 0; left: 0; width: 26px; height: 2px;
  border-radius: 2px; background: var(--faint); opacity: .35;
  transition: background .2s ease, opacity .2s ease;
}
.tabs a:hover { color: var(--muted); }
.tabs a.on, .tabs a[aria-current="page"] { color: var(--ink); }
.tabs a.on::before, .tabs a[aria-current="page"]::before { background: var(--accent); opacity: .9; }
.tabs + section { margin-top: 44px; }
.tabs + section > .kicker::before { display: none; }

/* ---------- collection cards (badges, macguffins) ---------- */
.badge-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px; margin-top: 26px;
}
.badge-card {
  background: var(--surface); border-radius: 16px; padding: 26px 24px;
  display: flex; flex-direction: column; gap: 10px;
}
.badge-card .emoji { font-size: 34px; line-height: 1; }
.badge-card .name { font-family: var(--serif); font-size: 19px; }
.badge-card .name.yours { color: var(--accent); }
.badge-card .desc { color: var(--muted); font-size: 14px; line-height: 1.5; }
.badge-card .foot { margin-top: auto; padding-top: 8px; color: var(--faint); font-size: 13px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.badge-card .foot a { color: var(--muted); }
.badge-card .foot a:hover { color: var(--ink); }
.badge-card.locked { opacity: .55; }
.badge-card.locked .name { color: var(--muted); }

/* macguffin rarities - subtle tiering: common stays quiet, rare gets a
   cool dusty blue, iconic gets the amber treatment + a faint inner glow */
.rarity { text-transform: lowercase; }
.rarity--rare { color: #8fb3d9; }
.rarity--iconic { color: var(--accent); }
.badge-card.card--rare { box-shadow: inset 0 0 34px rgba(143, 179, 217, .05); }
.badge-card.card--iconic { box-shadow: inset 0 0 34px rgba(232, 176, 95, .09); }

/* chip clusters (profile macguffin sets) */
.chip-cluster { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

/* ---------- simple stacked lists (log search, completion roll) ---------- */
.stack { list-style: none; margin-top: 20px; display: flex; flex-direction: column; gap: 14px; }
.stack li { display: flex; gap: 16px; align-items: center; }
.stack .thumb {
  width: 44px; flex: none; border-radius: 5px; overflow: hidden;
  aspect-ratio: 2 / 3; background: var(--surface-2);
}
.stack .thumb img { width: 100%; height: 100%; object-fit: cover; }
.stack .thumb .poster-fallback { font-size: 16px; }
.stack a:hover { color: var(--accent); }

/* ---------- pagination ---------- */
.pager { margin-top: 28px; display: flex; align-items: center; gap: 16px; color: var(--faint); font-size: 14px; }
.pager a { color: var(--muted); }
.pager a:hover { color: var(--ink); }
.pager .off { opacity: .4; }

/* ---------- signed-out landing: chromeless, full-screen backdrops ---------- */
.landing { position: fixed; inset: 0; overflow: hidden; }
.landing-bg { position: absolute; inset: 0; }
/* two stacked layers crossfade while the active one slowly zooms */
.landing-bg img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1.8s ease;
  will-change: opacity, transform;
}
.landing-bg img.on { opacity: .38; }
.landing-bg img.zooming { animation: landing-zoom 10s ease-out forwards; }
@keyframes landing-zoom {
  from { transform: scale(1); }
  to { transform: scale(1.09); }
}
@media (prefers-reduced-motion: reduce) {
  .landing-bg img { transition: none; }
  .landing-bg img.zooming { animation: none; }
}
.landing-bg::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(22, 23, 25, .25), rgba(22, 23, 25, .78));
}
.landing-center {
  position: relative; z-index: 2;
  height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 34px;
  text-align: center; padding: 20px;
}
.landing-wordmark {
  font-family: "Bytesized", var(--sans); font-weight: 400;
  font-size: 120px; line-height: 1; color: #fff;
  letter-spacing: .02em;
  text-shadow: 0 4px 34px rgba(0, 0, 0, .55);
}
@media (max-width: 680px) {
  .landing-wordmark { font-size: 76px; }
}

/* ---------- splash ---------- */
.splash { text-align: center; padding: 110px 20px 40px; }
.splash img { width: 150px; margin: 0 auto 30px; }
.splash h1 { font-size: 52px; }
.splash .meta { margin-top: 14px; font-size: 15px; }
.splash .btn { margin-top: 34px; }

/* ---------- modal ---------- */
dialog.portal-modal {
  background: var(--surface-2); color: var(--ink);
  border: none; border-radius: 18px;
  padding: 34px 38px; max-width: 400px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, .6);
  /* the global `* { margin: 0 }` reset kills the UA's dialog centering
     (margin: auto) - restore it or the dialog pins to the top-left */
  margin: auto;
}
dialog.portal-modal::backdrop { background: rgba(10, 10, 12, .6); }
.modal-title { font-family: var(--serif); font-size: 22px; line-height: 1.25; }
.modal-body { color: var(--muted); font-size: 15px; margin-top: 12px; }
.modal-body b { color: var(--ink); font-weight: 600; }
dialog.portal-modal .btn { margin-top: 24px; }

footer.site-footer { margin: 100px 0 40px; text-align: center; color: var(--faint); font-size: 13.5px; }

/* ---------- mobile ---------- */
@media (max-width: 680px) {
  .wrap { padding: 0 20px; }
  .nav { gap: 18px; }
  .nav-links { display: none; }
  .search-box input { width: 40px; padding: 10px 13px; }
  .search-box input:focus { width: 170px; }
  .search-results { width: 280px; }

  .hero { margin: 8px -20px 0; }
  .hero-inner { padding: 70px 20px 24px; min-height: 0; }
  .hero-feature { max-width: 100%; }
  .hero-feature h1 { font-size: 34px; }
  .hero-feature .year { font-size: 20px; }
  .hero-titles { gap: 18px; margin-top: 24px; }

  .shelf-row { grid-auto-columns: 156px; gap: 20px; }
  .poster-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 20px; }

  .feed li { padding: 20px; gap: 16px; }
  .feed time, .feed .when { display: none; }

  .backdrop { margin: 8px -20px 0; }
  /* stack the film header on phones: poster overlapping the backdrop,
     title/facts/buttons below at full width */
  .film-head { flex-direction: column; gap: 22px; margin-top: -140px; align-items: flex-start; }
  .film-head--flat { margin-top: 30px; }
  .film-head .poster { width: 132px; }
  .film-head h1 { font-size: 28px; }
  .film-head .year { font-size: 18px; }
  .film-head-body { padding-top: 0; }
  .film-head--flat .film-head-body { padding-top: 0; }
  .scoreband { flex-direction: column; gap: 14px; }

  .profile-head { gap: 20px; }
  .profile-head .avatar { width: 64px; height: 64px; }
  .profile-head h1 { font-size: 28px; }
  .stat-band { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 28px; }
  .tabs { gap: 20px; margin-top: 48px; flex-wrap: wrap; }

  .page-title { font-size: 30px; }
  section { margin-top: 60px; }
}
