/* Starring: "ink on paper". The book is the product, so the site looks like its pages:
   warm cream paper, deep ink, one cranberry accent, pine green, crayon marks. Mobile first. */

@font-face { font-family: "Fraunces"; src: url("/static/fonts/fraunces-display.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "Fraunces Text"; src: url("/static/fonts/fraunces-text.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/static/fonts/nunito-500.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/static/fonts/nunito-800.woff2") format("woff2"); font-weight: 700 900; font-display: swap; }

:root {
  --paper: #fbf7ef;
  --paper-2: #f4ede0;
  --card: #fffdf8;
  --ink: #1d1b17;
  --ink-2: #4c473e;
  --ink-3: #8a8274;
  --rule: #e6dccb;
  --berry: #b5302a;
  --berry-dark: #8f231e;
  --pine: #1f4a3a;
  --gold: #e9b649;
  --sky: #dfe9e4;
  --display: "Fraunces", Georgia, serif;
  --serif: "Fraunces Text", Georgia, serif;
  --body: "Nunito", ui-rounded, system-ui, sans-serif;
  --r: 18px;
  --shadow: 0 1px 0 rgba(29, 27, 23, .06), 0 10px 30px -12px rgba(60, 45, 20, .28);
  --gutter: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); font: 500 17px/1.6 var(--body);
  background-color: var(--paper);
  /* paper grain */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .28 0 0 0 0 .15 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  overflow-x: hidden;
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;  /* footer sits at the bottom on short pages */
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
::selection { background: var(--gold); }

h1, h2, h3 { font-family: var(--display); font-weight: 650; line-height: 1.04; letter-spacing: -.02em; margin: 0 0 .4em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 11vw, 4.6rem); }
h2 { font-size: clamp(2rem, 7.5vw, 3rem); }
h3 { font-size: 1.35rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.lead { font-family: var(--serif); font-size: clamp(1.12rem, 4.4vw, 1.3rem); line-height: 1.5; color: var(--ink-2); max-width: 36ch; text-wrap: pretty; }
.eyebrow { font: 800 .78rem/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--berry); margin: 0 0 .9rem; }
.small { font-size: .88rem; color: var(--ink-3); }
.note { font-size: .92rem; color: var(--ink-2); background: var(--paper-2); border-radius: 12px; padding: 12px 14px; }
.wrap { width: min(1120px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.narrow { width: min(620px, 100% - 2 * var(--gutter)); margin-inline: auto; }
main { min-height: 60vh; flex: 1 0 auto; }
section { padding: 56px 0; }

/* crayon underline for one accent word */
.scribble { position: relative; white-space: nowrap; color: var(--berry); font-style: normal; }
.scribble svg { position: absolute; left: -2%; bottom: -.12em; width: 104%; height: .32em; overflow: visible; }
.scribble path { fill: none; stroke: var(--gold); stroke-width: 7; stroke-linecap: round; opacity: .9;
  stroke-dasharray: 340; stroke-dashoffset: 340; animation: draw 1s .5s cubic-bezier(.6, 0, .2, 1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 10; background: rgba(251, 247, 239, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.top.scrolled { border-bottom-color: var(--rule); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.logo { display: inline-flex; align-items: center; gap: 6px; font: 650 1.32rem/1 var(--display); letter-spacing: -.025em; text-decoration: none; color: var(--ink); white-space: nowrap; }
.logo em { font-style: normal; color: var(--berry); font-family: var(--serif); font-weight: 400; margin: 0 .04em; }
.logo svg { width: 24px; height: 24px; flex: none; }
.foot .logo em { color: var(--gold); }
@media (max-width: 370px) { .logo { font-size: 1.12rem; } }
.top nav { display: flex; align-items: center; gap: 14px; }
.top nav a:not(.btn) { font-weight: 700; font-size: .95rem; text-decoration: none; color: var(--ink-2); }
@media (max-width: 420px) { .top nav a.hide-sm { display: none; } }

/* ---------- buttons ---------- */
.btn {
  --bg: var(--berry); --fg: #fffaf2;
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 52px; padding: 0 26px; border: 2px solid var(--ink); border-radius: 999px;
  background: var(--bg); color: var(--fg); font: 800 1.02rem/1 var(--body); text-decoration: none; cursor: pointer;
  box-shadow: 3px 4px 0 var(--ink); transition: transform .12s, box-shadow .12s; -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 5px 0 var(--ink); }
.btn:active { transform: translate(2px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn:disabled { opacity: .7; cursor: progress; transform: none; }
.btn.sm { min-height: 40px; padding: 0 16px; font-size: .9rem; box-shadow: 2px 3px 0 var(--ink); }
.btn.ghost { --bg: var(--card); --fg: var(--ink); }
.btn.green { --bg: var(--pine); }
.btn.block { width: 100%; }
.link { background: none; border: 0; padding: 0; font: inherit; font-weight: 800; color: var(--berry); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px 12px; align-items: center; margin: 26px 0 18px; }
.cta-row .alt { font-weight: 800; color: var(--ink-2); text-underline-offset: 4px; }

/* ---------- hero: "colour it yourself" ---------- */
@property --x { syntax: "<percentage>"; inherits: true; initial-value: 0%; }
.hero { padding: 22px 0 44px; }
.hero-grid { display: grid; gap: 6px; grid-template-areas: "title" "art" "copy"; }
.hero-title { grid-area: title; }
.hero-title h1 { margin-bottom: .1em; }
.hero-copy { grid-area: copy; }
.hero-copy .lead { margin-top: 6px; }
.ticks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .9rem; font-weight: 700; color: var(--ink-2); }
.ticks li::before { content: "✓"; color: var(--pine); font-weight: 900; margin-right: 6px; }

.colourer-wrap { grid-area: art; position: relative; margin: 26px 6px 22px; padding: 0 4% 0 10%; }
.colourer {
  position: relative; border-radius: 6px; background: #fff; border: 10px solid #fff;
  box-shadow: 0 1px 0 rgba(29, 27, 23, .06), 0 24px 50px -18px rgba(60, 45, 20, .45);
  transform: rotate(2deg); touch-action: pan-y; animation: page-in .8s .1s cubic-bezier(.2, .8, .2, 1) both;
}
.colourer img { display: block; width: 100%; aspect-ratio: 720 / 934; object-fit: cover; border-radius: 2px; user-select: none; -webkit-user-drag: none; }
.colourer .col { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--x)) 0 0); }
.colourer.auto { animation: page-in .8s .1s cubic-bezier(.2, .8, .2, 1) both, sweep 2.6s 1s cubic-bezier(.55, 0, .3, 1) both; }
@keyframes sweep { from { --x: 0%; } to { --x: 64%; } }
@keyframes page-in { from { opacity: 0; transform: translateY(26px) rotate(5deg); } }
.crayon { position: absolute; top: -26px; left: var(--x); width: 34px; transform: translateX(-50%) rotate(14deg); transform-origin: 50% 0; pointer-events: none; filter: drop-shadow(2px 4px 0 rgba(29, 27, 23, .25)); }
.crayon svg { width: 100%; height: auto; transform: scaleY(-1); }
.colourer { cursor: ew-resize; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
/* keyboard-only control: pointer input is handled on the page itself (iOS only drags a range by its thumb) */
.colourer-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.colourer-range:focus-visible + * , .colourer:focus-within { outline: 3px solid var(--gold); outline-offset: 6px; }

.pinned { position: absolute; left: -2%; top: 7%; width: 38%; z-index: 3; margin: 0; background: #fff; padding: 6px 6px 24px; border-radius: 3px; box-shadow: var(--shadow); transform: rotate(-8deg); animation: pin-in .7s .35s cubic-bezier(.2, .8, .2, 1) both; }
.pinned::before { content: ""; position: absolute; top: -10px; left: 50%; width: 58%; height: 20px; transform: translateX(-50%) rotate(-4deg); background: rgba(233, 182, 73, .75); }
.pinned img { aspect-ratio: 1; object-fit: cover; border-radius: 2px; }
.pinned figcaption { position: absolute; bottom: 4px; left: 0; right: 0; text-align: center; font: 400 .78rem/1 var(--serif); color: var(--ink-2); }
@keyframes pin-in { from { opacity: 0; transform: translate(-24px, -10px) rotate(-18deg); } }
.hint { position: absolute; right: 0; bottom: -30px; display: flex; align-items: center; gap: 6px; font: 400 1rem/1 var(--serif); font-style: italic; color: var(--ink-2); animation: fade 1s 3.4s both; }
.hint svg { width: 42px; color: var(--berry); }
@keyframes fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .scribble path { stroke-dashoffset: 0; } }

/* ---------- countdown ---------- */
.countdown { display: grid; gap: 16px; padding: 20px; border-radius: var(--r); background: var(--pine); color: #f6f1e5; box-shadow: var(--shadow); }
.countdown .eyebrow { color: var(--gold); }
.countdown p { margin: 0; }
.clock { display: flex; gap: 8px; }
.unit { flex: 1; text-align: center; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); border-radius: 12px; padding: 10px 4px 8px; font: 650 2rem/1 var(--display); font-variant-numeric: tabular-nums; }
.unit small { display: block; margin-top: 6px; font: 800 .66rem/1 var(--body); letter-spacing: .12em; text-transform: uppercase; opacity: .75; }

/* ---------- sample rail ---------- */
.rail { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px var(--gutter) 22px; margin: 22px calc(-1 * var(--gutter)) 0; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail figure { flex: 0 0 72%; max-width: 300px; margin: 0; scroll-snap-align: center; }
.rail figure:nth-child(odd) .leaf { transform: rotate(-1.4deg); }
.rail figure:nth-child(even) .leaf { transform: rotate(1.2deg); }
.rail figcaption { margin-top: 12px; font: 400 .95rem/1.35 var(--serif); color: var(--ink-2); text-align: center; }
.swipe { font-size: .85rem; font-weight: 800; color: var(--ink-3); margin: 0; }

/* ---------- steps / inside ---------- */
.steps { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; counter-reset: s; }
.steps li { counter-increment: s; position: relative; background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--r); padding: 20px 20px 18px 72px; }
.steps li::before { content: counter(s); position: absolute; left: 18px; top: 18px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); border: 1.5px solid var(--ink); font: 650 1.2rem/1 var(--display); }
.steps h3 { margin-bottom: .25em; }
.steps p { margin: 0; color: var(--ink-2); }
.inside { list-style: none; padding: 0; margin: 22px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.inside li { background: var(--card); border-radius: 14px; padding: 14px; font-weight: 700; font-size: .95rem; line-height: 1.35; box-shadow: var(--shadow); }
.inside b { display: block; font: 650 1.6rem/1 var(--display); color: var(--berry); margin-bottom: 4px; }

/* ---------- prices ---------- */
.prices { display: grid; gap: 16px; margin-top: 26px; }
.price { position: relative; background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--r); padding: 22px; }
.price.hot { background: #fff6e2; box-shadow: 5px 6px 0 var(--ink); }
.price h3 { margin: 0 0 .2em; }
.amt { font: 650 2.6rem/1 var(--display); letter-spacing: -.03em; margin: 6px 0 12px; }
.amt small { font: 700 .85rem/1 var(--body); letter-spacing: 0; color: var(--ink-3); }
.price ul { list-style: none; padding: 0; margin: 0 0 18px; }
.price li { padding: 4px 0 4px 24px; position: relative; color: var(--ink-2); }
.price li::before { content: "★"; position: absolute; left: 0; color: var(--gold); }
.price .btn { width: 100%; }
.tag { position: absolute; top: -13px; right: 18px; background: var(--berry); color: #fff; font: 800 .72rem/1 var(--body); letter-spacing: .1em; text-transform: uppercase; padding: 7px 10px; border-radius: 999px; border: 1.5px solid var(--ink); transform: rotate(3deg); }
.dev { display: inline-block; margin-bottom: 8px; font-size: .75rem; font-weight: 800; color: var(--berry); background: #fde8e6; padding: 3px 8px; border-radius: 6px; }

/* ---------- faq ---------- */
details { border-bottom: 1.5px dashed var(--rule); }
summary { list-style: none; cursor: pointer; padding: 18px 34px 18px 0; position: relative; font: 650 1.15rem/1.3 var(--display); }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font: 400 1.6rem/1 var(--body); color: var(--berry); transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--ink-2); margin: -4px 0 18px; }

.band { background: var(--berry); color: #fff8ef; padding: 60px 0; text-align: center; position: relative; overflow: hidden; }
.band h2 { color: #fff; }
.band .lead { color: #ffe9df; margin-inline: auto; }
.band .btn { --bg: var(--gold); --fg: var(--ink); }
.band a:not(.btn) { color: #fff; font-weight: 800; text-underline-offset: 4px; }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: #d8d0c0; padding: 40px 0 calc(40px + env(safe-area-inset-bottom)); font-size: .9rem; }
.foot .wrap { display: grid; gap: 16px; }
.foot .logo { color: #fff; font-size: 1.3rem; }
.foot a { color: #fff; }

/* ---------- cards / forms ---------- */
.card { background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--r); padding: 22px; box-shadow: 4px 5px 0 rgba(29, 27, 23, .9); }
.page-head { padding: 26px 0 64px; }
.card .note { margin-top: 18px; }
.page-head h1 { font-size: clamp(2.2rem, 9vw, 3.2rem); }
label.f { display: block; margin: 20px 0 8px; font-weight: 800; font-size: 1rem; }
label.f:first-of-type { margin-top: 4px; }
label.f span { font-weight: 500; color: var(--ink-3); font-size: .9rem; }
input[type=text], input[type=email], textarea {
  width: 100%; font: 500 1.05rem/1.4 var(--body); color: var(--ink); background: #fff; border: 1.5px solid #cfc4b0; border-radius: 12px; padding: 14px; appearance: none;
}
input:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(233, 182, 73, .45); }
textarea { min-height: 96px; resize: vertical; }
.drop { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 26px 16px; border: 2px dashed #bfb39c; border-radius: 16px; background: var(--paper); cursor: pointer; transition: background .15s, border-color .15s; }
.drop:hover, .drop.over { border-color: var(--ink); background: #fff6e2; }
.drop .ico { width: 96px; height: auto; margin-bottom: 4px; transition: transform .25s cubic-bezier(.3,1.6,.5,1); }
.drop:hover .ico, .drop.over .ico { transform: rotate(-4deg) scale(1.06); }
img.dog, .dl img.big { display: block; margin: 0 auto 6px; }
.drop b { font-size: 1.05rem; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.seg { display: flex; gap: 10px; }
.seg label { flex: 1; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; text-align: center; padding: 13px; border: 1.5px solid #cfc4b0; border-radius: 12px; background: #fff; font-weight: 800; cursor: pointer; }
.seg input:checked + span { border-color: var(--ink); background: var(--gold); box-shadow: 2px 3px 0 var(--ink); }
.seg input:focus-visible + span { box-shadow: 0 0 0 4px rgba(233, 182, 73, .45); }
.err { background: #fde8e6; border: 1.5px solid var(--berry); color: var(--berry-dark); border-radius: 12px; padding: 12px 14px; font-weight: 700; margin-bottom: 8px; }

/* ---------- progress ---------- */
.progress { text-align: center; }
/* drawing board: a sheet of paper that fills in as the model draws */
.board { margin: 4px 0 6px; }
.board-paper { position: relative; width: min(300px, 80%, calc(40svh * .77)); margin: 6px auto 0; padding: 10px; background: var(--card);
  border: 1.5px solid var(--ink); border-radius: 6px; box-shadow: var(--shadow); transform: rotate(-1.2deg); }
.board-paper::before { content: ""; position: absolute; top: -12px; left: 50%; width: 92px; height: 24px; transform: translateX(-50%) rotate(2deg); background: rgba(233, 182, 73, .7); z-index: 3; }
.board-stage { position: relative; aspect-ratio: 1184 / 1536; overflow: hidden; border-radius: 2px; background:
  repeating-linear-gradient(0deg, transparent 0 27px, rgba(29, 27, 23, .045) 27px 28px), var(--paper); }
.board-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.1s ease; }
.board-stage img.on { opacity: 1; }
.board-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3); transition: opacity .8s; }
.board.has .board-empty { opacity: 0; }
.board-empty .scrawl { stroke-dasharray: 220; stroke-dashoffset: 220; animation: scrawl 2.4s ease-in-out infinite; }
.board-empty .pencil { animation: wobble 1.2s ease-in-out infinite; transform-origin: 56px 74px; color: var(--ink); }
@keyframes scrawl { 0% { stroke-dashoffset: 220; } 70%, 100% { stroke-dashoffset: 0; } }
@keyframes wobble { 50% { transform: rotate(-7deg) translate(-2px, 2px); } }
.board-cap { font: 650 1.12rem/1.3 var(--display); letter-spacing: -.01em; color: var(--ink); margin: 16px auto 4px; max-width: 30ch; min-height: 2.6em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-wrap: balance; transition: opacity .35s; }
.board-cap.swap { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .board-stage img { transition: none; }
  .board-empty .scrawl, .board-empty .pencil { animation: none; stroke-dashoffset: 0; }
}
/* cover reveal: one crayon sweep from line art to colour once the coloured cover exists (same --x trick as the landing hero) */
.board-reveal { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .5s; --x: 0%; }
.board-stage .board-reveal img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 1; transition: none; }
.board-reveal .rc { clip-path: inset(0 calc(100% - var(--x)) 0 0); }
.board-reveal .crayon { top: -2px; width: 20px; }
.board-stage.reveal > img, .board-stage.reveal .board-empty { opacity: 0 !important; }
.board-stage.reveal .board-reveal { opacity: 1; }
.board-stage.reveal.go .board-reveal { animation: reveal-sweep 3.4s cubic-bezier(.55, 0, .3, 1) both; }
@keyframes reveal-sweep { from { --x: 0%; } to { --x: 100%; } }
@media (prefers-reduced-motion: reduce) {
  .board-reveal { transition: none; }
  .board-stage.reveal.go .board-reveal { animation: none; --x: 100%; }
  .board-reveal .crayon { display: none; }
}
.bar { height: 14px; background: var(--paper-2); border: 1.5px solid var(--ink); border-radius: 999px; overflow: hidden; margin: 14px 0; }
.bar i { display: block; height: 100%; min-width: 3%; background: repeating-linear-gradient(-45deg, var(--berry) 0 10px, #c9453d 10px 20px); background-size: 28px 28px; animation: stripes 1s linear infinite; transition: width .6s; }
@keyframes stripes { to { background-position: 28px 0; } }
.msg { font: 400 1.15rem/1.4 var(--serif); margin: 6px 0 8px; min-height: 1.6em; }

/* ---------- needs better photos ---------- */
.retry .card { text-align: center; }
.retry-photos { display: flex; justify-content: center; gap: 14px; margin: 18px 0; flex-wrap: wrap; }
.retry-photos figure { margin: 0; position: relative; }
.retry-photos img { width: 92px; height: 92px; object-fit: cover; border-radius: 12px; border: 1.5px solid var(--ink); display: block; transform: rotate(-2deg); }
.retry-photos figure:nth-child(2) img { transform: rotate(2deg); }
.retry-photos .bad img { border-color: var(--berry); box-shadow: 3px 4px 0 var(--berry); opacity: .85; }
.retry-photos figcaption { font: 800 .72rem/1 var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--berry); margin-top: 8px; }

/* ---------- preview ---------- */
.preview-head { text-align: center; padding-top: 22px; }
.preview-head .lead { margin-inline: auto; }
.cover-frame { position: relative; width: min(440px, 88%); margin: 26px auto 8px; transform: rotate(-1.5deg); }
.cover-frame::before { content: ""; position: absolute; top: -12px; left: 50%; width: 110px; height: 26px; transform: translateX(-50%) rotate(2deg); background: rgba(233, 182, 73, .7); z-index: 2; }
.cover-frame img { width: 100%; height: auto; aspect-ratio: 1184 / 1536; object-fit: cover; border-radius: 6px; border: 8px solid #fff; box-shadow: var(--shadow); }
.share { margin: 22px 0 6px; }
.pages { display: grid; gap: 28px; margin: 34px 0 10px; }
.page-card { margin: 0; }
.page-card .leaf { transform: rotate(var(--tilt, -.8deg)); }
.page-card:nth-child(2) { --tilt: .9deg; }
.page-card p { font: 400 1.08rem/1.45 var(--serif); color: var(--ink-2); text-align: center; margin: 14px 6px 6px; }
.page-card form { text-align: center; font-size: .9rem; }
#buy { padding-top: 30px; }
.buybar { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--ink); color: #fff; border-radius: 18px; padding: 12px 12px 12px 18px; box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .45); transition: transform .25s, opacity .25s; }
.buybar[hidden] { display: flex; transform: translateY(140%); opacity: 0; pointer-events: none; }
.buybar b { display: block; font: 650 1.05rem/1.2 var(--display); }
.buybar span { font-size: .85rem; color: #cfc6b5; }
.buybar .btn { --bg: var(--gold); --fg: var(--ink); box-shadow: none; border-color: var(--gold); flex: none; }
@media (min-width: 760px) { .buybar { left: 50%; right: auto; transform: translateX(-50%); width: 520px; } .buybar[hidden] { transform: translate(-50%, 140%); } }
#buy h2, #buy .eyebrow { text-align: center; }

/* ---------- success ---------- */
.dl { text-align: center; }
.dl .big { font-size: 3rem; }

/* ---------- admin ---------- */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 18px; font-size: .95rem; }
.kv dt { color: var(--ink-3); font-weight: 700; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.pill { display: inline-block; font: 800 .72rem/1 var(--body); letter-spacing: .06em; text-transform: uppercase; padding: 6px 9px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); border: 1px solid var(--rule); white-space: nowrap; }
.pill.preview_ready, .pill.approved { background: #e6f0ea; color: var(--pine); border-color: #bcd3c5; }
.pill.ready, .pill.shipped, .pill.printed { background: var(--pine); color: #fff; border-color: var(--pine); }
.pill.paid, .pill.generating, .pill.preview_generating, .pill.pending_review { background: #fff1d1; color: #7a5300; border-color: #f0d79c; }
.pill.needs_photos { background: #fff1d1; color: #7a5300; border-color: #f0d79c; }
.pill.failed { background: #fde8e6; color: var(--berry-dark); border-color: #f2b8b2; }
.scroll { overflow-x: auto; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); }
.scroll table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 560px; }
.scroll th { text-align: left; font-weight: 800; color: var(--ink-3); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; padding: 8px 10px; border-bottom: 1.5px solid var(--ink); }
.scroll td { padding: 12px 10px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.grid figure { margin: 0; background: #fff; border-radius: 10px; padding: 6px; box-shadow: var(--shadow); }
.grid img { aspect-ratio: 1184 / 1536; object-fit: contain; background: #fff; border-radius: 4px; }
.grid img.wide { aspect-ratio: 3 / 2; }
.grid figcaption { display: flex; justify-content: space-between; align-items: center; padding: 8px 4px 2px; font-size: .82rem; font-weight: 800; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 22px; }

/* ---------- admin chrome ---------- */
.admin .top nav a:not(.btn) { color: var(--ink); }
.admin-wrap { padding: 22px 0 60px; }
.admin-wrap h1 { font-size: 2.2rem; margin: 0 0 6px; }
.crumb { margin: 0 0 10px; font-weight: 800; font-size: .9rem; }
.crumb a { text-decoration: none; color: var(--ink-2); }
.admin-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 4px; }
.admin-head h1 { margin: 0; }
.admin-h2 { font-size: 1.5rem; margin-top: 26px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 22px; }
.stats div { background: var(--card); border: 1.5px solid var(--ink); border-radius: 14px; padding: 12px 14px; }
.stats b { display: block; font: 650 1.6rem/1.1 var(--display); }
.stats span { font-size: .8rem; font-weight: 700; color: var(--ink-3); }
.grid figure.ref { background: var(--pine); }
.grid figure.ref img { aspect-ratio: 1; object-fit: cover; }
.grid figure.ref figcaption { color: #fff; }
.grid .cap { margin: 2px 4px 6px; font-size: .78rem; line-height: 1.35; color: var(--ink-2); }

/* ---------- larger screens ---------- */
@media (min-width: 760px) {
  :root { --gutter: 32px; }
  section { padding: 84px 0; }
  .hero { padding: 48px 0 72px; }
  .hero-grid { grid-template-columns: 1fr 1fr; grid-template-areas: "title art" "copy art"; column-gap: 56px; align-items: end; }
  .hero-copy { align-self: start; }
  .colourer-wrap { margin: 0; }
  .countdown { grid-template-columns: 1.4fr 1fr; align-items: center; padding: 26px 30px; }
  .rail figure { flex-basis: 280px; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .inside { grid-template-columns: repeat(3, 1fr); }
  .prices { grid-template-columns: repeat(3, 1fr); align-items: start; }
  .prices.two { grid-template-columns: repeat(2, 1fr); max-width: 760px; margin-inline: auto; }
  .pages { grid-template-columns: repeat(3, 1fr); gap: 30px; }
  .grid { grid-template-columns: repeat(4, 1fr); }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .foot .wrap { grid-template-columns: 1fr 1fr; }
}

/* ---- cover picker (preview page) */
.cover-frame img[data-cover-hero] { aspect-ratio: 210 / 297; object-fit: contain; border: 0; border-radius: 3px; background: var(--paper-2); }
.cover-pick { padding: 22px 0 6px; text-align: center; }
.cover-pick h2 { font-size: clamp(1.5rem, 6vw, 2rem); margin-bottom: .15em; }
.covers { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
  padding: 16px var(--gutter) 22px; margin: 0 calc(-1 * var(--gutter)); scrollbar-width: none; }
.covers::-webkit-scrollbar { display: none; }
.covers::before, .covers::after { content: ""; margin: auto; }
.cover-opt { all: unset; box-sizing: border-box; position: relative; flex: 0 0 min(42vw, 190px); scroll-snap-align: center; cursor: pointer; text-align: center;
  display: block; padding: 4px 0 0; transition: transform .2s cubic-bezier(.3, 1.4, .5, 1); -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.cover-opt .thumb { display: block; border-radius: 6px; overflow: hidden; border: 1.5px solid var(--rule); background: #fff; box-shadow: var(--shadow); transition: box-shadow .2s, border-color .2s; }
.cover-opt .thumb img { width: 100%; height: auto; aspect-ratio: 210 / 297; }
.cover-opt .name { display: block; margin-top: 12px; font: 800 .95rem/1 var(--body); color: var(--ink-2); }
.cover-opt .tick { position: absolute; top: -6px; right: -7px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--gold);
  color: var(--ink); border: 2px solid var(--ink); box-shadow: 1px 2px 0 var(--ink); transform: scale(0) rotate(-30deg); transition: transform .22s cubic-bezier(.3, 1.6, .5, 1); }
.cover-opt.on { transform: translateY(-7px) rotate(-.6deg); }
.cover-opt.on .thumb { border: 3px solid var(--ink); box-shadow: 4px 7px 0 var(--ink); }
.cover-opt.on .tick { transform: scale(1) rotate(0); }
.cover-opt.on .name { color: var(--ink); }
.cover-opt:focus-visible .thumb { outline: 4px solid rgba(233, 182, 73, .7); outline-offset: 2px; }
.cover-opt:active { transform: scale(.97); }
.cover-opt.on:active { transform: translateY(-7px) scale(.98); }
.cover-opt.saving { opacity: .75; }
@media (min-width: 720px) { .covers { justify-content: center; overflow: visible; } .cover-opt { flex-basis: 190px; } }
@media (prefers-reduced-motion: reduce) { .cover-opt, .cover-opt .tick { transition: none; } }

/* ---- "which looks most like them?" picker (preview page): same card language as the cover picker, 2x2 so faces compare side by side */
.like-pick { padding: 38px 0 6px; text-align: center; }
.like-pick h2 { font-size: clamp(1.5rem, 6vw, 2rem); margin-bottom: .15em; text-wrap: balance; }
.likes { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 16px; max-width: 460px; margin: 6px auto 0; padding: 16px 4px 10px; }
.like-opt { all: unset; box-sizing: border-box; position: relative; display: block; cursor: pointer; text-align: center; padding: 4px 0 0;
  transition: transform .2s cubic-bezier(.3, 1.4, .5, 1); -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.like-opt .thumb { display: block; border-radius: 6px; overflow: hidden; border: 1.5px solid var(--rule); background: #fff; box-shadow: var(--shadow); transition: box-shadow .2s, border-color .2s; }
.like-opt .thumb img { display: block; width: 100%; height: auto; aspect-ratio: 1184 / 1536; object-fit: cover; }
.like-opt .name { display: block; margin-top: 11px; font: 800 .95rem/1 var(--body); color: var(--ink-2); }
.like-opt .tick { position: absolute; top: -6px; right: -7px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--gold);
  color: var(--ink); border: 2px solid var(--ink); box-shadow: 1px 2px 0 var(--ink); transform: scale(0) rotate(-30deg); transition: transform .22s cubic-bezier(.3, 1.6, .5, 1); }
.like-opt.on { transform: translateY(-5px) rotate(-.5deg); }
.like-opt:nth-child(even).on { transform: translateY(-5px) rotate(.5deg); }
.like-opt.on .thumb { border: 3px solid var(--ink); box-shadow: 4px 6px 0 var(--ink); }
.like-opt.on .tick { transform: scale(1) rotate(0); }
.like-opt.on .name { color: var(--ink); }
.like-opt:focus-visible .thumb { outline: 4px solid rgba(233, 182, 73, .7); outline-offset: 2px; }
.like-opt:active { transform: scale(.97); }
.like-opt.saving { opacity: .75; }
.like-saved { min-height: 1.2em; margin: 6px 0 0; color: var(--pine); font-weight: 800; opacity: 0; transition: opacity .3s; }
.like-saved.show { opacity: 1; }
.like-none { margin: 12px 0 0; display: grid; gap: 4px; justify-items: center; }
.like-none .small { margin: 0; }
@media (prefers-reduced-motion: reduce) { .like-opt, .like-opt .tick, .like-saved { transition: none; } }

/* ---- next-adventure vote (success page) */
.vote { margin: 26px 0 8px; padding: 20px 18px 22px; text-align: center; background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--r); box-shadow: 3px 5px 0 var(--ink); }
.vote h2 { font-size: clamp(1.4rem, 6vw, 1.9rem); margin-bottom: .1em; text-wrap: balance; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 14px 0 12px; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; }
.chips span { display: block; padding: 11px 16px; border: 1.5px solid #cfc4b0; border-radius: 999px; background: #fff; font-weight: 800; cursor: pointer; transition: transform .15s; -webkit-tap-highlight-color: transparent; }
.chips input:checked + span { border-color: var(--ink); background: var(--gold); box-shadow: 2px 3px 0 var(--ink); transform: translateY(-2px); }
.chips input:focus-visible + span { box-shadow: 0 0 0 4px rgba(233, 182, 73, .45); }
.vote-other { display: block; width: 100%; max-width: 360px; margin: 0 auto 14px; padding: 13px 14px; font: inherit; border: 1.5px solid var(--ink); border-radius: 12px; background: #fff; }
.vote-other[hidden] { display: none; }
.vote-thanks { margin: 10px 0 0; font-weight: 700; color: var(--pine); }
@media (prefers-reduced-motion: reduce) { .chips span { transition: none; } }
.votes { margin: 8px 0 18px; }
.votes h2 { font-size: 1.2rem; }

/* ---- create form: second pet, age, personal touches */
.pet-two { margin: 24px 0 4px; }
.pet-two summary { list-style: none; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 16px 10px 12px; cursor: pointer;
  border: 2px dashed #bfb39c; border-radius: 16px; background: var(--paper); font-weight: 800; transition: background .15s, border-color .15s;
  -webkit-tap-highlight-color: transparent; }
.pet-two summary::-webkit-details-marker { display: none; }
.pet-two summary:hover { border-color: var(--ink); background: #fff6e2; }
.pet-two summary:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(233, 182, 73, .45); border-color: var(--ink); }
.pet-two .plus { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--gold); border: 1.5px solid var(--ink);
  font: 700 1.4rem/1 var(--display); transition: transform .25s cubic-bezier(.3, 1.5, .5, 1); }
.pet-two .t { flex: 1; font-size: 1.05rem; }
.pet-two .p { font: 800 .8rem/1 var(--body); color: var(--berry); background: #fde8e6; border-radius: 999px; padding: 6px 10px; white-space: nowrap; }
.pet-two[open] summary { border-style: solid; border-color: var(--ink); background: #fff6e2; box-shadow: 2px 3px 0 var(--ink); }
.pet-two[open] .plus { transform: rotate(45deg); }
.pet-two-body { margin-top: 8px; padding: 6px 0 4px 14px; border-left: 3px solid var(--gold); }
.pet-two-body label.f:first-of-type { margin-top: 8px; }
.seg.ages { gap: 8px; }
.seg.ages span { padding: 12px 6px; line-height: 1.15; }
.seg.ages b { display: block; font-size: .98rem; }
.seg.ages small { display: block; margin-top: 3px; font: 600 .8rem/1.1 var(--body); color: var(--ink-3); }
.seg.ages input:checked + span small { color: var(--ink); }
.age-hint { margin: 10px 0 0; }
fieldset.personal { border: 0; margin: 26px 0 0; padding: 18px 0 0; border-top: 1.5px dashed #cfc4b0; min-width: 0; }
fieldset.personal legend { padding: 0 10px 0 0; font: 650 1.25rem/1.1 var(--display); letter-spacing: -.01em; float: left; width: 100%; margin-bottom: 4px; }
fieldset.personal legend span { font: 500 .9rem var(--body); color: var(--ink-3); letter-spacing: 0; }
fieldset.personal label.f:first-of-type { clear: both; margin-top: 12px; }
.count { text-align: right; margin: 4px 0 0; }

details.pet-two { border-bottom: 0; }
.pet-two summary::after { content: none; }
.pet-two summary { font: 800 1rem/1.3 var(--body); }
.pet-two .pet-two-body p { margin: 0 0 8px; }

/* ---- create form: story cards, one upload, "Two pets?" toggle */
fieldset.story-pick { border: 0; margin: 0 0 6px; padding: 0; min-width: 0; }
legend.f { display: block; padding: 0; margin: 4px 0 10px; font-weight: 800; font-size: 1rem; }
.stories { display: grid; gap: 12px; }
.story { position: relative; display: block; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.story input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.story-card { position: relative; display: flex; align-items: center; gap: 14px; min-height: 112px; padding: 10px 14px 10px 10px; border: 1.5px solid #cfc4b0;
  border-radius: 16px; background: #fff; transition: transform .18s cubic-bezier(.3, 1.4, .5, 1), box-shadow .18s, background .15s, border-color .15s; }
.story-card img { flex: none; width: 76px; height: 99px; object-fit: cover; border-radius: 6px; border: 1.5px solid var(--ink); background: #fff; transform: rotate(-2deg); }
.story-t { display: grid; gap: 3px; min-width: 0; }
.story-t b { font: 650 1.3rem/1.1 var(--display); letter-spacing: -.01em; }
.story-t small { font: 600 .9rem/1.3 var(--body); color: var(--ink-2); }
.story-card .tick { position: absolute; top: -8px; right: -6px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--ink);
  border: 2px solid var(--ink); box-shadow: 1px 2px 0 var(--ink); transform: scale(0) rotate(-30deg); transition: transform .22s cubic-bezier(.3, 1.6, .5, 1); }
.story:hover .story-card { border-color: var(--ink); }
.story input:checked + .story-card { border-color: var(--ink); background: #fff6e2; box-shadow: 3px 4px 0 var(--ink); transform: translateY(-2px); }
.story input:checked + .story-card .tick { transform: scale(1) rotate(0); }
.story input:focus-visible + .story-card { outline: 4px solid rgba(233, 182, 73, .6); outline-offset: 2px; }
.photo-hint { margin: 10px 0 0; }

.name-hint { margin: 6px 0 0; }

/* ---- preview: "Which one is {name}?" */
  transition: transform .2s cubic-bezier(.3, 1.4, .5, 1); }
@media (prefers-reduced-motion: reduce) { .story-card, .story-card .tick { transition: none; } }

/* ---------- upload-time photo gate + cast ---------- */
.thumbs { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; }
.thumbs:empty { margin: 0; }
.th { position: relative; width: 84px; }
.th img { display: block; width: 84px; height: 84px; object-fit: cover; border-radius: 10px; border: 1.5px solid var(--ink); background: var(--paper-2); }
.th .x { position: absolute; top: -9px; right: -9px; width: 28px; height: 28px; padding: 0; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--card); color: var(--ink); font: 800 1.1rem/1 var(--body); cursor: pointer; display: grid; place-items: center; }
.th .x:hover { background: #fde8e6; }
.th .spin-wrap { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 10px; background: rgba(251, 247, 239, .7); }
.th.bad { width: 100%; display: flex; gap: 12px; align-items: center; padding: 8px 12px 8px 8px; border: 1.5px solid var(--berry); border-radius: 12px; background: #fde8e6; }
.th.bad img { flex: none; width: 66px; height: 66px; border-color: var(--berry); }
.th.bad .why { flex: 1; color: var(--berry-dark); font-weight: 700; font-size: .92rem; line-height: 1.35; }
.th.bad .x { position: static; flex: none; }
.spin { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--rule); border-top-color: var(--berry); animation: spin .8s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }
.photo-hint { margin: 10px 0 0; }
.finding { margin: 16px 0 0; font-weight: 700; color: var(--ink-2); }
[data-cast-msg] { margin-top: 14px; }
.pets { margin-top: 8px; }
.pet { border: 0; padding: 0; margin: 18px 0 0; min-width: 0; }
.pet + .pet { padding-top: 18px; border-top: 2px dashed var(--rule); }
.pet-id { display: flex; gap: 14px; align-items: flex-end; }
.pet-id > div { flex: 1; min-width: 0; }
.pet-id img { flex: none; width: 84px; height: 84px; object-fit: cover; border-radius: 12px; border: 2px solid var(--ink); box-shadow: 3px 4px 0 var(--ink); background: var(--paper-2); transform: rotate(-2deg); }
.pet[data-pet="2"] .pet-id img { transform: rotate(2deg); }
.pet [data-extra] { color: var(--berry); font-weight: 800; }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2.4s; } }

/* demo mode banner (?demo=1 cookie; engine/demo.py) */
.demo-bar { margin: 0; padding: 8px 16px; text-align: center; font: 700 .78rem/1.3 var(--body); background: #1f4d3a; color: #f6f0e3; }
.demo-bar a { color: inherit; text-decoration: underline; margin-left: 6px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 10px 18px; align-content: start; }
.foot-links a { text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .3); padding-bottom: 1px; }
.foot-links a:hover { border-color: #fff; }
