/* CineFile: a late-night screening room. Bleach-bypass greens and rusty-iron red (after
   Oldboy's grade), a little neon, film grain and faint scanlines, poster-style titles,
   counter-style numbers, and subtitle-style text for the human bits (reasons, notes). */

/* Gurma (Pandeka Studio, licensed through Envato Elements): one style, so it answers every
   weight; otherwise the browser would fake a bold version. */
@font-face {
  font-family: 'Gurma';
  src: url('/fonts/Gurma.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  size-adjust: 122%; /* its capitals run small; this lines it up with the sizes used below */
}

/* Shared, theme-independent tokens. */
:root {
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 10px 30px rgba(0, 0, 0, .45);
  --radius: 10px;
  --display: 'Gurma', 'Arial Narrow', Impact, sans-serif;
  --text: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Share Tech Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --subfont: Arial, 'Helvetica Neue', Helvetica, sans-serif;
  --tabbar: 66px;
  --accent-soft: color-mix(in srgb, var(--accent) 16%, transparent);
  --glow: 0 0 12px color-mix(in srgb, var(--accent) 45%, transparent);
  --sage: var(--accent-2);
  --sand: var(--sub);
  color-scheme: dark;
}

/* Themes: all dark, each with bold retro accents. The picker sets <html data-theme>.
   --accent: buttons, ratings, the one bold colour   --accent-2: counts, chips, labels
   --accent-3: small details    --sub: subtitle text    --bar: chart bars (checked on --card)
   --tint: the colour cast over film backdrops */

/* Hallway: Oldboy's bleach-bypass grade, rusty iron and sickly green. */
:root[data-theme="hallway"], [data-theme="hallway"] {
  --bg: #0a0d0c; --bg-2: #0e1311; --card: #141a17; --card-2: #1a221e; --sunk: #101512;
  --line: #26302b; --line-2: #35423b;
  --ink: #ece6d6; --ink-2: #b8b5a6; --muted: #7e8a82; --slate: #8996a2;
  --accent: #d0583f; --accent-ink: #160b08; --accent-2: #a3c06c; --accent-3: #5cc2b3;
  --sub: #f1ead8; --danger: #e2775f; --tint: #3c5a32; --bar: #d0583f;
}

/* Marquee: an old picture palace, velvet red and bulb gold on midnight blue. */
:root[data-theme="marquee"], [data-theme="marquee"] {
  --bg: #0a0e27; --bg-2: #0e1333; --card: #151b3e; --card-2: #1c2450; --sunk: #0d1230;
  --line: #2a3360; --line-2: #38437a;
  --ink: #f2ead9; --ink-2: #c4bcaa; --muted: #8d93b8; --slate: #8f99b6;
  --accent: #e5383b; --accent-ink: #1a0507; --accent-2: #f0b546; --accent-3: #6fb6e8;
  --sub: #f7e9c6; --danger: #ff6b6b; --tint: #1e2a5a; --bar: #e5383b;
}

/* VHS: an 80s rental store, hot pink and electric cyan on violet black. */
:root[data-theme="vhs"], [data-theme="vhs"] {
  --bg: #12081f; --bg-2: #170b28; --card: #1e1131; --card-2: #28173f; --sunk: #160c26;
  --line: #37224f; --line-2: #482e67;
  --ink: #f3eefc; --ink-2: #c4bad6; --muted: #9a8ab8; --slate: #8b93b5;
  --accent: #f2437f; --accent-ink: #1a0410; --accent-2: #35cbdc; --accent-3: #ffb347;
  --sub: #e9f9ff; --danger: #ff6b8b; --tint: #3a1d5c; --bar: #f2437f;
}

/* Technicolor: 70s print colour, burnt orange and teal on espresso. */
:root[data-theme="technicolor"], [data-theme="technicolor"] {
  --bg: #170d07; --bg-2: #1d110a; --card: #24160d; --card-2: #2e1c11; --sunk: #1b0f08;
  --line: #3f2818; --line-2: #553621;
  --ink: #f4e9d8; --ink-2: #c8b8a2; --muted: #998773; --slate: #8f9aa0;
  --accent: #f26b38; --accent-ink: #1a0a03; --accent-2: #2bb3a7; --accent-3: #e8b84a;
  --sub: #fbefd8; --danger: #ff7a59; --tint: #5a3418; --bar: #e25f2d;
}

/* Drive-in (the default): 50s diner neon, coral and mint on deep teal. */
:root, :root[data-theme="drivein"], [data-theme="drivein"] {
  --bg: #03211e; --bg-2: #052824; --card: #0a302b; --card-2: #0f3b35; --sunk: #062723;
  --line: #194a42; --line-2: #245c52;
  --ink: #eaf6f0; --ink-2: #b3cfc6; --muted: #86aaa1; --slate: #8aa4b0;
  --accent: #ff6f61; --accent-ink: #1c0806; --accent-2: #6ee7c5; --accent-3: #ffd166;
  --sub: #effaf5; --danger: #ff8577; --tint: #0f3d38; --bar: #ef5a4c;
}

/* Noir: black and white, one blood red, a little antique gold. */
:root[data-theme="noir"], [data-theme="noir"] {
  --bg: #0b0b0b; --bg-2: #101010; --card: #171717; --card-2: #1f1f1f; --sunk: #121212;
  --line: #2a2a2a; --line-2: #3a3a3a;
  --ink: #efefea; --ink-2: #bdbdb6; --muted: #8a8a84; --slate: #9a9a9a;
  --accent: #d72638; --accent-ink: #160306; --accent-2: #c9a44c; --accent-3: #9fb3c8;
  --sub: #ffffff; --danger: #ff5a5f; --tint: #222222; --bar: #d72638;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, color-mix(in srgb, var(--accent-2) 13%, transparent), transparent 70%),
    radial-gradient(ellipse 60% 40% at 100% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%),
    var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--text);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom));
  overflow-x: clip;
}
/* Film grain and faint scanlines over everything; they never catch taps. */
body::before, body::after { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 60; }
body::before {
  opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body::after {
  background:
    repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, .16) 2px 3px),
    radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, .35));
  opacity: .4;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; }
::selection { background: var(--accent); color: var(--accent-ink); }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: .01em; line-height: 1; margin: 0; text-transform: uppercase; }
h1 {
  font-size: clamp(2.7rem, 11vw, 3.9rem); font-weight: 900;
  /* a hint of VHS colour fringing */
  text-shadow: -1px 0 color-mix(in srgb, var(--accent) 55%, transparent), 1px 0 color-mix(in srgb, var(--accent-3) 35%, transparent);
}
h2 { font-size: 1.45rem; }
h3 { font-size: 1.15rem; }
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mono { font-family: var(--mono); font-size: 0.84rem; letter-spacing: 0.036em; text-transform: uppercase; line-height: 1; }

/* Subtitle text: light, with a thin black outline, like an old DVD. */
.subtitle, .pick-reason span, .watch .note, .taste-summary span, #toast span, .shelf .why, .overview.tagline i, .tc-sub {
  font-family: var(--subfont); font-weight: 700; color: var(--sub); letter-spacing: .005em;
  text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 0 2px 6px rgba(0, 0, 0, .7);
}

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

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: 12px 16px 14px; padding-top: max(12px, env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
/* Film-strip sprocket holes under the header */
.topbar::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 7px;
  background:
    linear-gradient(var(--line), var(--line)) top / 100% 1px no-repeat,
    radial-gradient(ellipse 4px 2.2px at 50% 55%, color-mix(in srgb, var(--ink) 16%, transparent) 98%, transparent) 0 0 / 16px 7px repeat-x;
}
.wordmark { display: flex; align-items: baseline; gap: 8px; text-decoration: none; }
.wordmark svg { width: 24px; height: 24px; align-self: center; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent) 50%, transparent)); }
.wm { font-family: var(--display); font-weight: 900; font-size: 1.55rem; letter-spacing: .06em; line-height: 1; text-transform: uppercase; }
.wm i { font-style: normal; color: var(--accent); text-shadow: 0 0 10px color-mix(in srgb, var(--accent) 65%, transparent), 0 0 2px color-mix(in srgb, var(--accent) 60%, transparent); }
.topnav { display: none; margin-left: auto; gap: 2px; align-items: center; }
.topnav a {
  text-decoration: none; padding: 8px 14px; border-radius: 6px; color: var(--ink-2);
  font-family: var(--mono); font-size: 1.0rem; letter-spacing: 0.048em; text-transform: uppercase; line-height: 1;
}
.topnav a:hover { color: var(--ink); background: var(--card); }
.topnav a[aria-current="page"] { color: var(--accent); text-shadow: 0 0 10px color-mix(in srgb, var(--accent) 60%, transparent); }
.topnav a[aria-current="page"]::before { content: '▸ '; }
.topnav a.add { background: var(--accent); color: var(--accent-ink); margin-left: 8px; box-shadow: var(--glow); }
.topnav a.add:hover { filter: brightness(1.08); }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none;
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.048em; text-transform: uppercase; line-height: 1; color: var(--muted);
}
.tabbar a[aria-current="page"] { color: var(--accent); text-shadow: 0 0 8px color-mix(in srgb, var(--accent) 55%, transparent); }
.tabbar a[aria-current="page"] .icon { filter: drop-shadow(0 0 4px color-mix(in srgb, var(--accent) 60%, transparent)); }
.tabbar .add-dot {
  width: 46px; height: 46px; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; box-shadow: var(--glow), 0 0 0 4px var(--bg);
}
.tabbar .add-dot .icon { stroke-width: 2.6; }

main { max-width: 1080px; margin: 0 auto; padding: 14px 16px 40px; position: relative; }
.page-head { display: flex; align-items: flex-end; gap: 12px; margin: 10px 0 18px; }
.page-head .count {
  margin-left: auto; white-space: nowrap; font-family: var(--mono); font-size: 1.0rem; letter-spacing: 0.048em;
  color: var(--accent-2); text-transform: uppercase; line-height: 1; padding-bottom: 4px;
}

@media (min-width: 760px) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .topnav { display: flex; }
  .topbar { padding: 16px 24px 18px; }
  main { padding: 18px 24px 56px; }
}

