/* Streamingfilter — "screening room" theme
   Velvet plum dark, warm projector light as the one accent. */

@font-face { font-family: "Bricolage"; src: url("../fonts/bricolage.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Instrument"; src: url("../fonts/instrument-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument"; src: url("../fonts/instrument-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Instrument"; src: url("../fonts/instrument-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }

:root {
  --bg: #17111c;
  --bg-2: #1e1724;
  --surface: #261d2d;
  --surface-2: #31263a;
  --line: #3b2f46;
  --line-2: #4b3d58;
  --text: #f2eadf;
  --muted: #b3a5b4;
  --faint: #85778a;
  --beam: #f2d27a;
  --beam-2: #ffe7a8;
  --beam-ink: #2a1f08;
  --fresh: #ec6a4c;
  --rotten: #8fb768;
  --danger: #ff8a7a;
  --ok: #9fd8a8;
  --display: "Bricolage", "Instrument", system-ui, sans-serif;
  --body: "Instrument", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-xl: 26px;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 9px;
  --rail: 88px;
  --gutter: clamp(16px, 2.4vw, 32px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.55 var(--body);
  font-feature-settings: "ss01" 1;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--beam-2); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 650; letter-spacing: -0.015em; line-height: 1.12; margin: 0; text-wrap: balance; }
p { margin: 0 0 0.8em; }
abbr { text-decoration: none; }
:focus-visible { outline: 2px solid var(--beam); outline-offset: 2px; border-radius: 6px; }
dialog:focus, dialog:focus-visible, .modal-body:focus, main:focus { outline: none; }
@media (hover: none) { .card-link:hover .poster { outline: none; } }
::selection { background: var(--beam); color: var(--beam-ink); }

.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--beam); color: var(--beam-ink); padding: 10px 16px; border-radius: 999px; font-weight: 600; }
.skip:focus { top: 12px; }

.ic { width: 22px; height: 22px; flex: none; }
.ic-sm { width: 17px; height: 17px; }
.ic-xs { width: 13px; height: 13px; }

/* ---------- shell ---------- */

.shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100vh; }

.rail {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; align-items: center;
  padding: 18px 0;
  margin: 0 0 0 14px;
}
.rail::before {
  content: ""; position: absolute; inset: 14px 0; z-index: -1;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-xl);
}
.rail-logo { display: grid; place-items: center; width: 48px; height: 48px; margin: 12px 0 26px; }
.rail-logo svg { width: 34px; height: 34px; }
.lg-beam { fill: var(--beam); }
.lg-dot { fill: var(--text); }
.rail ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rail ul a, .rail-account {
  position: relative; display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: 15px;
  color: var(--faint); text-decoration: none;
  transition: color .15s, background .15s;
}
.rail ul a span, .rail-account > span:last-child {
  position: absolute; left: calc(100% + 14px); top: 50%; transform: translateY(-50%);
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line-2);
  padding: 5px 10px; border-radius: 8px; font-size: 13px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .12s;
}
.rail ul a:hover span, .rail ul a:focus-visible span, .rail-account:hover > span:last-child, .rail-account:focus-visible > span:last-child { opacity: 1; }
.rail ul a:hover, .rail-account:hover { color: var(--text); background: var(--surface); }
.rail ul a.on, .rail-account.on { color: var(--beam); background: color-mix(in srgb, var(--beam) 11%, transparent); }
.rail ul a.on::after {
  content: ""; position: absolute; left: -14px; top: 12px; bottom: 12px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--beam);
}
.rail-account { margin-top: auto; margin-bottom: 12px; }
.avatar {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px;
  background: var(--beam); color: var(--beam-ink); font: 700 17px var(--display);
}

.stage { min-width: 0; padding: 0 var(--gutter) 0 calc(var(--gutter) + 6px); }

.topbar {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 440px) auto;
  align-items: center; gap: 20px; padding: 26px 0 18px;
}
.brand { display: none; font: 700 20px var(--display); text-decoration: none; letter-spacing: -0.02em; }
.hello { margin: 0; font: 600 clamp(22px, 2.3vw, 30px)/1.1 var(--display); letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topsearch { position: relative; }
.topsearch .ic { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; width: 19px; height: 19px; }
.topsearch input {
  width: 100%; height: 46px; padding: 0 18px 0 46px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; color: var(--text);
}
.topsearch input::placeholder { color: var(--faint); }
.topsearch input:focus { border-color: var(--beam); outline: none; }
.country-btn {
  display: inline-flex; align-items: center; gap: 9px; height: 46px; padding: 0 14px 0 12px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-weight: 600;
}
.country-btn img { width: 24px; height: 18px; border-radius: 3px; object-fit: cover; }
.country-btn:hover { border-color: var(--line-2); }

main { outline: none; padding-bottom: 40px; }

/* ---------- page heads ---------- */

.page-head { padding: 6px 0 18px; max-width: 70ch; }
.page-head h1 { font-size: clamp(30px, 3.6vw, 46px); font-weight: 700; letter-spacing: -0.03em; }
.lede { color: var(--muted); font-size: 16.5px; margin: 10px 0 0; max-width: 64ch; }

/* ---------- filter bar ---------- */

.filters {
  position: sticky; top: 0; z-index: 30;
  margin: 0 calc(var(--gutter) * -0.5) 22px; padding: 12px calc(var(--gutter) * 0.5);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
}
.filters.stuck { border-bottom-color: var(--line); }
.f-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.seg { display: inline-flex; padding: 3px; margin: 0; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-2); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 6px 15px; border-radius: 999px; font-weight: 500; font-size: 14px; color: var(--muted); cursor: pointer; }
.seg input:checked + span { background: var(--text); color: var(--bg); }
.seg input:focus-visible + span { outline: 2px solid var(--beam); outline-offset: 1px; }

