/* ============================================================================
   MovieFilterr — styles
   ========================================================================== */

/* self-hosted fonts: Life Cinema Screen (headlines), Nightingale (body) */
@font-face {
  font-family: "Life Cinema Screen";
  src: url("/fonts/LifeCinemaScreen-Regular.otf") format("opentype");
  font-weight: 400 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Nightingale";
  src: url("/fonts/DTNightingale-Light.ttf") format("truetype");
  font-weight: 300 700; font-style: normal; font-display: swap;
}

:root {
  /* surfaces */
  --bg:        #07070b;
  --bg-2:      #0b0b12;
  --panel:     #0f0f18;
  --panel-2:   #14141f;
  --line:      rgba(255,255,255,.08);
  --line-2:    rgba(255,255,255,.14);

  /* ink */
  --ink:       #f4f1ea;
  --ink-soft:  #b7b3c4;
  --ink-dim:   #75748a;

  /* brand duotone — teal / emerald */
  --teal:      #2dd4bf;
  --emerald:   #10b981;
  --brand-grad: linear-gradient(115deg, var(--teal), var(--emerald) 75%);

  /* category palette */
  --c-nudity:      #ff5d8f;
  --c-violence:    #ff5247;
  --c-profanity:   #ffb443;
  --c-substances:  #5dd39e;
  --c-frightening: #9d7bff;
  --c-other:       #6ec1ff;

  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 12px;

  --shadow: 0 30px 80px -30px rgba(0,0,0,.8);
  --ease:   cubic-bezier(.22,1,.36,1);
  --ease-2: cubic-bezier(.65,.05,.36,1);

  --maxw: 1180px;
}

/* ---------- light theme ---------- */
[data-theme="light"] {
  --bg:        #f3f1ec;
  --bg-2:      #e9e6df;
  --panel:     #ffffff;
  --panel-2:   #f7f5f0;
  --line:      rgba(22,18,30,.10);
  --line-2:    rgba(22,18,30,.17);
  --ink:       #1a1822;
  --ink-soft:  #54505f;
  --ink-dim:   #8b8794;
  --c-nudity:      #e23a72;
  --c-violence:    #e0392f;
  --c-profanity:   #c47f12;
  --c-substances:  #16996a;
  --c-frightening: #7a52e0;
  --c-other:       #2487cf;
  --shadow: 0 26px 64px -30px rgba(40,28,60,.28);
}
html { background: var(--bg); }
body { transition: background-color .5s var(--ease), color .5s var(--ease); }
[data-theme="light"] .grain { opacity: .025; }
[data-theme="light"] .vignette { background: radial-gradient(120% 90% at 50% 0%, transparent 62%, rgba(90,70,120,.10) 100%); }
[data-theme="light"] .aurora span { mix-blend-mode: multiply; opacity: .12; filter: blur(100px); }

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: "Nightingale", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  letter-spacing: .005em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }
input { font: inherit; }
kbd {
  font-family: "JetBrains Mono", monospace; font-size: .72em;
  border: 1px solid var(--line-2); border-bottom-width: 2px;
  padding: .05em .4em; border-radius: 6px; color: var(--ink-soft);
}
::selection { background: var(--emerald); color: #fff; }

.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }

/* ---------- ambient layers ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 1; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 6s steps(6) infinite;
}
@keyframes grain {
  0%,100% { transform: translate(0,0); }
  20% { transform: translate(-4%,3%); }
  40% { transform: translate(3%,-5%); }
  60% { transform: translate(-2%,4%); }
  80% { transform: translate(4%,-2%); }
}
.vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 0%, transparent 55%, rgba(0,0,0,.55) 100%);
}
.aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.aurora span {
  position: absolute; width: 60vw; height: 60vw; border-radius: 50%;
  filter: blur(90px); opacity: .22; mix-blend-mode: screen;
  animation: drift 26s var(--ease-2) infinite alternate;
}
.aurora span:nth-child(1){ background: var(--teal);    top: -22vw; left: -10vw; }
.aurora span:nth-child(2){ background: var(--emerald); top: -12vw; right: -16vw; animation-delay: -8s; }
.aurora span:nth-child(3){ background: var(--c-frightening); bottom: -30vw; left: 30vw; animation-delay: -14s; opacity:.16; }
@keyframes drift {
  to { transform: translate3d(6vw, 8vw, 0) scale(1.2); }
}

/* ---------- intro curtain ---------- */
.intro {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-content: center; justify-items: center; gap: 20px;
  background: var(--bg);
  transition: opacity .7s var(--ease), visibility .7s;
}
.intro.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.intro__mark {
  font-family: "Life Cinema Screen", sans-serif; font-weight: 700;
  font-size: clamp(2.4rem, 8vw, 5rem); letter-spacing: -.02em;
  display: flex; align-items: center; gap: 0;
  opacity: 0; animation: introIn .7s var(--ease) .15s forwards;
}
.intro__cue { color: var(--ink); }
.intro__point {
  background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.intro__dot {
  width: .26em; height: .26em; border-radius: 50%; margin-left: .16em;
  background: var(--brand-grad); box-shadow: 0 0 24px var(--emerald);
  animation: pulseDot 1.1s var(--ease) infinite;
}
.intro__scan {
  width: min(360px, 70vw); height: 2px; border-radius: 2px; overflow: hidden;
  background: var(--line);
  position: relative;
}
.intro__scan::after {
  content: ""; position: absolute; inset: 0; width: 40%;
  background: var(--brand-grad);
  animation: scan 1.1s var(--ease-2) infinite;
}
.intro__sub {
  font-family: "JetBrains Mono", monospace; font-size: .72rem; letter-spacing: .25em;
  text-transform: uppercase; color: var(--ink-dim);
  opacity: 0; animation: introIn .7s var(--ease) .4s forwards;
}
@keyframes scan { from { left: -40%; } to { left: 100%; } }
@keyframes introIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pulseDot { 0%,100% { transform: scale(1); } 50% { transform: scale(1.5); } }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .4s, background .4s;
}
.topbar.is-stuck { border-color: var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); }
.brand, .footer__brand, .intro__mark {
  font-family: "Life Cinema Screen", sans-serif; font-weight: 700; letter-spacing: -.02em;
}
.brand { font-size: 1.35rem; display: flex; align-items: center; gap: 0; position: relative; z-index: 2; }
.brand__point { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand__dot {
  width: .2em; height: .2em; border-radius: 50%; background: var(--brand-grad);
  box-shadow: 0 0 14px var(--emerald); margin-left: .16em;
}
.topbar__nav { display: flex; align-items: center; gap: 22px; }
.topbar__link { color: var(--ink-soft); font-weight: 500; font-size: .95rem; transition: color .25s; }
.topbar__link:hover { color: var(--ink); }
.topbar__cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 100px;
  border: 1px solid var(--line-2); color: var(--ink);
  font-weight: 600; font-size: .92rem;
  transition: transform .25s var(--ease), border-color .25s, background .25s;
}
.topbar__cta:hover { transform: translateY(-1px); border-color: var(--teal); background: rgba(255,194,75,.08); }
.topbar__cta kbd { background: rgba(255,255,255,.05); }
@media (max-width: 720px){ .topbar__link { display: none; } }