/* ---------- buttons, chips, fields ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 8px; border: 1px solid var(--line-2);
  background: var(--card); color: var(--ink); font-weight: 600; cursor: pointer; text-decoration: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.btn:hover { border-color: var(--ink-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: var(--glow); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.quiet { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.quiet:hover { color: var(--ink); }
.btn.danger { color: var(--danger); }
.btn.small { min-height: 36px; padding: 0 12px; font-size: .9rem; border-radius: 7px; }
.btn[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 25%, transparent); }
.btn[aria-pressed="true"]:not(.dislike) .icon { fill: currentColor; }
.btn[aria-pressed="true"].dislike { background: color-mix(in srgb, var(--slate) 14%, transparent); border-color: var(--slate); color: var(--slate); box-shadow: none; }
.btn:disabled { opacity: .45; cursor: default; box-shadow: none; }
.iconbtn { width: 40px; height: 40px; border-radius: 8px; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--ink-2); }
.iconbtn:hover { background: var(--card-2); color: var(--ink); }
.linkbtn { border: 0; background: none; padding: 0; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: inherit; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 12px; margin: 0 -16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 13px; border-radius: 6px; border: 1px solid var(--line-2);
  background: var(--card); color: var(--ink-2); font-size: .88rem; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.chip:hover { color: var(--ink); border-color: var(--muted); }
.chip .icon { width: 16px; height: 16px; }
.chip.on, .chip[aria-pressed="true"] {
  border-color: var(--accent-2); color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 10%, transparent); box-shadow: 0 0 10px color-mix(in srgb, var(--accent-2) 18%, transparent);
}
.chip select { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.chip .caret { width: 0; height: 0; border: 4px solid transparent; border-top-color: currentColor; margin-top: 4px; opacity: .7; }

.field { display: grid; gap: 6px; margin: 0 0 16px; }
.field > span { font-family: var(--mono); font-size: 0.84rem; letter-spacing: 0.048em; text-transform: uppercase; color: var(--muted); line-height: 1; }
.input, textarea.input {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--sunk); outline: none; color: var(--ink);
}
.input::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
.input:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-2) 15%, transparent); }
textarea.input { min-height: 80px; resize: vertical; line-height: 1.4; }
input[type="date"].input { color-scheme: dark; }

/* ---------- posters and stamps ---------- */

.poster {
  width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; background: var(--card-2);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 7%, transparent);
}
.poster-drawn {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; padding: 12%;
  background:
    repeating-linear-gradient(to bottom, transparent 0 3px, rgba(0, 0, 0, .18) 3px 4px),
    linear-gradient(160deg, hsl(var(--h) 30% 30%), hsl(calc(var(--h) + 40) 35% 12%));
  color: var(--ink); overflow: hidden;
}
.poster-drawn-title { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: clamp(.85rem, 2.6vw, 1.15rem); line-height: 1; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.poster-drawn-year { font-family: var(--mono); font-size: 0.76rem; color: var(--accent-2); }

/* Rating stamps glow like a neon ring. */
.stamp {
  --c: var(--accent);
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  font-family: var(--display); font-weight: 800; font-size: 1.2rem; line-height: 1; font-variant-numeric: lining-nums;
  color: var(--c); background: color-mix(in srgb, var(--bg) 88%, transparent); border: 1.5px solid var(--c);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .55), 0 0 12px color-mix(in srgb, var(--c) 45%, transparent), inset 0 0 8px color-mix(in srgb, var(--c) 25%, transparent);
  text-shadow: 0 0 8px color-mix(in srgb, var(--c) 70%, transparent);
  transform: rotate(-6deg);
}
.stamp-top { --c: var(--accent); }
.stamp-good { --c: var(--accent-2); }
.stamp-mid { --c: var(--sub); }
.stamp-low { --c: var(--slate); }
.stamp.big { width: 66px; height: 66px; font-size: 2rem; border-width: 2px; }
.stamp.dec { font-size: .92rem; letter-spacing: -.02em; }
.stamp.big.dec { font-size: 1.55rem; }

/* ---------- film grid ---------- */

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 12px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 30px 18px; } }
.card { text-decoration: none; display: grid; gap: 8px; min-width: 0; }
.card-art { position: relative; }
.card-art .poster { transition: transform .18s ease, box-shadow .18s ease; }
.card:hover .poster { transform: translateY(-3px); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent), 0 8px 24px rgba(0, 0, 0, .5), 0 0 18px color-mix(in srgb, var(--accent) 20%, transparent); }
.card-art .stamp { position: absolute; right: -6px; bottom: -10px; width: 34px; height: 34px; font-size: 1rem; }
.card-art .stamp.dec { font-size: .78rem; }
.card-flag { position: absolute; left: 6px; top: 6px; width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 82%, transparent); }
.card-flag .icon { width: 16px; height: 16px; }
.card-flag.fav { color: var(--accent); }
.card-flag.fav .icon { fill: var(--accent); filter: drop-shadow(0 0 4px color-mix(in srgb, var(--accent) 80%, transparent)); }
.card-flag.meh { color: var(--slate); }
.card-flag.list { color: var(--accent-2); }
.card-title { font-weight: 600; font-size: .9rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding-right: 22px; }
.card-sub {
  font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.024em; line-height: 1; text-transform: uppercase;
  color: var(--muted); margin-top: -4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.notice {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 0 0 16px;
  background: var(--card); border: 1px dashed var(--line-2); border-radius: var(--radius); font-size: .9rem; color: var(--ink-2);
}
.notice .grow { flex: 1; }
.empty { text-align: center; padding: 56px 16px; color: var(--muted); }
.empty h2 { color: var(--sub); font-family: var(--subfont); font-weight: 700; text-transform: none; font-size: 1.15rem; letter-spacing: 0;
  text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000; margin-bottom: 8px; }
.empty h2::before { content: '[ '; }
.empty h2::after { content: ' ]'; }
.empty .btn { margin-top: 16px; }

.skeleton {
  background: linear-gradient(90deg, var(--card), var(--card-2), var(--card)); background-size: 200% 100%;
  animation: shimmer 1.3s infinite linear; border-radius: 4px;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* Film-leader countdown, for slow loads */
@property --sweep { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.leader-wrap { display: grid; justify-items: center; gap: 14px; padding: 40px 0 24px; }
.leader {
  width: 84px; height: 84px; border-radius: 50%; position: relative;
  border: 2px solid color-mix(in srgb, var(--ink) 55%, transparent);
  background:
    conic-gradient(color-mix(in srgb, var(--ink) 16%, transparent) var(--sweep), transparent 0),
    linear-gradient(color-mix(in srgb, var(--ink) 30%, transparent), color-mix(in srgb, var(--ink) 30%, transparent)) center / 1px 100% no-repeat,
    linear-gradient(color-mix(in srgb, var(--ink) 30%, transparent), color-mix(in srgb, var(--ink) 30%, transparent)) center / 100% 1px no-repeat;
  animation: sweep 1s linear infinite;
  box-shadow: 0 0 0 6px var(--bg), 0 0 0 7px color-mix(in srgb, var(--ink) 25%, transparent);
}
.leader::after {
  content: '3'; position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--display); font-weight: 900; font-size: 2.4rem; color: var(--ink);
  animation: count 3s steps(1) infinite;
}
@keyframes sweep { to { --sweep: 360deg; } }
@keyframes count { 0% { content: '3'; } 33.3% { content: '2'; } 66.6% { content: '1'; } }

/* ---------- search ---------- */

.searchbox { position: relative; margin: 4px 0 6px; }
.searchbox .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.searchbox input { padding-left: 44px; min-height: 54px; font-size: 1.05rem; }
.hint { font-size: .82rem; color: var(--muted); margin: 0 0 16px; }
.results { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.result {
  display: grid; grid-template-columns: 64px 1fr; gap: 14px; padding: 10px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line); cursor: pointer; text-align: left; width: 100%;
  text-decoration: none; color: inherit;
}
.result:hover { border-color: var(--line-2); background: var(--card-2); }
.result h3 { font-family: var(--text); font-size: 1rem; font-weight: 650; text-transform: none; letter-spacing: 0; line-height: 1.25; }
.result h3 .year { color: var(--muted); font-weight: 500; font-family: var(--mono); font-size: 0.88rem; }
.result .by { font-size: .82rem; color: var(--ink-2); margin-top: 2px; }
.result .ov { font-size: .8rem; color: var(--muted); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.badge {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; padding: 3px 8px; border-radius: 4px;
  font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.036em; text-transform: uppercase; line-height: 1;
  background: var(--card-2); color: var(--ink-2); border: 1px solid var(--line-2);
}
.badge .icon { width: 14px; height: 14px; }
.badge.watched { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.badge.watchlist { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent-2) 50%, transparent); }

/* Find any film from the watchlist: a result opens the film; Save sits on its right. */
.find { margin: 0 0 14px; }
.find-results:empty { display: none; }
.find-results { margin: 0 0 20px; }
.find-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; font-family: var(--mono); font-size: .9rem; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.find-head span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.find-head .btn { flex: none; gap: 4px; padding: 0 8px; text-transform: none; letter-spacing: 0; font-family: var(--text); white-space: nowrap; }
.find-head .btn .icon { width: 16px; height: 16px; }
.find-row { position: relative; }
.find-row .result { padding-right: 104px; }
.find-row .save { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); }
.find-row .save .icon { width: 16px; height: 16px; }
@media (max-width: 559px) {
  .find-row .result { padding-right: 58px; }
  .find-row .save { right: 8px; width: 42px; height: 42px; min-height: 0; padding: 0; justify-content: center; border-radius: 50%; }
  .find-row .save span { display: none; }
  .find-head { font-size: .8rem; }
}

/* ---------- movie page ---------- */

.backdrop { position: relative; margin: -14px calc(50% - 50vw) 0; height: 230px; overflow: hidden; }
/* A bleach-bypass look: less colour, more contrast, a green cast, and scanlines. */
.backdrop img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 25%;
  filter: saturate(.55) contrast(1.18) brightness(.82);
  -webkit-mask-image: linear-gradient(to bottom, #000 35%, transparent 98%);
  mask-image: linear-gradient(to bottom, #000 35%, transparent 98%);
}
.backdrop::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, .22) 2px 3px),
    linear-gradient(to bottom, color-mix(in srgb, var(--tint) 28%, transparent), color-mix(in srgb, var(--bg) 0%, transparent) 70%);
  mix-blend-mode: multiply;
  -webkit-mask-image: linear-gradient(to bottom, #000 35%, transparent 98%);
  mask-image: linear-gradient(to bottom, #000 35%, transparent 98%);
}
.film { display: grid; grid-template-columns: 112px 1fr; gap: 16px; align-items: end; }
.film.with-backdrop { margin-top: -88px; position: relative; }
.film .poster { box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent), 0 14px 40px rgba(0, 0, 0, .7); }
/* The poster is a button that shows it big (lib.js zoomPoster). */
.poster-zoom { display: block; width: 100%; padding: 0; border: 0; border-radius: 4px; background: none; cursor: zoom-in; }
.poster-zoom .poster { display: block; transition: transform .18s ease; }
.poster-zoom:hover .poster { transform: translateY(-3px); }
dialog.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; padding: 0; border: 0; background: none; overflow: hidden; cursor: zoom-out; }
dialog.lightbox[open] { display: grid; place-items: center; }
dialog.lightbox::backdrop { background: rgba(0, 0, 0, .88); backdrop-filter: blur(6px); animation: fade-in .2s; }
dialog.lightbox img {
  width: min(92vw, calc(88dvh * 2 / 3), 640px); aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px;
  background: var(--card-2) center / cover no-repeat; box-shadow: 0 24px 70px rgba(0, 0, 0, .8); animation: zoom-in .22s ease-out;
}
dialog.lightbox .iconbtn { position: fixed; top: max(14px, env(safe-area-inset-top)); right: 14px; }
@keyframes zoom-in { from { opacity: 0; transform: scale(.94); } }

