/* Inter + IBM Plex Mono are loaded via <link> in each page <head>. */

/* Design system — editorial, image-led, print restraint (see DESIGN.md).
   The film image is the design; UI chrome is quiet scaffolding. */
:root {
  --bg: #f8f6f2;            /* warm off-white */
  --panel: #f8f6f2;         /* flattened toward bg — avoid card-in-card */
  --panel-dark: #1a1814;    /* dark typographic (no-poster) cards */
  --paper: #ffffff;         /* elevated surface, used sparingly */
  --surface: #ffffff;
  --ink: #1a1814;           /* near-black, warm undertone */
  --text: #4f4943;          /* secondary labels, descriptions */
  --muted: #6f675f;         /* mono metadata: director, year, runtime */
  --line: #c9c2b8;          /* hairline dividers only */
  --border: #c9c2b8;
  --accent: #1a1814;        /* no colour accent — posters are the palette */
  --accent-soft: #f1efea;
  --save: #1a1814;
  --save-soft: #f1efea;
  --save-ink: #1a1814;
  --display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", "Courier New", monospace;
  --radius-lg: 4px;
  --radius-md: 4px;
  --radius-pill: 0px;
  --radius-card: 4px;
  --radius-input: 2px;
  --control-height: 46px;
  --control-height-compact: 38px;
  --control-padding-x: 18px;
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 32px;
  --space-lg: 64px;
  --space-xl: 120px;
  --max-width: 1080px;
  --card-gap: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}

a,
button,
input {
  font: inherit;
}

a,
button,
h1,
h2,
h3,
p,
.card-title,
.match-meta {
  overflow-wrap: anywhere;
}

button {
  cursor: pointer;
}

.page-shell {
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.app-topbar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.account-button,
.privacy-link {
  display: inline-flex;
  min-height: var(--control-height);
  align-items: center;
  justify-content: center;
  padding: 0 var(--control-padding-x);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--paper);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}

.privacy-link {
  width: auto;
}

.account-button:hover,
.privacy-link:hover,
.account-button.is-authenticated {
  border-color: var(--accent);
  color: var(--accent);
}

.account-button:disabled,
button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.onboarding-overlay,
.account-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
}

.account-overlay {
  z-index: 40;
}

.onboarding-backdrop,
.account-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, 0.35);
}

.onboarding-dialog,
.account-auth-dialog,
.account-pane {
  position: absolute;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(20, 20, 20, 0.22);
}

.onboarding-dialog {
  top: 50%;
  left: 50%;
  width: min(560px, calc(100% - 32px));
  transform: translate(-50%, -50%);
  padding: 28px;
  border-radius: var(--radius-lg);
}

.onboarding-dialog h2,
.account-auth-dialog h2,
.privacy-card h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.account-pane h2 {
  margin: 0;
  max-width: 100%;
  font-size: clamp(1.8rem, 7vw, 2.8rem);
  line-height: 1;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.onboarding-dialog p,
.account-copy,
.account-pane__head p,
.account-privacy-copy,
.account-import-card p,
.privacy-card p {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.6;
}

.onboarding-actions,
.account-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 20px;
}

.overlay-close-button {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font-size: 1.25rem;
  line-height: 1;
}

.account-auth-dialog {
  top: 50%;
  left: 50%;
  width: min(480px, calc(100% - 32px));
  transform: translate(-50%, -50%);
  padding: 28px;
  border-radius: var(--radius-lg);
}

.account-pane {
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: min(420px, 100%);
  height: 100%;
  padding: 30px;
  overflow-y: auto;
}

.account-pane__head {
  display: grid;
  gap: 8px;
  padding-right: 34px;
}

.account-pane__actions,
.account-form {
  display: grid;
  gap: 10px;
}

.account-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.account-form .ghost-button,
.account-pane__actions .card-link-button {
  width: 100%;
  min-height: 48px;
  justify-content: center;
}

.account-notice,
.account-setup-note,
.account-import-card {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--text);
  line-height: 1.5;
}

.account-notice-error {
  border-color: #9f4527;
  color: #7a2414;
}

.danger-button {
  border-color: #9f4527;
  color: #7a2414;
}

.privacy-page-shell {
  max-width: 920px;
}

.privacy-card {
  display: grid;
  gap: 22px;
  background: var(--panel);
}

.privacy-card section {
  display: grid;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.privacy-card h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2vw, 2rem);
}

.saved-page-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.saved-page-header,
.saved-page-list-card {
  background: var(--panel);
}

.saved-page-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}

.saved-page .page-shell h1 {
  margin: 0;
  font-size: clamp(2.8rem, 8vw, 5.8rem);
}

.saved-page-header__copy {
  max-width: 58ch;
}

.saved-page-header__back {
  min-width: 180px;
  max-width: 220px;
}

.saved-page-main {
  display: block;
}

.saved-films-list-shell {
  min-height: 220px;
}

.saved-films-list {
  display: grid;
  gap: 12px;
}

.saved-film-row {
  border: 1px solid var(--line);
  background: var(--paper);
}

.saved-film-row__summary {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 16px 18px;
}

.saved-film-row__meta {
  min-width: 0;
}

.saved-film-row__title {
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  line-height: 1;
}

.saved-film-row__subline {
  margin: 8px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.6;
}

.saved-film-row__actions {
  flex-shrink: 0;
  width: 160px;
}

.saved-film-row__toggle {
  min-height: 46px;
}

.saved-film-row__detail {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  border-top: 1px solid var(--line);
}

.saved-film-row__detail .poster-block {
  aspect-ratio: auto;
  min-height: 100%;
}

.saved-film-row__detail .card-body {
  padding: 18px;
}

.saved-films-empty-state {
  display: grid;
  gap: 14px;
  text-align: left;
}

