/* ===========================================================================
 * The Movies — base styles
 * =========================================================================== */

:root {
  /* Palette */
  --bg:        #F2EBD7;
  --bg-soft:   #E7DFC4;
  --surface:   #FFFFFF;
  --surface-2: #FBF5E4;
  --ink:       #1F1F1F;
  --ink-2:     #3A3A3A;
  --muted:     #6E6E6E;
  --muted-2:   #9A9A9A;
  --line:      #D9D0B4;
  --line-2:    #C5B998;

  --forest:    #1F3D2E;
  --forest-d:  #142A20;
  --gold:      #D6B27C;
  --gold-d:    #B8945F;
  --gold-soft: #E5C895;
  --accent:    #1F3D2E;
  --accent-d:  #142A20;

  --good:      #2E7D5B;
  --warn:      #B4731F;
  --bad:       #B4232A;

  /* Type */
  --serif: "Fraunces", Georgia, serif;
  --sans:  "Inter", -apple-system, system-ui, sans-serif;

  /* Spacing */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;

  /* Radius */
  --r-1: 6px; --r-2: 12px; --r-3: 20px; --r-4: 28px;

  /* Shadow */
  --shadow-1: 0 1px 2px rgba(27,23,20,.04), 0 4px 12px rgba(27,23,20,.04);
  --shadow-2: 0 4px 16px rgba(27,23,20,.06), 0 12px 40px rgba(27,23,20,.08);
  --shadow-3: 0 24px 80px rgba(27,23,20,.12);

  /* Motion */
  --ease: cubic-bezier(.2,.7,.2,1);

  /* Mood palette — used by .mood-* tints */
  --mood-thoughtful: #6B7C53;
  --mood-gripping:   #8B5A3C;
  --mood-funny:      #C58A35;
  --mood-dark:       #3A3A48;
  --mood-inspiring:  #4F7C72;
  --mood-tense:      #7B2A2A;
  --mood-warm:       #B07238;
}

body.theme-dark {
  --bg:        #0E1F18;
  --bg-soft:   #142A20;
  --surface:   #1B3327;
  --surface-2: #142A20;
  --ink:       #F2EBD7;
  --ink-2:     #DDD3B6;
  --muted:     #9AB0A0;
  --muted-2:   #6E8678;
  --line:      #214333;
  --line-2:    #2B5644;
  --accent:    #D6B27C;
  --accent-d:  #B8945F;
}
@media (prefers-color-scheme: dark) {
  body:not(.theme-light) {
    --bg:        #0E1F18;
    --bg-soft:   #142A20;
    --surface:   #1B3327;
    --surface-2: #142A20;
    --ink:       #F2EBD7;
    --ink-2:     #DDD3B6;
    --muted:     #9AB0A0;
    --muted-2:   #6E8678;
    --line:      #214333;
    --line-2:    #2B5644;
    --accent:    #D6B27C;
    --accent-d:  #B8945F;
  }
}

/* ----- Reset / base ----- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
input, textarea, select { font: inherit; color: inherit; }

/* ----- Layout ----- */
.app {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--s-4) var(--s-4) calc(var(--s-9) + env(safe-area-inset-bottom, 0px));
}

/* ----- Topbar ----- */
.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-3) var(--s-2);
  margin-bottom: var(--s-5);
  border-bottom: 1px solid var(--line);
}
.topbar__brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.1;
}
.topbar__brand small {
  display: block;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}
.topbar__nav {
  display: flex; gap: var(--s-2); justify-self: center;
}
.topbar__actions { display: flex; gap: var(--s-2); justify-self: end; }

.navtab {
  background: transparent;
  border: 1px solid transparent;
  padding: 8px 14px;
  border-radius: 100px;
  color: var(--muted);
  font-weight: 500;
  font-size: 14px;
}
.navtab:hover { color: var(--ink); background: var(--surface-2); }
.navtab.active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

/* ----- View switcher ----- */
.view { display: none; }
.view.active { display: block; }