.pill, .pop > summary {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 15px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--text); cursor: pointer; text-decoration: none; white-space: nowrap;
}
.pill:hover, .pop > summary:hover { border-color: var(--line-2); color: var(--text); }
.pill.is-on, .pop.is-on > summary { border-color: color-mix(in srgb, var(--beam) 70%, transparent); color: var(--beam-2); background: color-mix(in srgb, var(--beam) 9%, var(--surface)); }
.pill-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.pill-select { padding: 0; position: relative; }
.pill-select select {
  appearance: none; -webkit-appearance: none; height: 100%; padding: 0 34px 0 15px;
  border: 0; background: transparent; border-radius: 999px; cursor: pointer; max-width: 230px; text-overflow: ellipsis;
}
.pill-select::after, .pop > summary::after {
  content: ""; width: 8px; height: 8px; border: solid currentColor; border-width: 0 1.6px 1.6px 0;
  transform: rotate(45deg) translateY(-2px); opacity: .7; flex: none;
}
.pill-select::after { position: absolute; right: 15px; top: 13px; pointer-events: none; }
.pill-select select option { background: var(--surface-2); color: var(--text); }
.pill-sort { margin-left: auto; }

.pop { position: relative; }
.pop > summary { list-style: none; }
.pop > summary::-webkit-details-marker { display: none; }
.pop[open] > summary { border-color: var(--line-2); background: var(--surface-2); }
.pop-panel {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 40;
  width: max-content; min-width: 260px; max-width: min(560px, calc(100vw - 32px));
  padding: 18px; display: grid; gap: 14px;
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r-md);
  box-shadow: 0 24px 60px -12px rgba(5, 2, 8, .7);
}
.pop-panel label { display: grid; gap: 6px; font-size: 13.5px; color: var(--muted); }
.pop-hint { font-size: 13px; color: var(--faint); margin: 0; max-width: 42ch; }
.pop-genres { width: 520px; }
.checks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 10px; }
.check { display: flex !important; align-items: center; gap: 9px; color: var(--text) !important; font-size: 14px !important; cursor: pointer; padding: 4px 0; }
.check input { width: 17px; height: 17px; accent-color: var(--beam); margin: 0; flex: none; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.era { border: 0; padding: 0; margin: 0; display: grid; gap: 2px; }
.era legend { font-size: 13.5px; color: var(--muted); padding: 0; margin-bottom: 6px; }
.filters .btn-apply { display: none; }
.f-mobile, .sheet-top, .sheet-bottom { display: none; }
.btn-filters { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--text); color: var(--bg); font-weight: 600; cursor: pointer; }
.btn-filters .ic { width: 18px; height: 18px; }
.f-clear { color: var(--muted); font-size: 14px; }
.pop-panel.pop-right { left: auto; right: 0; }
.no-js .filters .btn-apply { display: inline-flex; min-height: 38px; }

/* people tokens */
.pop-people .pop-panel { width: 360px; }
.people-field { position: relative; display: grid; gap: 6px; }
.people-field > label { font-size: 13.5px; color: var(--muted); }
.tokens { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tokens:empty { display: none; }
.token { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 11px; background: color-mix(in srgb, var(--beam) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--beam) 50%, transparent); border-radius: 999px; font-size: 13px; }
.token-x { border: 0; background: transparent; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; color: var(--muted); font-size: 16px; line-height: 1; }
.token-x:hover { background: var(--surface-2); color: var(--text); }
.suggest { position: absolute; top: 100%; left: 0; right: 0; z-index: 5; list-style: none; margin: 4px 0 0; padding: 6px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 12px; max-height: 260px; overflow: auto; }
.suggest li { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--surface-2); }
.suggest img, .suggest .ph { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: var(--surface); flex: none; }

/* ---------- fields + buttons ---------- */