.saved-films-empty-state p {
  max-width: 40ch;
}

.saved-films-empty-state__link {
  max-width: 240px;
}

.text-button:hover {
  color: var(--accent);
}

.saved-sidebar-button {
  width: 100%;
  min-height: 46px;
}

.saved-sidebar-button.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.saved-sidebar-summary {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.58fr) minmax(300px, 0.78fr);
  gap: 22px;
  align-items: stretch;
  margin: 0 0 24px;
}

.hero-copy,
.hero-panel,
.card,
.result-card,
.empty-state,
.search-result {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: none;
}

.hero-copy,
.hero-panel,
.card {
  background: var(--panel);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 560px;
  padding: clamp(24px, 3vw, 42px);
  background:
    linear-gradient(180deg, rgba(248, 246, 242, 0.5) 0%, rgba(248, 246, 242, 0.28) 50%, rgba(248, 246, 242, 0.82) 100%),
    var(--hero-image, url("./assets/images/hero/header-film-still.jpg")),
    var(--panel);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.eyebrow,
.panel-label,
.field-label,
.field-label-row,
.match-meta,
.expanded-stat-label,
.expanded-reason-label,
.criterion-subtitle,
.results-subtitle,
.section-heading p,
.empty-state p {
  font-family: var(--mono);
}

.eyebrow,
.panel-label {
  margin: 0 0 12px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

h1,
h2,
h3,
.card-title,
.empty-state h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: 0;
}

h1 {
  display: flex;
  flex-direction: column;
  gap: 0.02em;
  margin: 16px 0 0;
  font-size: clamp(5.2rem, 12vw, 11rem);
  text-transform: none;
}

.hero-indent {
  margin-left: 17vw;
  color: var(--ink);
}

.hero-text {
  max-width: 58ch;
  margin: 24px 0 0;
  font-size: clamp(1.08rem, 1.3vw, 1.22rem);
  font-weight: 500;
  line-height: 1.62;
  color: var(--ink);
}

.hero-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 34px;
}

.hero-link {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 112px;
  align-items: center;
  justify-content: center;
  padding: 20px 22px;
  border: none;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  text-align: center;
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.hero-link:hover {
  background: var(--accent-soft);
  border-color: var(--ink);
  box-shadow: 0 14px 28px rgba(26, 24, 20, 0.16);
  transform: translateY(-2px);
}

.hero-link__title {
  font-family: var(--body);
  font-size: clamp(1.08rem, 1.5vw, 1.32rem);
  font-weight: 400;
  letter-spacing: 0;
  color: inherit;
}

.hero-link__hint {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
  color: rgba(26, 24, 20, 0.66);
}

.browse-search {
  margin-bottom: 16px;
}

.browse-search__input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--paper);
  color: var(--ink);
  font-size: 0.9rem;
  font-family: var(--body);
  box-sizing: border-box;
}

.browse-search__input:focus {
  outline: none;
  border-color: var(--accent);
}

.hero-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  background: var(--panel-dark);
  border-color: var(--panel-dark);
  color: #ffffff;
}

.hero-panel .panel-label {
  color: rgba(255, 255, 255, 0.72);
}

.rotating-film-quote {
  margin: 0;
  max-width: 20ch;
  font-family: var(--body);
  font-size: 22px;
  font-weight: 300;
  line-height: 1.25;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.9);
  opacity: 0;
  transition: opacity 1.2s linear;
}

.rotating-film-quote.is-visible {
  opacity: 1;
}

.quote-text,
.quote-film,
.quote-credit {
  display: block;
}

.quote-text {
  font-size: clamp(1.3rem, 2.2vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: 0;
}

.quote-film {
  margin-top: 18px;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.92);
}

.quote-credit {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.64);
}

.home-flow {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.card {
  padding: clamp(22px, 2.3vw, 32px);
}

.controls.card {
  position: sticky;
  top: 16px;
}

.section-heading {
  margin-bottom: 0;
  padding-top: 8px;
}

.section-heading h2,
.results-head h2 {
  font-size: clamp(1.5rem, 2.4vw, 2.4rem);
  text-transform: none;
}

.results-head h2 {
  white-space: normal;
}

.section-heading p,
.results-subtitle,
.criterion-subtitle,
.empty-state p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.7;
}

.field-label,
.field-label-row {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.field-label-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.taste-refine-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px;
  background: rgba(236, 235, 230, 0.72);
}

.taste-refine-summary {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.taste-refine-summary {
  align-items: center;
}

.taste-refine-summary__copy {
  min-width: 0;
  max-width: 56ch;
}

.taste-refine-summary__copy h2 {
  font-size: clamp(1.3rem, 2vw, 2rem);
}

.taste-refine-summary__copy p {
  margin: 8px 0 0;
}

.taste-refine-summary .selected-seeds {
  flex: 1;
  margin: 0;
}

.taste-refine-panel {
  display: block;
  padding-top: 8px;
  border-top: 1px solid rgba(199, 199, 199, 0.72);
}

.search-area,
.director-area,
.bookmarks-area {
  margin-bottom: 24px;
}

.controls .director-area:last-of-type,
.controls .bookmarks-area:last-of-type {
  margin-bottom: 0;
}

.search-row {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}

.director-area .field-label-row {
  margin-bottom: 12px;
}

input {
  width: 100%;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 1rem;
}

input::placeholder {
  color: var(--muted);
}

input:focus {
  outline: none;
  border-color: var(--accent);
}

.ghost-button,
.text-button,
.search-result button,
.director-pill,
.card-link-button {
  transition:
    background-color 0.3s linear,
    border-color 0.3s linear,
    color 0.3s linear;
}

.ghost-button,
.search-result button,
.director-pill,
.card-link-button {
  display: inline-flex;
  min-height: var(--control-height);
  align-items: center;
  justify-content: center;
  padding: 0 var(--control-padding-x);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--paper);
  color: var(--ink);
  line-height: 1;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  text-wrap: balance;
}