/* ----- Page head ----- */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-4);
  margin-bottom: var(--s-5);
}
.page-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 32px;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.05;
}
.page-sub {
  color: var(--muted);
  margin: 4px 0 0;
  font-size: 13px;
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 10px 18px;
  border-radius: var(--r-2);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--bg);
  font-weight: 500;
  transition: transform .12s var(--ease), background .12s var(--ease);
}
.btn:hover { background: var(--accent-d); border-color: var(--accent-d); text-decoration: none; }
.btn:active { transform: scale(.96); }
.btn--ghost {
  background: transparent;
  color: var(--accent);
}
.btn--ghost:hover { background: var(--surface-2); }
.btn--sm { padding: 6px 12px; font-size: 13px; }

.tappable {
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(31,61,46,.12);
  touch-action: manipulation;
  user-select: none;
}

/* ----- Status banner ----- */
.status-banner {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  padding: var(--s-3) var(--s-4);
  margin-bottom: var(--s-4);
  color: var(--ink-2);
  font-size: 14px;
}
.status-banner.is-bad { border-color: var(--bad); color: var(--bad); }

/* ----- Feed (picks grouped by mood) ----- */
.feed {
  display: flex; flex-direction: column; gap: var(--s-7);
}
.mood-group__header {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 var(--s-3);
  display: inline-block;
  padding: 4px 14px;
  border-radius: 100px;
  background: var(--mood-tint, var(--surface-2));
  color: white;
}
.mood-group__cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--s-4);
}

/* ----- Pick card (horizontal poster + body) ----- */
.pick {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  overflow: hidden;
  display: grid;
  grid-template-columns: 120px 1fr;
  box-shadow: var(--shadow-1);
  transition: transform .12s var(--ease), box-shadow .12s var(--ease);
}
.pick:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.pick__poster {
  aspect-ratio: 2/3;
  background: var(--bg-soft);
  background-size: cover;
  background-position: center;
}
.pick__poster--ph {
  display: flex; align-items: center; justify-content: center;
  color: var(--muted-2); font-size: 24px;
}
.pick__body {
  padding: var(--s-3) var(--s-4) var(--s-4);
  display: flex; flex-direction: column; gap: var(--s-2);
}
.pick__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.15;
  margin: 0;
  color: var(--ink);
}
.pick__meta {
  font-size: 12px;
  color: var(--muted);
}
.pick__tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font: 600 9px/1 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: 100px;
}
.tag--mood { color: white; }
.tag--conf {
  background: var(--gold-soft);
  color: #5E3F12;
  border: 1px solid var(--gold-d);
}
.tag--svc {
  background: var(--surface-2);
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.pick__reason {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.5;
  margin: 0;
}

/* mood color classes */
.mood-thoughtful { background: var(--mood-thoughtful); }
.mood-gripping   { background: var(--mood-gripping); }
.mood-funny      { background: var(--mood-funny); }
.mood-dark       { background: var(--mood-dark); }
.mood-inspiring  { background: var(--mood-inspiring); }
.mood-tense      { background: var(--mood-tense); }
.mood-warm       { background: var(--mood-warm); }

/* ----- Library poster grid ----- */
.filter-row {
  display: flex;
  gap: var(--s-2);
  flex-wrap: wrap;
  margin-bottom: var(--s-4);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--line);
}
.chip {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 100px;
}
.chip:hover { background: var(--bg-soft); }
.chip.chip--active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.grid-posters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--s-4);
}
.poster-card {
  background: var(--surface);
  border-radius: var(--r-2);
  overflow: hidden;
  border: 1px solid var(--line);
  display: block;
  color: inherit;
  transition: transform .12s var(--ease), box-shadow .12s var(--ease);
}
.poster-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); text-decoration: none; }
.poster-card__img {
  aspect-ratio: 2/3;
  background: var(--bg-soft);
  background-size: cover;
  background-position: center;
}
.poster-card__img--ph {
  display: flex; align-items: center; justify-content: center;
  color: var(--muted-2); font-size: 28px;
}
.poster-card__body {
  padding: var(--s-3);
  display: flex; flex-direction: column; gap: 2px;
}
.poster-card__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  margin: 0;
  /* truncate to 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.poster-card__meta {
  font-size: 11px;
  color: var(--muted);
}
.poster-card__rating {
  font-size: 11px;
  color: var(--gold-d);
  font-weight: 600;
}

/* ----- Bulk select mode ----- */
.poster-card__check {
  position: absolute;
  top: 8px; right: 8px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  border: 2px solid var(--surface);
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
  display: none;
  align-items: center; justify-content: center;
  color: transparent;
  font-size: 14px;
  font-weight: 700;
}
.poster-card { position: relative; }

