/* Eenie Meenie Movies styles: "Paper & Ink".
 * Phone first. At 900px and wider, screens switch to side-by-side layouts
 * (see the "Wide screens" block at the bottom).
 */
:root {
  --paper: #F4F1E8;
  --paper-2: #ECE8DC;
  --card: #FFFFFF;
  --ink: #1F1B4B;
  --ink-2: #48447A;
  --muted: #6E6A92;
  --line: #E2DDF0;
  --coral: #E2553A;
  --coral-t: #F8D3C8;
  --blue-t: #C7E1EC;
  --gold-t: #F2E0AE;
  --error: #B3261E;
  --radius: 20px;
  --shadow: 0 1px 0 rgba(31, 27, 75, .05), 0 12px 30px -18px rgba(31, 27, 75, .28);
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.12 0 0 0 0 0.1 0 0 0 0 0.3 0 0 0 .07 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--paper); }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--paper); background-image: var(--grain); color: var(--ink);
  font-family: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; }
h1, p { margin: 0; }
h1 { font-size: 34px; line-height: 1.04; font-weight: 800; letter-spacing: -.025em; }
button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

/* ---------- Text ---------- */
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--coral); }
.eyebrow.quiet { color: var(--muted); }
.sub { color: var(--ink-2); line-height: 1.5; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; line-height: 1.45; }
.foot { text-align: center; font-size: 13px; color: var(--muted); }
.error { color: var(--error); font-size: 14px; }
.busy { color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.hl { background: linear-gradient(transparent 60%, var(--coral-t) 60%, var(--coral-t) 92%, transparent 92%); padding: 0 .04em; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.label, label { font-weight: 700; font-size: 16px; }

/* ---------- Intro banner + bottom band ---------- */
.announce { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 12px; background: var(--ink); color: #fff; font-size: 12.5px; white-space: nowrap; font-weight: 600; text-align: center; }
.announce svg { flex-shrink: 0; width: 17px; height: 17px; }
.announce span { overflow: hidden; text-overflow: ellipsis; }
.announce .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); flex-shrink: 0; }
.band { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 22px 20px calc(22px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: #fff; text-align: center; }
.band p { font-size: 20px; font-weight: 800; letter-spacing: -.015em; }
.moods { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.mood-pill { min-height: 44px; padding: 8px 18px; border-radius: 99px; border: 2px solid var(--mc); background: none; color: var(--mc); font-size: 15px; font-weight: 700; cursor: pointer; transition: background .15s; }
.mood-pill:hover { background: color-mix(in srgb, var(--mc) 16%, transparent); }
.mood-pill:focus-visible { outline-color: #fff; }
.m1 { --mc: #F08A73; }
.m2 { --mc: #7CC3E6; }
.m3 { --mc: #F2C94C; }

/* ---------- Top bar ---------- */
.topbar {
  width: 100%; max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 20px 6px;
}
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 16px; letter-spacing: -.01em; }
.mark { width: 30px; height: 18px; position: relative; flex-shrink: 0; }
.mark i { position: absolute; top: 0; width: 18px; height: 18px; border-radius: 50%; mix-blend-mode: multiply; }
.mark i:nth-child(1) { left: 0; background: #E2553A; }
.mark i:nth-child(2) { left: 6px; background: #2C7DA0; }
.mark i:nth-child(3) { left: 12px; background: #C48A0E; }
.nav { display: flex; gap: 8px; align-items: center; }
.nav .link { min-height: 36px; font-size: 15px; font-weight: 700; color: var(--ink); text-decoration: none; }
.nav .link:hover { text-decoration: underline; }
.pill { display: inline-flex; align-items: center; font-size: 13px; font-weight: 700; padding: 6px 11px; border-radius: 99px; background: var(--paper-2); color: var(--ink-2); white-space: nowrap; }
.steps-nav { display: flex; gap: 4px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.steps-nav span { padding: 6px 12px; border-radius: 99px; white-space: nowrap; }
.steps-nav .on { background: var(--ink); color: #fff; }
.steps-nav .done { color: var(--ink); }

/* ---------- Screens ---------- */
#app { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; display: flex; }
.screen {
  flex: 1; min-width: 0; width: 100%; max-width: 600px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px;
  padding: 12px 20px calc(20px + env(safe-area-inset-bottom, 0px)); animation: enter .35s ease both;
}
.screen.center { align-items: center; justify-content: center; text-align: center; }
.spacer { flex: 1; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Building blocks ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.btn {
  height: 54px; padding: 0 26px; border: none; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--ink); color: #fff; font-size: 16.5px; font-weight: 700; white-space: nowrap; cursor: pointer;
  box-shadow: 0 10px 22px -10px rgba(31, 27, 75, .7), inset 0 -2px 0 rgba(0, 0, 0, .25); transition: background .15s, transform .1s;
}
.btn:hover { background: #2C2766; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn.ghost:hover { background: rgba(31, 27, 75, .05); }
.link { background: none; border: none; color: var(--ink-2); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 44px; padding: 0 8px; }
.back { align-self: flex-start; background: none; border: none; color: var(--ink-2); font-weight: 600; font-size: 15px; padding: 0; min-height: 44px; cursor: pointer; }
.actions { display: flex; flex-direction: column; gap: 10px; }
.actions .btn { width: 100%; }
.av { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; flex-shrink: 0; color: #fff; font-weight: 800; font-size: 13px; box-shadow: 0 0 0 2.5px #fff; }
.av.lg { width: 44px; height: 44px; font-size: 18px; }
.av.xl { width: 76px; height: 76px; font-size: 30px; box-shadow: 0 0 0 5px #fff, 0 18px 30px -16px rgba(31, 27, 75, .6); }
.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tag { font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: 8px; background: var(--paper-2); color: var(--ink-2); }

/* ---------- Posters (placeholders until TMDB posters arrive) ---------- */
.poster {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: .15em; aspect-ratio: 2 / 3; overflow: hidden;
  border-radius: 12px; padding: .6em .55em; color: var(--pt, #fff); background: linear-gradient(165deg, var(--p1, #44624D), var(--p2, #121D16));
  box-shadow: 0 24px 40px -20px rgba(20, 16, 50, .65);
}
.poster::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 70% 15%, rgba(255, 255, 255, .22), transparent 45%); }
.poster::after { content: ''; position: absolute; inset: 4.5%; border: 1px solid rgba(255, 255, 255, .18); border-radius: 7px; }
.poster .yr { position: relative; font-size: .38em; font-weight: 600; letter-spacing: .2em; opacity: .8; }
.poster .t { position: relative; font-size: calc(1em * var(--fit, 1)); font-weight: 800; line-height: .92; letter-spacing: -.03em; text-transform: uppercase; overflow-wrap: break-word; hyphens: auto; }
img.poster { display: block; padding: 0; object-fit: cover; height: auto; }

/* ---------- 1. Intro ---------- */
.intro-copy { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.intro .eyebrow { display: none; }
.lead { font-size: 15.5px; }
.howto { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 15px; font-weight: 600; }
.howto li { display: flex; align-items: center; gap: 12px; }
.howto .n { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 12.5px; font-weight: 800; flex-shrink: 0; }
.ctas { display: flex; flex-direction: column; gap: 4px; }
.ctas .btn { width: 100%; }
.last-night { align-self: center; margin-top: -10px; font-size: 14px; }
.ctas .btn.ghost { height: 44px; box-shadow: none; font-size: 15px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.tagline { font-size: 14px; color: var(--ink-2); text-align: center; }
.howto.flash li { animation: flash 1.2s ease; }
@keyframes flash { 30% { box-shadow: inset 0 0 0 2px var(--coral); } }
.intro-art { order: -1; height: 230px; display: grid; place-items: center; overflow: hidden; border-radius: 24px; background: rgba(255, 255, 255, .55); box-shadow: inset 0 0 0 1px var(--line); }
.ov { position: relative; width: 236px; aspect-ratio: 560 / 540; container-type: inline-size; }
.ov .c { position: absolute; width: 53.6%; aspect-ratio: 1; border-radius: 50%; mix-blend-mode: multiply; animation: drift 9s ease-in-out infinite alternate; }
.ov .c1 { left: 3.6%; top: 7.4%; background: var(--coral-t); }
.ov .c2 { left: 41%; top: 7.4%; background: var(--blue-t); animation-delay: -3s; }
.ov .c3 { left: 22.3%; top: 39.8%; background: var(--gold-t); animation-delay: -6s; }
.ov .poster { position: absolute; border-radius: 6%; }
.ov .poster::after { border-radius: 4%; }
.ov .main { width: 29%; left: 35.5%; top: 21%; font-size: 4.6cqw; z-index: 2; }
.ov .s1 { width: 21%; left: 7%; top: 21%; font-size: 2.7cqw; transform: rotate(-9deg); }
.ov .s2 { width: 21%; left: 72%; top: 21%; font-size: 2.7cqw; transform: rotate(7deg); }
.ov .clock { position: absolute; left: -3%; top: 12%; width: 9%; color: var(--coral); }
.ov .common {
  position: absolute; z-index: 3; left: 50%; top: 68%; transform: translateX(-50%); display: flex; align-items: center; gap: .45em; white-space: nowrap;
  padding: .5em 1em; border-radius: 99px; background: var(--ink); color: #fff; font-size: clamp(9px, 2.5cqw, 14px); font-weight: 600; box-shadow: 0 8px 18px -10px rgba(31, 27, 75, .6);
}
.ov .common i { width: .7em; height: .7em; border-radius: 50%; background: #F08A73; }
.ov .common i:nth-child(2) { background: #7CC3E6; }
.ov .common i:nth-child(3) { background: #F2C94C; margin-right: .3em; }
/* Four friends on the couch, below the posters. On phones it tucks into the bottom of the picture card. */
.couch-scene { display: none; width: min(100%, 620px); margin: 24px auto 0; }
.couch-scene__image { display: block; width: 100%; height: auto; transform-origin: bottom center; animation: couch-arrive 700ms cubic-bezier(.22, 1, .36, 1) both; }
@keyframes couch-arrive { from { opacity: 0; transform: translateY(16px); } }
.ov .who {
  position: absolute; z-index: 3; display: flex; align-items: center; gap: .5em; white-space: nowrap; background: #fff; border-radius: 99px;
  padding: .35em .85em .35em .35em; font-size: clamp(9px, 2.4cqw, 13.5px); font-weight: 700; box-shadow: 0 8px 18px -10px rgba(31, 27, 75, .45);
}
.ov .who .av { width: 1.85em; height: 1.85em; font-size: .85em; box-shadow: none; }
.ov .w1 { left: 10%; top: 4%; }
.ov .w2 { right: 4%; top: 4%; }
.ov .w3 { right: -2%; top: 74%; }
@keyframes drift { to { transform: translate(2%, -2%) scale(1.03); } }

/* ---------- 2. Get started ---------- */
.mode-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode {
  display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 16px; border: none; border-radius: 18px; cursor: pointer;
  background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 2px var(--line), var(--shadow); transition: background .15s, box-shadow .15s;
}
.mode:hover { box-shadow: inset 0 0 0 2px var(--ink-2), var(--shadow); }
.mode[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: 0 14px 26px -14px rgba(31, 27, 75, .8); }
.mode-art { display: flex; height: 26px; margin-bottom: 10px; }
.mode-art i { width: 26px; height: 26px; border-radius: 50%; margin-right: -9px; mix-blend-mode: multiply; }
.mode-art i:nth-child(1) { background: #E2553A; }
.mode-art i:nth-child(2) { background: #2C7DA0; }
.mode-art i:nth-child(3) { background: #C48A0E; }
.mode[aria-pressed="true"] .mode-art i { mix-blend-mode: normal; box-shadow: 0 0 0 2px var(--ink); }
.mode-title { font-size: 18px; font-weight: 800; }
.mode-sub { font-size: 14px; opacity: .75; }
.stepper { display: flex; align-items: center; gap: 14px; font-size: 22px; font-weight: 800; }
.stepper button { width: 44px; height: 44px; border-radius: 50%; border: none; background: var(--paper-2); color: var(--ink); font-size: 22px; cursor: pointer; }
.stepper button:hover { background: var(--line); }
#name-list { display: flex; flex-direction: column; gap: 8px; }
.name-row { display: flex; align-items: center; gap: 10px; }
.dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; color: #fff; font-size: 13px; font-weight: 800; }
.name-row input {
  flex: 1; min-width: 0; height: 46px; padding: 0 14px; border: none; border-radius: 12px; background: #FBFAF5;
  box-shadow: inset 0 0 0 1.5px var(--line); font: inherit; font-size: 16px; color: var(--ink);
}
.name-row input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--ink); }
.remove { width: 36px; height: 36px; flex-shrink: 0; border: none; border-radius: 50%; background: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.remove:hover { background: var(--paper-2); color: var(--error); }

/* ---------- Envelopes ---------- */
.envelopes { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.env-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.env { position: relative; width: 38px; height: 27px; border-radius: 5px; overflow: hidden; flex-shrink: 0; }
.env::after { content: ''; position: absolute; inset: 0; clip-path: polygon(0 0, 100% 0, 50% 62%); }
.env.sealed { background: var(--c); }
.env.sealed::after { background: rgba(0, 0, 0, .2); }
.env.current { background: color-mix(in srgb, var(--c) 14%, #fff); box-shadow: inset 0 0 0 2px var(--c); animation: pulse 1.6s ease-in-out infinite; }
.env.current::after { background: color-mix(in srgb, var(--c) 40%, transparent); }
.env.waiting { box-shadow: inset 0 0 0 2px #C9C4DE; }
.env.waiting::after { display: none; }
@keyframes pulse { 50% { transform: translateY(-2px); } }

/* ---------- 3. Hand-off ---------- */
#handoff-av { margin-bottom: 4px; }
.center .sub { max-width: 380px; }
.center .actions { width: 100%; max-width: 380px; margin-top: 8px; }
.swap-box { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 4px; }
.swap-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.swap {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px 6px 7px; border: none; border-radius: 99px; cursor: pointer;
  background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); font-size: 14.5px; font-weight: 700;
}
.swap:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.swap .av { box-shadow: none; }

/* ---------- 4. Input ---------- */
.write { gap: 14px; flex: 1; background: transparent; box-shadow: none; padding: 0; border-radius: 0; }
.write-head { display: flex; align-items: center; gap: 12px; }
.write-head h1 { font-size: 28px; }
.write-head .muted { font-size: 14px; margin-top: 2px; }
textarea.paper {
  width: 100%; min-height: 150px; resize: none; border: none; border-radius: 16px; padding: 12px 16px; font: inherit; font-size: 18px; line-height: 30px; color: var(--ink);
  background-color: #FBFAF5; background-image: repeating-linear-gradient(transparent 0 29px, #EDE9F5 29px 30px); background-attachment: local; background-position: 0 12px;
  box-shadow: inset 0 0 0 1.5px var(--line); transition: box-shadow .15s;
}
textarea.paper:focus { outline: none; box-shadow: inset 0 0 0 2px var(--c, var(--ink)), 0 0 0 5px color-mix(in srgb, var(--c, var(--ink)) 14%, transparent); }
.ideas { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ideas .muted { font-size: 13.5px; margin-right: 2px; }
.idea {
  min-height: 40px; padding: 8px 13px; border: none; border-radius: 12px; background: var(--card); text-align: left; font-size: 14px; cursor: pointer;
  box-shadow: inset 0 0 0 1.5px var(--line); transition: box-shadow .15s;
}
.idea:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.idea b { color: var(--coral); margin-right: 6px; }
.paper-wrap { position: relative; }
.paper-wrap textarea.paper { padding-bottom: 30px; }
.count { position: absolute; right: 12px; bottom: 8px; padding: 0 4px; border-radius: 6px; background: #FBFAF5; font-size: 12.5px; color: var(--muted); pointer-events: none; }
.count.near { color: var(--error); font-weight: 700; }

/* Filters: a collapsible box under the text box. Chips and inputs reuse the idea chips' and
 * name inputs' look; the chosen state uses the person's color (--c), like .env.current. */
.filters { background: var(--card); border-radius: 16px; box-shadow: inset 0 0 0 1.5px var(--line); }
.filters summary {
  display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px; border-radius: 16px;
  font-weight: 700; font-size: 16px; cursor: pointer; list-style: none;
}
.filters summary::-webkit-details-marker { display: none; }
.filters summary::after {
  content: ""; width: 8px; height: 8px; margin: -3px 2px 0 4px; flex-shrink: 0;
  border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg); transition: transform .15s;
}
.filters[open] summary::after { margin-top: 3px; transform: rotate(-135deg); }
#filter-summary { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-body { display: flex; flex-direction: column; gap: 14px; padding: 14px 16px 10px; border-top: 1.5px solid var(--line); animation: enter .18s ease-out; }
.filter-body fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.filter-body legend { padding: 0; margin-bottom: 8px; font-size: 15px; font-weight: 700; }
.filter-body legend .muted { font-weight: 500; }
.filter-body .link { align-self: flex-start; min-height: 36px; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 40px; padding: 6px 14px; border: none; border-radius: 99px; background: var(--card); cursor: pointer;
  font-size: 14px; font-weight: 600; box-shadow: inset 0 0 0 1.5px var(--line); transition: box-shadow .15s, background .15s;
}
.chip:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.chip[aria-pressed="true"] {
  background: color-mix(in srgb, var(--c, var(--ink)) 14%, #fff); box-shadow: inset 0 0 0 2px var(--c, var(--ink)); font-weight: 700;
}
.chip[aria-pressed="true"]::before { content: "\2713"; margin-right: 6px; color: var(--c, var(--ink)); }
.year-row { display: flex; gap: 12px; }
.year-row label { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.year-row input {
  width: 100%; min-width: 0; height: 46px; padding: 0 14px; border: none; border-radius: 12px; background: #FBFAF5;
  box-shadow: inset 0 0 0 1.5px var(--line); font: inherit; font-size: 16px; font-weight: 500; color: var(--ink); -moz-appearance: textfield;
}
.year-row input::-webkit-outer-spin-button, .year-row input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.year-row input::placeholder { color: var(--muted); opacity: 1; }
.year-row input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--c, var(--ink)); }
.write-foot { display: flex; flex-direction: column-reverse; gap: 8px; }
.write-foot .btn { width: 100%; }
.foot-btns { display: flex; flex-direction: column; gap: 8px; }
.fit-any { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.side { display: none; flex-direction: column; gap: 16px; }
.side .card { padding: 20px; }
.who-list { display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
.who-row { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 700; }
.who-row .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status { font-size: 12.5px; font-weight: 700; padding: 4px 9px; border-radius: 99px; }
.st-sealed { background: #E4F3EC; color: #1F7A55; }
.st-current { background: #E3F0F6; color: #1E6684; }
.st-waiting { background: var(--paper-2); color: var(--muted); }
.lock { flex-direction: row; align-items: flex-start; gap: 12px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.lock .ic { width: 34px; height: 34px; border-radius: 10px; background: var(--paper-2); display: grid; place-items: center; flex-shrink: 0; color: var(--ink-2); }

/* ---------- 5. Sealed ---------- */
.big-envelope {
  position: relative; width: 220px; height: 140px; border-radius: 14px; background: var(--c); margin-bottom: 8px;
  box-shadow: 0 24px 40px -20px rgba(31, 27, 75, .55); animation: drop .55s cubic-bezier(.2, .9, .3, 1.3) both;
}
.big-envelope::after { content: ''; position: absolute; left: 0; top: 0; width: 100%; height: 62%; background: rgba(0, 0, 0, .18); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.big-envelope .check {
  position: absolute; z-index: 2; left: 50%; top: 56%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%;
  display: grid; place-items: center; background: #fff; color: var(--c); font-size: 24px; font-weight: 800; animation: pop .35s .3s both;
}
@keyframes drop { from { opacity: 0; transform: translateY(-24px) rotate(-4deg); } }
@keyframes pop { from { opacity: 0; transform: scale(.4); } }

/* ---------- 6. Loading ---------- */
.loading-art { display: flex; height: 44px; margin-bottom: 4px; }
.loading-art i { width: 44px; height: 44px; border-radius: 50%; margin-right: -14px; mix-blend-mode: multiply; animation: bob 1.2s ease-in-out infinite; }
.loading-art i:nth-child(1) { background: #E2553A; }
.loading-art i:nth-child(2) { background: #2C7DA0; animation-delay: .15s; }
.loading-art i:nth-child(3) { background: #C48A0E; animation-delay: .3s; }
@keyframes bob { 50% { transform: translateY(-8px); } }
.load-steps { list-style: none; margin: 0; padding: 20px; gap: 16px; font-size: 17px; font-weight: 600; }
.load-steps li { display: flex; align-items: center; gap: 14px; }
.load-steps li::before { content: ''; width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-size: 14px; color: #fff; }
.load-steps li.done::before { content: '\2713'; background: var(--ink); }
.load-steps li.active::before { border: 3px solid var(--line); border-top-color: var(--ink); animation: spin .9s linear infinite; }
.load-steps li.waiting { color: var(--muted); }
.load-steps li.waiting::before { border: 2px dashed #C9C4DE; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 7. Results ---------- */
.results-art { display: flex; justify-content: center; }
.poster-stack { position: relative; width: 100%; height: 262px; }
.poster-stack .poster { position: absolute; }
.poster-stack .front { width: 152px; left: 50%; top: 4px; margin-left: -76px; z-index: 3; font-size: 24px; }
.poster-stack .back { width: 112px; top: 34px; font-size: 15px; filter: saturate(.8) brightness(.95); }
.poster-stack .b1 { left: 50%; margin-left: -136px; transform: rotate(-8deg); z-index: 1; }
.poster-stack .b2 { left: 50%; margin-left: 24px; transform: rotate(7deg); z-index: 2; }
.poster-stack [data-show] { cursor: pointer; transition: filter .15s, translate .15s; }
.poster-stack [data-show]:hover { filter: none; translate: 0 -6px; }
.ribbon {
  position: absolute; z-index: 5; left: 50%; top: 18px; margin-left: -80px; background: var(--coral); color: #fff; font-size: 10.5px; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase; padding: 5px 10px 5px 12px; border-radius: 0 6px 6px 0; box-shadow: 0 6px 12px -6px rgba(0, 0, 0, .5);
}
.res { display: flex; flex-direction: column; gap: 12px; flex: 1; }
#movie-title { font-size: 36px; line-height: 1; }
.score-card { gap: 12px; }
.score { display: flex; align-items: center; gap: 14px; }
.score b { font-size: 16.5px; }
.ring svg { display: block; width: 60px; height: 60px; }
.ring-track { fill: none; stroke: var(--paper-2); stroke-width: 8; }
.ring-fill { fill: none; stroke: var(--ink); stroke-width: 8; stroke-linecap: round; }
.ring text { font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-size: 17px; font-weight: 800; fill: var(--ink); }
.divider { height: 1px; background: var(--line); margin: 0 -16px; }
.fits { display: flex; flex-direction: column; gap: 2px; }
.fit-row {
  width: 100%; min-height: 44px; display: grid; grid-template-columns: 30px minmax(0, 74px) 1fr 44px; gap: 10px; align-items: center;
  padding: 4px 0; border: none; background: none; text-align: left; font-size: 14.5px; font-weight: 600; cursor: pointer;
}
.fit-row:hover .fit-name { text-decoration: underline; text-underline-offset: 3px; }
.fit-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { display: block; height: 10px; border-radius: 6px; background: var(--paper-2); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 6px; }
.bar > .grow { transform-origin: left; animation: grow .9s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes grow { from { transform: scaleX(0); } }
.fit-pct { text-align: right; font-weight: 800; }
.note { margin: 0 0 6px 40px; padding: 10px 12px; border-radius: 12px; font-size: 14.5px; line-height: 1.4; background: color-mix(in srgb, var(--c) 12%, #fff); }
.eyebrow .hint { letter-spacing: normal; text-transform: none; font-weight: 600; }
.also { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.alt {
  display: flex; align-items: center; gap: 10px; padding: 9px; border: none; border-radius: 14px; background: rgba(255, 255, 255, .65); cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--line); text-align: left; font-size: 13.5px; font-weight: 700; min-width: 0; transition: box-shadow .15s, background .15s;
}
.alt:hover { background: var(--card); box-shadow: inset 0 0 0 1.5px var(--ink); }
.alt > span { min-width: 0; }
.alt small { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.alt .poster { width: 32px; padding: 0; border-radius: 5px; box-shadow: none; flex-shrink: 0; }
.alt .poster::after, .alt .poster .t, .alt .poster .yr { display: none; }
.res-ctas { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; align-items: center; }
.res-ctas #watch-btn, .res-ctas .watch-done, .res-ctas .link, .res-ctas #share-btn { grid-column: 1 / -1; }
.res-ctas .btn.ghost { padding: 0 14px; }
.btn[disabled] { cursor: default; background: #2F7A58; }
.watch-done { font-size: 14.5px; color: var(--ink-2); text-align: center; }
.watch-done a { color: var(--ink); font-weight: 700; text-underline-offset: 3px; }

/* ---------- Mood map (paused; see SHOW_MOOD_MAP in app.js) ---------- */
.map { position: relative; height: 250px; background: var(--card); border-radius: var(--radius); overflow: hidden; }
.map::before, .map::after { content: ''; position: absolute; background: #E0DEEA; z-index: 0; }
.map > * { z-index: 1; }
.map::before { left: 50%; top: 22px; bottom: 22px; width: 1.5px; }
.map::after { top: 50%; left: 56px; right: 64px; height: 1.5px; }
.axis { position: absolute; font-size: 13px; color: var(--muted); }
.x-left { left: 12px; top: calc(50% - 9px); }
.x-right { right: 12px; top: calc(50% - 9px); }
.y-top { top: 6px; left: 0; right: 0; text-align: center; }
.y-bottom { bottom: 6px; left: 0; right: 0; text-align: center; }
.pin, .halo, .area, .map .poster { position: absolute; transform: translate(-50%, -50%); }
.pin { width: 20px; height: 20px; border-radius: 50%; background: var(--c); border: 3px solid #fff; box-shadow: 0 0 0 1.5px var(--c); }
.pin.big { width: 28px; height: 28px; border-width: 4px; }
.halo, .area { width: 120px; height: 120px; border-radius: 50%; background: color-mix(in srgb, var(--c) 15%, transparent); }
#my-pin, #my-halo { transition: left .35s ease, top .35s ease; }
.map .poster { width: 60px; height: 88px; border-radius: 6px; border: 3px solid var(--ink); object-fit: cover; font-size: 10px; padding: 4px; }

/* ---------- Wide screens (laptops and desktops) ---------- */
@media (min-width: 900px) {
  .topbar { padding: 24px 44px 8px; }
  .screen { max-width: none; padding: 20px 44px 44px; gap: 18px; justify-content: center; }
  .screen .spacer { display: none; }
  .screen.narrow { max-width: 600px; }
  h1 { font-size: 42px; }
  .only-narrow { display: none !important; }

  .intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center; align-content: center; }
  .intro .eyebrow { display: block; }
  .intro-copy { flex: none; gap: 18px; }
  .display { font-size: clamp(48px, 5.2vw, 66px); line-height: 1; }
  .lead { font-size: 18px; max-width: 470px; }
  .howto { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 540px; margin: 8px 0; }
  .howto li { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; border-radius: 16px; background: rgba(255, 255, 255, .6); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; line-height: 1.3; }
  .ctas { flex-direction: row; gap: 12px; }
  .ctas .btn { width: auto; }
  .ctas .btn.ghost { height: 54px; box-shadow: inset 0 0 0 2px var(--ink); font-size: 16.5px; font-weight: 700; text-decoration: none; }
  .intro-copy .ctas { order: 1; }
  .tagline { order: 2; text-align: left; font-size: 15px; margin-top: -6px; }
  .last-night { order: 1; align-self: flex-start; margin-top: -8px; padding: 0; }
  .howto { order: 3; margin-top: 18px; }
  .intro-art { order: 0; height: auto; display: flex; flex-direction: column; align-items: center; overflow: visible; background: none; box-shadow: none; border-radius: 0; }
  .ov { width: 100%; max-width: 560px; }
  .couch-scene { display: block; margin-top: -14%; position: relative; z-index: 4; }
  .announce { font-size: 17px; padding: 12px 20px; gap: 10px; }
  .announce svg { width: 22px; height: 22px; }
  .band { flex-direction: row; justify-content: center; gap: 36px; padding: 22px 44px; }
  .band p { font-size: 24px; }
  .moods { gap: 22px; }
  .mood-pill { padding: 8px 26px; font-size: 16px; }

  .input { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; align-content: center; }
  .write { padding: 28px; gap: 16px; background: var(--card); box-shadow: var(--shadow); border-radius: var(--radius); }
  .write-head h1 { font-size: 34px; }
  textarea.paper { min-height: 224px; padding: 14px 22px; font-size: 21px; line-height: 32px; background-image: repeating-linear-gradient(transparent 0 31px, #EDE9F5 31px 32px); background-position: 0 14px; }
  .write-foot { flex-direction: row; justify-content: space-between; align-items: center; gap: 16px; }
  .write-foot .btn { width: auto; }
  .foot-btns { flex-direction: row-reverse; }
  .write-foot .foot { text-align: left; font-size: 14.5px; }
  .side { display: flex; }

  .results { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 56px; align-items: center; align-content: center; }
  .poster-stack { height: 520px; }
  .poster-stack .front { width: 300px; left: 40px; top: 18px; margin-left: 0; font-size: 44px; }
  .poster-stack .back { width: 220px; font-size: 26px; }
  .poster-stack .b1 { left: 0; top: 70px; margin-left: 0; }
  .poster-stack .b2 { left: 150px; top: 80px; margin-left: 0; }
  .ribbon { left: 36px; top: 34px; margin-left: 0; font-size: 11px; padding: 6px 12px 6px 14px; }
  .res { flex: none; max-width: 580px; gap: 14px; }
  #movie-title { font-size: clamp(44px, 4.4vw, 56px); }
  .score-card { padding: 16px 20px; }
  .divider { margin: 0 -20px; }
  .ring svg { width: 64px; height: 64px; }
  .res-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
  .res-ctas .watch-done { flex-basis: 100%; text-align: left; }
  .res-ctas .btn.ghost { padding: 0 22px; }
}

/* ---------- Intro on wide screens: sized to the 1440 x 902 design ----------
 * Every size is N design pixels times --u. --u scales the whole design to fit
 * the window (by width or height, whichever runs out first), so the page looks
 * like the mockup on any laptop or monitor, at any browser zoom. */
@media (min-width: 900px) {
  body { --u: max(.6px, min(calc(100vw / 1440), calc(100vh / 902))); }
  .announce { height: calc(50 * var(--u)); padding: 0; gap: calc(21 * var(--u)); font-size: calc(19.5 * var(--u)); }
  .announce svg { width: calc(32 * var(--u)); height: calc(32 * var(--u)); }
  .announce .dot { width: calc(9 * var(--u)); height: calc(9 * var(--u)); margin-left: calc(-12 * var(--u)); }

  body.is-intro .topbar { max-width: calc(1440 * var(--u)); padding: calc(22 * var(--u)) calc(82 * var(--u)) 0; }
  body.is-intro .brand { gap: calc(12 * var(--u)); font-size: calc(24 * var(--u)); }
  body.is-intro .mark { width: calc(43 * var(--u)); height: calc(25 * var(--u)); }
  body.is-intro .mark i { width: calc(25 * var(--u)); height: calc(25 * var(--u)); }
  body.is-intro .mark i:nth-child(2) { left: calc(9 * var(--u)); }
  body.is-intro .mark i:nth-child(3) { left: calc(18 * var(--u)); }
  body.is-intro .nav { gap: calc(34 * var(--u)); }
  body.is-intro .nav .link { min-height: calc(37 * var(--u)); padding: 0; font-size: calc(18.7 * var(--u)); }
  body.is-intro .nav .pill { height: calc(37 * var(--u)); padding: 0 calc(17 * var(--u)); font-size: calc(17 * var(--u)); color: var(--ink); }
  body.is-intro #app { max-width: calc(1440 * var(--u)); }

  .intro {
    position: relative; height: calc(691 * var(--u)); padding: 0 calc(82 * var(--u)); overflow: hidden;
    grid-template-columns: calc(590 * var(--u)) minmax(0, 1fr); gap: 0; align-items: start; align-content: start;
  }
  /* On screens taller than the design, the extra space goes above the hero so the couch still sits on the band. */
  .intro { align-self: flex-end; }
  .intro::after { content: ''; position: absolute; left: calc(82 * var(--u)); right: calc(82 * var(--u)); bottom: calc(27 * var(--u)); height: 1px; background: var(--line); }
  .intro-copy { gap: 0; padding-top: calc(62 * var(--u)); }
  .intro .eyebrow { font-size: calc(17 * var(--u)); line-height: 1; }
  .display { margin-top: calc(22 * var(--u)); font-size: calc(72 * var(--u)); line-height: .93; }
  .lead { margin-top: calc(22 * var(--u)); max-width: calc(540 * var(--u)); font-size: calc(20.8 * var(--u)); line-height: calc(29 * var(--u)); }
  .intro-copy .ctas { margin-top: calc(40 * var(--u)); gap: calc(18 * var(--u)); }
  .intro-copy .ctas .btn { height: calc(64 * var(--u)); padding: 0 calc(36 * var(--u)); border-radius: calc(13 * var(--u)); font-size: calc(22 * var(--u)); }
  .intro-copy .ctas .btn.ghost { height: calc(64 * var(--u)); box-shadow: inset 0 0 0 calc(2.2 * var(--u)) var(--ink); font-size: calc(22 * var(--u)); }
  .tagline { margin-top: calc(14 * var(--u)); font-size: calc(17.6 * var(--u)); }
  .last-night { margin-top: calc(10 * var(--u)); min-height: 0; font-size: calc(16 * var(--u)); }
  .howto { margin: calc(40 * var(--u)) 0 0; max-width: none; grid-template-columns: calc(182 * var(--u)) calc(168 * var(--u)) calc(188 * var(--u)); justify-content: start; gap: calc(15 * var(--u)); }
  .howto li { height: calc(88 * var(--u)); padding: calc(13 * var(--u)) calc(18 * var(--u)); white-space: nowrap; gap: calc(10 * var(--u)); border-radius: calc(14 * var(--u)); font-size: calc(16.5 * var(--u)); }
  .howto .n { width: calc(30 * var(--u)); height: calc(30 * var(--u)); font-size: calc(15 * var(--u)); }

  .intro-art { align-items: flex-start; }
  .ov { width: calc(597 * var(--u)); max-width: none; margin: calc(-4 * var(--u)) 0 0 calc(10.5 * var(--u)); }
  .ov .c { width: 53.6%; }
  .ov .c1 { left: 4.1%; top: 7.5%; }
  .ov .c2 { left: 42.3%; top: 7.5%; }
  .ov .c3 { left: 23.7%; top: 30%; }
  .ov .poster { aspect-ratio: 3 / 4; border-radius: 5%; }
  .ov .s1 { width: 18.8%; left: 10.2%; top: 21.5%; transform: rotate(-9deg); }
  .ov .main { width: 27%; left: 36.4%; top: 22.9%; }
  .ov .s2 { width: 18.8%; left: 71%; top: 21.7%; transform: rotate(8deg); }
  .ov .clock { left: -5.8%; top: 12.3%; width: 8%; }
  .ov .who { height: calc(33 * var(--u)); padding: 0 calc(14 * var(--u)) 0 calc(5 * var(--u)); gap: calc(8 * var(--u)); font-size: calc(15 * var(--u)); }
  .ov .who .av { width: calc(24 * var(--u)); height: calc(24 * var(--u)); font-size: calc(13 * var(--u)); }
  .ov .w1 { left: 1.6%; top: 5.2%; }
  .ov .w2 { right: -.8%; top: 5.2%; }
  .ov .w3 { right: -6.4%; top: 68.6%; }
  .ov .common { top: 62.3%; height: calc(31 * var(--u)); padding: 0 calc(16 * var(--u)); gap: calc(7 * var(--u)); font-size: calc(13.5 * var(--u)); }
  .ov .common i { width: calc(10 * var(--u)); height: calc(10 * var(--u)); }
  .couch-scene { width: calc(570 * var(--u)); height: calc(243 * var(--u)); margin: calc(-124 * var(--u)) 0 0 calc(24 * var(--u)); overflow: hidden; }

  .band { height: calc(102 * var(--u)); padding: 0 calc(82 * var(--u)); gap: calc(33 * var(--u)); }
  .band p { font-size: calc(27 * var(--u)); }
  .moods { gap: calc(21.5 * var(--u)); }
  .mood-pill { min-height: 0; height: calc(44 * var(--u)); padding: 0 calc(29.5 * var(--u)); border-width: calc(2.2 * var(--u)); font-size: calc(17.5 * var(--u)); }
}

/* The other screens are drawn at 1440 x 902 too. On bigger windows (or when
 * zoomed out) they scale up by --zoom, set by fitZoom() in app.js. */
body:not(.is-intro) .topbar, body:not(.is-intro) #app { zoom: var(--zoom, 1); }

/* Short phones: shrink the intro picture so the button stays on screen. */
@media (max-width: 899px) {
  .intro-art { height: 304px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 2px; }
  .ov { width: 262px; flex-shrink: 0; }
  .couch-scene { display: block; width: 250px; height: 107px; margin: -56px 0 0 6px; overflow: hidden; position: relative; z-index: 4; }
  .ov .w1 { left: -9%; top: 0; }
  .ov .w2 { right: -9%; top: 0; }
  .ov .w3 { right: auto; left: -9%; top: 54%; z-index: 5; }
}
@media (max-width: 899px) and (max-height: 760px) {
  .intro-art { height: 200px; }
  .ov { width: 172px; }
  .couch-scene { width: 164px; height: 70px; margin: -37px 0 0 4px; }
  .ov .w2 { display: none; }
  .display { font-size: 31px; }
}
@media (max-width: 899px) {
  .nav .pill { display: none; }
  .steps-nav span:not(.on) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