.ghost-button {
  min-width: 132px;
  font-size: 0.92rem;
  font-weight: 800;
  text-transform: none;
}

.ghost-button:hover,
.search-result button:hover,
.director-pill:hover,
.card-link-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.text-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: none;
}

.search-results {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.selected-seeds {
  margin-bottom: 12px;
}

.selected-seed-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0;
}

.selected-seed-chip {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--paper);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: none;
}

.selected-seed-chip-secondary {
  color: var(--accent);
}

.selected-seed-chip-suggestion {
  background: rgba(245, 244, 240, 0.68);
  color: var(--text);
}

.selected-seed-empty {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.search-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: var(--paper);
}

.search-result strong,
.card-title {
  display: block;
}

.search-result strong {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.match-meta {
  margin-top: 4px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.search-result button {
  min-height: var(--control-height-compact);
  padding: 0 14px;
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: none;
}

.director-list,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.discovery-bookmarks {
  display: grid;
  gap: 10px;
  min-width: 190px;
}

.discovery-bookmarks__empty {
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.6;
}

.discovery-bookmark-pill {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  text-align: left;
  transition:
    background-color 0.25s linear,
    border-color 0.25s linear,
    color 0.25s linear;
}

.discovery-bookmark-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.discovery-bookmark-pill__title {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
}

.discovery-bookmark-pill__meta {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.director-pill {
  min-height: var(--control-height);
  padding: 0 14px;
  font-size: 0.92rem;
  font-weight: 700;
  text-transform: none;
}

.director-pill.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.results {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.recommendations-section {
  background: var(--panel);
}

.results-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  padding-top: 0;
}

.browse-layout {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.browse-filters {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top left, rgba(159, 69, 39, 0.08), transparent 34%),
    var(--paper);
}

.browse-filters__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.browse-filters__head h3 {
  font-size: clamp(1.6rem, 2.4vw, 2.3rem);
  text-transform: none;
}

.browse-filters__summary {
  margin: 0;
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.6;
}

.browse-facets {
  display: grid;
  gap: 18px;
}

.browse-facet {
  display: grid;
  gap: 8px;
}

.browse-facet__label {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.browse-facet__options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.browse-facet__chip {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.browse-facet__chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.browse-facet__chip.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--paper);
}

.browse-facet__chip.is-disabled,
.browse-facet__chip:disabled {
  opacity: 0.32;
  cursor: not-allowed;
  border-color: var(--line);
  color: var(--muted);
  background: transparent;
}

.browse-facet__chip.is-disabled:hover,
.browse-facet__chip:disabled:hover {
  border-color: var(--line);
  color: var(--muted);
  background: transparent;
}

.browse-facet__empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-style: italic;
}

.browse-results {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.browse-results__grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.browse-film-card .poster-block {
  aspect-ratio: 2 / 3;
}

.browse-film-card .card-body {
  gap: 6px;
  padding: 10px 10px 12px;
}

.browse-film-card .card-title {
  font-size: clamp(0.92rem, 1vw, 1.05rem);
  line-height: 1.1;
}

.browse-film-card .match-meta {
  margin-top: 0;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
}

.browse-film-card .discovery-card__rationale {
  font-size: 0.72rem;
  line-height: 1.4;
  -webkit-line-clamp: 1;
}

.browse-film-card .film-actions {
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.browse-film-card .film-actions .card-link-button {
  min-height: var(--control-height-compact);
  min-width: 0;
  padding: 0 8px;
  font-size: 0.72rem;
}

.browse-film-card .film-actions .discovery-dismiss-button {
  min-width: 0;
}

.browse-film-card .film-screening-preview {
  gap: 4px;
  margin-top: 0;
  padding: 8px;
}

.browse-film-card .screening-meta {
  font-size: 0.72rem;
  line-height: 1.35;
}

.browse-film-card .card-detail-toggle {
  font-size: 0.72rem;
}

.results-subtitle {
  max-width: 36ch;
}

.criterion-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.criterion-divider {
  height: 1px;
  background: var(--line);
}

.criterion-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
}

.criterion-head h3 {
  font-size: clamp(2.2rem, 3vw, 3.2rem);
  text-transform: none;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 24px;
}

/* --- Taste search ("films you love") --- */
.taste-search__sub {
  max-width: 60ch;
  margin: 4px 0 18px;
  color: var(--text);
  font-size: 0.98rem;
}
.taste-search__input {
  width: 100%;
  max-width: 640px;
  padding: 13px 16px;
  font-size: 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
}
.taste-search__input:focus {
  outline: none;
  border-color: var(--accent);
}
.taste-search__results {
  display: grid;
  gap: 6px;
  max-width: 640px;
  margin-top: 8px;
}
.taste-result {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}
.taste-result:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.taste-result__title {
  font-weight: 700;
  color: var(--ink);
}
.taste-result__meta {
  font-size: 0.82rem;
  color: var(--muted);
}
.taste-search__muted {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 8px 2px;
}
.taste-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 6px;
}
.taste-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: var(--save);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
}
.taste-chip--ghost {
  background: transparent;
  color: var(--muted);
  border: 1px dashed var(--line);
  font-weight: 500;
}
.taste-chip__x {
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0;
}
.taste-search__generate {
  margin-top: 16px;
}
.taste-recs-head {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin: 22px 0 0;
}
.taste-recs:not(:empty) {
  margin-top: 16px;
}

.results-grid-span {
  grid-column: 1 / -1;
}

.saved-results-empty-state {
  min-height: 220px;
}

.taste-quiz-shell,
.recommendation-empty-shell,
.discovery-shell {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
}

.taste-quiz-intro h3,
.recommendation-empty-shell h3,
.discovery-shell__head h3 {
  font-size: clamp(2rem, 3vw, 3rem);
  text-transform: none;
}

.taste-quiz-list {
  display: grid;
  gap: 14px;
}

.taste-card-swap-layout {
  display: grid;
  grid-template-columns: minmax(180px, 0.62fr) minmax(320px, 1fr);
  gap: 24px;
  align-items: center;
  min-height: 360px;
}

.taste-card-swap-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 260px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 20% 15%, rgba(159, 69, 39, 0.16), transparent 32%),
    linear-gradient(145deg, #f7f0df 0%, #e7e2d6 100%);
}