.field {
  width: 100%; height: 44px; padding: 0 14px;
  background: var(--bg); border: 1px solid var(--line-2); border-radius: 12px; color: var(--text);
}
select.field { appearance: none; -webkit-appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b3a5b4' stroke-width='2'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; }
.field:focus { border-color: var(--beam); outline: none; }
.field::placeholder { color: var(--faint); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  background: var(--beam); color: var(--beam-ink); font-weight: 600; font-size: 15px;
  text-decoration: none; cursor: pointer; transition: background .15s, transform .1s;
}
.btn:hover { background: var(--beam-2); color: var(--beam-ink); }
.btn:active { transform: translateY(1px); }
.btn-quiet { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-quiet:hover { background: var(--surface-2); color: var(--text); }
.btn-light { background: var(--text); color: var(--bg); }
.btn-light:hover { background: #fff; color: var(--bg); }
.btn-glass { background: rgba(23, 17, 28, .55); color: var(--text); border-color: rgba(242, 234, 223, .25); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.btn-glass:hover { background: rgba(23, 17, 28, .8); color: var(--text); }
.btn-danger { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 55%, transparent); }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.btn-block { width: 100%; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); cursor: pointer; color: var(--text); }
.icon-btn:hover { background: var(--surface-2); }

/* ---------- showcase (home) ---------- */

.showcase {
  display: grid; gap: 18px; margin-bottom: 34px;
  grid-template-columns: minmax(250px, 300px) minmax(0, 1fr) minmax(250px, 300px);
}
.panel { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.panel-title { font-size: 17px; font-weight: 600; margin-bottom: 14px; }

.top-list ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.top-list a { display: grid; grid-template-columns: 26px 46px minmax(0, 1fr); align-items: center; gap: 12px; padding: 7px 6px; border-radius: 12px; text-decoration: none; }
.top-list a:hover { background: var(--surface); color: var(--text); }
.rank { font: 700 24px/1 var(--display); color: var(--beam); text-align: center; font-variant-numeric: tabular-nums; }
.top-list img, .thumb-blank { width: 46px; height: 69px; border-radius: 7px; object-fit: cover; background: var(--surface); }
.tl-text { display: grid; min-width: 0; }
.tl-text strong { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-text span { font-size: 13px; color: var(--muted); }

.feature {
  position: relative; isolation: isolate; overflow: hidden; min-height: 440px;
  border-radius: var(--r-xl); background: var(--surface);
  display: flex; align-items: flex-end;
}
.slide { position: absolute; inset: 0; display: flex; align-items: flex-end; isolation: isolate; opacity: 0; visibility: hidden; transition: opacity .7s ease, visibility 0s .7s; }
.slide.is-active { opacity: 1; visibility: visible; transition: opacity .7s ease; z-index: 1; }
.feature-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.slide.is-active .feature-img { animation: slow-zoom 9s ease-out both; }
@keyframes slow-zoom { from { transform: scale(1.04); } to { transform: scale(1); } }
.feature-nav { position: absolute; right: 18px; bottom: 18px; z-index: 3; display: flex; align-items: center; gap: 8px; }
.feature-nav .icon-btn { background: rgba(23, 17, 28, .6); border-color: rgba(242, 234, 223, .25); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.feature-nav .icon-btn:hover { background: rgba(23, 17, 28, .85); }
.feature-count { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; margin-right: 4px; }
.top-list a.is-current { background: var(--surface); }
.top-list a.is-current .rank { color: var(--beam-2); }
.slide::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(23, 17, 28, 0) 25%, rgba(23, 17, 28, .62) 58%, rgba(23, 17, 28, .96) 100%),
              linear-gradient(90deg, rgba(23, 17, 28, .55) 0%, rgba(23, 17, 28, 0) 60%);
}
.feature-body { padding: clamp(22px, 3vw, 38px); padding-right: 150px; max-width: 760px; }
.feature-kicker { color: var(--beam); font-weight: 600; font-size: 14px; margin: 0 0 8px; }
.feature-title { font-size: clamp(38px, 5.2vw, 76px); font-weight: 750; letter-spacing: -0.035em; line-height: .92; margin-bottom: 14px; }
.feature-title a { text-decoration: none; }
.feature-meta, .tp-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.feature-meta span::before, .tp-meta > * + *::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--faint); margin-right: 14px; vertical-align: middle; position: relative; top: -1px; }
.tp-meta a { text-decoration: none; }
.feature-text { color: #e6dccf; max-width: 56ch; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.feature-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.side { display: grid; gap: 18px; align-content: start; }
.logo-row { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.logo-row img { width: 36px; height: 36px; border-radius: 10px; }
.setup-text { color: var(--muted); font-size: 14px; }
.setup-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 16px; }
.setup-stats div { background: var(--surface); border-radius: 12px; padding: 10px 12px; }
.setup-stats dt { font-size: 12.5px; color: var(--muted); }
.setup-stats dd { margin: 0; font: 700 24px/1.15 var(--display); font-variant-numeric: tabular-nums; }
.added ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.added a { display: flex; align-items: center; gap: 12px; text-decoration: none; padding: 4px; border-radius: 10px; }
.added a:hover { background: var(--surface); color: var(--text); }
.added img { width: 40px; height: 60px; border-radius: 6px; object-fit: cover; }
.added span { display: grid; font-size: 14px; font-weight: 500; min-width: 0; }
.added small { color: var(--muted); font-weight: 400; font-size: 12.5px; }

/* ---------- results ---------- */

.results-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 18px; }
.results-count { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.results-scope { color: var(--muted); margin: 0; }
.results[aria-busy="true"] .grid { opacity: .45; transition: opacity .2s; }
.save-search { display: flex; gap: 8px; margin-left: auto; }
.save-search .field { height: 40px; width: 230px; }
.save-search .btn { min-height: 40px; padding: 0 16px; font-size: 14px; }

.grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 26px 18px;
}
.card-link { display: grid; gap: 4px; text-decoration: none; color: var(--text); }
.card-link:hover { color: var(--text); }
.poster { position: relative; display: block; aspect-ratio: 2 / 3; border-radius: 11px; overflow: hidden; background: var(--surface); margin-bottom: 6px; }
.poster img { width: 100%; height: 100%; object-fit: cover; }
.card-link:hover .poster, .card-link:focus-visible .poster { outline: 2px solid var(--beam); outline-offset: 3px; }
.card-link:focus-visible { outline: none; }
.poster-blank { display: grid; place-items: center; height: 100%; font: 700 48px var(--display); color: var(--line-2); }
.fav-dot { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(23, 17, 28, .78); color: var(--beam); }
.fav-dot .ic { fill: currentColor; }
.card-title { font-weight: 600; font-size: 14.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 12.5px; color: var(--muted); }
.score { font-variant-numeric: tabular-nums; }
.score-imdb abbr { color: var(--faint); }
.score-rt::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 4px; vertical-align: middle; position: relative; top: -1px; }
.score-rt.fresh::before { background: var(--fresh); }
.score-rt.rotten::before { background: var(--rotten); }
.card-prov { display: flex; gap: 5px; margin-top: 4px; }
.card-prov img { width: 22px; height: 22px; border-radius: 6px; }
.prov-txt { font-size: 11px; color: var(--faint); }

