/* Soft, warm, paper-like: cream backgrounds, terracotta and sage accents, rounded everything */
:root {
  --paper: #faf5ec;
  --paper-deep: #f3eadb;
  --card: #fffdf8;
  --ink: #4f4338;
  --muted: #8c7d6e;
  --accent: #c27a5c;
  --accent-deep: #a8613f;
  --accent-soft: #f5e3d8;
  --sage: #8fa98a;
  --sage-soft: #e6eedf;
  --line: #ebdfcd;
  --ok: #5e8a5a;
  --warn: #c0812f;
  --bad: #b0473c;
  --shadow: 0 1px 2px rgba(120, 90, 60, .06), 0 8px 28px rgba(120, 90, 60, .08);
  --display: "DM Serif Display", Georgia, serif;
  --script: "Caveat", "Segoe Print", cursive;
  --body: "Nunito", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--paper); }
body {
  margin: 0; color: var(--ink);
  font: 16px/1.6 var(--body);
  /* faint watercolour washes in the corners */
  background:
    radial-gradient(600px 420px at 0% 0%, rgba(245, 214, 196, .45), transparent 70%),
    radial-gradient(520px 380px at 100% 12%, rgba(214, 228, 206, .5), transparent 70%),
    radial-gradient(700px 500px at 50% 100%, rgba(248, 228, 196, .35), transparent 70%),
    var(--paper);
  min-height: 100vh;
}
h1, h2, h3, .brand { font-family: var(--display); font-weight: 400; line-height: 1.15; letter-spacing: 0; }
.script { font-family: var(--script); font-weight: 600; }
a { color: var(--accent-deep); }
img { max-width: 100%; }

header.site { display: flex; gap: 12px 20px; align-items: center; flex-wrap: wrap; padding: 22px 16px; max-width: 1100px; margin: auto; }
.brand { font-size: 25px; text-decoration: none; color: var(--ink); }
.brand span { color: var(--accent); }
header.site nav { margin-left: auto; display: flex; gap: 18px; align-items: center; }
header.site nav a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 15px; }
header.site nav a.button { color: var(--accent-deep); }
header.site nav a { white-space: nowrap; }
@media (max-width: 600px) {
  header.site { padding: 16px 16px 10px; }
  header.site nav { margin-left: 0; width: 100%; flex-wrap: wrap; justify-content: flex-start; gap: 6px 16px; }
  header.site nav a.button { margin-left: auto; }
  header.site nav a { font-size: 14px; }
  header.site nav a.nav-optional { display: none; }
  header.site nav a.button { padding: 8px 14px; }
  .cart-link, .icon-link { width: 36px; height: 36px; }
  header.site nav .cart-link + .icon-link { margin-left: -10px; }
  .origin.origin-top p { font-size: 13.5px; }
}
main { max-width: 1100px; margin: auto; padding: 0 16px 72px; }
footer.site { text-align: center; color: var(--muted); font-size: 13px; padding: 28px 16px 40px; }

/* ---------- Front page ---------- */
.landing-hero { display: grid; grid-template-columns: 1fr; gap: 30px; justify-items: center; text-align: center; padding: 18px 0 8px; }
.landing-hero > div:first-child { max-width: 760px; }
.landing-hero h1 { font-size: clamp(34px, 5.4vw, 58px); margin: 0 0 16px; }
.landing-hero h1 em { font-style: italic; color: var(--accent); }
.landing-hero .lede { font-size: 18px; color: var(--muted); max-width: 600px; margin: 0 auto 26px; }
.eyebrow { margin: 0 0 4px; font-size: 24px; color: var(--accent); }
.sub { color: var(--muted); margin: -4px auto 18px; max-width: 560px; }
p.center, .center { text-align: center; }

/* Flip-book sample: two-page spreads; the right page lifts at the spine and folds over */
.flipbook { margin: 0 auto; width: 100%; max-width: 940px; }
.fb-book { position: relative; aspect-ratio: 2 / 1; perspective: 2600px; cursor: pointer; outline: none;
  transition: transform .6s cubic-bezier(.45, .05, .35, 1); }
.fb-book.at-start { transform: translateX(-25%); }  /* closed book: centre the cover */
.fb-book.at-end { transform: translateX(25%); }     /* back cover: centre it too */
.fb-book:focus-visible { box-shadow: 0 0 0 3px var(--accent-soft); border-radius: 8px; }
.fb-half { position: absolute; top: 0; width: 50%; height: 100%; }
.fb-left { left: 0; }
.fb-right { right: 0; }
.fb-half img, .fb-face { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
  box-shadow: 0 14px 34px rgba(120, 90, 60, .16), 0 2px 4px rgba(120, 90, 60, .08); }
.fb-left img, .fb-face.fb-back { border-radius: 8px 2px 2px 8px; }
.fb-right img, .fb-face.fb-front { border-radius: 2px 8px 8px 2px; }
.fb-leaf.backward .fb-front { border-radius: 8px 2px 2px 8px; }
.fb-leaf.backward .fb-back { border-radius: 2px 8px 8px 2px; }
/* soft shading at the spine */
.fb-half::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.fb-left::after { background: linear-gradient(270deg, rgba(90, 65, 40, .16), rgba(90, 65, 40, 0) 7%); border-radius: 8px 2px 2px 8px; }
.fb-right::after { background: linear-gradient(90deg, rgba(90, 65, 40, .16), rgba(90, 65, 40, 0) 7%); border-radius: 2px 8px 8px 2px; }
.fb-half.empty::after { display: none; }
.fb-leaf { position: absolute; top: 0; width: 50%; height: 100%; transform-style: preserve-3d; z-index: 3;
  transition: transform .8s cubic-bezier(.45, .05, .35, 1); }
.fb-leaf.forward { left: 50%; transform-origin: left center; }
.fb-leaf.forward.go { transform: rotateY(-180deg); }
.fb-leaf.backward { left: 0; transform-origin: right center; }
.fb-leaf.backward.go { transform: rotateY(180deg); }
.fb-face { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.fb-face.fb-back { transform: rotateY(180deg); }
@media (prefers-reduced-motion: reduce) { .fb-leaf, .fb-book { transition-duration: .01s; } }
.flipbook figcaption { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 14px; color: var(--muted); font-weight: 600; }
.flipbook figcaption button { width: 40px; height: 40px; padding: 0; font-size: 22px; line-height: 1; }
.flipbook figcaption { margin-top: 22px; }
.fb-note { text-align: center; color: var(--muted); font-size: 20px; margin: 4px 0 0; }

/* Shop: three across on wide screens */
.products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-bottom: 36px; }
@media (max-width: 860px) { .products { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .products { grid-template-columns: 1fr; } }
.product { margin: 0; display: flex; flex-direction: column; text-align: center; padding: 18px; }
.product img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; margin-bottom: 8px; }
.product h3 { margin: 6px 0 4px; font-size: 21px; }
.product p { margin: 0 0 8px; color: var(--muted); font-size: 14.5px; }
.product .price-line { color: var(--accent-deep); font-weight: 700; font-size: 16px; }
.product > .button, .add-form { margin-top: auto; }
.product > .button { align-self: center; }
.add-form { text-align: left; }
.add-form label { margin-bottom: 10px; font-size: 13px; }
.add-form select, .add-form input { padding: 8px 10px; font-size: 14px; margin-top: 4px; }
.add-form button { width: 100%; }