.taste-card-swap-copy h4 {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 2.6vw, 2.4rem);
  line-height: 0.98;
  text-transform: none;
}

.taste-card-swap-copy p:last-child,
.taste-card-swap-note {
  margin: 0;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.6;
}

.taste-card-swap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.taste-card-swap-stage {
  position: relative;
  min-height: 300px;
  perspective: 1200px;
  transform-style: preserve-3d;
}

.taste-swap-card {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(calc(100% - 78px), 560px);
  min-height: 235px;
  border-radius: 26px;
  box-shadow: 0 28px 70px rgba(28, 24, 18, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translate(calc(-50% + 84px), calc(-50% - 72px)) scale(0.88) rotate(8deg) skewY(4deg);
  transition:
    opacity 0.32s ease,
    transform 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.32s ease;
  will-change: transform, opacity;
}

.taste-swap-card.is-active {
  z-index: 4;
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1) rotate(-1deg) skewY(0deg);
}

.taste-swap-card.is-next {
  z-index: 3;
  opacity: 0.78;
  transform: translate(calc(-50% + 38px), calc(-50% - 28px)) scale(0.96) rotate(2deg) skewY(2deg);
}

.taste-swap-card.is-third {
  z-index: 2;
  opacity: 0.46;
  transform: translate(calc(-50% + 72px), calc(-50% - 54px)) scale(0.92) rotate(5deg) skewY(3deg);
}

.taste-swap-card.is-hidden {
  opacity: 0;
}

.taste-swap-card-complete {
  background:
    radial-gradient(circle at 85% 10%, rgba(159, 69, 39, 0.18), transparent 30%),
    #efeee8;
}

.taste-card-swap-controls {
  display: flex;
  justify-content: flex-end;
}

.taste-quiz-question {
  padding: 16px;
  border: 1px solid var(--line);
  background: #efeee8;
}

.taste-quiz-question__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.taste-quiz-question__count {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.taste-quiz-question h4 {
  font-size: 1.2rem;
  line-height: 1.1;
}

.taste-quiz-answers {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.taste-quiz-answer {
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--paper);
  padding: 11px 14px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
  transition:
    background-color 0.25s linear,
    border-color 0.25s linear,
    color 0.25s linear;
}

.taste-quiz-answer:hover,
.taste-quiz-answer.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.taste-quiz-footer,
.discovery-shell__footer,
.discovery-shell__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.taste-quiz-footer__copy,
.discovery-shell__summary,
.discovery-card__rationale {
  margin: 0;
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.6;
}

.taste-quiz-submit[disabled] {
  cursor: not-allowed;
  opacity: 0.45;
}

.discovery-grid-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.recommendation-stack {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.discovery-card__meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.discovery-card__meta .match-meta {
  margin-top: 0;
}

.discovery-card__rationale {
  min-height: 0;
}

.film-card .discovery-card__rationale {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.browse-film-card .card-detail-toggle {
  margin-top: 0;
}

.browse-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 6px;
}

.discovery-action-button.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.discovery-dismiss-button.is-active {
  border-color: var(--line);
  background: #ece7e0;
  color: var(--text);
}

.discovery-card-dismissed {
  opacity: 0.8;
}

.result-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--paper);
  min-height: 100%;
}

.result-card-expanded {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  align-items: stretch;
}

.poster-block {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #d7d7d1;
}

.result-card-expanded .poster-block {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: auto;
  min-height: 100%;
  padding: 0;
}

.poster-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.poster-monogram {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: flex-end;
  padding: 18px;
  background: #d3d1cb;
  color: var(--accent);
  font-family: var(--display);
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 800;
  letter-spacing: 0;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 14px 14px 16px;
}

.result-card-expanded .card-body {
  grid-column: 1;
  grid-row: 1;
  padding: 18px 18px 20px;
}

.card-title {
  font-size: clamp(1.35rem, 2vw, 1.9rem);
  font-weight: 700;
  line-height: 1;
  text-transform: none;
}

.card-title-link {
  color: inherit;
  text-decoration: none;
}

.card-title-link:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.card-actions {
  margin-top: auto;
  flex-direction: column;
}

.film-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: auto;
}

.film-actions .card-link-button {
  width: auto;
  min-height: var(--control-height);
}

.film-actions .discovery-dismiss-button {
  min-width: 112px;
  background: transparent;
  color: var(--muted);
}

.card-detail-toggle {
  align-self: flex-start;
  margin-top: 2px;
}

.film-screening-preview {
  display: grid;
  gap: 8px;
  margin-top: 2px;
  padding: 12px;
  border: 1px solid rgba(19, 81, 170, 0.28);
  background: var(--accent-soft);
}

.screening-kicker,
.screening-meta {
  margin: 0;
}