.more { display: flex; justify-content: center; margin-top: 34px; }
.notice, .empty, .ok, .alert {
  border-radius: var(--r-md); padding: 16px 18px; margin: 0 0 20px;
  background: var(--bg-2); border: 1px solid var(--line);
}
.notice strong { display: block; margin-bottom: 2px; }
.empty { text-align: center; padding: 44px 20px; }
.empty h3 { font-size: 22px; margin-bottom: 8px; }
.empty p { color: var(--muted); }
.ok { border-color: color-mix(in srgb, var(--ok) 45%, transparent); color: var(--ok); }
.alert { border-color: color-mix(in srgb, var(--danger) 50%, transparent); color: var(--danger); }

/* ---------- FAQ + related (service pages) ---------- */

.faq { margin-top: 56px; max-width: 78ch; }
.faq h2, .related h2, .svc-links h2 { font-size: 24px; margin-bottom: 14px; }
.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item summary { cursor: pointer; padding: 16px 0; font-weight: 600; font-size: 16px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font: 400 22px/1 var(--display); color: var(--beam); }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { color: var(--muted); padding-bottom: 14px; }
.related, .svc-links { margin-top: 44px; }
.related ul, .link-cloud { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.related a, .link-cloud a { display: inline-block; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; text-decoration: none; color: var(--muted); }
.related a:hover, .link-cloud a:hover { color: var(--text); border-color: var(--line-2); }

/* ---------- dialogs ---------- */

dialog { color: var(--text); padding: 0; border: 1px solid var(--line-2); background: var(--bg-2); }
dialog::backdrop { background: rgba(9, 5, 12, .74); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.sheet { width: min(460px, calc(100vw - 24px)); border-radius: var(--r-lg); padding: 22px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.sheet-head h2 { font-size: 21px; }
.sheet-note { color: var(--muted); font-size: 14px; }
.country-list { list-style: none; margin: 12px 0 0; padding: 0; max-height: min(52vh, 420px); overflow: auto; display: grid; gap: 2px; }
.country-list button {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 10px;
  border: 0; border-radius: 10px; background: transparent; cursor: pointer; text-align: left; font-size: 15px;
}
.country-list button:hover, .country-list [aria-selected="true"] button { background: var(--surface-2); }
.country-list img { width: 26px; height: 19px; border-radius: 3px; object-fit: cover; }
.country-list .cl-name { flex: 1; }
.country-list .cl-state { font-size: 12px; color: var(--faint); }
.country-list .is-current .cl-state { color: var(--beam); }
.sheet-foot { margin: 12px 0 0; font-size: 13.5px; color: var(--muted); min-height: 1em; }

.modal { width: min(940px, calc(100vw - 24px)); max-height: calc(100vh - 32px); border-radius: var(--r-xl); overflow: auto; overscroll-behavior: contain; }
.modal-body { min-height: 300px; }
.modal-loading { display: grid; place-items: center; min-height: 360px; color: var(--muted); }
.m-hero { position: relative; aspect-ratio: 21 / 8; background: var(--surface); }
.m-backdrop { width: 100%; height: 100%; object-fit: cover; }
.m-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(30, 23, 36, 0) 35%, var(--bg-2) 100%); }
.m-close { position: absolute; top: 14px; right: 14px; z-index: 2; background: rgba(23, 17, 28, .7); border-color: rgba(242, 234, 223, .2); }
.m-main { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; padding: 0 30px; margin-top: -84px; position: relative; z-index: 1; }
.m-poster { width: 150px; border-radius: 12px; border: 1px solid var(--line-2); align-self: start; }
.m-info { padding-top: 70px; }
.m-title { font-size: clamp(26px, 3.4vw, 40px); font-weight: 750; letter-spacing: -0.03em; margin-bottom: 10px; }
.scores { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.sc { display: grid; padding: 8px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); min-width: 84px; }
.sc strong { font: 700 21px/1.1 var(--display); font-variant-numeric: tabular-nums; }
.sc span { font-size: 12px; color: var(--muted); }
.sc-rt.fresh strong { color: var(--fresh); }
.sc-rt.rotten strong { color: var(--rotten); }
.sc-imdb strong { color: var(--beam); }
.m-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.watch-btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 18px 0 8px;
  background: var(--text); color: var(--bg); border-radius: 999px; text-decoration: none; font-weight: 600;
}
.watch-btn:hover { background: #fff; color: var(--bg); }
.watch-btn img { width: 30px; height: 30px; border-radius: 50%; }
.watch-btn .ic { opacity: .6; }
.fav-btn.is-on { color: var(--beam); border-color: color-mix(in srgb, var(--beam) 55%, transparent); }
.fav-btn.is-on .ic { fill: currentColor; }
.m-cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 30px; padding: 26px 30px 32px; }
.m-overview { font-size: 16px; color: #e6dccf; }
.m-people .side-h:first-child { margin-top: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; text-decoration: none; }
.chip:hover { border-color: var(--beam); color: var(--beam-2); }
.m-more { margin-top: 18px; font-size: 14px; }
.fine { font-size: 13px; color: var(--faint); margin-top: 10px; }

.video { position: relative; border-radius: var(--r-md); overflow: hidden; background: #000; aspect-ratio: 16 / 9; margin-top: 18px; }
.video-start { position: absolute; inset: 0; display: grid; place-items: center; text-decoration: none; }
.video-start img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.video-play { position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px 12px 16px; border-radius: 999px; background: var(--beam); color: var(--beam-ink); font-weight: 600; }
.video-start:hover .video-play { background: var(--beam-2); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video + .fine, .trailer .fine { margin-top: 8px; }

/* ---------- title page ---------- */

.title-page { margin-top: 4px; }
.tp-hero { position: relative; border-radius: var(--r-xl); overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); isolation: isolate; }
.tp-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: .5; }
.tp-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--bg-2) 18%, rgba(30, 23, 36, .55) 70%, rgba(30, 23, 36, .2)); }
.tp-head { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 34px; padding: clamp(22px, 3.4vw, 44px); align-items: end; }
.tp-poster { width: 220px; border-radius: 14px; border: 1px solid var(--line-2); }
.tp-head h1 { font-size: clamp(32px, 4.6vw, 64px); font-weight: 750; letter-spacing: -0.035em; line-height: .98; margin-bottom: 10px; }
.tp-year { font-weight: 400; color: var(--muted); }
.tp-orig { color: var(--muted); }
.fav-form { margin-top: 4px; }
.tp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; margin-top: 34px; }
.tp-tagline { font: italic 500 19px/1.4 var(--display); color: var(--beam-2); }
.tp-overview { font-size: 17px; max-width: 68ch; color: #e6dccf; }
.watch, .trailer, .elsewhere { margin-top: 36px; }
.watch h2, .trailer h2, .elsewhere h2 { font-size: 22px; margin-bottom: 14px; }
.watch-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.avail { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.avail th, .avail td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.avail thead th { color: var(--muted); font-weight: 500; font-size: 13px; }
.avail tbody th { font-weight: 500; white-space: nowrap; }
.avail img { display: inline-block; vertical-align: -2px; margin-right: 6px; border-radius: 2px; }
.side-h { font-size: 15px; font-weight: 600; color: var(--muted); margin: 24px 0 10px; font-family: var(--body); letter-spacing: 0; }
.tp-side .side-h:first-child { margin-top: 0; }
.names { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cast { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cast a { display: flex; align-items: center; gap: 12px; text-decoration: none; padding: 3px; border-radius: 10px; }
.cast a:hover { background: var(--surface); color: var(--text); }
.cast img, .cast .ph { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--surface); display: grid; place-items: center; color: var(--faint); font-weight: 600; }

/* ---------- forms + account ---------- */

.narrow { max-width: 460px; margin: 20px auto 40px; }
.narrow-wide { max-width: 720px; }
.narrow h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 700; letter-spacing: -0.03em; }
.form { display: grid; gap: 14px; margin-top: 24px; }
.form label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.form-inline { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.form-inline label { flex: 1 1 180px; }
.form-group { border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; display: grid; gap: 12px; margin: 0; }
.form-group legend { padding: 0 6px; color: var(--text); font-weight: 600; }
.help { font-size: 13px; color: var(--faint); margin: -6px 0 0; }
.form-foot { margin-top: 20px; color: var(--muted); font-size: 14px; }
.card-block { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; margin-top: 18px; }
.card-block h2 { font-size: 19px; margin-bottom: 8px; }
.card-block p { color: var(--muted); }
.card-block .help { margin-top: 10px; }
.danger { border-color: color-mix(in srgb, var(--danger) 30%, var(--line)); }
.code-box { display: block; font: 600 clamp(18px, 3vw, 26px)/1.3 var(--display); letter-spacing: .06em; padding: 18px 20px; background: var(--surface); border: 1px dashed var(--beam); border-radius: var(--r-md); color: var(--beam-2); word-break: break-all; margin: 18px 0; user-select: all; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

.saved-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-width: 760px; }
.saved-list li { display: flex; align-items: center; gap: 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 10px 10px 18px; }
.saved-list a { flex: 1; display: grid; text-decoration: none; min-width: 0; }
.saved-list a span { color: var(--muted); font-size: 13.5px; }

.services-form { display: grid; gap: 22px; }
.svc-country { display: grid; gap: 6px; max-width: 360px; color: var(--muted); font-size: 14px; }
.svc-grid { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.svc { position: relative; cursor: pointer; }
.svc input { position: absolute; opacity: 0; }
.svc-box { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); background: var(--bg-2); border: 1px solid var(--line); min-height: 64px; }
.svc-box img { width: 44px; height: 44px; border-radius: 11px; }
.svc-name { flex: 1; font-weight: 500; font-size: 14.5px; line-height: 1.25; }
.svc-tick { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line-2); color: transparent; flex: none; }
.svc input:checked + .svc-box { border-color: var(--beam); background: color-mix(in srgb, var(--beam) 8%, var(--bg-2)); }
.svc input:checked + .svc-box .svc-tick { background: var(--beam); border-color: var(--beam); color: var(--beam-ink); }
.svc input:focus-visible + .svc-box { outline: 2px solid var(--beam); outline-offset: 2px; }
.svc-save { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 16px 0; background: linear-gradient(180deg, rgba(23, 17, 28, 0), var(--bg) 30%); }
.svc-save .help { margin: 0; flex: 1 1 300px; }

.prose h2 { font-size: 22px; margin: 30px 0 10px; }
.prose p { color: #e1d6c9; max-width: 68ch; }

/* ---------- footer ---------- */

.foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 40px; padding: 34px 0 40px; margin-top: 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px; }
.foot-brand strong { font: 700 17px var(--display); color: var(--text); }
.foot-brand p { max-width: 52ch; margin-top: 6px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; align-content: start; }
.foot nav a { text-decoration: none; }
.attrib { grid-column: 1 / -1; font-size: 12.5px; color: var(--faint); max-width: 110ch; margin: 0; }

/* ---------- install + utility pages ---------- */

.err-page { display: block; padding: 24px; }
.err-page main { max-width: 720px; margin: 40px auto; }
.checks-list { list-style: none; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.checks-list .ok { color: var(--ok); background: none; border: 0; padding: 0; margin: 0; }
.checks-list .bad { color: var(--danger); }
.steps { display: grid; gap: 20px; padding-left: 20px; }
.steps .btn { margin-top: 10px; }
.log { white-space: pre-wrap; font-size: 12px; color: var(--faint); background: var(--bg-2); padding: 12px; border-radius: 10px; }

/* ---------- responsive ---------- */

@media (max-width: 1240px) {
  .showcase { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .feature { grid-column: 1 / -1; grid-row: 1; min-height: 400px; }
  .side { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .tp-grid { grid-template-columns: 1fr; }
  .m-cols { grid-template-columns: 1fr; }
  .pill-sort { margin-left: 0; }
}
@media (max-width: 760px) {
  :root { --rail: 0px; }
  .shell { display: block; }
  .rail {
    position: fixed; z-index: 50; left: 10px; right: 10px; bottom: 10px; top: auto; height: auto;
    flex-direction: row; margin: 0; padding: 6px; justify-content: space-between;
    background: var(--bg-2); border: 1px solid var(--line); border-radius: 20px;
  }
  .rail::before { display: none; }
  .rail-logo { display: none; }
  .rail ul { flex-direction: row; gap: 2px; flex: 1; justify-content: space-around; }
  .rail ul li:nth-child(5) { display: none; }
  .rail ul a span, .rail-account > span:last-child { display: none; }
  .rail ul a.on::after { display: none; }
  .rail-account { margin: 0; }
  .avatar { width: 34px; height: 34px; font-size: 15px; border-radius: 11px; }
  .stage { padding: 0 16px 90px; }
  .topbar { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding-top: 16px; }
  .brand { display: block; }
  .hello { display: none; }
  .topsearch { grid-column: 1 / -1; grid-row: 2; }
  .filters { margin: 0 -16px 18px; padding: 10px 16px; }
  /* Without JavaScript: filters wrap and panels open in place */
  .pop { position: static; }
  .pop-panel, .pop-genres, .pop-people .pop-panel { position: static; width: 100%; min-width: 0; max-width: none; margin-top: 8px; box-shadow: none; }
  .checks { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* With JavaScript: one "Filters" button that opens a sheet from the bottom */
  html:not(.no-js) .f-mobile { display: flex; align-items: center; gap: 12px; }
  html:not(.no-js) .filters .f-row { display: none; }
  html:not(.no-js) .filters.is-open { backdrop-filter: none; -webkit-backdrop-filter: none; z-index: 80; }
  html:not(.no-js) .filters.is-open::before { content: ""; position: fixed; inset: 0; z-index: 69; background: rgba(9, 5, 12, .72); }
  html:not(.no-js) .filters.is-open .f-row {
    display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 10px;
    position: fixed; left: 0; right: 0; bottom: 0; top: 7vh; z-index: 70;
    padding: 0 16px; overflow-y: auto; overscroll-behavior: contain;
    background: var(--bg-2); border: 1px solid var(--line-2); border-bottom: 0; border-radius: 24px 24px 0 0;
    box-shadow: 0 -20px 60px -10px rgba(5, 2, 8, .8);
    animation: sheet-up .22s ease-out;
  }
  .is-open .sheet-top { display: flex; position: sticky; top: 0; z-index: 2; align-items: center; justify-content: space-between; padding: 16px 0 10px; background: var(--bg-2); }
  .is-open .sheet-top h2 { font-size: 22px; }
  .is-open .sheet-bottom { display: flex; position: sticky; bottom: 0; z-index: 2; gap: 10px; margin-top: auto; padding: 14px 0 calc(14px + env(safe-area-inset-bottom)); background: var(--bg-2); border-top: 1px solid var(--line); }
  .is-open .sheet-bottom .btn { flex: 1; }
  .is-open .sheet-bottom .btn-quiet { flex: 0 0 auto; }
  .is-open .seg { display: flex; }
  .is-open .seg label { flex: 1; }
  .is-open .seg span { text-align: center; padding: 10px 0; }
  .is-open .pill, .is-open .pop > summary { width: 100%; height: 50px; justify-content: space-between; font-size: 15px; border-radius: 14px; }
  .is-open .pill-select select { width: 100%; max-width: none; padding-left: 16px; }
  .is-open .f-row > * { flex-shrink: 0; }
  .is-open .pill-select::after { top: 19px; right: 18px; }
  .is-open .pop > summary::after { margin-right: 3px; }
  .is-open .pill-sort { margin-left: 0; }
  .is-open .f-reset { display: none; }
  .is-open .pop-panel { background: var(--surface); border-color: var(--line); padding: 16px; animation: none; }
  .is-open .suggest { position: static; margin-top: 6px; }
  html.sheet-open, html.sheet-open body { overflow: hidden; }
  @keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

  /* Title pop-up fills the screen on phones */
  .modal { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; border: 0; }
  .m-hero { aspect-ratio: 16 / 9; }
  .showcase { grid-template-columns: 1fr; }
  .feature { min-height: 440px; }
  .feature-nav { top: 14px; bottom: auto; right: 14px; }
  .feature-body { padding-right: 22px; }
  .top-list { order: 2; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 20px 12px; }
  .tp-head { grid-template-columns: 1fr; }
  .tp-poster { width: 140px; }
  .m-main { grid-template-columns: 96px minmax(0, 1fr); gap: 16px; padding: 0 18px; margin-top: -54px; }
  .m-poster { width: 96px; }
  .m-info { padding-top: 46px; }
  .m-cols { padding: 20px 18px 26px; }
  .foot { grid-template-columns: 1fr; }
  .save-search { margin-left: 0; width: 100%; }
  .save-search .field { flex: 1; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
.hello-brand { text-decoration: none; }
.notes { background: var(--surface); border-radius: var(--r-md); padding: 14px 18px; margin: 12px 0 16px; }
.notes h3 { font-size: 16px; margin: 8px 0 6px; }
.notes p { margin: 0 0 6px; color: var(--text); }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 0 0 14px; }
.admin-stats div { background: var(--surface); border-radius: 12px; padding: 10px 12px; }
.admin-stats dt { font-size: 12.5px; color: var(--muted); }
.admin-stats dd { margin: 0; font: 700 22px/1.2 var(--display); }

/* ---------- statistics ---------- */
.stats-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; max-width: none; }
.period-tabs { flex-wrap: wrap; }
.period-tabs a { display: block; padding: 6px 14px; border-radius: 999px; font-size: 14px; color: var(--muted); text-decoration: none; }
.period-tabs a.on { background: var(--text); color: var(--bg); }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 8px 0 18px; }
.kpi { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; }
.kpi-label { font-size: 13px; color: var(--muted); margin: 0 0 4px; }
.kpi-value { font: 700 28px/1.1 var(--display); margin: 0; font-variant-numeric: tabular-nums; }
.kpi-delta { font-size: 12.5px; margin: 6px 0 0; color: var(--muted); }
.kpi-delta.up { color: var(--ok); }
.kpi-delta.down { color: var(--danger); }
.chart { width: 100%; height: auto; display: block; margin-top: 8px; }
.chart .bar { fill: var(--beam); }
.chart .hit { fill: transparent; }
.chart .hit:hover { fill: rgba(242, 234, 223, .06); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .base { stroke: var(--line-2); stroke-width: 1; }
.chart .axis { fill: var(--faint); font: 400 13px var(--body); }
@media (max-width: 760px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpi-value { font-size: 23px; } .chart .axis { font-size: 20px; } }
.table-view { margin-top: 10px; font-size: 14px; }
.table-view summary { cursor: pointer; color: var(--muted); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 0 18px; }
.stat-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.stat-table th, .stat-table td { text-align: left; padding: 7px 0; border-bottom: 1px solid var(--line); font-weight: 400; vertical-align: top; }
.stat-table thead th { color: var(--faint); font-size: 12.5px; }
.stat-table .num { text-align: right; font-variant-numeric: tabular-nums; padding-left: 12px; white-space: nowrap; }
.stat-table tbody th { padding-right: 8px; }
.stat-name { display: flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.stat-name img { flex: none; border-radius: 2px; }
.stat-table progress { display: block; width: 100%; height: 4px; margin-top: 5px; border: 0; border-radius: 2px; background: var(--surface); appearance: none; -webkit-appearance: none; }
.stat-table progress::-webkit-progress-bar { background: var(--surface); border-radius: 2px; }
.stat-table progress::-webkit-progress-value { background: var(--beam); border-radius: 2px; }
.stat-table progress::-moz-progress-bar { background: var(--beam); border-radius: 2px; }
.stats-sub { font-size: 24px; margin: 34px 0 6px; }
.stats-note { max-width: 80ch; margin-top: 24px; }

/* ---------- admin dashboard + homepage lists ---------- */
.admin-page { max-width: 1100px; }
.kpis-dash { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.btn-small { min-height: 34px; padding: 0 14px; font-size: 13.5px; }
.admin-table td { vertical-align: middle; }
.row-actions { text-align: right; white-space: nowrap; }
.row-actions form { display: inline-flex; gap: 6px; }
.sub-h { font-size: 16px; margin: 18px 0 6px; }
.inline-flag { display: inline-block; vertical-align: -2px; border-radius: 2px; }
.list-admin { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.list-admin li { display: flex; align-items: center; gap: 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; }
.list-admin .grow { flex: 1; min-width: 0; display: grid; }
.list-admin .grow a { font-weight: 600; text-decoration: none; }
.list-admin .grow span { color: var(--muted); font-size: 13.5px; }
.list-admin img { width: 40px; height: 60px; border-radius: 6px; object-fit: cover; flex: none; }
.list-admin .pos { font: 700 18px var(--display); color: var(--beam); width: 26px; text-align: center; flex: none; }
.order-btns { display: flex; gap: 4px; }
.order-btns button { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; font-size: 15px; }
.order-btns button:disabled { opacity: .35; cursor: default; }
.tag { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.tag-warn { color: var(--danger); }
.home-row { margin: 0 0 34px; }
.home-row-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 14px; }
.home-row-head h2 { font-size: 24px; }
.home-row-head p { margin: 0; color: var(--muted); }
.row-scroll { list-style: none; margin: 0; padding: 0 0 6px; display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 5 * 18px) / 6); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.row-scroll > li { scroll-snap-align: start; }
@media (max-width: 1240px) { .row-scroll { grid-auto-columns: calc((100% - 3 * 18px) / 4); } .kpis-dash { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .row-scroll { grid-auto-columns: 42%; gap: 12px; } .kpis-dash { grid-template-columns: repeat(2, minmax(0, 1fr)); } .row-actions { white-space: normal; } .row-actions form { flex-wrap: wrap; justify-content: flex-end; } }

.row-nav { margin-left: auto; display: inline-flex; gap: 6px; }
.row-nav[hidden] { display: none; }
.row-nav .icon-btn:disabled { opacity: .35; cursor: default; }
.rot-l { transform: rotate(90deg); }
.rot-r { transform: rotate(-90deg); }
@media (hover: none) { .row-nav { display: none; } }

/* ---------- feature requests ---------- */
.sheet-wide { width: min(560px, calc(100vw - 24px)); }
.area { height: auto; min-height: 140px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.feature-form .help { margin: 0; }
.fr-list { list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 8px; }
.fr-list li { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border-radius: var(--r-md); padding: 12px 12px 12px 16px; }
.fr-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.fr-text p { margin: 0; color: var(--text); }
.fr-text .fr-date { font-size: 12.5px; color: var(--faint); margin-bottom: 4px; }
.fr-clear { margin-top: 8px; }
.copy-done { align-self: center; margin: 0; }
