/* One step per screen.
   A short title, at most one line under it, one picture or one set of
   choices, one black button. White, near-black text, one grey for the rest. */
:root {
  --s-ink: #1d1d1f;
  --s-muted: #6e6e73;
  --s-wash: #f5f5f3;
  --s-line: #e5e5e3;
  --s-warn: #a3471f;
}

/* Buttons everywhere on the page, the sheets included. */
.primary, .secondary { border-radius: 12px; }
.primary { background: var(--s-ink); }
.primary:hover:not(:disabled) { background: #000; }
.secondary { border: 1.5px solid var(--s-line); }
.secondary:hover:not(:disabled) { border-color: var(--s-ink); }

/* Header: the mark, and where you are. */
.topbar.steps-header { height: 64px; min-height: 64px; padding: 0 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px; background: #fff; border-bottom: 1px solid #f0f0ee; }
.steps-header .brand img { width: 72px; filter: none; }
.step-nav ol { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; }
.step-nav button { min-height: 36px; padding: 0 14px; border-radius: 999px; font-size: 14px; color: var(--s-ink); }
.step-nav button:hover:not(:disabled) { background: var(--s-wash); }
.step-nav button[aria-current=step] { font-weight: 500; background: var(--s-wash); opacity: 1; }
.step-nav button:disabled:not([aria-current]) { color: #b4b4b8; opacity: 1; }
.step-count { display: none; font-size: 13px; color: var(--s-muted); font-variant-numeric: tabular-nums; }
.step-saved { font-size: 13px; color: #a1a1a6; white-space: nowrap; }
.step-saved .label-short { display: none; }
/* The language, one word at the end of the header; the step count sits beside it on phones. */
.steps-header .header-end { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.lang-toggle { min-height: 32px; padding: 0 10px; border-radius: 999px; font-size: 13px; color: var(--s-muted); border: 1px solid #e6e6e3; background: #fff; }
.lang-toggle:hover { color: var(--s-ink); border-color: #c9c9c5; }

/* The room: the book on the left, the step on the right. */
.studio-flow.steps-flow { grid-template-columns: minmax(0, 1fr) minmax(460px, 42%); height: calc(100svh - 64px); background: var(--s-wash); }
.steps-flow .intake-stage { background: var(--s-wash); }
.steps-flow .studio-scene-caption { color: var(--s-muted); }
.steps-flow .step-sheet { background: #fff; border: 0; }
.steps-flow .sheet-scroll { padding: 64px 64px 24px; }
.step-body { display: flex; flex-direction: column; gap: 28px; max-width: 520px; color: var(--s-ink); }
.step-body h1 { font: 500 44px/1.08 var(--serif); letter-spacing: -.025em; color: var(--s-ink); }
.step-body h1:focus { outline: none; }
.step-lede { margin-top: -16px; font-size: 19px; line-height: 1.45; color: var(--s-muted); }
.step-resume { display: flex; flex-wrap: wrap; gap: 0 8px; margin: -28px 0 -12px; font-size: 13px; color: var(--s-muted); animation: step-fade 300ms ease-out both; }
.step-resume .step-text { min-height: 24px; font-size: 13px; }
.field-suggest { display: block; margin-top: 6px; font-size: 13px; color: var(--s-muted); }
.field-suggest .step-text { min-height: 24px; font-size: 13px; }
.step-back { align-self: flex-start; min-height: 32px; margin: -28px 0 -12px; padding: 0; font-size: 15px; color: var(--s-muted); }
.step-back:hover:not(:disabled) { background: transparent; color: var(--s-ink); }

/* The book on the stage with a phone beside it, both to the same scale. */
.scale-row { display: flex; align-items: flex-end; justify-content: center; gap: 28px; max-width: 100%; }
.with-scale .studio-book-stage { --studio-unit: min(2.1px, calc((100cqw - 160px) / (var(--trim-w) + 100)), calc((100cqh - 190px) / max(var(--trim-h), 150))); }
.with-scale .studio-book { --studio-unit: inherit; }
.scale-phone { position: relative; flex: none; width: calc(var(--phone-w) * var(--studio-unit)); height: calc(var(--phone-h) * var(--studio-unit)); border: 1.5px solid #8e8e93; border-radius: calc(10 * var(--studio-unit)); box-sizing: border-box; }
.scale-phone span { position: absolute; left: 50%; top: calc(6 * var(--studio-unit)); width: calc(22 * var(--studio-unit)); height: calc(6 * var(--studio-unit)); transform: translateX(-50%); border-radius: 999px; background: #8e8e93; }
.scale-phone::after { content: ""; position: absolute; left: 50%; bottom: calc(5 * var(--studio-unit)); width: calc(28 * var(--studio-unit)); height: 1.5px; transform: translateX(-50%); background: #8e8e93; border-radius: 1px; }

/* Small arrivals: the step, the phone, the cloth. */
@keyframes step-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.steps-flow .step-body { animation: step-fade 320ms cubic-bezier(.2, .7, .2, 1) both; }
.scale-phone { animation: step-fade 360ms 80ms cubic-bezier(.2, .7, .2, 1) both; }
.cloth-front { transition: background-color 260ms; }
@media (prefers-reduced-motion: reduce) { .steps-flow .step-body, .scale-phone, .step-resume { animation: none; } .cloth-front { transition: none; } }

/* Cloth: the cover as a colour, the title stamped on it. */
.cloth-front { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 8% 9%; background: var(--cloth); background-image: repeating-linear-gradient(0deg, rgba(255,255,255,.06) 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, rgba(0,0,0,.05) 0 1px, transparent 1px 3px); }
.cloth-front .cover-title { position: static; font: 500 clamp(10px, 7cqw, 26px)/1.2 var(--serif); letter-spacing: .04em; color: var(--cloth-ink); text-shadow: none; opacity: .9; }
.cloth-front .cover-title.empty { opacity: .45; }
.studio-book.cloth-cover { background: var(--cloth, #b9b6ae); }
.cloth-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cloth-choice { display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 0; padding: 10px 8px 12px; border: 1.5px solid var(--s-line); border-radius: 12px; background: #fff; color: var(--s-ink); font-size: 13px; font-weight: 500; transition: border-color 120ms; }
.cloth-choice:hover:not(:disabled) { background: #fff; border-color: #c4c4c2; }
.cloth-choice[aria-pressed=true] { border-color: var(--s-ink); box-shadow: inset 0 0 0 1px var(--s-ink); }
.cloth-swatch { display: block; width: 100%; aspect-ratio: 3 / 2; border-radius: 6px; background: var(--cloth); background-image: repeating-linear-gradient(0deg, rgba(255,255,255,.07) 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, rgba(0,0,0,.05) 0 1px, transparent 1px 3px); }
.sheet-colours { grid-column: 1 / -1; }
.material-picture.cloth { background: var(--cloth); background-image: repeating-linear-gradient(0deg, rgba(255,255,255,.07) 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, rgba(0,0,0,.05) 0 1px, transparent 1px 3px); }

/* Choices: large buttons side by side. */
.step-group { display: flex; flex-direction: column; gap: 10px; }
.step-label { font-size: 13px; color: var(--s-muted); }
.step-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.wish-chips.step-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.step-option { min-height: 52px; padding: 10px 12px; border: 1.5px solid var(--s-line); border-radius: 12px; background: #fff; color: var(--s-ink); font-size: 15px; font-weight: 500; line-height: 1.25; transition: border-color 120ms, background-color 120ms, color 120ms; }
.step-option:hover:not(:disabled) { background: #fff; border-color: #c4c4c2; }
.steps-flow .wish-group { margin: 0; padding: 0; border: 0; }
.steps-flow .wish-chip.step-option { align-items: center; justify-content: center; min-height: 52px; padding: 10px 12px; border: 1.5px solid var(--s-line); border-radius: 12px; font-size: 15px; text-align: center; }
.steps-flow .wish-chip.step-option[aria-pressed=true] { border-color: var(--s-ink); }
/* The book on the left is a picture: no placeholder words on it. */
.steps-flow .intake-stage .cover-title.empty, .steps-flow .intake-stage .intake-cover-title.empty { display: none; }
.step-option[aria-pressed=true], .step-option[aria-pressed=true]:hover:not(:disabled) { background: var(--s-ink); border-color: var(--s-ink); color: #fff; }

/* Quiet links. */
.step-text { min-height: 36px; padding: 0; font-size: 15px; font-weight: 500; color: var(--s-ink); }
.step-text:hover:not(:disabled) { background: transparent; text-decoration: underline; text-underline-offset: 3px; }
.step-more { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 0; border-top: 1px solid var(--s-line); border-radius: 0; font-size: 15px; color: var(--s-muted); text-align: left; }
.step-more span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step-more span:last-child { color: var(--s-ink); font-weight: 500; flex: none; }
.step-more:hover:not(:disabled) { background: transparent; }
.step-more:hover span:last-child { text-decoration: underline; text-underline-offset: 3px; }
.start-over-link { align-self: flex-start; font-size: 13px; font-weight: 400; color: var(--s-muted); }
.step-links { display: flex; align-items: center; gap: 16px; margin-top: -12px; }
.cover-links .cover-quality { margin-left: auto; }
.quiet-text { font-weight: 400; color: var(--s-muted); }
.arrange-toggle, .arrange-toggle[aria-pressed=true] { border: 0; background: transparent; box-shadow: none; }
.arrange-toggle[aria-pressed=true] { text-decoration: underline; text-underline-offset: 3px; }
.step-note { font-size: 13px; line-height: 1.5; color: var(--s-muted); }
.cover-quality .cover-soft { color: var(--s-warn); }
.cover-quality .cover-sharp { color: var(--s-muted); }
.feedback-link { align-self: flex-start; font-size: 13px; font-weight: 400; color: var(--s-muted); }

/* The one button, at the bottom of the step. */
.steps-flow .step-footer { border: 0; padding: 16px 64px 40px; gap: 6px; align-items: stretch; max-width: 648px; background: #fff; }
.steps-flow .sheet-footer>.primary, .step-primary { width: 100%; min-height: 52px; border-radius: 12px; font-size: 17px; font-weight: 500; justify-content: center; }
.step-primary .icon { display: none; }
.step-skip { min-height: 44px; font-size: 15px; color: var(--s-muted); }
.step-skip:hover:not(:disabled) { background: transparent; color: var(--s-ink); }
.steps-flow .send-footer { display: flex; flex-direction: column; gap: 6px; }
.steps-flow .send-footer .secondary { min-height: 52px; }

/* Photos. */
.step-drop { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 28px 0 8px; border-radius: 16px; transition: background-color 160ms; }
.step-drop.drag-over { background: var(--s-wash); }
.step-prints { position: relative; width: 250px; height: 270px; }
.step-prints img { position: absolute; width: 146px; height: 184px; object-fit: cover; border-radius: 4px; box-shadow: 0 14px 26px -16px rgba(0, 0, 0, .5); }
.step-prints img:nth-child(1) { left: 0; top: 30px; transform: rotate(-7deg); }
.step-prints img:nth-child(2) { right: 0; top: 0; transform: rotate(6deg); }
.step-prints img:nth-child(3) { left: 52px; top: 84px; }
.step-drop .step-note { text-align: center; }
.step-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.step-title-actions { display: flex; align-items: center; gap: 20px; flex: none; }
.step-title-actions .history-controls { display: flex; gap: 12px; }
.step-title-actions .history-controls button { min-height: 32px; padding: 0; font-size: 14px; color: var(--s-muted); gap: 4px; }
.step-title-actions .history-controls .icon { width: 14px; height: 14px; flex-basis: 14px; opacity: .7; }
.steps-flow .step-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-top: -8px; }
.steps-flow .step-grid.drag-over { outline: 2px dashed #c4c4c2; outline-offset: 6px; border-radius: 6px; }
.steps-flow .intake-tile .photo-image { aspect-ratio: 1; border-radius: 4px; }
.steps-flow .intake-tile .photo-tags span { border-radius: 6px; font-weight: 500; letter-spacing: 0; text-transform: none; font-size: 11px; }
.steps-flow .intake-status:empty { display: none; }
.steps-flow .intake-status { font-size: 13px; color: var(--s-muted); margin-top: -8px; }

/* Cover. */
.cover-choices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.cover-choice { aspect-ratio: 1; min-height: 0; padding: 0; border-radius: 8px; overflow: hidden; background: var(--s-wash); }
.cover-choice img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 300ms cubic-bezier(.2, .7, .2, 1); }
.cover-choice:hover:not(:disabled) img { transform: scale(1.04); }
.cover-choice[aria-pressed=true] { outline: 2px solid var(--s-ink); outline-offset: 3px; }
.cover-choice.other { border: 1.5px dashed #c4c4c2; background: #fff; color: var(--s-muted); font-size: 13px; font-weight: 500; line-height: 1.3; padding: 8px; }
.cover-choice.other:hover:not(:disabled) { background: #fff; border-color: var(--s-ink); color: var(--s-ink); }

/* Fields. */
.step-field { display: flex; flex-direction: column; gap: 8px; }
.step-field>span, .step-form .line-field>span { font-size: 13px; color: var(--s-muted); }
.step-field>span em { font-style: normal; color: #a1a1a6; }
/* Two short fields side by side: the date the book is needed, and copies. */
.step-pair { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 12px; margin-top: 16px; }
.step-field input[type=date] { -webkit-appearance: none; appearance: none; min-width: 0; }
.step-field input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.needed-note { margin: 8px 0 0; font-size: 14px; color: var(--s-muted); }
.step-form .line-field>span em { font-style: normal; color: #a1a1a6; }
.step-field input, .step-field textarea, .step-form input { display: block; width: 100%; min-height: 52px; margin: 0; padding: 12px 14px; border: 1.5px solid var(--s-line); border-radius: 12px; background: #fff; color: var(--s-ink); font-size: 17px; line-height: 1.4; outline: none; resize: none; transition: border-color 120ms; }
.step-field input:focus, .step-field textarea:focus, .step-form input:focus { border-color: var(--s-ink); outline: none; }
.step-field input::placeholder, .step-field textarea::placeholder { color: #a1a1a6; }
.step-form { display: flex; flex-direction: column; gap: 14px; }
.step-form .line-field { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.send-form.step-form .line-field input { min-height: 52px; padding: 12px 14px; border: 1.5px solid var(--s-line); border-radius: 12px; background: #fff; font-size: 17px; }
.send-form.step-form .line-field input:focus { border-color: var(--s-ink); }
.send-form.step-form .line-field.has-error input { border-color: var(--s-warn); }
.step-form .has-error input { border-color: var(--s-warn); }
.step-form .field-error { font-size: 13px; color: var(--s-warn); }
.steps-flow .send-note { font-size: 13px; line-height: 1.5; color: var(--s-muted); }
.steps-flow .send-error { margin: 0 0 4px; padding: 12px 14px; border-radius: 12px; background: #fbf3ee; color: var(--s-warn); font-size: 14px; line-height: 1.45; }
.reconnect-recovery > p { margin: 0; }
.reconnect-choices summary { cursor: pointer; min-height: 44px; display: list-item; padding-top: 10px; }
.reconnect-choices ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.reconnect-choice { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 10px; text-align: left; border: 1px solid currentColor; border-radius: 8px; background: transparent; color: inherit; }
.reconnect-choice img { width: 44px; height: 44px; object-fit: contain; flex: none; }
.reconnect-choice > span { min-width: 0; display: grid; gap: 2px; overflow-wrap: anywhere; }
.reconnect-choice strong { font-weight: 500; }
.reconnect-choice:focus-visible { outline: 2px solid var(--s-ink); outline-offset: 3px; }

/* Send. */
.send-summary { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: 16px; background: var(--s-wash); }
.send-summary .cover-mini { width: 72px; flex: none; }
.send-summary>div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.send-summary strong { font-size: 17px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.send-summary span { font-size: 14px; color: var(--s-muted); }
.send-summary-links { display: flex; gap: 16px; }
.send-summary .step-text { min-height: 28px; font-size: 14px; font-weight: 400; color: var(--s-muted); }
.steps-flow .send-progress { display: flex; flex-direction: column; gap: 4px; padding: 20px; border-radius: 16px; background: var(--s-wash); }
.steps-flow .send-progress-title { font-size: 15px; }
.steps-flow .send-progress-title strong { font-weight: 500; }
.steps-flow .send-bar { height: 4px; border-radius: 2px; background: var(--s-line); }
.steps-flow .send-bar span { border-radius: 2px; }
.steps-flow .send-hint { margin-top: 10px; font-size: 13px; line-height: 1.5; color: var(--s-muted); }

/* The sheet: cover, pages and paper. */
dialog.book-sheet { width: min(600px, calc(100% - 32px)); padding: 32px 36px 24px; border-radius: 20px; background: #fff; box-shadow: 0 40px 80px -30px rgba(0,0,0,.35), 0 2px 8px rgba(0,0,0,.06); }
.sheet-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.sheet-head h2 { margin: 0; font: 500 28px/1.15 var(--serif); letter-spacing: -.02em; color: var(--s-ink); outline: none; }
.sheet-head .step-lede { margin: 0; font-size: 15px; }
.book-sheet-body { display: flex; flex-direction: column; gap: 24px; }
.book-sheet-body .step-label span { color: #a1a1a6; }
.material-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.material-cards.single { grid-template-columns: minmax(0, 1fr); }
.material-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 0; padding: 12px; border: 1.5px solid var(--s-line); border-radius: 14px; background: #fff; color: var(--s-ink); text-align: left; line-height: 1.35; transition: border-color 120ms; }
.material-card:hover:not(:disabled) { background: #fff; border-color: #c4c4c2; }
.material-card[aria-pressed=true] { border-color: var(--s-ink); box-shadow: inset 0 0 0 1px var(--s-ink); }
.material-card.only { border-style: dashed; }
.material-card strong { font-size: 15px; font-weight: 500; }
.material-card span { font-size: 13px; color: var(--s-muted); }
.material-card small { font-size: 12px; color: var(--s-muted); }
.material-card.paper { padding: 14px 16px; }
.material-card.paper span { margin-bottom: 4px; }
.material-cards.single .material-card.paper { flex-direction: column; }
.material-picture { display: block; width: 100%; aspect-ratio: 3 / 2; margin-bottom: 6px; border-radius: 8px; overflow: hidden; background: var(--s-wash); }
.material-picture img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sheet-foot { display: flex; flex-direction: column; align-items: stretch; gap: 6px; margin-top: 28px; }

/* The cover editor: white, one black button, a segmented control. */
dialog.cover-editor { background: #fff; border-radius: 20px; box-shadow: 0 40px 80px -30px rgba(0,0,0,.35), 0 2px 8px rgba(0,0,0,.06); }
.cover-editor-head { background: #fff; border-bottom: 1px solid var(--s-line); padding: 0 16px; min-height: 60px; }
.cover-editor-head h2 { font: 500 17px/1 var(--serif); letter-spacing: -.01em; color: var(--s-ink); }
.cover-editor-head [data-action=cover-cancel] { color: var(--s-muted); border-radius: 10px; }
.cover-editor-head [data-action=cover-cancel] .icon { display: none; }
.cover-editor-head [data-action=cover-done] { min-height: 40px; padding: 0 18px; border-radius: 10px; font-weight: 500; }
.cover-editor-head [data-action=cover-done] .icon { display: none; }
.cover-editor .cover-stage { background: var(--s-wash); }
.cover-editor .cover-legend { background: var(--s-wash); margin: 0; padding-bottom: 14px; font-size: 12px; color: var(--s-muted); }
.cover-editor .cover-tabs { display: flex; gap: 4px; margin: 14px 20px 0; padding: 3px; border: 0; border-radius: 10px; background: var(--s-wash); }
.cover-editor .cover-tabs button { flex: 1; min-height: 34px; border: 0; border-radius: 8px; font-size: 14px; color: var(--s-muted); }
.cover-editor .cover-tabs [aria-selected=true] { color: var(--s-ink); background: #fff; font-weight: 500; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.cover-editor .cover-panel { padding: 18px 20px max(20px, env(safe-area-inset-bottom)); }
.cover-editor .cover-label { font-size: 13px; color: var(--s-muted); letter-spacing: 0; text-transform: none; }
.cover-editor .cover-zoom input { accent-color: var(--s-ink); }
.cover-editor .cover-photo-actions .secondary { border-radius: 10px; }
.cover-editor .cover-photo-actions .quiet { border-radius: 10px; color: var(--s-muted); }
.cover-editor .cover-panel .line-field input { min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--s-line); border-radius: 12px; font-size: 16px; }
.cover-editor .cover-panel .line-field input:focus { border-color: var(--s-ink); }
.cover-editor .cover-layout { border-radius: 12px; }
.cover-editor .cover-layout[aria-checked=true] { outline: 2px solid var(--s-ink); outline-offset: 2px; }
.cover-editor .segmented { border-radius: 10px; background: var(--s-wash); padding: 3px; border: 0; }
.cover-editor .segmented button { border-radius: 8px; border: 0; color: var(--s-muted); }
.cover-editor .segmented button+button { border-left: 0; }
.cover-editor .segmented [aria-pressed=true], .cover-editor .segmented [aria-pressed=true]:hover { background: #fff !important; color: var(--s-ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.cover-editor .cover-segments { display: flex; gap: 10px; flex-wrap: wrap; }
.cover-editor .switch[aria-checked=true] { background: var(--s-ink); }
.cover-editor .cover-help, .cover-editor .cover-quality { color: var(--s-muted); }
.cover-editor .cover-quality .cover-soft { color: var(--s-warn); }

/* Narrow computers. */
@media (max-width: 1100px) and (min-width: 761px) {
  .with-scale .studio-book-stage { --studio-unit: min(1.6px, calc((100cqw - 120px) / (var(--trim-w) + 100)), calc((100cqh - 170px) / max(var(--trim-h), 150))); }
  .studio-flow.steps-flow { grid-template-columns: minmax(0, 1fr) 440px; }
  .steps-flow .sheet-scroll { padding: 48px 40px 20px; }
  .steps-flow .step-footer { padding: 16px 40px 32px; }
  .step-body h1 { font-size: 38px; }
  .step-nav button { padding: 0 10px; }
}

/* Phones: one column; the book shows where it is the subject. */
@media (max-width: 760px) {
  .with-scale .studio-book-stage { --studio-unit: min(1.15px, calc((100cqw - 100px) / (var(--trim-w) + 92)), calc((100cqh - 40px) / max(var(--trim-h), 150))); }
  .scale-row { gap: 20px; }
  .intake-stage.with-scale .studio-scene-caption { display: block; bottom: 6px; }
  .intake-stage.with-scale .studio-scene-caption span { display: none; }
  dialog.book-sheet { margin: auto 0 0; width: 100%; max-width: none; max-height: 92svh; border-radius: 20px 20px 0 0; padding: 24px 24px calc(20px + env(safe-area-inset-bottom)); }
  .sheet-head h2 { font-size: 24px; }
  .material-cards { gap: 8px; }
  .material-card { padding: 10px; }
  .topbar.steps-header { height: 56px; min-height: 56px; padding: 0 20px; }
  .steps-header .brand img { width: 62px; }
  .step-nav { display: none; }
  .step-count { display: block; }
  .step-saved { display: none; }
  .steps-header .header-end { gap: 10px; }
  .lang-toggle { min-height: 30px; padding: 0 9px; }
  .step-more { flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 0; }
  .step-more span:first-child { white-space: normal; }
  dialog.cover-editor { border-radius: 0; }
  .studio-flow.steps-flow { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); height: calc(100svh - 56px); }
  .steps-flow .intake-stage { display: none; }
  .studio-flow.steps-flow.step-book { grid-template-rows: 32svh minmax(0, 1fr); }
  .studio-flow.steps-flow.step-cover:has(.step-links) { grid-template-rows: 26svh minmax(0, 1fr); }
  .steps-flow.step-book .intake-stage, .steps-flow.step-cover:has(.step-links) .intake-stage { display: block; }
  .steps-flow .step-sheet { border: 0; }
  .steps-flow .sheet-scroll { padding: 28px 24px 16px; }
  .step-body { gap: 22px; }
  .step-body h1 { font-size: 34px; line-height: 1.12; }
  .step-lede { margin-top: -12px; font-size: 17px; }
  .step-back { margin: -12px 0 -10px; }
  .steps-flow .step-footer { max-width: none; padding: 10px 24px max(20px, env(safe-area-inset-bottom)); }
  .steps-flow .step-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .step-options { gap: 6px; }
  .step-option { min-height: 48px; font-size: 15px; }
  .step-prints { transform: scale(.9); margin: -10px 0; }
  .steps-flow .step-drop { padding-top: 8px; }
}
@media (max-height: 640px) and (max-width: 760px) {
  .studio-flow.steps-flow.step-book { grid-template-rows: 24svh minmax(0, 1fr); }
}

/* Sent: the photographs become the book, on white. */
.retail-estimate { min-width: 0; padding-bottom: 8px; }
.retail-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 15px; }
.retail-heading strong { font-size: 21px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.retail-estimate p { margin: 3px 0 0; color: #626262; font-size: 13px; line-height: 1.4; }
.retail-unavailable { font-size: 14px; }
.retail-tiers dl { margin: 0; }
.retail-tiers dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid #e7e7e7; font-size: 15px; }
.retail-tiers dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; }
.retail-tiers .step-note { margin-top: 12px; }
@media (max-width: 760px) and (max-height: 760px) {
  .studio-flow.steps-flow.step-book { grid-template-rows: 22svh minmax(0, 1fr); }
}
.ceremony { background: #fff; color: var(--s-ink); }
.ceremony-words h2 { font: 500 40px/1.1 var(--serif); letter-spacing: -.025em; color: var(--s-ink); }
.ceremony-words p { font-size: 17px; line-height: 1.5; color: var(--s-muted); }
.ceremony-words .ceremony-ref { font-size: 13px; }
.ceremony-words .ceremony-ref strong { color: var(--s-ink); font-weight: 500; }
.ceremony-words .ceremony-link { font-size: 13px; }
.ceremony-actions .primary, .ceremony-actions .secondary { min-height: 48px; border-radius: 12px; }
@media (max-width: 760px) {
  .ceremony { place-items: start center; overflow-y: auto; }
  .ceremony-stage { height: 300px; margin-top: 2svh; }
  .ceremony-words { top: 252px; padding-bottom: 32px; }
  .ceremony-words h2 { font-size: 30px; }
  .ceremony-words p { font-size: 15px; }
  .ceremony-actions { flex-wrap: wrap; }
}

/* The background upload, one quiet line under the photographs */
.intake-status .upload-line { display: block; font-size: 13px; color: #a1a1a6; }
.intake-status .upload-line[hidden] { display: none; }
.last-order { margin: 0 0 16px; }
.last-order a { color: var(--s-ink, inherit); text-decoration: underline; text-underline-offset: 3px; }
.closed-note { margin: 0 0 16px; padding: 10px 14px; border-radius: 10px; background: #f6efdc; color: #6b5300; font-size: 14px; line-height: 1.45; }