.screening-kicker {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.screening-meta {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.45;
}

.screening-book-button {
  min-height: 42px;
}

.result-card-expanded .card-actions {
  align-items: stretch;
}

.card-link-button {
  width: 100%;
  min-height: var(--control-height);
  padding: 0 var(--control-padding-x);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.result-card-expanded .card-link-button {
  width: 100%;
  min-height: var(--control-height);
}

.card-link-button-secondary {
  color: var(--accent);
}

.card-link-button-tertiary {
  background: var(--paper);
}

.film-actions .save-action-button {
  border-color: var(--save);
  background: var(--save);
  color: #fff;
}

.film-actions .save-action-button.is-active {
  border-color: rgba(15, 77, 44, 0.45);
  background: var(--save-soft);
  color: var(--save-ink);
}

.screening-book-button {
  background: var(--accent);
  color: #fff;
}

.card-expanded-panel {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.expanded-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 14px;
}

/* Rating block links out to Letterboxd */
a.expanded-stats-link {
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-md);
  transition: opacity 0.2s ease;
}
a.expanded-stats-link:hover {
  opacity: 0.72;
}
a.expanded-stats-link:hover .expanded-stat-label {
  color: var(--accent);
}
a.expanded-stats-link:hover strong {
  text-decoration: underline;
}

/* Prominent "See more" toggle on film cards */
.card-detail-toggle--prominent {
  display: inline-block;
  margin-top: 4px;
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.card-detail-toggle--prominent:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.expanded-stat {
  min-width: 180px;
}

.expanded-stat-label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.expanded-stat strong {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 700;
}

.expanded-reason {
  margin-bottom: 14px;
}

.expanded-availability {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

.availability-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.availability-label {
  display: block;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.availability-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.availability-chip,
.availability-link-listing {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

.availability-chip-muted {
  color: var(--muted);
}

.availability-link-listing {
  width: 100%;
  justify-content: flex-start;
}

.availability-chip:hover,
.availability-link-listing:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.expanded-reason-label {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.expanded-reason-copy,
.expanded-copy {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
}

.result-card-expanded .poster-image {
  object-fit: cover;
}

.empty-state {
  padding: 26px;
  background: var(--paper);
}

.recommendations-empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  text-align: center;
}

.recommendations-empty-state p {
  max-width: 34ch;
  margin: 0;
  color: var(--text);
  font-size: 12px;
  line-height: 1.7;
}

.browse-empty-state {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  gap: 16px;
}

.browse-empty-state h3 {
  margin-bottom: 0;
}

.browse-empty-state p {
  max-width: 46ch;
}

.search-empty-state h3,
.search-empty-state p {
  font-size: 0.82rem;
  line-height: 1.7;
}

.empty-state h3 {
  margin-bottom: 10px;
  font-family: var(--body);
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
}

.calendar-preview-section {
  background:
    radial-gradient(circle at top right, rgba(53, 102, 87, 0.35), transparent 35%),
    linear-gradient(180deg, #17352f 0%, #132c27 100%);
  padding: 24px;
  border-color: rgba(19, 44, 39, 0.92);
}

.cinema-showtimes {
  overflow: hidden;
  color: #f7f8f5;
}

.cinema-showtimes__head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.cinema-showtimes__head h2 {
  color: #ffffff;
  font-size: clamp(1.65rem, 2.7vw, 2.6rem);
}

.cinema-showtimes__head-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.cinema-showtimes__month {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0;
}

.cinema-showtimes__today {
  min-width: 92px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-weight: 700;
  transition:
    background-color 0.25s linear,
    border-color 0.25s linear,
    color 0.25s linear;
}

.cinema-showtimes__today:hover,
.cinema-showtimes__today.is-active {
  border-color: #d4e7df;
  background: #d4e7df;
  color: #17352f;
}

.cinema-showtimes__intro {
  margin: 10px 0 0;
  max-width: 48ch;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  line-height: 1.6;
}

.cinema-showtimes__updated {
  margin: 10px 0 0;
  font-family: var(--mono);
  color: rgba(255, 255, 255, 0.54);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cinema-showtimes__filters {
  display: grid;
  grid-template-columns: minmax(0, 260px);
  gap: 10px;
  margin-bottom: 18px;
}

.cinema-showtimes__filter {
  display: grid;
  gap: 6px;
}

.cinema-showtimes__filter-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.64);
}

.cinema-showtimes__filter-select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.95);
  color: #17352f;
  appearance: none;
}

.cinema-showtimes__calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 4px;
}

.cinema-week-day {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  transition:
    background-color 0.25s linear,
    border-color 0.25s linear,
    transform 0.25s ease;
}

.cinema-week-day:hover {
  border-color: rgba(212, 231, 223, 0.36);
  background: rgba(255, 255, 255, 0.09);
}

.cinema-week-day.is-active {
  border-color: var(--accent, rgba(212, 231, 223, 0.7));
  background: rgba(212, 231, 223, 0.16);
}

@media (max-width: 720px) {
  .cinema-showtimes__calendar {
    grid-template-columns: repeat(7, minmax(96px, 1fr));
    overflow-x: auto;
  }
}

.cinema-week-day__button {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  justify-content: flex-start;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.cinema-week-day__label,
.cinema-week-day__month,
.cinema-week-day__count {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cinema-week-day__label {
  color: rgba(255, 255, 255, 0.58);
}

.cinema-week-day__number {
  display: block;
  margin-top: 2px;
  font-family: var(--display);
  font-size: clamp(1.05rem, 1.35vw, 1.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #ffffff;
}

.cinema-week-day__month {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.46);
}

.cinema-week-day__count {
  display: block;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.72);
}

.cinema-week-day__summary {
  display: block;
  margin-top: 2px;
  font-size: 0.56rem;
  color: rgba(255, 255, 255, 0.42);
}

.cinema-showtimes__list-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.cinema-showtimes__selection {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cinema-showtimes__clear-film {
  color: rgba(255, 255, 255, 0.78);
}

.cinema-showtimes__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.cinema-showtimes-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 318px;
  border: 1px solid rgba(199, 199, 199, 0.88);
  border-radius: 32px;
  background: #f4f2ee;
}

.cinema-showtimes-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.cinema-showtimes-card__header {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  flex: 1;
}

.cinema-showtimes-card__meta {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  text-align: left;
}

.cinema-showtimes-card__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fbfaf7;
}

.cinema-showtimes-card__logo-fallback {
  color: #17352f;
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cinema-showtimes-card__logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cinema-showtimes-card__cinema-name {
  margin: 8px 0 0;
  color: #767676;
  font-size: 0.74rem;
  letter-spacing: 0.2em;
}

.cinema-showtimes-card .card-title {
  display: -webkit-box;
  margin-top: 12px;
  overflow: hidden;
  color: #141414;
  font-size: clamp(1.35rem, 1.9vw, 1.9rem);
  line-height: 0.98;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.cinema-showtimes-card__times {
  margin: 10px 0 0;
  font-family: var(--mono);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.6;
  text-transform: uppercase;
}

.cinema-showtimes-card__actions {
  margin-top: auto;
  padding-top: 24px;
  align-items: stretch;
}

.cinema-showtimes-card__actions .card-link-button,
.cinema-showtimes-card__missing-link {
  display: flex;
  width: 100%;
  min-height: 56px;
  align-items: center;
  justify-content: center;
}

.cinema-showtimes-card__actions .card-link-button {
  font-size: 0.82rem;
}

.cinema-showtimes-card-compact .card-title {
  font-size: clamp(1.15rem, 1.5vw, 1.45rem);
}

.cinema-showtimes-card__missing-link {
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: #ece7e0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
}

.cinema-showtimes__empty {
  border-radius: 0;
}

@media (max-width: 1120px) {
  .hero,
  .layout {
    grid-template-columns: 1fr;
  }

  .controls.card {
    position: static;
  }

  .hero-indent {
    margin-left: 8vw;
  }
}

@media (max-width: 960px) {
  .results-head,
  .criterion-head,
  .saved-page-header,
  .taste-refine-head,
  .taste-refine-summary,
  .cinema-showtimes__head,
  .cinema-showtimes__list-head,
  .taste-quiz-footer,
  .discovery-shell__footer,
  .discovery-shell__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .results-grid,
  .discovery-grid-cards,
  .cinema-showtimes__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .browse-results__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .browse-layout {
    grid-template-columns: 1fr;
  }

  .cinema-showtimes__filters {
    grid-template-columns: 1fr;
  }

  .cinema-showtimes__head-tools {
    width: 100%;
    justify-content: space-between;
  }

  .taste-card-swap-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .taste-card-swap-copy {
    min-height: 0;
  }

  .taste-refine-toggle,
  .discovery-bookmarks {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 18px, 1500px);
    padding-top: 12px;
  }

  .app-topbar {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .hero-copy,
  .hero-panel,
  .card {
    padding: 20px;
  }

  .hero-copy {
    min-height: 0;
  }

  .hero-links {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .hero-link {
    min-height: 92px;
  }

  h1 {
    font-size: clamp(4.1rem, 18vw, 7rem);
  }

  .hero-indent {
    margin-left: 0;
  }

  .search-row {
    flex-direction: column;
  }

  .ghost-button {
    width: 100%;
    min-height: 52px;
  }

  .results-grid,
  .discovery-grid-cards,
  .cinema-showtimes__list {
    grid-template-columns: 1fr;
  }

  .browse-results__grid {
    grid-template-columns: 1fr;
  }

  .recommendation-stack {
    grid-template-columns: 1fr;
  }

  .film-actions {
    grid-template-columns: 1fr;
  }

  .film-actions .card-link-button {
    width: 100%;
  }

  .cinema-showtimes__calendar {
    grid-template-columns: repeat(7, minmax(132px, 1fr));
  }

  .cinema-showtimes-card__header {
    grid-template-columns: 1fr;
  }

  .cinema-showtimes-card__logo {
    width: 67px;
    height: 67px;
  }

  .result-card-expanded {
    display: flex;
    flex-direction: column;
  }

  .result-card-expanded .poster-block {
    grid-column: auto;
    grid-row: auto;
    aspect-ratio: 4 / 3;
    min-height: 0;
  }

  .saved-film-row__summary,
  .saved-film-row__detail {
    grid-template-columns: 1fr;
    display: grid;
  }

  .saved-film-row__actions,
  .saved-page-header__back {
    width: 100%;
    max-width: none;
  }

  .taste-quiz-shell,
  .discovery-shell {
    padding: 18px;
  }

  .taste-card-swap-stage {
    min-height: 340px;
  }

  .taste-swap-card {
    width: calc(100% - 34px);
    min-height: 290px;
    padding: 18px;
  }

  .taste-swap-card.is-next {
    transform: translate(calc(-50% + 16px), calc(-50% - 18px)) scale(0.96) rotate(2deg) skewY(1deg);
  }

  .taste-swap-card.is-third {
    transform: translate(calc(-50% + 28px), calc(-50% - 34px)) scale(0.92) rotate(4deg) skewY(2deg);
  }

  .taste-card-swap-controls {
    justify-content: stretch;
  }
}

/* ============================================================
   DESIGN REFRESH — editorial system (DESIGN.md)
   Minimal · image-led · print restraint. Layered last to win.
   ============================================================ */

body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--bg);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.page-shell {
  width: min(var(--max-width), calc(100% - 48px));
  padding: 28px 0 var(--space-xl);
}

/* Flatten chrome — quiet scaffolding, no card-in-card layering */
.card,
.hero-copy,
.hero-panel,
.recommendations-section,
.taste-search.card,
.cinema-showtimes.card,
.saved-films-section.card,
.results.card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding-left: 0;
  padding-right: 0;
}

.home-flow > section {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}
.home-flow > section:first-child { border-top: none; padding-top: 0; }

/* Top-bar spacing (button styling + hero card treatment live in the
   refinements block at the end of this file). */
.app-topbar { gap: var(--space-md); margin-bottom: var(--space-md); }

/* Hero — editorial display serif headline */
h1 {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.98;
  font-size: clamp(3.4rem, 8vw, 5rem);
  text-transform: none;
  margin: var(--space-md) 0 0;
  color: #000000;
}
.hero-indent { margin-left: 0; }
.hero-text {
  font-family: var(--body);
  font-size: 1.2rem;
  line-height: 1.5;
  color: #000000;
  max-width: 46ch;
  margin-top: var(--space-md);
}

/* Hero CTAs — no card, no pill: quiet editorial links under a hairline */
.hero-links { gap: var(--space-md); margin-top: var(--space-lg); }
/* Hero CTAs render as the solid buttons defined in the base .hero-link block above. */

/* Eyebrows / section labels */
.eyebrow,
.panel-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 var(--space-sm);
}

/* Section headings + editorial prose */
h2 { font-family: var(--display); font-weight: 400; letter-spacing: -0.01em; font-size: 2rem; line-height: 1.1; }
h3 { font-family: var(--display); font-weight: 400; letter-spacing: -0.01em; }
.taste-search__sub,
.cinema-showtimes__intro,
.hero-text { font-family: var(--body); }

/* Metadata — mono uppercase */
.match-meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Search inputs — single underline, no box */
.taste-search__input,
.browse-search__input,
#movie-search,
#taste-search-input {
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: none;
  padding: 12px 0;
  min-height: auto;
  font-family: var(--display);
  font-size: 20px;
  color: var(--ink);
}
.taste-search__input:focus,
.browse-search__input:focus,
#movie-search:focus,
#taste-search-input:focus {
  outline: none;
  box-shadow: none;
  border-bottom-color: var(--ink);
}
.taste-search__input::placeholder,
.browse-search__input::placeholder,
#taste-search-input::placeholder { color: var(--muted); }

