/* The storybook homepage — one continuous scroll styled as a single unrolling
   parchment letter. Ported from "Tap-A-Post Storybook Site v2.dc.html"; the
   prototype's inline styles are the pixel source of truth and are transcribed
   here as classes. Values are not rounded or "tidied".

   Scroll-driven pieces (flap, letter rise, name wipe, story fan, treasure
   trail) are set from static/js/storybook.js. Every one has a static end-state
   below so the page is complete with JS off or reduced motion on. */

.sb { font-family: var(--font-body); color: var(--ink); overflow-x: clip; position: relative; }

/* ---- Backdrop: fixed scene layers, cross-blended by scroll --------------- */
.sb-backdrop { position: fixed; inset: 0; z-index: 0; background: #2E3A33; }
.sb-layer { position: absolute; inset: 0; opacity: 0; }
.sb-vignette { position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 42%, rgba(0,0,0,0) 46%, rgba(0,0,0,.36) 100%); }

.sb-cloud { position: absolute; border-radius: 60px; background: rgba(255,253,246,.5); filter: blur(14px); }
.sb-cloud:nth-child(1) { left: 6%;  top: 12%; width: 280px; height: 74px; animation: tapDrift 26s ease-in-out infinite alternate; }
.sb-cloud:nth-child(2) { right: 10%; top: 30%; width: 360px; height: 90px; background: rgba(255,253,246,.38); filter: blur(18px); animation: tapDrift 34s ease-in-out infinite alternate-reverse; }
.sb-cloud:nth-child(3) { left: 30%; top: 62%; width: 240px; height: 64px; background: rgba(255,253,246,.3); filter: blur(16px); animation: tapDrift 30s ease-in-out infinite alternate; }

.sb-flake { position: absolute; top: -6vh; border-radius: 50%; background: rgba(255,255,255,.9);
  animation: tapSnow2 11s linear infinite; }

.sb-starfield { position: absolute; left: 8%; top: 10%; width: 2px; height: 2px; border-radius: 50%;
  background: var(--gold-pale);
  box-shadow: 12vw 4vh 0 #EAD98F, 26vw -2vh 0 rgba(234,217,143,.7), 40vw 7vh 0 #EAD98F,
    55vw 1vh 0 rgba(234,217,143,.6), 70vw 9vh 0 #EAD98F, 82vw 3vh 0 rgba(234,217,143,.75),
    18vw 18vh 0 rgba(234,217,143,.5), 48vw 22vh 0 rgba(234,217,143,.8), 66vw 28vh 0 rgba(234,217,143,.45),
    5vw 30vh 0 rgba(234,217,143,.6), 34vw 34vh 0 rgba(234,217,143,.4), 76vw 40vh 0 rgba(234,217,143,.55); }
.sb-twinkle { position: absolute; width: 3px; height: 3px; border-radius: 50%;
  background: var(--parchment-paper); animation: tapTwinkle 3.2s ease-in-out infinite; }
.sb-moon { position: absolute; right: 12%; top: 9%; width: 84px; height: 84px; }
.sb-moon i { position: absolute; inset: 0; border-radius: 50%; background: var(--gold-pale);
  box-shadow: 0 0 46px 8px rgba(234,217,143,.32); }
.sb-moon b { position: absolute; left: -16%; top: -12%; width: 88%; height: 88%;
  border-radius: 50%; background: var(--midnight); }

.sb-lamp-a { position: absolute; left: -8%; bottom: -12%; width: 56vw; height: 56vh;
  background: radial-gradient(ellipse at 30% 80%, rgba(232,164,74,.5), rgba(232,164,74,0) 65%);
  animation: tapLamp 3.4s ease-in-out infinite; }
.sb-lamp-b { position: absolute; right: -6%; top: -10%; width: 40vw; height: 40vh;
  background: radial-gradient(ellipse at 80% 20%, rgba(232,164,74,.22), rgba(232,164,74,0) 60%); }

.sb-envelope-float { position: absolute; top: 0; background: rgba(255,253,246,.14);
  border: 1.5px solid rgba(255,253,246,.3); border-radius: 3px; animation: tapRise 26s linear infinite; }