/* ---------- layout helpers ---------- */
main { position: relative; z-index: 2; }
section { padding-inline: clamp(16px, 4vw, 40px); }
.section-title {
  font-family: "Life Cinema Screen", sans-serif; font-weight: 600;
  font-size: clamp(1.5rem, 3.5vw, 2.4rem); letter-spacing: -.02em;
  max-width: var(--maxw); margin: 0 auto 6px;
}
.section-title span { display: inline-block; }

/* ---------- hero ---------- */
.hero { position: relative; z-index: 3; max-width: var(--maxw); margin: 0 auto; padding-top: clamp(36px, 7vw, 88px); padding-bottom: 30px; }
.hero__inner { position: relative; z-index: 2; max-width: 760px; }
.hero__eyebrow {
  font-family: "JetBrains Mono", monospace; font-size: .76rem; letter-spacing: .32em;
  text-transform: uppercase; color: var(--teal); margin-bottom: 20px;
  opacity: 0; animation: introIn .8s var(--ease) .2s forwards;
}
.hero__title {
  font-family: "Life Cinema Screen", sans-serif; font-weight: 600;
  font-size: clamp(2.6rem, 8vw, 5.4rem); line-height: .98; letter-spacing: -.03em;
  margin-bottom: 24px;
}
.hero__title em { font-style: normal; background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.reveal-line { display: block; overflow: hidden; }
.reveal-line > span { display: block; transform: translateY(110%); animation: lineUp .9s var(--ease) forwards; }
.reveal-line:nth-child(1) > span { animation-delay: .3s; }
.reveal-line:nth-child(2) > span { animation-delay: .42s; }
@keyframes lineUp { to { transform: none; } }

.hero__lede {
  font-size: clamp(1.02rem, 1.8vw, 1.22rem); color: var(--ink-soft); max-width: 620px;
  margin-bottom: 30px; opacity: 0; animation: introIn .8s var(--ease) .6s forwards;
}
.hero__lede strong { color: var(--ink); font-weight: 700; }

/* ---------- search ---------- */
.search { position: relative; z-index: 3; max-width: 640px; opacity: 0; animation: introIn .8s var(--ease) .72s forwards; }
.search__field {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 100px;
  padding: 7px 7px 7px 20px;
  transition: border-color .3s, box-shadow .3s, transform .3s var(--ease);
  box-shadow: 0 10px 40px -20px rgba(0,0,0,.9);
}
.search__field:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(255,194,75,.12), 0 20px 60px -25px rgba(255,93,143,.4);
  transform: translateY(-2px);
}
.search__icon { font-size: 1.4rem; color: var(--ink-dim); line-height: 1; }
.search__input {
  flex: 1; background: none; border: none; outline: none; color: var(--ink);
  font-size: 1.06rem; padding: 12px 0;
}
.search__input::placeholder { color: var(--ink-dim); }
.search__go {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--brand-grad); color: #1a0d12; font-weight: 700;
  padding: 13px 22px; border-radius: 100px; white-space: nowrap;
  transition: transform .25s var(--ease), filter .25s;
}
.search__go:hover { transform: translateX(2px); filter: brightness(1.08); }
.search__go svg { transition: transform .25s var(--ease); }
.search__go:hover svg { transform: translateX(3px); }