/* Card titles */
.card-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: 0;
  line-height: 1.15;
  color: var(--ink);
}

/* Buttons — strip pill/chrome, text-forward */
.ghost-button,
.card-link-button,
.text-button,
.card-detail-toggle,
.card-detail-toggle--prominent {
  border-radius: 0;
  box-shadow: none;
}
.ghost-button {
  border: 1px solid var(--ink);
  background: none;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 400;
}
.card-detail-toggle,
.card-detail-toggle--prominent,
.text-button {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* No pills anywhere */
.browse-facet__chip,
.pill,
.badge { border-radius: 0; }

/* Dividers */
hr { border: none; border-top: 1px solid var(--border); }

/* Cinema listings — quiet gallery cards, text-forward actions */
.cinema-showtimes-card {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: none;
}
.cinema-showtimes-card__times,
.cinema-showtimes-card__cinema-name { font-family: var(--mono); }
.cinema-showtimes-card .card-link-button,
.screening-book-button {
  background: none;
  border: none;
  border-top: 1px solid var(--border);
  border-radius: 0;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  min-height: auto;
  justify-content: flex-start;
  padding: 12px 0 0;
}
.cinema-showtimes-card .card-link-button:hover,
.screening-book-button:hover { background: none; color: var(--ink); text-decoration: underline; }
.cinema-week-day,
.cinema-week-day__button,
.cinema-showtimes__today,
.cinema-showtimes__filter-select { border-radius: var(--radius-card); }

/* Contrast fixes (Codex #11 P1/P2): these sections were dark panels with
   light text; the flatten removed the dark bg, so recolor foreground to the
   light-theme tokens for readability on the off-white ground. */
.cinema-showtimes { color: var(--text); }
.cinema-showtimes__head h2 { color: var(--ink); }
.cinema-showtimes__month { color: var(--text); }
.cinema-showtimes__intro { color: var(--text); }
.cinema-showtimes__updated { color: var(--muted); }
.cinema-showtimes__filter-label { color: var(--muted); }
.cinema-showtimes__filter-select {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
}
.cinema-showtimes__today {
  background: none;
  color: var(--ink);
  border-color: var(--border);
}
.cinema-showtimes__today:hover,
.cinema-showtimes__today.is-active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.cinema-week-day { background: none; border-color: var(--border); }
.cinema-week-day:hover { background: none; border-color: var(--ink); }
.cinema-week-day.is-active { background: var(--accent-soft); border-color: var(--ink); }
.cinema-week-day__label { color: var(--muted); }
.cinema-week-day__number { color: var(--ink); }
.cinema-week-day__month { color: var(--muted); }
.cinema-week-day__count { color: var(--text); }
.cinema-week-day__summary { color: var(--muted); }
.cinema-showtimes__selection { color: var(--text); }

/* ============================================================
   Portrait poster-led film cards (DESIGN.md)
   The poster is the object; text sits quietly beneath it.
   (Quote colours live in the refinements block, on its dark card.)
   ============================================================ */
.film-card {
  background: none;
  border: none;
  box-shadow: none;
  overflow: visible;
}
.film-card .poster-block {
  border-radius: var(--radius-card);
  background: #ece9e3;
}
/* Portrait frame only when collapsed — the expanded card fills its column. */
.film-card:not(.result-card-expanded) .poster-block {
  aspect-ratio: 2 / 3;
}
.film-card .poster-image { border-radius: var(--radius-card); }

/* No-poster: dark typographic card — intentional accent pieces in the grid */
.poster-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 20px;
  background: var(--panel-dark);
  text-align: center;
}
.poster-fallback__title {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--bg);
}
.poster-fallback__director {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Card body sits under the poster, no chrome */
.film-card .card-body,
.film-card .film-card-body {
  padding: var(--space-sm) 0 0;
  gap: 6px;
  background: none;
}
.film-card .card-title { font-size: 20px; }
.film-card .match-meta { margin: 0; }

/* "Why" text — editorial italic */
.film-card .discovery-card__rationale {
  font-family: var(--body);
  font-style: italic;
  font-size: 15px;
  line-height: 1.4;
  color: var(--text);
  margin: 4px 0 0;
}

/* Actions — text-only, mono, no button chrome */
.film-actions { gap: var(--space-md); margin-top: var(--space-xs); }
.film-actions .card-link-button {
  min-height: auto;
  padding: 0;
  border: none;
  background: none;
  border-radius: 0;
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.film-actions .card-link-button:hover { color: var(--ink); background: none; text-decoration: underline; }
.film-actions .save-action-button.is-active,
.film-actions .discovery-dismiss-button.is-active { color: var(--ink); }
.film-card .card-detail-toggle {
  align-self: flex-start;
  margin-top: var(--space-xs);
  padding: 0;
  border: none;
  background: none;
  color: var(--muted);
}
.film-card .card-detail-toggle:hover { color: var(--ink); text-decoration: underline; }

/* ============================================================
   Refinements: header/quote card treatment, button nav,
   mobile top bar (product direction on top of the refresh).
   ============================================================ */

.hero { align-items: stretch; gap: var(--space-md); }

/* Header: restore the card with the rotating background image */
.hero-copy {
  min-height: 460px;
  padding: var(--space-md);
  border: 1px solid var(--border);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(248, 246, 242, 0.5) 0%, rgba(248, 246, 242, 0.28) 50%, rgba(248, 246, 242, 0.82) 100%),
    var(--hero-image, url("./assets/images/hero/header-film-still.jpg")),
    var(--surface);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}
.hero-copy h1 { margin-top: 0; }

/* Quote module: its own dark card */
.hero-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: var(--space-md);
  border: 1px solid var(--panel-dark);
  border-radius: 14px;
  background: var(--panel-dark);
}
.rotating-film-quote { color: rgba(255, 255, 255, 0.92); }
.quote-film { color: #ffffff; }
.quote-credit { color: rgba(255, 255, 255, 0.6); }

/* Navigation: real rounded-corner buttons (clearly clickable) */
.account-button,
.privacy-link {
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.account-button:hover,
.privacy-link:hover,
.account-button.is-authenticated {
  border-color: var(--ink);
  background: var(--surface);
  color: var(--ink);
}

/* Mobile top bar: keep buttons tidy instead of spilling awkwardly */
@media (max-width: 600px) {
  .app-topbar {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 20px;
  }
  .account-button,
  .privacy-link {
    min-height: 34px;
    padding: 0 12px;
    font-size: 10px;
    letter-spacing: 0.06em;
  }
  .hero-copy { min-height: 320px; }
}

/* Recommendation experience: compact progressive disclosure in the canonical UI. */
.taste-field-label {
  display: block;
  margin: 24px 0 4px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}

.taste-sharpen {
  max-width: 760px;
  margin-top: 22px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.taste-sharpen summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.taste-sharpen summary span { color: var(--muted); }
.taste-sharpen__body { padding: 0 0 22px; }

#taste-prompt {
  width: 100%;
  resize: vertical;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: 400 16px/1.5 var(--body);
}

#taste-prompt:focus { outline: 2px solid var(--ink); outline-offset: 2px; }
.taste-character-count { margin: 5px 0 0; text-align: right; color: var(--muted); font: 10px var(--mono); }
.taste-calibration { display: grid; gap: 18px; }
.taste-question { margin: 0; padding: 0; border: 0; }
.taste-question legend { margin-bottom: 8px; font-weight: 600; color: var(--ink); }
.taste-question__options { display: flex; flex-wrap: wrap; gap: 8px; }
.taste-question__options label { position: relative; cursor: pointer; }
.taste-question__options input { position: absolute; opacity: 0; pointer-events: none; }
.taste-question__options span {
  display: block;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
}
.taste-question__options input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--surface); }
.taste-question__options input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }

