/* Miller Movie Night — popcorn-and-marquee palette, mobile first. Same layout rules as The Miller Table. */
:root {
  --bg: #fbf7f2;
  --card: #ffffff;
  --ink: #241c1b;
  --muted: #6e615d;
  --line: #ebe0d6;
  --accent: #b3261e;
  --accent-ink: #ffffff;
  --accent-soft: #f9e4e1;
  --good: #2f7343;
  --good-soft: #e1f1e5;
  --warn: #8a5a00;
  --warn-soft: #fff1d2;
  --bad: #b3261e;
  --bad-soft: #f9e0dc;
  --gold: #c98a00;
  --radius: 14px;
  --tabbar-h: 64px;
  color-scheme: light;
}
/* Dark mode only when chosen on the Me tab (data-mode="dark"), not from the device setting. */
:root[data-mode="dark"] {
  --bg: #17131a;
  --card: #221c25;
  --ink: #f3ecef;
  --muted: #b5a8ae;
  --line: #3a3140;
  --accent: #ff8a7a;
  --accent-ink: #1a1214;
  --accent-soft: #42232a;
  --good: #82cd96;
  --good-soft: #1f3526;
  --warn: #f2c66d;
  --warn-soft: #3d3018;
  --bad: #ff8a7a;
  --bad-soft: #42232a;
  --gold: #f2c66d;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px);
}

a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; margin-top: .6em; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; }

/* ---------- Layout ---------- */
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 10px;
  background: var(--bg);
  padding: calc(env(safe-area-inset-top) + 12px) 16px 10px;
  border-bottom: 1px solid var(--line);
}
.topbar h1 { font-size: 1.25rem; margin: 0; font-family: Georgia, "Times New Roman", serif; }
/* Brand: the icon on phones (next to the page name); icon + "Movie Night" on PC */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; display: block; }
.brand-name { display: none; font-family: Georgia, "Times New Roman", serif; font-size: 1.3rem; font-weight: 700; color: var(--accent); white-space: nowrap; }

main { max-width: 720px; margin: 0 auto; padding: 14px 16px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex;
  background: var(--card);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative;
  height: var(--tabbar-h); gap: 2px;
  text-decoration: none; color: var(--muted); font-size: .75rem;
}
.tabbar a span { font-size: 1.35rem; }
.tabbar a.on { color: var(--accent); font-weight: 600; }
.tabbar a.dot::after { content: ''; position: absolute; top: 10px; left: calc(50% + 10px); width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
}
.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; }
.gap { gap: 8px; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.pad { padding: 24px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.empty { color: var(--muted); text-align: center; padding: 28px 12px; list-style: none; }

/* ---------- Forms ---------- */
label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; font-weight: 600; }
label.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 400; font-size: 1rem; min-height: 44px; }
input, select, textarea {
  font: inherit; font-size: 16px; /* 16px stops iOS zooming into fields */
  color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; width: 100%;
}
input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 14px; min-height: 44px; white-space: nowrap;
}
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.small { min-height: 40px; padding: 6px 12px; font-size: .9rem; }
.btn.link { background: none; border: none; color: var(--accent); min-height: 44px; padding: 8px 0; align-self: flex-start; }
.btn.danger { color: var(--bad); }
.btn.block { display: flex; width: 100%; margin-top: 8px; }
.btn:disabled { opacity: .5; cursor: default; }

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  font: inherit; font-size: .88rem; cursor: pointer;
  padding: 6px 12px; min-height: 36px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
}
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.chips.big .chip { min-height: 44px; padding: 8px 14px; font-size: .95rem; }   /* tap-first answers */

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--card); }
.seg button { font: inherit; font-size: .88rem; border: none; background: none; color: var(--ink); padding: 8px 12px; min-height: 40px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--accent-soft); color: var(--accent); font-weight: 700; }