/* suggestions */
.suggest {
  list-style: none; position: absolute; top: calc(100% + 10px); left: 0; right: 0; z-index: 50;
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--r-md);
  padding: 6px; box-shadow: var(--shadow);
  max-height: min(62vh, 408px); overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  display: none;
}
.suggest.is-open { display: block; animation: introIn .25s var(--ease); }
.suggest__item {
  display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: var(--r-sm);
  cursor: pointer; transition: background .18s;
}
.suggest__item:hover, .suggest__item.is-active { background: rgba(255,255,255,.06); }
.suggest__poster { position: relative; overflow: hidden; width: 34px; height: 46px; border-radius: 6px; flex: none; }
.suggest__meta { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.suggest__title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest__sub { font-size: .8rem; color: var(--ink-dim); }
.suggest__flag { margin-left: auto; font-size: .72rem; font-family: "JetBrains Mono", monospace; }
.suggest__empty { padding: 14px; color: var(--ink-dim); font-size: .92rem; }

/* quick chips */
.hero__chips { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; opacity: 0; animation: introIn .8s var(--ease) .85s forwards; }
.chip {
  font-size: .85rem; color: var(--ink-soft); border: 1px solid var(--line);
  padding: 7px 14px; border-radius: 100px; transition: all .25s var(--ease);
}
.chip:hover { color: var(--ink); border-color: var(--emerald); background: rgba(255,93,143,.08); transform: translateY(-1px); }

/* hero ribbon */
.hero__ribbon {
  margin-top: 46px; height: 64px; border-radius: var(--r-md);
  border: 1px solid var(--line); overflow: hidden; position: relative; z-index: 1;
  background: linear-gradient(180deg, rgba(255,255,255,.02), transparent);
  mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ribbon__track { display: flex; gap: 4px; height: 100%; align-items: center; padding: 0 12px; width: max-content; animation: ribbon 30s linear infinite; }
.ribbon__tick { width: 3px; border-radius: 3px; opacity: .7; }
@keyframes ribbon { to { transform: translateX(-50%); } }

/* ---------- result ---------- */
.result { max-width: var(--maxw); margin: 18px auto 0; scroll-margin-top: 80px; }
.result[hidden] { display: none; }

.rcard {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow);
  animation: cardIn .7s var(--ease);
}
@keyframes cardIn { from { opacity: 0; transform: translateY(24px) scale(.99); } to { opacity: 1; transform: none; } }

/* header band */
.rhead { display: grid; grid-template-columns: 132px 1fr; gap: 22px; padding: 24px; position: relative; }
.rhead__poster {
  width: 132px; aspect-ratio: 2/3; border-radius: var(--r-md); position: relative; overflow: hidden;
  display: grid; place-items: center; box-shadow: 0 18px 50px -20px rgba(0,0,0,.9);
}
.rhead__poster .pinitial { font-family: "Life Cinema Screen", sans-serif; font-weight: 700; font-size: 2.6rem; color: rgba(255,255,255,.92); text-shadow: 0 2px 16px rgba(0,0,0,.4); }
.rhead__poster .pshine { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,255,255,.28), transparent 45%); }
.rhead__main { min-width: 0; }
.rhead__kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.tag {
  font-family: "JetBrains Mono", monospace; font-size: .72rem; letter-spacing: .04em;
  padding: 4px 9px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--ink-soft);
}
.tag--cert { color: var(--teal); border-color: rgba(255,194,75,.4); }
.tag--type { text-transform: uppercase; }
.rhead__title { font-family: "Life Cinema Screen", sans-serif; font-weight: 600; font-size: clamp(1.6rem, 4vw, 2.5rem); letter-spacing: -.02em; line-height: 1.04; }
.rhead__tagline { color: var(--ink-soft); font-style: italic; margin-top: 6px; }
.rhead__genres { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.genre { font-size: .82rem; color: var(--ink-soft); border: 1px solid var(--line); padding: 5px 12px; border-radius: 100px; }

/* nudity verdict banner */
.verdict { display: flex; align-items: center; gap: 14px; padding: 16px 24px; border-top: 1px solid var(--line); }
.verdict--flag { background: linear-gradient(90deg, rgba(255,93,143,.14), transparent); }
.verdict--clear { background: linear-gradient(90deg, rgba(93,211,158,.12), transparent); }
.verdict__dot { width: 12px; height: 12px; border-radius: 50%; flex: none; box-shadow: 0 0 16px currentColor; }
.verdict--flag .verdict__dot { background: var(--c-nudity); color: var(--c-nudity); }
.verdict--clear .verdict__dot { background: var(--c-substances); color: var(--c-substances); }
.verdict__text { font-size: .98rem; }
.verdict__text strong { font-weight: 700; }
.verdict__text b { color: var(--c-nudity); }

/* summary counts */
.summary { padding: 22px 24px; border-top: 1px solid var(--line); }
.summary__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.summary__head h3 { font-family: "Life Cinema Screen", sans-serif; font-weight: 600; font-size: 1.15rem; }
.summary__total { font-family: "JetBrains Mono", monospace; color: var(--ink-dim); font-size: .85rem; }
.cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.catcard {
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px;
  background: var(--panel); position: relative; overflow: hidden;
  transition: transform .3s var(--ease), border-color .3s;
}
.catcard:hover { transform: translateY(-3px); border-color: var(--cat); }
.catcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--cat); }
.catcard__top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.catcard__glyph { color: var(--cat); font-size: 1rem; }
.catcard__label { font-size: .82rem; color: var(--ink-soft); font-weight: 500; }
.catcard__count { font-family: "Life Cinema Screen", sans-serif; font-weight: 700; font-size: 1.9rem; line-height: 1; }
.catcard__sev { display: flex; gap: 4px; margin-top: 8px; }
.sevdot { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); }
.sevdot.on { background: var(--cat); }

/* ---------- TIMELINE (signature) ---------- */
.timeline { padding: 22px 24px 8px; border-top: 1px solid var(--line); }
.timeline__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.timeline__head h3 { font-family: "Life Cinema Screen", sans-serif; font-weight: 600; font-size: 1.15rem; }
.timeline__legend { display: flex; flex-wrap: wrap; gap: 12px; }
.legend { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; color: var(--ink-soft); }
.legend i { width: 9px; height: 9px; border-radius: 3px; background: var(--cat); }

.scrubwrap { position: relative; }
.timecode-readout {
  font-family: "JetBrains Mono", monospace; font-size: .82rem; color: var(--teal);
  margin-bottom: 8px; display: flex; align-items: center; gap: 8px;
}
.timecode-readout b { color: var(--ink); }