/* ---------- photos and videos on a watch (public/media.js) ---------- */

.media-thumb { position: relative; display: block; width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: 6px; background: var(--sunk); }
.media-thumb img, .media-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-thumb.video .icon { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; padding: 5px 4px 5px 6px; border-radius: 50%;
  background: rgba(0, 0, 0, .55); color: #fff; fill: #fff; stroke: none; }
/* The sheet's tray: what's on the watch, what's new, and an Add tile. */
.media-tray { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; margin-top: 6px; }
.media-item { position: relative; }
.media-item.new .media-thumb { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-2) 60%, transparent); }
.media-x { position: absolute; top: -6px; right: -6px; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%;
  background: var(--bg); color: var(--ink); box-shadow: 0 0 0 1px var(--line-2); cursor: pointer; }
.media-x .icon { width: 12px; height: 12px; }
.media-add { display: grid; place-content: center; justify-items: center; gap: 4px; aspect-ratio: 1; border-radius: 6px; cursor: pointer;
  border: 1px dashed var(--line-2); color: var(--accent-2); font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
.media-add:hover { border-style: solid; background: color-mix(in srgb, var(--accent-2) 8%, transparent); }
.media-add .icon { width: 22px; height: 22px; }
.media-hint { margin: 8px 0 0; font-size: .8rem; color: var(--muted); }
dialog.sheet.dropping { box-shadow: 0 0 0 3px var(--accent-2), 0 0 30px color-mix(in srgb, var(--accent-2) 35%, transparent); }
/* On a film page and in the feed: a row of small squares that open the viewer. */
.watch-media { display: flex; flex-wrap: wrap; gap: 6px; }
.watch .watch-media { grid-column: 1 / -1; }
.media-open { width: 64px; padding: 0; border: 0; border-radius: 6px; background: none; cursor: zoom-in; }
.media-open:hover .media-thumb { box-shadow: 0 0 0 2px var(--accent-2); }
.feed-text .media-open { width: 54px; }
/* The viewer: a photo or video as big as the screen allows. */
dialog.lightbox.viewer img, dialog.lightbox.viewer video { width: auto; height: auto; max-width: 94vw; max-height: 86dvh; aspect-ratio: auto; object-fit: contain;
  background: #000; border-radius: 6px; cursor: default; }
dialog.lightbox.viewer .step { position: fixed; top: 50%; margin-top: -22px; width: 44px; height: 44px; background: rgba(0, 0, 0, .5); }
dialog.lightbox.viewer .step.prev { left: 12px; }
dialog.lightbox.viewer .step.next { right: 12px; left: auto; top: 50%; }
.viewer-count { position: fixed; bottom: max(16px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: .8rem; color: #fff; opacity: .8; }

/* ---------- the ticket: a watch seen in a theatre ---------- */

.theatre-tag { display: inline-grid; place-items: center; vertical-align: -3px; margin: 0 4px; color: var(--accent-3); }
.theatre-tag .icon { width: 15px; height: 15px; }
small .theatre-tag .icon, .why .theatre-tag .icon { width: 13px; height: 13px; }
.theatre-tag:first-child { margin-left: 0; }
.theatre-chip { margin: -4px 0 14px; }
.theatre-chip[aria-pressed="true"] .icon { color: inherit; }
/* On a calendar frame: a ticket in the top right corner. */
.day-ticket { position: absolute; z-index: 2; top: 4px; right: 4px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 4px;
  background: color-mix(in srgb, var(--bg) 78%, transparent); color: var(--accent-3); }
.day-ticket .icon { width: 13px; height: 13px; }
@media (max-width: 559px) { .day-ticket { top: 2px; right: 2px; width: 15px; height: 15px; } .day-ticket .icon { width: 10px; height: 10px; } }
/* Add many: a ticket per row that's lit when pressed. */
.bulk .b-theatre { width: 46px; text-align: center; }
.bulk th.b-theatre .icon { width: 15px; height: 15px; color: var(--accent-3); vertical-align: -3px; }
.theatre-toggle { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px dashed var(--line-2); border-radius: 6px;
  background: none; color: color-mix(in srgb, var(--muted) 70%, transparent); cursor: pointer; }
.theatre-toggle .icon { width: 18px; height: 18px; }
.theatre-toggle:hover { color: var(--ink-2); border-style: solid; }
.theatre-toggle[aria-pressed="true"] { border: 1px solid var(--accent-3); color: var(--accent-3); background: color-mix(in srgb, var(--accent-3) 14%, transparent);
  box-shadow: 0 0 10px color-mix(in srgb, var(--accent-3) 30%, transparent); }
.theatre-toggle:disabled { cursor: default; opacity: .6; }
.film h1 { font-size: clamp(2.5rem, 10.5vw, 4.4rem); }
.film .orig { font-family: var(--text); font-weight: 500; color: var(--muted); font-size: .95rem; margin-top: 6px; }
.meta { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 10px; font-family: var(--mono); font-size: 0.92rem; letter-spacing: 0.03em; text-transform: uppercase; line-height: 1.1; color: var(--ink-2); }
.meta a { text-decoration: none; border-bottom: 1px dotted var(--muted); }
.meta a:hover { color: var(--ink); border-bottom-color: var(--ink); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 0; }
.tag {
  padding: 4px 10px; border-radius: 4px; background: transparent; border: 1px solid var(--line-2);
  font-family: var(--mono); font-size: 0.84rem; letter-spacing: 0.036em; text-transform: uppercase; line-height: 1.1; color: var(--ink-2); text-decoration: none;
}
a.tag:hover { color: var(--accent-2); border-color: var(--accent-2); box-shadow: 0 0 8px color-mix(in srgb, var(--accent-2) 20%, transparent); }
.overview { font-size: 1rem; line-height: 1.65; color: var(--ink-2); margin: 16px 0 0; max-width: 62ch; }
.overview.tagline { font-size: 1.12rem; }
.overview.tagline i { font-style: normal; }
.people { margin: 18px 0 0; display: grid; gap: 6px; font-size: .92rem; }
.people > div > span { font-family: var(--mono); font-size: 0.84rem; letter-spacing: 0.036em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.people a { font-weight: 600; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-2); }
.people a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.cast { display: flex; gap: 10px; overflow-x: auto; margin: 10px -16px 0; padding: 4px 16px 8px; scrollbar-width: none; list-style: none; }
.cast::-webkit-scrollbar { display: none; }
.cast li { flex: none; width: 132px; }
.cast a { display: block; height: 100%; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; text-decoration: none; }
.cast a:hover { border-color: var(--accent); }
.cast b { display: block; font-size: .86rem; line-height: 1.25; }
.cast span { display: block; font-size: .76rem; color: var(--muted); margin-top: 3px; }
.section-title { font-family: var(--mono); font-size: 0.92rem; letter-spacing: 0.072em; text-transform: uppercase; color: var(--accent-2); margin: 28px 0 8px; line-height: 1; }
.section-title::before { content: '// '; color: var(--muted); }

/* "Your file" is a ticket stub: notches on both sides at the tear line. */
.file-card {
  margin: 22px 0 0; padding: 18px 16px 14px; border-radius: 12px; background: var(--card);
  border: 1px solid var(--line); box-shadow: var(--shadow); position: relative;
}
.file-card .label, .cal-side > .label {
  position: absolute; top: -11px; left: 14px; padding: 4px 10px 3px; border-radius: 4px;
  background: var(--bg); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 25%, transparent); font-family: var(--mono); font-size: 0.84rem; letter-spacing: 0.084em;
}
.file-top { display: flex; align-items: center; gap: 14px; margin-top: 4px; padding-bottom: 16px; border-bottom: 1px dashed var(--line-2); position: relative; }
.file-top::before, .file-top::after {
  content: ''; position: absolute; bottom: -10px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--line);
}
.file-top::before { left: -27px; clip-path: inset(0 0 0 50%); }
.file-top::after { right: -27px; clip-path: inset(0 50% 0 0); }
.file-top .what { flex: 1; min-width: 0; }
.file-top .what b { display: block; font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 1.45rem; line-height: 1; letter-spacing: .02em; }
.file-top .what span { display: block; margin-top: 5px; font-family: var(--mono); font-size: 0.84rem; letter-spacing: 0.03em; text-transform: uppercase; color: var(--muted); line-height: 1; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.reason { margin-top: 10px; font-size: .88rem; color: var(--slate); }
.watches { list-style: none; padding: 0; margin: 14px 0 0; border-top: 1px solid var(--line); }
.watch { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.watch .when { font-family: var(--mono); font-size: 0.96rem; letter-spacing: 0.03em; text-transform: uppercase; line-height: 1; }
.watch .when.unknown { color: var(--muted); }
.watch .note { grid-column: 1 / -1; margin-top: -2px; font-size: .92rem; }
.watch .note.muted { color: var(--muted); font-family: var(--text); font-weight: 400; text-shadow: none; font-size: .82rem; }
.watch .stamp { width: 32px; height: 32px; font-size: .95rem; border-width: 1.5px; box-shadow: 0 0 8px color-mix(in srgb, var(--c) 35%, transparent); }
.watch .stamp.dec { font-size: .75rem; }
.aspect-scores { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 14px; margin: -2px 0 0; }
.aspect-scores div { display: flex; gap: 5px; align-items: baseline; }
.aspect-scores dt { margin: 0; font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.024em; text-transform: uppercase; color: var(--muted); }
.aspect-scores dd { margin: 0; font-family: var(--display); font-weight: 800; font-size: 1rem; color: var(--ink); }
.film-foot { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 26px; font-size: .82rem; color: var(--muted); align-items: baseline; }
.film-foot a { color: var(--muted); }
.film-foot .mono { color: var(--accent); }

.film-body { display: flex; flex-direction: column; }
.film-body > .film-side { order: -1; }
@media (min-width: 760px) {
  .backdrop { margin-top: -18px; height: 400px; }
  .film { grid-template-columns: 220px 1fr; gap: 28px; }
  .film.with-backdrop { margin-top: -160px; }
  .film-body { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 32px; align-items: start; }
  .film-body > .film-side { order: 0; margin-top: 22px; position: sticky; top: 96px; }
  .cast { margin: 10px 0 0; padding: 4px 0 8px; flex-wrap: wrap; overflow: visible; }
}

/* ---------- scores ---------- */

.scores { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.scores.small { margin-top: 6px; gap: 5px; }
.score {
  display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 9px 3px; border-radius: 4px;
  background: color-mix(in srgb, var(--bg) 60%, transparent); border: 1px solid var(--line-2);
  font-family: var(--display); font-weight: 800; font-size: 1.05rem; line-height: 1; color: var(--ink);
}
.scores.small .score { padding: 2px 7px 1px; font-size: .92rem; }
.score b { font-family: var(--mono); font-weight: 400; font-size: 0.8rem; letter-spacing: 0.036em; text-transform: uppercase; color: var(--muted); }
.score small { font-family: var(--mono); font-weight: 400; font-size: 0.76rem; color: var(--muted); }
.score.imdb { border-color: color-mix(in srgb, var(--accent-2) 45%, transparent); }
.score.imdb b { color: var(--accent-2); }
.score.rt.fresh { border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 18%, transparent); }
.score.rt.fresh b { color: var(--accent); }
.score.rt.rotten { border-color: color-mix(in srgb, var(--slate) 50%, transparent); }
.score.rt.rotten b { color: var(--slate); }
.score.tmdb b { color: var(--accent-3); }
.score.rt.main { font-size: 1.3rem; padding: 5px 11px 4px; align-items: center; }
.scores.small .score.rt.main { font-size: 1rem; padding: 2px 8px 1px; }
.score.pop.full { border-color: color-mix(in srgb, var(--accent-3) 45%, transparent); }
.score.pop b { color: var(--accent-3); }
.score .mark, .tomato-badge .mark { width: 1.05em; height: 1.05em; flex: none; align-self: center; }
.score.rt.main .mark { width: 1.15em; height: 1.15em; }
/* On a film's own page the scores are tiles of one size and one look: the name on top, the score
   under it, the mark (if any) to the left. Two across on a phone, four on a wide screen. */
.film-scores { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
@media (min-width: 760px) { .film-scores { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-left: 248px; margin-top: 16px; } }
.film-scores .score:is(.rt, .pop, .imdb, .tmdb) {
  display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; align-items: center; gap: 7px; padding: 11px 12px 10px;
  border-radius: 6px; border-color: var(--line-2); box-shadow: none; font-size: 1rem;
}
.film-scores .score:has(.mark) { grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; }
.film-scores .score:is(.rt, .pop) .mark { grid-row: span 2; width: 30px; height: 30px; }
.film-scores .score b { font-size: .74rem; line-height: 1; }
.film-scores .val { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 7px; }
.film-scores .num { font-size: 1.65rem; line-height: .82; }
.film-scores .score small { font-size: .72rem; line-height: 1.1; }
/* The Tomatometer on a poster's top-right corner. */
.tomato-badge {
  position: absolute; right: 6px; top: 6px; display: inline-flex; align-items: center; gap: 3px; padding: 3px 6px 2px 4px;
  border-radius: 6px; background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: blur(4px);
  font-family: var(--display); font-weight: 800; font-size: .86rem; line-height: 1; color: var(--ink);
}
.tomato-badge.rotten { color: var(--ink-2); }

/* ---------- sheet (log form) ---------- */

dialog.sheet {
  margin: auto auto 0; width: 100%; max-width: 560px; max-height: 92dvh; padding: 0; border: 0;
  border-radius: 16px 16px 0 0; background: var(--bg-2); color: var(--ink);
  box-shadow: 0 -1px 0 var(--line-2), 0 -20px 60px rgba(0, 0, 0, .6);
  animation: sheet-in .22s ease-out;
}
dialog.sheet.closing { animation: sheet-out .16s ease-in forwards; }
dialog.sheet::backdrop { background: rgba(0, 0, 0, .65); animation: fade-in .2s; }
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } }
@keyframes sheet-out { to { transform: translateY(40px); opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }
@media (min-width: 760px) { dialog.sheet { margin: auto; border-radius: 16px; border: 1px solid var(--line-2); } }
.sheet-inner { padding: 8px 18px calc(18px + env(safe-area-inset-bottom)); overflow-y: auto; max-height: 92dvh; }
.sheet-grip { width: 40px; height: 4px; border-radius: 4px; background: var(--line-2); margin: 0 auto 10px; }
.sheet-film { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; margin-bottom: 16px; }
.sheet-film b { display: block; font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 1.4rem; line-height: 1; }
.sheet-film span { display: block; margin-top: 4px; font-family: var(--mono); font-size: 0.84rem; letter-spacing: 0.024em; text-transform: uppercase; color: var(--muted); line-height: 1; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 8px; background: var(--sunk); border: 1px solid var(--line); margin-bottom: 18px; }
.segmented button { min-height: 40px; border: 0; border-radius: 6px; background: transparent; font-weight: 600; color: var(--muted); cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--card-2); color: var(--ink); box-shadow: 0 0 0 1px var(--line-2); }
.date-row { display: flex; gap: 10px; align-items: center; }
.date-row .input { flex: 1; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.feel { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.reasons { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.reasons .chip { height: 32px; font-size: .82rem; }
.sheet-actions { display: flex; gap: 10px; margin-top: 16px; }
.sheet-actions .primary { flex: 1; }
.form-error { color: var(--danger); font-size: .88rem; margin: 8px 0 0; min-height: 1.2em; }
.form-hint { font-family: var(--mono); font-size: 0.88rem; letter-spacing: 0.024em; text-transform: uppercase; line-height: 1.1; color: var(--sub); margin: 6px 0 0; min-height: 1.1em; }

.overall { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; }
.overall-text { flex: 1; min-width: 0; }
.overall-text b { display: block; font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 1.35rem; line-height: 1; }
.overall-text span { display: block; margin-top: 5px; font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.024em; text-transform: uppercase; color: var(--muted); line-height: 1; }
.overall .linkbtn { font-size: .85rem; color: var(--ink-2); white-space: nowrap; }
[data-part="custom"] { margin-bottom: 14px; }
.aspects { display: grid; gap: 14px; margin-bottom: 18px; }
.aspect-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; }
.aspect-head span { font-family: var(--mono); font-size: 0.92rem; letter-spacing: 0.036em; text-transform: uppercase; color: var(--ink-2); line-height: 1; }
.aspect-head b { font-family: var(--display); font-weight: 900; font-size: 1.2rem; color: var(--accent); min-width: 1.5em; text-align: right; text-shadow: 0 0 8px color-mix(in srgb, var(--accent) 50%, transparent); }

/* Popcorn rating (public/popcorn.js): ten kernels per score that pop by quarters, and the
   overall printed on a striped bucket. Popcorn stays popcorn-coloured in every theme. */
.kernels {
  --pop: #fff3d8; --butter: #f0cb7e; --husk: color-mix(in srgb, var(--ink) 18%, var(--bg));
  --kernel: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='8' cy='9' r='5'/%3E%3Ccircle cx='15.5' cy='8' r='5.5'/%3E%3Ccircle cx='12' cy='14.5' r='6'/%3E%3Ccircle cx='18' cy='15' r='4.5'/%3E%3Ccircle cx='6.5' cy='15.5' r='4.5'/%3E%3C/svg%3E");
  display: grid; grid-template-columns: repeat(10, 1fr); padding: 2px 0; border-radius: 8px;
  touch-action: pan-y; cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
}
.kernels:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
.kernels.sliding { cursor: grabbing; }
.kernel { display: grid; justify-items: center; gap: 3px; pointer-events: none; }
.kernel i {
  width: 100%; max-width: 32px; aspect-ratio: 1;
  -webkit-mask: var(--kernel) center / contain no-repeat; mask: var(--kernel) center / contain no-repeat;
  background:
    linear-gradient(90deg, transparent var(--fill, 0%), var(--husk) var(--fill, 0%)),
    radial-gradient(circle at 34% 30%, #fff 0 10%, transparent 34%),
    linear-gradient(var(--pop) 35%, var(--butter));
}
.kernel b { font-family: var(--mono); font-weight: 400; font-size: .7rem; line-height: 1; color: var(--muted); }
.kernel.top { filter: drop-shadow(0 0 7px color-mix(in srgb, var(--butter) 55%, transparent)); }
.kernel.top b { color: var(--accent); }
.kernel.pop i { animation: kernel-pop .38s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes kernel-pop { 0% { transform: scale(.6); } 55% { transform: scale(1.22) rotate(-10deg); } 100% { transform: none; } }
.kernel-hint { margin: 0; font-size: .8rem; line-height: 1.35; color: var(--muted); }
.aspect-head .linkbtn { margin-left: auto; margin-right: 10px; font-size: .8rem; color: var(--muted); }
.custom-overall { margin: -4px 0 16px; padding: 10px 12px 8px; border-radius: 10px; background: var(--sunk); border: 1px dashed var(--line-2); }

.bucket { width: 72px; height: 94px; flex: none; overflow: visible; transform: rotate(-5deg);
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .45)) drop-shadow(0 0 12px color-mix(in srgb, var(--c) 28%, transparent)); }
.bk-heap { fill: #fff3d8; stroke: #d9ad5f; stroke-width: .8; transition: transform .5s cubic-bezier(.3, 1.4, .5, 1); }
.bk-heap circle:nth-child(3n) { fill: #f6dca4; }
.bucket.unrated .bk-heap { opacity: 0; }
.bk-dark { fill: var(--accent); }
.bk-light, .bk-rim { fill: #fff3d8; }
.bk-label { fill: var(--bg); stroke: var(--c); stroke-width: 1.5; }
.bk-score { font-family: var(--display); font-weight: 800; font-size: 23px; fill: var(--c); }
.bk-score.dec { font-size: 18px; }
@media (prefers-reduced-motion: reduce) { .kernel.pop i { animation: none; } .bk-heap { transition: none; } }
.more-aspects { border-top: 1px dashed var(--line-2); padding-top: 10px; }
.more-aspects summary { cursor: pointer; font-family: var(--mono); font-size: 0.92rem; letter-spacing: 0.036em; text-transform: uppercase; color: var(--accent-2); padding: 4px 0; list-style-position: inside; line-height: 1; }
.more-aspects[open] summary { margin-bottom: 12px; }
.more-aspects .aspect + .aspect { margin-top: 12px; }

/* ---------- picks ---------- */

.moods .chip { text-decoration: none; }
.moods .chip[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 30%, transparent); }
.ask { position: relative; margin: 4px 0 14px; }
.ask .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 20px; height: 20px; }
.ask input { padding-left: 42px; }
.looking { margin: 0 0 14px; font-family: var(--mono); font-size: 0.96rem; letter-spacing: 0.03em; text-transform: uppercase; color: var(--muted); line-height: 1.2; }
.looking b { color: var(--accent-2); font-weight: 400; }
.picks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
@media (min-width: 900px) { .picks { grid-template-columns: 1fr 1fr; } }
.pick {
  display: grid; grid-template-columns: 78px 1fr; gap: 13px; padding: 12px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line); transition: opacity .2s, transform .2s, border-color .2s;
}
.pick:hover { border-color: var(--line-2); }
.pick.gone { opacity: 0; transform: translateX(20px); }
.pick-body { min-width: 0; display: flex; flex-direction: column; }
.pick-title { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 1.35rem; line-height: 1; text-decoration: none; letter-spacing: .01em; }
.pick-title:hover { color: var(--accent); }
.pick-meta { font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.024em; text-transform: uppercase; color: var(--muted); margin-top: 5px; line-height: 1.05; }
.pick-reason, .pick-caution { display: block; font-size: .92rem; margin-top: 9px; line-height: 1.35; }
.pick-reason .icon, .pick-caution .icon { display: none; }
.pick-caution span { color: var(--ink-2); font-size: .82rem; font-style: italic; }
.pick-caution span::before { content: '['; }
.pick-caution span::after { content: ']'; }
.pick-caution { margin-top: 4px; }
.pick-actions { display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 10px; }
.pick-actions .btn.small { min-height: 34px; padding: 0 10px; font-size: .84rem; }
.pick-actions .iconbtn { margin-left: auto; width: 36px; height: 36px; }
.pick-actions .icon { width: 18px; height: 18px; }
@media (min-width: 560px) { .pick { grid-template-columns: 96px 1fr; gap: 14px; } }
.section-head { margin: 34px 0 14px; }
.shelf { list-style: none; padding: 6px 16px; margin: -6px -16px 0; display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; }
.shelf::-webkit-scrollbar { display: none; }
.shelf li { flex: none; width: 128px; display: flex; flex-direction: column; }
.shelf a { text-decoration: none; display: grid; gap: 6px; }
.shelf .poster { transition: transform .18s ease, box-shadow .18s ease; }
.shelf a:hover .poster { transform: translateY(-4px) scale(1.03); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent), 0 8px 24px rgba(0, 0, 0, .5), 0 0 18px color-mix(in srgb, var(--accent) 20%, transparent); }
/* Title and reason keep to two lines each and "% alike" sits at the bottom, so it lines up
   across every film in the row. */
.shelf a > b { font-size: .85rem; line-height: 1.25; min-height: 2.5em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shelf .why { font-size: .78rem; margin: 4px 0 8px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shelf .match.small { margin: auto 0 0; align-self: flex-start; }

/* ---------- taste ---------- */

.taste-summary { margin: 0 0 22px; max-width: 52ch; font-size: clamp(1.02rem, 3.4vw, 1.2rem); line-height: 1.55; }
.taste-summary span { display: block; margin-bottom: 4px; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 10px; }
@media (min-width: 760px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 12px; }
.tile b { display: block; font-family: var(--display); font-weight: 800; font-size: 2.7rem; line-height: .9; letter-spacing: .02em; color: var(--accent-2); text-shadow: 0 0 12px color-mix(in srgb, var(--accent-2) 35%, transparent); }
.tile span { display: block; margin-top: 6px; font-family: var(--mono); font-size: 0.84rem; letter-spacing: 0.036em; text-transform: uppercase; color: var(--muted); line-height: 1; }
.taste-block { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-top: 14px; }
.taste-block h2 { font-size: 1.35rem; margin-bottom: 14px; }
.taste-block h2.sub { margin-top: 22px; }
.taste-grid { display: grid; gap: 0 14px; }
@media (min-width: 760px) { .taste-grid { grid-template-columns: 1fr 1fr; align-items: start; } }

/* Bar charts: one colour, thin, rounded only at the data end, with a hover/tap tooltip. */
[data-tip] { position: relative; outline: none; }
[data-tip]:hover::after, [data-tip]:focus-visible::after, [data-tip]:focus::after {
  content: attr(data-tip); position: absolute; z-index: 5; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%);
  white-space: nowrap; padding: 4px 8px; border-radius: 4px; background: var(--ink); color: var(--bg); font-size: .78rem; pointer-events: none;
}
.histogram { display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; height: 150px; align-items: end; border-bottom: 1px solid var(--line-2); padding-top: 18px; }
.col { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.bar-v { width: min(70%, 34px); min-height: 0; background: var(--bar); border-radius: 3px 3px 0 0; cursor: default; box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 30%, transparent); }
.bar-v:hover, .bar-v:focus { filter: brightness(1.12); }
.col-value { font-family: var(--mono); font-size: 0.88rem; color: var(--ink); margin-bottom: 4px; line-height: 1; }
.col-label { position: absolute; bottom: -24px; font-family: var(--mono); font-size: 0.84rem; color: var(--muted); line-height: 1; }
.taste-block:has(.histogram) { padding-bottom: 36px; }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.hbars li { display: grid; grid-template-columns: minmax(84px, 34%) 1fr auto; gap: 10px; align-items: center; font-size: .88rem; }
.hb-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.hb-label a { text-decoration: none; border-bottom: 1px dotted var(--muted); }
.hb-label a:hover { color: var(--accent-2); border-bottom-color: var(--accent-2); }
.hb-track { height: 8px; border-left: 1px solid var(--line-2); }
.bar-h { display: block; height: 100%; min-width: 2px; background: var(--bar); border-radius: 0 3px 3px 0; box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 25%, transparent); }
.hb-value { font-family: var(--display); font-weight: 800; font-size: 1.05rem; color: var(--ink); text-align: right; min-width: 64px; }
.hb-value small { font-family: var(--mono); font-weight: 400; color: var(--muted); margin-left: 6px; font-size: 0.76rem; letter-spacing: 0.018em; }
.people-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 760px) { .people-list { grid-template-columns: 1fr 1fr; } }
.people-list li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: center; }
.people-list .stamp { width: 32px; height: 32px; font-size: .95rem; border-width: 1.5px; }
.people-list b { display: block; font-size: .95rem; }
.people-list b a { text-decoration: none; }
.people-list b a:hover { color: var(--accent); }
.people-list span { font-size: .8rem; color: var(--muted); }
.takes { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 760px) { .takes { grid-template-columns: 1fr 1fr; } }
.takes li { display: grid; grid-template-columns: 54px 1fr; gap: 12px; align-items: center; }
.takes b { display: block; font-size: .95rem; line-height: 1.25; }
.takes span { display: block; font-family: var(--mono); font-size: 0.88rem; letter-spacing: 0.024em; text-transform: uppercase; color: var(--ink-2); margin-top: 3px; line-height: 1; }
.takes span strong { color: var(--accent); font-weight: 400; }
.takes em { display: block; font-size: .82rem; color: var(--sub); font-style: normal; margin-top: 4px; }

/* ---------- calendar ---------- */

/* The log as film: each week is a strip of seven frames with sprocket holes along both edges, a
   day I watched something is its poster, and the year's months are reels. */
.cal-layout { display: grid; gap: 26px; align-items: start; }
@media (min-width: 860px) {
  .cal-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 26px; }
  .cal-side { position: sticky; top: 96px; }
}
.cal { min-width: 0; }
.cal-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin: 0 0 14px; }
.cal-kicker { display: block; margin-bottom: 6px; font-family: var(--mono); font-size: .84rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-2); }
.cal-head h2 { font-size: clamp(2.5rem, 8vw, 3.4rem); line-height: .88; margin: 0; text-shadow: 0 0 24px color-mix(in srgb, var(--accent) 30%, transparent); }
.cal-nav { display: flex; align-items: center; gap: 2px; }
.cal-nav .chip { margin-right: 6px; text-decoration: none; }
.cal-nav a.iconbtn { text-decoration: none; }
.cal-nav .iconbtn.off { opacity: .25; cursor: default; }
.cal-nav .iconbtn.off:hover { background: transparent; }

