:root {
  color-scheme: light;
  --bg: #f6f5f2; --fg: #1b1b1f; --muted: #6b6b75; --card: #fff; --line: #e2e0da;
  --accent: #2f6fde; --accent-fg: #fff; --good: #1f8a4c; --bad: #c0392b;
  --link: #2f6fde; --overlay: rgba(255, 255, 255, .88); --sel-bg: #1b1b1f; --sel-fg: #fff;
}
@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark;
          --bg: #131316; --fg: #ececf1; --muted: #9a9aa6; --card: #1e1e23; --line: #2e2e35;
          --accent: #3a72e0; --accent-fg: #fff; --good: #3ecf7a; --bad: #ef6b5b;
          --link: #8fb0f7; --overlay: rgba(30, 30, 35, .88); --sel-bg: #3a72e0; --sel-fg: #fff; }
}
a { color: var(--link); }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; }
header { position: sticky; top: 0; z-index: 2; background: var(--bg); border-bottom: 1px solid var(--line);
  padding: 10px 16px 0; }
main { max-width: 720px; margin: 0 auto; padding: 16px; }
footer { max-width: 720px; margin: 24px auto; padding: 0 16px 24px; color: var(--muted); font-size: 12px; }
footer img { vertical-align: middle; margin-right: 6px; }

.who { display: flex; gap: 6px; flex-wrap: wrap; }
.who button { border-radius: 999px; padding: 6px 14px; }
.who button.on { background: var(--sel-bg); color: var(--sel-fg); border-color: var(--sel-bg); }
nav { display: flex; gap: 2px; margin-top: 10px; overflow-x: auto; }
nav button { font-size: 15px; white-space: nowrap; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; padding: 8px 9px; color: var(--muted); }
nav button.on { color: var(--fg); border-bottom-color: var(--accent); font-weight: 600; }