.lanes { position: relative; border-radius: var(--r-md); background: linear-gradient(180deg, rgba(255,255,255,.025), transparent); padding: 6px 0; }
.lane { position: relative; height: 38px; display: flex; align-items: center; }
.lane__name {
  position: absolute; left: 0; width: 92px; font-size: .72rem; color: var(--ink-dim);
  font-family: "JetBrains Mono", monospace; text-align: right; padding-right: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lane__track { position: absolute; left: 104px; right: 8px; height: 2px; background: var(--line); border-radius: 2px; }
.lane__track::before { content: ""; position: absolute; inset: 0; background: var(--cat); opacity: .18; border-radius: 2px; }

.marker {
  position: absolute; top: 50%; width: 14px; height: 14px; transform: translate(-50%,-50%) scale(0);
  border-radius: 50%; background: var(--cat); cursor: pointer; z-index: 3;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--cat) 22%, transparent);
  animation: pop .5s var(--ease) forwards; animation-delay: var(--d, 0s);
  transition: transform .2s var(--ease);
}
.marker[data-sev="3"] { width: 18px; height: 18px; }
.marker[data-sev="1"] { width: 11px; height: 11px; }
.marker:hover, .marker:focus-visible { transform: translate(-50%,-50%) scale(1.35); outline: none; z-index: 6; }
.marker.is-near { box-shadow: 0 0 0 6px color-mix(in srgb, var(--cat) 38%, transparent), 0 0 22px var(--cat); }
@keyframes pop { to { transform: translate(-50%,-50%) scale(1); } }

/* playhead over full lane stack */
.playhead { position: absolute; left: 104px; right: 8px; top: 6px; bottom: 6px; pointer-events: none; z-index: 4; }
.playhead__line { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: linear-gradient(180deg, var(--teal), transparent); box-shadow: 0 0 12px var(--teal); left: 0%; }
.playhead__grip {
  position: absolute; top: -6px; left: 0%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%;
  background: var(--teal); box-shadow: 0 0 14px var(--teal); pointer-events: auto; cursor: grab;
}
.playhead__grip:active { cursor: grabbing; }

.axis { display: flex; justify-content: space-between; margin: 10px 0 4px; padding-left: 104px; padding-right: 8px; }
.axis span { font-family: "JetBrains Mono", monospace; font-size: .68rem; color: var(--ink-dim); }

/* floating tooltip */
.tip {
  position: absolute; z-index: 20; pointer-events: none; opacity: 0; transform: translate(-50%, -8px);
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  padding: 10px 12px; max-width: 260px; box-shadow: var(--shadow); transition: opacity .18s, transform .18s;
}
.tip.is-on { opacity: 1; transform: translate(-50%, -14px); }
.tip__time { font-family: "JetBrains Mono", monospace; font-size: .74rem; color: var(--teal); }
.tip__cat { font-size: .74rem; font-weight: 700; color: var(--cat); margin-left: 6px; }
.tip__note { font-size: .86rem; color: var(--ink); margin-top: 4px; line-height: 1.35; }

/* ---------- cue list ---------- */
.cuelist { padding: 22px 24px; border-top: 1px solid var(--line); }
.cuelist__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.cuelist__head h3 { font-family: "Life Cinema Screen", sans-serif; font-weight: 600; font-size: 1.15rem; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filter {
  font-size: .76rem; padding: 6px 11px; border-radius: 100px; border: 1px solid var(--line);
  color: var(--ink-soft); transition: all .2s var(--ease); display: inline-flex; align-items: center; gap: 6px;
}
.filter i { width: 8px; height: 8px; border-radius: 50%; background: var(--cat, var(--ink-dim)); }
.filter:hover { border-color: var(--line-2); color: var(--ink); }
.filter.is-active { background: rgba(255,255,255,.08); color: var(--ink); border-color: var(--line-2); }

.cues { display: flex; flex-direction: column; }
.cue {
  display: grid; grid-template-columns: 86px 26px 1fr auto; gap: 14px; align-items: center;
  padding: 13px 0; border-top: 1px solid var(--line); position: relative;
}
.cue:first-child { border-top: none; }
.cue.is-hidden { display: none; }
.cue__time { font-family: "JetBrains Mono", monospace; font-size: .9rem; color: var(--teal); }
.cue__icon { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: #0a0a10; font-weight: 700; background: var(--cat); font-size: .8rem; }
.cue__body { min-width: 0; }
.cue__cat { font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; color: var(--cat); font-weight: 700; }
.cue__note { color: var(--ink-soft); font-size: .94rem; margin-top: 2px; }
.cue__sev { display: flex; gap: 4px; align-items: center; }
.cue__sevdot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.cue__sevdot.on { background: var(--cat); }
.cue:hover .cue__time { color: var(--ink); }
.cue::after { content: ""; position: absolute; inset: 0 -24px; background: rgba(255,255,255,.02); opacity: 0; transition: opacity .2s; pointer-events: none; }
.cue:hover::after { opacity: 1; }

/* ---------- recommendations ---------- */
.recs { padding: 6px 24px 28px; }
.recs__head { display: flex; align-items: center; gap: 12px; margin: 18px 0 4px; }
.recs__head h3 { font-family: "Life Cinema Screen", sans-serif; font-weight: 600; font-size: 1.25rem; }
.recs__badge { font-family: "JetBrains Mono", monospace; font-size: .7rem; padding: 4px 9px; border-radius: 100px; background: rgba(93,211,158,.14); color: var(--c-substances); border: 1px solid rgba(93,211,158,.3); }
.recs__sub { color: var(--ink-soft); margin-bottom: 18px; font-size: .96rem; }
.recgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.rec {
  border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--panel);
  text-align: left; transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
  display: flex; flex-direction: column;
}
.rec:hover { transform: translateY(-5px); border-color: var(--line-2); box-shadow: 0 20px 50px -25px rgba(0,0,0,.9); }
.rec__poster { aspect-ratio: 16/10; position: relative; display: grid; place-items: center; }
.rec__poster .pinitial { font-family: "Life Cinema Screen", sans-serif; font-weight: 700; font-size: 1.8rem; color: rgba(255,255,255,.92); }
.rec__poster .pshine { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,255,255,.25), transparent 50%); }
.rec__clean { position: absolute; top: 8px; right: 8px; font-family: "JetBrains Mono", monospace; font-size: .64rem; background: rgba(7,7,11,.7); border: 1px solid rgba(93,211,158,.4); color: var(--c-substances); padding: 3px 7px; border-radius: 100px; backdrop-filter: blur(4px); }
.rec__body { padding: 12px 13px 14px; flex: 1; display: flex; flex-direction: column; }
.rec__title { font-weight: 700; font-size: 1rem; line-height: 1.15; }
.rec__meta { font-size: .78rem; color: var(--ink-dim); margin-top: 3px; font-family: "JetBrains Mono", monospace; }
.rec__match { margin-top: auto; padding-top: 10px; font-size: .76rem; color: var(--ink-soft); display: flex; align-items: center; gap: 6px; }
.rec__match b { color: var(--c-substances); }