body.is-selecting .poster-card__check { display: flex; }
body.is-selecting .poster-card:hover { transform: none; }
body.is-selecting .poster-card.is-selected {
  outline: 3px solid var(--accent);
  outline-offset: -1px;
}
body.is-selecting .poster-card.is-selected .poster-card__check {
  background: var(--accent);
  border-color: var(--surface);
  color: white;
}

.bulk-bar {
  position: fixed;
  left: 50%;
  bottom: calc(var(--s-4) + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateZ(0);
  will-change: transform;
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-3) var(--s-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 100px;
  box-shadow: var(--shadow-3);
  z-index: 40;
  max-width: calc(100vw - var(--s-4) * 2);
}
.bulk-bar__count {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}
.bulk-bar__actions { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.bulk-bar__danger {
  background: var(--bad);
  border-color: var(--bad);
}
.bulk-bar__danger:hover { background: #8E1A20; border-color: #8E1A20; }

@media (max-width: 720px) {
  .bulk-bar {
    left: var(--s-2); right: var(--s-2);
    transform: none translateZ(0);
    border-radius: var(--r-3);
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .bulk-bar__actions { justify-content: center; }
}

/* ----- Search (Add view) ----- */
.search-row {
  display: flex; gap: var(--s-2); margin-bottom: var(--s-4);
}
.search-input {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--r-2);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 16px;
}
.search-input:focus { outline: 2px solid var(--accent); outline-offset: 2px; }

.search-results {
  display: flex; flex-direction: column; gap: var(--s-3);
}
.result {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: var(--s-4);
  align-items: center;
  padding: var(--s-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
}
.result__poster {
  width: 60px; aspect-ratio: 2/3;
  background: var(--bg-soft);
  border-radius: var(--r-1);
  background-size: cover;
  background-position: center;
}
.result__title { font-family: var(--serif); font-weight: 600; font-size: 16px; line-height: 1.2; margin: 0; }
.result__meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.result__actions { display: flex; gap: 6px; }

/* ----- Movie detail ----- */
#movie-back-btn { margin-bottom: var(--s-4); }
.detail {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--s-6);
  background: var(--surface);
  border-radius: var(--r-3);
  padding: var(--s-5);
  border: 1px solid var(--line);
}
.detail__poster {
  width: 220px; aspect-ratio: 2/3;
  background: var(--bg-soft);
  border-radius: var(--r-2);
  background-size: cover;
  background-position: center;
}
.detail__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 32px;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
  line-height: 1.05;
}
.detail__tagline { color: var(--muted); font-style: italic; margin: 0 0 var(--s-3); font-size: 14px; }
.detail__meta { color: var(--muted); font-size: 13px; margin-bottom: var(--s-3); }
.detail__overview { font-size: 14px; line-height: 1.6; margin: 0 0 var(--s-4); color: var(--ink-2); }
.detail__row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: var(--s-3); }
.detail__actions { display: flex; gap: var(--s-2); flex-wrap: wrap; margin-top: var(--s-4); }

.star-picker { display: inline-flex; gap: 4px; }
.star {
  font-size: 24px;
  color: var(--line-2);
  background: transparent;
  border: none;
  padding: 4px;
}
.star.active, .star:hover, .star:hover ~ .star.would-clear { color: var(--gold-d); }
.star-picker:not(:hover) .star.active { color: var(--gold-d); }

/* ----- Empty / login ----- */
.empty {
  text-align: center;
  padding: var(--s-8) var(--s-4);
  color: var(--muted);
}
.empty__icon { font-size: 48px; opacity: .5; margin-bottom: var(--s-4); }
.empty__title {
  font-family: var(--serif);
  font-size: 24px;
  color: var(--ink);
  margin: 0 0 var(--s-2);
}

.login {
  max-width: 360px;
  margin: 12vh auto 0;
  padding: var(--s-7) var(--s-6);
  background: var(--surface);
  border-radius: var(--r-3);
  box-shadow: var(--shadow-2);
  text-align: center;
}
.login__brand {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 var(--s-2);
}
.login__sub { color: var(--muted); margin: 0 0 var(--s-6); font-size: 14px; }
.login__input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--r-2);
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 18px;
  letter-spacing: 0.2em;
  text-align: center;
  margin-bottom: var(--s-3);
}
.login__input:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.login__error { color: var(--bad); font-size: 13px; min-height: 18px; margin-bottom: var(--s-2); }
.login__btn { width: 100%; justify-content: center; }