/* Cart */
.cart-link, .icon-link { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--accent-deep) !important; transition: background .15s; }
.cart-link:hover, .icon-link:hover { background: var(--accent-soft); }
header.site nav .cart-link + .icon-link { margin-left: -12px; }
.icon-link.signed-in::after { content: ""; position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 0 2px var(--paper); }
.cart-link .badge { position: absolute; top: 2px; right: 0; }
.origin.origin-top { margin: 6px auto 0; max-width: 520px; }
.origin.origin-top p { margin: 0 0 2px; }
.origin-top { max-width: 600px; }
.origin.origin-top p { font-size: 14px; line-height: 1.6; color: var(--muted); }
.origin-top .flourish { margin: 10px auto 0; width: 40px; height: 3px; }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; }
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
@media (max-width: 860px) { .cart-layout { grid-template-columns: 1fr; } }
.cart-items, .cart-summary { margin: 0; }
.cart-line { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-line img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; }
.cart-what strong { display: block; font-size: 16px; }
.cart-qty { display: flex; gap: 6px; align-items: center; }
.cart-qty select { width: auto; margin: 0; padding: 6px 8px; }
.link-button { border: none; padding: 4px 6px; color: var(--muted); text-decoration: underline; font-weight: 600; }
.cart-price { font-weight: 700; min-width: 60px; text-align: right; }
@media (max-width: 560px) {
  .cart-line { grid-template-columns: 56px minmax(0, 1fr) auto; }
  .cart-line img { width: 56px; height: 56px; }
  .cart-qty { grid-column: 2; }
  .cart-price { grid-column: 3; grid-row: 1; }
}
.keep-shopping { margin: 14px 0 0; }
.cart-summary h2 { margin-top: 0; }
.sum-row, .sum-row.hint { display: flex; justify-content: space-between; padding: 6px 0; font-size: 15px; }
.sum-total { font-weight: 700; font-size: 18px; border-top: 1px solid var(--line); margin: 6px 0 16px; padding-top: 12px; }
.cart-summary button.primary { width: 100%; padding: 14px; }
.thanks-items { text-align: left; display: inline-block; margin: 6px auto 14px; }

/* Schools and custom */
.enterprise { display: flex; gap: 24px; align-items: center; justify-content: space-between; padding: 28px 30px; margin: 0 0 40px;
  background: linear-gradient(120deg, var(--sage-soft), var(--card) 60%); }
.enterprise h2 { margin: 0 0 8px; font-size: 26px; }
.enterprise p { margin: 0; color: var(--muted); max-width: 620px; }
.enterprise .eyebrow { color: var(--ok); }
.enterprise .button { flex-shrink: 0; }
@media (max-width: 760px) { .enterprise { flex-direction: column; text-align: center; } }
.cta-line { font-size: 28px; color: var(--accent); margin: 0 0 8px; }
.origin .sig { font-size: 26px; }