.cal-grid { display: grid; gap: 3px; }
.cal-weekdays, .cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; padding: 0 9px; }
.weekday { text-align: center; font-family: var(--mono); font-size: .8rem; color: var(--muted); padding: 0 0 5px; text-transform: uppercase; letter-spacing: .08em; line-height: 1; }
.weekday .short, .cal-year .short { display: none; }
/* A week: a strip of film, darker than the page, with a row of sprocket holes top and bottom. */
.cal-week { position: relative; padding: 16px 9px; border-radius: 3px; background: color-mix(in srgb, var(--bg) 50%, #000);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 6%, transparent); }
.cal-week::before, .cal-week::after {
  content: ''; position: absolute; left: 11px; right: 11px; height: 6px; border-radius: 1px; pointer-events: none;
  background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--ink) 15%, transparent) 0 9px, transparent 9px 18px);
}
.cal-week::before { top: 5px; }
.cal-week::after { bottom: 5px; }
.day {
  position: relative; aspect-ratio: 1; border: 0; border-radius: 3px; padding: 0; overflow: hidden; cursor: pointer;
  background: color-mix(in srgb, var(--card-2) 40%, transparent); font: inherit; color: inherit;
  transition: transform .14s ease, box-shadow .14s ease, background-color .14s ease;
}
.day:hover { background: color-mix(in srgb, var(--card-2) 75%, transparent); }
.day.blank { background: transparent; cursor: default; }
.day.future { opacity: .35; background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.day .day-poster, .day-reel { position: absolute; inset: 0; }
.day .day-poster { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; border-radius: 0; aspect-ratio: auto; box-shadow: none; }
/* Two or three films on one day: each gets a slice of the frame. */
.day-reel { display: flex; gap: 2px; background: #000; }
.day-reel .poster { flex: 1; min-width: 0; width: auto; height: 100%; aspect-ratio: auto; object-fit: cover; border-radius: 0; box-shadow: none; }
.day-reel .poster-drawn { display: grid; place-items: center; padding: 1px; }
.day-reel .poster-drawn-title { font-size: .45rem; }
.day-reel .poster-drawn-year { display: none; }
/* A dark wash at the top of a poster, so the date reads over any of them. */
.day.has::after { content: ''; position: absolute; inset: 0 0 auto; height: 45%; background: linear-gradient(to bottom, rgba(0, 0, 0, .7), transparent); pointer-events: none; }
.day.has:hover { z-index: 1; transform: translateY(-2px) scale(1.04); box-shadow: 0 8px 20px rgba(0, 0, 0, .6), 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent); }
.day-num { position: absolute; z-index: 2; top: 6px; left: 7px; font-family: var(--mono); font-size: .86rem; line-height: 1; color: var(--muted); }
.day.has .day-num { top: 5px; left: 6px; font-family: var(--display); font-weight: 800; font-size: 1.25rem; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); }
.day.today { box-shadow: 0 0 0 2px var(--accent), var(--glow); }
.day.today .day-num { color: var(--accent); }
.day.has.today .day-num { color: #fff; }
.day-today { position: absolute; inset: auto 0 7px; font-family: var(--mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.day.selected { box-shadow: 0 0 0 2px var(--accent-2), 0 0 14px color-mix(in srgb, var(--accent-2) 40%, transparent); }
.day .day-stamp { position: absolute; z-index: 2; right: 4px; bottom: 4px; width: 26px; height: 26px; font-size: .8rem; border-width: 1.5px; }
.day-count { position: absolute; z-index: 2; right: 4px; bottom: 4px; padding: 1px 5px 0; border-radius: 3px; background: var(--accent-2); color: var(--bg);
  font-family: var(--mono); font-size: .76rem; line-height: 17px; box-shadow: 0 1px 4px rgba(0, 0, 0, .5); }

/* The year's months as reels: how many films each (tinted by how full), and a way to jump there. */
.cal-year { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; margin-top: 16px; }
.cal-year .mo { display: grid; justify-items: center; gap: 4px; padding: 7px 0 6px; border: 1px dashed var(--line-2); border-radius: 6px; text-decoration: none;
  background: color-mix(in srgb, var(--accent-2) calc(var(--h, 0) * 22%), transparent);
  font-family: var(--mono); font-size: .7rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.cal-year .mo b { font-family: var(--display); font-weight: 800; font-size: 1.2rem; line-height: 1; color: var(--ink-2); }
.cal-year .mo.has b { color: var(--accent-2); }
.cal-year a.mo:hover { border-style: solid; color: var(--ink); }
.cal-year .mo[aria-current] { border: 1px solid var(--accent); box-shadow: var(--glow); color: var(--ink); }
.cal-year .mo[aria-current] b { color: var(--accent); }
.cal-year .mo.future { opacity: .3; }

/* Beside it, the month's (or a day's) films, under a ticket tab like "Your file". */
.cal-side { position: relative; padding: 24px 16px 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.cal-side h3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 1.5rem; margin: 0 0 6px; min-height: 40px; }
.cal-side h3 .iconbtn { width: 36px; height: 36px; flex: none; }
.cal-side > p { margin: 0 0 12px; }
.cal-stats { font-family: var(--mono); font-size: .9rem; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.cal-stats b { color: var(--accent-2); font-weight: 400; }
.day-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.day-list a { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 6px; margin: 0 -6px; border-radius: 8px; text-decoration: none; }
.day-list a:hover { background: var(--card-2); }
.day-list.dated a { grid-template-columns: 34px 40px 1fr auto; }
.day-list .when { display: grid; justify-items: center; font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); line-height: 1.1; }
.day-list .when b { font-size: 1.15rem; font-weight: 400; color: var(--ink); }
/* A day with several films: one date, and a thin line joining that day's films. */
.day-list .when { position: relative; align-self: stretch; align-content: center; }
.day-list .day-continues .when::after, .day-list .same-day .when::before {
  content: ''; position: absolute; left: 50%; width: 2px; margin-left: -1px; background: color-mix(in srgb, var(--accent-2) 55%, transparent); border-radius: 1px;
}
.day-list .day-continues .when::after { top: calc(50% + 20px); bottom: -10px; }
.day-list .same-day .when::before { top: -6px; bottom: 50%; }
.day-list .same-day.day-continues .when::after { top: 50%; }
.cal-side h3 small { font-family: var(--mono); font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-2); margin-left: 6px; }
.day-list b { font-size: .95rem; }
.day-list.dated b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.day-list .note { display: block; font-size: .84rem; color: var(--sub); }
.day-list .stamp { width: 32px; height: 32px; font-size: .95rem; border-width: 1.5px; }
.cal-undated { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: start; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line-2); font-size: .88rem; color: var(--muted); }
.cal-undated .icon { width: 18px; height: 18px; margin-top: 1px; }
.cal-undated p { margin: 0; }
.cal-undated .btn { grid-column: 2; justify-self: start; margin-top: 6px; }
.cal-undated .btn.quiet { min-height: 0; padding: 0; margin: 0; background: none; border: 0; color: var(--accent); font-size: .88rem; text-decoration: underline; text-underline-offset: 3px; }
.cal-undated.loud { border: 1px solid color-mix(in srgb, var(--accent-2) 45%, var(--line)); border-radius: 8px; padding: 14px; background: color-mix(in srgb, var(--accent-2) 7%, transparent); color: var(--ink-2); }
.cal-undated.loud .icon { color: var(--accent-2); }
.cal-undated.loud b { color: var(--ink); font-weight: 600; }

@media (max-width: 559px) {
  .cal-side { padding: 22px 12px 12px; }
  .cal-weekdays, .cal-week { gap: 3px; padding-left: 5px; padding-right: 5px; }
  .cal-week { padding-top: 13px; padding-bottom: 13px; }
  .cal-week::before, .cal-week::after { left: 6px; right: 6px; height: 5px;
    background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--ink) 15%, transparent) 0 6px, transparent 6px 12px); }
  .cal-week::before { top: 4px; }
  .cal-week::after { bottom: 4px; }
  .weekday .long, .cal-year .long { display: none; }
  .weekday .short, .cal-year .short { display: inline; }
  .day { aspect-ratio: 2 / 3; border-radius: 2px; }
  .day-num { top: 4px; left: 4px; font-size: .78rem; }
  .day.has .day-num { top: 3px; left: 4px; font-size: 1rem; }
  .day-today { bottom: 4px; font-size: .5rem; letter-spacing: .04em; }
  .day .day-stamp { width: 20px; height: 20px; font-size: .64rem; right: 2px; bottom: 2px; }
  .day-reel { gap: 1px; }
  .day-count { right: 2px; bottom: 2px; padding: 0 3px; font-size: .66rem; line-height: 14px; }
  .cal-year { gap: 3px; }
  .cal-year .mo { padding: 5px 0 4px; }
  .cal-year .mo b { font-size: 1rem; }
}

