:root {
  --wall: #2A292E;      /* concrete */
  --wall-2: #201F24;    /* sidebar, panels */
  --wall-3: #37363C;    /* raised controls */
  --line: #4A4850;
  --ink: #000;          /* outlines + hard shadows */
  --chalk: #F4F3EF;     /* text */
  --muted: #B3B0BA;
  --yellow: #FFE14D;    /* spray cans */
  --pink: #FF4FA3;
  --cyan: #3EE0D0;
  --danger: #FF6B5B;

  --tag: 'Sedgwick Ave Display', 'Permanent Marker', cursive;
  --marker: 'Permanent Marker', cursive;
  --body: 'Archivo', system-ui, sans-serif;

  --r: 4px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--chalk);
  font: 500 15px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
  background-color: var(--wall);
  /* concrete grain + a couple of faint overspray clouds */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(40vw 30vw at 95% 0%, rgba(255, 79, 163, .10), transparent 70%),
    radial-gradient(35vw 30vw at 10% 100%, rgba(62, 224, 208, .07), transparent 70%);
  background-attachment: fixed;
}
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: url('doodles.svg') center / cover no-repeat;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
::selection { background: var(--pink); color: var(--ink); }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg .fill { fill: currentColor; stroke: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- buttons: stickers with hard shadows ---------- */

.btn {
  --shadow: var(--ink);
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px;
  border-radius: var(--r); border: 2px solid var(--ink);
  font-weight: 800; white-space: nowrap; text-decoration: none;
  box-shadow: 3px 3px 0 var(--shadow);
  transition: transform .1s, box-shadow .1s, background .15s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--shadow); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shadow); }
.btn-accent { background: var(--yellow); color: var(--ink); --shadow: var(--pink); }
.btn-ghost { background: var(--wall-3); color: var(--chalk); }
.btn-ghost:hover { background: #423F48; }
.btn-danger { background: var(--wall-3); color: var(--danger); }
.btn:disabled { opacity: .45; cursor: default; transform: none; box-shadow: 3px 3px 0 var(--shadow); }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: var(--r);
  background: var(--wall-3); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
}
.icon-btn:hover { background: #423F48; }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); font-weight: 700; text-decoration: underline wavy var(--pink); text-underline-offset: 4px; }
.link-btn:hover { color: var(--chalk); }

/* avatars are die-cut stickers */
.avatar {
  --c: var(--yellow);
  display: inline-grid; place-items: center; flex: none;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--c); color: var(--ink);
  border: 2px solid var(--ink);
  font: 14px/1 var(--marker);
}
.avatar-stack { display: inline-flex; }
.avatar-stack .avatar { width: 24px; height: 24px; font-size: 11px; }
.avatar-stack .avatar + .avatar { margin-left: -7px; }

/* ---------- who's watching ---------- */