/* ----- Toast ----- */
.toast {
  position: fixed;
  right: var(--s-4);
  bottom: calc(var(--s-4) + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  box-shadow: var(--shadow-2);
  padding: var(--s-3) var(--s-4);
  max-width: 320px;
  transform: translateZ(0);
  will-change: transform;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
  z-index: 50;
}
.toast--hidden {
  opacity: 0;
  transform: translateY(8px) translateZ(0);
  pointer-events: none;
}

/* ----- Responsive ----- */
@media (max-width: 720px) {
  .app { padding: var(--s-2); }
  .topbar {
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    padding: var(--s-2);
    gap: var(--s-2);
  }
  .topbar__nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    justify-content: center;
  }
  .topbar__brand { font-size: 18px; }
  .topbar__brand small { font-size: 9px; }
  .page-title { font-size: 26px; }
  .page-head { flex-direction: column; align-items: stretch; }
  .pick { grid-template-columns: 90px 1fr; }
  .grid-posters { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .detail { grid-template-columns: 1fr; padding: var(--s-4); }
  .detail__poster { width: 160px; margin: 0 auto; }
  .detail__title { font-size: 24px; }
}

/* ===========================================================================
 * Phase 5 + 6 — Triage, Recap, Surprise-me (v0.3.0)
 * =========================================================================== */

.page-head__actions {
  display: flex;
  gap: var(--s-2);
  flex-wrap: wrap;
  align-items: center;
}

/* ----- Triage / quick-rate ----- */
.rate-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-5);
  padding: var(--s-5) 0 var(--s-7);
}
.rate-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  box-shadow: var(--shadow-1);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-4);
  max-width: 420px;
  width: 100%;
  text-align: center;
}
.rate-card__poster {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 2/3;
  background: var(--bg-soft);
  background-size: cover;
  background-position: center;
  border-radius: var(--r-2);
  box-shadow: var(--shadow-2);
}
.rate-card__poster--ph {
  display: flex; align-items: center; justify-content: center;
  color: var(--muted-2); font-size: 64px;
}
.rate-card__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}
.rate-card__meta {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.rate-card__stars {
  display: inline-flex;
  gap: var(--s-1);
  padding: var(--s-2) 0;
}
.rate-card__stars .star { font-size: 38px; padding: 6px; }
.rate-card__row {
  display: flex; gap: var(--s-2); flex-wrap: wrap; justify-content: center;
}
.rate-progress {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.rate-progress strong { color: var(--ink); font-weight: 600; }
.rate-card .btn--danger {
  background: transparent;
  color: var(--bad);
  border-color: var(--line);
}
.rate-card .btn--danger:hover { background: rgba(180,35,42,.06); border-color: var(--bad); }

/* ----- Year recap ----- */
.recap__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-4);
  margin: var(--s-4) 0 var(--s-6);
  flex-wrap: wrap;
}
.recap__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 48px;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0;
}
.recap__year-select {
  padding: 8px 12px;
  border-radius: var(--r-2);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 14px;
}
.recap__year-select:focus { outline: 2px solid var(--accent); outline-offset: 2px; }

.recap-body {
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
}
.recap__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--s-3);
}
.recap__stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  padding: var(--s-4);
}
.recap__stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0 0 var(--s-2);
}
.recap__stat-value {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 28px;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1;
}
.recap__stat-sub {
  font-size: 12px;
  color: var(--muted);
  margin: 4px 0 0;
}