.taste-search__generate { min-width: 220px; min-height: 44px; }
.taste-search__generate:disabled { cursor: not-allowed; opacity: 0.45; }
.taste-status { max-width: 74ch; margin: 14px 0 0; color: var(--text); font-size: 14px; line-height: 1.5; }
.taste-card__ratings,
.taste-card__availability { margin: 1px 0; color: var(--muted); font: 10px/1.4 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.film-card .discovery-card__rationale strong { font-style: normal; }

.taste-refinements {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(130px, 1fr));
  gap: 18px;
  align-items: end;
  margin-top: 38px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.taste-refinements[hidden] { display: none; }
.taste-refinements h3 { margin: 0; font-size: 20px; }
.taste-refinements label { display: grid; gap: 7px; color: var(--text); font: 10px var(--mono); letter-spacing: 0.07em; text-transform: uppercase; }
.taste-refinements select {
  width: 100%;
  min-height: 40px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: 14px var(--body);
  text-transform: none;
}

@media (max-width: 900px) {
  .taste-refinements { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .taste-refinements > div { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .hero-links { grid-template-columns: 1fr; }
  .hero-link { height: 114px; min-height: 114px; }
  .taste-question__options { display: grid; grid-template-columns: 1fr 1fr; }
  .taste-question__options span { height: 100%; }
  .taste-refinements { grid-template-columns: 1fr; }
  .taste-refinements > div { grid-column: auto; }
  .taste-search__generate { width: 100%; }
}