.sb-dust { position: absolute; width: 4px; height: 4px; border-radius: 50%;
  background: var(--gold-pale); animation: tapTwinkle 2.8s ease-in-out infinite; }

/* ---- Chrome -------------------------------------------------------------- */
.sb-washi { position: fixed; left: 0; right: 0; height: 9px; z-index: 590;
  background: repeating-linear-gradient(-45deg, #B33A2C 0 16px, #F7F1E3 16px 32px, #23305B 32px 48px, #F7F1E3 48px 64px); }
.sb-washi--top { top: 0; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.sb-washi--bottom { bottom: 0; box-shadow: 0 -1px 4px rgba(0,0,0,.3); }

.sb-head { position: fixed; top: 9px; left: 0; right: 0; z-index: 600; display: flex;
  align-items: center; justify-content: space-between; padding: 12px clamp(14px, 3vw, 32px);
  pointer-events: none; }
.sb-head > * { pointer-events: auto; }
.sb-wordmark { text-decoration: none; background: rgba(247,241,227,.92);
  border: 1px solid rgba(31,36,48,.15); border-radius: 999px; padding: 8px 18px;
  box-shadow: 0 3px 12px rgba(0,0,0,.25); color: var(--ink);
  display: flex; align-items: baseline; gap: 8px; }
.sb-wordmark:hover { color: var(--ink); }
.sb-wordmark b { font-family: var(--font-display); font-weight: 700; font-size: 21px; }
.sb-wordmark span { font-size: 11px; letter-spacing: .18em; color: rgba(42,36,22,.55); }
.sb-send { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 22px;
  border: 1px solid rgba(0,0,0,.2); border-radius: 999px; background: var(--postbox);
  color: var(--parchment-paper); font-family: var(--font-body); font-weight: 700; font-size: 16px;
  text-decoration: none; box-shadow: 0 3px 12px rgba(0,0,0,.3); }
.sb-send:hover { background: var(--postbox-hover); color: var(--parchment-paper); }
.sb-send:active { transform: translateY(1px); }

/* ---- Stamp rail ---------------------------------------------------------- */
.sb-stamps { position: fixed; top: 50%; right: clamp(4px, 1.4vw, 20px);
  transform: translateY(-50%); z-index: 600; display: flex; flex-direction: column; gap: 9px; }
.sb-stamp { position: relative; width: 44px; height: 53px; padding: 0; border: none;
  background: transparent; cursor: pointer; transition: transform 200ms ease; min-height: 0; }
.sb-stamp:hover { transform: rotate(0deg) scale(1.12) !important; }
/* The rail is scaled to 0.76 below 680px, which drops the stamps to ~41px —
   under the 44px the design handover requires. Extend the hit area without
   changing the drawn size; 8px of growth still clears the 9px rail gap. */
.sb-stamp::after { content: ""; position: absolute; inset: -4px -8px; }
.sb-stamp > svg { position: absolute; inset: 0; width: 100%; height: 100%;
  filter: drop-shadow(1px 2px 2px rgba(0,0,0,.35)); }
.sb-stamp__plate { position: absolute; inset: 5px 6px; border: 1px solid rgba(42,36,22,.3);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 19px; color: rgba(42,36,22,.75); line-height: 1; }
.sb-stamp__num { position: absolute; right: 8px; bottom: 6px;
  font-family: var(--font-display); font-size: 8px; color: rgba(42,36,22,.75); }
.sb-stamp__cancel { position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; opacity: 0; transition: opacity 300ms ease; }
.sb-stamp[aria-current="true"] .sb-stamp__cancel { opacity: 1; }
.sb-stamp[aria-current="true"] .sb-stamp__plate { border-color: rgba(142,43,32,.5); color: var(--liner); }
.sb-stamp[aria-current="true"] .sb-stamp__num { color: var(--liner); }

/* ---- Hero ---------------------------------------------------------------- */
.sb-main { position: relative; z-index: 10; }
.sb-hero { height: 185vh; position: relative; z-index: 1; }
.sb-hero__inner { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: clamp(10px, 2.6vh, 30px);
  padding: 40px 24px 24px; overflow: hidden; }
.sb-hero__head { text-align: center; color: var(--parchment-paper); }
.sb-kicker { font-size: 12px; font-weight: 600; letter-spacing: .34em; color: rgba(247,241,227,.6); }
.sb-hero__head h1 { font-family: var(--font-display); font-weight: 700;
  font-size: clamp(34px, min(7vw, 9.5vh), 84px); line-height: 1.02;
  margin: clamp(6px, 1.6vh, 14px) 0 0; text-shadow: 0 3px 18px rgba(0,0,0,.4); }
.sb-hero__head p { font-size: clamp(16.5px, 1.9vw, 20px); line-height: 1.55; max-width: 36em;
  margin: clamp(6px, 1.6vh, 14px) auto 0; color: rgba(247,241,227,.85); }

.sb-scene { position: relative; will-change: transform, opacity; }
.sb-env { position: relative; width: min(560px, 86vw, calc((100vh - 330px) * 1.9));
  min-width: 250px; aspect-ratio: 10 / 6.6; perspective: 1200px; }
.sb-env__body { position: absolute; inset: 0; border-radius: 8px;
  background: linear-gradient(168deg, #F3E8CA, #E9DAB2 55%, #E0CFA2);
  box-shadow: 0 44px 90px -22px rgba(0,0,0,.6), 0 10px 26px -8px rgba(0,0,0,.4),
    inset 0 0 0 1px rgba(94,74,14,.14); }
.sb-env__liner { position: absolute; inset: 0; border-radius: 8px;
  background: repeating-linear-gradient(45deg, #8E2B20 0 3px, #7A241A 3px 6px);
  clip-path: polygon(0 0, 100% 0, 50% 47%); }
.sb-env__letter { position: absolute; left: 8%; top: 3%; width: 84%; height: 94%;
  background: linear-gradient(180deg, #FBF5E4, #F6ECD4); border-radius: 3px;
  box-shadow: 0 -8px 24px -10px rgba(0,0,0,.35), inset 0 0 0 1px rgba(94,74,14,.1);
  transform: translateY(0); will-change: transform; padding: 18px 22px; overflow: hidden; }
.sb-env__letter .script { font-size: 30px; color: var(--ink); }
.sb-rule { height: 3px; background: rgba(42,36,22,.22); border-radius: 2px; }
.sb-env__front { position: absolute; inset: 0; border-radius: 8px;
  background: linear-gradient(168deg, #F1E5C4, #E7D7AE 50%, #DECBA0);
  clip-path: polygon(0 0, 50% 46%, 100% 0, 100% 100%, 0 100%);
  box-shadow: inset 0 0 0 1px rgba(94,74,14,.12); }
.sb-env__front i { position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(94,74,14,.1), rgba(94,74,14,0) 32%),
    linear-gradient(-105deg, rgba(94,74,14,.1), rgba(94,74,14,0) 32%),
    linear-gradient(0deg, rgba(94,74,14,.08), rgba(94,74,14,0) 34%);
  clip-path: polygon(0 0, 50% 46%, 100% 0, 100% 100%, 0 100%); }
.sb-env__crease { position: absolute; top: 1%; width: 47%; height: 1.5px; background: rgba(94,74,14,.22); }
.sb-env__crease--l { left: 2%; transform: rotate(42.5deg); transform-origin: left top; }
.sb-env__crease--r { right: 2%; transform: rotate(-42.5deg); transform-origin: right top; }

.sb-env__flap { position: absolute; left: 0; top: 0; width: 100%; height: 56%;
  transform-origin: 50% 0; will-change: transform; z-index: 6; }
.sb-env__flapskin { position: absolute; inset: 0;
  background: linear-gradient(180deg, #F5EACB, #E6D6AC 78%, #DCC898);
  clip-path: polygon(0 0, 100% 0, 50% 96%); box-shadow: inset 0 -2px 0 rgba(94,74,14,.18); }

.sb-seal { position: absolute; left: 50%; top: 96%; transform: translate(-50%, -50%);
  width: 88px; height: 86px; border: none; padding: 0; cursor: pointer;
  background: radial-gradient(circle at 34% 28%, #E7CF74, #C9A227 52%, #8F6E14 96%);
  border-radius: 46% 54% 50% 50% / 48% 46% 54% 52%;
  box-shadow: inset 0 3px 8px rgba(255,252,235,.5), inset 0 -5px 10px rgba(90,66,10,.45),
    0 6px 16px -4px rgba(0,0,0,.5);
  transition: opacity 160ms linear; }
.sb-seal:hover { filter: brightness(1.06); }
.sb-seal:active { transform: translate(-50%, -50%) scale(.96); }
.sb-seal:focus-visible { outline: 3px solid var(--parchment-paper); outline-offset: 3px; }
.sb-seal__ring { position: absolute; inset: 11px; border: 1.5px solid rgba(94,74,14,.5); border-radius: 50%; }
.sb-seal__icon { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px;
  transform: translate(-46%, -50%); }
.sb-seal__drip { position: absolute; background: radial-gradient(circle at 40% 35%, #D8B94C, #A9871C); }
.sb-seal__drip--a { left: -14px; top: 38%; width: 18px; height: 14px;
  border-radius: 60% 40% 55% 45% / 55% 60% 40% 45%; }
.sb-seal__drip--b { right: -10px; bottom: 26%; width: 13px; height: 11px; border-radius: 50%; }

.sb-note { position: absolute; color: var(--gold-pale); opacity: 0; text-shadow: 0 2px 8px rgba(0,0,0,.4); }
.sb-tapline { text-align: center; margin-top: clamp(8px, 2vh, 20px);
  font-family: var(--font-script); font-size: clamp(19px, min(2.6vw, 4vh), 28px);
  color: rgba(247,241,227,.9); text-shadow: 0 2px 10px rgba(0,0,0,.5); }

.sb-cue { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  text-align: center; color: rgba(247,241,227,.75); transition: opacity 400ms ease; }
.sb-cue__label { font-size: 11.5px; font-weight: 600; letter-spacing: .28em; }
.sb-cue__arrow { font-size: 18px; animation: tapCue 1.7s ease-in-out infinite; }

/* ---- The parchment scroll ------------------------------------------------ */
/* Above the hero: the scroll must occlude the envelope rather than blend with
   it, so the handover is never a translucent sandwich. */
.sb-roll { max-width: min(880px, 94vw); margin: -16vh auto 0; position: relative; z-index: 20; }
.sb-roller { position: relative; z-index: 12; height: 36px;
  background: linear-gradient(180deg, #DCC898, #B49A66 30%, #8A6F3E 52%, #B49A66 74%, #D9C79E);
  border-radius: 18px; }
.sb-roller--top { margin: 0 -16px -16px; box-shadow: 0 10px 22px -8px rgba(0,0,0,.55); }
.sb-roller--bottom { margin: -16px -16px 0;
  background: linear-gradient(180deg, #D9C79E, #B49A66 30%, #8A6F3E 52%, #B49A66 74%, #DCC898);
  box-shadow: 0 14px 26px -8px rgba(0,0,0,.6); }
.sb-roller i { position: absolute; top: 3px; width: 14px; height: 30px; border-radius: 50%; }
.sb-roller i:first-of-type { left: -6px; background: radial-gradient(ellipse at 60% 50%, #6E5730, #4C3B1E); }
.sb-roller i:last-of-type { right: -6px; background: radial-gradient(ellipse at 40% 50%, #6E5730, #4C3B1E); }

.sb-paper { position: relative;
  background: linear-gradient(180deg, #F7EED8, #F1E4C4 30%, #F5EBD1 70%, #EFE2BE);
  box-shadow: 0 34px 90px -20px rgba(0,0,0,.55), inset 0 0 80px rgba(120,90,40,.14),
    inset 0 0 0 1px rgba(94,74,14,.08);
  padding: clamp(30px, 6vw, 76px) clamp(22px, 6vw, 80px); }
.sb-dateline { text-align: right; font-style: italic; font-size: 15.5px; color: rgba(42,36,22,.6); }
.sb-salute { font-family: var(--font-script); font-size: clamp(40px, 6vw, 58px); margin-top: 18px; }
.sb-body { font-size: clamp(17.5px, 2vw, 19.5px); line-height: 1.68; margin: 16px 0 0;
  max-width: 62ch; text-wrap: pretty; }

.sb-chapter { margin-top: clamp(30px, 5vh, 54px); }
.sb-chapter:first-of-type { margin-top: clamp(48px, 9vh, 90px); }
.sb-chapter h2 { font-family: var(--font-display); font-weight: 700;
  font-size: clamp(31px, 4.4vw, 46px); line-height: 1.08; margin: -30px 0 0; max-width: 12em; }
.sb-dropcap { float: left; font-family: var(--font-display); font-weight: 700; font-size: 58px;
  line-height: .82; padding: 6px 10px 0 0; color: var(--postbox); }

.sb-pmwrap { display: flex; }
.sb-pmwrap--right { justify-content: flex-end; }
.sb-pmwrap--left { justify-content: flex-start; }
.sb-pm { display: flex; align-items: center; gap: 10px; mix-blend-mode: multiply; }
.sb-pm__disc { width: 104px; height: 104px; border: 2.5px solid rgba(35,48,91,.6); border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: rgba(35,48,91,.75); text-align: center; }
.sb-pm__disc b { font-size: 9px; letter-spacing: .2em; font-weight: 700; }
.sb-pm__disc strong { font-size: 10.5px; letter-spacing: .12em; font-weight: 700; }
.sb-pm__disc span { font-size: 9px; letter-spacing: .16em; }
.sb-pm--red .sb-pm__disc { border-color: rgba(142,43,32,.55); color: rgba(142,43,32,.7); }
.sb-pm--green .sb-pm__disc { border-color: rgba(30,91,58,.55); color: rgba(30,91,58,.75); }

.sb-crease { margin: clamp(44px, 8vh, 80px) calc(clamp(22px, 6vw, 80px) * -1) 0; height: 14px;
  background: linear-gradient(180deg, rgba(120,90,40,0) 0%, rgba(120,90,40,.16) 38%,
    rgba(255,253,240,.6) 52%, rgba(120,90,40,.1) 66%, rgba(120,90,40,0) 100%);
  display: flex; align-items: center; justify-content: center; }
.sb-crease span { background: #F3E7C8; padding: 0 14px; color: var(--gold); font-size: 14px; }

.sb-row { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(22px, 4vw, 44px); margin-top: 30px; }

/* Demo cards */
.sb-card { position: relative; background: var(--parchment-input);
  border: 1px solid rgba(94,74,14,.2); border-radius: 4px;
  box-shadow: 5px 7px 18px -6px rgba(80,60,20,.4); padding: 20px 20px 22px; }
.sb-card--voice { width: min(300px, 78vw); transform: rotate(-2deg); }
.sb-card--santa { width: min(320px, 78vw); background: var(--parchment-letter);
  border-color: rgba(94,74,14,.22); transform: rotate(1.5deg); padding: 22px; }
.sb-card__seal { position: absolute; top: 12px; right: 12px; width: 46px; height: 45px;
  border: none; padding: 0; cursor: pointer;
  background: radial-gradient(circle at 34% 28%, #E7CF74, #C9A227 52%, #8F6E14 96%);
  border-radius: 46% 54% 50% 50% / 48% 46% 54% 52%;
  box-shadow: inset 0 2px 4px rgba(255,252,235,.5), inset 0 -3px 6px rgba(90,66,10,.45),
    0 3px 8px -2px rgba(0,0,0,.4); min-height: 0; }
.sb-card__seal:hover { filter: brightness(1.06); }
.sb-card__seal--static { width: 40px; height: 39px; cursor: default;
  box-shadow: inset 0 2px 4px rgba(255,252,235,.5), inset 0 -3px 6px rgba(90,66,10,.45); }
.sb-wave { display: flex; gap: 3px; align-items: flex-end; height: 20px; margin-top: 14px; opacity: .25; }
.sb-wave span { width: 5px; background: var(--gold); }
.sb-hint { font-size: 11px; letter-spacing: .16em; color: rgba(42,36,22,.5); margin-top: 8px; font-weight: 600; }
.sb-office { font-size: 10px; letter-spacing: .22em; font-weight: 700; color: var(--postbox); }
.sb-dear { display: flex; align-items: baseline; gap: 8px; margin-top: 12px; }
.sb-dear .script { font-size: 27px; }
.sb-name { font-family: var(--font-script); font-size: 31px; color: var(--forest); display: inline-block; }

/* Chapter CTAs keep the prototype's flat 2px shadow, not the pill button. */
.sb-cta { display: inline-flex; align-items: center; min-height: 48px; padding: 13px 26px;
  border-radius: 12px; font-family: var(--font-body); font-weight: 700; font-size: 17px;
  text-decoration: none; color: var(--parchment-paper); }
.sb-cta--red { background: var(--postbox); box-shadow: 0 2px 0 var(--postbox-shadow); }
.sb-cta--red:hover { background: var(--postbox-hover); color: var(--parchment-paper); }
.sb-cta--green { background: var(--forest); box-shadow: 0 2px 0 var(--forest-shadow); }
.sb-cta--green:hover { background: var(--forest-hover); color: var(--parchment-paper); }
.sb-cta--navy { background: var(--navy); box-shadow: 0 2px 0 var(--navy-shadow); }
.sb-cta--navy:hover { background: #2E3F73; color: var(--parchment-paper); }
.sb-cta:active { transform: translateY(1px); }
.sb-price { font-size: 16px; color: rgba(42,36,22,.7); }
.sb-price strong { color: var(--ink); }

/* Story card fan */
.sb-fan { position: relative; width: min(320px, 80vw); height: 225px; }
.sb-fan > div { position: absolute; bottom: 0; width: 136px; height: 190px;
  background: var(--parchment-input); border: 1px solid rgba(94,74,14,.25); border-radius: 6px;
  transform-origin: 50% 100%; box-shadow: 3px 5px 14px -4px rgba(80,60,20,.45);
  padding: 12px; will-change: transform; }
.sb-fan__a { left: 22%; }
.sb-fan__b { left: 30%; background: #F6EDD6; }
.sb-fan__c { left: 38%; background: var(--navy); border-color: var(--navy-shadow);
  box-shadow: 3px 5px 14px -4px rgba(0,0,0,.5); color: var(--parchment-paper);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 8px; }
.sb-fan__title { font-family: var(--font-display); font-weight: 700; font-size: 14.5px; }
.sb-fan__art { margin-top: 8px; height: 86px; border: 1.5px dashed rgba(42,36,22,.25); border-radius: 4px;
  background: repeating-linear-gradient(45deg, rgba(35,48,91,.07) 0 8px, rgba(35,48,91,.02) 8px 16px);
  display: flex; align-items: center; justify-content: center; }
.sb-fan__art span { font-family: var(--font-mono); font-size: 8px; color: rgba(42,36,22,.5); }
.sb-fan__blob { width: 26px; height: 25px;
  background: radial-gradient(circle at 34% 28%, #E7CF74, #C9A227 55%, #8F6E14);
  border-radius: 46% 54% 50% 50% / 48% 46% 54% 52%; margin-top: 10px; }
.sb-fan__c .sb-fan__blob { width: 30px; height: 29px; margin: 0; }
.sb-fan__c em { font-family: var(--font-display); font-size: 17px; line-height: 1.25; font-style: normal; }
.sb-fan__c b { font-size: 9px; letter-spacing: .18em; color: var(--gold-pale); font-weight: 700; }

/* Treasure trail */
.sb-trail { position: relative; margin-top: 26px; }
.sb-trail svg { width: 100%; height: auto; display: block; }
.sb-trail path { will-change: stroke-dashoffset; }

/* Reply slip */
.sb-slip { margin-top: 26px; max-width: 520px; border: 2px dashed rgba(42,36,22,.35);
  border-radius: 6px; padding: 20px 22px; position: relative; background: rgba(255,253,246,.5); }
.sb-slip__tab { position: absolute; top: -11px; left: 18px; background: #F3E7C8; padding: 0 8px;
  font-size: 11px; letter-spacing: .2em; color: rgba(42,36,22,.55); font-weight: 600; }
.sb-slip form { display: flex; gap: 10px; flex-wrap: wrap; }
.sb-slip input { flex: 1; min-width: 190px; min-height: 48px; padding: 10px 16px;
  border: 1.5px solid rgba(42,36,22,.4); border-radius: 10px; background: var(--parchment-input);
  font-family: var(--font-body); font-size: 16px; color: var(--ink); }
.sb-slip input:focus { border-color: var(--gold); outline: 3px solid rgba(201,162,39,.4); outline-offset: 1px; }
.sb-slip button { min-height: 48px; padding: 12px 22px; border: none; border-radius: 10px;
  background: var(--forest); color: var(--parchment-paper); font-family: var(--font-body);
  font-weight: 700; font-size: 16px; cursor: pointer; box-shadow: 0 2px 0 var(--forest-shadow); }
.sb-slip button:hover { background: var(--forest-hover); }
.sb-slip__error { font-size: 13.5px; color: var(--postbox); margin-top: 8px; min-height: 18px; }
.sb-slip__done { font-size: 17px; color: var(--forest); font-weight: 700; }

/* P.S. */
.sb-steps { display: flex; flex-wrap: wrap; gap: clamp(18px, 3vw, 34px); margin-top: 26px; }
.sb-steps > div { flex: 1; min-width: 200px; }
.sb-step__n { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--postbox); }
.sb-step__t { font-size: 16px; line-height: 1.6; color: rgba(42,36,22,.8); margin-top: 6px; }
.sb-honest { font-size: 14.5px; line-height: 1.65; color: rgba(42,36,22,.6); margin-top: 22px;
  max-width: 60ch; font-style: italic; }
.sb-signoff { margin-top: clamp(36px, 6vh, 60px); }
.sb-signoff div:first-child { font-size: clamp(17.5px, 2vw, 19.5px); }
.sb-signoff .script { font-size: clamp(38px, 5vw, 52px); color: var(--postbox);
  transform: rotate(-2deg); transform-origin: left center; margin-top: 4px; display: inline-block; }
.sb-foot { margin-top: clamp(30px, 5vh, 50px); border-top: 1px solid rgba(42,36,22,.2);
  padding-top: 18px; display: flex; flex-wrap: wrap; gap: 8px 26px; align-items: baseline; font-size: 15px; }
.sb-foot__c { margin-left: auto; color: rgba(42,36,22,.5); font-size: 13px; }

.sb-tail { height: 12vh; }

@media (max-width: 680px) { .sb-stamps { transform: translateY(-50%) scale(.76); } }

/* Static end-states: no JS, or reduced motion. The scroll set-pieces are
   scrubbed by JS, so without it they must already be at their finished state
   rather than stuck at frame zero. */
@media (prefers-reduced-motion: reduce) {
  .sb-env__flap { transform: rotateX(-152deg); z-index: -1; }
  .sb-env__flap .sb-seal { opacity: 0; }
  .sb-env__flapskin { background: repeating-linear-gradient(45deg, #8E2B20 0 3px, #7A241A 3px 6px); }
  .sb-env__letter { transform: translateY(-34%); }
  .sb-trail path { stroke-dashoffset: 0 !important; }
  .sb-name { clip-path: none !important; }
  .sb-fan__a { transform: rotate(-13deg) translateX(-42px); }
  .sb-fan__b { transform: rotate(-1deg) translateY(-9px); }
  .sb-fan__c { transform: rotate(12deg) translateX(42px); }
  .sb-cue { opacity: 0; }
}
.sb-no-js .sb-trail path { stroke-dashoffset: 0; }
.sb-no-js .sb-name { clip-path: none; }

/* "Track one" — a second, quieter action. Someone returning to an order is
   not a new customer and must not be shouted at with the same button. */
.sb-actions { display: flex; align-items: center; gap: 14px; }
.sb-track { color: var(--parchment-paper); font-size: 15px; text-decoration: none;
  border-bottom: 1px solid rgba(247,241,227,.5); padding-bottom: 1px;
  text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.sb-track:hover { color: var(--gold-pale); border-bottom-color: var(--gold-pale); }

.sb-track-slip { margin-top: clamp(36px, 6vh, 60px); padding: 24px 26px;
  border: 2px dashed rgba(42,36,22,.3); border-radius: 6px;
  background: rgba(255,253,246,.5); }
.sb-track-slip h3 { font-family: var(--font-display); font-size: 1.375rem; margin: 0 0 8px; }
.sb-track-slip p { margin: 0; max-width: 54ch; color: var(--ink-muted); }

@media (max-width: 560px) { .sb-track { display: none; } }