/* empty / not-found state */
.empty { text-align: center; padding: 40px 20px; }
.empty__glyph { font-size: 2.6rem; margin-bottom: 12px; opacity: .6; }
.empty h3 { font-family: "Life Cinema Screen", sans-serif; font-weight: 600; font-size: 1.5rem; margin-bottom: 8px; }
.empty p { color: var(--ink-soft); max-width: 460px; margin: 0 auto 18px; }
.empty__sugg { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

/* ---------- how it works ---------- */
.how { max-width: var(--maxw); margin: 84px auto 0; }
.how__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 26px; }
.how__card {
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; background: var(--panel);
  opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease), border-color .3s;
}
.how__card.in { opacity: 1; transform: none; }
.how__card:hover { border-color: var(--line-2); }
.how__card--accent { background: linear-gradient(180deg, rgba(93,211,158,.08), var(--panel)); border-color: rgba(93,211,158,.25); }
.how__num { font-family: "JetBrains Mono", monospace; color: var(--teal); font-size: .8rem; letter-spacing: .2em; }
.how__card h3 { font-family: "Life Cinema Screen", sans-serif; font-weight: 600; font-size: 1.35rem; margin: 14px 0 8px; }
.how__card p { color: var(--ink-soft); font-size: .96rem; }
.how__card--accent .how__num { color: var(--c-substances); }

/* ---------- library ---------- */
.library { max-width: var(--maxw); margin: 84px auto 0; }
.library__hint { color: var(--ink-dim); margin-top: 4px; margin-bottom: 24px; font-size: .96rem; }
.library__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.libcard {
  text-align: left; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--panel);
  opacity: 0; transform: translateY(20px) scale(.98);
  transition: opacity .6s var(--ease), transform .45s var(--ease), border-color .3s, box-shadow .35s;
  display: flex; flex-direction: column;
}
.libcard.in { opacity: 1; transform: none; }
.libcard:hover { transform: translateY(-5px); border-color: var(--line-2); box-shadow: 0 18px 44px -24px rgba(0,0,0,.9); }
.libcard__poster { aspect-ratio: 2/3; position: relative; display: grid; place-items: center; }
.libcard__poster .pinitial { font-family: "Life Cinema Screen", sans-serif; font-weight: 700; font-size: 2rem; color: rgba(255,255,255,.92); text-shadow: 0 2px 14px rgba(0,0,0,.35); }
.libcard__poster .pshine { position: absolute; inset: 0; background: linear-gradient(140deg, rgba(255,255,255,.22), transparent 48%); }
.libcard__flag { position: absolute; bottom: 8px; left: 8px; right: 8px; display: flex; gap: 4px; }
.dotsev { height: 4px; border-radius: 4px; flex: 1; background: var(--cat); opacity: .85; }
.libcard__body { padding: 11px 12px 13px; }
.libcard__title { font-weight: 700; font-size: .95rem; line-height: 1.15; }
.libcard__meta { font-size: .74rem; color: var(--ink-dim); margin-top: 3px; font-family: "JetBrains Mono", monospace; }
.libcard__nud { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; font-size: .72rem; }
.libcard__nud i { width: 7px; height: 7px; border-radius: 50%; }
.nud-yes i { background: var(--c-nudity); } .nud-yes { color: var(--c-nudity); }
.nud-no i { background: var(--c-substances); } .nud-no { color: var(--c-substances); }

/* ---------- footer ---------- */
.footer { max-width: var(--maxw); margin: 90px auto 0; padding: 40px clamp(16px,4vw,40px) 60px; border-top: 1px solid var(--line); }
.footer__brand { font-size: 1.4rem; display: inline-flex; align-items: center; gap: 0; margin-bottom: 14px; }
.footer__note { color: var(--ink-soft); max-width: 640px; font-size: .92rem; }
.footer__legal { color: var(--ink-dim); font-size: .82rem; margin-top: 14px; }

/* ---------- responsive ---------- */
@media (max-width: 640px){
  .rhead { grid-template-columns: 92px 1fr; gap: 16px; padding: 18px; }
  .rhead__poster { width: 92px; }
  .lane__name { width: 64px; font-size: .62rem; }
  .lane__track, .playhead, .axis { left: 76px; }
  .axis { padding-left: 76px; }
  .cue { grid-template-columns: 64px 22px 1fr; }
  .cue__sev { grid-column: 3; justify-content: flex-start; padding-top: 2px; }
  .cue__time { font-size: .8rem; }
}

/* ---------- live integration additions ---------- */
.pimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rhead__poster .pimg, .rec__poster .pimg { border-radius: inherit; }