/* ---------- person and browse pages ---------- */

.person-head { display: grid; grid-template-columns: 104px 1fr; gap: 16px; align-items: end; margin: 8px 0 18px; }
.person-head .poster { border-radius: 4px; filter: grayscale(.35) contrast(1.1); }
.person-head h1 { font-size: clamp(2.4rem, 10vw, 3.8rem); }
.person-head .meta { margin-top: 8px; }
.person-mine { margin-top: 10px; display: inline-flex; gap: 8px; align-items: center; font-family: var(--mono); font-size: 0.92rem; letter-spacing: 0.03em; text-transform: uppercase; color: var(--accent-2); line-height: 1; }
.bio { color: var(--ink-2); font-size: .95rem; line-height: 1.6; max-width: 70ch; margin: 0 0 8px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.bio.open { -webkit-line-clamp: unset; }
.load-more { display: flex; justify-content: center; margin: 26px 0 0; }

/* ---------- login ---------- */

body[data-page="login"] :is(.tabbar, .topnav, .settings-btn, .friends-btn) { display: none; }
.login .field { text-align: left; }
.login .field small { font-size: .78rem; line-height: 1.3; }
.login :is(.form-error, .login-foot)::after { content: none; }
.login .login-foot { margin-top: 18px; font-size: .84rem; text-transform: none; letter-spacing: 0; font-family: var(--text); }
.login .login-foot a { color: var(--accent-2); }
.login { max-width: 360px; margin: 14vh auto 0; text-align: center; }
.login h1 { margin-bottom: 10px; font-size: 3.4rem; }
.login h1 i { font-style: normal; color: var(--accent); text-shadow: 0 0 14px color-mix(in srgb, var(--accent) 70%, transparent); }
.login p { font-family: var(--mono); font-size: 1.0rem; letter-spacing: 0.036em; text-transform: uppercase; color: var(--muted); margin: 0 0 22px; line-height: 1.1; }
.login p::after { content: '_'; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.login .btn { width: 100%; margin-top: 10px; }

/* ---------- settings ---------- */

.friends-btn { margin-left: auto; color: var(--ink-2); position: relative; }
.settings-btn { color: var(--ink-2); }
:is(.settings-btn, .friends-btn)[aria-current="page"] { color: var(--accent); }
.friends-btn .badge { position: absolute; top: 2px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--accent); color: var(--accent-ink); font: 700 .66rem/16px var(--mono); text-align: center; }
@media (min-width: 760px) { .friends-btn { display: none; } .settings-btn { margin-left: 4px; } }
.settings-block { margin-top: 16px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.settings-block h2 { font-size: 1.35rem; margin-bottom: 4px; }
.settings-block > p { margin: 0 0 14px; color: var(--muted); font-size: .88rem; }
.settings-block .phone-url { font-family: var(--mono); font-size: 1rem; color: var(--accent-2); word-break: break-all; }
.settings-block > p.after { margin: 12px 0 0; }
.settings-block code { font-family: var(--mono); color: var(--ink-2); }
.theme-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 760px) { .theme-grid { grid-template-columns: repeat(3, 1fr); } }
.theme-card {
  display: grid; gap: 0; padding: 0; text-align: left; cursor: pointer; overflow: hidden;
  border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg); color: var(--ink);
}
.theme-card[aria-pressed="true"] { outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: var(--glow); }
.tc-name em { font-style: normal; font-family: var(--mono); font-size: .68rem; letter-spacing: .05em; color: var(--accent-2); margin-left: 6px; vertical-align: 2px; }
.tc-preview { position: relative; padding: 12px 10px 10px; min-height: 112px; background:
  radial-gradient(ellipse 90% 60% at 50% 0%, color-mix(in srgb, var(--accent-2) 12%, transparent), transparent 70%), var(--bg); }