.who {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 16px;
}
.who-title {
  font: 400 clamp(52px, 10vw, 112px)/1 var(--tag);
  color: var(--yellow);
  text-shadow: 3px 3px 0 var(--ink), 7px 7px 0 var(--pink);
  rotate: -3deg;
  margin: 0 0 56px;
  text-align: center;
}
.who-grid {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 32px;
  max-width: 780px;
}
.who-grid li:nth-child(3n+1) .avatar { rotate: -6deg; }
.who-grid li:nth-child(3n+2) .avatar { rotate: 5deg; }
.who-grid li:nth-child(3n) .avatar { rotate: -2deg; }
.who-user {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  width: 124px; background: none; border: 0; padding: 0;
  color: var(--chalk);
}
.who-user .avatar {
  width: 108px; height: 108px; font-size: 52px;
  border-width: 4px;
  box-shadow: 0 0 0 5px var(--chalk), 6px 8px 0 5px var(--ink);
  transition: transform .15s var(--ease), rotate .15s var(--ease);
}
.who-user:hover .avatar, .who-user:focus-visible .avatar { transform: scale(1.06); rotate: 0deg; }
.who-user:focus-visible { outline: none; }
.who-user:focus-visible .name { outline: 3px solid var(--cyan); outline-offset: 3px; }
.who-user .name { font: 20px/1.2 var(--marker); }
.who-add .avatar { background: transparent; border: 4px dashed var(--muted); box-shadow: none; color: var(--muted); }
.who-add:hover .avatar { border-color: var(--yellow); color: var(--yellow); }
.who-add .avatar svg { width: 40px; height: 40px; stroke-width: 3; }
.who-add .name { color: var(--muted); }
.who-new { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 48px; }
.who-new input, .field input {
  height: 46px; padding: 0 16px; min-width: 260px;
  border-radius: var(--r); border: 2px solid var(--ink); background: var(--chalk); color: var(--ink);
  font-weight: 600;
  box-shadow: 3px 3px 0 var(--ink);
}
.who-new input::placeholder, .field input::placeholder { color: #75727C; }
.who-new input:focus, .field input:focus { outline: none; box-shadow: 3px 3px 0 var(--cyan); }
.who-new .btn { height: 46px; }
.form-error { color: var(--danger); font-weight: 700; min-height: 1.5em; margin: 14px 0 0; }

/* ---------- layout ---------- */

.app { display: grid; grid-template-columns: 276px 1fr; min-height: 100%; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 20px;
  padding: 22px 16px 16px;
  background: var(--wall-2);
  border-right: 3px solid var(--ink);
}
.brand {
  display: block; padding: 0 6px;
  font: 400 34px/1 var(--tag);
  color: var(--yellow);
  text-shadow: 2px 2px 0 var(--ink), 4px 4px 0 var(--pink);
  rotate: -3deg;
  white-space: nowrap;
}
.brand-mark { display: none; }

.nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 0 1 auto; max-height: 45vh; margin: 0 -6px; padding: 4px 6px; }
.nav-heading { font: 17px/1 var(--marker); color: var(--cyan); padding: 18px 10px 8px; rotate: -1deg; }
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 10px; border: 0; border-radius: var(--r);
  background: transparent; text-align: left; font-weight: 700;
}
.nav-item:hover { background: var(--wall-3); }
/* current list: a fat highlighter swipe */
.nav-item[aria-current='true'] { background: var(--yellow); color: var(--ink); rotate: -1deg; box-shadow: 3px 3px 0 var(--pink); }
.nav-item .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item .num {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  display: inline-grid; place-items: center;
  background: var(--pink); color: var(--ink); font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.nav-item .num:empty { display: none; }
.nav-item[aria-current='true'] .num { background: var(--ink); color: var(--yellow); }
.nav-empty { color: var(--muted); font-size: 14px; padding: 2px 10px; margin: 0; }
.new-list-btn { justify-content: center; }
.me { display: flex; align-items: center; gap: 10px; padding: 14px 6px 0; border-top: 2px dashed var(--line); }
.me-name { flex: 1; font: 17px/1.2 var(--marker); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { min-width: 0; padding: 36px clamp(16px, 4vw, 52px) 72px; }

.list-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 28px; }
.menu-btn { display: none; }
.list-title-wrap { flex: 1; min-width: 0; }
.list-title {
  position: relative; display: inline-block;
  margin: 0; padding-bottom: 14px;
  font: 400 clamp(38px, 5.5vw, 64px)/1.05 var(--marker);
  overflow-wrap: anywhere;
}
/* spray-painted underline with drips */
.list-title::after {
  content: ''; position: absolute; left: -4px; right: -10px; bottom: -10px; height: 26px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 26' preserveAspectRatio='none'%3E%3Cg fill='none' stroke='%23FF4FA3' stroke-linecap='round'%3E%3Cpath d='M4 8 C60 3 140 11 200 6 S280 5 296 8' stroke-width='7'/%3E%3Cpath d='M58 9 v9M141 10 v13M233 7 v7' stroke-width='3'/%3E%3C/g%3E%3Cg fill='%23FF4FA3'%3E%3Ccircle cx='58' cy='19' r='2.6'/%3E%3Ccircle cx='141' cy='24' r='2.8'/%3E%3Ccircle cx='233' cy='15' r='2.4'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / 100% 100%;
  pointer-events: none;
}
.list-people { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 20px; color: var(--muted); font-weight: 600; }
.person-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 3px 12px 3px 3px;
  border-radius: 999px; background: var(--wall-3); border: 2px solid var(--ink); color: var(--chalk); font-weight: 700;
}
.person-chip .avatar { width: 24px; height: 24px; font-size: 12px; }
.add-people {
  display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 12px;
  border-radius: 999px; border: 2px dashed var(--muted); background: none; color: var(--muted); font-weight: 700; font-size: 14px;
}
.add-people:hover { color: var(--yellow); border-color: var(--yellow); }
.add-people svg { width: 14px; height: 14px; }
.list-actions { display: flex; gap: 8px; position: relative; }