/* theme toggle (replaces the old live/demo badge) */
.themetoggle {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2);
  display: inline-grid; place-items: center; color: var(--ink); flex: none;
  transition: transform .3s var(--ease), border-color .25s, background .25s;
}
.themetoggle:hover { transform: translateY(-1px) rotate(12deg); border-color: var(--teal); background: rgba(255,194,75,.10); }
.themetoggle:active { transform: scale(.9); }
.themetoggle:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.themetoggle__svg { overflow: visible; }
.themetoggle__core, .themetoggle__rays { transform-box: fill-box; transform-origin: center; }
.themetoggle__core { transition: transform .5s var(--ease); }
.themetoggle__bite { transition: transform .5s var(--ease); }
.themetoggle__rays { transition: transform .5s var(--ease), opacity .4s var(--ease); }
/* dark = moon (default): rays hidden, the mask "bite" carves a crescent */
.themetoggle__rays { transform: scale(.5) rotate(-30deg); opacity: 0; }
/* light = sun: bite slides away to a full disc, core shrinks, rays bloom */
[data-theme="light"] .themetoggle__bite { transform: translate(10px, -9px); }
[data-theme="light"] .themetoggle__core { transform: scale(.62); }
[data-theme="light"] .themetoggle__rays { transform: scale(1) rotate(0); opacity: 1; }

/* circular reveal of the new theme via the View Transitions API */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 0; }
::view-transition-new(root) { z-index: 1; }

.tag--live { color: var(--c-substances); border-color: rgba(93,211,158,.4); }

/* loading box */
.loadbox { display: grid; place-items: center; gap: 16px; padding: 70px 20px; }
.loadbox p { color: var(--ink-soft); font-family: "JetBrains Mono", monospace; font-size: .85rem; letter-spacing: .1em; }
.loadbox__spin { width: 42px; height: 42px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--teal); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* unknown verdict */
.verdict--unknown { background: linear-gradient(90deg, rgba(110,193,255,.1), transparent); }
.verdict--unknown .verdict__dot { background: var(--c-other); color: var(--c-other); }
.verdict__kw { display: inline-block; font-family: "JetBrains Mono", monospace; font-size: .72rem; color: var(--c-nudity); margin-left: 4px; opacity: .85; }
.verdict__basis { display: inline; color: var(--ink-soft); font-size: .92em; }
.verdict__src { color: var(--teal); border-bottom: 1px solid rgba(255,194,75,.4); white-space: nowrap; transition: color .2s; }
.verdict__src:hover { color: var(--emerald); border-color: var(--emerald); }

/* no-timestamps panel */
.notimes { padding: 30px 24px; border-top: 1px solid var(--line); text-align: center; }
.notimes__icon { font-size: 2rem; margin-bottom: 10px; opacity: .7; }
.notimes h3 { font-family: "Life Cinema Screen", sans-serif; font-weight: 600; font-size: 1.25rem; margin-bottom: 8px; }
.notimes p { color: var(--ink-soft); max-width: 540px; margin: 0 auto; font-size: .95rem; }

/* sources */
.sources { padding: 22px 24px; border-top: 1px solid var(--line); }
.sources h3 { font-family: "Life Cinema Screen", sans-serif; font-weight: 600; font-size: 1.15rem; }
.sources__sub { color: var(--ink-soft); font-size: .92rem; margin: 6px 0 16px; }
.sources__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.source {
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 13px 15px; background: var(--panel);
  display: flex; flex-direction: column; gap: 3px; transition: transform .25s var(--ease), border-color .25s, background .25s;
}
.source:hover { transform: translateY(-3px); border-color: var(--teal); background: rgba(255,194,75,.06); }
.source__name { font-weight: 700; font-size: .95rem; display: inline-flex; align-items: center; gap: 6px; }
.source__name svg { color: var(--ink-dim); transition: color .25s, transform .25s; }
.source:hover .source__name svg { color: var(--teal); transform: translate(1px,-1px); }
.source__note { font-size: .78rem; color: var(--ink-dim); }

/* ============ v3: fonts, share, advisories, mobile, whitespace ============ */

/* headline font tuning for Life Cinema Screen — bigger + more tracking */
.hero__title, .rhead__title, .section-title, .how__card h3,
.summary__head h3, .timeline__head h3, .cuelist__head h3,
.recs__head h3, .sources h3, .notimes h3, .empty h3 { letter-spacing: .045em; }
.hero__title { font-size: clamp(3.1rem, 9.5vw, 6.8rem); line-height: 1.04; letter-spacing: .04em; }
.section-title { font-size: clamp(1.7rem, 4vw, 2.8rem); }
.rhead__title { font-size: clamp(1.9rem, 4.4vw, 2.9rem); line-height: 1.1; }
.how__card h3 { font-size: 1.5rem; }
.brand, .footer__brand, .intro__mark { letter-spacing: .03em; }
.brand { font-size: 1.5rem; }

/* clickable TMDB tag */
a.tag--live { cursor: pointer; transition: border-color .2s, color .2s, background .2s, transform .2s; }
a.tag--live:hover { border-color: var(--teal); color: var(--teal); background: rgba(45,212,191,.12); transform: translateY(-1px); }

