/* Rangoonz. Phone first (390 px), then wider. Colors are the "cookie dough" palette.

   How the page is built:
   - SCENES: every section is one screen tall on the visitor's own device, and the page
     settles onto each one. Sauce drips from the top edge of each scene.
   - SHEETS: building a box happens in a layer fixed to the
     screen (full screen on phones, a centered card on larger screens), so nothing on
     the page scrolls while someone is choosing. */

@font-face {
  font-family: 'Gorditas';
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/gorditas-700-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Gabarito';
  font-weight: 400 900;
  font-display: swap;
  src: url('../assets/fonts/gabarito-latin.woff2') format('woff2');
}

:root {
  --ground: #EBCB9F;
  --choc: #4A2716;
  --cream: #FFF8EE;
  --white: #FFFFFF;
  --gold: #F3B23E;
  --card: #5C331E;      /* panels on chocolate */
  --deep: #3A1D0F;      /* unselected chips on chocolate */
  --ink-deep: #2E170B;  /* hard shadows on chocolate */
  --field: #FFFDF8;     /* inputs */
  --line-dark: #A57B5A; /* borders on chocolate */
  --line-light: #9A6A3A;/* borders on cream */
  --display: 'Gorditas', Georgia, serif;
  --body: 'Gabarito', Arial, sans-serif;
  --err: #B3261E;       /* form errors: the one red on the site */
  --edge-h: 92px;       /* height of the sauce edge at the top of a scene */
  --edge-scale: .8;     /* drips are drawn a little smaller on phones; art.js reads this */
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
/* The home page comes to rest on one whole scene after every swipe. scenes.js turns this on
   only while every scene fits on the screen and nobody is typing in a field. */
html.snap { scroll-snap-type: y mandatory; }
html.sheet-open, html.sheet-open body { overflow: hidden; }
body { margin: 0; font-family: var(--body); font-size: 18px; line-height: 1.5; color: var(--choc); background: var(--ground); }
h1, h2, h3, h4, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-underline-offset: 3px; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }

.wrap { max-width: 1200px; margin: 0 auto; padding-inline: 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 50; padding: 12px 18px; border-radius: 12px; background: var(--choc); color: var(--cream); font-weight: 800; }
.skip:focus { top: 12px; }

/* One focus ring that shows on every background: cream inside, chocolate outside. */
:focus-visible { outline: 3px solid var(--cream); outline-offset: 2px; box-shadow: 0 0 0 7px var(--choc) !important; }
.search:focus-within { outline: 3px solid var(--cream); outline-offset: 2px; box-shadow: 0 0 0 7px var(--choc); }
.search input:focus-visible, [tabindex="-1"]:focus-visible { outline: 0; box-shadow: none !important; }

h2 { font-family: var(--display); font-weight: 700; font-size: clamp(29px, 3.6vw, 50px); line-height: 1.06; text-wrap: balance; }
h3 { font-family: var(--display); font-weight: 700; font-size: 22px; line-height: 1.1; }
.sub { font-size: 17px; line-height: 1.45; max-width: 34em; text-wrap: pretty; }
.fine { font-size: 15px; line-height: 1.45; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px; border: 3px solid var(--choc); border-radius: 16px; background: transparent; color: var(--choc); font-weight: 800; font-size: 17px; line-height: 1.15; text-align: center; text-decoration: none; transition: transform .12s ease, box-shadow .12s ease; }
.btn:hover:not(:disabled) { transform: translateY(-2px); }
/* Lifted, a button would leave a pointer that rests on its bottom edge, drop back and lift
   again, over and over. This unseen strip under it keeps the pointer on the button. */
