/* Book lab: book-only rules. The page itself wears the shop's own site.css and studio.css (shop/, copied by sync_shop.py),
   so the header, crumbs, rail, panel cards, tiles, summary and buttons are the live product page's. */
@font-face { font-family: 'BK Serif'; src: url(fonts/instrument-serif-latin-400-normal.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'BK Serif'; font-style: italic; src: url(fonts/instrument-serif-latin-400-italic.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'BK Classic'; src: url(fonts/marcellus-latin-400-normal.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'BK Sans'; src: url(fonts/jost-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'BK Sans'; src: url(fonts/jost-latin-500-normal.woff2) format('woff2'); font-weight: 500; font-display: swap; }
/* the cover lab's travel-cover faces (Anton, Work Sans; OFL, the engine's own files) */
@font-face { font-family: 'BK Display'; src: url(fonts/anton-latin-400-normal.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'BK Work'; src: url(fonts/work-sans-latin-500-normal.woff2) format('woff2'); font-weight: 500; font-display: swap; }
/* the photo covers' faces (owner, 2026-11-25; OFL, the engine's and the site's own files, each with its licence in fonts/) */
@font-face { font-family: 'BK Sans'; src: url(fonts/jost-latin-300-normal.woff2) format('woff2'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'BK Sans'; src: url(fonts/jost-latin-600-normal.woff2) format('woff2'); font-weight: 600 700; font-display: swap; }
@font-face { font-family: 'BK Spectral'; src: url(fonts/spectral-latin-500-normal.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'BK Bodoni'; src: url(fonts/bodoni-moda-latin-400-normal.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'BK Bodoni'; font-style: italic; src: url(fonts/bodoni-moda-latin-400-italic.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'BK Script'; src: url(fonts/sacramento-latin-400-normal.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'BK Pinyon'; src: url(fonts/pinyon-script-latin-400-normal.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'BK Condensed'; src: url(fonts/barlow-condensed-latin-600-normal.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'BK Condensed'; src: url(fonts/barlow-condensed-latin-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'BK Fraunces'; src: url(fonts/fraunces-latin-300-normal.woff2) format('woff2'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'BK Fraunces'; src: url(fonts/fraunces-latin-600-normal.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'BK Italiana'; src: url(fonts/italiana-latin-400-normal.woff2) format('woff2'); font-display: swap; }
/* Italiana's & is a decorative "Et"; the owner wants a plain one (2026-11-26), so & alone comes from Marcellus (declared later, so it wins) */
@font-face { font-family: 'BK Italiana'; src: url(fonts/marcellus-latin-400-normal.woff2) format('woff2'); font-display: swap; unicode-range: U+0026; }

:root { --amber: #8a5a00; --amber-bg: #fdf1d6; }
/* the lab is not the product page: no poster shares this document, so the body may carry the site's text face */
body.sw-body { color: var(--ink); font: 400 16px/1.5 var(--font); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.15; margin: 0; font-variant-numeric: lining-nums; text-wrap: balance; }
h2 { font-size: 21px; } h3 { font-size: 18px; }
p { margin: 0; }
img { display: block; max-width: 100%; }
button, a, label, [role=button] { touch-action: manipulation; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--muted); }
.num { font-variant-numeric: lining-nums tabular-nums; }
.stack { display: grid; gap: 18px; }
.rowx { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.note, .hint { font-size: 14.5px; line-height: 1.45; color: var(--muted); }
.note.warn { color: var(--ink); background: var(--amber-bg); border-radius: 10px; padding: 10px 12px; }
.err { color: var(--error); font-weight: 600; font-size: 15px; }
.err:empty { display: none; }
.lede { font-size: 17px; color: var(--muted); max-width: 60ch; }
.sw-linkbtn { color: var(--brass); font-weight: 600; text-underline-offset: .18em; padding: 0; min-height: 24px; }
.sw-ghost { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; transition: transform .12s var(--u-ease); }
.sw-ghost:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .sw-ghost:hover { border-color: var(--walnut); } }

/* ---- lab bar: not part of the product ---- */
.lab { background: repeating-linear-gradient(-45deg, #e8ebe0 0 10px, #e3e7da 10px 20px); border-bottom: 1px dashed var(--field-edge); font-size: 14px; }
.lab:empty { display: none; }  /* the shop has no lab controls: no empty striped bar and dashed line above its header */
.lab details > summary { padding: 8px var(--gutter); cursor: pointer; font-weight: 700; min-height: 40px; display: flex; align-items: center; gap: 8px; }
.lab .lab-row { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding: 0 var(--gutter) 10px; }
.lab button { min-height: 32px; padding: 4px 10px; border: 1px solid var(--field-edge); border-radius: var(--radius); background: var(--paper); cursor: pointer; font: inherit; color: var(--ink); }
.lab [aria-pressed="true"] { background: var(--u-sage); border-color: var(--walnut); font-weight: 700; }

/* ---- page frames outside the editor ---- */
html:not([data-route="edit"]) .sw-pinbar { position: static; margin-bottom: 0; }  /* studio.css pins the bar for the editor's grid only */
.bk-page { display: block; }
.bk-wrap { padding-block: 24px 64px; }
.bk-narrow { max-width: 780px; }
.bk-h1 { font: var(--display-style) var(--display-wt) clamp(30px, 3.2vw, 44px)/1.08 var(--font-display); }
.bk-h1-sm { font-size: clamp(26px, 2.4vw, 34px); }
.bk-steps { display: flex; flex-wrap: wrap; gap: 4px 14px; list-style: none; margin: 0; padding: 10px var(--gutter); font-size: 14px; color: var(--muted); border-bottom: 1px solid var(--u-hair); }
.bk-steps [aria-current] { color: var(--ink); font-weight: 700; }
.bk-steps li + li::before { content: '›'; margin-right: 14px; color: var(--field-edge); }
@media (max-width: 560px) { .bk-steps { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; scrollbar-width: none; } }
.bk-card { background: var(--paper); border-radius: 16px; box-shadow: var(--u-card-shadow); padding: 20px; }
.bk-welcome { padding: 10px var(--gutter); background: var(--paper); border-bottom: 1px solid var(--u-hair); font-size: 15px; }

/* a page outside the editor keeps the shop's panel look for its forms (#panel rules in studio.css) */
.bk-page #panel { display: grid; gap: 14px; }
.bk-page #panel > fieldset { display: grid; }

/* ---- product page: the sample book on the canvas, the order column beside it ---- */
.bk-stage { background: var(--wall); border: 1px solid var(--rail-edge); border-radius: 16px; padding: clamp(16px, 4vw, 48px); }
.bk-stack { display: grid; gap: 22px; }
.bk-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-content: start; min-width: 0; }
.bk-side .sw-price b { font: 600 40px/1 var(--font-display); font-variant-numeric: lining-nums; }
/* the order card outside the editor (studio.css pins .sw-buy into the editor's 4th column, so it isn't used here) */
.bk-buy { display: grid; gap: 14px; margin: 0; border-radius: 16px; background: var(--paper); box-shadow: var(--u-card-shadow); padding: 18px; }
.bk-buy .sw-btn { width: 100%; }

/* book type, cover and size tiles: the shop's format tiles with book pictures */
.sw-body #panel [data-f="format"] label[data-bk]::before, .sw-body #panel [data-f="bind"] label::before {
  content: ''; width: 40px; height: 40px; margin: 0; border: 0; background: var(--bk-art) center / contain no-repeat; filter: drop-shadow(0 2px 2px rgb(var(--shadow) / .3)); transform: none; }
.sw-body #panel [data-f="bind"] label { flex-direction: column; justify-content: flex-start; gap: 10px; min-height: 112px; padding: 16px 8px 12px; border-radius: 12px; }
.sw-body #panel [data-f="bind"] label:has(input:checked)::after { content: ''; position: absolute; top: 7px; right: 7px; width: 20px; height: 20px; background: var(--u-tick) center / contain no-repeat; }
[data-bk="photo"], [data-bk="hard"] { --bk-art: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Crect x='4' y='3' width='33' height='34' rx='1.5' fill='%233f5a45'/%3E%3Crect x='4' y='3' width='4' height='34' fill='%23314636'/%3E%3Crect x='13' y='9' width='18' height='14' fill='%23fafbf6'/%3E%3Cpath d='M13 23l6-6 4 4 3-3 5 5z' fill='%23d1d8cf'/%3E%3Crect x='14' y='27' width='16' height='2' fill='%23fafbf6' opacity='.8'/%3E%3C/svg%3E"); }
[data-bk="story"] { --bk-art: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Crect x='4' y='3' width='33' height='34' rx='1.5' fill='%231a2233'/%3E%3Crect x='4' y='3' width='4' height='34' fill='%23121826'/%3E%3Cpath d='M12 26c4-8 8 2 12-6s5-6 7-9' fill='none' stroke='%23efe9dc' stroke-width='1.6' stroke-dasharray='1.5 2.2' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='26' r='1.8' fill='%23efe9dc'/%3E%3Ccircle cx='31' cy='11' r='1.8' fill='%23efe9dc'/%3E%3C/svg%3E"); }
[data-bk="soft"] { --bk-art: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Crect x='5' y='4' width='31' height='32' fill='%23e3e7da' stroke='%233f5a45' stroke-width='1.2'/%3E%3Crect x='12' y='10' width='18' height='13' fill='%23fafbf6' stroke='%233f5a45' stroke-width='.8'/%3E%3Crect x='13' y='27' width='16' height='2' fill='%233f5a45' opacity='.5'/%3E%3C/svg%3E"); }
.sw-body #panel .choice label small { display: block; font-size: 13px; font-weight: 400; color: var(--muted); line-height: 1.3; }
.sw-body #panel .choice label:has(small) { flex-direction: column; gap: 3px; }
.sw-body #panel .bk-opts label { text-align: left; align-items: flex-start; padding: 12px 14px; }
.sw-body #panel .bk-opts label b { font-weight: 700; }
.sw-body #panel .bk-opts label:has(input:checked)::after { content: ''; position: absolute; top: 10px; right: 10px; width: 18px; height: 18px; background: var(--u-tick) center / contain no-repeat; }

/* ---- photos step ---- */
.bk-file { cursor: pointer; }
.status { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.bar { height: 6px; border-radius: 3px; background: var(--u-hair); overflow: hidden; min-width: 120px; flex: 1; max-width: 280px; }
.bar i { display: block; height: 100%; background: var(--walnut); width: 100%; transform: scaleX(0); transform-origin: left; transition: transform .3s linear; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; list-style: none; margin: 0; padding: 0; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--u-hair); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .ring { position: absolute; left: 6px; bottom: 6px; width: 26px; height: 26px; }
.ring circle { stroke-width: 3; }
.ring .t { fill: rgb(250 251 246 / .92); stroke: var(--rail-edge); }
.ring .p { fill: none; stroke: var(--walnut); stroke-linecap: round; transform: rotate(-90deg); transform-origin: center; transition: stroke-dashoffset .3s linear; }
.x { display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: rgb(31 42 34 / .72); color: #fff; font-size: 15px; line-height: 1; cursor: pointer; }
.thumb .x { position: absolute; top: 4px; right: 4px; }
.thumb .date { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 4px 36px; font-size: 11.5px; color: #fff; background: linear-gradient(transparent, rgb(0 0 0 / .55)); text-align: right; }
.thumb button.pick { position: absolute; inset: 0; border: 0; background: none; cursor: pointer; }
.thumbs.chapmode .thumb button.pick { background: rgb(63 90 69 / .08); }
.chap-h { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 12px 0 2px; border-top: 1px solid var(--u-hair); }
.chap-h:first-child { border-top: 0; padding-top: 0; }
.chap-h input { max-width: 260px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--field-edge); border-radius: var(--radius); background: #fff; font: inherit; }
.chap-h .c { font: 500 18px/1.2 var(--font-display); }
.hidden-dupes { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.mini { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; opacity: .6; }
.bk-page :is(input[type=date], .field input[type=text], #occnew) { min-height: 44px; padding: 8px 12px; border: 1px solid var(--field-edge); border-radius: var(--radius); background: #fff; font: inherit; box-sizing: border-box; width: 100%; }

/* ---- questions ---- */
.bk-live { padding: 14px 16px; border-radius: 12px; background: var(--rail); }
.bk-live b { font: 600 32px/1 var(--font-display); font-variant-numeric: lining-nums; }
.placerow { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: end; }
@media (max-width: 560px) { .placerow { grid-template-columns: 1fr 1fr; } .placerow > :first-child { grid-column: 1 / -1; } }
.field { display: grid; gap: 4px; }


.working { display: grid; place-items: center; gap: 14px; min-height: 40vh; text-align: center; }
.dots { display: flex; gap: 6px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--walnut); animation: blink 1s infinite both; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

/* ---- the book viewer: inside the shop's .sw-fit canvas ---- */
.bk-fit { display: block; }
.bk-view { position: relative; height: 100%; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto auto; min-width: 0; }
.bk-proofview .bk-view { grid-template-rows: auto minmax(0, 1fr) auto; }
.viewbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 4px 8px; font-size: 14px; }
.viewbar .pn { font-variant-numeric: lining-nums tabular-nums; color: var(--muted); }
.navbtn { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--u-tile-edge); border-radius: 50%; background: var(--paper); color: var(--ink); cursor: pointer; transition: transform .12s var(--u-ease); }
.navbtn:active { transform: scale(.95); }
.navbtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.spreads { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; min-height: 0; }
.spreads::-webkit-scrollbar { display: none; }
.sp { flex: 0 0 100%; box-sizing: border-box; scroll-snap-align: center; container-type: size; display: grid; place-items: center; padding: 6px 12px; }
.sp > .spread { width: min(100cqw - 8px, (100cqh - 8px) * var(--spr, 2)); }  /* --spr: a spread's width / height, from the book's size */
.strip { display: flex; gap: 6px; overflow-x: auto; padding: 8px 4px 4px; scrollbar-width: thin; }
.strip button { flex: 0 0 auto; width: 76px; padding: 3px; border: 1.5px solid transparent; border-radius: 6px; background: none; cursor: pointer; transition: transform .12s var(--u-ease); }
.strip button:active { transform: scale(.97); }
.strip button[aria-current="true"] { border-color: var(--walnut); }
.strip { user-select: none; }  /* Shift-click picks a range of spreads, not the text between them */
.strip button[data-range] { border-color: var(--walnut); background: color-mix(in srgb, var(--walnut) 14%, transparent); }
.strip span { display: block; font-size: 11.5px; color: var(--muted); text-align: center; margin-top: 2px; }
@media (hover: hover) and (pointer: fine) { .strip button:not([aria-current="true"]):hover { border-color: var(--rail-edge); } .navbtn:hover { border-color: var(--walnut); } }
@media (max-width: 860px) { .strip { display: none; } .navbtn { width: 36px; height: 36px; } }

/* ---- the editor's panel: book controls inside the shop's #panel (its button rule makes every button a tile) ---- */
.sw-body #panel > fieldset { display: grid; }
.sw-body #panel button:not(.tile, .ph, .x, .bubble, .sw-linkbtn) { min-height: 44px; padding: 8px 14px; }
.sw-body #panel button:disabled { opacity: .45; cursor: default; transform: none; }
.sw-body #panel button.sw-linkbtn { background: none; border: 0; padding: 0; min-height: 24px; color: var(--brass); font: 600 15px/1.3 var(--font); text-decoration: underline; text-underline-offset: .18em; }
.sw-body #panel button.ph, .sw-body #panel button.bubble { padding: 0; }
.sw-body #panel button.x { width: 24px; height: 24px; min-height: 0; padding: 0; border: 0; border-radius: 50%; background: rgb(31 42 34 / .72); color: #fff; font-size: 13px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.sw-body #panel button.tile { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 6px; font-size: 13px; text-align: center; }
.sw-body #panel button.tile[aria-pressed="true"] { background: var(--u-sel, #fff); border-color: var(--walnut); box-shadow: inset 0 0 0 1px var(--walnut), var(--u-lift); font-weight: 700; }
.tile .lay { aspect-ratio: 1; background: #fff; border: 1px solid var(--u-hair); position: relative; }
.tile .lay i { position: absolute; background: var(--u-sage); }
@media (max-width: 860px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } .sw-body #panel button.tile { font-size: 12px; } }
.ptray { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; list-style: none; margin: 0; padding: 0; }
.ptray li { position: relative; }
.sw-body #panel .ptray button.ph { display: block; width: 100%; aspect-ratio: 1; border: 0; border-radius: 6px; overflow: hidden; background: var(--u-hair); }
.ptray button.ph img { width: 100%; height: 100%; object-fit: cover; }
.sw-body #panel .ptray button.ph[aria-pressed="true"] { outline: 3px solid var(--walnut); outline-offset: 1px; }
.sw-body #panel .ptray .x { position: absolute; top: 2px; right: 2px; }
.ptray .used { position: absolute; left: 3px; bottom: 3px; padding: 0 5px; border-radius: 4px; background: rgb(250 251 246 / .92); font-size: 11px; font-weight: 700; }
.bubbles { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sw-body #panel button.bubble { width: 40px; height: 40px; min-height: 0; border-radius: 50%; border: 1px solid var(--field-edge); }
.sw-body #panel button.bubble[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--walnut); }
.sw-body #panel button.bubble.as { width: auto; padding: 0 14px; border-radius: 999px; background: var(--paper); font-size: 13px; font-weight: 600; }
.sugrow { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 10px; border: 1px dashed var(--field-edge); border-radius: 10px; font-size: 15px; }
.sugrow q { font-style: italic; color: var(--muted); }
.dock { display: grid; gap: 6px; }
@media (max-width: 860px) {
  .dock.on { position: fixed; left: 0; right: 0; bottom: var(--kb, 0px); z-index: 30; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--rail-edge); box-shadow: 0 -8px 20px -12px rgb(var(--shadow) / .5); }
}
.stepper { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sw-body #panel .stepper button { width: 44px; padding: 0; font-size: 20px; }
.stepper b { font: 600 26px/1 var(--font-display); font-variant-numeric: lining-nums; min-width: 2.5ch; text-align: center; }

/* the order column's notes (studio.css styles .u-sum and the card) */
.saved { display: flex; align-items: center; gap: 8px; }
.saved i { width: 8px; height: 8px; border-radius: 50%; background: var(--walnut); }
.saved[data-s="saving"] i { background: var(--field-edge); }
li:has(> #linkmsg:empty) { display: none; }

/* ---- the order column slides away after Format (owner 2026-11-14); a tab on the right edge brings it back ---- */
.bk-sumtab { display: none; }
.bk-hide { display: none; }
.bk-sumtab[hidden] { display: none !important; }
@media (min-width: 1200px) {
  .sw-product.bk { transition: grid-template-columns .22s var(--u-ease); overflow-x: clip; }
  .sw-product.bk .sw-config > :is(h1, .sw-price, .sw-buy) { transition: opacity .16s ease, visibility .16s; }
  html[data-sum="closed"] .sw-product.bk { grid-template-columns: 96px 392px minmax(0, 1fr) 0px; }
  html[data-sum="closed"] .sw-product.bk .sw-config > :is(h1, .sw-price, .sw-buy) { opacity: 0; visibility: hidden; }
  .bk-sumtab { position: fixed; right: 0; top: 50%; z-index: 9; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 44px; min-height: 140px; padding: 14px 8px;
    transform: translateY(-50%); border: 1px solid var(--rail-edge); border-right: 0; border-radius: 12px 0 0 12px; background: var(--paper); color: var(--ink); box-shadow: var(--u-lift);
    font: 600 14px/1 var(--font); cursor: pointer; }
  .bk-sumtab span { writing-mode: vertical-rl; transform: rotate(180deg); }
  .bk-sumtab svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .22s var(--u-ease); }
  html[data-sum="closed"] .sw-product.bk .sw-preview { padding-right: 64px; }
  .bk-hide { display: inline; justify-self: end; margin: -4px 0 -6px; font-size: 14px; }
  .bk-hide::after { content: ' ›'; }
  .bk-sumtab:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
  @media (hover: hover) and (pointer: fine) { .bk-sumtab:hover { background: #fff; } }
}

/* ---- proof ---- */
.bk-proof { display: grid; gap: 24px; padding: 24px var(--gutter) 64px; max-width: 1440px; margin: 0 auto; }
@media (min-width: 1100px) { .bk-proof { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; } .bk-proof .bk-side { position: sticky; top: 16px; } }
.bk-proofview { display: grid; gap: 10px; }
.bk-proofview .sw-fit { height: min(58svh, 540px, calc(45vw + 70px)); min-height: 0; }
.bk-buy .sw-buy-notes a { color: var(--brass); font-weight: 600; text-underline-offset: .18em; }
.bk-intro .bk-xmas { margin: 12px 0 0; font-size: 15px; }
.bk-intro .bk-xmas a { color: var(--brass); font-weight: 600; text-underline-offset: .18em; }
.bk-warns { display: grid; gap: 8px; }
.bk-warns-h { font: 600 18px/1.2 var(--font-display); }
.warns { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.warns li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px; border-radius: 10px; background: var(--u-tile); font-size: 14.5px; }
.warns li::before { content: ''; width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--field-edge); }
.warns li.red::before { background: var(--error); }
.warns li.amber::before { background: #c58a12; }
.warns details summary { cursor: pointer; }

/* ---- basket ---- */
.line { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; align-items: start; }
.bk-total { display: flex; align-items: baseline; justify-content: space-between; }
.bk-total b { font: 600 30px/1 var(--font-display); font-variant-numeric: lining-nums; }

/* ======== the book itself (its own faces and colours; set per Style on .bk) ======== */
.bk { --pp: #f6f2ea; --pi: #2b2620; --pa: #8a6f4e; --cloth: #d9cdb8; --cloth-ink: #2b2620; --face: 'BK Serif'; --body: 'BK Sans'; --capface: 'BK Serif'; --capstyle: italic; }
.spread { display: flex; filter: drop-shadow(0 10px 18px rgb(var(--shadow) / .35)); }
.spread > .pg + .pg { box-shadow: inset 10px 0 14px -12px rgb(0 0 0 / .35); }
.spread > .pg:first-child:not(:only-child) { box-shadow: inset -10px 0 14px -12px rgb(0 0 0 / .35); }
.pg { position: relative; flex: 1 1 0; aspect-ratio: var(--pgr, 1); background: var(--pp); color: var(--pi); overflow: hidden; container-type: inline-size; font-family: var(--body); }
.pg.blank { background: color-mix(in srgb, var(--pp) 92%, #000); }
.pg.blank::after { content: 'Endpaper'; position: absolute; inset: auto 0 6% 0; text-align: center; font: 500 3cqw var(--font); color: rgb(0 0 0 / .35); }
.pg[data-cur] { outline: 3px solid var(--walnut); outline-offset: -3px; z-index: 1; }
.pg[role=button]:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.slot { position: absolute; padding: 0; border: 0; background: color-mix(in srgb, var(--pi) 8%, var(--pp)); overflow: hidden; display: block; }
button.slot { cursor: pointer; }
.slot:has(> .clip) { background: none; }  /* a mask clips the photo; nothing shows round it */
.slot img { width: 100%; height: 100%; object-fit: cover; -webkit-touch-callout: none; user-select: none; }
.slot.empty { border: 1.5px dashed color-mix(in srgb, var(--pi) 40%, transparent); display: grid; place-items: center; font: 600 3.4cqw var(--font); color: color-mix(in srgb, var(--pi) 70%, transparent); }
button.slot.empty { background: #6f746c; border: 0; color: #fff; }
.slot[data-sel] { outline: 3px solid var(--walnut); outline-offset: -3px; }
.selecting button.slot::after { content: ''; position: absolute; inset: 0; background: rgb(63 90 69 / .14); box-shadow: inset 0 0 0 2px var(--walnut); }
.ppi { position: absolute; left: 3%; top: 3%; display: inline-flex; align-items: center; gap: .8cqw; padding: .6cqw 1.6cqw; border-radius: 99px; font: 700 max(10.5px, 2.6cqw)/1.2 var(--font); }
.ppi.amber { background: var(--amber-bg); color: var(--amber); }
.ppi.red { background: #fbe1df; color: var(--error); }
@container (max-width: 160px) { .ppi { width: 9px; height: 9px; padding: 0; font-size: 0; } .ppi.amber { background: #c58a12; } .ppi.red { background: var(--error); } }
.cap { position: absolute; padding: 0 .4cqw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spread .hint, #panel .spread .hint { font-size: inherit;  /* #panel: the cover tiles sit in the panel, whose 14px .hint (studio.css) would win */ line-height: inherit; color: inherit; opacity: .42; }
.spread .hint.sample { opacity: 1; }  /* the several-countries sample, as on its card, until the customer types */
.spread .hint.sugg { opacity: .55; text-decoration: underline dotted; text-underline-offset: .2em; }
.words { position: absolute; inset: 14%; display: grid; place-content: center; text-align: center; gap: 3cqw; }
.words .t { font: 400 7cqw/1.1 var(--face); }
.words .s { font: 400 3.6cqw/1.45 var(--body); }
/* a words page's text boxes (owner, 2026-11-22): the words wrap inside the box, centred down it, with the customer's own line breaks */
.wbox { position: absolute; display: grid; align-content: center; white-space: pre-wrap; overflow-wrap: anywhere; overflow: hidden; }
.wbox[data-act] { cursor: pointer; }
.wbox[data-sel] { overflow: visible; cursor: move; touch-action: none; }
.story-svg { position: absolute; inset: 9% 9% 20%; width: 82%; height: 71%; }
.story-t { position: absolute; left: 0; right: 0; bottom: 7%; text-align: center; }
.story-t .t { font: 400 5.4cqw/1.1 var(--face); }
.story-t .s { font: 400 3cqw/1.3 var(--body); letter-spacing: .02em; margin-top: 1cqw; }
.cov { display: flex; aspect-ratio: auto; }
.cov > .pg { background: var(--cloth); color: var(--cloth-ink); }
.cov .sp-ine { position: relative; background: color-mix(in srgb, var(--cloth) 86%, #000); container-type: size; }
.cov .sp-ine > span { position: absolute; left: 50%; transform: translateX(-50%); writing-mode: vertical-rl; white-space: nowrap; color: var(--cloth-ink); }  /* vertical-rl turns Latin a quarter clockwise: reads top to bottom, as spines do */
.cov .sp-ine .sp-top { top: calc(var(--blh) * 4); }  /* ponytail: 12 mm in from each end (3 mm bleed + 9 mm clear of the board edge); measure against a Gelato proof */
.cov .sp-ine .sp-mid { top: 50%; transform: translate(-50%, -50%); }
.cov .sp-ine .sp-bot { bottom: calc(var(--blh) * 4); }
.cov-title { position: absolute; left: 8%; right: 8%; text-align: center; }
.cov-title .t { font: 400 8.5cqw/1.05 var(--face); }
.cov-title .s { font: 400 3.4cqw/1.3 var(--body); letter-spacing: .06em; margin-top: 1.6cqw; }
.cov-wrap .cov-title { bottom: 0; left: 0; right: 0; padding: 5% 8% 7%; background: var(--pp); color: var(--pi); }
.cov-wrap .slot { inset: 0 0 26% 0; }
.cov-window .slot { left: 18%; top: 14%; width: 64%; height: 52%; }
.cov-window .cov-title { top: 72%; }
.cov-back .slot { left: 18%; top: 14%; width: 64%; height: 52%; }
.cov-back .back-t { top: 72%; }
.cov-back.no-ph .back-t { top: 45%; }
.cov-back .back-t .t { font: 400 4.5cqw/1.3 var(--body); }
.cov-band .slot { inset: 0 0 38% 0; }
.cov-band .cov-title { top: 68%; }
.cov-type .cov-title { top: 34%; }
.cov-type .cov-title .t { font-size: 11cqw; }

/* ---- template covers (placeholders: generic shapes, labelled with what the real icon will be) ---- */
.cov-art { position: absolute; left: 16%; top: 10%; width: 68%; height: 56%; color: var(--cloth-ink); }
.cov-art > svg { width: 100%; height: 100%; display: block; }
.cov-art .story-svg { inset: 0; width: 100%; height: 100%; }
.ph-label { position: absolute; left: 50%; bottom: -2%; transform: translateX(-50%); white-space: nowrap; padding: .4cqw 1.4cqw; border-radius: 99px; background: rgb(250 251 246 / .92); color: #4d5a50; font: 600 max(8px, 2.4cqw)/1.3 var(--font); }
@container (max-width: 120px) { .ph-label { display: none; } }
:is(.cov-outline, .cov-animal, .cov-landmark, .cov-home, .cov-route, .cov-met, .cov-sky, .cov-homes, .cov-year) .cov-title { top: 72%; }
.cov-sky .cov-art, .cov-year .cov-art { left: 20%; width: 60%; height: 54%; }
.cov-names { position: absolute; inset: auto 0 2% 0; display: flex; justify-content: space-between; padding: 0 6%; font: 400 3.4cqw/1.2 var(--body); }
.cov-little .cov-art, .cov-art.cov-little { display: grid; place-content: end center; gap: 1.4cqw; text-align: center; font: 400 3.6cqw/1.3 var(--body); letter-spacing: .04em; }
.cov-little .cov-title { top: 26%; }
.cov-little .cov-title .t { font-size: 13cqw; }
/* photo covers (lab.js PC_T): everything placed by inline style in page %, type in cqw; the words never take a tap meant for the photo */
.cov-pc > :is(.pc-t, .pc-fill, .pc-i, .pc-ring, .pc-num) { position: absolute; pointer-events: none; }
.cov-pc .pc-t { white-space: nowrap; line-height: 1; }
.cov-pc .pc-t .hint.sample { color: inherit; font: inherit; }
.cov-pc .pc-fill { inset: 0; }
.cov-pc .pc-i { overflow: visible; }
.cov-pc .pc-num { display: grid; place-items: center; background-size: cover; background-position: center; -webkit-background-clip: text; background-clip: text; }
.cov-pc .pc-deco { position: absolute; inset: 0; pointer-events: none; }
.cov-pc .pc-deco > * { position: absolute; }
/* Move on the cover (lab.js coverMove): every word and the photo take the drag */
.pg [data-cmv] { pointer-events: auto; cursor: move; touch-action: none; outline: 1.5px dashed color-mix(in srgb, var(--walnut) 80%, transparent); outline-offset: .4cqw; }
.cov-pc .slot.pc-ghost { background: none; }
.cov-pc .slot.pc-ghost img { opacity: 0; }
.yeargrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2%; width: 100%; height: 100%; }
.yeargrid > div { position: relative; overflow: hidden; background: color-mix(in srgb, currentColor 10%, transparent); }
.yeargrid img { width: 100%; height: 100%; object-fit: cover; }
.yeargrid span { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font: 500 2.2cqw/1.4 var(--body); background: rgb(250 251 246 / .85); color: #2b2620; }
.yearpage { position: absolute; inset: 10% 10% 22%; }

/* the cover lab's Layout B (labs/cover-lab/make_cover.py), in fractions of the cover's width: panel 7–93 % across, 18–80 % down;
   the icon is prep_covers.py's layer of the Books tab's own cover (with its thin outline), placed where make_cover.py put it.
   --m: one share of the short side, in cqw, so portrait and landscape keep make_cover.py's equal margins */
.cov-b { --u: calc(var(--m, 1) * 1cqw); }
.cov-b .b-panel { position: absolute; left: calc(7 * var(--u)); right: calc(7 * var(--u)); top: calc(18 * var(--u)); bottom: calc(20 * var(--u)); border-radius: calc(3 * var(--u)); }
.cov-b .b-icon { position: absolute; left: var(--il); top: var(--it); width: var(--iw); height: var(--ih); max-width: none; object-fit: fill; }
/* the title's capitals are centred between the panel (20u up) and the book's bottom edge (owner, 2026-11-24); one size for every title
   (Netherlands', set in lab.js), smaller only when it won't fit. At line-height .9, Anton's cap middle sits .456 × font size above this row's bottom */
.cov-b .b-title { position: absolute; left: calc(7 * var(--u)); right: calc(7 * var(--u)); bottom: calc(10 * var(--u) - .456 * var(--fs, 11.27cqw)); display: flex; justify-content: space-between; align-items: baseline; gap: calc(3 * var(--u)); line-height: .9; }
.cov-b .b-title .t { font: 400 var(--fs, 11.27cqw)/.9 'BK Display'; text-transform: uppercase; white-space: nowrap; }
.cov-b .b-title .y { font: 500 calc(4.2 * var(--u))/0 'BK Work';  /* line-height 0: the date adds nothing below the baseline, so the title alone sets the row */ white-space: nowrap; font-variant-numeric: lining-nums; }

/* ---- the hub: choose a theme, then a cover ---- */
.bk-hub { padding-bottom: 48px; }
.bk-sec { display: grid; gap: 16px; max-width: 1440px; margin: 0 auto; padding: 28px var(--gutter) 8px; scroll-margin-top: 16px; }
.bk-sec:focus { outline: none; }
.bk-country { max-width: 340px; }
.bk-country select, #panel select { min-height: 44px; padding: 8px 10px; border: 1px solid var(--field-edge); border-radius: var(--radius); background: var(--paper); color: var(--ink); font: 400 16px var(--font); }
.bk-specs { max-width: 640px; }
.bk-hub .sw-faq { gap: 0; }
.bk-hub .sw-faq h2 { margin-bottom: 12px; }

/* editor: Designed pages switches, colourway swatches */
.tile .lay.sw-swatch { display: grid; place-items: center; font-size: 22px; line-height: 1; }
.sw-swatch i { position: absolute; left: 0; right: 0; bottom: 8%; display: flex; justify-content: center; gap: 3px; background: none; }
.sw-swatch i b { width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 0 1px rgb(0 0 0 / .15); }

/* dialog */
dialog.bk-dlg { border: 0; max-width: min(440px, calc(100vw - 32px)); opacity: 1; transform: none; transition: opacity .2s var(--u-ease), transform .2s var(--u-ease); }
@starting-style { dialog.bk-dlg[open] { opacity: 0; transform: scale(.97); } }
dialog::backdrop { background: rgb(31 42 34 / .35); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ======== round 3 (owner 2026-11-14): a hub like Sport/Moments, and photo tools ======== */
/* the hub: the shop's gallery cards, with a book cover where the shop hangs a framed print */
.bk-hub { padding-bottom: 48px; }
.bk-hub .sw-section { padding-top: 28px; }
.sw-gallery.bk-gallery .tcov { display: flex; flex-direction: column; justify-content: center; aspect-ratio: 1; padding: 12%;  /* outranks site.css's bottom-aligned 3:4 poster tile: a book is square, centred */ border-radius: 6px; background: var(--rail); }
.bk-gallery .tcov .cov { width: 100%; transition: transform .25s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .bk-gallery .tcov:hover .cov { transform: translateY(-3px); } }
.bk-gallery .tcov:active .cov { transform: scale(.99); }
.bk-gallery .sw-card-look { background: var(--rail); overflow: hidden; }
.bk-gallery .sw-card-look img { object-fit: contain; }  /* the bubble's background is its own book's colour (lab.js hubCard) */
.bk-gallery .sw-card-looks { justify-content: center; gap: 14px; }
@media (min-width: 1000px) { .sw-gallery.bk-five { grid-template-columns: repeat(5, minmax(0, 1fr)); } }  /* Travel and Couples alike: 5 across (owner, 2026-11-25) */

/* the editor's top bar: Undo, Redo, History, Project */
.bk-topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 0 4px 6px; }
.bk-topbar > button, .bk-menu > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 10px; border: 1px solid transparent; border-radius: 8px; background: none; color: var(--ink); font: 600 14px var(--font); cursor: pointer; list-style: none; }
.bk-menu > summary::-webkit-details-marker { display: none; }
.bk-topbar svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bk-topbar > button:disabled { opacity: .45; cursor: default; }
.bk-topbar > button:active:not(:disabled), .bk-menu > summary:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .bk-topbar > button:not(:disabled):hover, .bk-menu > summary:hover { border-color: var(--u-tile-edge); background: var(--paper); } }
.bk-menu { position: relative; }
.bk-menu[open] > summary { border-color: var(--walnut); background: var(--paper); }
.bk-menu-list { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; display: grid; min-width: 220px; padding: 6px; border-radius: 10px; background: var(--paper); box-shadow: 0 1px 2px rgb(var(--shadow) / .2), 0 14px 30px -12px rgb(var(--shadow) / .5); }
.bk-menu-list > * { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 10px; border: 0; border-radius: 6px; background: none; color: var(--ink); font: 500 15px var(--font); text-align: left; text-decoration: none; cursor: pointer; }
.bk-menu-list input { width: 18px; height: 18px; accent-color: var(--walnut); }
@media (hover: hover) and (pointer: fine) { .bk-menu-list > *:hover { background: var(--u-tile, #eef0e8); } }
@media (max-width: 860px) { .bk-topbar span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } .bk-topbar > button, .bk-menu > summary { min-width: 44px; min-height: 44px; justify-content: center; } .bk-menu > summary span { position: static; width: auto; height: auto; clip-path: none; } .bk-menu-list { left: auto; right: 0; } }

/* History */
.bk-hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: min(60vh, 420px); overflow-y: auto; }
.bk-hist button { display: flex; justify-content: space-between; gap: 12px; width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--u-tile-edge, #d9ddd0); border-radius: 8px; background: var(--paper); color: var(--ink); font: 500 15px var(--font); text-align: left; cursor: pointer; }
.bk-hist small { color: var(--muted); font-size: 13px; white-space: nowrap; }
.bk-hist li.now button { border-color: var(--walnut); box-shadow: inset 0 0 0 1px var(--walnut); font-weight: 700; cursor: default; opacity: 1; }
.bk-hist li.undone button { background: none; border-style: dashed; color: var(--muted); }
kbd { font: 600 13px var(--font); padding: 2px 6px; border-radius: 4px; background: var(--u-tile, #eef0e8); border: 1px solid var(--u-tile-edge, #d9ddd0); }

/* bleeds: Gelato's template look, grey diagonal stripes on the edges that may be trimmed and a dark dashed trim line (edit only; never in the proof or the print).
   The stripes are a background masked to the padding ring, so they stay diagonal (border-image stretched them into combs). Stripes: about 10 mm every 20 mm, as the template (7% of a page). */
.bleeds .pg[data-pid]::before, .bleeds .cov > .pg::before, .bleeds .cov .sp-ine::before { content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none; padding: var(--bl);
  background: repeating-linear-gradient(45deg, rgb(183 179 179 / .85) 0 3.5cqw, transparent 3.5cqw 7cqw);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.bleeds .pg[data-pid]::after, .bleeds .cov > .pg::after { content: ''; position: absolute; inset: var(--bl); z-index: 3; pointer-events: none; border: 1px dashed rgb(67 64 66 / .75); }
.bleeds .pg.L::before, .bleeds .cov > .pg:first-child::before { padding-right: 0; }
.bleeds .pg.R::before, .bleeds .cov > .pg:last-child::before { padding-left: 0; }
.bleeds .pg.L::after, .bleeds .cov > .pg:first-child::after { right: 0; border-right: 0; }
.bleeds .pg.R::after, .bleeds .cov > .pg:last-child::after { left: 0; border-left: 0; }
/* a hardcover's 8 mm hinge (--jt) either side of the spine, where the cover folds (Gelato /cover-dimensions, 2026-11-19) */
.bleeds .cov.hard > .pg:first-child::before { padding-right: var(--jt); }
.bleeds .cov.hard > .pg:last-child::before { padding-left: var(--jt); }
.bleeds .cov.hard > .pg:first-child::after { right: var(--jt); border-right: 1px dashed rgb(67 64 66 / .75); }
.bleeds .cov.hard > .pg:last-child::after { left: var(--jt); border-left: 1px dashed rgb(67 64 66 / .75); }
.bleeds .cov .sp-ine::before { padding: var(--blh) 0; background: repeating-linear-gradient(45deg, rgb(183 179 179 / .85) 0 3.5cqh, transparent 3.5cqh 7cqh); }  /* 3 mm of the spine's height; cqh because the spine is as tall as a page */
.bleedhint i { display: inline-block; width: 14px; height: 10px; margin-right: 6px; vertical-align: -1px; border: 1px dashed rgb(67 64 66 / .75); background: repeating-linear-gradient(45deg, rgb(183 179 179) 0 3px, transparent 3px 6px); }

/* a frame: the photo sits in a clipped span (the mask), with its frame drawn over it */
.slot .clip { position: absolute; inset: 0; overflow: hidden; display: block; }
.slot .clip img { display: block; }
.fr { position: absolute; inset: 0; pointer-events: none; box-sizing: border-box; }
svg.fr { width: 100%; height: 100%; overflow: visible; }
.fr.brush { filter: url(#bk-brush); }
.fr.corners, .tile .lay i.fr.corners { background:
  linear-gradient(135deg, var(--fc) 50%, transparent 50%) left top / var(--fw) var(--fw) no-repeat,
  linear-gradient(225deg, var(--fc) 50%, transparent 50%) right top / var(--fw) var(--fw) no-repeat,
  linear-gradient(45deg, var(--fc) 50%, transparent 50%) left bottom / var(--fw) var(--fw) no-repeat,
  linear-gradient(315deg, var(--fc) 50%, transparent 50%) right bottom / var(--fw) var(--fw) no-repeat; }
.slot[data-id] { touch-action: pan-x pan-y; }
.slot .drop { display: grid; justify-items: center; gap: 1cqw; pointer-events: none; }
.slot .drop svg { width: 7cqw; height: 7cqw; fill: none; stroke: currentColor; stroke-width: 1.6; }
.slot .coarse { display: none; }
@media (pointer: coarse) { .slot .fine { display: none; } .slot .coarse { display: inline; } }
@container (max-width: 160px) { .slot .drop span { display: none; } }
.slot[data-sel] { outline: 3px solid var(--walnut); outline-offset: -3px; }  /* not lifted: frames can overlap now, and their order is the customer's (Bring forward, Send back) */
.slot.droptarget { outline: 3px dashed var(--walnut); outline-offset: -3px; z-index: 2; }
.ptray.droptarget, [data-sec="photos"].droptarget { outline: 2px dashed var(--walnut); outline-offset: 4px; border-radius: 8px; }
.bk-ghost { position: fixed; left: -28px; top: -28px; z-index: 100; width: 56px; height: 56px; border-radius: 8px; overflow: hidden; pointer-events: none; box-shadow: 0 0 0 2px var(--paper), 0 10px 24px -6px rgb(0 0 0 / .45); }
.bk-ghost img { width: 100%; height: 100%; object-fit: cover; }
html.dragging, html.dragging * { cursor: grabbing !important; user-select: none; }

/* captions */
.cap.on { padding: 1.2cqw 1.4cqw .9cqw; color: #fff; text-shadow: 0 .15cqw .5cqw rgb(0 0 0 / .55); }  /* no box behind words on a photo (owner, 2026-11-19): a soft shadow keeps white words readable */
.cap.on.dark { text-shadow: none; }
.cap.moving { outline: 2px dashed var(--walnut); outline-offset: 2px; cursor: move; touch-action: none; overflow: visible; }
.capblock { display: grid; gap: 6px; padding-bottom: 10px; border-bottom: 1px solid var(--u-hair, #e3e7da); }
.capblock:last-child { border-bottom: 0; }
.capstyle > summary, .laygroup > summary, .libitem > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 6px 2px; cursor: pointer; font-weight: 600; list-style: none; }
.capstyle > summary::-webkit-details-marker, .laygroup > summary::-webkit-details-marker, .libitem > summary::-webkit-details-marker { display: none; }
:is(.capstyle, .laygroup, .libitem) > summary::after { content: ''; flex: none; width: 8px; height: 8px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-2px); transition: transform .2s var(--u-ease); }
:is(.capstyle, .laygroup, .libitem)[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.capstyle > summary { font-weight: 500; color: var(--brass); }
/* the groups inside Caption style and place sit apart; each group's own heading spacing is studio.css's fieldset.fold */
.sw-body #panel .capstyle > summary + * { margin-top: 6px; }
.sw-body #panel .capstyle > :not(summary) + * { margin-top: 26px; }  /* groups sit further apart than a title sits from its own chips */
.capstyle[open] { padding-bottom: 8px; }
.chips .rowx { gap: 6px; }
.sw-body #panel .chips button { min-height: 36px; padding: 4px 12px; border-radius: 99px; font-size: 14px; }
.sw-body #panel .chips button[aria-pressed="true"], .sw-body #panel .fxpre button[aria-pressed="true"] { border-color: var(--walnut); box-shadow: inset 0 0 0 1px var(--walnut); background: var(--u-sel, #fff); font-weight: 700; }
.laygroups { display: grid; }
.laygroup { border-bottom: 1px solid var(--u-hair, #e3e7da); }
.laygroup .tiles { padding-bottom: 10px; }
.libitem { border-bottom: 1px solid var(--u-hair, #e3e7da); }
.libitem > summary { align-items: start; }
.libitem > summary b { display: block; font-weight: 600; }
.libitem > summary small { display: block; font-weight: 400; color: var(--muted); font-size: 14px; }
/* a <details> ignores its own grid gap (Chromium wraps the body in a slot box), so a body of groups is one div: groups sit --u-gap-group apart */
.dbody { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--u-gap-group); }
.libitem[open] { padding-bottom: var(--u-gap-head); }
/* the other drop-downs hold plain controls: they take margins from the scale, as the shop's open sections do */
.sw-body #panel :is(.cvpart, .cvchange, .laygroup)[open] > :not(summary) + * { margin-top: var(--u-gap); }
#panel select { width: 100%; }

/* Front cover tiles and Frames and masks previews */
.tile.cvtile .lay { display: grid; place-items: center; padding: 8%; background: var(--rail); }
.tile.cvtile .lay .cov { width: 100%; filter: none; }
.tile .lay.fprev { container-type: inline-size; background: color-mix(in srgb, #8fa596 45%, #fff); }
.tile .lay.fprev i.fr { position: absolute; inset: 14%; background-color: transparent; }
.tile .lay.fprev svg.fr { position: absolute; inset: 14%; width: 72%; height: 72%; }
.tile .lay.mprev i { inset: 14%; background: #8fa596; }

/* the photo toolbar: floats under the chosen photo on a desktop, docks under the spread on a phone */
.fxbar { position: absolute; z-index: 15; display: grid; gap: 6px; padding: 4px; border-radius: 10px; background: var(--paper); box-shadow: 0 1px 2px rgb(var(--shadow) / .25), 0 16px 34px -14px rgb(var(--shadow) / .6); max-width: calc(100% - 8px); }
.fxbar[hidden] { display: none; }
@media (min-width: 861px) { .fxbar .fxdone { display: none; } }
@media (max-width: 860px) { .fxbar .fxdone { position: sticky; right: 0; z-index: 1; margin-left: auto; background: var(--paper); } }  /* stays in view while the row scrolls */  /* a phone's only way out it can see; elsewhere click off or Esc */
/* what can be chosen shows an outline under the mouse; the chosen one keeps its own */
@media (hover: hover) and (pointer: fine) { :is(button.slot, button.stk, .cap[data-act], .wbox[data-act]):not([data-sel]):hover { outline: 1.5px solid color-mix(in srgb, var(--walnut) 70%, transparent); outline-offset: -1.5px; } }
.fxrow { display: flex; flex-wrap: wrap; align-items: center; gap: 1px; }
.fxbar > .fxrow:first-child { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
.fxbar button { display: inline-grid; place-items: center; min-width: 34px; height: 36px; padding: 0 5px; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--ink); font: 600 16px var(--font); cursor: pointer; }
.fxbar button.txt { font-size: 14px; padding: 0 10px; border-color: var(--u-tile-edge, #d9ddd0); }
.fxbar button:disabled { opacity: .4; cursor: default; }
.fxbar button[aria-pressed="true"], .fxbar button[aria-expanded="true"] { border-color: var(--walnut); background: var(--u-sel, #fff); }
.fxbar button:active:not(:disabled) { transform: scale(.95); }
@media (hover: hover) and (pointer: fine) { .fxbar button:not(:disabled):hover { border-color: var(--u-tile-edge, #d9ddd0); } }
.fxbar svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.fxbar .alpha { display: inline-flex; align-items: center; gap: 0; padding: 0 4px; margin: 0 4px; border-left: 1px solid var(--u-hair, #e3e7da); border-right: 1px solid var(--u-hair, #e3e7da); }
.fxbar .alpha b { min-width: 42px; text-align: center; font-size: 14px; }
.fxbar .hint { margin-left: 6px; font-size: 13.5px; }
.fxpop { display: grid; gap: 6px; padding: 8px 4px 2px; border-top: 1px solid var(--u-hair, #e3e7da); }
.fxslide { display: grid; grid-template-columns: 90px minmax(0, 1fr) 46px 36px; align-items: center; gap: 8px; font-size: 14px; }
.fxslide input { accent-color: var(--walnut); }
.fxslide b { text-align: right; font-size: 13.5px; }
.fxpre { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 2px; scrollbar-width: thin; }
.fxbar .fxpre button { display: grid; gap: 3px; width: 70px; height: auto; padding: 3px; border-color: var(--u-hair, #e3e7da); font-size: 12px; font-weight: 500; }
.fxpre img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; }
@media (max-width: 860px) {
  .fxbar { left: 4px !important; right: 4px; top: auto !important; bottom: 4px; max-width: none; max-height: 70%; overflow-y: auto; }
  .fxbar > .fxrow:first-child { overflow-x: auto; scrollbar-width: none; }
  .fxbar button { min-width: 44px; height: 44px; }
  .fxslide { grid-template-columns: 80px minmax(0, 1fr) 42px 44px; }
}

/* the strip, with Add pages, Duplicate and Remove on its right; spreads drag to a new place */
.stripbar { display: flex; align-items: stretch; gap: 8px; }
.stripbar .strip { flex: 1 1 0; width: 0; min-width: 0; align-items: center; }  /* width 0: the thumbnails never widen the preview */
.strip button.droptarget { border-color: var(--walnut); border-style: dashed; }
.striptools { flex: none; display: grid; align-content: center; gap: 4px; padding-left: 8px; border-left: 1px solid var(--u-hair, #e3e7da); }
.striptools button { display: flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 10px; border: 1px solid var(--u-tile-edge, #d9ddd0); border-radius: 6px; background: var(--paper); color: var(--ink); font: 600 13.5px var(--font); cursor: pointer; white-space: nowrap; }
.striptools button:disabled { opacity: .45; cursor: default; }
.stripwhy { max-width: 15em; margin: 0; font: 400 12px/1.35 var(--font); color: var(--muted); }
.stripwhy:empty { display: none; }
.striptools svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) and (pointer: fine) { .striptools button:not(:disabled):hover { border-color: var(--walnut); } }
@media (max-width: 860px) { .stripbar { display: none; } }
.bk-ghost.sp-ghost { width: 76px; height: auto; left: -38px; overflow: visible; border-radius: 0; background: none; box-shadow: none; }
.bk-ghost.sp-ghost .gin { transform-origin: 50% 50%; border-radius: 4px; background: var(--paper); box-shadow: 0 0 0 2px var(--paper), 0 14px 28px -8px rgb(0 0 0 / .5); }
/* the strip while a spread is dragged (owner 2026-11-16, item 8): the gap with a bold dotted line, faint dotted lines where it can go */
.strip.sorting button[data-move] { position: relative; }
.strip.sorting button[data-move]:not(.sp-gap)::before { content: ''; position: absolute; left: -4.5px; top: 8%; bottom: 8%; border-left: 1.5px dotted var(--rail-edge); }
.strip button.sp-gap { border-color: transparent; }
.strip button.sp-gap > * { visibility: hidden; }
.strip button.sp-gap::after { content: ''; position: absolute; left: calc(50% - 1.5px); top: 4%; bottom: 4%; border-left: 3px dotted var(--walnut); }
.bk-ghost .lay { display: block; width: 100%; aspect-ratio: var(--pgr, 1); }
/* the Add pages dialog */
.addn { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 10px; }
.addn input { accent-color: var(--walnut); }
.addn output { grid-column: 2; text-align: center; font: 600 22px var(--font-display); font-variant-numeric: lining-nums; }
.bk-dlg .addat { border: 0; padding: 0; margin: 0; }
.bk-dlg .addbtns { justify-content: space-between; }
.addsum { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-block: 1px solid var(--u-hair, #e3e7da); font-variant-numeric: lining-nums; }

#panel .field :is(input, textarea, select) { box-sizing: border-box; max-width: 100%; }
/* nine tabs on a phone: the rail scrolls sideways rather than squeezing them (the chosen tab is scrolled into view) */
@media (max-width: 860px) { .sw-body .u-rail ul { grid-template-columns: repeat(var(--u-tabs, 5), minmax(76px, 1fr)); overflow-x: auto; scrollbar-width: none; } .sw-body .u-rail ul::-webkit-scrollbar { display: none; } }
.fxbar .fxrow > * { flex: none; }
/* visible words drawn by CSS, so a frame's name stays its aria-label (label-content-name-mismatch) */
.ppi::after { content: attr(data-t); } .slot .fine::after { content: "Drag here"; } .slot .coarse::after { content: "Tap to add"; }
@container (max-width: 160px) { .cov-names { display: none; } }

/* Couple covers: the engine's art (labs/cover-lab/couples_viewer.py /art) in three layouts, the book's lettering on top (owner, 2026-11-15) */
.cov-eng .eng-box { position: absolute; overflow: hidden; }
.cov-eng .eng-art { display: block; width: 100%; height: 100%; }
.cov-eng .eng-art.fit-cover { object-fit: cover; }
.cov-eng .eng-art.fit-contain { object-fit: contain; }
.lay-full .eng-box { inset: 0; }
.lay-full .cov-title { left: 50%; right: auto; bottom: 7%; transform: translateX(-50%); padding: 3cqw 6cqw 2.6cqw; white-space: nowrap; background: var(--cloth); color: var(--cloth-ink); }
.lay-band .eng-box { left: 0; top: 0; width: 100%; height: 72%; }
.lay-band .eng-art.fit-contain { box-sizing: border-box; padding-inline: 6cqw; }  /* a fitted world in a band keeps clear of the cover's sides (owner, 2026-11-21) */
.lay-band .cov-title { top: 77%; }
.lay-window .eng-box { left: 14%; top: 8%; width: 72%; height: 72%; }
.lay-window .cov-title { top: 83%; }
.lay-window .cov-title .t { font-size: 7cqw; }
.lay-window .cov-title .s { margin-top: 1cqw; }
/* a colour as a round picture of the art in it, as the shop's map Styles are chosen */
.eng-dot { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.bk-gallery .sw-card-look.eng-look img { object-fit: cover; background: none; }
.bk-gallery .sw-card-looks:has(.eng-look) { gap: 8px; flex-wrap: wrap; }
.sw-body #panel button.bubble.eng-b { width: 48px; height: 48px; overflow: hidden; }
.tiles[hidden] { display: none; }
.eng-bubbles { gap: 6px; flex-wrap: nowrap; }
.sw-body #panel button.bubble.eng-b { width: auto; height: auto; flex: 1 1 0; min-width: 24px; max-width: 44px; aspect-ratio: 1; }  /* the row shrinks to the panel instead of widening it */
.eng-bubbles.dp-bubbles { flex-wrap: wrap; margin-bottom: 16px; }  /* designed pages: every Style, on as many lines as it takes (owner, 2026-11-21) */
.sw-body #panel .dp-bubbles button.bubble.eng-b { flex: 0 0 44px; }

/* ---- no logo (owner 2026-11-16) ---- */
.bk-nologo { margin-top: 10px; color: var(--muted); font-size: 15px; }

/* ---- Your photos: build card, dates and places ---- */
.bk-build { display: grid; gap: 10px; padding: 14px; border-radius: var(--radius); background: var(--rail); }
.bk-build p { margin: 0; font-size: 15px; }
/* the empty book's offer, on the right of the crumbs bar (owner, 2026-11-21); on phones the bar shows only the offer */
.sw-pinbar .sw-crumbs:has(.bk-offer) { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.bk-offer { margin: 0 0 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.bk-offer .sw-ghost { min-height: 32px; padding: 4px 14px; font-size: 14px; }
@media (max-width: 860px) {
  .sw-pinbar .sw-crumbs:has(.bk-offer) ol { display: none; }
  .bk-offer { margin-left: 0; }
}
.bk-check { display: flex; gap: 8px; align-items: center; min-height: 24px; font-size: 15px; }
.ptray.withmeta li { padding-bottom: 34px; }
.ptray .meta { position: absolute; left: 0; right: 0; bottom: 0; font-size: 11px; line-height: 1.25; color: var(--muted); text-align: center; overflow: hidden; }
.ptray.withmeta .used { bottom: 37px; }

/* ---- cover tab: Change the cover design (owner 2026-11-16) ---- */
.cvchange > summary small { display: block; font-weight: 400; font-size: 14px; }
.cvchange .laygroups { margin-top: 10px; padding-left: 10px; border-left: 2px solid var(--rail); }

/* ---- a couple's days that matter, and chapters by (owner 2026-11-16) ---- */
.occs .occ { display: grid; gap: 8px; padding: 8px 0; border-top: 1px solid var(--rail); }
.occs .occ.on { padding-bottom: 14px; }
.chapby .rowx { flex-wrap: wrap; }
.chapby .placerow { align-items: end; }
/* the guided steps (no #panel there): the panel's folds and chips */
.bk-page fieldset.fold { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: var(--u-gap); }
/* Cover panel: Front, Spine and Back each a dropdown */
.cvpart > summary { font-size: 16px; }
.cvpart > summary small { display: block; font-weight: 400; font-size: 14px; }
.cvpart[open] { padding-bottom: 14px; }
.bk-page fieldset.fold > legend { padding: 0; margin-bottom: calc(var(--u-gap-head) - var(--u-gap)); font-weight: 700; font-size: 17px; }
.bk-page .chips button { min-height: 36px; padding: 4px 14px; border: 1px solid var(--field-edge); border-radius: 99px; background: var(--paper); color: var(--ink); font: 500 15px/1.2 var(--font); cursor: pointer; }
.bk-page .chips button[aria-pressed="true"] { border-color: var(--walnut); box-shadow: inset 0 0 0 1px var(--walnut); font-weight: 700; }
.bk-page .chapby .placerow { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; }
.bk-page .chapby .bk-check { align-self: center; }

/* ---- designed pages drawn by the engine (owner 2026-11-16) ---- */
.dp-art { position: absolute; inset: 8% 8% 22%; background: center / contain no-repeat; }
.dp-art.dp-sky { inset: 4.5cqw 8% 15.5cqw; }  /* a night sky: in cqw, so the whole circle fits every page shape (owner, 2026-11-26) */
.dp-sky ~ .story-t { bottom: 4.5cqw; }
.dp-sky ~ .story-t .t { font-size: 4.6cqw; }
.dp-sky ~ .story-t .s { font-size: 2.6cqw; margin-top: .8cqw; }
.dp-art img { display: block; width: 100%; height: 100%; }
.dp-art img.fit-cover { object-fit: cover; }
.dp-art img.fit-contain { object-fit: contain; }
.dp-art.drawing img { opacity: 0; }
.dp-art.drawing::after { content: 'Drawing…'; position: absolute; right: 3%; bottom: 3%; padding: .4cqw 1.4cqw; border-radius: 99px; background: rgb(250 251 246 / .92); color: #4d5a50; font: 600 max(9px, 2.4cqw)/1.4 var(--font); }
@container (max-width: 160px) { .dp-art.drawing::after { display: none; } }
@media (prefers-reduced-motion: no-preference) { .dp-art img { transition: opacity .25s ease; } }
.dp-sum { display: flex; align-items: center; gap: 12px; }
.dp-mini { flex: none; display: block; width: 64px; height: 64px; border-radius: 6px; object-fit: cover; background: var(--u-tile); box-shadow: inset 0 0 0 1px var(--u-hair); }
.dp-letter { display: grid; align-content: center; gap: 6px; padding: 0 12px; box-sizing: border-box; }
.dp-letter i { display: block; height: 2px; background: var(--muted); opacity: .45; }
.dp-letter i:last-child { width: 60%; }
.dp-year { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; padding: 8px; box-sizing: border-box; }
.dp-year i { background: var(--u-sage); border-radius: 1px; }
.dp-need { display: block; font-weight: 600; font-size: 13px; color: var(--error); }
.warns li.block { font-weight: 500; }
.dp-look .chips .rowx { flex-wrap: wrap; }

/* ---- Our year: twelve months (owner 2026-11-16) ---- */
.ylab { position: absolute; text-align: center; font: 500 2.4cqw/1.2 var(--body); }
.ynone { position: absolute; display: grid; place-items: center; padding: 6%; box-sizing: border-box; overflow: hidden; text-align: center; font: 600 max(6px, 1.7cqw)/1.2 var(--font); color: #8f1f1a; pointer-events: none; }
.yr .slot.empty .drop { display: none; }
.ynone.ok { color: var(--muted); }
.ynone:not(.ok) + .ylab { color: #8f1f1a; }
@container (max-width: 160px) { .ynone { display: none; } }
.yr .slot.empty { background: #f8eeec; box-shadow: inset 0 0 0 1px rgb(143 31 26 / .55); }
.yr .slot.empty:has(+ .ynone.ok) { background: var(--pp); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .12); }

/* ---- washi tape across two corners (owner 2026-11-16, item 12) ---- */
.fr.tape::before, .fr.tape::after { content: ''; position: absolute; top: 3%; width: 34%; height: calc(var(--fw) * 1.1); background: var(--fc); opacity: .82; box-shadow: 0 0 0 .3px rgb(0 0 0 / .06); }
.fr.tape::before { left: -7%; transform: rotate(-32deg); }
.fr.tape::after { right: -7%; transform: rotate(32deg); }

/* ---- stickers (owner 2026-11-16, item 14) ---- */
.stk { position: absolute; z-index: 3; display: block; margin: 0; padding: 0; border: 0; background: none; line-height: 0; }
.stk svg { display: block; width: 100%; height: 100%; overflow: visible; }
button.stk { cursor: pointer; touch-action: none; }
button.stk[data-sel] { outline: 2px dashed var(--walnut); outline-offset: 2px; cursor: move; }
button.stk:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.tile .lay.stkprev { display: grid; place-items: center; color: #1d1d1b; }  /* black, as the Black swatch (owner, 2026-11-21) */
/* Stickers and Shapes and lines: two sections apart, their titles above their groups' (owner, 2026-11-21) */
.sw-body #panel .stkset + .stkset { margin-top: 32px; }
.sw-body #panel fieldset.stkset > legend { font-size: 18px; font-weight: 700; }
.sw-body #panel .stkset .laygroup > summary { font-size: 15px; }
.sw-body #panel .stktiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.sw-body #panel .stktiles button.tile { padding: 4px; font-size: 12px; }
.tile .lay.stkprev svg { width: 62%; height: 62%; }

/* ---- free placement (owner, 2026-11-19): handles round the chosen frame, caption or sticker, snap lines, editor only ---- */
.fh { position: absolute; z-index: 6; box-sizing: border-box; border: 1.5px solid var(--walnut); pointer-events: none; }
.fh [data-h] { position: absolute; width: 14px; height: 14px; margin: -7px; box-sizing: border-box; border: 2px solid var(--walnut); border-radius: 3px; background: #fff; pointer-events: auto; touch-action: none; }
.fh [data-h]::after { content: ''; position: absolute; inset: -8px; }  /* a 30px target round each 14px handle (WCAG 2.5.8) */
.fh [data-h="nw"] { left: 0; top: 0; cursor: nwse-resize; } .fh [data-h="se"] { left: 100%; top: 100%; cursor: nwse-resize; }
.fh [data-h="ne"] { left: 100%; top: 0; cursor: nesw-resize; } .fh [data-h="sw"] { left: 0; top: 100%; cursor: nesw-resize; }
.fh [data-h="w"] { left: 0; top: 50%; cursor: ew-resize; } .fh [data-h="e"] { left: 100%; top: 50%; cursor: ew-resize; }
.fh [data-h="rot"] { left: 50%; top: -26px; border-radius: 50%; cursor: grab; }
.fh [data-h="rot"]::before { content: ''; position: absolute; left: 50%; top: 100%; width: 1.5px; height: 12px; margin-left: -.75px; background: var(--walnut); }
.fh.knob-in [data-h="rot"] { top: 22px; }  /* near the top of the page the knob would be cut off: it sits just inside */
.fh.knob-in [data-h="rot"]::before { top: auto; bottom: 100%; }
.guide { position: absolute; z-index: 7; pointer-events: none; background: var(--brass); }
.guide.gv { top: 0; bottom: 0; width: 1px; margin-left: -.5px; }
.guide.gh { left: 0; right: 0; height: 1px; margin-top: -.5px; }
:is(button.slot[data-sel]:not([data-key^="cover"]), .cap[data-sel]) { cursor: move; touch-action: none; }
.cap[data-act] { cursor: pointer; }
.cap[data-sel] { overflow: visible; }
html.dragging .fh [data-h] { cursor: inherit; }
@media (max-width: 860px) {  /* on a phone the bar docks over the spread: one sideways row, so the page stays in view while it moves */
  #fxbar .fxposition { display: flex; gap: 6px; overflow-x: auto; overscroll-behavior-x: contain; }
  #fxbar .fxposition .rowx { flex: none; flex-wrap: nowrap; }
  #fxbar .fxposition .hint { display: none; }
}
/* the cover picture while Move is on */
[data-covmove] { cursor: move; touch-action: none; }
:is(.eng-box, .pg):has(> [data-covmove]) { outline: 2px dashed var(--walnut); outline-offset: -2px; }  /* on its box: the picture itself may be moved past the box's edge */
/* page borders, and their tiles */
.pborder { z-index: 0; }
.tile[data-act="layout"] .lay { aspect-ratio: var(--pgr, 1); }  /* a layout is drawn on the book's own page shape */
.tile .lay.bprev { position: relative; background: var(--paper, #fff); container-type: inline-size; }

/* ---- History says where (owner 2026-11-16, item 17) ---- */
.bk-hist button { align-items: center; justify-content: flex-start; }
.bk-hist button > span { flex: 1 1 auto; min-width: 0; }
.bk-hist .hthumb { flex: none; width: 36px; height: 36px; border-radius: 4px; object-fit: cover; background: var(--u-tile); }
.bk-hist .hwhere { display: block; white-space: normal; }
@media (max-width: 560px) { .bk-page .chapby .placerow { grid-template-columns: minmax(0, 1fr); } }
/* Several-country travel covers (owner's picks, 2026-11-17): frame is the art inside a fine rule, the title below */
.lay-frame .eng-box { left: 10%; top: 8%; width: 80%; height: 68%; outline: 1px solid var(--cloth-ink); outline-offset: 2.4cqw; }
.lay-frame .cov-title { top: 82%; }
.lay-frame .cov-title .t { font-size: 7cqw; }
.lay-frame .cov-title .s { margin-top: 1cqw; }
/* Family's Little One (candidates, 2026-11-28): the whole birth print fitted on its own paper, clear of the hinge and the bleed */
.lay-print .eng-box { inset: 5% 5% 5% 8%; }
/* the cover picker: the other themes' photo covers, under their own line (owner, 2026-11-28) */
.cvshared { grid-column: 1 / -1; margin: 10px 0 0; font-weight: 600; }
/* the lab's Family candidates sheet (?fam=<id>) */
.fam-looks { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 20px; } .fam-looks button { display: inline-flex; gap: 8px; align-items: center; }
.fam-looks .eng-dot { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.fam-shapes { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; } .fam-shapes figure { margin: 0; } .fam-shapes figcaption { margin-top: 6px; }
.tripchips { flex-wrap: wrap; gap: 6px; } .tripchips button span { margin-left: 6px; }

/* ---- the hub (owner, 2026-11-24: layout 7 of hub-viewer.html): a band per theme, a big open spread beside the words at the page edge,
   the whole sample book in a strip under it; then a quiet line and the promises before the cards ---- */
.bk-intro { padding-block: 32px 0; text-align: center; }
.bk-intro .sw-lede { margin-inline: auto; }
.bk-fig { margin: 0; }
.bk-fig .bk, .bk-thumb .bk { display: block; }
.bk-fig .spread, .bk-thumb .spread { width: 100%; }
.bk-ed { padding-block: clamp(40px, 5vw, 72px); }
.bk-ed.bk-flip { background: var(--rail); }
.bk-ed-grid { display: grid; gap: 28px; align-items: center; }
.bk-ed-grid > * { min-width: 0; }
@media (min-width: 900px) {
  .bk-ed-grid { grid-template-columns: 8fr 4fr; gap: 48px; }
  .bk-flip .bk-ed-grid { grid-template-columns: 4fr 8fr; }
  .bk-flip .bk-ed-art { order: 2; }
  .bk-ed-copy { justify-self: end; max-width: 36ch; }  /* the words at the page edge, so the book has the room */
  .bk-flip .bk-ed-copy { justify-self: start; }
}
.bk-ed-copy p { color: var(--muted); }
.bk-more { color: var(--brass); text-decoration: underline; text-underline-offset: .2em; font-weight: 600; }
.bk-whole { margin-top: clamp(28px, 3vw, 40px); }
.bk-thumbs { display: flex; gap: 16px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); padding: 6px var(--gutter) 18px; scrollbar-width: thin; }
.bk-thumb { flex: 0 0 auto; width: clamp(200px, 20vw, 280px); display: grid; gap: 6px; padding: 6px; border: 0; border-radius: 6px; background: none; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; scroll-snap-align: start; transition: transform .15s var(--ease-out, ease-out); }
.bk-thumb .spread { display: flex; }
.bk-thumb[aria-current="true"] { box-shadow: 0 0 0 2px var(--walnut); color: var(--ink); font-weight: 700; }
.bk-thumb:focus-visible { outline: 2px solid var(--walnut); outline-offset: 2px; }
.bk-thumb:active { transform: scale(.98); }
.bk-keep { background: var(--rail); padding: clamp(40px, 6vw, 80px) var(--gutter); text-align: center; }
.bk-keep p { max-width: 30ch; margin: 0 auto; font: var(--display-wt) clamp(24px, 2.8vw, 36px)/1.25 var(--font-display); }
.bk-promise { display: grid; gap: 16px; list-style: none; padding: 24px; margin: clamp(40px, 5vw, 64px) 0 0; background: var(--paper); border-radius: var(--radius); }
@media (min-width: 760px) { .bk-promise { grid-template-columns: repeat(3, 1fr); gap: 32px; padding: 28px 32px; } }
.bk-promise strong { display: block; font-size: 17px; margin-bottom: 4px; }
.bk-promise span { color: var(--muted); font-size: 15px; }
@media (prefers-reduced-motion: reduce) { .bk-thumb { transition: none; } }
#main:empty { min-height: 100vh; }  /* keeps the footer below the fold until book.js draws the page (no green signup flash on arrival) */