/* title row + share button */
.rhead__titlerow { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.rhead__titlerow .rhead__title { flex: 1; min-width: 0; }
.sharebtn {
  display: inline-flex; align-items: center; gap: 8px; flex: none; margin-top: 8px;
  padding: 10px 18px; border-radius: 100px; border: 1px solid var(--line-2);
  color: var(--ink); font-weight: 600; font-size: .92rem;
  transition: transform .25s var(--ease), border-color .25s, background .25s; cursor: pointer;
}
.sharebtn:hover { transform: translateY(-1px); border-color: var(--teal); background: rgba(45,212,191,.10); }
.sharebtn:active { transform: scale(.95); }
.sharebtn:disabled { opacity: .6; cursor: default; }

/* DTDD (no-timecode) advisory rows */
.cuelist__sub { color: var(--ink-dim); font-size: .92rem; margin: -2px 0 18px; max-width: 660px; line-height: 1.45; }
.cue__sevtag {
  font-family: "JetBrains Mono", monospace; font-size: .66rem; letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 0; border-radius: 100px; border: 1px solid var(--line-2); color: var(--ink-soft); text-align: center; align-self: center;
}
.cue__sevtag[data-sev="3"] { color: #07070b; background: var(--cat); border-color: transparent; font-weight: 700; }
.cue__sevtag[data-sev="2"] { color: var(--cat); border-color: var(--cat); }
.cue__votes { font-family: "JetBrains Mono", monospace; font-size: .78rem; color: var(--c-substances); margin-left: 6px; }

/* collapsible sections (advisory summary + cue list) */
.ssec-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; cursor: pointer; user-select: none; border-radius: 10px; transition: background .2s; }
.ssec-head:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.ssec-head:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.ssec-head--inline { flex: 1 1 auto; min-width: 0; }
.ssec-head__l { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.collapse-toggle { flex: none; color: var(--ink-dim); display: inline-grid; place-items: center; transition: transform .35s var(--ease), color .2s; }
.ssec-head:hover .collapse-toggle { color: var(--ink); }
.is-collapsed .collapse-toggle { transform: rotate(-90deg); }
.collapse-wrap { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .38s var(--ease), opacity .3s var(--ease); margin-top: 4px; }
.collapse-wrap > .collapse-inner { overflow: hidden; min-height: 0; }
.is-collapsed .collapse-wrap { grid-template-rows: 0fr; opacity: 0; margin-top: 0; }
/* keep the cue-list filters from forcing the head full-width */
.cuelist .cuelist__head { align-items: center; }

/* whitespace / rhythm */
.rhead { padding: 34px; gap: 28px; }
.summary, .timeline, .cuelist, .sources, .recs { padding-top: 30px; padding-bottom: 30px; }
.summary__head, .timeline__head, .cuelist__head { margin-bottom: 22px; }
.cats { gap: 12px; }
.cue { padding: 16px 0; }
.how, .library { margin-top: clamp(70px, 11vw, 120px); }
.how__grid, .library__grid { margin-top: 32px; }
.how__card { padding: 30px; }
.hero { padding-bottom: 46px; }
.footer { margin-top: clamp(80px, 12vw, 130px); }

/* recommendation shelf refresh (portrait posters) */
.recs__sub { margin-bottom: 24px; }
.recgrid { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 18px; }
.rec { border-radius: var(--r-lg); }
.rec__poster { aspect-ratio: 2 / 3; }
.rec__poster .pinitial { font-size: 2.2rem; }
.rec__body { padding: 14px 15px 17px; }
.rec__title { font-size: 1.04rem; line-height: 1.2; }
.rec__meta { margin-top: 5px; }
.rec__clean {
  top: 10px; right: 10px; font-size: .6rem; letter-spacing: .04em;
  background: rgba(7,7,11,.62); border-color: rgba(45,212,191,.45); color: var(--teal);
}

/* mobile topbar — fit the scan button, drop the "/" */
.topbar__cta { white-space: nowrap; }
@media (max-width: 720px) {
  .topbar { gap: 10px; padding: 12px 16px; }
  .brand { font-size: 1.08rem; }
  .topbar__cta { padding: 8px 14px; font-size: .82rem; gap: 0; }
  .topbar__cta kbd { display: none; }
  .themetoggle { width: 36px; height: 36px; }
  .rhead__titlerow { flex-direction: column; gap: 10px; }
  .sharebtn { margin-top: 0; align-self: flex-start; }
}
@media (max-width: 420px) {
  .brand { font-size: 1rem; }
  .topbar__cta { padding: 7px 12px; font-size: .78rem; }
}

/* ================= v4: phone polish, headlines, brand, nudity-first ============= */

/* wider desktop — use more of the screen */
:root { --maxw: 1440px; }
.hero__inner { max-width: 900px; }

/* fix hero search button overlapping the input on phone (flex child must shrink) */
.search__input { min-width: 0; }

/* headlines bigger again */
.hero__title { font-size: clamp(3.5rem, 10.5vw, 7.6rem); line-height: 1.02; }
.section-title { font-size: clamp(1.95rem, 4.6vw, 3.2rem); }
.rhead__title { font-size: clamp(2.1rem, 4.8vw, 3.2rem); }
.how__card h3 { font-size: 1.6rem; }

/* brand: icon + larger */
.brand { font-size: 1.7rem; }
.brand__icon { width: 1.14em; height: 1.14em; margin-right: .42em; border-radius: 7px; box-shadow: 0 2px 10px rgba(0,0,0,.35); }
@media (max-width: 720px) { .brand { font-size: 1.3rem; } .brand__icon { margin-right: .34em; } }

/* "parental guidance, to the second" — readable in light mode */
[data-theme="light"] .hero__eyebrow { color: #0a7a61; }

/* clean collapse interaction — no tap-highlight box, hover only on real pointers */
* { -webkit-tap-highlight-color: transparent; }
.ssec-head { background: transparent; }
.ssec-head:focus { outline: none; }
@media (hover: hover) { .ssec-head:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); } }

/* nudity timestamps surfaced first */
.nudts { padding: 26px 24px; border-top: 1px solid var(--line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--cat) 10%, transparent), transparent 72%); }
.nudts__head { display: flex; align-items: center; gap: 11px; margin-bottom: 16px; }
.nudts__glyph { color: var(--cat); font-size: 1.15rem; }
.nudts__head h3 { font-family: "Life Cinema Screen", sans-serif; font-weight: 700; font-size: 1.25rem; letter-spacing: .045em; }
.nudts__count { color: var(--cat); font-family: "JetBrains Mono", monospace; font-size: .76rem; margin-left: auto; }
.nudts__list { display: flex; flex-direction: column; gap: 9px; }
.nudts__row { display: grid; grid-template-columns: 96px 1fr auto; align-items: center; gap: 14px;
  padding: 13px 16px; border: 1px solid color-mix(in srgb, var(--cat) 30%, transparent);
  border-radius: var(--r-md); background: var(--panel); }