@media (max-width: 760px) {
  .fb-note { font-size: 18px; }
}
.origin { max-width: 640px; margin: 44px auto; text-align: center; }
.origin p { font-family: var(--display); font-size: 21px; line-height: 1.55; font-style: italic; margin: 0 0 6px; }
.origin .sig { color: var(--accent); }
.flourish { display: block; width: 64px; height: 4px; margin: 0 auto 22px; border-radius: 4px; background: linear-gradient(90deg, var(--accent-soft), var(--accent), var(--sage)); opacity: .7; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 12px 0 36px; }
.steps .card { margin: 0; text-align: center; }
.steps .num { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-deep); font-family: var(--display); font-weight: 600; margin-bottom: 6px; }
.steps h3 { margin: 4px 0 6px; font-size: 20px; }
.steps p { margin: 0; color: var(--muted); font-size: 15px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.pricing { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 720px; margin: 0 auto 36px; }
.pricing .card { margin: 0; text-align: center; }
.pricing h3 { margin: 0; font-size: 22px; }
.pricing .amount { font-family: var(--display); font-size: 34px; margin: 4px 0 0; }
.pricing .gst { color: var(--muted); font-size: 14px; }
.pricing p { margin: 6px 0 0; }
@media (max-width: 560px) { .pricing { grid-template-columns: 1fr; } }
.cta { text-align: center; margin: 8px 0 20px; }
section h2.center { text-align: center; }

/* ---------- Cards and forms ---------- */
.hero { text-align: center; padding: 18px 0 4px; }
.hero h1 { font-size: clamp(28px, 4.6vw, 42px); margin: 0 0 8px; }
.hero p { max-width: 620px; margin: 0 auto; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 24px; margin: 18px 0; box-shadow: var(--shadow); }
.card.center { text-align: center; max-width: 620px; margin: 48px auto; }
form.card { max-width: 760px; margin: 24px auto; }
h2 { font-size: 22px; margin: 30px 0 12px; }
.card > h2:first-child, summary h2 { margin-top: 0; }
label { display: block; margin: 0 0 16px; font-weight: 600; font-size: 14px; }
label small, .hint { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
input, select, textarea {
  width: 100%; margin-top: 6px; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
  font: inherit; font-weight: 400; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.verse { font-family: var(--display); font-size: 15px; line-height: 1.7; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }
.req { color: var(--accent); }
fieldset.age { border: 1px dashed #e2d2bc; border-radius: 16px; padding: 16px; margin: 0 0 14px; background: var(--paper); }
fieldset.age legend { font-family: var(--display); font-weight: 600; padding: 2px 12px; background: var(--card); border-radius: 999px; border: 1px solid var(--line); }
.previews { display: flex; gap: 8px; flex-wrap: wrap; }
.previews img { width: 92px; height: 92px; object-fit: cover; border-radius: 10px; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
label.check input { width: auto; margin-top: 5px; accent-color: var(--accent); }

/* Format picker */
.formats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 8px; }
@media (max-width: 560px) { .formats { grid-template-columns: 1fr; } }
.format { position: relative; display: block; margin: 0; padding: 16px 18px; border: 1.5px solid var(--line); border-radius: 16px; background: #fff; cursor: pointer; font-weight: 400; transition: border-color .15s, background .15s; }
.format input { position: absolute; opacity: 0; pointer-events: none; }
.format:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.format:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--accent-soft); }
.format strong { display: block; font-family: var(--display); font-size: 19px; font-weight: 600; }
.format .price { font-weight: 700; color: var(--accent-deep); }
.format small { display: block; color: var(--muted); }

/* Buttons */
button, .button {
  display: inline-block; padding: 11px 22px; border-radius: 999px; border: 1.5px solid var(--accent);
  background: transparent; color: var(--accent-deep); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none;
  transition: background .15s, transform .15s;
}
button:hover, .button:hover { background: var(--accent-soft); }
button.primary, .button.primary { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(194, 122, 92, .28); }
button.primary:hover, .button.primary:hover { background: var(--accent-deep); transform: translateY(-1px); }
.button.big { padding: 15px 34px; font-size: 17px; }
button:disabled { opacity: .45; cursor: default; transform: none; }
button.small { padding: 6px 14px; font-size: 13px; }
form.card button[type=submit] { width: 100%; margin-top: 10px; padding: 15px; font-size: 17px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.actions form { margin: 0; }

/* ---------- Review screens ---------- */
.meta, .crumbs { color: var(--muted); margin: 4px 0; }
.status { font: 700 12px var(--body); padding: 3px 11px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-deep); vertical-align: middle; white-space: nowrap; }
.s-illustrated, .s-approved { background: var(--sage-soft); color: var(--ok); }
.s-error { background: #f6dedb; color: var(--bad); }
.error { background: #f6dedb; color: var(--bad); padding: 10px 14px; border-radius: 12px; }
.notice { background: var(--accent-soft); padding: 10px 14px; border-radius: 12px; font-size: 14px; }
table.orders { width: 100%; border-collapse: collapse; }
table.orders th, table.orders td { text-align: left; padding: 11px 6px; border-bottom: 1px solid var(--line); }
@media (max-width: 640px) { table.orders th:nth-child(3), table.orders td:nth-child(3), table.orders th:nth-child(4), table.orders td:nth-child(4) { display: none; } }
details summary { cursor: pointer; list-style: none; }
details summary h2 { display: inline; }
.memory { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.memory h3 { margin: 0 0 4px; font-size: 17px; }
.page { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 24px; }
@media (max-width: 800px) { .page { grid-template-columns: 1fr; } }
.art img, .noart { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; background: #fff; display: block; }
.noart { display: grid; place-items: center; color: var(--muted); border: 1px dashed var(--line); }
.art form { margin-top: 8px; }
.cutouts { display: grid; gap: 6px; }
.cutouts.n2 { grid-template-columns: 1fr 1fr; }
.cutouts.n3 { grid-template-columns: 1fr 1fr 1fr; }
ol.syllables { list-style: none; padding: 0; margin: -8px 0 14px; display: flex; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--ok); }
ol.syllables li.off { color: var(--warn); font-weight: 700; }
.rewrite { display: flex; gap: 8px; align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.rewrite input { margin: 0; }
.rewrite button { flex-shrink: 0; }
.hint.center { text-align: center; margin-top: 10px; }

/* Log in and My orders */
form.card.narrow { max-width: 440px; }
form.card.narrow button { width: 100%; }
form.center { text-align: center; margin: 10px 0 30px; }
.order-card { max-width: 820px; margin-left: auto; margin-right: auto; }
.order-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.order-head h2 { margin: 0; font-size: 22px; }
.order-item { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; padding: 14px 0 4px; border-top: 1px solid var(--line); margin-top: 12px; }
.order-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.order-item strong { font-size: 16px; }
.progress { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 0; padding: 0; margin: 12px 0 6px; counter-reset: step; }
.progress li { position: relative; flex: 1 1 0; min-width: 92px; padding-top: 26px; font-size: 12.5px; color: var(--muted); text-align: center; }
.progress li::before { content: ""; position: absolute; top: 6px; left: calc(50% - 7px); width: 14px; height: 14px; border-radius: 50%; background: var(--line); z-index: 1; }
.progress li::after { content: ""; position: absolute; top: 12px; left: -50%; width: 100%; height: 2px; background: var(--line); }
.progress li:first-child::after { display: none; }
.progress li.done::before, .progress li.done::after, .progress li.now::after { background: var(--sage); }
.progress li.now::before { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.progress li.now { color: var(--ink); font-weight: 700; }
@media (max-width: 560px) {
  .progress { flex-direction: column; gap: 0; margin-left: 2px; }
  .progress li { flex: none; min-width: 0; padding: 0 0 14px 26px; text-align: left; }
  .progress li::before { top: 3px; left: 0; }
  .progress li::after { top: -11px; left: 6px; width: 2px; height: 18px; }
}
.soon { display: inline-block; padding: 3px 12px; border-radius: 999px; background: var(--sage-soft); color: var(--ok); font-size: 13px; }
.product.is-soon img { opacity: .85; }
.price-line .unit { font-weight: 400; color: var(--muted); font-size: 14px; }
.social { display: grid; gap: 8px; margin-bottom: 6px; }
.social-btn { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 8px 18px; font-size: 14.5px; border-color: var(--line); background: #fff; color: var(--ink); }
.social-btn svg { width: 16px; height: 16px; }
.social-btn:hover { background: var(--paper); }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 16px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Welcome pop-up */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
dialog.welcome { padding: 0; border: none; border-radius: 24px; width: min(720px, calc(100% - 32px)); background: var(--card); color: var(--ink);
  box-shadow: 0 30px 80px rgba(80, 60, 40, .28); overflow: hidden; }
dialog.welcome[open] { display: grid; grid-template-columns: 1fr 1.15fr; animation: welcome-in .35s ease; }
dialog.welcome::backdrop { background: rgba(70, 55, 40, .35); backdrop-filter: blur(2px); }
@keyframes welcome-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.welcome-art { background: var(--paper); display: grid; place-items: center; }
.welcome-art img { width: 100%; height: 100%; object-fit: cover; }
.welcome-body { padding: 30px 30px 24px; text-align: center; }
.welcome-body h2 { margin: 0 0 8px; font-size: 28px; }
.welcome-body p { margin: 0 0 14px; color: var(--muted); }
.welcome-body input { margin: 0 0 10px; }
.welcome-body button.primary { width: 100%; }
.welcome-body .hint { margin: 12px 0 6px; font-size: 12px; }
.welcome-code { font-family: var(--display); font-size: 26px; color: var(--accent-deep) !important; letter-spacing: .04em;
  background: var(--accent-soft); border-radius: 12px; padding: 10px; }
.welcome-close { position: absolute; top: 10px; right: 12px; width: 34px; height: 34px; padding: 0; border: none; font-size: 24px; color: var(--muted); z-index: 1; }
@media (max-width: 600px) {
  dialog.welcome[open] { grid-template-columns: 1fr; }
  .welcome-art { max-height: 170px; overflow: hidden; }
  .welcome-body { padding: 22px 20px 18px; }
}
.sum-row.discount { color: var(--ok); font-weight: 600; }
.sum-row.discount small { font-weight: 400; color: var(--muted); }
.cart-side { display: grid; gap: 12px; min-width: 0; }
.cart-side .card { max-width: none; margin: 0; width: 100%; }
.promo-form label { margin: 0 4px; font-size: 13px; }
.promo-row { display: flex; gap: 8px; margin-top: 4px; }
.promo-row input { margin: 0; padding: 8px 10px; }

/* Dropdowns in the site's style: custom arrow everywhere, fully styled list where the browser allows */
select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  padding-right: 40px; background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a8613f' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
select option { background: var(--card); color: var(--ink); font: inherit; }
@supports (appearance: base-select) {
  select, ::picker(select) { appearance: base-select; }
  select { display: flex; align-items: center; background-image: none; }
  select::picker-icon {
    content: ""; width: 14px; height: 14px; margin-left: auto; transition: rotate .2s;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a8613f' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat center;
  }
  select:open::picker-icon { rotate: 180deg; }
  select { padding-right: 14px; }
  ::picker(select) {
    border: 1px solid var(--line); border-radius: 14px; background: var(--card); padding: 6px;
    box-shadow: 0 14px 34px rgba(120, 90, 60, .16); margin-top: 6px;
  }
  select option { padding: 10px 12px; border-radius: 10px; font-size: 15px; color: var(--ink); }
  select option::checkmark { display: none; }
  select option:hover, select option:focus-visible { background: var(--accent-soft); outline: none; }
  select option:checked { background: var(--paper-deep); font-weight: 700; color: var(--accent-deep); }
}

.upload-progress { margin: 4px 0 6px; }
.upload-progress .bar { height: 8px; border-radius: 999px; background: var(--paper-deep); overflow: hidden; }
.upload-progress .bar span { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--sage)); transition: width .3s ease; }

/* Order confirmation */
.confirm { max-width: 680px; margin: 30px auto; }
.confirm-head { text-align: center; padding-bottom: 8px; }
.confirm-head h1 { margin: 0 0 10px; font-size: 34px; }
.tick { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--sage-soft); color: var(--ok); margin-bottom: 6px; }
.order-number { display: inline-block; margin: 2px 0 10px; padding: 8px 18px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-deep); font-size: 15px; }
.order-number strong { font-size: 18px; letter-spacing: .03em; }
.confirm-items { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 6px; }
.confirm-line { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.confirm-line img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; }
.confirm-ship, .confirm-next { margin-top: 18px; }
.confirm-ship h3, .confirm-next h3 { margin: 0 0 6px; font-size: 18px; }
.confirm-ship p, .confirm-next li { color: var(--muted); margin: 0; }
.confirm-next ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; }

/* Long-form pages (privacy) */
.prose { max-width: 760px; margin: 24px auto 40px; }
.prose h2 { font-size: 22px; margin: 26px 0 8px; }
.prose p, .prose li { color: var(--ink); line-height: 1.7; }
.prose ul, .prose ol { padding-left: 22px; }
.policy-table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 15px; }
.policy-table th, .policy-table td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); line-height: 1.5; }
.policy-table th { background: var(--paper-deep); color: var(--ink); font-weight: 700; }
@media (max-width: 560px) {
  .policy-table thead { display: none; }
  .policy-table tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .policy-table td { display: block; border: 0; padding: 2px 0; }
  .policy-table td:first-child { font-weight: 700; }
}
footer.site { line-height: 1.8; }
footer.site a { color: var(--muted); }

/* Logo: a watercolour pop-up book. Shows the open book with flowers; .play runs the opening once. */
.brand { display: inline-flex; align-items: center; gap: 8px; }
.brand-mark { position: relative; width: 62px; height: 62px; flex: none; margin: -14px 0 -10px -6px; }
.brand-mark img { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
.brand-mark img:nth-child(4) { opacity: 1; }
.brand-mark.play img:nth-child(1) { animation: kb-s1 1.6s ease both; }
.brand-mark.play img:nth-child(2) { animation: kb-s2 1.6s ease both; }
.brand-mark.play img:nth-child(3) { animation: kb-s3 1.6s ease both; }
.brand-mark.play img:nth-child(4) { animation: kb-s4 1.6s ease both; }
@keyframes kb-s1 { 0%, 37% { opacity: 1; } 47%, 100% { opacity: 0; } }
@keyframes kb-s2 { 0%, 37% { opacity: 0; } 47%, 59% { opacity: 1; } 69%, 100% { opacity: 0; } }
@keyframes kb-s3 { 0%, 59% { opacity: 0; } 69%, 81% { opacity: 1; } 91%, 100% { opacity: 0; } }
@keyframes kb-s4 { 0%, 81% { opacity: 0; } 91%, 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .brand-mark.play img { animation: none !important; } }
@media (max-width: 600px) { .brand-mark { width: 50px; height: 50px; } }

/* Delivery choices listed under the cart summary */
.ship-options { list-style: none; margin: -2px 0 10px; padding: 0; font-size: 13px; color: var(--muted); }
.ship-options li { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; }

/* Admin: status and tracking number for posting an order */
.ship-form { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; margin: 6px 0 10px; }
.ship-form label { margin: 0; font-size: 13px; }
.ship-form input { min-width: 220px; }
/* My orders: tracking line */
.tracking { font-size: 14px; margin: 4px 0 10px; }
/* Phones: keep the menu on one row (Shop, Customisation, Start a book, cart, profile) */
@media (max-width: 600px) {
  header.site nav { flex-wrap: nowrap; gap: 12px; }
  header.site nav a.button { padding: 7px 12px; }
}
@media (max-width: 380px) {
  header.site nav { gap: 9px; }
  header.site nav a { font-size: 13px; }
}

.delete-form { margin: 6px 0 0; }
.delete-form .link-button { color: #b5483b; font-weight: 500; font-size: 14px; padding: 2px 0; }
td .delete-form { margin: 0; }

.pic-edit { margin-top: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; background: #fffdf8; }
.pic-edit summary { cursor: pointer; font-weight: 600; color: var(--accent-deep); }
.pic-edit form { display: grid; gap: 8px; margin-top: 10px; }
.pic-edit label { display: grid; gap: 4px; font-size: 14px; }
.pic-edit .upload { margin-top: 6px; padding-top: 10px; border-top: 1px dashed var(--line); }
.pic-edit button { justify-self: start; }
.pic-edit .pick { border: 0; padding: 0; margin: 0; display: flex; gap: 14px; align-items: center; font-size: 14px; }
.pic-edit .pick legend { float: left; margin-right: 6px; }
.pic-edit .pick label { display: inline-flex; gap: 4px; }
.pic-edit .undo { margin: 0; }


.printed { margin: 0; }
.printed img.preview { aspect-ratio: 1; background: #fcf8f0 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='40'%3E%3Ctext x='100' y='25' text-anchor='middle' font-family='Georgia' font-size='14' fill='%238c7d6e'%3EDrawing page%E2%80%A6%3C/text%3E%3C/svg%3E") center no-repeat; box-shadow: 0 6px 22px rgba(79, 67, 56, .14); border: 1px solid var(--line); border-radius: 6px; }
.printed figcaption, .printed.two figcaption { text-align: center; font-size: 13px; color: var(--muted); margin-top: 6px; }
.printed.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.printed.two figure { margin: 0; }
.layouts { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.layouts label { cursor: pointer; color: var(--muted); border-radius: 8px; padding: 2px; line-height: 0; }
.layouts input { position: absolute; opacity: 0; pointer-events: none; }
.layouts label:hover { color: var(--ink); }
.layouts input:checked + svg rect:first-child { stroke: var(--accent); stroke-opacity: 1; stroke-width: 2.5; }
.layouts input:focus-visible + svg { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.layout-name { margin: 4px 0 0; }
.raw-thumbs { display: flex; gap: 8px; margin-top: 10px; }
.raw-thumbs figure { margin: 0; text-align: center; font-size: 12px; color: var(--muted); }
.art .raw-thumbs img { width: 64px; height: 64px; border-radius: 8px; border: 1px solid var(--line); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Admin panel ---------- */
body.admin { background: var(--paper); }
.admin-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.admin-side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px; padding: 22px 14px; background: var(--card); border-right: 1px solid var(--line); }
.admin-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 6px; text-decoration: none; color: var(--ink); font: 21px/1.1 "DM Serif Display", Georgia, serif; }
.admin-brand small { display: block; font: 600 12px/1.4 Nunito, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-deep); }
.admin-side nav { display: grid; gap: 2px; }
.admin-side nav a, .admin-out { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 600; }
.admin-side nav a:hover, .admin-out:hover { background: var(--accent-soft); }
.admin-side nav a.on { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(194, 122, 92, .25); }
.admin-side nav a svg { flex-shrink: 0; opacity: .8; }
.admin-side nav a span { flex: 1; }
.admin-side nav a b { min-width: 22px; padding: 0 7px; border-radius: 999px; background: #b5483b; color: #fff; font-size: 12px; line-height: 22px; text-align: center; }
.admin-side nav a.on b { background: #fff; color: var(--accent-deep); }
.admin-out { margin-top: auto; color: var(--muted); font-weight: 500; }
.admin-main { padding: 30px 36px 80px; max-width: 1080px; width: 100%; }
.admin-main .card { margin: 0 0 18px; }
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 18px; }
.admin-head h1 { margin: 0 0 4px; }
.admin-head .hint { max-width: 640px; margin: 0; }
.admin-head .eyebrow { margin: 0; }
@media (max-width: 860px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: sticky; top: 0; z-index: 5; height: auto; flex-direction: row; align-items: center; gap: 6px; padding: 8px 10px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .admin-brand span, .admin-out { display: none; }
  .admin-brand { padding: 0 4px 0 0; }
  .admin-side nav { display: flex; gap: 4px; }
  .admin-side nav a { padding: 8px 10px; gap: 6px; white-space: nowrap; font-size: 14px; }
  .admin-side nav a svg { display: none; }
  .admin-main { padding: 18px 14px 60px; }
  .admin-head { flex-direction: column; align-items: flex-start; }
}

.filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.filters a { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); text-decoration: none; color: var(--ink); font-weight: 600; font-size: 14px; }
.filters a b { margin-left: 4px; color: var(--muted); font-weight: 600; }
.filters a.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.filters a.on b { color: #fff; opacity: .75; }
.empty { text-align: center; padding: 40px 20px; }
.empty h2 { margin: 0 0 6px; }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0 0 18px; }
.tiles.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 700px) { .tiles, .tiles.three { grid-template-columns: 1fr 1fr; } }
.tile { display: grid; gap: 4px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); text-decoration: none; color: inherit; }
.tile strong { font: 36px/1 "DM Serif Display", Georgia, serif; color: var(--ink); }
.tile span { color: var(--muted); font-size: 14px; }
.tile.hot { border-color: var(--accent); background: #fbefe7; }
.tile.hot strong { color: var(--accent-deep); }
a.tile:hover { border-color: var(--accent); transform: translateY(-1px); }

.todo { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.todo li a { display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; text-decoration: none; color: inherit; }
.todo li a:hover { border-color: var(--accent); }
.todo .todo-text { font-weight: 600; }
.todo .go { color: var(--accent-deep); font-weight: 700; }
@media (max-width: 600px) { .todo li a { grid-template-columns: 1fr auto; } .todo .status { grid-column: 1 / -1; justify-self: start; } .todo .hint { display: none; } }
.shortcuts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 10px; }
@media (max-width: 700px) { .shortcuts { grid-template-columns: 1fr 1fr; } }
.shortcut { display: grid; gap: 2px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; text-decoration: none; color: var(--ink); }
.shortcut span { color: var(--muted); font-size: 13px; }
.shortcut:hover { border-color: var(--accent); }

.order-card.is-express { border-left: 5px solid #b5483b; }
.order-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.order-top h2 { margin: 0 0 2px; font-size: 22px; }
.order-top .hint { margin: 0; }
.hint.inline { display: inline; font-size: 15px; }
.order-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; align-items: center; }
.order-total { font: 22px "DM Serif Display", Georgia, serif; margin-left: 6px; }
.order-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; margin-top: 16px; }
@media (max-width: 760px) { .order-body { grid-template-columns: 1fr; gap: 12px; } .order-top { flex-direction: column; } .order-tags { justify-content: flex-start; } }
.order-body h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px; font-family: Nunito, sans-serif; }
.order-body h3 + * { margin-top: 0; }
.order-body > div > h3:not(:first-child) { margin-top: 18px; }
.order-items { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.order-items li { display: flex; gap: 10px; align-items: center; }
.order-items img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.order-items small { display: block; color: var(--muted); }
.address { line-height: 1.5; margin: 0 0 6px; }
.contact { font-size: 14px; color: var(--muted); }
.progress-form { display: grid; gap: 12px; align-content: start; padding: 16px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); }
.progress-form h3 { margin: 0; }
.progress-form button { justify-self: start; }
.progress-form .hint { margin: 0; font-size: 13px; }
.progress-form label { display: grid; gap: 4px; font-size: 14px; font-weight: 600; }
.stepper { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.stepper label { display: block; font-weight: 600; }
.stepper input { position: absolute; opacity: 0; pointer-events: none; }
.stepper span { display: block; padding: 9px 4px; text-align: center; font-size: 13px; cursor: pointer; color: var(--muted); border-right: 1px solid var(--line); }
.stepper label:last-child span { border-right: 0; }
.stepper label.done span { background: var(--sage-soft); color: var(--ok); }
.stepper input:checked + span { background: var(--accent); color: #fff; }
.stepper input:focus-visible + span { outline: 2px solid var(--accent-deep); outline-offset: -3px; }
.history { font-size: 12px; color: var(--muted); margin: 0; }
.order-foot { display: flex; justify-content: flex-end; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.order-foot .delete-form { margin: 0; }
.actions-row { justify-content: flex-start; flex-wrap: wrap; gap: 12px; align-items: center; }
.actions-row form { margin: 0; }
.actions-row .delete-form { margin-left: auto; }

.book-list { display: grid; gap: 10px; }
.book-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 18px; align-items: center; padding: 16px 20px !important; }
.book-main { text-decoration: none; color: inherit; }
.book-main h2 { margin: 0 0 2px; font-size: 20px; }
.book-main .hint { margin: 0; }
.book-main:hover h2 { color: var(--accent-deep); }
.book-side { display: flex; align-items: center; gap: 10px; }
.book-side .delete-form { margin: 0; }
.mini-steps { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.mini-steps li { font-size: 12px; padding: 4px 9px; border-radius: 999px; background: var(--paper-deep); color: var(--muted); }
.mini-steps li.done { background: var(--sage-soft); color: var(--ok); }
.mini-steps li.now { background: var(--accent-soft); color: var(--accent-deep); font-weight: 700; }
@media (max-width: 860px) { .book-row { grid-template-columns: 1fr; gap: 10px; } }

.enquiry-card.is-done { opacity: .75; }
.facts { display: flex; gap: 18px; margin: 12px 0 0; font-size: 14px; }
.facts strong { color: var(--muted); font-weight: 600; margin-right: 4px; }
.message { white-space: pre-line; margin: 12px 0 0; padding: 14px 16px; background: var(--paper); border-left: 3px solid var(--accent-soft); border-radius: 8px; }
.muted-row td { color: var(--muted); }

/* ---------- Customer book preview ---------- */
.book-preview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin: 0 0 26px; }
.book-preview figure { margin: 0; }
.book-preview img { display: block; width: 100%; height: auto; aspect-ratio: 1; background: #fcf8f0; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 8px 26px rgba(79, 67, 56, .13); }
.book-preview figcaption { margin-top: 7px; text-align: center; color: var(--muted); font-size: 14px; }
.decision-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 14px; }
.decision-grid form { display: grid; gap: 10px; align-content: start; }
.decision-grid h3 { margin: 0; }
.decision-grid button { justify-self: start; }
.decision-grid .hint { margin: 0; }
.decision-grid .check { display: flex; gap: 9px; align-items: flex-start; }
.decision-grid .check input { width: auto; margin-top: 4px; }
@media (max-width: 680px) { .book-preview, .decision-grid { grid-template-columns: 1fr; } }
.preview-state { display: grid; gap: 6px; margin-top: 14px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.preview-state.approved { background: var(--sage-soft); border-color: var(--sage); }
.preview-state.changes { background: #fbefe7; border-color: var(--accent); }

/* ---------- Sticker and craft makers ---------- */
.maker-form { display: grid; gap: 14px; max-width: 620px; margin: 0 auto 36px; }
.maker-form label { display: block; font-weight: 600; }
.maker-form label input:not([type="checkbox"]), .maker-form label select { display: block; width: 100%; margin-top: 6px; }
.maker-form label[hidden] { display: none; }
.maker-form .hint { margin: -6px 0 0; }
.maker-form .check { display: flex; align-items: flex-start; gap: 9px; font-weight: 500; }
.maker-form .check input { width: auto; margin-top: 4px; }
.maker-form button { justify-self: start; }
.maker-result { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 26px; align-items: start; margin-bottom: 36px; }
.sticker-sheet { margin: 0; }
.sticker-sheet img { display: block; width: 100%; height: auto; background: #fffdf8; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 28px rgba(79, 67, 56, .14); }
.maker-buy { display: grid; gap: 12px; margin: 0; }
.maker-buy h2, .maker-buy p { margin: 0; }
.maker-buy h2 small { font: 500 14px var(--body); color: var(--muted); }
.maker-buy label { display: grid; gap: 6px; font-weight: 600; }
.maker-buy .button, .maker-buy button { justify-self: stretch; text-align: center; }
.craft-pages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 26px; }
.craft-pages figure { margin: 0; }
.craft-pages img { display: block; width: 100%; height: auto; aspect-ratio: 1240 / 1754; background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 6px 20px rgba(79, 67, 56, .12); }
.craft-pages figcaption { margin-top: 6px; text-align: center; color: var(--muted); font-size: 14px; }
.craft-buy { max-width: 460px; margin: 0 auto 36px; }
@media (max-width: 760px) { .maker-result { grid-template-columns: 1fr; } .craft-pages { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.photo-field { display: grid; gap: 8px; }
.field-label { font-weight: 600; }
.dropzone { position: relative; display: grid !important; justify-items: center; gap: 5px; padding: 38px 20px; text-align: center; color: var(--ink); background: var(--paper); border: 2px dashed var(--accent); border-radius: 18px; cursor: pointer; transition: background .15s, border-color .15s; }
.dropzone svg { color: var(--accent-deep); }
.dropzone strong { font: 22px/1.25 "DM Serif Display", Georgia, serif; }
.dropzone span { color: var(--ink); font-weight: 500; }
.dropzone u { color: var(--accent-deep); text-underline-offset: 3px; }
.dropzone small { color: var(--muted); font-weight: 500; }
.dropzone:hover, .dropzone.over { background: var(--accent-soft); border-color: var(--accent-deep); }
.dropzone:focus-within { outline: 3px solid var(--accent-soft); outline-offset: 3px; }
.dropzone-input { position: absolute; width: 1px !important; height: 1px; padding: 0; overflow: hidden; opacity: 0; }
.photo-count { margin: 0; color: var(--muted); font-size: 14px; font-weight: 600; }
.photo-count.done { color: var(--ok); }
.photo-field .error { margin: 0; }
.photo-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.photo-grid:empty { display: none; }
.photo-tile { position: relative; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--paper-deep); }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; }
.photo-tile span { padding: 4px; font-size: 10px; overflow-wrap: anywhere; text-align: center; color: var(--muted); }
.photo-tile button { position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: rgba(79, 67, 56, .78); color: #fff; font-size: 16px; line-height: 1; }
@media (max-width: 560px) { .photo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .dropzone { padding: 28px 16px; } }
.file-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }

.maker-status { max-width: 560px; margin: 0 auto 36px; text-align: center; }
.maker-status h2 { margin: 10px 0 6px; }
.paint-spinner { width: 42px; height: 42px; margin: 0 auto; border: 4px solid var(--accent-soft); border-top-color: var(--accent); border-radius: 50%; animation: paint-spin 1s linear infinite; }
@keyframes paint-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .paint-spinner { animation: none; } }
.craft-sample { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: center; margin-bottom: 26px; }
.craft-sample figure { margin: 0; }
.craft-sample img { display: block; width: 100%; height: auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 20px rgba(79, 67, 56, .12); }
.craft-sample figcaption { margin-top: 6px; text-align: center; color: var(--muted); font-size: 14px; }
@media (max-width: 640px) { .craft-sample { grid-template-columns: 1fr; } }

.product-admin { display: grid; gap: 16px; }
.product-edit { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 22px; }
.product-edit > img { width: 170px; aspect-ratio: 1; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); }
.product-edit h2 { margin: 0; }
.product-form { display: grid; gap: 12px; margin-top: 12px; }
.product-form label { display: block; font-weight: 600; }
.product-form input, .product-form select, .product-form textarea { display: block; width: 100%; margin-top: 5px; }
.product-form button { justify-self: start; }
.product-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 680px) { .product-edit { grid-template-columns: 1fr; } .product-edit > img { width: 120px; } .product-row { grid-template-columns: 1fr; } }

.delivery-choice { display: grid; gap: 8px; margin: 10px 0 6px; padding: 0; border: 0; }
.delivery-choice legend { margin-bottom: 8px; font-weight: 700; }
.delivery-choice label { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 11px 13px; border: 1px solid var(--line); border-radius: 13px; background: #fff; cursor: pointer; }
.delivery-choice label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.delivery-choice input { width: auto; margin: 0; accent-color: var(--accent); }
.delivery-choice span { display: grid; gap: 1px; }
.delivery-choice small { color: var(--muted); font-size: 13px; }
.delivery-choice b { font-size: 15px; }

.delivery-choice[hidden], .bake-date[hidden] { display: none; }
.bake-date { display: grid; gap: 6px; margin: 8px 0; }
.bake-date label { font-weight: 700; }
.bake-date .hint { margin: 0; font-size: 13px; }
.cart-side .promo-form { margin: 0 0 14px; }

.promo-inline { display: grid; gap: 6px; margin: 4px 0 6px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.promo-inline label { font-weight: 700; font-size: 14px; }
.promo-inline .promo-row { display: flex; gap: 8px; }
.promo-inline input { flex: 1; min-width: 0; }
.promo-inline .error { margin: 0; }
.promo-applied { margin: 2px 0 6px; color: var(--ok); font-size: 14px; }

/* Order form: tappable ideas under a field, and a compact photo drop box per year */
.suggest { display: flex; flex-wrap: nowrap; gap: 6px; margin: 8px 0 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
.suggest::-webkit-scrollbar { display: none; }
.suggest:empty { display: none; }
.suggest button { font: 500 13px/1.2 var(--body); color: var(--accent-deep); background: var(--accent-soft); border: 1px solid transparent; border-radius: 999px; padding: 6px 11px; cursor: pointer; box-shadow: none; min-height: 0; width: auto; flex: none; white-space: nowrap; }
.suggest button:hover { border-color: var(--accent); background: #f8ebe2; }
fieldset.age .field-label { display: block; margin: 12px 0 6px; font-weight: 600; }
.dropzone.mini { grid-auto-flow: column; justify-content: center; align-items: center; gap: 10px; padding: 14px 16px; border-width: 1.5px; border-radius: 14px; background: var(--card); }
.dropzone.mini[hidden] { display: none !important; }
fieldset.age .photo-count { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
fieldset.age .photo-count:empty { display: none; }
fieldset.age .photo-grid { grid-template-columns: repeat(3, minmax(0, 120px)); margin-top: 8px; }
fieldset.age, fieldset.age label, form label:has(> .suggest) { min-width: 0; max-width: 100%; }
.verse-warn { color: var(--bad); margin: 4px 0 8px; font-size: 14px; }
/* Admin storybook: what the buyer shared, easy to find and beside each verse */
details.shared summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
details.shared summary::before { content: "▸"; color: var(--accent-deep); transition: transform .15s; }
details.shared[open] summary::before { transform: rotate(90deg); }
details.shared .toggle-hint { color: var(--accent-deep); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
details.shared[open] .toggle-hint { display: none; }
.shared-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 12px 0; }
.shared-facts:empty { display: none; }
.shared-facts dt { color: var(--muted); }
.shared-facts dd { margin: 0; }
.buyer-memory { background: var(--sage-soft); border-radius: 12px; padding: 10px 14px; margin: 0 0 14px; }
.buyer-memory .eyebrow { margin: 0 0 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
.buyer-memory p { margin: 0; line-height: 1.55; }
.buyer-memory .previews { margin-top: 8px; }
.buyer-memory .previews img { width: 64px; height: 64px; }
.buyer-memory summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--accent-deep); list-style: none; }
.buyer-memory summary::-webkit-details-marker { display: none; }
.buyer-memory summary::before { content: "▸"; display: inline-block; margin-right: 6px; transition: transform .15s; }
.buyer-memory[open] summary::before { transform: rotate(90deg); }
.buyer-memory[open] summary { margin-bottom: 6px; }
.buyer-memory .shared-facts { margin: 4px 0 0; }
.fixed-tag { font-size: 12px; font-weight: 600; color: var(--ok); background: var(--sage-soft); border-radius: 999px; padding: 2px 8px; margin-left: 6px; }
.kept-fixes { background: var(--sage-soft); border-radius: 10px; padding: 8px 12px; margin: 8px 0; font-size: 14px; }
.kept-fixes p { margin: 2px 0; }
.cover-choices { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.cover-choices label { position: relative; cursor: pointer; }
.cover-choices input { position: absolute; opacity: 0; }
.cover-choices img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; border: 3px solid transparent; display: block; }
.cover-choices input:checked + img { border-color: var(--accent); }
.cover-choices input:focus-visible + img { outline: 2px solid var(--accent-deep); }
.photo-choices input:checked + img { border-color: var(--ok); }

/* Admin sign-in */
body.admin-login-page { min-height: 100vh; display: grid; place-items: center; background: var(--paper); margin: 0; padding: 16px; }
.admin-login { width: 100%; max-width: 380px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 34px 28px; text-align: center; display: grid; gap: 10px; justify-items: center; }
.admin-login h1 { margin: 0 0 6px; font-family: var(--display); font-size: 30px; }
.admin-login .eyebrow { margin: 6px 0 0; }
.admin-login form { width: 100%; display: grid; gap: 14px; text-align: left; margin-top: 6px; }
.admin-login button.primary { width: 100%; }
.admin-login .error { margin: 0; }
.admin-signout { margin: 4px 0 0; }
.admin-signout .link-button { color: var(--muted); font-size: 14px; padding: 6px 12px; }

/* Test orders and remarks */
.status.s-test { background: #ece6f5; color: #5d4a85; border-color: transparent; }
.remark-line { margin: 4px 0 0; font-size: 14px; color: var(--ink); background: #fbf3d9; border-radius: 8px; padding: 4px 10px; display: inline-block; }
.remark-edit { margin: 8px 0; font-size: 14px; }
.remark-edit summary { cursor: pointer; color: var(--accent-deep); font-weight: 600; }
.remark-edit form { display: grid; gap: 8px; max-width: 460px; margin-top: 8px; }

/* Homepage opening */
.hq { position: relative; display: grid; justify-items: center; align-content: center; text-align: center; gap: 14px; min-height: 78svh; padding: 24px 16px 40px; }
.hq-brand { font-family: var(--display); font-weight: 400; font-size: clamp(44px, 9vw, 84px); line-height: 1.02; margin: 0; letter-spacing: -0.01em; color: var(--ink); }
.hq-line { font-size: clamp(22px, 4vw, 30px); color: var(--accent-deep); margin: 0; }
.hq-sub { font-size: clamp(18px, 2.6vw, 22px); color: var(--muted); margin: 0 0 6px; max-width: 520px; }
.hq-sub em { font-style: italic; color: var(--accent); }
.hq .button.big { margin-top: 10px; }
.hq-cue { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); color: var(--muted); font-size: 14px; text-decoration: none; }
.hq-cue span { display: inline-block; animation: hq-bob 2.2s ease-in-out infinite; }
.hq-b { overflow: hidden; min-height: 86svh; width: 100vw; margin-left: calc(50% - 50vw); }  /* painting runs edge to edge */
.hq-wash { position: absolute; inset: 0; background: url("/static/gemma-book/p24.webp") center 70% / cover no-repeat; opacity: .9; animation: hq-drift 18s ease-out both; }
.hq-wash::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(250,245,236,.55) 0%, rgba(250,245,236,.15) 45%, rgba(250,245,236,.0) 70%, var(--paper) 100%); }
.hq-b-inner { position: relative; display: grid; justify-items: center; gap: 12px; margin-top: -8svh; }
.hq-b .hq-cue { z-index: 1; }
.rise { opacity: 0; animation: hq-rise .9s cubic-bezier(.2,.7,.2,1) forwards; }
.rise.d1 { animation-delay: .15s; } .rise.d2 { animation-delay: .35s; } .rise.d3 { animation-delay: .55s; } .rise.d4 { animation-delay: 1.1s; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s ease; }
.reveal.in { opacity: 1; transform: none; }
@keyframes hq-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes hq-drift { from { transform: scale(1.08); } to { transform: scale(1); } }
@keyframes hq-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@media (prefers-reduced-motion: reduce) { .rise, .reveal, .hq-wash, .hq-cue span { animation: none !important; opacity: 1 !important; transform: none !important; transition: none !important; } }
html { overflow-x: clip; }
/* Homepage: the menu-bar name stays quiet while the big Keepsake Books is on screen, then fades in */
header.site .brand, header.site .brand span { transition: color .5s ease; }
body.home-hero:not(.past-hero) header.site .brand, body.home-hero:not(.past-hero) header.site .brand span { color: transparent; }

/* Scroll-driven sample book (demo): the section is tall, the book stays pinned while scrolling turns its pages */
.scrolly { position: relative; height: calc(100svh + var(--turns, 12) * 34svh); width: 100vw; margin-left: calc(50% - 50vw); }
.scrolly-stage { position: sticky; top: 0; height: 100svh; display: grid; align-content: center; justify-items: center; gap: 14px; padding: 0 16px; }
.scrolly-stage .flipbook { position: relative; z-index: 0; }
.scrolly-kicker { position: relative; z-index: 4; margin-bottom: max(28px, 6svh) !important; }
.scrolly-kicker { margin: 0; font-size: clamp(22px, 3.4vw, 30px); color: var(--accent-deep); }
.scrolly .flipbook { max-width: min(940px, 150svh); }
.fb-book.scrubbed, .fb-book.scrubbed .fb-leaf { transition: none; }
.fb-book.scrubbed { cursor: pointer; }
.scrolly .flipbook figcaption { margin-top: 18px; }
.scrolly-progress { width: min(240px, 60vw); height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.scrolly-progress span { display: block; height: 100%; width: 0; background: var(--accent); }
.scrolly-hint { margin: 0; font-size: 13px; color: var(--muted); letter-spacing: .02em; }

/* Calm, separate sections below the book: each one gets the screen to itself */
.home-panels > section, .home-panels > .cta { min-height: 72svh; display: grid; align-content: center; padding: 72px 0; margin: 0; border-top: 1px solid var(--line); }
.home-panels > section.origin { max-width: none; border-top: 0; min-height: 70svh; text-align: center; justify-items: center; }
.home-panels > section.origin p { font-size: clamp(24px, 3.6vw, 38px); line-height: 1.35; max-width: 760px; margin: 0 auto; }
.home-panels > .enterprise { border: 1px solid var(--line); border-radius: 24px; min-height: 0; margin: 72px 0; }
.home-panels > .cta { text-align: center; justify-items: center; }
.home-panels > section > *, .home-panels > .cta > * { opacity: 0; transform: translateY(22px); transition: opacity .9s ease, transform .9s ease; }
.home-panels > .in > * { opacity: 1; transform: none; }
.home-panels > .in > *:nth-child(2) { transition-delay: .12s; } .home-panels > .in > *:nth-child(3) { transition-delay: .24s; } .home-panels > .in > *:nth-child(4) { transition-delay: .36s; }
@media (prefers-reduced-motion: reduce) { .scrolly { height: auto; } .scrolly-stage { position: static; height: auto; padding: 40px 16px; } .scrolly-hint, .scrolly-progress { display: none; }
  .home-panels > section > *, .home-panels > .cta > * { opacity: 1; transform: none; transition: none; } }
.page-icon { display: flex; align-items: center; gap: 12px; margin: 14px 0 6px; }
.page-icon img { width: 56px; height: 56px; object-fit: contain; background: #fff; border-radius: 10px; border: 1px solid var(--line); }
.page-icon .hint { margin: 0; }
