/* =========================================================
   Exelist · design tokens
========================================================= */
:root {
  --bg: #0b0a10;
  --bg-2: #0f0e15;
  --surface: #14131b;
  --surface-2: #1a1922;
  --surface-3: #22212c;
  --line: #24232e;
  --line-2: #312f3d;
  --text: #eeecf3;
  --text-2: #c9c6d3;
  --muted: #8e8a9c;
  --accent: #caabfd;
  --accent-2: #b48cfb;
  --accent-ink: #1a1030;
  --accent-soft: rgba(202, 171, 253, 0.12);
  --accent-line: rgba(202, 171, 253, 0.32);
  --danger: #ff7a85;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1240px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
/* reserve the scrollbar's space so pages never shift sideways when their height changes */
html { scrollbar-gutter: stable; overflow-y: scroll; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background:
    radial-gradient(900px 420px at 80% -5%, rgba(180, 140, 251, 0.10), transparent 65%),
    radial-gradient(700px 380px at -10% 20%, rgba(180, 140, 251, 0.05), transparent 60%);
}
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; font-weight: 400; }
h1, h2 { font-family: var(--serif); font-weight: 650; letter-spacing: -0.035em; }
h1 { font-size: clamp(30px, 4.4vw, 48px); }
h2 { font-size: 24px; }
h3 { font-size: 15px; font-weight: 600; letter-spacing: -0.005em; }
p { margin: 0; }
button { font: inherit; color: inherit; }
svg { flex: none; }
::selection { background: var(--accent); color: var(--accent-ink); }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; }
.strong { font-weight: 600; }
.center { text-align: center; }
.pad { padding: 28px 0; }
.mt { margin-top: 18px; }
.serif-lg { font-family: var(--serif); font-weight: 650; letter-spacing: -0.035em; font-size: 24px; }
.serif-num { font-family: var(--serif); font-weight: 650; letter-spacing: -0.035em; font-size: 30px; line-height: 1; }
.container { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
#view { min-height: 70vh; }

/* =========================================================
   Logo & header
========================================================= */
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 700; letter-spacing: -0.045em; font-size: 24px; letter-spacing: -0.01em; line-height: 1; }
.logo img { width: 30px; height: 30px; }
.logo.small { font-size: 20px; }
.logo.small img { width: 20px; height: 20px; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(11, 10, 16, 0.72);
  backdrop-filter: saturate(150%) blur(16px);
  -webkit-backdrop-filter: saturate(150%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { max-width: var(--wrap); margin: 0 auto; height: 68px; padding: 0 24px; display: flex; align-items: center; gap: 20px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.menu { position: relative; }
.me-btn { background: none; border: 0; padding: 2px; border-radius: 50%; cursor: pointer; display: flex; }
.me-btn:focus-visible, .me-btn[aria-expanded="true"] { box-shadow: 0 0 0 2px var(--accent); }
.menu-pop {
  position: absolute; right: 0; top: calc(100% + 10px); width: 240px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px;
  box-shadow: var(--shadow); padding: 6px; display: grid; animation: rise 0.14s ease;
}
.menu-pop[hidden] { display: none; }
.menu-head { display: flex; gap: 10px; align-items: center; padding: 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu-pop a, .menu-pop button {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px;
  background: none; border: 0; text-align: left; cursor: pointer; font-size: 14px; color: var(--text-2);
}
.menu-pop a:hover, .menu-pop button:hover { background: var(--surface-2); color: var(--text); }

/* =========================================================
   Controls
========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 500; font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: transform 0.12s, background 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover:not(:disabled) { background: #d9c2fe; }
.btn.ghost { background: var(--surface-2); border-color: var(--line-2); color: var(--text); }
.btn.ghost:hover:not(:disabled) { background: var(--surface-3); border-color: #3d3a4c; }
.btn.accent-soft { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.btn.danger { color: var(--danger); }
.btn.block { width: 100%; }
.small-btn { height: 34px; padding: 0 14px; font-size: 13px; }
.small-btn svg { width: 15px; height: 15px; }
.link { background: none; border: 0; padding: 0; cursor: pointer; color: var(--accent); font-weight: 500; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface-2);
  color: var(--muted); cursor: pointer; transition: color 0.15s, background 0.15s;
}
.icon-btn:hover { color: var(--text); background: var(--surface-3); }

.input {
  width: 100%; height: 42px; padding: 0 14px;
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  font: inherit; outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.input::placeholder { color: #6b6779; }
textarea.input { height: auto; padding: 11px 14px; resize: vertical; line-height: 1.5; }
select.input { width: auto; padding-right: 34px; cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238e8a9c' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.big { height: 50px; font-size: 16px; }
.search-field { position: relative; }
.search-field > svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-field .input { padding-left: 42px; }

.form { display: grid; gap: 14px; }
.form label, .auth label { display: grid; gap: 7px; font-size: 13px; font-weight: 500; color: var(--muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { font-size: 12px; font-weight: 400; color: #6f6b7e; }
.form-error { color: var(--danger); font-size: 13px; }
.row-end { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; align-items: center; }
.inline-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.inline-form .input { flex: 1; min-width: 180px; }
.check-row { display: flex !important; align-items: center; gap: 10px; cursor: pointer; color: var(--text-2) !important; font-weight: 400 !important; }
.check-row input { width: 17px; height: 17px; accent-color: var(--accent); margin: 0; }

/* segmented controls */
.seg { display: flex; gap: 4px; padding: 4px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; width: fit-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--muted); padding: 7px 15px; border-radius: 999px; cursor: pointer; font-weight: 500; font-size: 14px; white-space: nowrap; }
.seg-btn svg { width: 14px; height: 14px; }
.seg-btn:hover { color: var(--text); }
.seg-btn.on { background: var(--surface-3); color: var(--text); }
.seg-btn.ghost { color: var(--accent); }
.seg.two, .seg.three { display: grid; width: 100%; border-radius: 14px; padding: 0; background: none; border: 0; gap: 10px; }
.seg.two { grid-template-columns: 1fr 1fr; }
.seg.three { grid-template-columns: repeat(3, 1fr); margin: 18px 0; }
.seg-opt { cursor: pointer; }
.seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg-opt > span {
  display: grid; gap: 2px; grid-template-columns: auto 1fr; align-items: center; column-gap: 10px;
  padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--bg-2);
  color: var(--text); font-weight: 500; transition: border-color 0.15s, background 0.15s;
}
.seg-opt > span svg { grid-row: span 2; color: var(--muted); }
.seg-opt small { grid-column: 2; font-weight: 400; font-size: 12px; color: var(--muted); }
.seg-opt input:checked + span { border-color: var(--accent-line); background: var(--accent-soft); }
.seg-opt input:checked + span svg { color: var(--accent); }

/* chips & tags */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  height: 34px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  background: transparent; border: 1px solid var(--line-2); color: var(--muted);
  font-size: 13px; font-weight: 500; transition: all 0.15s; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.chip:hover { color: var(--text); border-color: #3f3c4d; }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip-n { font-size: 11px; opacity: 0.6; font-variant-numeric: tabular-nums; }

.tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; border: 1px solid var(--line-2); color: var(--text-2); background: var(--surface); }
.tag.accent { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); }
.tag b { font-weight: 600; color: var(--text); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn-tag { cursor: pointer; font: inherit; font-size: 13px; padding: 6px 13px; }
.btn-tag svg { width: 13px; height: 13px; }
.btn-tag:hover { border-color: #46425a; color: var(--text); }
.removable { padding-right: 5px; }
.removable button { background: none; border: 0; cursor: pointer; color: inherit; display: grid; place-items: center; padding: 2px; border-radius: 50%; }
.removable button svg { width: 13px; height: 13px; }
.removable button:hover { background: rgba(255, 255, 255, 0.08); }

/* =========================================================
   Avatars, score pills
========================================================= */
.avatar {
  --size: 40px; width: var(--size); height: var(--size); flex: none; border-radius: 50%; object-fit: cover;
  display: grid; place-items: center;
  background: linear-gradient(140deg, hsl(var(--h) 45% 46%), hsl(calc(var(--h) + 50) 50% 28%));
  color: #fff; font-size: calc(var(--size) * 0.38); font-weight: 600; letter-spacing: 0.01em;
}
.avatar.sm { --size: 32px; }
.avatar.xl { --size: 112px; font-family: var(--serif); font-weight: 650; letter-spacing: -0.035em; font-size: 44px; }

.pill {
  display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 26px; padding: 0 8px;
  border-radius: 8px; font-weight: 600; font-size: 13.5px; font-variant-numeric: tabular-nums;
  color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); border: 1px solid color-mix(in srgb, var(--c) 32%, transparent); flex: none;
}
.pill.sm { min-width: 34px; height: 23px; font-size: 12.5px; }
.pill b { font-weight: inherit; }
/* Score on posters: a ring that fills up to the score (9 → 90%), number in the middle */
.pill.on-poster {
  position: absolute; right: 8px; top: 8px; width: 44px; height: 44px; min-width: 0; padding: 3px; border: 0; border-radius: 50%;
  background: conic-gradient(var(--c) calc(var(--v) * 10%), rgba(255, 255, 255, 0.16) 0);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
}
.pill.on-poster b {
  width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center;
  background: rgba(11, 10, 16, 0.9); backdrop-filter: blur(4px);
  color: #fff; font-size: 14.5px; font-weight: 700; letter-spacing: -0.03em;
}
.strip .pill.on-poster, .mosaic .pill.on-poster { width: 40px; height: 40px; }
@media (max-width: 640px) {
  .pill.on-poster { width: 38px; height: 38px; padding: 2.5px; }
  .pill.on-poster b { font-size: 13px; }
}
.imdb-badge { position: absolute; right: 8px; top: 8px; padding: 3px 7px; border-radius: 6px; font-size: 11px; font-weight: 700; background: #f5c518; color: #000; }

/* =========================================================
   Posters & cards
========================================================= */
.poster-img { width: 100%; height: 100%; object-fit: cover; }
.poster-ph {
  width: 100%; height: 100%; display: grid; place-items: center; padding: 14px; text-align: center;
  background: radial-gradient(120% 80% at 30% 0%, hsl(var(--h) 30% 24%), hsl(calc(var(--h) + 40) 25% 11%));
  font-family: var(--serif); font-weight: 650; letter-spacing: -0.035em; font-size: 16px; line-height: 1.2; color: rgba(255, 255, 255, 0.86);
}
.poster-ph span { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.poster-ph.empty-ph { background: var(--surface-2); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 28px 20px; align-items: start; }
.card { position: relative; min-width: 0; }
/* minmax(0,1fr): long titles/subtitles get "…" instead of stretching the card */
.card-link { display: grid; grid-template-columns: minmax(0, 1fr); gap: 11px; min-width: 0; }
.card-meta { min-width: 0; }
.poster {
  position: relative; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden;
  background: var(--surface-2); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05) inset, 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s cubic-bezier(.2,.7,.3,1), box-shadow 0.25s;
}
.poster::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset; pointer-events: none; }
.card-link:hover .poster { transform: translateY(-4px); box-shadow: 0 0 0 1px var(--accent-line) inset, 0 18px 40px rgba(0, 0, 0, 0.5); }
.cat-badge {
  position: absolute; left: 8px; bottom: 8px; padding: 3px 8px; border-radius: 6px;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  background: rgba(11, 10, 16, 0.75); backdrop-filter: blur(6px); color: var(--text-2);
  opacity: 0; transform: translateY(4px); transition: opacity 0.2s, transform 0.2s;
}
.card-link:hover .cat-badge { opacity: 1; transform: none; }
.card-meta h3 { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta p { font-size: 12.5px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mine { color: var(--accent); font-weight: 500; }
.card-remove {
  position: absolute; top: 8px; left: 8px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; border: 0; cursor: pointer;
  background: rgba(11, 10, 16, 0.82); color: var(--text); opacity: 0; transition: opacity 0.15s;
}
.card-remove svg { width: 15px; height: 15px; }
.card:hover .card-remove, .card-remove:focus-visible { opacity: 1; }
.card-remove:hover { background: var(--danger); color: #fff; }
@media (hover: none) { .card-remove, .cat-badge { opacity: 1; transform: none; } }

.strip > .card { width: 138px; }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: 138px; justify-content: start; gap: 16px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }

/* =========================================================
   Panels, toolbars
========================================================= */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.panel-title { font-size: 12px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.panel-head .panel-title { margin: 0; }
.panel-title .small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.panel-title.mt { margin-top: 26px; }
.cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar { flex-wrap: nowrap; }
.toolbar > .chips { flex: 1 1 auto; min-width: 0; flex-wrap: wrap; row-gap: 8px; padding: 3px 0; }
/* With categories: categories get the whole first row, filters always sit on the right of the second row */
.toolbar:has(> .chips) { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; row-gap: 14px; }
.toolbar:has(> .chips) > .chips { grid-column: 1 / -1; }
.toolbar:has(> .chips) > .toolbar-right { grid-column: 2; }
.toolbar > .result-count { margin: 0; min-height: 0; grid-column: 1; }
.toolbar > .chips::-webkit-scrollbar { display: none; }
.toolbar > .chips .chip { flex: none; }
.toolbar-right { display: flex; gap: 10px; align-items: center; flex-wrap: nowrap; justify-content: flex-end; flex: none; }
.toolbar-right .search { width: 170px; }
.toolbar-right select.input { width: 138px; max-width: 138px; text-overflow: ellipsis; }
.toolbar-right select.input#sort, .toolbar-right select.input#rSort, .toolbar-right select.input#wSort { width: 158px; max-width: 158px; }
select.input:disabled { opacity: 0.45; cursor: default; }
.result-count { margin-bottom: 14px; min-height: 20px; }

/* =========================================================
   Discover
========================================================= */
.hero { max-width: var(--wrap); margin: 0 auto; padding: 72px 24px 48px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: end; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
.eyebrow svg { width: 14px; height: 14px; }
.hero h1 { font-size: clamp(36px, 5vw, 62px); line-height: 1.04; max-width: 17ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { color: var(--text-2); font-size: 17px; max-width: 56ch; margin-top: 20px; line-height: 1.6; }
.hero-stats { display: flex; gap: 36px; margin: 0; padding-bottom: 6px; }
.hero-stats div { display: grid; gap: 2px; }
.hero-stats dt { font-size: 12px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.hero-stats dd { margin: 0; font-family: var(--serif); font-weight: 650; letter-spacing: -0.035em; font-size: 38px; line-height: 1; }

.home-layout { max-width: var(--wrap); margin: 0 auto; padding: 0 24px 80px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
.side { display: grid; gap: 16px; position: sticky; top: 92px; }
.feed, .members, .reviews, .side-lists, .pick-lists { list-style: none; margin: 0; padding: 0; }
.feed { display: grid; gap: 14px; }
.feed li { display: flex; align-items: center; gap: 12px; }
.feed-poster { width: 34px; height: 50px; border-radius: 6px; overflow: hidden; flex: none; }
.poster-img.mini, .poster-ph.mini { width: 100%; height: 100%; font-size: 9px; padding: 3px; }
.feed-txt { display: grid; min-width: 0; flex: 1; line-height: 1.35; }
.feed-title { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-title:hover, .feed-user:hover { color: var(--accent); }
.members { display: grid; gap: 2px; }
.members a { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 7px; margin: 0 -7px; border-radius: 10px; }
.members a .avatar { grid-row: span 2; }
.members a .strong { font-size: 14px; line-height: 1.2; }
.members a .muted { line-height: 1.2; }
.members a:hover { background: var(--surface-2); }
.side-lists { display: grid; gap: 4px; }
.side-lists a { display: grid; padding: 8px 10px; margin: 0 -10px; border-radius: 10px; }
.side-lists a:hover { background: var(--surface-2); }

.empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 10px; padding: 64px 16px; text-align: center; border: 1px dashed var(--line-2); border-radius: var(--radius); }

/* =========================================================
   Item page
========================================================= */
.item-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.item-hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center 25%; opacity: 0.32; filter: saturate(0.9); }
.item-hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 10, 16, 0.35) 0%, rgba(11, 10, 16, 0.75) 55%, var(--bg) 100%), linear-gradient(90deg, rgba(11, 10, 16, 0.85) 0%, transparent 70%); }
.item-hero-in { position: relative; display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 44px; padding-top: 56px; padding-bottom: 44px; align-items: end; }
.item-poster { aspect-ratio: 2 / 3; border-radius: 14px; overflow: hidden; box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08); background: var(--surface-2); }
.item-poster .poster-ph { font-size: 26px; }
.item-head { display: grid; gap: 12px; min-width: 0; }
.crumbs { font-size: 13px; color: var(--muted); letter-spacing: 0.02em; }
.crumbs a { color: var(--accent); }
.item-head h1 { font-size: clamp(32px, 4.4vw, 54px); line-height: 1.04; }
.original { font-style: italic; margin-top: -4px; }
.tagline { font-weight: 400; font-style: italic; font-size: 18px; color: var(--text-2); }
.genre-row { display: flex; flex-wrap: wrap; gap: 6px; }
.by { color: var(--text-2); }
.scores { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.score-block {
  display: grid; gap: 1px; min-width: 112px; padding: 12px 16px; border-radius: 14px;
  background: rgba(20, 19, 27, 0.75); border: 1px solid var(--line-2); backdrop-filter: blur(8px);
  transition: border-color 0.15s;
}
a.score-block:hover { border-color: #46425a; }
.score-block.main { border-color: var(--accent-line); background: rgba(202, 171, 253, 0.08); }
.score-label { font-size: 11px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.score-val { font-family: var(--serif); font-weight: 650; letter-spacing: -0.035em; font-size: 30px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.score-val small { font-family: var(--font); font-size: 13px; color: var(--muted); margin-left: 3px; }
.score-sub { font-size: 12px; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

.item-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 44px; padding-top: 40px; padding-bottom: 80px; align-items: start; }
.item-main { display: grid; gap: 40px; min-width: 0; }
.item-main > *, .ov-grid > *, .home-main, .settings-body > * { min-width: 0; }
.item-side { display: grid; gap: 16px; position: sticky; top: 92px; }
.block-title { font-size: 22px; margin-bottom: 18px; display: flex; align-items: baseline; gap: 10px; }
.block-title .count { font-family: var(--font); font-size: 15px; color: var(--muted); }
.overview { color: var(--text-2); font-size: 16.5px; line-height: 1.7; max-width: 72ch; }

.rate { display: grid; gap: 16px; }
.rate-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.score-big { font-family: var(--serif); font-weight: 650; letter-spacing: -0.035em; font-size: 48px; line-height: 0.9; color: var(--c); font-variant-numeric: tabular-nums; }
.scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: -8px; }
input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 999px; cursor: pointer; margin: 8px 0;
  background: linear-gradient(to right, var(--c, var(--accent)) var(--p, 50%), var(--surface-3) var(--p, 50%));
}
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 4px solid var(--c, var(--accent)); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 4px solid var(--c, var(--accent)); }

.reviews { display: grid; gap: 10px; }
.review { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.review-body { flex: 1; min-width: 0; display: grid; gap: 4px; }
.review-top { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; line-height: 1.3; }
.review:has(.review-body p) { align-items: flex-start; }
.review:has(.review-body p) .pill { margin-top: 6px; }
.review-body p { color: var(--text-2); white-space: pre-line; overflow-wrap: anywhere; }

.cast-row { display: grid; grid-auto-flow: column; grid-auto-columns: 124px; gap: 14px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.cast { display: grid; gap: 2px; align-content: start; }
.cast img, .cast-ph { width: 124px; height: 156px; border-radius: 12px; object-fit: cover; background: var(--surface-2); margin-bottom: 8px; }
.cast-ph { display: grid; place-items: center; font-family: var(--serif); font-weight: 650; letter-spacing: -0.035em; font-size: 32px; color: var(--muted); }
.cast:hover img { box-shadow: 0 0 0 2px var(--accent-line); }
.cast-name { font-size: 13.5px; font-weight: 500; line-height: 1.3; }
.cast-role { font-size: 12.5px; color: var(--muted); line-height: 1.3; }

.crew { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px 28px; margin: 0; }
.crew dt { font-size: 11.5px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.crew dd { margin: 0; color: var(--text-2); }
.crew a:hover { color: var(--accent); }

.facts { margin: 0; display: grid; gap: 12px; }
.facts div { display: grid; gap: 1px; }
.facts dt { font-size: 12px; color: var(--muted); }
.facts dd { margin: 0; font-size: 14px; color: var(--text-2); overflow-wrap: anywhere; }
.ext-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.ext-links a { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text-2); }
.ext-links a svg { width: 13px; height: 13px; }
.ext-links a:hover { border-color: var(--accent-line); color: var(--accent); }
.providers { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.providers img { width: 42px; height: 42px; border-radius: 10px; }
.prov-label { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.side-tools { display: flex; flex-wrap: wrap; gap: 8px; }

.video-modal { width: min(960px, 100%) !important; padding: 0 !important; overflow: hidden; background: #000 !important; }
.video { aspect-ratio: 16 / 9; }
.video iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-modal .modal-close { z-index: 2; background: rgba(0, 0, 0, 0.6); }

/* =========================================================
   Profile
========================================================= */
.profile-hero { position: relative; border-bottom: 1px solid var(--line); }
.profile-hero > .container { position: relative; z-index: 1; }
.profile-cover {
  position: absolute; z-index: 0; inset: 0 0 auto 0; height: 220px; overflow: hidden;
  background:
    radial-gradient(600px 220px at 20% 0%, hsl(var(--h) 60% 40% / 0.45), transparent 70%),
    radial-gradient(700px 260px at 85% 10%, rgba(180, 140, 251, 0.25), transparent 70%),
    linear-gradient(180deg, #16131f, var(--bg));
}
.profile-cover::after { content: ""; position: absolute; inset: 0; z-index: 2; background: linear-gradient(180deg, transparent 40%, var(--bg)); }
.cover-glow {
  position: absolute; inset: 0; z-index: 1; opacity: 0; transition: opacity 0.9s ease;
  background:
    radial-gradient(640px 260px at 18% -10%, rgb(var(--g1, 180 140 251) / var(--a1, 0.4)), transparent 70%),
    radial-gradient(720px 280px at 82% 0%, rgb(var(--g2, 120 140 251) / var(--a2, 0.25)), transparent 72%),
    linear-gradient(180deg, #13111a, var(--bg));
}
.cover-glow.on { opacity: 1; }
.profile-hero-in { position: relative; display: flex; align-items: flex-end; gap: 28px; padding-top: 110px; flex-wrap: wrap; }
.profile-avatar .avatar { box-shadow: 0 0 0 5px var(--bg), 0 20px 50px rgba(0, 0, 0, 0.5); }
.profile-id { flex: 1; min-width: 240px; display: grid; gap: 6px; padding-bottom: 6px; }
.profile-id h1 { font-size: clamp(32px, 4.4vw, 48px); }
.bio { color: var(--text-2); max-width: 62ch; margin-top: 4px; }
.profile-actions { display: flex; gap: 10px; padding-bottom: 10px; }
.counters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 34px 0 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.counters div { padding: 18px 22px; display: grid; gap: 4px; border-left: 1px solid var(--line); }
.counters div:first-child { border-left: 0; }
.counters dt { font-size: 11.5px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.counters dd { margin: 0; font-family: var(--serif); font-weight: 650; letter-spacing: -0.035em; font-size: 34px; line-height: 1; }
.tabs-line { display: flex; gap: 28px; margin-top: 26px; overflow-x: auto; scrollbar-width: none; }
.tabs-line::-webkit-scrollbar { display: none; }
.tabs-line a { padding: 14px 0; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs-line a:hover { color: var(--text); }
.tabs-line a.on { color: var(--text); border-color: var(--accent); }
#tabBody { padding-top: 32px; padding-bottom: 80px; }

.ov-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.span-2 { grid-column: span 2; }
.cat-stats { display: flex; flex-wrap: wrap; gap: 28px; }
.cat-stats div { display: grid; gap: 4px; }
.dist { display: flex; gap: 6px; height: 110px; align-items: stretch; }
.dist-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.dist-bar { width: 100%; min-height: 3px; border-radius: 5px 5px 2px 2px; opacity: 0.85; }
.dist-n { font-size: 11px; color: var(--muted); }
.dist-x { font-size: 11px; color: var(--muted); }

.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bars li { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.bars li[hidden] { display: none; }
.bar-label { font-size: 13.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.bar-val { font-size: 12.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bar-val b { color: var(--text); font-weight: 600; }
.bar-val small { margin-left: 8px; font-weight: 600; }
.bars + .link { margin-top: 14px; }
.decades { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }

.ip-split { display: grid; gap: 26px; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 16px; }
.person { position: relative; display: grid; justify-items: center; gap: 4px; text-align: center; }
.person img, .person .cast-ph { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; margin: 0 0 6px; font-size: 26px; }
.person:hover img { box-shadow: 0 0 0 2px var(--accent-line); }
.person .strong { line-height: 1.25; }
.person-remove { position: absolute; top: -4px; right: 6px; width: 24px; height: 24px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: var(--surface-3); color: var(--text); }
.person-remove svg { width: 12px; height: 12px; }
.person-remove:hover { background: var(--danger); }

.list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.list-card { display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color 0.2s, transform 0.2s; }
.list-card:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.mosaic { display: grid; grid-template-columns: repeat(4, 1fr); aspect-ratio: 8 / 3; gap: 2px; background: var(--line); }
.mosaic > * { width: 100%; height: 100%; min-height: 0; }
.mosaic .poster-ph { font-size: 11px; padding: 4px; }
.list-card-body { padding: 16px 18px 18px; display: grid; gap: 4px; }
.list-card-body h3 { font-family: var(--serif); font-weight: 650; letter-spacing: -0.035em; font-size: 20px; }
.list-desc { color: var(--text-2); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.private { display: inline-flex; align-items: center; gap: 4px; }
.private svg { width: 12px; height: 12px; }

.list-hero { padding: 64px 0 36px; display: grid; gap: 12px; }
.list-hero .lead { margin-top: 0; }
.list-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
.owner { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.owner:hover span { color: var(--accent); }
.list-hero + .grid { padding-bottom: 80px; }

/* =========================================================
   Settings
========================================================= */
.settings-head { padding: 48px 0 28px; display: grid; gap: 10px; }
.back { color: var(--muted); font-size: 14px; }
.back:hover { color: var(--text); }
.settings-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 36px; align-items: start; padding-bottom: 80px; }
.settings-nav { display: grid; gap: 2px; position: sticky; top: 92px; }
.settings-nav a { padding: 10px 14px; border-radius: 10px; color: var(--muted); font-weight: 500; }
.settings-nav a:hover { color: var(--text); background: var(--surface); }
.settings-nav a.on { color: var(--text); background: var(--surface-2); box-shadow: inset 2px 0 0 var(--accent); }
.settings-body { display: grid; gap: 16px; min-width: 0; }
.section-title { font-size: 22px; margin-bottom: 8px; }
.sub-title { font-size: 12px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); margin: 26px 0 12px; }
.avatar-edit { display: flex; align-items: center; gap: 24px; margin: 20px 0 26px; flex-wrap: wrap; }
.avatar-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.avatar-actions p { flex-basis: 100%; }
.avatar-actions label { cursor: pointer; }

.steps { margin: 4px 0 18px; padding-left: 20px; color: var(--text-2); display: grid; gap: 6px; }
.steps a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.drop { display: flex; align-items: center; gap: 16px; padding: 26px; border: 1.5px dashed var(--line-2); border-radius: var(--radius); cursor: pointer; color: var(--muted); transition: border-color 0.15s, background 0.15s; }
.drop b { color: var(--text); font-weight: 500; }
.drop svg { width: 26px; height: 26px; color: var(--accent); }
.drop:hover, .drop.over { border-color: var(--accent-line); background: var(--accent-soft); }
.import-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.import-summary div { display: grid; gap: 6px; padding: 16px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.progress-box, .done-box { margin-top: 20px; padding: 24px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--line); display: grid; gap: 10px; }
.done-box { justify-items: start; }
.progress { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width 0.3s; }

/* =========================================================
   Modals, add dialog, auth
========================================================= */
.modal-wrap { position: fixed; inset: 0; z-index: 50; display: grid; place-items: start center; padding: 9vh 16px 16px; background: rgba(5, 4, 9, 0.72); backdrop-filter: blur(8px); animation: fade 0.15s ease; overflow-y: auto; }
.modal { position: relative; width: min(460px, 100%); background: var(--surface); border: 1px solid var(--line-2); border-radius: 22px; padding: 28px; box-shadow: var(--shadow); display: grid; gap: 18px; animation: rise 0.2s ease; }
.modal.wide { width: min(660px, 100%); }
.modal > h2 { font-size: 24px; padding-right: 40px; }
.modal-close { position: absolute; right: 16px; top: 16px; width: 36px; height: 36px; }
.results { display: grid; gap: 4px; max-height: 50vh; overflow-y: auto; margin: 4px -8px 0; padding: 0 8px; }
.result { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 8px; border-radius: 12px; border: 1px solid transparent; background: transparent; cursor: pointer; }
.result:hover { background: var(--surface-2); border-color: var(--line-2); }
.result:disabled { opacity: 0.6; }
.poster-img.thumb, .poster-ph.thumb, .thumb { width: 46px; height: 69px; flex: none; border-radius: 7px; object-fit: cover; }
.poster-ph.thumb { font-size: 9px; padding: 4px; }
.thumb.round { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; }
.result-txt { display: grid; flex: 1; min-width: 0; }
.result-txt .strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.result-act { font-size: 13px; font-weight: 600; color: var(--accent); padding: 0 6px; white-space: nowrap; }

.manual-grid { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; }
.cover-drop { cursor: pointer; display: block !important; }
.cover-preview { aspect-ratio: 2 / 3; border-radius: 12px; border: 1.5px dashed var(--line-2); display: grid; place-content: center; justify-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; overflow: hidden; transition: border-color 0.15s; }
.cover-preview img { width: 100%; height: 100%; object-fit: cover; }
.cover-drop:hover .cover-preview { border-color: var(--accent-line); color: var(--accent); }

.pick-lists { display: grid; gap: 4px; max-height: 40vh; overflow-y: auto; }
.pick-lists li { padding: 10px 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); }
.pick-lists .check-row .muted { margin-left: auto; }

.auth { display: grid; gap: 14px; }
.auth h2 { font-size: 26px; }
.auth-logo { width: 44px; height: 44px; margin-bottom: 4px; }

/* =========================================================
   Misc
========================================================= */
.loading { display: flex; justify-content: center; gap: 6px; padding: 80px 0; }
.loading span { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: bounce 0.9s infinite ease-in-out; }
.loading span:nth-child(2) { animation-delay: 0.12s; }
.loading span:nth-child(3) { animation-delay: 0.24s; }
.results .loading { padding: 30px 0; }

.boot { min-height: 100vh; display: grid; place-items: center; text-align: center; }
.boot-logo { width: 56px; height: 56px; animation: pulse 1.4s ease-in-out infinite; }
.boot-msg { display: grid; justify-items: center; gap: 10px; }
.boot-msg img { width: 48px; }

.footer { border-top: 1px solid var(--line); margin-top: 20px; }
.footer-in { max-width: var(--wrap); margin: 0 auto; padding: 28px 24px 44px; display: flex; gap: 24px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.footer p { font-size: 12px; color: var(--muted); max-width: 70ch; }
.footer a:not(.logo) { text-decoration: underline; text-underline-offset: 2px; }
.footer a:hover { color: var(--text); }

#toast { position: fixed; left: 50%; bottom: 24px; z-index: 70; transform: translate(-50%, 20px); background: var(--text); color: var(--bg); padding: 11px 20px; border-radius: 999px; font-weight: 500; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; max-width: calc(100% - 32px); box-shadow: var(--shadow); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.error { background: var(--danger); color: #fff; }

@keyframes bounce { 0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes pulse { 50% { opacity: 0.45; transform: scale(0.94); } }

/* =========================================================
   Responsive
========================================================= */
@media (max-width: 1080px) {
  .home-layout, .item-body { grid-template-columns: 1fr; }
  .side, .item-side { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .hero { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 860px) {
  .item-hero-in { grid-template-columns: 180px minmax(0, 1fr); gap: 28px; }
  .ov-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .settings-layout { grid-template-columns: 1fr; gap: 16px; }
  .settings-nav { position: static; display: flex; overflow-x: auto; scrollbar-width: none; gap: 4px; }
  .settings-nav a { white-space: nowrap; }
  .settings-nav a.on { box-shadow: inset 0 -2px 0 var(--accent); }
}
@media (max-width: 640px) {
  .container, .hero, .home-layout { padding-left: 16px; padding-right: 16px; }
  .topbar-in { padding: 0 16px; height: 60px; }
  .logo { font-size: 21px; }
  .logo img { width: 26px; height: 26px; }
  .hide-sm { display: none; }
  #addBtn { width: 40px; padding: 0; }
  .hero { padding-top: 44px; padding-bottom: 32px; }
  .hero h1 { font-size: 36px; }
  .lead { font-size: 15.5px; }
  .hero-stats { gap: 26px; }
  .hero-stats dd { font-size: 36px; }
  .chips, .toolbar > .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; width: calc(100% + 32px); flex-basis: auto;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .toolbar { flex-wrap: wrap; }
  .toolbar-right { width: 100%; justify-content: stretch; flex-wrap: wrap; }
  .toolbar:has(> .chips) { grid-template-columns: 1fr; }
  .toolbar:has(> .chips) > .toolbar-right { grid-column: 1; grid-row: 2; }
  .toolbar > .result-count { grid-row: 3; }
  .toolbar-right select.input { max-width: none; }
  .toolbar-right .search { width: auto; flex: 1 1 100%; }
  .toolbar-right select.input { flex: 1; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 20px 12px; }
  .item-hero-in { grid-template-columns: 1fr; padding-top: 28px; gap: 22px; }
  .item-poster { width: 170px; }
  .item-head h1 { font-size: 32px; }
  .score-block { min-width: 0; flex: 1 1 96px; padding: 10px 12px; }
  .score-val { font-size: 28px; }
  .actions .btn { flex: 1 1 auto; }
  .profile-hero-in { padding-top: 80px; gap: 18px; }
  .avatar.xl { --size: 92px; font-size: 36px; }
  .counters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .counters div:nth-child(3) { border-left: 0; }
  .counters div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .counters dd { font-size: 32px; }
  .bars li { grid-template-columns: 92px minmax(0, 1fr) auto; gap: 8px; }
  .form-row, .seg.two, .seg.three, .manual-grid { grid-template-columns: 1fr; }
  .manual-grid .cover-drop { width: 130px; }
  .import-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal { padding: 22px 18px; border-radius: 18px; }
  .modal > h2 { font-size: 24px; }
  .panel { padding: 18px; }
  .cta { flex-direction: column; align-items: flex-start; }
  .footer-in { padding: 24px 16px 36px; }
}

/* =========================================================
   Photo cropper
========================================================= */
.crop-modal { width: min(440px, 100%) !important; }
.crop-stage {
  position: relative; width: 100%; aspect-ratio: 1; border-radius: 16px; overflow: hidden;
  background: #050408; cursor: grab; touch-action: none; user-select: none;
}
.crop-stage:active { cursor: grabbing; }
.crop-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.crop-mask {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(5, 4, 8, 0.78); outline: 2px solid rgba(255, 255, 255, 0.85); outline-offset: -1px;
}
.crop-controls { display: flex; align-items: center; gap: 10px; }
.crop-controls input[type="range"] { flex: 1; --p: 0%; margin: 0; }

/* ---- Crop: wide (banner) ---- */
.crop-modal.crop-wide { width: min(760px, 100%) !important; }
.crop-stage.rect { border-radius: 12px; }
.crop-mask.rect { border-radius: 12px; box-shadow: none; outline: 2px solid rgba(255, 255, 255, 0.7); outline-offset: -2px; }

/* ---- Profile banner ---- */
.profile-hero.has-banner .profile-cover {
  inset: 0; height: auto;
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
.profile-hero.has-banner .profile-cover::after {
  background: linear-gradient(180deg,
    rgba(11, 10, 16, 0.15) 0%,
    rgba(11, 10, 16, 0.35) 40%,
    rgba(11, 10, 16, 0.78) 72%,
    rgba(11, 10, 16, 0.94) 90%,
    var(--bg) 100%);
}
.profile-hero.has-banner .profile-hero-in { padding-top: 170px; }
.profile-hero.has-banner .profile-id h1 { text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55); }
.profile-hero.has-banner .profile-id p { color: var(--text-2); text-shadow: 0 1px 10px rgba(0, 0, 0, 0.65); }
.profile-hero.has-banner .profile-avatar .avatar { box-shadow: 0 0 0 5px rgba(11, 10, 16, 0.85), 0 18px 46px rgba(0, 0, 0, 0.6); }
.profile-hero.has-banner .profile-actions .btn { background: rgba(26, 25, 34, 0.72); backdrop-filter: blur(10px); }
.profile-hero.has-banner .counters { background: rgba(20, 19, 27, 0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.profile-hero.has-banner .tabs-line a { text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8); }

/* ---- Banner in Edit profile ---- */
.banner-edit { display: grid; gap: 12px; margin: 4px 0 26px; }
.banner-edit .sub-title { margin: 0; }
.banner-prev {
  aspect-ratio: 3; border-radius: 14px; border: 1.5px dashed var(--line-2);
  display: grid; place-items: center; text-align: center; padding: 16px;
  background-size: cover; background-position: center;
}
.banner-prev.has { border: 1px solid var(--line-2); }
@media (max-width: 640px) {
  .profile-hero.has-banner .profile-hero-in { padding-top: 120px; }
}

/* =========================================================
   Design pass: consistency fixes
========================================================= */
/* list cards: content always starts right under the posters */
.list-card { align-content: start; grid-template-rows: auto 1fr; }
.list-card-body { align-content: start; }

/* rows that scroll sideways fade out at the edge, so it's clear there's more */
.strip, .cast-row, .seg, .settings-nav {
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
          mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
}
@media (min-width: 861px) { .settings-nav { -webkit-mask-image: none; mask-image: none; } }
.seg.two, .seg.three { -webkit-mask-image: none; mask-image: none; }
.strip, .cast-row { padding-right: 36px; }

/* empty banner placeholder: compact instead of a huge empty box */
.banner-prev:not(.has) { aspect-ratio: auto; min-height: 96px; }

/* posters: same frame everywhere, any cover shape is cropped to 2:3 */
.poster, .item-poster { aspect-ratio: 2 / 3; }
.poster-img { object-position: center top; }