.nudts__time { color: var(--cat); font-size: .96rem; font-weight: 700; }
.nudts__note { color: var(--ink); font-size: .97rem; }
.nudts__sev { font-family: "JetBrains Mono", monospace; font-size: .66rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--cat); border: 1px solid color-mix(in srgb, var(--cat) 40%, transparent); padding: 4px 10px; border-radius: 100px; }

/* scroll fade-up for result sections */
.sreveal { opacity: 0; transform: translateY(30px); transition: opacity .65s var(--ease), transform .65s var(--ease); }
.sreveal.in { opacity: 1; transform: none; }

/* desktop: share floats at the top-right of the header */
@media (min-width: 641px) {
  .rhead__main { position: relative; }
  .sharebtn { position: absolute; top: 0; right: 0; margin-top: 0; }
  .rhead__kicker, .rhead__title { padding-right: 128px; }
}

/* phone: poster on top, genres below it, share below the quote */
@media (max-width: 640px) {
  .rhead { display: flex; flex-direction: column; gap: 18px; padding: 22px; }
  .rhead__postercol { width: 152px; }
  .rhead__poster { width: 152px; }
  .rhead__main { position: static; display: flex; flex-direction: column; gap: 4px; }
  .rhead__kicker { order: 1; margin-bottom: 6px; }
  .rhead__title { order: 2; padding-right: 0; }
  .rhead__tagline { order: 3; }
  .sharebtn { order: 4; position: static; align-self: flex-start; margin-top: 10px; }
  .rhead__genres { order: 5; margin-top: 12px; }
  .nudts__row { grid-template-columns: 64px 1fr; }
  .nudts__sev { grid-column: 2; justify-self: start; margin-top: 2px; }
}

/* ================= v5: Material 3, rounded top bar, ripple, scroll reveal ======= */

/* bigger brand + icon */
.brand { font-size: 2rem; }
.brand__icon { width: 1.22em; height: 1.22em; margin-right: .42em; border-radius: 9px; box-shadow: 0 3px 12px rgba(0,0,0,.4); }
@media (max-width: 720px) { .brand { font-size: 1.5rem; } }

/* rounded, floating Material-3 top bar */
.topbar {
  position: sticky; top: 10px; z-index: 40;
  margin: 10px clamp(12px, 4vw, 40px) 0;
  padding: 10px 16px 10px 22px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: color-mix(in srgb, var(--panel) 80%, transparent);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 10px 34px -16px rgba(0,0,0,.55);
  transition: box-shadow .35s var(--ease), background .35s, border-color .35s;
}
.topbar.is-stuck { box-shadow: 0 16px 40px -18px rgba(0,0,0,.65); background: color-mix(in srgb, var(--panel) 90%, transparent); }
@media (max-width: 720px) { .topbar { margin: 8px 10px 0; padding: 8px 12px 8px 16px; border-radius: 26px; } }

/* ---- Material 3 interactive surfaces: state layer + ripple ---- */
.search__go, .sharebtn, .topbar__cta, .themetoggle, .chip, .filter,
.rec, .libcard, .source, .how__card, .ssec-head, .suggest__item, .genre,
.tag--live, .verdict__src {
  position: relative; overflow: hidden;
}
.collapse-toggle { overflow: visible; } /* chevron must not clip */
/* state layer */
.search__go::after, .sharebtn::after, .topbar__cta::after, .themetoggle::after,
.chip::after, .filter::after, .source::after, .suggest__item::after, .genre::after {
  content: ""; position: absolute; inset: 0; background: currentColor; opacity: 0;
  transition: opacity .2s var(--ease); pointer-events: none;
}
.search__go:hover::after, .sharebtn:hover::after, .topbar__cta:hover::after, .themetoggle:hover::after,
.chip:hover::after, .filter:hover::after, .source:hover::after, .suggest__item:hover::after, .genre:hover::after { opacity: .08; }
.search__go:active::after, .sharebtn:active::after, .topbar__cta:active::after { opacity: .14; }

/* ripple */
.ripple {
  position: absolute; border-radius: 50%; background: currentColor; opacity: .22;
  transform: scale(0); animation: ripple .58s var(--ease); pointer-events: none; z-index: 0;
}
@keyframes ripple { to { transform: scale(1); opacity: 0; } }
/* keep button content above the ripple/state layers */
.search__go > *, .sharebtn > *, .topbar__cta > *, .chip, .filter { position: relative; z-index: 1; }

/* M3 pill buttons + tonal fills */
.topbar__cta { border-radius: 999px; }
.sharebtn { border-radius: 999px; }
.search__go { border-radius: 999px; box-shadow: 0 6px 18px -8px rgba(16,185,129,.6); }
.chip, .genre, .filter { border-radius: 999px; }
.themetoggle { border-radius: 50%; }

/* M3 elevated cards (slightly larger radius already via --r-*) */
.rcard { box-shadow: 0 2px 4px rgba(0,0,0,.2), 0 12px 40px -18px rgba(0,0,0,.7); }
.catcard, .how__card, .rec, .libcard, .source { border-radius: var(--r-md); }
.rec:hover, .libcard:hover { box-shadow: 0 3px 8px rgba(0,0,0,.18), 0 18px 44px -22px rgba(0,0,0,.8); }

/* scroll fade-up reveal */
.rv { opacity: 0; transform: translateY(40px); transition: opacity .7s var(--ease), transform .7s var(--ease); will-change: opacity, transform; }
.rv-in { opacity: 1; transform: none; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal-line > span { transform: none; }
  .marker { transform: translate(-50%,-50%) scale(1); }
  .how__card, .libcard { opacity: 1; transform: none; }
}