.menu {
  position: absolute; right: 0; top: 48px; z-index: 20;
  min-width: 190px; padding: 6px;
  background: var(--wall-3); border: 2px solid var(--ink); border-radius: var(--r);
  box-shadow: 4px 4px 0 var(--ink);
}
.menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; border-radius: 3px; background: none; font-weight: 700; }
.menu button:hover { background: var(--yellow); color: var(--ink); }
.menu .danger { color: var(--danger); }
.menu .danger:hover { background: var(--danger); color: var(--ink); }

/* ---------- search ---------- */

.search { position: relative; margin-bottom: 30px; max-width: 740px; }
.search-icon { position: absolute; left: 18px; top: 50%; translate: 0 -50%; color: #5E5B66; pointer-events: none; width: 20px; height: 20px; }
.search input {
  width: 100%; height: 56px; padding: 0 52px 0 52px;
  border-radius: var(--r); border: 3px solid var(--ink);
  background: var(--chalk); color: var(--ink);
  font-size: 17px; font-weight: 600;
  box-shadow: 5px 5px 0 var(--cyan);
  transition: box-shadow .12s;
}
.search input::placeholder { color: #75727C; font-weight: 500; }
.search input:focus { outline: none; box-shadow: 5px 5px 0 var(--pink); }
.search input::-webkit-search-cancel-button { display: none; }
.search-kbd {
  position: absolute; right: 16px; top: 50%; translate: 0 -50%;
  display: grid; place-items: center; width: 26px; height: 26px;
  border: 2px solid #5E5B66; border-radius: 4px; color: #5E5B66; font: 700 13px var(--body);
}
.search input:focus ~ .search-kbd { display: none; }
.search-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 12px); z-index: 30;
  max-height: min(70vh, 580px); overflow-y: auto;
  padding: 6px;
  background: var(--wall-2); border: 3px solid var(--ink); border-radius: var(--r);
  box-shadow: 6px 6px 0 var(--ink);
}
.result { display: flex; align-items: center; gap: 14px; padding: 8px; border-radius: 3px; }
.result:hover, .result.active { background: var(--wall-3); }
.result-poster { width: 46px; aspect-ratio: 2/3; border-radius: 2px; object-fit: cover; background: var(--wall-3); border: 2px solid var(--ink); flex: none; }
.result-body { flex: 1; min-width: 0; }
.result-title { font-weight: 800; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-meta { color: var(--muted); font-size: 13px; font-weight: 600; display: flex; gap: 10px; }
.result-stars { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result .btn { height: 34px; padding: 0 12px; font-size: 14px; }
.result .on-list { color: var(--cyan); font: 15px var(--marker); padding: 0 8px; display: inline-flex; align-items: center; gap: 6px; }
.search-note { color: var(--muted); padding: 18px; margin: 0; text-align: center; font-weight: 600; }

/* ---------- toolbar ---------- */

.toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 36px; }
.toolbar-right { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.seg { display: inline-flex; padding: 3px; gap: 3px; border-radius: var(--r); background: var(--wall-2); border: 2px solid var(--ink); }
.seg button {
  height: 34px; padding: 0 14px; border: 0; border-radius: 3px; background: none;
  color: var(--muted); font-weight: 800;
}
.seg button:hover { color: var(--chalk); }
.seg button[aria-pressed='true'], .seg button[aria-selected='true'] { background: var(--chalk); color: var(--ink); }
#tabs button[aria-selected='true'] { background: var(--yellow); }
.seg .count { font-weight: 600; opacity: .75; font-variant-numeric: tabular-nums; margin-left: 2px; }
.seg-small button { height: 30px; padding: 0 11px; font-size: 14px; }
.select select {
  height: 40px; padding: 0 34px 0 12px; border-radius: var(--r);
  border: 2px solid var(--ink); background-color: var(--wall-2); font-weight: 700;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23B3B0BA' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 14px;
}
.pick-btn { height: 42px; background: var(--pink); --shadow: var(--yellow); font-size: 15px; }
.pick-btn:hover { background: #FF6BB3; }

/* ---------- poster wall ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 40px 26px;
}
.card { position: relative; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card-open {
  all: unset; cursor: pointer; display: block; position: relative;
  rotate: var(--tilt, 0deg);
  transition: rotate .2s var(--ease), transform .2s var(--ease);
}
.card-open:focus-visible { outline: 3px solid var(--cyan); outline-offset: 5px; }
.card:hover .card-open { rotate: 0deg; transform: translateY(-4px) scale(1.02); }
/* masking tape holding the poster up */
.tape {
  position: absolute; z-index: 2; top: -11px; left: 50%; width: 74px; height: 22px;
  translate: -50% 0; rotate: var(--tape, -4deg);
  background: rgba(235, 226, 196, .82);
  clip-path: polygon(3% 0, 97% 4%, 100% 30%, 96% 55%, 100% 80%, 97% 100%, 2% 96%, 0 70%, 4% 45%, 0 20%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}
.poster {
  position: relative; aspect-ratio: 2/3; overflow: hidden;
  background: var(--wall-3);
  border: 3px solid var(--chalk);
  box-shadow: 6px 7px 0 var(--ink);
}
.poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poster-fallback {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 16px;
  font: 22px/1.1 var(--marker); text-align: center; color: var(--chalk);
  background: var(--pink);
}
.rating {
  position: absolute; left: 6px; bottom: 6px;
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 9px; border-radius: 999px;
  background: var(--yellow); color: var(--ink); border: 2px solid var(--ink);
  font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums;
  rotate: -4deg;
}
.rating svg { width: 12px; height: 12px; fill: var(--ink); stroke: none; }
.added-by { position: absolute; right: 6px; top: 8px; }
.added-by .avatar { width: 28px; height: 28px; font-size: 13px; rotate: 8deg; box-shadow: 0 0 0 2px var(--chalk); }
.card-actions { display: flex; }
.quick-watch-btn {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 10px;
  border-radius: var(--r); border: 2px solid var(--ink); background: var(--wall-3);
  font-weight: 800; font-size: 13px;
  box-shadow: 2px 2px 0 var(--ink);
  opacity: 0; transition: opacity .15s, background .15s;
}
.quick-watch-btn svg { width: 15px; height: 15px; }
.quick-watch-btn:hover { background: var(--cyan); color: var(--ink); }
.card:hover .quick-watch-btn, .quick-watch-btn:focus-visible { opacity: 1; }
@media (hover: none) { .card-actions { display: none; } }

.card-title { font-weight: 800; font-size: 16px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { color: var(--muted); font-size: 13px; font-weight: 600; display: flex; gap: 8px; margin-top: 3px; }

.card.watched .poster img { filter: grayscale(1) contrast(1.1) brightness(.55); }
/* spray-painted verdict */
.stub {
  position: absolute; left: 50%; top: 44%; translate: -50% -50%; rotate: -14deg;
  font: 34px/1 var(--marker); white-space: nowrap;
  color: var(--pink);
  text-shadow: 0 0 8px rgba(255, 79, 163, .55), 2px 2px 0 var(--ink);
}

.card.fresh .card-open { animation: slap .45s var(--ease); }
@keyframes slap { from { transform: scale(1.25) rotate(8deg); opacity: 0; } }

.empty {
  grid-column: 1 / -1;
  padding: 72px 16px; text-align: center; color: var(--muted); font-weight: 600;
  border: 3px dashed var(--line); border-radius: var(--r);
}
.empty strong { display: block; color: var(--yellow); font: 32px/1.15 var(--marker); margin-bottom: 8px; rotate: -2deg; }
.empty p { margin: 0 auto; max-width: 42ch; }

/* ---------- drawer ---------- */

.drawer, .modal { position: fixed; inset: 0; z-index: 50; }
.drawer-scrim, .modal-scrim, .scrim { position: absolute; inset: 0; background: rgba(10, 10, 12, .7); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.drawer-panel {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: min(500px, 100%); overflow-y: auto;
  background: var(--wall-2); border-left: 4px solid var(--ink);
  animation: slide-in .28s var(--ease);
}
@keyframes slide-in { from { transform: translateX(48px); opacity: 0; } }
.drawer-hero { position: relative; padding: 28px 24px 0; }
.drawer-backdrop {
  position: absolute; inset: 0 0 -40px; overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 30%, transparent);
          mask-image: linear-gradient(#000 30%, transparent);
}
.drawer-backdrop img { width: 100%; height: 100%; object-fit: cover; filter: blur(28px) saturate(1.4); opacity: .45; transform: scale(1.2); }
.drawer-close { position: absolute; right: 16px; top: 16px; z-index: 2; }
.drawer-top { position: relative; display: flex; gap: 20px; align-items: flex-end; }
.drawer-poster { width: 136px; aspect-ratio: 2/3; object-fit: cover; background: var(--wall-3); border: 3px solid var(--chalk); box-shadow: 6px 7px 0 var(--ink); rotate: -2deg; flex: none; }
.drawer-title { font: 400 32px/1.1 var(--marker); margin: 0 0 8px; overflow-wrap: anywhere; }
.drawer-meta { color: var(--muted); font-size: 14px; font-weight: 700; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.drawer-body { padding: 28px 24px; position: relative; }
.drawer-rating { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.drawer-rating .big {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 14px; border-radius: 999px; border: 3px solid var(--ink);
  background: var(--yellow); color: var(--ink); font: 800 26px/1.1 var(--body);
  box-shadow: 3px 3px 0 var(--pink); rotate: -3deg;
}
.drawer-rating svg { width: 20px; height: 20px; fill: var(--ink); stroke: none; }
.drawer-rating .votes { color: var(--muted); font-size: 14px; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip { padding: 3px 12px; border-radius: 999px; border: 2px solid var(--ink); background: var(--cyan); color: var(--ink); font-size: 13px; font-weight: 800; }
.chip:nth-child(3n+2) { background: var(--pink); rotate: 2deg; }
.chip:nth-child(3n) { background: var(--chalk); rotate: -2deg; }
.plot { font-size: 16px; line-height: 1.65; font-weight: 500; margin: 0 0 22px; max-width: 60ch; }
.credits { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 24px; font-size: 14px; }
.credits dt { color: var(--muted); font-weight: 700; }
.credits dd { margin: 0; font-weight: 600; }
.provenance {
  display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; margin-bottom: 22px;
  border: 2px dashed var(--line); border-radius: var(--r);
  font-size: 14px; color: var(--muted); font-weight: 600;
}
.provenance div { display: flex; align-items: center; gap: 8px; }
.provenance .avatar { width: 24px; height: 24px; font-size: 12px; }
.provenance b { color: var(--chalk); font-weight: 800; }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.drawer-actions .btn-accent { flex: 1 1 100%; justify-content: center; height: 50px; font-size: 17px; }
.also-add { display: flex; align-items: center; gap: 8px; margin-top: 20px; color: var(--muted); font-size: 14px; font-weight: 700; }
.also-add select { height: 36px; font-size: 14px; }

/* ---------- modal ---------- */

.modal { display: grid; place-items: center; padding: 16px; }
.modal-panel {
  position: relative; width: min(470px, 100%); max-height: 90vh; overflow-y: auto;
  padding: 28px; border-radius: var(--r);
  background: var(--wall-2); border: 3px solid var(--ink);
  box-shadow: 8px 8px 0 var(--pink);
  animation: pop .22s var(--ease);
}
@keyframes pop { from { transform: scale(.94) rotate(-1deg); opacity: 0; } }
.modal-panel h2 { font: 400 32px/1.1 var(--marker); color: var(--yellow); margin: 0 0 22px; rotate: -1deg; }
.modal-panel p { font-weight: 500; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.field > span { color: var(--muted); font-size: 14px; font-weight: 700; }
.field input { width: 100%; min-width: 0; }
.pick-people { display: flex; flex-wrap: wrap; gap: 10px; }
.pick-person input { position: absolute; opacity: 0; pointer-events: none; }
.pick-person span {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px 4px 4px;
  border-radius: 999px; border: 2px solid var(--line); cursor: pointer; font-weight: 700;
  transition: background .12s, border-color .12s;
}
.pick-person:hover span { border-color: var(--muted); }
.pick-person input:checked + span { background: var(--yellow); color: var(--ink); border-color: var(--ink); box-shadow: 2px 2px 0 var(--pink); }
.pick-person input:focus-visible + span { outline: 3px solid var(--cyan); outline-offset: 2px; }
.pick-person .avatar { width: 28px; height: 28px; font-size: 13px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 10px; }
.muted { color: var(--muted); }

/* the one showy moment: pick for us */
.pick-panel { text-align: center; width: min(390px, 100%); box-shadow: 8px 8px 0 var(--yellow); }
.reel {
  position: relative; width: 200px; aspect-ratio: 2/3; margin: 8px auto 26px;
  overflow: hidden; background: var(--wall-3);
  border: 3px solid var(--chalk); box-shadow: 7px 8px 0 var(--ink);
}
.reel img { width: 100%; height: 100%; object-fit: cover; display: block; }
.reel.landed { animation: landed .5s var(--ease); rotate: -3deg; box-shadow: 7px 8px 0 var(--pink); }
@keyframes landed { 0% { transform: scale(1.18) rotate(6deg); } }
.pick-title { font: 400 30px/1.1 var(--marker); color: var(--yellow); margin: 0 0 6px; min-height: 1.1em; }
.pick-sub { color: var(--muted); font-weight: 600; margin: 0 0 22px; min-height: 1.5em; }
.pick-panel .modal-actions { justify-content: center; }

/* ---------- toast ---------- */

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 60;
  translate: -50% 24px; rotate: -2deg; opacity: 0; pointer-events: none;
  padding: 10px 18px; border-radius: var(--r);
  background: var(--cyan); color: var(--ink); font-weight: 800;
  border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
  transition: opacity .2s, translate .2s var(--ease);
}
.toast.show { opacity: 1; translate: -50% 0; }
.toast.error { background: var(--danger); }

/* ---------- small screens ---------- */

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 40; width: min(300px, 86vw);
    transform: translateX(-100%); transition: transform .25s var(--ease);
  }
  .app.nav-open .sidebar { transform: none; }
  .scrim { z-index: 35; }
  .menu-btn { display: inline-grid; margin-top: 8px; }
  .main { padding-top: 22px; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar-right { justify-content: space-between; }
  .pick-btn { flex: 1; justify-content: center; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 32px 18px; }
  .search-kbd { display: none; }
  .drawer-poster { width: 108px; }
}
@media (max-width: 480px) {
  .list-head { gap: 12px; }
  .who-grid { gap: 24px; }
  .who-user { width: 100px; }
  .who-user .avatar { width: 88px; height: 88px; font-size: 42px; }
  .who-new input { min-width: 0; width: 100%; }
  .stub { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- wheatpaste collage behind who's watching ---------- */

.collage {
  position: absolute; inset: -40px; z-index: -1;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); align-content: start; gap: 14px;
  opacity: .22; filter: grayscale(.4) contrast(1.1);
  -webkit-mask-image: radial-gradient(ellipse at center, transparent 18%, #000 70%);
          mask-image: radial-gradient(ellipse at center, transparent 18%, #000 70%);
}
.collage img { width: 100%; aspect-ratio: 2/3; object-fit: cover; rotate: var(--r); border: 3px solid var(--chalk); }

/* ---------- recent activity ---------- */

.activity { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
.activity .nav-heading { margin: 0; font-weight: 400; }
.activity-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.activity-item {
  display: flex; align-items: flex-start; gap: 10px; width: 100%;
  padding: 7px 8px; border: 0; border-radius: var(--r); background: none; text-align: left;
  color: var(--muted); font-size: 13px; line-height: 1.4; font-weight: 500;
}
.activity-item:hover { background: var(--wall-3); }
.activity-item .avatar { width: 24px; height: 24px; font-size: 11px; margin-top: 1px; }
.activity-item b { color: var(--chalk); font-weight: 800; }
.activity-item small { display: block; font-size: 12px; opacity: .8; }

/* ---------- stat stickers ---------- */

.stats { display: flex; gap: 12px; align-items: center; padding-top: 6px; }
.stat {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 86px; padding: 8px 12px;
  border: 3px solid var(--ink); border-radius: 10px;
  background: var(--cyan); color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  rotate: 3deg;
}
.stat:nth-child(2) { background: var(--yellow); rotate: -4deg; }
.stat:nth-child(3) { background: var(--pink); rotate: 2deg; }
.stat b { font: 400 28px/1 var(--marker); white-space: nowrap; }
.stat span { font-size: 12px; font-weight: 800; }

/* ---------- popular rail ---------- */

.popular { margin-top: 64px; padding-top: 28px; border-top: 3px dashed var(--line); }
.popular-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.popular-head h2 { margin: 0; font: 400 30px/1.1 var(--marker); color: var(--cyan); rotate: -1deg; }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: 132px; gap: 18px;
  overflow-x: auto; padding: 6px 4px 18px; margin: 0 -4px;
  scroll-snap-type: x proximity; scrollbar-color: var(--line) transparent;
}
.rail-card { display: flex; flex-direction: column; gap: 8px; scroll-snap-align: start; }
.rail-poster { position: relative; aspect-ratio: 2/3; overflow: hidden; border: 2px solid var(--ink); background: var(--wall-3); box-shadow: 4px 4px 0 var(--ink); }
.rail-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rail-poster .rating { font-size: 12px; padding: 2px 7px; }
.rail-title { font-weight: 800; font-size: 14px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-add { height: 32px; padding: 0 10px; font-size: 13px; align-self: flex-start; box-shadow: 2px 2px 0 var(--ink); }
.rail-card .on-list { color: var(--cyan); font: 14px var(--marker); display: inline-flex; align-items: center; gap: 5px; height: 32px; }

@media (max-width: 860px) {
  .list-head { flex-wrap: wrap; }
  .stats { order: 3; flex-basis: 100%; padding-top: 0; }
  .stat { min-width: 0; padding: 6px 10px; }
  .stat b { font-size: 22px; }
}
.rail > .search-note { width: max-content; padding-left: 4px; }