button, .button { font: inherit; color: var(--fg); background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 14px; cursor: pointer; display: inline-block; }
button.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); font-weight: 600; }
button.quiet { background: none; color: var(--muted); }
button.danger { color: var(--bad); }
button:disabled { opacity: .45; cursor: default; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.actions.small button { padding: 6px 10px; font-size: 14px; }
.hint { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.tab { display: none; }
.tab.on { display: block; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  display: flex; gap: 14px; padding: 12px; }
.card img, .card .noposter { width: 110px; aspect-ratio: 2/3; object-fit: cover; border-radius: 8px; flex: none; background: var(--line); }
.card h2 { font-size: 20px; margin: 2px 0 6px; }
.meta { color: var(--muted); font-size: 14px; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { position: relative; background: var(--card); border: 2px solid var(--line); border-radius: 12px; overflow: hidden;
  cursor: pointer; user-select: none; }
.tile img, .tile .noposter { display: block; width: 100%; aspect-ratio: 4/5; object-fit: cover; background: var(--line); }
.tile .name { padding: 6px 8px 2px; font-size: 14px; font-weight: 600; line-height: 1.25; }
.tile .meta { padding: 0 8px; font-size: 12px; }
.tile .tbtns { display: flex; gap: 4px; padding: 6px 8px 8px; }
.tile .tbtns button { flex: 1; padding: 4px 2px; font-size: 12px; border-radius: 6px; }
.tile.ranked { border-color: var(--accent); }
.tile.excluded { opacity: .35; }
.tile.excluded .tbtns { opacity: 1; }
.badge { position: absolute; top: 6px; left: 6px; width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: var(--accent-fg); font-weight: 700; display: grid; place-items: center; font-size: 18px; }
.badge.x { background: var(--muted); font-size: 12px; width: auto; padding: 0 8px; border-radius: 999px; height: 24px; }

input[type=search] { width: 100%; font: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--fg); }
.row { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.row img, .row .noposter { width: 40px; aspect-ratio: 2/3; object-fit: cover; border-radius: 4px; flex: none; background: var(--line); }
.row .txt { flex: 1; min-width: 0; }
.row .txt div:first-child { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .btns { display: flex; gap: 4px; flex: none; }
.row .btns button { padding: 6px 8px; font-size: 13px; }
.row .btns button.on { background: var(--sel-bg); color: var(--sel-fg); border-color: var(--sel-bg); }
#stats table { border-collapse: collapse; width: 100%; font-size: 14px; }
#stats td, #stats th { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.guess { margin-top: 8px; font-size: 12px; }
.grid.grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 560px) { .grid.grid3 { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.grid3 .tile img, .grid3 .tile .noposter { aspect-ratio: 2/3; }
.grid3 .tile .name { font-size: 13px; padding: 5px 6px 1px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.grid3 .tile .meta { padding: 0 6px; font-size: 11px; }
.grid3 .tile .tbtns { padding: 5px 6px 6px; }
.grid3 .tile .tbtns button.q { flex: 0 0 30px; }
.grid3 .badge { width: 28px; height: 28px; font-size: 16px; }
.tbtns button.on { background: var(--sel-bg); color: var(--sel-fg); border-color: var(--sel-bg); }
.summary { font-size: 14px; margin: 10px 0 0; color: var(--muted); }
.grid3 .badge.x { width: auto; height: 22px; font-size: 11px; white-space: nowrap; }
.hgroup { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; margin-bottom: 10px; }
.hhead { display: flex; justify-content: space-between; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.hhead .hbtns { display: flex; gap: 2px; flex-wrap: wrap; }
.hhead button { padding: 4px 8px; font-size: 13px; }
.hrow { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); font-size: 14px; flex-wrap: wrap; }
.hrow .txt { flex: 1; min-width: 140px; }
.hrow .btns { display: flex; gap: 3px; }
.hrow button { padding: 4px 7px; font-size: 12px; }
.hrow button.on { background: var(--sel-bg); color: var(--sel-fg); border-color: var(--sel-bg); }
.grid3 .tile.unranked img { filter: saturate(.75); }
[hidden] { display: none !important; }
.badge.x.prev { background: var(--good); color: #fff; }
.badge { z-index: 1; }
.who { justify-content: space-between; align-items: center; font-size: 14px; color: var(--muted); }
.who b { color: var(--fg); }
.who button { padding: 4px 10px; border-radius: 8px; font-size: 14px; }
#who-screen { max-width: 480px; margin: 0 auto; padding: 48px 16px; }
#who-screen h1 { font-size: 28px; margin: 0 0 8px; }
#who-screen input { flex: 1; min-width: 0; font: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--fg); }
#who-known:empty { display: none; }
.center { justify-content: center; text-align: center; }
.deck { position: relative; height: clamp(300px, calc(100vh - 340px), 600px); height: clamp(300px, calc(100dvh - 340px), 600px); max-width: 380px; margin: 0 auto; }
.swipe-card { position: absolute; inset: 0; background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  overflow: hidden; display: flex; flex-direction: column; user-select: none; -webkit-user-select: none;
  box-shadow: 0 6px 24px rgba(0,0,0,.12); transform: scale(.95) translateY(10px); }
.swipe-card.top { transform: none; touch-action: pan-y; cursor: grab; }
.swipe-info { padding: 10px 14px 12px; }
.swipe-info h2 { margin: 0 0 4px; font-size: 20px; }
.stamp { position: absolute; top: 18px; z-index: 2; padding: 4px 10px; border: 3px solid; border-radius: 8px;
  font-weight: 800; font-size: 22px; letter-spacing: 1px; opacity: 0; background: var(--overlay); }
.stamp.yes { left: 16px; color: var(--good); transform: rotate(-12deg); }
.stamp.no { right: 16px; color: var(--bad); transform: rotate(12deg); }
.stamp.no.skip { color: var(--muted); }
.swipe-btns { display: flex; justify-content: center; gap: 40px; margin: 12px 0 0; }
.round { width: 64px; height: 64px; border-radius: 50%; font-size: 28px; padding: 0; display: grid; place-items: center; }
.round.yes { color: var(--good); border-color: var(--good); }
.round.no { color: var(--bad); border-color: var(--bad); }
.round.skip { color: var(--muted); border-color: var(--muted); font-size: 30px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 520px; margin: 0 auto; }
.pick { padding: 0; overflow: hidden; border-radius: 14px; text-align: left; border-width: 2px; transition: transform .12s, border-color .12s; }
.pick img, .pick .noposter { display: block; width: 100%; aspect-ratio: 2/3; object-fit: cover; background: var(--line); }
.pick .name { padding: 8px 10px 2px; font-weight: 600; font-size: 15px; }
.pick .meta { padding: 0 10px 10px; }
.pick:active { transform: scale(.97); }
.pick.chosen { border-color: var(--accent); transform: scale(.97); }
#tab-rank .actions button { min-width: 72px; }
/* whole poster, never cropped: contained image over a blurred copy of itself */
.swipe-card .art { flex: 1; min-height: 0; position: relative; overflow: hidden; background: var(--line); pointer-events: none; }
.swipe-card .art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; -webkit-user-drag: none; }
.swipe-card .art img.backdrop { object-fit: cover; filter: blur(18px) brightness(.7); transform: scale(1.15); }
.swipe-card .art .noposter { position: absolute; inset: 0; }
.row.rec .rank { width: 44px; font-size: 14px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.row.rec img, .row.rec .noposter { width: 46px; }
.bar { height: 4px; background: var(--line); border-radius: 2px; margin-top: 5px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); }
#login-screen { max-width: 480px; margin: 0 auto; padding: 48px 16px; }
#login-screen h1 { font-size: 28px; margin: 0 0 8px; }
.sync { margin-left: 8px; color: var(--bad); font-size: 13px; }
#admin-form input, .admin-link input { flex: 1; min-width: 0; font: inherit; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); color: var(--fg); }
.admin-link { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.admin-link p { flex-basis: 100%; margin: 0; font-size: 14px; }
#admin-users table { border-collapse: collapse; width: 100%; font-size: 14px; }
#admin-users td, #admin-users th { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); }
#admin-users td.btns { display: flex; gap: 4px; justify-content: flex-end; }
#admin-users button { padding: 4px 8px; font-size: 13px; }
#admin-users tr.disabled { color: var(--muted); }
.journey { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0 0 14px; }
.step { text-align: left; padding: 7px 9px; border-radius: 10px; font-size: 12px; color: var(--muted); }
.step .step-title { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.step .step-bar { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.step .step-bar span { display: block; height: 100%; background: var(--accent); }
.step .step-detail { margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step.current { color: var(--fg); border-color: var(--accent); }
.step.done { color: var(--good); }
.step.done .step-bar span { background: var(--good); }
.step.here { box-shadow: inset 0 0 0 1px var(--accent); }
.milestone { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--card); border: 1px solid var(--good);
  border-radius: 12px; padding: 10px 12px; margin: 0 0 14px; font-size: 14px; }
.milestone > div { flex-basis: 100%; }
.seg { display: flex; gap: 0; margin: 0 0 10px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { flex: 1; border: 0; border-radius: 0; padding: 8px 4px; font-size: 14px; background: var(--card); color: var(--muted); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--sel-bg); color: var(--sel-fg); }
.tag { font-size: 12px; }
/* title details sheet */
.sheet { position: fixed; inset: 0; z-index: 10; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none !important; }
.sheet-panel { position: relative; background: var(--bg); width: 100%; max-width: 640px; max-height: 88vh; overflow-y: auto;
  border-radius: 18px 18px 0 0; padding: 18px 16px 24px; box-shadow: 0 -8px 30px rgba(0,0,0,.25); }
@media (min-width: 700px) { .sheet { align-items: center; } .sheet-panel { border-radius: 18px; } }
.sheet-close { position: absolute; top: 8px; right: 8px; font-size: 18px; padding: 6px 10px; }
.details-top { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 10px; padding-right: 30px; }
.details-top img, .details-top .noposter { width: 110px; aspect-ratio: 2/3; object-fit: cover; border-radius: 10px; flex: none; background: var(--line); }
.details-top h2 { margin: 0 0 4px; font-size: 21px; }
.tagline { font-style: italic; color: var(--muted); margin: 6px 0; font-size: 14px; }
.facts { display: grid; gap: 4px; font-size: 14px; margin: 10px 0; }
.fact { display: grid; grid-template-columns: 110px 1fr; gap: 8px; }
.fact span:first-child { color: var(--muted); }
a.button { text-decoration: none; }
.details-link { cursor: pointer; }
.info-btn { position: absolute; right: 10px; top: 8px; width: 34px; height: 34px; padding: 0; border-radius: 50%;
  font-size: 18px; line-height: 1; display: grid; place-items: center; background: var(--card); }
.swipe-info { position: relative; padding-right: 50px; }
.pick { position: relative; }
.info-btn.corner { top: 6px; right: 6px; z-index: 1; border: 1px solid var(--line); color: var(--fg); background: var(--overlay); }
.row.rec { flex-wrap: wrap; row-gap: 6px; }
.rankctx { font-size: 13px; margin-top: 2px; white-space: normal; overflow: visible; }
.rankctx .details-link { color: var(--link); }
/* For you: sticky view switcher + filter bar, and the filter sheet */
.recs-top { position: sticky; top: var(--hdr, 0px); z-index: 1; background: var(--bg); margin: -16px -16px 8px; padding: 12px 16px 8px;
  border-bottom: 1px solid var(--line); }
.recs-top .seg { margin-bottom: 8px; }
.fbar { display: flex; gap: 6px; align-items: center; overflow-x: auto; scrollbar-width: none; }
.fbar::-webkit-scrollbar { display: none; }
.fbtn { flex: none; font-size: 14px; padding: 6px 12px; border-radius: 16px; }
.fbtn.on { border-color: var(--accent); color: var(--accent); }
.pills { display: flex; gap: 6px; }
.pill { flex: none; font-size: 13px; padding: 5px 10px; border-radius: 16px; background: var(--sel-bg); color: var(--sel-fg); border-color: var(--sel-bg); white-space: nowrap; }
.pill .x { margin-left: 6px; opacity: .7; font-size: 11px; }
.recs-line { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 13px; color: var(--muted); }
.recs-line .info { border: 0; background: none; padding: 2px 4px; font-size: 15px; color: var(--muted); }
.about { margin-top: 0; }
.fsheet { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.fsheet-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px 0; }
.fsheet-head h2 { margin: 0; font-size: 18px; }
.fsheet-body { overflow-y: auto; padding: 0 16px 8px; }
.fsheet-foot { display: flex; gap: 8px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--bg); }
.fsheet-foot .primary { flex: 1; }
.fgroup { margin-bottom: 12px; }
.flabel { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: grid; grid-template-columns: auto auto; column-gap: 6px; align-items: baseline;
  padding: 6px 10px 5px; border-radius: 12px; font-size: 14px; background: var(--card); color: var(--fg); border: 1px solid var(--line); }
.chip .ccount { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip .cbar { grid-column: 1 / -1; height: 3px; margin-top: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.chip .cbar > span { display: block; height: 100%; background: var(--accent); }
.chip .cbar.neg > span { background: var(--muted); }
.chip.empty .cname { opacity: .7; }
.chip.on { background: var(--sel-bg); color: var(--sel-fg); border-color: var(--sel-bg); }
.chip.on .ccount { color: inherit; opacity: .8; }
.chip.on .cbar { background: color-mix(in srgb, var(--sel-fg) 30%, transparent); }
.chip.on .cbar > span { background: var(--sel-fg); }

/* ---- keyboard hints: only where there's a mouse (and so, usually, a keyboard) ---- */
.kbd-help { display: none; text-align: center; font-size: 12px; color: var(--muted); margin-top: 14px; }
kbd { font: 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 2px 5px; border: 1px solid var(--line);
  border-bottom-width: 2px; border-radius: 4px; background: var(--card); color: var(--fg); }
@media (hover: hover) and (pointer: fine) { .kbd-help { display: block; } }

.recs-side { display: none; }

/* ---- desktop ---- */
@media (min-width: 1000px) {
  header { display: flex; align-items: flex-end; gap: 28px; padding: 0 32px; }
  header .who { order: 2; margin-left: auto; align-self: center; }
  nav { margin-top: 0; padding-top: 6px; }
  nav button { font-size: 16px; padding: 12px 12px; }
  main, footer { max-width: 1240px; padding-left: 32px; padding-right: 32px; }
  main { padding-top: 24px; }

  /* For you: filter sidebar + list */
  .recs-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 32px; align-items: start; }
  .recs-side { display: block; position: sticky; top: calc(var(--hdr, 0px) + 20px); max-height: calc(100vh - var(--hdr, 0px) - 40px);
    overflow-y: auto; padding-right: 6px; }
  .recs-side .fsheet-body { padding: 0; overflow: visible; }
  .side-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
  .side-head h2 { margin: 0; font-size: 18px; }
  .recs-side .chip { font-size: 13px; padding: 5px 9px 4px; }
  .recs-top { margin: -24px 0 8px; padding: 16px 0 10px; }
  .fbar:has(.pills:empty) { display: none; }
  .recs-main { max-width: 820px; }

  /* Seen? and Compare: bigger cards */
  .deck { max-width: 460px; height: clamp(420px, calc(100vh - 330px), 720px); }
  .pair { max-width: 820px; gap: 28px; }
  .pick .name { font-size: 18px; padding: 12px 14px 2px; }
  .pick .meta { padding: 0 14px 14px; }
  .pick:hover { border-color: var(--accent); }

  /* details: a panel docked on the right instead of a pop-up sheet */
  #details.sheet { inset: var(--hdr, 0px) 0 0 auto; width: 440px; background: none; align-items: stretch; }
  #details .sheet-panel { max-width: none; max-height: none; height: 100%; border-radius: 0; border-left: 1px solid var(--line);
    box-shadow: -10px 0 30px rgba(0,0,0,.08); padding: 20px 20px 32px; }
  body.details-open main, body.details-open footer { margin-right: 440px; margin-left: 0; max-width: none; }
}
@media (min-width: 1000px) and (max-width: 1279px) { body.details-open .recs-layout { grid-template-columns: 240px minmax(0, 1fr); } }
.linkish { border: 0; background: none; padding: 0; color: var(--link); font-size: 13px; }
@media (min-width: 1000px) {
  /* two 2:3 posters side by side, sized so the cards and buttons fit in the window */
  #tab-history, #tab-data, #tab-admin { max-width: 900px; margin: 0 auto; }
}
/* Like? buttons: dislike / not sure / like, each with a label */
.swipe-btns { gap: 28px; }
.rbtn { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.round.unsure { width: 52px; height: 52px; margin-top: 6px; font-size: 22px; color: var(--muted); border-color: var(--muted); }
/* the like line in For you lists */
.likeline { display: flex; align-items: center; gap: 10px; margin: 6px 0; color: var(--accent); font-size: 13px; font-weight: 600; }
.likeline::before, .likeline::after { content: ""; flex: 1; border-top: 2px dashed currentColor; opacity: .6; }
.more { display: flex; justify-content: center; padding: 14px 0 6px; overflow-anchor: none; }
/* Compare: placing one title */
.focus-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px;
  padding: 8px 12px; border: 1px solid var(--accent); border-radius: 10px; font-size: 14px; }
.focus-banner .focus-result { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.focus-banner .focus-result .actions { margin-top: 6px; }
.place-ask { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
/* Like?: older "seen" answers being asked again */
.old-known { color: var(--accent); font-weight: 600; margin-bottom: 2px; }
/* details: similar titles */
.similar { margin-top: 16px; }
.similar h3 { margin: 0 0 8px; font-size: 15px; }
.similar-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.sim { flex: none; width: 92px; padding: 0; border: 0; background: none; text-align: left; color: var(--fg); }
.sim img, .sim .noposter { width: 92px; aspect-ratio: 2/3; object-fit: cover; border-radius: 8px; display: block; background: var(--line); }
.sim-name { font-size: 12px; font-weight: 600; margin-top: 4px; line-height: 1.2; }
.sim .meta { font-size: 11px; }
.fbtn.on#watch-toggle { background: var(--sel-bg); color: var(--sel-fg); border-color: var(--sel-bg); }
#watch-toggle[hidden] { display: none; }
#recs .deck { margin-top: 4px; }
.start-over { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.start-over p { margin: 0 0 8px; }
button.danger { color: var(--bad); border-color: var(--bad); }
/* rating meter: dot = rating, band = likely range, tick = type average; scale 5-10 */
.rm { display: grid; gap: 3px; margin-top: 6px; max-width: 320px; }
.row.rec .rm { max-width: 360px; margin-top: 8px; }
.rm-bar { position: relative; height: 8px; border-radius: 4px; background: var(--line); }
.rm-band { position: absolute; top: 0; bottom: 0; min-width: 6px; border-radius: 4px; background: var(--accent); opacity: .6; }
.rm-label { position: relative; height: 17px; font-size: 13px; font-variant-numeric: tabular-nums; }
.rm-pin { position: absolute; top: 0; width: 0; height: 100%; white-space: nowrap; font-weight: 600; }
.rm-pin > span { position: absolute; top: 0; }
.rm-star { left: -.55em; width: 1.1em; text-align: center; }
.rm-num { right: .6em; }
.rm-who { left: .65em; color: var(--muted); font-weight: 500; }
.rm.compact { max-width: 140px; margin-top: 4px; gap: 2px; }
.rm.compact .rm-bar { height: 5px; }
.rm.compact .rm-label { height: 14px; font-size: 11px; }

/* Haiku tags */
.tagbox { display: grid; gap: 4px; margin-top: 8px; }
.tagchips { display: flex; flex-wrap: wrap; gap: 4px; }
.tagchip { font-size: 12px; padding: 1px 7px; border-radius: 10px; background: var(--line); color: var(--fg); }
.tagchip.crit { background: color-mix(in srgb, var(--bad) 18%, transparent); }
.tagchip.praise { background: color-mix(in srgb, var(--good) 18%, transparent); }
.crit { font-size: 12px; }
.tagdetails { margin-top: 14px; display: grid; gap: 8px; }
.tagdetails h3 { margin: 0; font-size: 15px; }
.tagrow { display: grid; gap: 4px; }

/* desktop: Like? and Swipe as a title page; details under each Compare pick */
.desk-box, .pick-more { display: none; }
@media (min-width: 1000px) {
  .tab .mobile-deck { display: none; }
  .desk-box { display: block; }
  .desk { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 40px; align-items: start; max-width: 1100px; margin: 0 auto; }
  #recs .desk { grid-template-columns: 220px minmax(0, 1fr); gap: 28px; }
  .desk-left { position: sticky; top: calc(var(--hdr, 0px) + 16px); }
  .desk-poster img, .desk-poster .noposter { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 14px; display: block;
    background: var(--line); box-shadow: 0 8px 28px rgba(0,0,0,.15); }
  .desk-next { margin-top: 16px; }
  .desk-next-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 6px; }
  .desk-next-item img, .desk-next-item .noposter { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 6px; display: block; opacity: .75; background: var(--line); }
  .desk-title { font-size: 34px; line-height: 1.15; margin: 2px 0 6px; }
  .desk-meta { font-size: 16px; }
  .desk-rate { margin: 14px 0 4px; }
  .desk-rate .rm { max-width: 420px; }
  .desk-rate .rm-label { font-size: 14px; height: 19px; }
  .desk-body .tagdetails { margin: 4px 0 14px; }
  .desk-rate .guess { margin-top: 8px; }
  .desk-answers { display: flex; gap: 12px; margin: 22px 0 10px; }
  .desk-ans { display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; font-size: 17px; font-weight: 600; border-radius: 12px; border-width: 2px; }
  .desk-ans kbd { font-size: 12px; font-weight: 500; opacity: .7; }
  .desk-ans.yes { color: var(--good); border-color: var(--good); }
  .desk-ans.no { color: var(--bad); border-color: var(--bad); }
  .desk-ans.unsure, .desk-ans.skip { color: var(--muted); border-color: var(--line); }
  .desk-ans:hover { background: var(--sel-bg); color: var(--sel-fg); border-color: var(--sel-bg); }
  .desk-under { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 32px; margin-bottom: 18px; }
  .desk-under kbd { margin-left: 6px; font-size: 11px; }
  .desk-body { border-top: 1px solid var(--line); padding-top: 18px; font-size: 15px; }
  .desk-body > p { max-width: 70ch; line-height: 1.5; }
  .desk-body .facts { grid-template-columns: 1fr 1fr; column-gap: 28px; }
  .desk-body .fact { grid-template-columns: 100px 1fr; }

  .pair { max-width: 1120px; grid-template-columns: 1fr 1fr; }
  .pick { display: grid; grid-template-columns: 200px minmax(0, 1fr); align-items: stretch; }
  .pick > img, .pick > .noposter { height: 100%; min-height: 300px; aspect-ratio: auto; }
  .pick .name { padding-right: 34px !important; }
  .pick .pick-body { padding: 12px 14px 14px 4px; }
  .pick .name, .pick .meta { padding-left: 0; padding-right: 0; }
  .pick .pick-body > .meta { padding-bottom: 6px; }
  .pick-more { display: grid; gap: 6px; font-size: 13px; }
  .pick-more .meta { padding: 0; }
  .pick-overview { margin: 2px 0 0; font-size: 14px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
}

.interest-btns { display: inline-flex; gap: 6px; }
.interest-btn.on { color: var(--good); border-color: var(--good); }
.interest-btn.pass.on { color: var(--fg); border-color: var(--muted); background: var(--line); }
/* phones: list buttons on their own line under the title, so the title and details keep the full width */
@media (max-width: 699px) {
  .row { flex-wrap: wrap; row-gap: 6px; }
  .row .btns { flex-basis: 100%; flex-wrap: wrap; row-gap: 6px; padding-left: 0; }
  .row .btns:empty { display: none; }
  .row.rec .rank { width: 30px; }
  .row.rec .btns { padding-left: 40px; } /* under the poster, after the rank number */
  .row .btns .interest-btns { margin-left: 6px; } /* a gap between the like/dislike and interest groups */
}

/* ---- navigation: Rate / Discover / Browse / More ---- */
header { padding: 0 16px; }
header:has(#subnav[hidden]):has(#gfbar[hidden]) { border-bottom: 0; }
#gfbar[hidden] { display: none; }
.subnav { margin: 8px auto; max-width: 420px; }
.nav-ico { display: none; }
#browse-ctl { display: grid; gap: 8px; margin-bottom: 8px; }
#browse-ctl[hidden] { display: none; }
#browse-opts { display: grid; gap: 6px; }
#browse-opts[hidden] { display: none; }
.seg-sm { margin: 0 !important; overflow-x: auto; scrollbar-width: none; }
.seg-sm::-webkit-scrollbar { display: none; }
.seg-sm button { padding: 6px 8px; font-size: 13px; white-space: nowrap; }
.sortrow { display: flex; align-items: center; gap: 8px; }
.sortrow .seg { flex: 1; }
.more-panel { padding: 20px; }
.more-who { font-size: 15px; margin: 0 40px 14px 0; display: flex; flex-direction: column; gap: 4px; }
.more-who .sync { font-size: 12px; color: var(--muted); }
.more-list { display: grid; gap: 8px; }
.more-list button { text-align: left; padding: 12px 14px; }
.more-list button[hidden] { display: none; }
@media (max-width: 999px) {
  /* phones and tablets: the sections as a bottom tab bar, within thumb reach; the header only holds the sub-switch */
  nav#tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; margin: 0; gap: 0; display: grid; grid-template-columns: repeat(4, 1fr);
    background: var(--bg); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); overflow: visible; }
  nav#tabs button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0 9px; font-size: 12px;
    border-bottom: 0; border-top: 2px solid transparent; }
  nav#tabs button.on { border-top-color: var(--accent); }
  .nav-ico { display: block; font-size: 19px; line-height: 22px; height: 22px; }
  .who-ico { width: 22px; border-radius: 50%; background: var(--line); color: var(--fg); font-size: 13px; font-weight: 700; text-align: center; }
  body { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
  footer { margin-bottom: 0; }
}
@media (min-width: 1000px) {
  header { display: flex; align-items: flex-end; gap: 28px; padding: 0 32px; }
  header .subnav { margin: 0 0 8px auto; min-width: 280px; }
  #browse-opts { grid-template-columns: auto auto; justify-content: space-between; align-items: center; }
  #browse-show button, #browse-sort button { padding: 6px 12px; }
}

.ipair-q { text-align: center; font-size: 17px; color: var(--fg); margin: 4px 0 12px; }
.subnav button { white-space: nowrap; }
@media (min-width: 1000px) { header .subnav { min-width: 360px; } }
@media (max-width: 999px) { #ipair .pick > img, #ipair .pick > .noposter { aspect-ratio: 4/5; } .ipair-q { margin: 0 0 8px; } }

/* the filter bar sits in the header on every section, beside the Rate / Discover switch */
@media (max-width: 999px) {
  header { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; }
  header .subnav { flex: 1; margin: 8px 0; max-width: none; }
  #gfbar { flex: none; margin: 8px 0; }
  #gfbar:has(.pills:not(:empty)) { flex-basis: 100%; margin-top: 0; }
  #subnav[hidden] + #gfbar { flex-basis: 100%; }
}
@media (min-width: 1000px) {
  #gfbar { align-self: center; margin-left: 12px; }
  header .subnav + #gfbar { margin-left: 12px; }
}

#recs-top[hidden] { display: none; }

/* Meh: a plain "no like", not a red rejection */
.round.meh { color: var(--fg); border-color: var(--muted); font-size: 34px; line-height: 1; }
.desk-ans.meh { color: var(--fg); border-color: var(--muted); }
.stamp.no:not(.skip) { color: var(--muted); }

.fnote { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--muted); }

/* details: where it's streaming */
.where { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 4px 0 10px; font-size: 14px; }
.where-list { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.svc { padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; }
.svc.mine { background: var(--sel-bg); color: var(--sel-fg); border-color: var(--sel-bg); }
.where-date { font-size: 12px; }
.pick-more .where { margin: 0; font-size: 12px; }

/* server version: pairing code, devices, access requests */
#more-extra { margin-top: 14px; }
.code-big { font-size: 34px; font-weight: 700; letter-spacing: 6px; font-variant-numeric: tabular-nums; margin: 6px 0; }
.request { padding: 10px 0; border-bottom: 1px solid var(--line); }
.request input, .request select { font: inherit; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--fg); }