.btn { position: relative; }
.btn:hover:not(:disabled)::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 4px; }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn-dark { --lift: var(--ink-deep); background: var(--choc); color: var(--cream); }
.btn-gold { --lift: #B5651D; background: var(--gold); border-color: var(--gold); color: var(--choc); }
.btn-gold.outlined { border-color: var(--choc); }
.btn-cream { --lift: var(--line-dark); background: var(--cream); border-color: var(--cream); color: var(--choc); }
.btn-dark, .btn-gold, .btn-cream { box-shadow: 0 4px 0 var(--lift); }
.btn-dark:hover:not(:disabled), .btn-gold:hover:not(:disabled), .btn-cream:hover:not(:disabled) { box-shadow: 0 6px 0 var(--lift); }
.btn-dark:active:not(:disabled), .btn-gold:active:not(:disabled), .btn-cream:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--lift); }
.btn-line-cream { border-color: var(--cream); color: var(--cream); font-weight: 700; }
.btn-line { border-color: var(--line-light); font-weight: 700; }
.btn-lg { min-height: 58px; padding: 0 28px; border-radius: 18px; font-size: 19px; }
.btn-pill { min-height: 44px; padding: 0 20px; border-radius: 999px; }
.btn-block { width: 100%; }
.text-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0; border: 0; background: transparent; font-weight: 700; font-size: 16px; text-decoration: underline; text-underline-offset: 4px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-row .btn { flex: 1 1 auto; }
/* Two buttons that always share one line, on any phone. */
.btn-pair { display: flex; gap: 8px; }
.btn-pair .btn { flex: 1 1 auto; min-width: 0; padding: 0 10px; gap: 6px; font-size: clamp(14px, 4.1vw, 16px); white-space: nowrap; }
.btn-pair .btn svg { flex: none; }
.page-link { align-self: flex-start; }
/* A link inside a sentence that does something ("Send it again"). */
.link-btn { display: inline; padding: 0; border: 0; background: transparent; font: inherit; font-weight: 800; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn:disabled { text-decoration: none; cursor: default; }
/* A short message at the top of the page that goes away by itself. */
.notice { position: fixed; top: 12px; left: 50%; z-index: 50; transform: translateX(-50%); max-width: calc(100vw - 24px); padding: 12px 18px; border: 3px solid var(--choc); border-radius: 16px; background: var(--gold); color: var(--choc); box-shadow: 0 4px 0 var(--choc); font-weight: 800; font-size: 16px; line-height: 1.3; text-align: center; }
/* Cloudflare's person check, in the rare case it needs the visitor to do something. On the
   page it sits at the bottom, in the middle. */
.person-check { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 60; transform: translateX(-50%); }
/* In a sheet (the builder) it sits just above the sheet's buttons, across from their
   middle: state.js measures where they are. Without a footer, the middle of the screen. */
.sheet > .person-check { left: var(--foot-mid, 50%); bottom: calc(var(--foot-room, 50vh) + 10px); }
/* Showing: a cream card of its own, so its line reads the same on the cream builder and on
   the chocolate page. Cloudflare's widget is 300px wide, so the card's sides are thin
   enough for it to fit a 320px screen. */
.person-check.asking { display: flex; flex-direction: column; align-items: center; gap: 8px; width: max-content; max-width: calc(100vw - 4px); padding: 10px 6px 8px; border: 2px solid var(--choc); border-radius: 16px; background: var(--cream); color: var(--choc); box-shadow: 0 4px 0 var(--choc); }
.person-check-label { margin: 0; padding-inline: 6px; color: var(--choc); font-weight: 800; font-size: 16px; line-height: 1.3; text-align: center; }
/* An error on the chocolate sheet: red words would be too dark, so cream words and a red badge. */
.err.on-dark-err { color: var(--cream); }
.icon-btn { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 2px solid currentColor; border-radius: 50%; background: transparent; }

/* ---------- Fields ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .label { font-weight: 700; font-size: 16px; }
.field .opt-tag { font-weight: 500; }
.input, .textarea { width: 100%; min-width: 0; height: 54px; padding: 0 16px; border: 3px solid var(--choc); border-radius: 16px; background: var(--field); color: var(--choc); font-size: 18px; }
.textarea { height: auto; min-height: 84px; padding: 12px 14px; line-height: 1.4; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: #84614A; opacity: 1; }
.on-dark .input { border-color: var(--cream); }
.on-white .input, .on-white .textarea { border-color: var(--line-light); background: var(--white); }
/* A field with a mistake: red edge, a faint red wash, and a red message under it with a "!"
   badge (so it never rests on color alone). */
.input[aria-invalid="true"], .on-white .input[aria-invalid="true"], .on-dark .input[aria-invalid="true"] { border-color: var(--err); background: #FFF3F0; }
.err { display: flex; align-items: center; gap: 8px; color: var(--err); font-weight: 800; font-size: 15px; }
/* On gold (the join band, the builder's entry card) and on the page's own tan (the
   emailed-link pages) red text is too faint to read, so the words stay dark and the badge
   is red. */
.join .err, .card-gold .err, .link-page .err { color: var(--choc); }
.err::before { content: '!'; flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--err); color: #fff; font-size: 13px; line-height: 1; -webkit-text-fill-color: #fff; }
/* "Did you mean you@gmail.com?" under an email field: a quiet offer, not a mistake. */
.hint { font-weight: 600; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.field-row { display: flex; flex-wrap: wrap; gap: 12px; }
.field-row .grow { flex: 2 1 220px; }
.field-row .zip { flex: 1 1 120px; }
.form { display: flex; flex-direction: column; gap: 14px; }

.search { display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 14px; border: 3px solid var(--cream); border-radius: 14px; background: var(--field); color: var(--choc); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 17px; }
.on-white .search, .sheet.build .search { border-color: var(--line-light); background: var(--white); }
/* The flavor search: big, cream and gold, with a tag that says you can add your own. */
.search.big { height: 56px; padding: 0 8px 0 15px; border: 3px solid var(--gold); border-radius: 18px; background: var(--cream); box-shadow: 0 4px 0 var(--ink-deep); }
.search.big input { font-weight: 600; }
.search.big input::placeholder { color: #84614A; opacity: 1; }
.own-tag { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 8px 12px 8px 9px; border-radius: 999px; background: var(--gold); color: var(--choc); font-weight: 800; font-size: 14px; line-height: 1; white-space: nowrap; }
.own-tag svg { width: 14px; height: 14px; }
/* The same bar on the builder's cream sheet: white inside, with the amber edge the gold buttons have. */
.sheet.build .search.big { border-color: var(--gold); background: var(--white); box-shadow: 0 4px 0 #B5651D; }

/* ---------- Scenes: one screen each ---------- */
.scene { position: relative; display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; scroll-snap-align: start; }
/* The last scene (the join section and the footer) ends the page, and its snap area runs on
   past the end, so the page moves freely at the very bottom. There a phone's browser bars
   come and go, and let the page scroll a little past its end so the footer clears them;
   snapping strictly to the scene's edge fought that, and the page jumped. */
.scene.join { scroll-margin-bottom: 50vh; }
/* On a phone the join section fills a screen of its own, like every other scene, and the
   footer comes after it. Sharing one screen with the footer, the join section was shorter
   than the others and ended exactly at the end of the page: landing on it was landing on
   the end, where Safari brings its bar back and moves the page on again, so the page jumped
   lower after it had landed. Now the landing is the join section, and a short move more
   brings the footer and the end. It is as tall as the large viewport (lvh: the browser's
   bars tucked away, as they are while swiping down), so the footer is below the screen
   even then. */
@media (max-width: 959px) {
  #join { min-height: 100vh; min-height: 100lvh; }
}
.scene-body { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; gap: 16px; width: 100%; max-width: 1200px; margin: 0 auto; padding: 4px 20px 30px; }
.scene-head { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.scene-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* Sauce edge at the top of a scene. Sauce only moves down the page, and only sauce
   drips (chocolate or caramel). Drawn 1:1 and cropped, never stretched. */
.edge { flex: none; position: relative; height: var(--edge-h); overflow: hidden; line-height: 0; }
.edge-svg { position: absolute; top: 0; left: 50%; margin-left: -1300px; max-width: none; scale: var(--edge-scale); transform-origin: 50% 0; }
.edge .sauce { fill: var(--sauce); }
.edge .shade { fill: var(--shade); }
.edge .over { fill: var(--over); }
.edge .gloss { stroke: var(--gloss); }
/* How the drips move (mountEdges in art.js): they follow the page. --p, set as the page
   moves, runs from 0 (the section's first seam just on the screen, at the bottom) to 1 (the
   section has landed), and each drip starts to grow a little later than the last (--o).
   Each drip is two pieces: the drip itself (.neck) stretches down from the edge, and the
   round underside of its bead (.bead) rides on the end of it, so the bottom stays round.
   Without .follow (reduced motion) every drip hangs still at full length. */
.edge .drip .neck { transform-box: fill-box; transform-origin: 50% 0; }
.edge.follow .drip { --s: clamp(0, (var(--p, 1) - var(--o)) / (1 - var(--o)), 1); }
.edge.follow .drip .neck { transform: scaleY(var(--s)); }
.edge.follow .drip .bead { transform: translateY(calc(var(--k) * -1px * (1 - var(--s)))); }
.edge.follow .drip .drop { transform: translateY(calc(var(--g) * -1px * (1 - clamp(0, (var(--s) - .8) * 5, 1)))); }

/* ---------- Hero ---------- */
.hero { background: var(--ground); }
.hero-grid { flex: 1 1 auto; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(170px, 1fr) auto auto; grid-template-areas: "top" "head" "stage" "lede" "go"; align-items: center; gap: 12px; width: 100%; padding-top: 12px; padding-bottom: 14px; }
.hero-top { grid-area: top; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.top-nav { display: flex; flex: none; align-items: center; justify-content: flex-end; gap: 8px 24px; }
/* The top-right link is an outline, so it never outweighs the wordmark beside it. */
/* The list button in the header is a quiet, secondary button: smaller and lighter than the
   wordmark beside it and the main button on the page. Drawn 36px tall, but its invisible
   edge makes it the usual 44px to tap. */
.nav-cta { min-height: 36px; padding: 0 13px; border-width: 2px; font-size: 14px; }
.nav-cta::before { content: ''; position: absolute; top: -6px; bottom: -6px; left: 0; right: 0; } /* measured from inside the 2px border; only the height needs it */
.nav-link { display: none; font-weight: 700; font-size: 17px; }
/* The wordmark and the headline are the same face, so they are told apart by role and
   size: the wordmark is the header's mark (about the size it is on every other page), and
   the headline is the only big type in the hero. */
.brand { flex: 0 1 148px; min-width: 0; }
.brand img { display: block; width: 100%; height: auto; }
.hero-copy { display: contents; }
.hero-head { grid-area: head; display: flex; flex-direction: column; gap: 7px; margin-top: 6px; }
.hero h1 { font-family: var(--display); font-weight: 700; font-size: clamp(31px, 8.6vw, 44px); line-height: 1.06; text-wrap: balance; }
/* The asterisk hangs past the end of the line: it takes no width, so it never pushes the
   headline onto a third line. */
.hero h1 .star { display: inline-block; width: 0; text-indent: .04em; }
/* The footnote and the place are the quiet lines: smaller, lighter, a softer brown. */
.no-crab, .hero-place { font-weight: 600; font-size: 14px; line-height: 1.3; color: #6B3A1E; }
.lede { grid-area: lede; font-size: 17px; line-height: 1.42; max-width: 32em; text-wrap: pretty; }
.hero-go { grid-area: go; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hero-cta { width: 100%; }

/* The stage: a chocolate card with slow-turning rays and one big rangoon. It takes up
   whatever height is left on the first screen. */
.stage { grid-area: stage; position: relative; align-self: stretch; min-height: 170px; margin-bottom: 26px; }
.stage-clip { position: absolute; inset: 0; overflow: hidden; border: 3px solid var(--choc); border-radius: 28px; background: var(--choc); }
/* Until stage.js has drawn the picture, and for good without a script, the stage is the
   same chocolate card with its glow, holding only its "Coming 2027" sticker (index.html). */
.stage:not(:has(.stage-clip)) { border-radius: 28px; background: radial-gradient(ellipse 62% 58% at 50% 58%, rgba(243, 178, 62, .55), rgba(243, 178, 62, 0) 100%), var(--choc); }
.stage-rays { position: absolute; inset: -75%; background: repeating-conic-gradient(from 0deg at 50% 50%, var(--card) 0deg 11.25deg, var(--choc) 11.25deg 22.5deg); animation: spin 120s linear infinite; }
.stage-glow { position: absolute; inset: 0; background: radial-gradient(ellipse 62% 58% at 50% 58%, rgba(243, 178, 62, .55), rgba(243, 178, 62, 0) 100%); }
.stage-art { position: absolute; inset: 0 0 14px; touch-action: pan-y; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.layer { position: absolute; inset: 0; }
.layer svg, svg.layer { display: block; width: 100%; height: 100%; max-width: none; }
.l-plate { transform-origin: 50% 82%; }
.l-rangoon .r { position: absolute; inset: 0; transform-origin: 45% 80%; }
.l-cup { transform-origin: 80% 85%; }
.l-sparkle { fill: var(--cream); pointer-events: none; }
.l-sparkle path { transform-box: fill-box; transform-origin: center; animation: twinkle 2.6s ease-in-out infinite; }
/* Nothing keeps moving once the slideshow has rested (stage.js sets data-playing). */
.stage[data-playing="no"] .stage-rays, .stage[data-playing="no"] .l-sparkle path { animation-play-state: paused; }
.l-sparkle path:nth-child(2) { animation-delay: -.9s; }
.l-sparkle path:nth-child(3) { animation-delay: -1.7s; }
.stage-sticker { position: absolute; top: 10px; right: 10px; z-index: 2; padding: 5px 11px 4px; border-radius: 999px; background: var(--gold); color: var(--choc); box-shadow: 0 3px 0 var(--ink-deep); font-family: var(--display); font-weight: 700; font-size: 13px; line-height: 1.1; white-space: nowrap; transform: rotate(4deg); }
.stage-label { position: absolute; left: 50%; bottom: -26px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; max-width: calc(100% - 20px); min-height: 56px; padding: 6px 8px 6px 20px; border: 3px solid var(--choc); border-radius: 999px; background: var(--cream); color: var(--choc); box-shadow: 0 4px 0 var(--choc); text-align: left; white-space: nowrap; }
.stage-label:active { transform: translateX(-50%) translateY(3px); box-shadow: 0 1px 0 var(--choc); }
.stage-label .could { display: block; font-weight: 800; font-size: 11px; letter-spacing: .09em; line-height: 1.2; text-transform: uppercase; }
.stage-label .name { display: block; font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 1.1; }
.stage-label .name.long { font-size: 16px; }
.stage-label .go { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border: 3px solid var(--choc); border-radius: 50%; background: var(--gold); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes twinkle { 0%, 100% { transform: scale(1); } 50% { transform: scale(.45); } }
/* Movement only, never opacity: a paused animation must not hide a drawing. */
@keyframes pop { from { transform: translateY(10px) scale(.93); } to { transform: none; } }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: .55; } }
@keyframes squish { 0% { transform: scale(1); } 35% { transform: scale(.93); } 70% { transform: scale(1.06); } 100% { transform: scale(1); } }
.just { animation: squish .28s ease-out; }
.swap { animation: pop .4s cubic-bezier(.34, 1.56, .64, 1) both; }
.burst-crumb { position: fixed; z-index: 60; width: 8px; height: 8px; border-radius: 2px; pointer-events: none; }

/* ---------- The town split (shown in the Build scene) ---------- */
.journey h2 { color: var(--gold); text-shadow: 3px 3px 0 var(--ink-deep); }
.mo { display: flex; flex-direction: column; gap: 6px; padding: 10px 14px; border: 2px solid var(--line-light); border-radius: 16px; font-size: 15px; line-height: 1.35; }
/* What the bar measures, in a small caption over it (the bar's own label says it aloud). */
.split-title { font-weight: 800; font-size: 13px; letter-spacing: .08em; line-height: 1.2; text-transform: uppercase; color: #6B3A1E; }
.split-labels { display: flex; justify-content: space-between; gap: 12px; font-weight: 800; }
.split-bar { display: flex; height: 12px; overflow: hidden; border: 2px solid var(--choc); border-radius: 999px; }
.split-bar .a { background: var(--gold); }
.split-bar .b { background: var(--choc); }

/* ---------- Options (used inside the sheets) ---------- */
/* The three places in the box, in the builder's corner. */
.pips { flex: none; display: flex; gap: 5px; }
.pip { display: grid; place-items: center; width: 32px; height: 32px; border: 2px dashed var(--line-dark); border-radius: 50%; }
.pip.on { border: 2px solid var(--gold); background: var(--cream); }
.pip .art { display: block; width: 24px; height: 24px; }
.tile:active, .opt:active { transform: scale(.95); }
.add-btn { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 14px; border: 3px solid var(--gold); border-radius: 16px; background: var(--gold); color: var(--choc); box-shadow: 0 4px 0 #B5651D; text-align: left; }
.add-btn .plus { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--choc); color: var(--gold); }
.add-btn strong { display: block; font-weight: 800; font-size: 17px; line-height: 1.2; }
.add-btn span span { font-size: 15px; }
.add-btn:disabled { opacity: .55; box-shadow: none; cursor: not-allowed; }


.card { display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: 22px; }
.sheet .card { gap: 8px; padding: 16px 18px; }
.card-gold { background: var(--gold); color: var(--choc); }
.card-gold h2, .card-gold h3 { color: var(--choc); text-shadow: none; font-size: clamp(24px, 2.6vw, 34px); }
.card-dark { background: var(--card); color: var(--cream); }
.card-cream { background: var(--cream); color: var(--choc); }
.eyebrow { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 16px; }

/* ---------- Build scene ---------- */
.build { background: var(--cream); }
/* Once a box is saved its name is the heading, with a small label over it saying whose it is. */
.scene-head hgroup { display: flex; flex-direction: column; gap: 6px; }
.scene-label { font-weight: 800; font-size: 13px; letter-spacing: .08em; line-height: 1.2; text-transform: uppercase; color: #6B3A1E; }
.teaser { align-self: center; display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; padding: 12px 18px 16px; border-radius: 26px; background: var(--choc); color: var(--cream); box-shadow: 5px 6px 0 var(--ink-deep); text-align: center; }
/* Before anything is asked of anyone: what a box is, the chance each one gives (pulled close
   to the line above it), and the draw's small print. */
.scene-head .scene-draw { margin-top: -4px; font-weight: 700; }
/* The drawing gives up height, down to its smallest, so the section stays one screen tall with
   "Start your box" on it: --teaser-rest is everything else in the section, measured by
   builder.js (fitTeaser). Side by side on a wide screen it has its own size, below. */
.teaser-art { position: relative; width: 100%; height: min(30vh, 236px); height: clamp(104px, 100svh - var(--teaser-rest, 0px), min(30vh, 236px)); }
.teaser-art > div { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
.teaser-art .art { display: block; width: 100%; height: 100%; max-width: none; }
/* The box (art.js boxOf): a rangoon just made drops into its cup, one after another, and its
   sauce follows. Each moves inside a group of its own, since a drawn piece's own position
   would be overwritten by an animation on it. */
.art-box .spot.drop .fall { transform-box: fill-box; transform-origin: 50% 100%; animation: drop-in .55s cubic-bezier(.3, .7, .4, 1) both; }
.art-box .spot.drop .sauce { animation: rise-in .35s ease-out .42s both; }
.art-box .spot.drop[data-slot="2"] .fall { animation-delay: .14s; }
.art-box .spot.drop[data-slot="3"] .fall { animation-delay: .28s; }
.art-box .spot.drop[data-slot="2"] .sauce { animation-delay: .56s; }
.art-box .spot.drop[data-slot="3"] .sauce { animation-delay: .7s; }
.teaser p { font-weight: 800; font-size: 16px; line-height: 1.3; text-wrap: balance; }
.teaser.saved p { font-weight: 700; font-size: 15px; }

/* ---------- Sheets: a layer fixed to the screen ---------- */
.sheet { position: fixed; inset: 0; z-index: 30; display: flex; background: var(--choc); color: var(--cream); }
.sheet-card { display: flex; flex-direction: column; width: 100%; height: 100%; }
.sheet-head { flex: none; display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 8px 14px; }
.sheet-head h2 { flex: 1; min-width: 0; font-size: clamp(18px, 5vw, 22px); color: var(--gold); text-shadow: none; }
.sheet-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 4px 16px 10px; }
/* Nothing in the scrolling area is squeezed to make room (the search bar used to shrink): it scrolls. */
.sheet-body > * { flex: none; }
.sheet-foot { flex: none; display: flex; gap: 10px; padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 2px solid var(--card); }
.sheet-foot .btn { min-height: 54px; }
.sheet-foot .grow { flex: 1 1 auto; }
/* Two buttons whose words should never break (Build another, Done: see my box): side by
   side when they fit, one above the other, full width, when they do not. */
.sheet-foot.stacks { flex-wrap: wrap; }
.sheet-foot.stacks .btn { flex: 1 1 auto; white-space: nowrap; }
/* Not ready yet: a gold outline, not a muddy faded button. */
.sheet-foot .btn-gold:disabled { opacity: 1; border-style: dashed; background: transparent; color: var(--gold); }
.sheet.build .sheet-foot .btn:disabled { opacity: 1; border-style: dashed; border-color: var(--line-light); background: transparent; color: #6B3A1E; box-shadow: none; }

/* The builder sheet is cream, like its scene. */
.sheet.build { background: var(--cream); color: var(--choc); }
.sheet.build .sheet-foot { border-top-color: #EAD7BA; }
.sheet.build .sheet-head { padding-bottom: 4px; }
.sheet.build .field-row { flex-wrap: nowrap; gap: 10px; }
.sheet.build .field-row .grow { flex: 1 1 auto; }
.sheet.build .field-row .zip { flex: 0 0 112px; }
.sheet.build .textarea { min-height: 56px; padding: 5px 14px; font-size: 16px; }
/* Your rangoon so far: the drawing on the left, what it is in one sentence beside it. */
.b-preview { flex: none; display: flex; align-items: center; gap: 10px; min-height: clamp(128px, 22vh, 236px); margin: 0 14px 6px; padding: 6px 16px 6px 8px; border-radius: 22px; background: var(--choc); color: var(--cream); box-shadow: 0 5px 0 var(--ink-deep); text-align: left; }
.b-plate { position: relative; flex: 0 0 46%; align-self: stretch; }
.b-plate > div { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
.b-plate .art { display: block; width: 100%; height: 100%; max-width: none; }
.b-summary { flex: 1 1 0; min-width: 0; font-weight: 700; font-size: 15px; line-height: 1.28; }
/* A typed-in flavor or name can be one long word: it breaks, and never runs off the screen. */
.b-summary, .box-text, .box-title, .share-card h1, .share-card .sum, .mate-text, .mini-text, .teaser p, .scene-head h2 { overflow-wrap: anywhere; }


.step { display: flex; flex-direction: column; gap: 8px; }
.step > p { font-size: 16px; line-height: 1.4; }
.list-title { font-family: var(--body); font-weight: 700; font-size: 15px; line-height: 1.3; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 104px; padding: 8px 6px; border: 3px solid var(--line-light); border-radius: 18px; background: var(--white); color: var(--choc); box-shadow: 3px 4px 0 var(--line-light); font-weight: 800; font-size: 15px; line-height: 1.15; text-align: center; }
.tile .art { flex: none; width: 62px; height: 62px; }
.tile[aria-pressed="true"], .opt[aria-pressed="true"] { border-color: var(--choc); background: var(--choc); color: var(--cream); box-shadow: 3px 4px 0 var(--ink-deep); }
.cook-tiles { grid-template-columns: 1fr; }
.cook-tile { flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 76px; padding: 8px 14px 8px 10px; text-align: left; }
.cook-tile .art { width: 54px; height: 54px; }
.cook-tile strong { display: block; font-weight: 800; font-size: 18px; }
.cook-tile span span { font-weight: 500; font-size: 15px; line-height: 1.3; }
.opts { display: flex; flex-wrap: wrap; gap: 10px; }
/* A long list of options (the sauces) sits in two tidy columns so it fits without scrolling. */
.opts.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 8px; }
.opts.two .opt { min-height: 44px; padding: 4px 10px 4px 8px; font-size: 15px; box-shadow: 2px 3px 0 var(--line-light); }
.opts.two .opt[aria-pressed="true"] { box-shadow: 2px 3px 0 var(--ink-deep); }
.opt { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 6px 14px 6px 10px; border: 3px solid var(--line-light); border-radius: 16px; background: var(--white); color: var(--choc); box-shadow: 3px 4px 0 var(--line-light); font-weight: 700; font-size: 16px; line-height: 1.15; text-align: left; }
.opt .sw { flex: none; width: 22px; height: 22px; border: 3px solid var(--choc); border-radius: 50%; background: var(--c); }
.opt[aria-pressed="true"] .sw { border-color: var(--cream); }

/* ---------- The builder: spin, keep, box ---------- */
.sheet.build .sheet-head h2 { color: var(--choc); }
.sheet.build .pip { width: 44px; height: 44px; padding: 0; border: 2px dashed var(--line-light); background: transparent; }
.sheet.build .pip.on { border: 2px solid var(--choc); background: var(--white); }
.sheet.build .pip.now { border: 3px solid var(--choc); }
.sheet.build .pip .art { width: 32px; height: 32px; }
button.pip { cursor: pointer; }
button.pip:active { transform: scale(.94); }
/* The builder's title, with how full the box is under it ("1 of 3"): small, and never
   broken. Under the title rather than beside the places, so the title keeps one line. */
.sheet-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sheet-title h2 { flex: none; }
.pip-count { flex: none; font-weight: 800; font-size: 13px; line-height: 1.2; white-space: nowrap; color: #6B3A1E; }
/* One row per part: its name and what it is now (tap to choose it yourself), and Keep. */
.reels { display: flex; flex-direction: column; gap: 7px; }
.reel { display: flex; align-items: stretch; gap: 7px; }
.reel-pick { flex: 1 1 auto; min-width: 0; display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 50px; padding: 4px 8px 4px 12px; border: 3px solid var(--line-light); border-radius: 16px; background: var(--white); color: var(--choc); box-shadow: 3px 4px 0 var(--line-light); text-align: left; }
.reel.kept .reel-pick { border-color: var(--choc); box-shadow: 3px 4px 0 var(--ink-deep); }
.reel-label { font-weight: 800; font-size: 12px; letter-spacing: .08em; line-height: 1.2; text-transform: uppercase; color: #6B3A1E; }
/* The window a reel turns in: one line tall. While a spin runs it holds a strip of names
   that slides up and stops on the last one (builder.js moves it). */
.reel-window { display: block; min-height: 24px; overflow: hidden; }
.reel-window.turning { height: 24px; }
.reel-strip > span { display: block; height: 24px; overflow: hidden; font-weight: 800; font-size: 17px; line-height: 24px; white-space: nowrap; text-overflow: ellipsis; }
/* At rest a long name (Dark Chocolate Fudge) takes a second line instead of being cut short. */
.reel-value { display: block; font-weight: 800; font-size: 17px; line-height: 1.12; overflow-wrap: anywhere; text-wrap: balance; }
.reel-value.none { font-weight: 600; color: #6B3A1E; }
.reel-strip { display: flex; flex-direction: column; will-change: transform; }
.reel-go { display: grid; place-items: center; color: #6B3A1E; }
.reel-keep { flex: 0 0 82px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 50px; padding: 0 6px; border: 3px solid var(--line-light); border-radius: 16px; background: transparent; color: var(--choc); font-weight: 800; font-size: 15px; }
.reel-keep[aria-pressed="true"] { border-color: var(--choc); background: var(--choc); color: var(--cream); }
.reel-keep:disabled { opacity: .45; cursor: not-allowed; }
.reel-pick:active, .reel-keep:active:not(:disabled) { transform: scale(.97); }
.reel-hint { text-align: center; }
/* Taking the one being changed out of the box: a full-size button, but plainly the lesser one. */
.take-out { border-width: 2px; color: #6B3A1E; }
/* The topping row: optional, so its edge is dashed until a topping is chosen. It has no
   Keep (a spin never changes it), so it runs the full width. */
.reel.topping { margin-top: 6px; } /* clear of the sauce row's shadow, and a step apart */
.reel.topping .reel-pick { border-style: dashed; box-shadow: none; }
.reel.topping.on .reel-pick { border-style: solid; box-shadow: 3px 4px 0 var(--line-light); }
.reel.topping.arrive { animation: arrive .34s cubic-bezier(.2, .8, .3, 1.15) both; }
@keyframes arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.topping-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.topping-tile .art { width: 92px; height: 92px; }
.spin-btn { flex: 0 0 38%; font-family: var(--display); font-size: 22px; letter-spacing: .03em; text-transform: uppercase; }
.sheet.build .sheet-foot .spin-btn[aria-disabled="true"] { opacity: .5; box-shadow: none; transform: none; cursor: default; }

/* The rangoons in a box, as a list: in the builder, and on the result. */
.box-list { display: flex; flex-direction: column; gap: 8px; }
.box-item { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border: 3px solid var(--line-light); border-radius: 18px; background: var(--white); color: var(--choc); }
.box-art .art { display: block; width: 58px; height: 58px; }
.box-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.box-text > strong { font-family: var(--display); font-weight: 700; font-size: 19px; line-height: 1.1; }
.box-text > span { font-weight: 600; font-size: 14px; line-height: 1.25; }
.box-edit { min-height: 44px; padding: 0 12px; border-width: 2px; border-radius: 14px; font-size: 15px; }
/* The places still empty in the builder's box: the same size as a rangoon's row, dashed
   like the empty places in the tray, and a tap on one starts the next rangoon. */
.box-rooms { display: flex; flex-direction: column; gap: 8px; margin-top: -4px; }
.box-room { display: grid; grid-template-columns: 58px minmax(0, 1fr); align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 3px dashed var(--line-light); border-radius: 18px; background: transparent; color: var(--choc); text-align: left; }
.box-ghost { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 14px; background: #F3E4CC; color: var(--line-light); transition: background .15s, color .15s; }
.box-ghost svg { width: 26px; height: 26px; }
.box-room .box-text > span { color: #6B3A1E; }
.box-room:hover { border-color: var(--choc); }
.box-room:hover .box-ghost { background: var(--gold); color: var(--choc); }
.box-room:active { transform: scale(.98); }
/* A stamp: a gold tag, set a little askew, and one quiet line beside it. */
.stamp { align-self: flex-start; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 3px 8px; margin-top: 3px; }
.stamp strong { padding: 3px 10px; border-radius: 999px; background: var(--gold); color: var(--choc); font-weight: 800; font-size: 13px; line-height: 1.3; white-space: nowrap; transform: rotate(-1.5deg); }
.stamp span { font-weight: 600; font-size: 13px; line-height: 1.25; }

/* The result: the box's name over its first rangoon, the box, sharing, then the form. */
.result-top .b-summary { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.box-title { font-family: var(--display); font-weight: 700; font-size: clamp(20px, 5.6vw, 26px); line-height: 1.08; color: var(--gold); text-wrap: balance; }
/* Over the box's name: where a name nobody typed came from ("We named your box"). */
.box-label { font-weight: 800; font-size: 12px; letter-spacing: .08em; line-height: 1.2; text-transform: uppercase; }
.result-top .link-btn { display: inline-flex; align-items: center; min-height: 36px; font-size: 15px; }

/* The box, after "Box it": its three places drawn big, then what just happened and what
   to do next. */
.b-preview.boxed-top { flex-direction: column; justify-content: center; gap: 10px; padding: 12px 14px 14px; text-align: center; }
.tray { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; max-width: 340px; padding: 8px; border-radius: 20px; background: #5C331E; box-shadow: inset 0 3px 0 rgba(0, 0, 0, .2); }
.slot { display: grid; place-items: center; aspect-ratio: 5 / 4; border: 2px dashed rgba(255, 248, 238, .32); border-radius: 14px; }
.slot.on { border: 2px solid var(--gold); background: var(--cream); }
.slot .art { display: block; width: 76%; height: 76%; }
.tray.full { box-shadow: inset 0 3px 0 rgba(0, 0, 0, .2), 0 0 0 3px var(--gold); }
.cheer { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cheer-line { max-width: 34ch; font-weight: 700; font-size: 15px; line-height: 1.3; text-wrap: balance; }
/* The little party, played once, just after "Box it": the rangoon drops into its place and
   the place gives under it, then the words pop. The one that fills the box sets all three
   hopping and rings the box in gold. (With reduced motion on, none of this moves.) */
.party .slot.drop .art { animation: drop-in .55s cubic-bezier(.3, .7, .4, 1) both; }
.party .slot.drop { animation: thud .42s ease-out .3s both; }
.party .box-title { animation: cheer-pop .46s cubic-bezier(.3, 1.5, .5, 1) .16s both; }
.party .cheer-line { animation: rise-in .4s ease-out .32s both; }
.party .tray.full { animation: ring 1.1s ease-out .42s both; }
.party .tray.full .slot.on { animation: hop .52s ease-out calc(.5s + var(--i) * .1s) both; }
.party.quiet .box-title { animation-name: rise-in; }
@keyframes drop-in {
  0% { transform: translateY(-80%) scale(.5) rotate(-14deg); opacity: 0; }
  55% { transform: translateY(6%) scale(1.08) rotate(4deg); opacity: 1; }
  78% { transform: translateY(-3%) scale(.97) rotate(-1deg); }
  100% { transform: none; opacity: 1; }
}
@keyframes thud { 0%, 100% { transform: none; } 35% { transform: scale(1.07, .9); } 70% { transform: scale(.98, 1.03); } }
@keyframes cheer-pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes rise-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes hop { 0%, 100% { transform: none; } 40% { transform: translateY(-9%) scale(1.05); } 70% { transform: translateY(2%) scale(.98); } }
@keyframes ring {
  0% { box-shadow: inset 0 3px 0 rgba(0, 0, 0, .2), 0 0 0 0 rgba(243, 178, 62, .9); }
  55% { box-shadow: inset 0 3px 0 rgba(0, 0, 0, .2), 0 0 0 16px rgba(243, 178, 62, 0); }
  56% { box-shadow: inset 0 3px 0 rgba(0, 0, 0, .2), 0 0 0 0 rgba(243, 178, 62, 1); }
  100% { box-shadow: inset 0 3px 0 rgba(0, 0, 0, .2), 0 0 0 3px var(--gold); }
}
.result-line { font-weight: 700; font-size: 16px; line-height: 1.3; text-align: center; text-wrap: balance; }
/* The first name on the box: a field and a small Add button on one line, then "Made by Rob · Change". */
.by-form { gap: 8px; }
.by-row { display: flex; gap: 8px; }
.by-row .input { flex: 1 1 auto; }
.by-row .btn { flex: none; min-height: 54px; padding: 0 20px; }
.by-line { font-weight: 700; font-size: 16px; line-height: 1.3; text-align: center; }
.by-line strong { font-weight: 800; }
.by-line .link-btn { display: inline-flex; align-items: center; min-height: 36px; font-size: 15px; }
.result-wait { padding: 10px; font-weight: 800; text-align: center; }
.sheet.build .card-cream { border: 3px solid var(--line-light); background: var(--white); }
.sheet .card.entry { gap: 10px; border: 3px solid var(--choc); }
.entry h3 { font-size: 22px; }
.entry .text-link { align-self: flex-start; }
.name-form { gap: 8px; }
.picture img { display: block; width: min(100%, 250px); height: auto; margin: 0 auto; border: 2px solid var(--line-light); border-radius: 14px; }
.picture p { text-align: center; }

/* ---------- Journey scene ---------- */
.journey { background: var(--choc); color: var(--cream); }
.path { display: flex; flex-direction: column; gap: 0; }
.path li { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 0 12px; padding-bottom: 8px; }
.path li::before { content: ''; position: absolute; left: 17px; top: 36px; bottom: 0; width: 3px; border-radius: 2px; background: var(--card); }
.path li:last-child { padding-bottom: 0; }
.path li:last-child::before { display: none; }
.path .n { grid-row: 1 / span 2; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--gold); color: var(--choc); font-family: var(--display); font-weight: 700; font-size: 17px; }
.path .top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-height: 36px; }
.path h3 { font-size: 19px; }
.path p { font-size: 15px; line-height: 1.3; text-wrap: pretty; }
.add-btn span span, .cook-tile span span, .card p, .fine { text-wrap: pretty; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--gold); color: var(--choc); font-weight: 800; font-size: 13px; line-height: 1.3; white-space: nowrap; }
.status.quiet { border: 2px solid var(--line-dark); background: transparent; color: var(--cream); padding: 1px 9px; }
.block { display: flex; flex-direction: column; gap: 8px; }
.block > h3, .block-head h3 { color: var(--gold); }
/* What a round is, said beside "The rounds" where there is room and under it where there
   is not; and, in each card, what that round asks. */
.block-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; }
.block-head .what { font-size: 15px; line-height: 1.3; }
.round .what { font-size: 13px; line-height: 1.25; }
/* On a phone the section is one screen tall and the cards sit two to a row, so what each
   round asks is left to the wider screens; the line beside the heading still says what a
   round is. */
@media (max-width: 599px) {
  .round .what { display: none; }
  .block-head { row-gap: 0; }
  .block-head .what { font-size: 14px; line-height: 1.25; }
}
.rounds { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.round { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border: 2px dashed var(--line-dark); border-radius: 16px; color: var(--cream); text-decoration: none; }
.round.open { border: 3px solid var(--gold); }
/* "Round 1" never breaks across two lines. If its status does not fit beside it (a narrow
   phone, a large text size), the status drops below it instead. */
.round .top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 6px; font-weight: 800; font-size: 13px; }
.round .top > :first-child { white-space: nowrap; }
.round .status { padding: 2px 8px; font-size: 12px; }
.round .status.quiet { padding: 0 7px; }
.round strong { font-family: var(--display); font-weight: 700; font-size: 16px; line-height: 1.15; }
.notes { display: flex; gap: 10px; margin-inline: -20px; padding: 2px 20px 8px; overflow-x: auto; scroll-snap-type: x proximity; }
.note { flex: 0 0 min(78%, 300px); display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 18px; background: var(--cream); color: var(--choc); box-shadow: 4px 5px 0 var(--ink-deep); scroll-snap-align: start; }
.note .top { font-weight: 700; font-size: 13px; }
.note h4 { font-family: var(--display); font-weight: 700; font-size: 18px; line-height: 1.15; }
.note p { font-size: 15px; line-height: 1.35; }
.note .status { align-self: flex-start; background: var(--choc); color: var(--cream); }

/* ---------- Join scene and footer ---------- */
.join { background: var(--gold); color: var(--choc); }
.join-form { display: flex; flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.join-form .grow { flex: 1 1 180px; }
.join-form .zip { flex: 0 0 112px; }
.join-form .btn { flex: 1 1 100%; }
.join-form .err, .join-form .hint { flex: 1 1 100%; }
.join .card { padding: 16px; border: 3px solid var(--choc); box-shadow: 4px 5px 0 var(--choc); }
.join .card .btn { min-height: 48px; }
.footer { flex: none; background: var(--ground); }
.footer .edge { --edge-h: 58px; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 20px; padding-block: 0 14px; }
.footer-mark { display: block; width: 132px; height: auto; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 16px; font-weight: 700; font-size: 15px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-small { font-weight: 500; font-size: 14px; }
/* The footer on the small pages: the home page's links without its sauce edge (a script
   draws that, and those pages do not load it). Quiet, under a thin line, and at the bottom
   of the screen however short the page (.page-main takes the room above it). The pages an
   email link opens carry only the fine print, centered. */
.page-foot { border-top: 2px solid #DDBA8A; }
.page-foot .footer-row { gap: 0 16px; padding-block: 10px 16px; }
.page-foot .footer-mark { width: 108px; }
.page-foot.slim .footer-links { justify-content: center; gap: 0 12px; padding-block: 4px 10px; }

/* ---------- Small pages: share page, your page, rules, privacy ---------- */
.page { min-height: 100vh; display: flex; flex-direction: column; background: var(--ground); }
.page > .wrap { width: 100%; } /* in a column, a box with auto side margins shrinks to its content: this keeps the wordmark and Home at the two edges */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 14px; }
.page-head img { display: block; width: 190px; height: auto; }
.page-main { flex: 1; display: flex; flex-direction: column; gap: 20px; padding-block: 12px 48px; }
.page-main.center { align-items: center; text-align: center; }
.page-main h1 { font-family: var(--display); font-weight: 700; font-size: clamp(30px, 5vw, 48px); line-height: 1.08; text-wrap: balance; }
/* The share page. Everything a friend can do with the rangoon they were sent (I'd order
   this, Build yours) sits on the first screen, so the drawing takes the height that is left over:
   the screen's height minus everything else on the page. */
.page-head.center { justify-content: center; padding-block: 12px 2px; }
.page-head.center img { width: 164px; }
.b-page .page-head { padding-block: 10px 2px; }
.b-page .page-head img { width: 164px; }
.b-page .page-main { width: 100%; gap: 12px; padding-block: 8px 16px; } /* full width, so the card's own width rule decides its size */
/* The pages an email link opens: one message, one button, in the middle of the screen. */
.link-page { justify-content: center; gap: 16px; padding-block: 24px 96px; }
.link-page .sub { max-width: 26em; }
.link-page .btn-pair { width: min(100%, 420px); }
.link-page .btn-lg { min-width: min(100%, 280px); }
.b-intro { max-width: 21em; font-weight: 700; font-size: 17px; line-height: 1.3; text-wrap: balance; }
/* Under it, for a friend who has only seen the link: what Rangoonz is. Quieter, and close to
   the line above, so the card and its buttons stay on the first screen. */
.b-about { max-width: 28em; margin-top: -6px; font-weight: 500; font-size: 15px; line-height: 1.35; text-wrap: balance; }
/* Where the first screen is too short to hold it as well (the shortest phones, a short
   desktop window), it is shown under the buttons instead of above the card, so everything
   a friend can do stays on the first screen. Only where it is drawn changes: it is still
   read out first. */
@media (max-height: 599px), (min-width: 600px) and (max-height: 719px) {
  .b-about { order: 1; margin-top: 0; }
  .b-page .page-main > .mates { order: 2; }
}
.share-card { width: min(100%, 520px); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 16px 16px; border: 3px solid var(--choc); border-radius: 26px; background: var(--choc); color: var(--cream); box-shadow: 4px 5px 0 var(--ink-deep); }
.share-art { position: relative; align-self: stretch; height: clamp(92px, 100vh - var(--rest, 414px), 240px); height: clamp(92px, 100svh - var(--rest, 414px), 240px); } /* --rest: measured by b.js */
.share-art > div { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
.share-art .art { display: block; width: 100%; height: 100%; max-width: none; }
.share-card h1 { color: var(--gold); font-size: clamp(24px, 7.2vw, 30px); }
.share-card .sum { max-width: 24em; font-weight: 600; font-size: 16px; line-height: 1.32; text-wrap: balance; }
/* "I'd order this": the one thing to do with a friend's rangoon. */
.back { align-self: stretch; display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.back-note { font-weight: 600; font-size: 15px; line-height: 1.35; text-wrap: balance; overflow-wrap: anywhere; } /* a long email address breaks rather than run off a phone */
.back-note strong { color: var(--gold); font-weight: 800; }
.back-note svg { width: 15px; height: 15px; margin-right: 5px; vertical-align: -2px; }
/* Counted: where the button was, same size, but flat. A statement, not something to tap. */
.back-done { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 58px; padding: 0 20px; border: 3px solid var(--gold); border-radius: 18px; color: var(--gold); font-weight: 800; font-size: 19px; line-height: 1.15; }
.back-done:focus-visible { outline: 0; box-shadow: none !important; }
.back-panel { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 18px; background: var(--cream); color: var(--choc); text-align: left; }
.back-ask { font-weight: 800; font-size: 17px; line-height: 1.25; }
.back-panel .field label { font-size: 15px; }
.back-panel .field-row { flex-wrap: nowrap; gap: 10px; }
.back-panel .field-row .grow { flex: 1 1 auto; }
.back-panel .field-row .zip { flex: 0 0 98px; }
.back-panel .input { padding: 0 12px; }
.back-panel .fine { font-size: 14px; line-height: 1.4; }
/* "Not now": a quiet way out of the form, under its button, still big enough to tap. */
.back-panel .back-not { display: inline-flex; align-items: center; align-self: center; min-height: 44px; margin-block: -4px; padding: 0 12px; font-size: 16px; }
.pitch { width: min(100%, 520px); display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 6px; }
.pitch h2 { font-size: clamp(26px, 3.2vw, 34px); }
.pitch .btn-pair { align-self: stretch; }
.share-card + .pitch { margin-top: 0; }
/* The rest of the box, under the first screen: each with its own "I'd order this". */
.mates { width: min(100%, 520px); display: flex; flex-direction: column; gap: 10px; }
.mates h2 { font-size: 24px; }
.mates ul { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.mate { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 8px; padding: 10px 12px 12px; border: 3px solid var(--choc); border-radius: 22px; background: var(--choc); color: var(--cream); box-shadow: 4px 5px 0 var(--ink-deep); }
/* The drawing and words of each of the others: one big button that swaps it up top. */
.mate-pick { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 0; border: 0; border-radius: 14px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.mate-pick:active { transform: scale(.98); }
.mate-go { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 10px 0 8px; border: 2px solid rgba(255, 248, 238, .45); border-radius: 999px; font-weight: 800; font-size: 13px; color: var(--cream); white-space: nowrap; }
.mate-go svg { width: 14px; height: 14px; transform: rotate(180deg); }
.mates-hint { margin-top: -4px; font-size: 15px; }
.mate-art .art { display: block; width: 64px; height: 64px; }
.mate-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mate-text > strong { font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 1.1; color: var(--gold); }
.mate-text > span { font-weight: 600; font-size: 14px; line-height: 1.3; }
.mate-btn, .mate-done { grid-column: 1 / -1; }
.mate-btn { min-height: 48px; }
.mate-done { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border: 2px solid var(--gold); border-radius: 14px; color: var(--gold); font-weight: 800; font-size: 15px; }
/* On a box's page the stamp is a sticker on the picture's corner, like "Coming 2027" on
   the home page: it takes no room of its own, so the buttons stay on the first screen. */
.share-art > .stamp { position: absolute; top: 0; right: -2px; z-index: 1; margin: 0; }
.share-art > .stamp strong { box-shadow: 0 3px 0 var(--ink-deep); transform: rotate(3deg); }
.me-grid { display: grid; gap: 14px; }
.me-grid .card { border: 3px solid var(--choc); box-shadow: 4px 5px 0 var(--choc); }
.me-grid .card-dark { border-color: var(--card); box-shadow: 4px 5px 0 var(--ink-deep); }
.entry-count { font-family: var(--display); font-weight: 700; font-size: 56px; line-height: 1; color: var(--gold); }
.mini-boxes { display: grid; gap: 16px; }
.mini-box h3 { margin-bottom: 8px; font-size: 20px; }
.mini-builds { display: grid; gap: 10px; }
.mini-stamp { align-self: flex-start; padding: 2px 9px; border-radius: 999px; background: var(--gold); color: var(--choc); font-weight: 800; font-size: 12px; line-height: 1.4; }
.mini-build { display: grid; grid-template-columns: 108px minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: 18px; background: var(--choc); color: var(--cream); text-align: left; text-decoration: none; line-height: 1.3; }
.mini-build .art { display: block; width: 100%; height: auto; }
.mini-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mini-text strong { font-weight: 800; font-size: 16px; line-height: 1.2; }
.mini-sum { font-weight: 500; font-size: 14px; line-height: 1.35; }
.mini-sum.solo { font-weight: 700; font-size: 15px; }
.mini-note { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 5px; padding-top: 2px; color: var(--gold); font-weight: 800; font-size: 14px; }
.mini-note svg { flex: none; width: 15px; height: 15px; }
.prose { max-width: 720px; display: flex; flex-direction: column; gap: 14px; }
.prose h2 { font-size: 26px; margin-top: 10px; }
.prose ul { padding-left: 22px; list-style: disc; display: flex; flex-direction: column; gap: 6px; }
/* In a draft page: a blank only the owner can fill, or a proposal to confirm. None may remain at launch. */
.todo { padding: 1px 6px; border: 2px dashed var(--err); border-radius: 8px; background: #FFF3D6; color: var(--choc); font-weight: 700; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.prose h2 + p, .prose p + ul { margin-top: -4px; }
.draft-flag { align-self: flex-start; padding: 6px 14px; border: 3px dashed var(--choc); border-radius: 999px; font-weight: 800; font-size: 15px; }

/* ---------- Prototype review controls (not part of the real site) ---------- */

/* ---------- Short phones (and in-app browsers with tall toolbars) ---------- */
@media (max-height: 640px) and (max-width: 599px) {
  :root { --edge-h: 66px; }
  .scene-body { gap: 12px; padding-bottom: 16px; }
  h2 { font-size: 27px; }
  .sub { font-size: 16px; }
  .path li { padding-bottom: 5px; }
  .path .top { min-height: 32px; }
  .path .n { width: 32px; height: 32px; }
  .round { padding: 6px 10px; }
  .cook-tile { min-height: 66px; }
  .cook-tile .art { width: 46px; height: 46px; }
  .reels { gap: 6px; }
  .reel-pick, .reel-keep { min-height: 46px; }
  .reel-hint { font-size: 13px; }
  .reel-hint.quiet { display: none; }
  .footer .edge { --edge-h: 46px; }
  /* The Build section's lines and its drawing's card sit a little closer, so the drawing
     keeps more of its size (see .teaser-art). */
  .build .scene-head { gap: 8px; }
  .teaser { gap: 6px; padding: 10px 16px 12px; }
}

/* The very shortest phones (an iPhone SE with the browser's bars showing: 375 x 548). */
@media (max-height: 560px) and (max-width: 599px) {
  .hero-grid { gap: 8px; padding-bottom: 10px; }
  .hero-go { gap: 5px; }
  .scene-body { gap: 9px; padding-bottom: 10px; }
  .path li { padding-bottom: 2px; }
  /* A slightly shorter plate, so the five rows (with the gap above the topping) fit
     unscrolled even when a long filling and a long sauce each take two lines. */
  .b-preview { min-height: 114px; }
  /* Each section still has to fit this screen, or the page stops resting on whole sections
     (site/js/scenes.js). So the line that says what a round is gives way here (Your page
     says it too). */
  .block-head .what { display: none; }
}

/* Very narrow screens, and a page zoomed to 400%. */
@media (max-width: 359px) {
  .sheet-head { gap: 6px; padding-inline: 10px; }
  /* No room beside the builder's title for "1 of 3" too: the places show it (and a screen
     reader still hears it), so the header keeps its height. */
  .pip-count { display: none; }
}
/* Very short screens: the whole layer scrolls, so its buttons can always be reached. */
@media (max-height: 430px) and (max-width: 599px) {
  .sheet-card { overflow-y: auto; }
  .sheet-card > * { flex: none; }
  .sheet-body { overflow: visible; }
}

/* ---------- Wider screens ---------- */
@media (min-width: 600px) {
  :root { --edge-h: 112px; --edge-scale: 1; }
  .wrap, .scene-body { padding-inline: 24px; }
  .btn-pair { gap: 10px; }
  .btn-pair .btn { padding: 0 20px; gap: 8px; font-size: 17px; }
  .cook-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cook-tile { flex-direction: column; align-items: flex-start; min-height: 138px; padding: 12px 14px 14px; }
  .tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .cook-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .topping-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rounds { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .notes { margin-inline: 0; padding-inline: 0; }
  .join-form .zip { flex: 0 0 130px; }
  .join-form .btn { flex: 0 0 auto; min-height: 54px; }
  .b-page .page-main { gap: 16px; padding-block: 12px 20px; }
  .page-head.center { padding-block: 18px 4px; }
  .page-head.center img { width: 200px; }
  .b-page .page-head { padding-block: 16px 4px; }
  .b-page .page-head img { width: 200px; }
  .b-intro { font-size: 20px; }
  .b-about { font-size: 17px; }
  .share-card { width: min(100%, 560px); gap: 10px; padding: 20px 28px 24px; }
  .share-card h1 { font-size: 40px; }
  .share-card .sum { font-size: 19px; }
  .share-art { height: clamp(140px, 100vh - var(--rest, 480px), 300px); height: clamp(140px, 100svh - var(--rest, 480px), 300px); }
  .pitch { width: min(100%, 560px); }
  .me-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mini-builds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .me-grid .card:not(.wide) .mini-builds { grid-template-columns: minmax(0, 1fr); } /* in half the width, one under another */
  .mates { width: min(100%, 560px); }
  .me-grid .wide { grid-column: 1 / -1; }

  /* Sheets become a centered card over a dimmed page. */
  .sheet { align-items: center; justify-content: center; padding: 24px; background: rgba(46, 23, 11, .9); }
  .sheet.build { background: rgba(46, 23, 11, .9); }
  /* A set height, so the card does not jump about as a search shortens the list. */
  .sheet-card { width: min(700px, 100%); height: min(660px, 100%); max-height: min(760px, 100%); overflow: hidden; border: 3px solid var(--ink-deep); border-radius: 28px; background: var(--choc); box-shadow: 8px 10px 0 #1A0C05; }
  .sheet.build .sheet-card { background: var(--cream); }
  .sheet-head { padding: 12px 20px; }
  .sheet-body { padding: 4px 22px 22px; }
  .sheet-foot { padding: 12px 22px 16px; }
}

@media (min-width: 960px) {
  /* One desktop unit: 1% of the window's width or 1.6% of its height, whichever is
     smaller (14.4px in a 1440 x 900 window). Headlines, copy, buttons and drawings are
     sized in it, so what is in a scene grows with the window instead of sitting small in
     the middle of it, and never outgrows the screen. */
  /* A quarter of the unit comes from the reader's own text size (rem), so zooming the page or
     raising the default font size makes desktop text bigger too, not only the window. */
  :root { --d: clamp(.5875rem, min(.225rem + .75vw, .225rem + 1.2vh), 1.125rem); }
  .wrap, .scene-body { max-width: max(1200px, calc(var(--d) * 90)); }
  .scene { min-height: clamp(620px, 100vh, 1040px); }
  .scene-body { gap: calc(var(--d) * 1.6); padding-bottom: 48px; }
  h2 { font-size: calc(var(--d) * 4.8); }
  h3 { font-size: max(22px, calc(var(--d) * 1.8)); }
  .sub { font-size: max(19px, calc(var(--d) * 1.6)); }
  .scene .btn-lg { min-height: max(58px, calc(var(--d) * 4.4)); padding-inline: max(28px, calc(var(--d) * 2.2)); border-radius: 20px; font-size: max(19px, calc(var(--d) * 1.45)); }
  .scene .btn-pair .btn, .scene .card .btn { min-height: max(52px, calc(var(--d) * 3.8)); font-size: max(17px, calc(var(--d) * 1.25)); }
  .scene .text-link { font-size: max(16px, calc(var(--d) * 1.2)); }
  /* The pages an email link opens: the same desktop sizes as the scenes, so one message
     and one button do not sit small in a big window. */
  .link-page { gap: calc(var(--d) * 1.5); }
  .link-page h1 { font-size: calc(var(--d) * 4.4); }
  .link-page .btn { min-height: max(58px, calc(var(--d) * 4.4)); padding-inline: max(28px, calc(var(--d) * 2.2)); border-radius: 20px; font-size: max(19px, calc(var(--d) * 1.45)); }
  .link-page .btn-pair { width: auto; gap: 12px; }
  .link-page .fine { font-size: max(15px, calc(var(--d) * 1.15)); }

  /* Head on the left, the thing you do on the right. */
  .scene-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; align-content: center; gap: calc(var(--d) * 2) calc(var(--d) * 4.5); }
  .scene-split .scene-head { gap: calc(var(--d) * 1.2); }
  .scene-head hgroup { gap: calc(var(--d) * .6); }
  .scene-label { font-size: max(13px, calc(var(--d) * 1.1)); }
  .scene-split .scene-side { gap: calc(var(--d) * 1.3); }

  /* Nav pinned to the top; everything else centered in the space that is left. */
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr); grid-template-rows: auto minmax(0, 1fr) auto minmax(0, 1fr); grid-template-areas: "brand nav" ". stage" "copy stage" ". stage"; column-gap: calc(var(--d) * 4); row-gap: calc(var(--d) * 1.4); padding-top: 22px; padding-bottom: 40px; }
  .hero-top { display: contents; }
  .top-nav { grid-area: nav; gap: 8px calc(var(--d) * 1.9); }
  .nav-link { display: inline-flex; align-items: center; min-height: 44px; font-size: max(15px, calc(var(--d) * 1.1)); }
  .nav-cta { min-height: max(38px, calc(var(--d) * 2.7)); padding-inline: max(16px, calc(var(--d) * 1.15)); font-size: max(15px, calc(var(--d) * 1.05)); }
  .brand { grid-area: brand; width: max(190px, calc(var(--d) * 16)); align-self: center; justify-self: start; }
  .hero-copy { grid-area: copy; display: flex; flex-direction: column; align-items: flex-start; gap: calc(var(--d) * 1.25); align-self: start; }
  .hero-head { gap: calc(var(--d) * .7); margin-top: 0; }
  .hero h1 { font-size: calc(var(--d) * 5.1); }
  .no-crab, .hero-place { font-size: max(15px, calc(var(--d) * 1.2)); }
  .lede { font-size: max(19px, calc(var(--d) * 1.6)); }
  .hero-go { flex-direction: row; gap: calc(var(--d) * 1.4); }
  .hero-cta { width: auto; }
  .stage-sticker { top: calc(var(--d) * -1); right: calc(var(--d) * -1); padding: calc(var(--d) * .55) calc(var(--d) * 1.2) calc(var(--d) * .45); border: 3px solid var(--choc); box-shadow: 0 4px 0 var(--choc); font-size: max(17px, calc(var(--d) * 1.5)); transform: rotate(5deg); }
  .stage { align-self: center; height: calc(var(--d) * 41); margin-bottom: 30px; }
  .stage-clip { border-radius: 36px; }
  .stage-art { inset: 0 0 18px; }
  .stage-label { bottom: -30px; min-height: max(64px, calc(var(--d) * 4.9)); padding: 8px 10px 8px calc(var(--d) * 1.9); gap: calc(var(--d) * 1); }
  .stage-label .could { font-size: max(11px, calc(var(--d) * .85)); }
  .stage-label .name { font-size: max(26px, calc(var(--d) * 2.05)); }
  .stage-label .name.long { font-size: max(21px, calc(var(--d) * 1.65)); }
  .stage-label .go { width: max(46px, calc(var(--d) * 3.5)); height: max(46px, calc(var(--d) * 3.5)); }

  .mo { padding: calc(var(--d) * .8) calc(var(--d) * 1.1); font-size: max(15px, calc(var(--d) * 1.15)); }

  /* Build */
  .build .scene-side > .btn, .build .scene-side > .btn-pair { align-self: center; width: min(100%, calc(var(--d) * 34)); }
  .teaser { width: min(100%, calc(var(--d) * 34)); gap: calc(var(--d) * .6); padding: calc(var(--d) * 1.2) calc(var(--d) * 1.7) calc(var(--d) * 1.6); border-radius: 30px; }
  .teaser-art { height: calc(var(--d) * 22); }
  .teaser p { font-size: max(18px, calc(var(--d) * 1.4)); }

  /* Journey */
  .path { flex-direction: row; gap: calc(var(--d) * 1.2); }
  .path li { flex: 1; display: flex; flex-direction: column; gap: calc(var(--d) * .6); padding: calc(var(--d) * 1.5); border-radius: 24px; background: var(--card); box-shadow: 4px 5px 0 var(--ink-deep); }
  .path li::before { display: none; }
  .path .n { width: calc(var(--d) * 3.1); height: calc(var(--d) * 3.1); font-size: max(17px, calc(var(--d) * 1.4)); }
  .path .top { justify-content: space-between; }
  .path h3 { font-size: max(21px, calc(var(--d) * 1.8)); }
  .path p { font-size: max(16px, calc(var(--d) * 1.3)); line-height: 1.35; }
  .journey .status { padding: calc(var(--d) * .2) calc(var(--d) * .75); font-size: max(13px, calc(var(--d) * 1)); }
  .journey .status.quiet { padding: calc(var(--d) * .1) calc(var(--d) * .7); }
  .block { gap: calc(var(--d) * .7); }
  .rounds { gap: calc(var(--d) * .9); }
  .round { gap: calc(var(--d) * .3); padding: calc(var(--d) * 1.05) calc(var(--d) * 1.25); border-radius: 18px; }
  .round .top { font-size: max(13px, calc(var(--d) * 1)); }
  .round strong { font-size: max(19px, calc(var(--d) * 1.55)); }
  .block-head .what { font-size: max(15px, calc(var(--d) * 1.15)); }
  .round .what { font-size: max(13px, calc(var(--d) * 1)); }
  .notes { gap: calc(var(--d) * 1); }
  .note { flex: 1 1 max(320px, calc(var(--d) * 24)); max-width: calc(var(--d) * 40); } /* a few notes share the row; many scroll sideways */
  .note h4 { font-size: max(18px, calc(var(--d) * 1.45)); }
  .note p { font-size: max(15px, calc(var(--d) * 1.1)); }
  /* With kitchen notes the scene has a fourth row, so it tightens up: each step card puts
     its number beside its title instead of above it. */
  .journey:has(.notes) .scene-body { gap: calc(var(--d) * 1.15); }
  .journey:has(.notes) .path li { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: calc(var(--d) * .5) calc(var(--d) * .7); padding: calc(var(--d) * 1.15); }
  .journey:has(.notes) .path .n { grid-row: auto; width: calc(var(--d) * 2.6); height: calc(var(--d) * 2.6); }
  .journey:has(.notes) .path p { grid-column: 1 / -1; }

  /* Join and footer. The last band holds one line and a short form, so on a big screen it
     is shorter than the scenes above it instead of leaving them adrift in gold. */
  .join { min-height: clamp(520px, 76vh, 800px); }
  .join-form { gap: calc(var(--d) * .8); }
  .join .field label { font-size: max(16px, calc(var(--d) * 1.25)); }
  .join .input { height: max(54px, calc(var(--d) * 4.6)); border-radius: 18px; font-size: max(18px, calc(var(--d) * 1.45)); }
  .join-form .zip { flex: 0 0 max(130px, calc(var(--d) * 10)); }
  .join-form .btn { min-height: max(54px, calc(var(--d) * 4.6)); padding-inline: max(22px, calc(var(--d) * 1.9)); border-radius: 18px; font-size: max(17px, calc(var(--d) * 1.45)); }
  .join .fine, .join .hint { font-size: max(15px, calc(var(--d) * 1.1)); }
  .join .card { gap: calc(var(--d) * .9); padding: calc(var(--d) * 1.6); font-size: max(18px, calc(var(--d) * 1.3)); }
  .footer-row { padding-block: 6px 26px; }
  .footer-mark { width: max(132px, calc(var(--d) * 11)); }
  .footer-links { gap: 0 max(16px, calc(var(--d) * 1.4)); font-size: max(15px, calc(var(--d) * 1.1)); }
  .footer-small { font-size: max(14px, calc(var(--d) * 1.05)); }

  /* The builder and its lists grow with the window too. */
  .sheet-card { width: min(max(700px, calc(var(--d) * 56)), 100%); height: min(max(660px, calc(var(--d) * 47)), 100%); max-height: min(max(760px, calc(var(--d) * 55)), 100%); }
  .sheet-head h2 { font-size: max(22px, calc(var(--d) * 1.8)); }
  .sheet .search { height: max(56px, calc(var(--d) * 4)); }
  .sheet .search input { font-size: max(17px, calc(var(--d) * 1.25)); }
  .sheet-foot .btn { min-height: max(54px, calc(var(--d) * 4)); font-size: max(17px, calc(var(--d) * 1.25)); }
  .list-title { font-size: max(15px, calc(var(--d) * 1.15)); }
  .step > p { font-size: max(16px, calc(var(--d) * 1.2)); }
  .opt { min-height: max(48px, calc(var(--d) * 3.6)); font-size: max(16px, calc(var(--d) * 1.2)); }
  .opts.two .opt { min-height: max(44px, calc(var(--d) * 3.4)); font-size: max(15px, calc(var(--d) * 1.15)); }

  /* The builder: the parts on the left, your rangoon on the right. */
  .sheet.build .sheet-card { display: grid; grid-template-columns: minmax(0, 1fr) max(360px, calc(var(--d) * 28)); grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: "head preview" "body preview" "foot preview"; width: min(max(980px, calc(var(--d) * 78)), 100%); height: min(max(660px, calc(var(--d) * 50)), 100%); max-height: none; }
  .sheet.build .sheet-head { grid-area: head; }
  .sheet.build .sheet-body { grid-area: body; padding-top: 12px; }
  .sheet.build .sheet-foot { grid-area: foot; }
  .b-preview { grid-area: preview; flex-direction: column; justify-content: center; gap: 8px; height: auto; margin: 14px 14px 14px 0; padding: 20px; border-radius: 22px; box-shadow: none; text-align: center; }
  .b-plate { flex: none; height: max(250px, calc(var(--d) * 21)); }
  .b-summary { flex: none; font-size: max(18px, calc(var(--d) * 1.35)); text-wrap: balance; }
  .tile { min-height: max(128px, calc(var(--d) * 11)); font-size: max(16px, calc(var(--d) * 1.2)); }
  .tile .art { width: max(76px, calc(var(--d) * 7)); height: max(76px, calc(var(--d) * 7)); }
  .cook-tile { min-height: max(138px, calc(var(--d) * 10.5)); }
  .cook-tile .art { width: max(54px, calc(var(--d) * 4.6)); height: max(54px, calc(var(--d) * 4.6)); }
  .cook-tile strong { font-size: max(18px, calc(var(--d) * 1.35)); }
  .cook-tile span span { font-size: max(15px, calc(var(--d) * 1.1)); }
  .reels { gap: max(8px, calc(var(--d) * .7)); }
  .reel-pick, .reel-keep { min-height: max(56px, calc(var(--d) * 4.2)); }
  .reel-pick { grid-template-columns: max(74px, calc(var(--d) * 6)) minmax(0, 1fr) auto; padding-inline: 16px 12px; }
  .reel-keep { flex-basis: max(96px, calc(var(--d) * 7.4)); font-size: max(16px, calc(var(--d) * 1.2)); }
  .reel-hint { font-size: max(15px, calc(var(--d) * 1.1)); }
  .spin-btn { font-size: max(22px, calc(var(--d) * 1.8)); }
  .result-top .b-summary { align-items: center; }
  .box-title { font-size: max(26px, calc(var(--d) * 2.2)); }
  .b-preview.boxed-top { gap: max(14px, calc(var(--d) * 1.1)); padding: 20px; }
  .tray { max-width: none; gap: 10px; padding: 10px; }
  .slot { aspect-ratio: 1 / 1; }
  .slot .art { width: 86%; height: 86%; }
  .cheer-line { font-size: max(16px, calc(var(--d) * 1.2)); }
  /* A list (pick a shape, a filling...) is a plain card: it has no drawing beside it. */
  .sheet.build.pick .sheet-card { display: flex; width: min(max(700px, calc(var(--d) * 56)), 100%); }
}

/* A short desktop window (a small laptop with the browser's bars showing): less sauce, less
   padding, so a scene's content still has room. */
@media (min-width: 960px) and (max-height: 700px) {
  :root { --edge-h: 84px; }
  .scene-body { padding-bottom: 28px; }
  .hero-grid { padding-top: 14px; padding-bottom: 26px; }
}

/* A short, wide screen: a phone held sideways, or a laptop zoomed to 200%. The centered
   card left the parts about 43px between its header, picture and footer, so here the
   builder fills the screen and is laid out as on a desktop: the parts on the left, under
   the header and over the footer (Spin and Box it always on screen), and the picture (or
   the box, or the box's name) in a column on the right. The lists fill the screen too. */
@media (min-width: 600px) and (max-width: 959px) and (max-height: 500px) {
  .sheet { padding: 0; }
  .sheet-card { width: 100%; height: 100%; max-height: none; border: 0; border-radius: 0; box-shadow: none; }
  .sheet.build:not(.pick) .sheet-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 36%); grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: "head preview" "body preview" "foot preview"; }
  .sheet-head { min-height: 52px; padding-block: 4px; }
  .sheet.build .sheet-head { grid-area: head; }
  .sheet.build .sheet-body { grid-area: body; padding-block: 8px 12px; }
  .sheet.build .sheet-foot { grid-area: foot; padding-block: 8px calc(8px + env(safe-area-inset-bottom)); }
  .sheet-foot .btn { min-height: 50px; }
  /* The rows as on a short phone, so all four parts fit unscrolled even 360px tall. */
  .reels { gap: 6px; }
  .reel-pick, .reel-keep { min-height: 46px; }
  .reel-hint.quiet { display: none; }
  /* What is in the right-hand column sits in its middle, and scrolls if it ever outgrows
     it: auto margins center it as justify-content would, but never push its top out of reach. */
  .sheet.build .b-preview { grid-area: preview; flex-direction: column; justify-content: flex-start; gap: 8px; min-height: 0; margin: 8px 8px 8px 0; padding: 10px; overflow-y: auto; box-shadow: none; text-align: center; }
  .sheet.build .b-preview > :first-child { margin-top: auto; }
  .sheet.build .b-preview > :last-child { margin-bottom: auto; }
  .sheet.build .b-plate { flex: 1 1 auto; align-self: stretch; min-height: 96px; }
  .sheet.build .b-summary { flex: none; text-wrap: balance; }
  .result-top .b-summary { align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  /* The drips hang still at full length, whatever state the script left them in. */
  .edge .drip .neck, .edge .drip .bead, .edge .drip .drop { transform: none !important; }
}