.tc-title { display: block; font-family: var(--display); font-size: 1.5rem; line-height: 1; text-transform: uppercase;
  text-shadow: -1px 0 color-mix(in srgb, var(--accent) 55%, transparent), 1px 0 color-mix(in srgb, var(--accent-3) 35%, transparent); }
.tc-count { display: block; margin-top: 4px; font-family: var(--mono); font-size: .72rem; letter-spacing: .05em; color: var(--accent-2); }
.tc-sub { display: block; margin-top: 8px; font-size: .74rem; line-height: 1.25; }
.tc-stamp { position: absolute; right: 10px; top: 10px; width: 30px; height: 30px; font-size: .9rem; }
.tc-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 10px; }
.tc-btn { white-space: nowrap; padding: 4px 9px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); font-size: .74rem; font-weight: 700; box-shadow: var(--glow); }
.tc-swatches { display: flex; gap: 4px; }
.tc-swatches i { width: 14px; height: 6px; border-radius: 2px; }
.tc-name { padding: 8px 10px 10px; background: var(--card); border-top: 1px solid var(--line); }
.tc-name b { display: block; font-family: var(--display); font-weight: 400; font-size: 1.15rem; line-height: 1; text-transform: uppercase; }
.tc-name span { display: block; margin-top: 3px; font-size: .72rem; color: var(--muted); line-height: 1.3; }