.recap__columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-5);
}
.recap__col {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  padding: var(--s-5);
}
.recap__col h2 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 var(--s-4);
  letter-spacing: -0.01em;
}
.recap__bar {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--s-3);
  padding: 6px 0;
  font-size: 14px;
}
.recap__bar-name { color: var(--ink); }
.recap__bar-count { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.recap__bar-track {
  grid-column: 1 / -1;
  height: 6px;
  background: var(--bg-soft);
  border-radius: 100px;
  overflow: hidden;
}
.recap__bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 100px;
}

.recap__highlights {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--s-3);
}
.recap__highlight {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--s-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  color: inherit;
}
.recap__highlight:hover { text-decoration: none; box-shadow: var(--shadow-1); }
.recap__highlight-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
}
.recap__highlight-meta { font-size: 11px; color: var(--muted); }
.recap__highlight-rating { font-size: 12px; color: var(--gold-d); font-weight: 600; }

.recap__empty {
  text-align: center;
  padding: var(--s-7) var(--s-4);
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--r-2);
}

@media (max-width: 720px) {
  .recap__title { font-size: 36px; }
  .recap__columns { grid-template-columns: 1fr; }
}

/* ----- Surprise modal ----- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-4);
  transform: translateZ(0);
  will-change: transform;
  transition: opacity .15s var(--ease);
}
.modal--hidden { opacity: 0; pointer-events: none; }
.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(20,20,20,.45);
}
.modal__sheet {
  position: relative;
  background: var(--surface);
  border-radius: var(--r-3);
  box-shadow: var(--shadow-3);
  border: 1px solid var(--line);
  padding: var(--s-5);
  max-width: 520px;
  width: 100%;
  max-height: calc(100dvh - var(--s-6));
  overflow-y: auto;
}
.modal__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--s-3);
}
.modal__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.01em;
  margin: 0;
}
.modal__close {
  background: transparent; border: none;
  font-size: 26px; line-height: 1;
  color: var(--muted);
  padding: 4px 10px;
}
.modal__close:hover { color: var(--ink); }
.modal__actions {
  display: flex; gap: var(--s-2);
  justify-content: flex-end;
  margin-top: var(--s-4);
  flex-wrap: wrap;
}

.surprise-form { display: flex; flex-direction: column; gap: var(--s-3); }
.surprise-field {
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  padding: var(--s-3) var(--s-4);
  margin: 0;
}
.surprise-field legend {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding: 0 6px;
}
.surprise-opts {
  display: flex; gap: var(--s-3); flex-wrap: wrap;
  font-size: 14px;
  margin-top: var(--s-1);
}
.surprise-opts label {
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer;
}
.surprise-result {
  display: none;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  padding: var(--s-3);
}
.surprise-result.is-shown { display: block; }
.surprise-result__row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--s-3);
  align-items: center;
}
.surprise-result__poster {
  width: 80px; aspect-ratio: 2/3;
  background: var(--bg-soft);
  background-size: cover; background-position: center;
  border-radius: var(--r-1);
}
.surprise-result__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
  margin: 0 0 2px;
}
.surprise-result__meta { font-size: 12px; color: var(--muted); }
.surprise-result__reason { font-size: 13px; color: var(--ink-2); margin: var(--s-2) 0 0; }
.surprise-result__actions { margin-top: var(--s-3); display: flex; gap: var(--s-2); }

.surprise-empty {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
}

/* ----- Score badges (Metacritic + IMDb from OMDB) ----- */
.score-row {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin: var(--s-2) 0 var(--s-1);
}
.score {
  font: 700 11px/1 var(--sans);
  letter-spacing: 0.04em;
  padding: 4px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
}
.score--mc.mc-great { background: #1B7C3D; color: #fff; }
.score--mc.mc-good  { background: #C5A22A; color: #1F1F1F; }
.score--mc.mc-ok    { background: #B4731F; color: #fff; }
.score--imdb {
  background: #F5C518;
  color: #1F1F1F;
}
.poster-card .score-row { margin: 4px 0 0; }
.poster-card .score { font-size: 10px; padding: 3px 5px; }
