/* Family Board Books
   Layout concept: chunky board-book pages (thick rounded cards with a page edge)
   on a calm page; colour comes from the letters, never from backgrounds. */
:root {
  /* Letter palette (from the original family ABC book) */
  --red: #EE4B2B;
  --orange: #FF8A1F;
  --sun: #FFC21A;
  --leaf: #1FB45A;
  --sky: #16A6E3;
  --grape: #8A3FD9;
  --pink: #F2558C;
  --brown: #9A5B34;
  --ink: #1E1A33;
  --cloud: #E9E6F2;
  --splash-dark: #1E1A33;
  /* Neutrals: a violet-tinted ink on near-white paper */
  --bg: #FDFCFA;
  --surface: #FFFFFF;
  --surface-2: #F5F3EE;
  --text: #1E1A33;
  --muted: #5F5A73;
  --line: #E7E3DA;
  --edge: #D9D3C6;
  --page: #FFFEFB;
  --page-edge: #E4DDCF;
  --focus: #16A6E3;
  /* Type */
  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: "Figtree", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --letter: "Oswald", "Impact", "Arial Narrow", sans-serif;
  --r: 22px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15131F; --surface: #1D1A2B; --surface-2: #221F31; --text: #F3F1FA; --muted: #B6B0C8;
    --line: #2F2B42; --edge: #0B0A12; --page: #FFFEFB; --page-edge: #8F8AA3; --splash-dark: #1E1A33;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #15131F; --surface: #1D1A2B; --surface-2: #221F31; --text: #F3F1FA; --muted: #B6B0C8;
  --line: #2F2B42; --edge: #0B0A12; --page: #FFFEFB; --page-edge: #8F8AA3; --splash-dark: #1E1A33;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--bg); }
img, svg { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.08; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(30px, 4vw, 46px); font-weight: 800; }
h3 { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1180px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.section { padding-block: clamp(56px, 8vw, 96px); }
.eyebrow { font: 700 13px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.lede { font-size: 19px; color: var(--muted); max-width: 60ch; }
.sec-head { display: grid; gap: 14px; margin-bottom: 36px; max-width: 760px; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Buttons */
.btn { --b: var(--ink); --bt: #fff; display: inline-flex; align-items: center; gap: 10px; justify-content: center; padding: 14px 24px; border-radius: 999px; background: var(--b); color: var(--bt); font: 700 16px/1 var(--body); text-decoration: none; border: 0; cursor: pointer; box-shadow: 0 4px 0 color-mix(in srgb, var(--b) 60%, #000); transition: transform .12s ease, box-shadow .12s ease; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 color-mix(in srgb, var(--b) 60%, #000); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 color-mix(in srgb, var(--b) 60%, #000); }
.btn.red { --b: var(--red); }
.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 2px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 2px var(--text); transform: none; }
.btn.btn-sm { padding: 10px 18px; font-size: 15px; }
:root[data-theme="dark"] .btn:not(.red):not(.ghost) { --b: #F3F1FA; --bt: #1E1A33; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn:not(.red):not(.ghost) { --b: #F3F1FA; --bt: #1E1A33; } }

/* Header */
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 800 19px/1 var(--display); letter-spacing: -0.02em; }
.logo-mark { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; width: 30px; height: 30px; }
.logo-mark i { border-radius: 4px; }
.logo-mark i:nth-child(1) { background: var(--red); border-top-left-radius: 10px; }
.logo-mark i:nth-child(2) { background: var(--sun); border-top-right-radius: 10px; }
.logo-mark i:nth-child(3) { background: var(--sky); border-bottom-left-radius: 10px; }
.logo-mark i:nth-child(4) { background: var(--leaf); border-bottom-right-radius: 10px; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 600; font-size: 15px; color: var(--muted); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
@media (max-width: 820px) { .nav { display: none; } .site-head .btn { margin-left: auto; } }

/* Hero wordmark */
.hero { padding-block: clamp(44px, 7vw, 84px) 28px; }
.hero-grid { display: grid; gap: 18px; }
.wordmark { font: 800 clamp(48px, 9.5vw, 128px)/0.92 var(--display); letter-spacing: -0.045em; margin: 0; }
.wordmark .w { display: inline-block; white-space: nowrap; }
.wordmark .l { display: inline-block; }
.wordmark .l:nth-child(7n+1) { color: var(--red); }
.wordmark .l:nth-child(7n+2) { color: var(--sky); }
.wordmark .l:nth-child(7n+3) { color: var(--sun); }
.wordmark .l:nth-child(7n+4) { color: var(--leaf); }
.wordmark .l:nth-child(7n+5) { color: var(--grape); }
.wordmark .l:nth-child(7n+6) { color: var(--orange); }
.wordmark .l:nth-child(7n+7) { color: var(--pink); }
.hero-sub { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px 40px; }
.hero-sub .lede { font-size: clamp(18px, 2vw, 22px); color: var(--text); max-width: 34ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
@media (prefers-reduced-motion: no-preference) {
  .wordmark .l { animation: hop .6s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(var(--i) * 35ms); }
  @keyframes hop { from { transform: translateY(18px) rotate(-4deg); } to { transform: none; } }
}

/* Theme shelf: horizontally scrolling board-book cards */
.shelf-wrap { position: relative; padding-bottom: 12px; }
.shelf-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.shelf-arrows { display: flex; gap: 8px; }
.arrow { width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; display: grid; place-items: center; }
.arrow:hover { border-color: var(--text); }
.arrow:disabled { opacity: .35; cursor: default; border-color: var(--line); }
.shelf { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 250px); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 2px 22px; scrollbar-width: thin; overscroll-behavior-x: contain; }
.tcard { --card-ink: #fff; scroll-snap-align: start; display: flex; flex-direction: column; gap: 10px; min-height: 320px; padding: 22px; border-radius: 28px; background: var(--card-bg); color: var(--card-ink); text-decoration: none; box-shadow: 0 9px 0 color-mix(in srgb, var(--card-bg) 62%, #000); transition: transform .15s ease, box-shadow .15s ease; position: relative; }
.tcard:hover { transform: translateY(-5px) rotate(-1deg); box-shadow: 0 14px 0 color-mix(in srgb, var(--card-bg) 62%, #000); }
.tcard .glyph { flex: 1; display: grid; place-items: center; min-height: 120px; }
.tcard h3 { font-size: 24px; }
.tcard p { font-size: 15px; line-height: 1.4; opacity: .92; }
.tcard .from { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 15px; padding-top: 10px; border-top: 2px solid color-mix(in srgb, var(--card-ink) 25%, transparent); }
.tcard.soon { background: var(--surface-2); color: var(--muted); box-shadow: 0 9px 0 var(--line); --card-ink: var(--muted); }
.tcard.soon:hover { transform: none; }
.tag { position: absolute; top: 16px; right: 16px; font: 700 12px/1 var(--body); letter-spacing: .06em; text-transform: uppercase; padding: 7px 10px; border-radius: 999px; background: color-mix(in srgb, var(--card-ink) 18%, transparent); }
.t-red { --card-bg: var(--red); } .t-sky { --card-bg: var(--sky); } .t-leaf { --card-bg: var(--leaf); }
.t-grape { --card-bg: var(--grape); } .t-pink { --card-bg: var(--pink); } .t-orange { --card-bg: var(--orange); }
.t-sun { --card-bg: var(--sun); --card-ink: #1E1A33; }
.g-text { font: 600 clamp(64px, 8vw, 92px)/1 var(--letter); letter-spacing: .01em; }
.g-quote { font-family: var(--display); font-weight: 800; font-size: 120px; line-height: .6; padding-top: 30px; }
.g-svg { width: 104px; height: 104px; }
.g-dots { display: flex; gap: 8px; }
.g-dots i { width: 42px; height: 42px; border-radius: 50%; border: 4px solid var(--card-ink); }

/* Board book page mock */
.bpage { --pc: var(--red); position: relative; aspect-ratio: 1 / 1; width: 100%; max-width: 100%; background: var(--page); color: #1E1A33; border-radius: 30px; box-shadow: 0 2px 0 var(--page-edge), 0 6px 0 var(--page-edge), 0 18px 34px -18px rgba(30, 26, 51, .45); padding: 7%; overflow: hidden; container-type: inline-size; }
.bpage-h { font: 600 22cqw/0.9 var(--letter); color: var(--pc); letter-spacing: .01em; position: relative; z-index: 2; }
.bpage.long .bpage-h { font: 800 9.5cqw/1.02 var(--display); letter-spacing: -0.02em; max-width: 90%; }
.bpage-items { position: absolute; inset: 0; }
.bpage-item { position: absolute; margin: 0; display: grid; justify-items: center; gap: 2%; }
.bpage-item .portrait { width: 100%; height: auto; display: block; }
.bpage-item figcaption { font: 600 5.2cqw/1.1 var(--letter); color: var(--pc); text-align: center; letter-spacing: .02em; filter: saturate(1.1) brightness(.92); }
.bpage.n1 .bpage-item:nth-child(1) { width: 62%; left: 30%; top: 24%; }
.bpage.long.n1 .bpage-item:nth-child(1) { width: 58%; left: 21%; top: 34%; }
.bpage.n2 .bpage-item:nth-child(1) { width: 44%; right: 6%; top: 6%; }
.bpage.n2 .bpage-item:nth-child(2) { width: 44%; left: 8%; top: 48%; }
.bpage.long.n2 .bpage-item:nth-child(1) { top: 30%; }
.bpage.long.n2 .bpage-item:nth-child(2) { top: 50%; }
.bpage.n3 .bpage-item:nth-child(1) { width: 38%; right: 5%; top: 5%; }
.bpage.n3 .bpage-item:nth-child(2) { width: 38%; left: 6%; top: 52%; }
.bpage.n3 .bpage-item:nth-child(3) { width: 36%; right: 8%; top: 56%; }
.photo-fx { filter: saturate(1.35) contrast(1.08); }
.portrait.empty { opacity: .8; }

/* Style demo */
.demo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.demo-stage { max-width: 520px; width: 100%; justify-self: center; }
.style-tabs { display: grid; gap: 10px; margin-top: 26px; }
.style-tab { display: grid; grid-template-columns: 52px 1fr; gap: 14px; align-items: center; text-align: left; padding: 12px 16px 12px 12px; border-radius: 18px; border: 2px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; }
.style-tab .mini { width: 52px; height: 52px; }
.style-tab strong { display: block; font-size: 17px; }
.style-tab span { color: var(--muted); font-size: 15px; line-height: 1.35; }
.style-tab[aria-pressed="true"] { border-color: var(--text); box-shadow: 0 4px 0 var(--text); }
@media (max-width: 860px) { .demo { grid-template-columns: 1fr; } }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; counter-reset: s; }
.step { padding: 28px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 10px; align-content: start; }
.step::before { counter-increment: s; content: counter(s); font: 600 54px/1 var(--letter); color: var(--sc); }
.step:nth-child(1) { --sc: var(--red); } .step:nth-child(2) { --sc: var(--sky); } .step:nth-child(3) { --sc: var(--leaf); }
.step p { color: var(--muted); }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

/* Why */
.why { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.why-item { display: grid; gap: 8px; align-content: start; padding-top: 18px; border-top: 4px solid var(--wc); }
.why-item:nth-child(1) { --wc: var(--grape); } .why-item:nth-child(2) { --wc: var(--orange); } .why-item:nth-child(3) { --wc: var(--sky); } .why-item:nth-child(4) { --wc: var(--pink); }
.why-item p { color: var(--muted); font-size: 16px; }
@media (max-width: 900px) { .why { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .why { grid-template-columns: 1fr; } }

/* Price table */
.table-wrap { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; min-width: 560px; }
th, td { text-align: left; padding: 16px 20px; border-bottom: 1px solid var(--line); }
th { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
td a { font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
td a:hover { text-decoration: underline; }
.dot { width: 14px; height: 14px; border-radius: 4px; display: inline-block; background: var(--dc); flex: none; }
.price { font-weight: 800; font-family: var(--display); font-size: 19px; }
.note { margin-top: 14px; font-size: 15px; color: var(--muted); }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 820px; }
.faq details { border-radius: 18px; background: var(--surface); border: 1px solid var(--line); padding: 4px 22px; }
.faq summary { cursor: pointer; font: 700 18px/1.3 var(--display); padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; line-height: 1; color: var(--muted); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding-bottom: 18px; color: var(--muted); }

/* Waitlist band */
.band { background: var(--ink); color: #F3F1FA; border-radius: 36px; padding: clamp(28px, 5vw, 56px); display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; position: relative; overflow: hidden; }
:root[data-theme="dark"] .band { background: var(--surface-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .band { background: var(--surface-2); } }
.band h2 { color: #fff; }
.band p { color: #CFCADE; }
.band .confetti { position: absolute; inset: 0; pointer-events: none; opacity: .9; }
.band > * { position: relative; }
.form { display: grid; gap: 12px; }
.form-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 14px; }
input[type="text"], input[type="email"], select, textarea { width: 100%; font: inherit; font-size: 16px; padding: 13px 16px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--text); }
textarea { min-height: 90px; resize: vertical; }
.band input, .band select { background: #fff; color: #1E1A33; border-color: transparent; }
.form-msg { font-weight: 600; min-height: 1.4em; }
@media (max-width: 860px) { .band { grid-template-columns: 1fr; } .form-row { grid-template-columns: 1fr; } }

/* Footer */
.site-foot { border-top: 1px solid var(--line); padding-block: 40px 56px; margin-top: 40px; }
.foot-grid { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; align-items: start; }
.foot-links { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.foot-links a { color: var(--muted); text-decoration: none; font-size: 15px; }
.foot-links a:hover { color: var(--text); }
.small { font-size: 14px; color: var(--muted); }

/* Book (theme) page */
.bhero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; padding-block: clamp(36px, 6vw, 72px); }
.bhero h1 { font-size: clamp(44px, 7vw, 84px); font-weight: 800; letter-spacing: -0.04em; color: var(--bc); }
.bhero .lede { color: var(--text); font-size: 20px; }
.bhero-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 13px; border-radius: 999px; background: var(--surface-2); font-size: 14px; font-weight: 600; color: var(--muted); }
.bhero-copy { display: grid; gap: 22px; }
.stack { position: relative; max-width: 480px; width: 100%; justify-self: center; }
.stack .bpage:nth-child(2) { position: absolute; inset: 0; transform: rotate(5deg) translate(7%, 2%); z-index: -1; filter: brightness(.97); }
.samples { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
@media (max-width: 760px) { .samples { grid-template-columns: 1fr 1fr; } .samples > :nth-child(3) { display: none; } }
@media (max-width: 860px) { .bhero { grid-template-columns: 1fr; } }
.inside { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 40px; padding: 0; margin: 0; list-style: none; }
.inside li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; }
.inside li::before { content: ""; width: 18px; height: 18px; margin-top: 4px; border-radius: 6px; background: var(--bc); }
@media (max-width: 700px) { .inside { grid-template-columns: 1fr; } }
.editions { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.edition { display: grid; gap: 10px; align-content: start; padding: 26px; border-radius: var(--r); background: var(--surface); border: 2px solid var(--line); position: relative; }
.edition.featured { border-color: var(--bc); box-shadow: 0 6px 0 var(--bc); }
.edition .badge { position: absolute; top: -13px; left: 22px; background: var(--bc); color: #fff; font: 700 12px/1 var(--body); letter-spacing: .06em; text-transform: uppercase; padding: 7px 10px; border-radius: 999px; }
.edition .amt { font: 800 44px/1 var(--display); letter-spacing: -0.03em; }
.edition .amt small { font-size: 16px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.edition .btn { margin-top: 8px; }
.opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 28px; }
.opt { padding: 20px; border-radius: 18px; background: var(--surface-2); display: grid; gap: 6px; }
.opt p { color: var(--muted); font-size: 15px; }
@media (max-width: 820px) { .opts { grid-template-columns: 1fr; } }
.crumbs { font-size: 14px; color: var(--muted); padding-top: 22px; }
.crumbs a { color: var(--muted); }

/* Creator */
.creator { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; padding-block: 28px 40px; }
@media (max-width: 980px) { .creator { grid-template-columns: 1fr; } }
.stepper { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 26px; padding: 0; list-style: none; }
.stepper button { font: 700 14px/1 var(--body); padding: 11px 16px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.stepper button[aria-current="step"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.stepper button.done { color: var(--text); }
.panel { display: grid; gap: 22px; }
.panel h2 { font-size: clamp(28px, 3.4vw, 38px); }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.choice { display: grid; gap: 8px; align-content: start; text-align: left; padding: 16px; border-radius: 20px; border: 2px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; position: relative; }
.choice:hover { border-color: var(--muted); }
.choice[aria-pressed="true"] { border-color: var(--text); box-shadow: 0 4px 0 var(--text); }
.choice .cg { height: 70px; display: grid; place-items: start; }
.choice .cg .g-text { font-size: 56px; color: var(--cc); }
.choice .cg .g-quote { font-size: 80px; color: var(--cc); padding-top: 18px; }
.choice .cg .g-svg { width: 62px; height: 62px; --card-ink: var(--cc); --card-bg: var(--surface); }
.choice .cg .g-dots i { width: 26px; height: 26px; border-width: 3px; --card-ink: var(--text); }
.choice strong { font-size: 17px; }
.choice span { font-size: 14px; color: var(--muted); line-height: 1.35; }
.choice .p { font-weight: 800; color: var(--text); font-size: 15px; }
.choice .portrait { width: 100%; max-width: 150px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .row2 { grid-template-columns: 1fr; } }
.check { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--text); }
.check span { flex: 1; }
.qty { display: inline-flex; align-items: center; gap: 4px; border: 2px solid var(--line); border-radius: 999px; padding: 4px; background: var(--surface); }
.qty button { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--text); font-size: 20px; cursor: pointer; }
.qty output { min-width: 28px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.panel-nav { display: flex; justify-content: space-between; gap: 12px; padding-top: 10px; }
.pages-ui { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 760px) { .pages-ui { grid-template-columns: 1fr; } }
.page-strip { display: flex; flex-wrap: wrap; gap: 6px; grid-column: 1 / -1; }
.page-strip button { min-width: 44px; height: 44px; padding: 0 10px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); color: var(--text); font: 600 18px/1 var(--letter); cursor: pointer; position: relative; }
.page-strip button.filled::after { content: ""; position: absolute; right: 4px; top: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--leaf); }
.page-strip button[aria-current="true"] { border-color: var(--text); background: var(--text); color: var(--bg); }
.slot { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; padding: 12px; border-radius: 16px; border: 2px dashed var(--line); background: var(--surface); }
.slot.has-photo { border-style: solid; }
.slot-thumb { width: 64px; height: 64px; border-radius: 50%; background: var(--surface-2); overflow: hidden; display: grid; place-items: center; font-size: 26px; color: var(--muted); }
.slot-thumb img { width: 100%; height: 100%; object-fit: cover; }
.slot-fields { display: grid; gap: 8px; min-width: 0; }
.slot-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.upload { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; background: var(--surface-2); font-weight: 700; font-size: 14px; cursor: pointer; }
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.linkish { background: none; border: 0; color: var(--muted); font: 600 14px/1 var(--body); cursor: pointer; text-decoration: underline; padding: 6px; }
.editor { display: grid; gap: 12px; }
.editor-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.hint { font-size: 14px; color: var(--muted); }
.summary { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 88px); display: grid; gap: 16px; padding: 22px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.summary h3 { font-size: 18px; }
.sum-cover { aspect-ratio: 1 / 1; border-radius: 22px; background: var(--sc, var(--red)); color: #fff; display: grid; align-content: space-between; padding: 18px; box-shadow: 0 6px 0 color-mix(in srgb, var(--sc, var(--red)) 60%, #000); overflow: hidden; }
.sum-cover .t { font: 800 26px/1 var(--display); letter-spacing: -0.02em; }
.sum-cover .k { font: 700 12px/1 var(--body); letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.sum-cover .portrait { width: 52%; justify-self: end; }
.sum-lines { display: grid; gap: 8px; font-size: 15px; font-variant-numeric: tabular-nums; }
.sum-lines div { display: flex; justify-content: space-between; gap: 12px; }
.sum-lines .total { border-top: 1px solid var(--line); padding-top: 10px; font-weight: 800; font-size: 18px; }
.progress { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--leaf); border-radius: inherit; transition: width .3s ease; }
.notice { padding: 14px 16px; border-radius: 14px; background: color-mix(in srgb, var(--sky) 14%, var(--surface)); font-size: 15px; }
.success { padding: 28px; border-radius: var(--r); background: color-mix(in srgb, var(--leaf) 14%, var(--surface)); display: grid; gap: 10px; }
.stack { isolation: isolate; }
.shelf .tcard { min-height: 280px; }
.btn:disabled { opacity: .4; cursor: default; transform: none; }
main { overflow-x: clip; }
@media (max-width: 600px) { .stack .bpage:nth-child(2) { transform: rotate(4deg) translate(3%, 2%); } }
.btn { white-space: nowrap; } @media (max-width: 420px) { .site-head .btn { padding: 10px 14px; font-size: 14px; } .logo { font-size: 17px; } }