/* ---------- Watch: the questions ---------- */
.section-title { font-size: 1.1rem; margin: 0; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.field-label .muted { text-transform: none; letter-spacing: 0; font-weight: 400; }
.setup-nudge { display: flex; flex-direction: column; gap: 8px; background: var(--accent-soft); border-color: var(--accent); }
.setup-nudge p { margin: 0; }
.setup-nudge .btn { align-self: flex-start; }
.filters { padding: 0; overflow: hidden; }
.filter + .filter { border-top: 1px solid var(--line); }
.filter summary {
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 14px;
  cursor: pointer; list-style: none;
}
.filter summary::-webkit-details-marker { display: none; }
.filter summary::after { content: '›'; font-size: 1.4rem; line-height: 1; color: var(--muted); transition: transform .15s; }
.filter[open] summary::after { transform: rotate(90deg); }
.filter[open] summary { background: var(--accent-soft); }
.filter-icon { font-size: 1.2rem; width: 1.6rem; text-align: center; }
.filter-name { font-weight: 600; }
.filter-picked { margin-left: auto; max-width: 50%; color: var(--accent); font-weight: 600; font-size: .9rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter > .chips { padding: 12px 14px 14px; }
.filter > input { display: block; width: calc(100% - 28px); margin: 12px 14px 14px; }
.watch-go {
  position: sticky; z-index: 4; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  margin: 0 -16px; padding: 8px 16px; background: var(--bg); border-top: 1px solid var(--line);
}
.watch-go .btn.block { margin-top: 0; min-height: 52px; font-size: 1.08rem; }

/* ---------- Watch: results ---------- */
.watch-results { margin-top: 14px; }
.watch-empty { display: none; }
.results-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0 10px; }
.waiting { display: flex; gap: 14px; align-items: flex-start; border-color: var(--accent); }
.waiting p { margin: 4px 0 0; }
.spinner { font-size: 2rem; animation: bob 1.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-8deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

.picks { list-style: none; margin: 0; padding: 0; }
.pick { display: flex; flex-direction: column; gap: 10px; }
.pick p { margin: 0; }
.pick-top { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: start; }
.pick-poster { width: 96px; height: 144px; border-radius: 10px; object-fit: cover; background: var(--accent-soft); display: block; }
.pick-noimg { display: flex; align-items: center; justify-content: center; font-size: 2.2rem; }
.pick-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.pick-title { margin: 0; font-size: 1.12rem; font-family: Georgia, "Times New Roman", serif; }
.pick-n { display: inline-flex; align-items: center; justify-content: center; min-width: 1.6em; height: 1.6em; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font: 700 .8rem/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; vertical-align: 2px; }
.cert { display: inline-block; border: 1.5px solid var(--ink); border-radius: 4px; padding: 0 5px; font-weight: 700; font-size: .78rem; }
.pick-scores { font-weight: 600; }
.pick-why { font-style: italic; }
.pick-about { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pick-where { display: flex; flex-wrap: wrap; gap: 6px; }
.where { font-size: .85rem; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); }
.where.mine { background: var(--good-soft); border-color: var(--good); color: var(--good); font-weight: 700; }
.where small { font-weight: 400; }
.pick-links { display: flex; flex-wrap: wrap; gap: 8px; }

/* Parents' guide: tap to open. Every level is written out, so color is never the only signal. */
.pick-guide { border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.pick-guide summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 12px; min-height: 44px; cursor: pointer; list-style: none; }
.pick-guide summary::-webkit-details-marker { display: none; }
.pg-head { font-weight: 700; }
.pg-guess { font-weight: 400; color: var(--muted); font-size: .85rem; }
.pg-pills { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.pg-mini { display: inline-flex; align-items: center; gap: 2px; }
.lv { font-size: .75rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.lv-none { background: var(--good-soft); color: var(--good); }
.lv-mild { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.lv-moderate { background: var(--warn-soft); color: var(--warn); }
.lv-strong { background: var(--bad-soft); color: var(--bad); }
.pg-body { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.pg-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pg-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.pg-cat { font-weight: 600; min-width: 9.5em; }
.pg-note { flex-basis: 100%; color: var(--muted); font-size: .88rem; padding-left: 1.6em; }

@media (max-width: 420px) {
  .pick-top { grid-template-columns: 80px minmax(0, 1fr); gap: 10px; }
  .pick-poster { width: 80px; height: 120px; }
}

/* ---------- Me ---------- */
.me-hello { display: flex; align-items: center; gap: 14px; background: var(--accent-soft); border-color: var(--accent); }
.me-hello h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; }
.me-hello p { margin: 2px 0 0; }
.me-avatar { flex: none; width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; background: var(--card); border: 2px solid var(--accent); }
.me-sec { padding: 0; overflow: hidden; }
.me-sec > summary { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px; cursor: pointer; list-style: none; }
.me-sec > summary::-webkit-details-marker { display: none; }
.me-sec[open] > summary { background: var(--accent-soft); }
.me-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; background: var(--bg); border: 1px solid var(--line); }
.me-sum { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.me-sum .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-chev { font-size: 1.5rem; color: var(--muted); transition: transform .15s; }
.me-sec[open] .me-chev { transform: rotate(90deg); }
.me-body { padding: 14px; }
.me-body p { margin: 0; }
.me-warn { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--warn-soft); color: var(--ink); font-size: .9rem; }
.me-people { list-style: none; margin: 4px 0 0; padding: 0; }
.me-people li { padding: 4px 0; }
.me-invite { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.me-invite .field-label { flex-basis: 100%; }
.invite { font-size: 1.3rem; font-weight: 700; letter-spacing: .12em; padding: 4px 10px; border-radius: 8px; background: var(--bg); border: 1px dashed var(--line); }
.lim-set { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.lim-set h3 { margin: 0; }
.lim-row { display: flex; flex-direction: column; gap: 6px; }
.lim-name { font-weight: 600; font-size: .92rem; }
.lim-seg { align-self: flex-start; max-width: 100%; }
.me-foot { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 18px 0 8px; }
.me-foot .btn { min-width: 160px; }
.credits { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 8px 16px; }
.credits p { margin: 0; max-width: 520px; }
.tmdb-logo { display: block; height: auto; }

/* ---------- Sign in ---------- */
.auth { max-width: 420px; margin: 24px auto; text-align: center; display: flex; flex-direction: column; gap: 12px; }
.auth-logo { align-self: center; border-radius: 20px; }
.auth h2 { font-family: Georgia, "Times New Roman", serif; margin: 0; }
.auth p { margin: 0; }

/* ---------- Sheet & toast ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 20;
  background: rgb(0 0 0 / .35);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  background: var(--card); width: 100%; max-width: 560px;
  border-radius: 18px 18px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  max-height: 88vh; overflow-y: auto;
}
.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 14px); z-index: 30;
  background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 999px; font-size: .9rem; max-width: 90vw; text-align: center;
}
@media (min-width: 720px) {
  .sheet { border-radius: 18px; margin-bottom: 10vh; }
  .sheet-backdrop { align-items: center; }
}

/* ---------- Wide screens (PC): menu in the header, Watch in two columns ---------- */
@media (min-width: 900px) {
  body { padding-bottom: 24px; }
  .topbar {
    min-height: 60px; padding-top: 0; padding-bottom: 0;
    padding-left: max(16px, calc((100vw - 1100px) / 2 + 16px));
  }
  .tabbar {
    top: 0; bottom: auto; left: auto; height: 60px; z-index: 6; align-items: center; gap: 4px;
    right: max(16px, calc((100vw - 1100px) / 2 + 16px));
    background: transparent; border: none; padding: 0;
  }
  .tabbar a { flex: none; flex-direction: row; height: 40px; padding: 0 14px; gap: 6px; border-radius: 999px; font-size: .95rem; }
  .tabbar a.dot::after { top: 4px; left: auto; right: 4px; }
  .tabbar a span { font-size: 1.05rem; }
  .tabbar a.on { background: var(--accent-soft); }
  .tabbar a:hover { color: var(--accent); }
  .brand img { width: 38px; height: 38px; border-radius: 10px; }
  .brand-name { display: inline; }
  .topbar h1 { display: none; }   /* the highlighted menu item says where you are */
  .toast { bottom: 24px; }
  main:has(.watch) { max-width: 1100px; padding-top: 20px; }
  .watch { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 24px; align-items: start; }
  .watch-go { bottom: 0; margin: 0; padding: 12px 0 16px; border-top: none; }
  .watch-results { margin-top: 0; position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow: auto; padding-right: 4px; }
  .watch-empty { display: block; padding: 48px 24px; line-height: 1.8; }
}
.pg-head::after { content: '›'; display: inline-block; margin-left: 8px; color: var(--muted); font-size: 1.2rem; line-height: 1; transition: transform .15s; }
.pick-guide[open] .pg-head::after { transform: rotate(90deg); }

/* ---------- v0.2: people, watched / seen it, thumbs, earlier picks, Our movies ---------- */
.icon-btn { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1.1rem; width: 44px; height: 44px; flex: none; }
.me-people li { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.emoji-btn { font-size: 1.5rem; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; flex: none; }
.emoji-btn.on { border: 2px solid var(--accent); background: var(--accent-soft); }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
.emoji-grid .emoji-btn { width: 100%; height: 52px; }
.person-add { margin-top: 8px; }
.person-add input { flex: 1; min-width: 0; }
.seen-tag { display: inline-flex; align-items: center; font-size: .85rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  background: var(--good-soft); color: var(--good); border: 1px solid var(--good); }
.pick-links { align-items: center; }
.watch-tools { display: flex; justify-content: flex-end; margin: 0 0 10px; }
.hist-list { list-style: none; margin: 0; padding: 0; }
.hist-list li + li { border-top: 1px solid var(--line); }
.hist-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 10px 4px; font: inherit; color: var(--ink);
  background: none; border: none; text-align: left; cursor: pointer; }
.rate-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rate-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rate-who { font-weight: 600; font-size: 1.05rem; }
.rate-seg button { min-width: 52px; min-height: 44px; font-size: 1.2rem; }
.thumbs { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.thumbs:empty { display: none; }
.thumb { font-size: .82rem; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); }
.thumb.up { background: var(--good-soft); border-color: var(--good); color: var(--good); }
.thumb.down { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.ours-head { display: flex; flex-direction: column; gap: 8px; }
.ours-head h2, .ours-head p { margin: 0; }
.ours-seg { display: flex; width: 100%; }
.ours-seg button { flex: 1; min-height: 44px; }
.ours-list { list-style: none; margin: 0; padding: 0; }
.ours-item { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; align-items: start; }
.ours-poster { width: 56px; height: 84px; border-radius: 8px; object-fit: cover; background: var(--accent-soft); display: block; }
.ours-poster.pick-noimg { font-size: 1.6rem; }
.ours-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ours-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.btn.ghost { background: transparent; color: var(--muted); }
@media (max-width: 420px) { .ours-seg button { font-size: .8rem; padding: 6px 6px; } }
@media (min-width: 900px) { main:has(.ours) { max-width: 820px; } }

/* ---------- v0.3: save, select, more like these, saved lists ---------- */
.btn.saved { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.select-bar { position: sticky; top: calc(env(safe-area-inset-top) + 58px); z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 0 0 10px; padding: 10px 12px; border-radius: 12px; background: var(--card); border: 2px solid var(--accent); box-shadow: 0 4px 14px rgb(0 0 0 / .08); }
.select-bar > span { margin-right: auto; font-weight: 600; }
.picks.picking .pick { position: relative; cursor: pointer; }
.pick.picked { outline: 3px solid var(--accent); outline-offset: -2px; }
.pick-check { position: absolute; top: 8px; left: 8px; z-index: 2; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  background: var(--card); border-radius: 10px; border: 1px solid var(--line); pointer-events: none; }
.pick-check input { width: 26px; height: 26px; margin: 0; }
.like-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; background: var(--accent-soft); }
.like-banner .btn { margin-left: auto; }
.like-list { margin: 0; padding-left: 20px; }
.list-chips { margin: 0 0 10px; }
.ours-item .pick-where, .ours-item .pick-guide { margin-top: 4px; }
@media (min-width: 900px) { .select-bar { top: 0; } }

/* ---------- v0.4: taste quiz, habits, tips ---------- */
.quiz { max-width: 640px; margin: 0 auto; }
.quiz-head { display: flex; justify-content: space-between; align-items: center; }
.quiz-who { font-weight: 700; font-size: 1.1rem; }
.quiz-bar { height: 8px; border-radius: 999px; background: var(--accent-soft); overflow: hidden; }
.quiz-bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .2s; }
.quiz-q { font-family: Georgia, "Times New Roman", serif; margin: 6px 0 0; }
.quiz-pair { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.quiz-opt { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 14px; min-height: 120px; justify-content: center;
  font: inherit; color: var(--ink); background: var(--bg); border: 2px solid var(--line); border-radius: 16px; cursor: pointer; text-align: center; }
.quiz-opt:hover, .quiz-opt:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.quiz-opt strong { font-size: 1.15rem; }
.quiz-emoji { font-size: 2.4rem; line-height: 1; }
.quiz-or { align-self: center; color: var(--muted); font-weight: 700; text-transform: uppercase; font-size: .8rem; }
.quiz-more { justify-content: center; }
@media (min-width: 640px) { .quiz-pair { flex-direction: row; align-items: center; } .quiz-opt { flex: 1; } }
.quiz-invite { display: flex; flex-direction: column; gap: 8px; border-color: var(--gold); }
.quiz-invite p { margin: 0; }
.habit-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.habit-list li { display: flex; align-items: center; gap: 2px; }
.habit-list li::before { content: '•'; color: var(--accent); font-weight: 700; margin-right: 8px; }
.habit-list li > span { flex: 1; min-width: 0; }
.habit-edit { flex: 1; }
.habit-edit input { flex: 1; min-width: 0; }
.me-people .btn.small { flex: none; }
.tip-pop { position: fixed; z-index: 25; left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px);
  background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--accent); border-radius: 14px;
  padding: 12px 14px; box-shadow: 0 6px 24px rgb(0 0 0 / .18); display: flex; flex-direction: column; gap: 8px; max-width: 560px; margin: 0 auto; }
.tip-pop p { margin: 0; }
.tip-pop .tip-head { font-weight: 700; color: var(--accent); }
.tip-acts { flex-wrap: wrap; align-items: center; }
@media (min-width: 900px) { .tip-pop { left: auto; right: 24px; bottom: 24px; max-width: 380px; } }

/* ---------- v0.5: at home / in theaters ---------- */
.seg.mode-switch { display: flex; width: 100%; margin: 0 0 12px; border-radius: 14px; }
.seg.mode-switch button { flex: 1; min-height: 50px; font-size: 1.02rem; }
.zip-input { max-width: 10ch; font-size: 1.1rem; letter-spacing: .08em; }
.in-theaters { margin: 0; font-weight: 600; color: var(--accent); }
.cinemas-box { padding: 0; overflow: hidden; }
.cinemas-box > summary { display: flex; align-items: center; min-height: 52px; padding: 6px 14px; cursor: pointer; font-weight: 600; list-style: none; }
.cinemas-box > summary::-webkit-details-marker { display: none; }
.cinemas-box > summary::after { content: '›'; margin-left: auto; font-size: 1.4rem; color: var(--muted); transition: transform .15s; }
.cinemas-box[open] > summary { background: var(--accent-soft); }
.cinemas-box[open] > summary::after { transform: rotate(90deg); }
#w-cinema-list { padding: 10px 14px 14px; }
#w-cinema-list p { margin: 6px 0 0; }
.cinemas { list-style: none; margin: 0; padding: 0; }
.cinemas li { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.cinemas li + li { border-top: 1px solid var(--line); }
.zip-row { flex-wrap: wrap; }


/* ---------- v0.6: seasons, owned library, swap ---------- */
.season-banner { display: flex; flex-direction: column; gap: 8px; background: var(--accent-soft); border-color: var(--accent); }
.season-banner p { margin: 0; }
.season-banner .chips .chip { min-height: 44px; }
.owned-tag { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.own-add h3 { margin: 0; }
.own-add textarea { min-height: 96px; }
.own-review { list-style: none; margin: 0; padding: 0; max-height: 55vh; overflow-y: auto; }
.own-row { display: flex; align-items: center; gap: 10px; padding: 8px 2px; }
.own-row + .own-row { border-top: 1px solid var(--line); }
.own-row.off { opacity: .55; }
.own-row img, .own-noimg { width: 40px; height: 60px; border-radius: 6px; object-fit: cover; flex: none; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; }
.own-row select { margin-top: 4px; padding: 6px 8px; }
@media (max-width: 480px) { .ours-seg { display: grid; grid-template-columns: 1fr 1fr; border-radius: 14px; } .ours-seg button + button { border-left: none; } .ours-seg button { border-top: 1px solid var(--line); } .ours-seg button:nth-child(-n+2) { border-top: none; } .ours-seg button:nth-child(even) { border-left: 1px solid var(--line); } }

/* Switch to The Miller Table: a pill in the header on phones, a menu item on PC */
.app-switch { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 4px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; font-size: .85rem; font-weight: 600; white-space: nowrap; }
.tabbar .app-switch-tab { display: none; }
@media (min-width: 900px) {
  .topbar .app-switch { display: none; }
  .tabbar .app-switch-tab { display: flex; color: var(--muted); }
}
/* Our movies: All view, tags; five view buttons */
.all-find { margin: 0 0 10px; }
.tags { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.tag { font-size: .8rem; padding: 2px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }
@media (max-width: 480px) {
  .ours-seg { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 6px; border: none; background: none; }
  .ours-seg button, .ours-seg button + button, .ours-seg button:nth-child(even) { border: 1px solid var(--line) !important; border-radius: 10px; background: var(--card); min-height: 44px; font-size: .8rem; padding: 6px 4px; }
  .ours-seg button.on { background: var(--accent-soft); border-color: var(--accent) !important; }
}

/* ===== THEMES (generated by tools/themes.py — edit there, not here) ===== */
:root {
  --accent: #b3261e;
  --accent-soft: #f9e4e1;
  --bg: #fbf7f2;
  --line: #ebe0d6;
}
:root[data-theme="marquee"] {
  --accent: #7f5300;
  --accent-soft: #fbefd6;
  --bg: #fdf9f0;
  --line: #efe3c9;
}
:root[data-theme="midnight"] {
  --accent: #3f4bb0;
  --accent-soft: #e5e8fa;
  --bg: #f8f9fe;
  --line: #dde0f3;
}
:root[data-theme="purple"] {
  --accent: #6b3fa0;
  --accent-soft: #efe6f8;
  --bg: #faf7fd;
  --line: #e6dcf1;
}
:root[data-theme="pink"] {
  --accent: #b8356f;
  --accent-soft: #fbe4ee;
  --bg: #fef8fa;
  --line: #f5dbe6;
}
:root[data-theme="coral"] {
  --accent: #b5452f;
  --accent-soft: #fde7e1;
  --bg: #fff9f7;
  --line: #f6ddd6;
}
:root[data-theme="teal"] {
  --accent: #1f7480;
  --accent-soft: #def2f4;
  --bg: #f6fbfc;
  --line: #d3eaed;
}
:root[data-theme="forest"] {
  --accent: #2a735c;
  --accent-soft: #e0f3ec;
  --bg: #f7fcfa;
  --line: #d6ece4;
}
:root[data-theme="slate"] {
  --accent: #3f5568;
  --accent-soft: #e3e9ef;
  --bg: #f8fafb;
  --line: #dbe2e8;
}
:root[data-theme="classic"] {
  --accent: #8b4a2f;
  --accent-soft: #f3e3d8;
  --bg: #faf6f0;
  --line: #e8dfd4;
}
:root[data-mode="dark"] {
  --accent: #ff8a7a;
  --accent-soft: #42232a;
  --bg: #17131a;
  --line: #3a3140;
  --card: #221c25;
  --accent-ink: #17131a;
}
:root[data-mode="dark"][data-theme="marquee"] {
  --accent: #f2c66d;
  --accent-soft: #3d3018;
  --bg: #17140f;
  --line: #3b3222;
  --card: #221d15;
  --accent-ink: #17140f;
}
:root[data-mode="dark"][data-theme="midnight"] {
  --accent: #a9b3f5;
  --accent-soft: #262b4d;
  --bg: #12131d;
  --line: #30344d;
  --card: #1b1d2b;
  --accent-ink: #12131d;
}
:root[data-mode="dark"][data-theme="purple"] {
  --accent: #c4a3ee;
  --accent-soft: #33274a;
  --bg: #17131f;
  --line: #3a2f4d;
  --card: #221b2e;
  --accent-ink: #17131f;
}
:root[data-mode="dark"][data-theme="pink"] {
  --accent: #f39cc0;
  --accent-soft: #4a2333;
  --bg: #1e1317;
  --line: #4a3039;
  --card: #2c1c23;
  --accent-ink: #1e1317;
}
:root[data-mode="dark"][data-theme="coral"] {
  --accent: #f6a08c;
  --accent-soft: #4a2820;
  --bg: #1e1513;
  --line: #4a342e;
  --card: #2c1f1b;
  --accent-ink: #1e1513;
}
:root[data-mode="dark"][data-theme="teal"] {
  --accent: #7fd0da;
  --accent-soft: #1c3a3f;
  --bg: #11191b;
  --line: #2a4044;
  --card: #192528;
  --accent-ink: #11191b;
}
:root[data-mode="dark"][data-theme="forest"] {
  --accent: #86d6b9;
  --accent-soft: #1e3a31;
  --bg: #121a17;
  --line: #2c413a;
  --card: #1a2622;
  --accent-ink: #121a17;
}
:root[data-mode="dark"][data-theme="slate"] {
  --accent: #a9c1d6;
  --accent-soft: #24303b;
  --bg: #121619;
  --line: #2e3943;
  --card: #1a2026;
  --accent-ink: #121619;
}
:root[data-mode="dark"][data-theme="classic"] {
  --accent: #d98a64;
  --accent-soft: #3d2a20;
  --bg: #1c1714;
  --line: #3b312b;
  --card: #27201c;
  --accent-ink: #1c1714;
}
/* ===== END THEMES ===== */

/* ---------- v0.6: theme swatches ---------- */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.swatch {
  --sw: var(--sw-light);
  display: flex; align-items: center; gap: 8px;
  font: inherit; font-size: .92rem; color: var(--ink); cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; min-height: 44px;
}
.swatch .dot { width: 20px; height: 20px; border-radius: 50%; background: var(--sw); flex: none; }
.swatch.on { border: 2px solid var(--accent); font-weight: 700; }
:root[data-mode="dark"] .swatch { --sw: var(--sw-dark); }