/* ---------- view switch ---------- */

.view-switch { display: flex; padding: 3px; border-radius: 7px; background: var(--sunk); border: 1px solid var(--line); align-self: flex-end; }
.view-switch a { display: grid; place-items: center; width: 36px; height: 30px; border-radius: 5px; color: var(--muted); }
.view-switch a[aria-current="page"] { background: var(--card-2); color: var(--accent); box-shadow: 0 0 0 1px var(--line-2); }
.view-switch .icon { width: 18px; height: 18px; }
.page-head h1 + .view-switch { margin-left: auto; }

/* ---------- toast (a subtitle) & footer ---------- */

#toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 18px); z-index: 50;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none; transition: .2s ease;
  display: flex; gap: 14px; align-items: center; width: max-content; max-width: calc(100% - 32px);
  padding: 8px 14px; border-radius: 4px; background: rgba(0, 0, 0, .72); font-size: 1rem; text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#toast a, #toast button { color: var(--ink); font-weight: 600; white-space: nowrap; border: 0; background: none; cursor: pointer; padding: 0; font-family: var(--mono); font-size: 0.92rem; letter-spacing: 0.036em; text-transform: uppercase; text-decoration: underline; }
@media (min-width: 760px) { #toast { bottom: 28px; } }

/* Where the film data comes from, at the bottom of Settings. */
.credits { margin: 24px 2px 0; font-size: .74rem; line-height: 1.5; color: color-mix(in srgb, var(--muted) 75%, transparent); }
.credits a { color: var(--muted); }

/* ---------- friends ---------- */

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.crumb { display: block; font-family: var(--mono); font-size: .9rem; letter-spacing: .04em; color: var(--accent-2); text-transform: none; margin-bottom: 4px; }
.segmented.compact { display: inline-grid; grid-auto-flow: column; grid-template-columns: none; margin: 0 0 14px; }
.segmented.compact a { padding: 8px 14px; border-radius: 6px; color: var(--muted); font-weight: 600; font-size: .9rem; }
.segmented.compact a[aria-current="true"] { background: var(--card-2); color: var(--ink); box-shadow: 0 0 0 1px var(--line-2); }
.add-friend { display: flex; align-items: center; gap: 8px; margin: 6px 0 18px; }
.add-friend .at { font-family: var(--mono); font-size: 1.2rem; color: var(--accent-2); }
.add-friend .input { flex: 1; min-width: 0; }
.people-rows { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; }
.person-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); }
.settings-block .person-row { background: var(--card-2); }
.avatar { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 50%;
  background: color-mix(in srgb, var(--accent-2) 18%, var(--card-2)); color: var(--accent-2);
  font-family: var(--display); font-size: 1.3rem; text-transform: uppercase; box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent-2) 40%, transparent); }
.who { flex: 1; min-width: 0; display: grid; gap: 3px; color: var(--ink); }
.who b { font-weight: 700; }
.who span { font-family: var(--mono); font-size: .76rem; color: var(--muted); }
.invite-link { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.invite-link code { flex: 1 1 220px; min-width: 0; padding: 8px 10px; border-radius: 6px; background: var(--sunk); border: 1px dashed var(--line-2);
  font-family: var(--mono); font-size: .8rem; color: var(--accent-2); word-break: break-all; }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.feed li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.feed-art { width: 44px; flex: none; }
.feed-art .poster { border-radius: 4px; }
.feed-text { flex: 1; min-width: 0; display: grid; gap: 3px; font-size: .92rem; line-height: 1.35; }
.feed-text a { color: var(--ink); }
.feed-text > span > a:first-child { color: var(--accent-2); }
.feed-text q { color: var(--ink-2); font-style: italic; font-size: .86rem; }
.feed-text small { font-family: var(--mono); font-size: .74rem; color: var(--muted); }
.feed .stamp { flex: none; width: 34px; height: 34px; font-size: 1rem; }
.feed .stamp.dec { font-size: .78rem; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0 0 14px; }
.stat-row div { display: grid; gap: 4px; padding: 10px 8px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); text-align: center; }
.stat-row b { font-family: var(--display); font-weight: 800; font-size: 1.5rem; line-height: 1; color: var(--accent); }
.stat-row span { font-family: var(--mono); font-size: .66rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); line-height: 1.1; }
.splits { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.splits li { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; }
.splits a { color: var(--ink); }
.splits span { font-family: var(--mono); font-size: .8rem; color: var(--muted); white-space: nowrap; }
.friend-takes { margin-top: 14px; }
.friend-takes li { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-top: 1px dashed var(--line-2); }
.friend-takes .avatar { width: 32px; height: 32px; font-size: 1.05rem; }
.friend-takes .who span { font-family: var(--text); font-size: .86rem; color: var(--ink-2); font-style: italic; }
.friend-takes .stamp { width: 32px; height: 32px; font-size: .95rem; flex: none; }
.friend-takes .stamp.dec { font-size: .74rem; }
:is(.who, .segmented.compact a, .avatar, .feed-text a, .splits a) { text-decoration: none; }
.feed-text a:hover, .splits a:hover, .who:hover b { text-decoration: underline; }

/* ---------- friends: photos, taste match, comparing ---------- */

img.avatar { object-fit: cover; background: var(--card-2); }
.avatar.tiny { width: 22px; height: 22px; font-size: .8rem; }
.avatar.big { width: 52px; height: 52px; font-size: 1.7rem; }
.avatar.huge { width: 92px; height: 92px; font-size: 3rem; box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-2) 55%, transparent), 0 0 22px color-mix(in srgb, var(--accent-2) 25%, transparent); }
.friend-takes .avatar { width: 32px; height: 32px; font-size: 1.05rem; }
/* Settings: my photo beside my username. */
.me-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.me-text { min-width: 0; }
.me-text p { margin: 2px 0 10px; color: var(--muted); font-size: .88rem; }
.photo-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.photo-actions .icon { width: 16px; height: 16px; }
/* The heart-marked favourite part of a watch, on film pages and in the feed. */
.fav-part { display: flex; align-items: flex-start; gap: 6px; color: var(--ink-2); font-size: .88rem; line-height: 1.35; }
.fav-part .icon { width: 14px; height: 14px; flex: none; margin-top: 2px; color: var(--accent); }
.watch .fav-part { grid-column: 1 / -1; }

/* Taste match: a ring filled as far as the match goes. */
.match-ring { --p: 0; position: relative; flex: none; display: grid; place-content: center; justify-items: center; width: 58px; height: 58px; border-radius: 50%;
  background: radial-gradient(closest-side, var(--card) 79%, transparent 80% 100%),
    conic-gradient(var(--accent-2) calc(var(--p) * 1%), color-mix(in srgb, var(--ink) 10%, transparent) 0);
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent-2) calc(var(--p) * .3%), transparent); }
.match-ring b { font-family: var(--display); font-weight: 800; font-size: 1.15rem; line-height: 1; color: var(--accent-2); }
.match-ring small { font-family: var(--mono); font-size: .56rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); line-height: 1.2; }
.match-ring.none b { color: var(--muted); }
.match-ring.big { width: 86px; height: 86px; }
.match-ring.big b { font-size: 1.7rem; }
.match-ring.big small { font-size: .66rem; }

/* Friends page: a card per friend with their photo, our match and the last film they logged. */
.friend-cards { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 12px; }
@media (min-width: 760px) { .friend-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.friend-card { display: grid; gap: 12px; padding: 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.friend-top { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.friend-top .who b { font-size: 1.05rem; }
.friend-top:hover .who b { text-decoration: underline; }
.friend-last { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px; margin: 0; border-radius: 8px;
  background: var(--sunk); border: 1px dashed var(--line-2); text-decoration: none; color: var(--ink); }
.friend-last:hover { border-style: solid; }
.friend-last .poster { border-radius: 3px; }
.friend-last-text { display: grid; gap: 3px; min-width: 0; }
.friend-last-text small { font-family: var(--mono); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-2); }
.friend-last-text b { font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.friend-last-text .fav-part span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.friend-last .stamp { width: 34px; height: 34px; font-size: 1rem; }
.friend-last.none { font-size: .88rem; color: var(--muted); display: block; }
.friend-actions { display: flex; flex-wrap: wrap; gap: 6px; }
/* The feed: the friend's photo on the corner of the poster. */
.feed-art { position: relative; }
.feed-art .avatar.tiny { position: absolute; right: -7px; bottom: -6px; box-shadow: 0 0 0 2px var(--bg); }
.feed-text .fav-part { font-size: .84rem; }

/* A person's page. */
.kicker { display: block; margin-bottom: 6px; font-family: var(--mono); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-2); }
.profile-head { display: flex; align-items: center; gap: 18px; margin: 8px 0 18px; }
.profile-name { flex: 1; min-width: 0; }
.profile-name h1 { font-size: clamp(2.2rem, 9vw, 3.6rem); line-height: .9; overflow-wrap: anywhere; }
.profile-facts { margin: 8px 0 0; font-family: var(--mono); font-size: .84rem; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.profile-match { text-decoration: none; }
@media (max-width: 559px) {
  .profile-head { flex-wrap: wrap; gap: 14px; }
  .avatar.huge { width: 72px; height: 72px; font-size: 2.4rem; }
  .profile-match { margin-left: auto; }
}
/* A poster with a rating stamp on its corner, in a shelf. */
.shelf .card-art { display: block; position: relative; }
.shelf .card-art .stamp { right: -4px; bottom: -8px; width: 30px; height: 30px; font-size: .9rem; }
.shelf .card-art .stamp.dec { font-size: .7rem; }
.people-shelf .why { margin-top: 10px; }
/* You and @friend. */
.compare-top { display: flex; align-items: center; gap: 16px; padding: 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.compare-top p { margin: 0; color: var(--ink-2); }
.compare-head { margin: 24px 0 10px; font-family: var(--mono); font-weight: 400; font-size: .9rem; letter-spacing: .07em; text-transform: uppercase; color: var(--accent-2); }
.shelf .pair { display: grid; gap: 2px; margin: 6px 0 0; font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); text-shadow: none; }
.shelf .pair span { display: flex; justify-content: space-between; gap: 6px; margin: 0; font-family: inherit; font-size: inherit; font-weight: 400; color: inherit; text-shadow: none; }
.shelf .pair b { font-family: var(--display); font-size: 1rem; color: var(--ink); }
/* Save a friend's pick to my watchlist without leaving the page. */
.save-pick { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer;
  background: color-mix(in srgb, var(--bg) 82%, transparent); color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
.save-pick .icon { width: 17px; height: 17px; }
.save-pick:hover { color: var(--accent); }
.save-pick.done { background: var(--accent); color: var(--accent-ink); }
/* Lately, side by side: films both of us watched recently are marked. */
.side-by-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.side-name { margin-bottom: 6px; font-family: var(--mono); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.mini-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mini-list a { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 5px; border-radius: 8px; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); }
.mini-list a:hover { border-color: var(--line-2); }
.mini-list .poster { border-radius: 3px; }
.mini-list span { display: grid; gap: 1px; min-width: 0; }
.mini-list b { font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-list small { font-family: var(--mono); font-size: .66rem; color: var(--muted); }
.mini-list .stamp { width: 26px; height: 26px; font-size: .78rem; border-width: 1.5px; }
.mini-list .stamp.dec { font-size: .6rem; }
.mini-list .both a { border-color: color-mix(in srgb, var(--accent-2) 55%, transparent); box-shadow: 0 0 10px color-mix(in srgb, var(--accent-2) 18%, transparent); }

/* ---------- add many (a spreadsheet of watches) ---------- */

.bulk-intro { max-width: 70ch; }
/* Add many is for a computer: its link hides on narrow screens, and the page says why there. */
@media (max-width: 859px) { .desktop-only { display: none !important; } }
.bulk-desktop-note { display: grid; justify-items: start; gap: 6px; max-width: 46ch; padding: 18px; border-radius: 12px; background: var(--card); border: 1px dashed var(--line-2); }
.bulk-desktop-note p { margin: 0 0 10px; color: var(--ink-2); }
.bulk-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 14px; }
.bulk-tools span { font-size: .84rem; color: var(--muted); }
/* position: relative keeps the hidden column label inside the scrolling area, not past the page edge. */
/* The table scrolls inside its own box, both ways, like a spreadsheet: the headings stay at its
   top and the film column at its left. Tall enough to fill the screen under the page's head. */
.bulk-wrap { position: relative; overflow: auto; max-height: calc(100dvh - 395px); min-height: 300px; margin: 4px -16px 0; padding: 0 16px 4px; }
.bulk { width: 100%; min-width: 980px; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); box-shadow: var(--shadow); }
.bulk th { position: sticky; top: 0; z-index: 2; padding: 10px 6px 8px; background: var(--card-2); border-bottom: 1px solid var(--line-2); text-align: left;
  font-family: var(--mono); font-weight: 400; font-size: .7rem; letter-spacing: .07em; text-transform: uppercase; color: var(--accent-2); white-space: nowrap; }
.bulk th.b-score { text-align: center; }
/* The four aspects a first watch needs carry a dot. */
.bulk th.core::after { content: ''; display: inline-block; width: 5px; height: 5px; margin-left: 4px; vertical-align: 2px; border-radius: 50%; background: var(--accent); box-shadow: var(--glow); }
.bulk td { padding: 0; border-bottom: 1px solid var(--line); border-right: 1px solid color-mix(in srgb, var(--line) 70%, transparent); vertical-align: middle; height: 52px; }
.bulk tr:last-child td { border-bottom: 0; }
.bulk td.b-end, .bulk th.b-end { border-right: 0; width: 40px; text-align: center; }
.bulk .b-num { width: 34px; text-align: center; font-family: var(--mono); font-size: .76rem; color: var(--muted); }
.bulk .b-num .icon { width: 16px; height: 16px; color: var(--accent-2); }
.bulk .b-film { width: 250px; min-width: 250px; }
.bulk .b-date { width: 140px; }
.bulk .b-score { width: 66px; }
/* The film column stays in place while the scores scroll sideways (in a narrow window). */
.bulk td.b-film, .bulk th.b-film { position: sticky; left: 0; z-index: 1; background: var(--card); box-shadow: 1px 0 0 var(--line-2); }
.bulk th.b-film { z-index: 3; background: var(--card-2); }
.bulk .cell { width: 100%; height: 52px; padding: 0 8px; border: 0; border-radius: 0; background: transparent; color: var(--ink); font: inherit; font-size: .92rem; outline: none; }
.bulk .b-score .cell { text-align: center; font-family: var(--display); font-weight: 800; font-size: 1.15rem; }
.bulk .b-date .cell { font-family: var(--mono); font-size: .84rem; color-scheme: dark; }
.bulk .cell::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.bulk .cell:focus { background: color-mix(in srgb, var(--accent-2) 8%, transparent); box-shadow: inset 0 0 0 2px var(--accent-2), 0 0 12px color-mix(in srgb, var(--accent-2) 25%, transparent); position: relative; z-index: 1; }
/* Overall: the average shows faintly; a number of my own is in the accent colour. */
.bulk td.b-overall { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.bulk .b-overall .cell::placeholder { color: var(--ink-2); opacity: .6; }
.bulk .b-overall .cell.own { color: var(--accent); }
.bulk .cell.need { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
/* A date this film already has (in an earlier row, or in the log). */
.bulk .cell.dup { color: var(--accent); text-decoration: line-through; text-decoration-thickness: 1px;
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 70%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.bulk .cell:disabled { color: var(--ink-2); }
.bulk-film { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 4px 6px 4px 8px; }
.bulk-film .poster { border-radius: 2px; }
.bulk-film span { display: grid; min-width: 0; }
.bulk-film b { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bulk-film small { font-family: var(--mono); font-size: .68rem; color: var(--muted); }
.bulk .rewatch-tag { display: none; margin-left: 6px; padding: 0 4px; border-radius: 3px; font-style: normal; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent-2); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-2) 50%, transparent); }
.bulk tr.rewatch .rewatch-tag { display: inline; }
.bulk .unpick { display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }
.bulk .unpick:hover { color: var(--ink); background: var(--card-2); }
.bulk .unpick .icon { width: 14px; height: 14px; }
.bulk .bulk-from { font-family: var(--text); font-size: .72rem; color: var(--accent-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* This row dates a watch already in the log (one with no date) rather than adding one. */
.bulk .fill-note { font-family: var(--text); font-size: .72rem; line-height: 1.25; color: var(--accent-2); }
.bulk .fill-note:empty { display: none; }
.bulk .fill-note .linkbtn { font-size: inherit; padding: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.bulk .bulk-problem { display: none; font-family: var(--text); font-size: .72rem; line-height: 1.25; color: var(--accent); }
.bulk td.b-film > .bulk-problem { padding: 0 8px 6px; margin-top: -10px; }
.bulk tr.has-problem .bulk-problem { display: block; }
.bulk tr.saved td { background: color-mix(in srgb, var(--accent-2) 5%, var(--card)); }
.bulk tr.saved .cell { opacity: .75; }
.bulk tr.failed .b-num { color: var(--accent); }
.bulk .iconbtn { width: 32px; height: 32px; }
.bulk .iconbtn .icon { width: 15px; height: 15px; }
.bulk-bar { position: sticky; bottom: 0; z-index: 3; display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 0;
  background: linear-gradient(to top, var(--bg) 70%, transparent); }
.bulk-status { flex: 1; font-family: var(--mono); font-size: .8rem; letter-spacing: .03em; color: var(--accent); }
.bulk-bar .btn .icon { width: 16px; height: 16px; }
/* Round corners on the corner cells (the table can't clip them: its film column has to stick). */
.bulk th:first-child { border-top-left-radius: 11px; }
.bulk th:last-child { border-top-right-radius: 11px; }
.bulk tr:last-child td:first-child { border-bottom-left-radius: 11px; }
.bulk tr:last-child td:last-child { border-bottom-right-radius: 11px; }
/* Search results under the film cell, fixed to the screen so the table's scrolling can't clip them. */
.bulk-suggest { position: fixed; z-index: 40; list-style: none; margin: 0; padding: 4px; max-height: 340px; overflow-y: auto; border-radius: 10px;
  background: var(--card-2); border: 1px solid var(--line-2); box-shadow: 0 14px 40px rgba(0, 0, 0, .6); }
.bulk-suggest li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.bulk-suggest li[aria-selected="true"], .bulk-suggest li:hover { background: color-mix(in srgb, var(--accent-2) 14%, transparent); }
.bulk-suggest li.none { display: block; cursor: default; color: var(--muted); font-size: .88rem; }
.bulk-suggest .poster { border-radius: 2px; }
.bulk-suggest span { display: grid; min-width: 0; }
.bulk-suggest b { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bulk-suggest small { font-family: var(--mono); font-size: .7rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bulk-suggest em { font-style: normal; font-family: var(--mono); font-size: .64rem; letter-spacing: .05em; text-transform: uppercase; color: var(--accent-2); }

/* ---------- CineFile Match ---------- */

.match { display: inline-block; margin-left: 8px; padding: 2px 7px 1px; border-radius: 4px; vertical-align: 3px;
  font-family: var(--mono); font-size: .76rem; letter-spacing: .03em; color: var(--accent-2);
  background: color-mix(in srgb, var(--accent-2) 12%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent-2) 35%, transparent); }
.match.small { margin: 6px 0 0; vertical-align: 0; font-size: .7rem; }
.section-head a { color: var(--accent); text-decoration: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.sheet-head b { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 1.5rem; line-height: 1; }
.learned { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 10px; font-size: .88rem; color: var(--accent-2); }
.learned .icon { flex: none; width: 16px; height: 16px; margin-top: 2px; }
.tune { display: grid; gap: 14px; margin: 12px 0 8px; }
.tune-row { display: grid; grid-template-columns: 1fr 64px; grid-template-areas: 'label out' 'range range'; gap: 6px 10px; align-items: end; }
.tune-label { grid-area: label; display: grid; gap: 2px; }
.tune-label b { font-weight: 700; font-size: .95rem; }
.tune-label small { font-size: .76rem; color: var(--muted); line-height: 1.3; }
.tune-row output { grid-area: out; text-align: right; font-family: var(--mono); font-size: .8rem; color: var(--accent); }
.tune-row input { grid-area: range; width: 100%; accent-color: var(--accent); }
.tune-head { font-family: var(--mono); font-weight: 400; font-size: .92rem; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-2); margin: 22px 0 4px; }
.more-like { margin-top: 28px; }
.pick-body .match { justify-self: start; width: fit-content; margin: 4px 0 0; }

/* Password boxes: an eye button inside the right edge shows or hides what's typed. */
.field > .pw { position: relative; display: block; font: inherit; text-transform: none; letter-spacing: normal; color: inherit; line-height: normal; }
.pw .input { padding-right: 52px; }
.pw-reveal { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); display: grid; place-items: center; width: 44px; height: 40px; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; }
.pw-reveal:hover, .pw-reveal:focus-visible, .pw-reveal[aria-pressed="true"] { color: var(--accent-2); }
.pw-reveal .icon { width: 20px; height: 20px; }
