/* The studio: a paper-white room, a hairline, the mark in ink. */
.studio-header {
  height: 64px;
  min-height: 64px;
  padding: 10px 28px;
  background: var(--sheet);
  border-color: var(--rule);
  color: var(--ink);
}
.studio-header .brand img { width: 72px; filter: grayscale(1) contrast(1.1); }
.studio-header .preview-label { color: var(--muted); font-size: 12px; }
.studio-header .project-name, .studio-header .header-divider { display: none; }
.studio-header .header-actions { gap: 6px; }
.feedback-fab { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 6px 10px; border-radius: 2px; color: var(--ink-2); font-size: 13px; font-weight: 500; }
.feedback-fab .icon { width: 16px; height: 16px; flex-basis: 16px; }
.feedback-fab:hover:not(:disabled) { background: #ecebe6; color: var(--ink); }
.uploading .topbar { height: 64px; min-height: 64px; padding: 10px 28px; background: var(--sheet); border-color: var(--rule); }
.uploading .topbar .brand img { width: 72px; filter: grayscale(1) contrast(1.1); }
.uploading .topbar .preview-label { color: var(--muted); }
.uploading .topbar .project-name, .uploading .topbar .header-divider, .uploading .topbar .primary { display: none; }
.studio-flow {
  display: grid;
  grid-template-columns: minmax(0,1fr) 444px;
  height: calc(100svh - 64px);
  min-height: 0;
  max-width: none;
  padding: 0;
  margin: 0;
  background: var(--paper);
}
.studio-visual { position: relative; min-width: 0; min-height: 0; overflow: hidden; container-type: size; }
.studio-book-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 48px 56px 96px; }
/* The book as an object on paper: a bound block of pages, a cloth spine,
   the cover photograph bleeding to the edge. No tilt, no gloss. */
.studio-book {
  --studio-unit: min(2.1px,calc((100cqw - 160px) / var(--trim-w)),calc((100cqh - 190px) / var(--trim-h)));
  width: calc(var(--trim-w) * var(--studio-unit));
  height: calc(var(--trim-h) * var(--studio-unit));
  position: relative;
  flex: none;
  background: #e9e6df;
  border-radius: 1px 3px 3px 1px;
  box-shadow:
    inset 9px 0 0 #2a2927, inset 10px 0 0 #4e4b46,
    2px 2px 0 #f7f5f0, 4px 4px 0 #dad6cd, 6px 6px 0 #f7f5f0, 8px 8px 0 #cfcac0,
    0 30px 50px -22px #00000055, 0 2px 6px #0000001a;
}
.studio-book.soft-cover { box-shadow: inset 2px 0 0 #cfcac0, 2px 2px 0 #f7f5f0, 4px 4px 0 #dad6cd, 0 24px 40px -22px #00000055, 0 2px 6px #0000001a; border-radius: 1px 4px 4px 1px; }
.studio-book>img { position: absolute; inset: 0 0 0 10px; width: calc(100% - 10px); height: 100%; margin: 0; object-fit: cover; border-radius: 0 3px 3px 0; }
.studio-book.soft-cover>img { inset: 0; width: 100%; border-radius: 1px 4px 4px 1px; }
.studio-book>span { position: absolute; bottom: 7%; left: calc(10px + 8%); color: #fff; font: italic 400 18px/1.2 var(--serif); text-shadow: 0 1px 8px #0008; }
.studio-scene-caption { position: absolute; bottom: 34px; left: 24px; right: 24px; text-align: center; color: var(--ink); font-size: 13px; line-height: 1.6; }
.studio-scene-caption span { display: block; font-size: 11px; color: var(--muted); }
.studio-visual .material-spread { width: min(550px,80cqw); max-height: calc(100cqh - 140px); }
.material-view { background: var(--paper); }
.studio-flow:has(>.material-view) { background: var(--paper); }
.material-view .studio-book-stage { padding: 24px 0 100px; }
.studio-material-image { display: block; width: 100%; max-width: 1000px; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.material-view .studio-scene-caption { color: var(--ink); bottom: 38px; left: 28px; right: 160px; text-align: left; }
.material-view .studio-scene-caption span { color: #60666b; }
.material-view [data-action=config-inspect-material] { position: absolute; right: 24px; bottom: 30px; min-height: 44px; font-size: 12px; background: #ffffffb8; border-radius: 4px; }
.material-inspection { width: 100%; object-fit: contain; height: auto; }
.material-inspection-note { margin-top: 14px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.studio-sheet { min-width: 0; min-height: 0; background: #fff; display: flex; flex-direction: column; border-left: 1px solid var(--rule); overflow: hidden; }
.sheet-scroll { min-height: 0; flex: 1; overflow: auto; padding: 28px 28px 22px; overscroll-behavior: contain; scrollbar-width: thin; }
.studio-sheet .picker-heading { padding: 0 0 24px; }
.studio-sheet .eyebrow { margin-bottom: 10px; font-size: 10.5px; color: var(--muted); }
.studio-sheet h1, .studio-sheet #upload-title { font-size: 30px; font-weight: 400; line-height: 1.15; }
.studio-sheet h1:focus { outline: none; }
.studio-sheet .picker-heading>p:last-child:not(.eyebrow) { margin-top: 8px; font-size: 14px; }
.studio-sheet .picker-steps { flex: none; justify-content: space-between; gap: 14px; margin: 0 28px; }
.studio-sheet .picker-steps button { font-size: 12px; gap: 6px; padding: 16px 0; }
.studio-sheet .picker-steps button>span { width: 12px; }
.studio-sheet .shape-tabs { padding: 0; gap: 10px; background: transparent; border-radius: 0; margin: 0 0 18px; }
.studio-sheet .shape-tabs button { flex-direction: column; gap: 12px; font-size: 12px; min-width: 0; height: 106px; padding: 10px 4px; border-radius: 4px; border-bottom: 2px solid transparent; }
.studio-sheet .shape-tabs [aria-pressed=true] { box-shadow: none; background: #f4f4f5; border-bottom-color: #202124; }
.shape-preview { display: flex; align-items: center; justify-content: center; width: 66px; height: 54px; }
.shape-preview img { width: 46px; height: 46px; object-fit: cover; border-left: 2px solid #eff0ec; box-shadow: 2px 2px 0 #cecfcd,3px 3px 0 white,4px 4px 5px #0002; }
.shape-preview.portrait img { width: 35px; height: 49px; }
.shape-preview.landscape img { width: 61px; height: 42px; }
.studio-sheet .format-options { gap: 0 14px; margin: 0; }
.studio-sheet .format-options:empty { display: none; }
.studio-sheet .format-options button { gap: 9px; padding: 12px 0; border: 0; border-radius: 0; border-bottom: 1px solid #e7e7e9; min-height: 64px; }
.studio-sheet .format-options [aria-pressed=true] { box-shadow: none; background: transparent; }
.studio-sheet .format-options strong { font-size: 14px; line-height: 1.35; }
.studio-sheet .size-copy { gap: 2px; }
.studio-sheet .size-copy small { font-size: 11px; color: #73777b; }
.size-radio { display: block; width: 16px; height: 16px; flex: 0 0 16px; border: 1px solid #c3c5c7; border-radius: 50%; }
[aria-pressed=true]>.size-radio { border: 5px solid #202124; }
.more-sizes { margin-top: 10px; }
.more-sizes summary, .designer-note summary { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 12px 0; list-style: none; cursor: pointer; font-size: 13px; }
.more-sizes summary::-webkit-details-marker, .designer-note summary::-webkit-details-marker { display: none; }
.more-sizes[open] summary>.icon { transform: rotate(45deg); }
.size-total { margin-left: auto; color: #73777b; font-size: 11px; }
.studio-sheet .size-group-heading { margin: 14px 0 0; font-size: 12px; color: #73777b; }
.studio-sheet [data-action=config-compare] { padding-left: 0; font-size: 13px; }
.studio-sheet .included-materials { margin-top: 14px; padding-top: 14px; font-size: 12px; }
.studio-sheet .included-materials>span { color: #7e4a25; }
.sheet-footer { flex: none; border-top: 1px solid var(--line); display: flex; flex-direction: column; align-items: stretch; gap: 14px; padding: 16px 28px 24px; background: #fff; font-size: 12px; }
.sheet-footer>.primary { min-height: 48px; width: 100%; justify-content: space-between; }
.sheet-footer>.primary>.icon { order: 2; }
.sheet-footer .picker-footer-start { justify-content: space-between; flex-wrap: wrap; gap: 6px 10px; }
.sheet-footer .picker-price { font-size: 12px; text-align: right; margin-left: auto; }
.sheet-footer .picker-price span { font-size: 11px; }
.sheet-footer .quiet { padding-inline: 0; font-size: 12px; }
.size-blocker { margin: 0; color: var(--muted); line-height: 1.5; }
.supported-size-options { display: grid; gap: 8px; margin-top: 20px; }
.supported-size-options button { width: 100%; min-height: 48px; justify-content: space-between; border-bottom: 1px solid var(--line); border-radius: 0; }
.supported-size-options .icon { order: 2; }
.sheet-topline { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -12px 0 24px; color: var(--muted); font-size: 12px; }
.sheet-topline .quiet { font-size: 12px; padding-inline: 0; }
.studio-sheet .material-options { gap: 16px; }
.studio-sheet .material-options button { padding: 0 0 16px; gap: 10px; border: 0; border-bottom: 2px solid var(--line); border-radius: 0; align-content: start; }
.studio-sheet .material-options [aria-pressed=true] { background: transparent; box-shadow: none; border-bottom-color: #202124; }
.studio-sheet .material-options .material-image { display: block; width: 100%; height: auto; aspect-ratio: 3/2; object-fit: contain; background: #f0f1f2; border-radius: 4px; }
.studio-sheet .material-options strong { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 14px; min-height: 28px; }
.material-check { width: 18px; height: 18px; border: 1px solid #c5c8ca; border-radius: 50%; flex: 0 0 18px; display: grid; place-items: center; }
.material-check .icon { width: 12px; height: 12px; visibility: hidden; }
[aria-pressed=true] .material-check { background: #202124; border-color: #202124; }
[aria-pressed=true] .material-check .icon { visibility: visible; filter: invert(1); }
.studio-sheet .material-description { font-size: 12px; line-height: 1.5; color: #60666b; min-height: 36px; }
.studio-sheet .paper-choices input { accent-color: #202124; }
.studio-sheet .method-options { display: block; margin: 0; padding: 0; }
.studio-sheet .method-option { padding: 4px 0 24px; border-bottom: 1px solid var(--line); }
.studio-sheet .method-option+ .method-option { padding: 24px 0; border: 0; }
.studio-sheet .method-title { gap: 8px; }
.studio-sheet .method-title h2 { font-size: 17px; }
.studio-sheet .offer { color: #336a55; font-size: 11px; }
.studio-sheet .method-option>p { margin: 10px 0 16px; font-size: 13px; }
.studio-sheet .method-option>button { min-height: 48px; }
.studio-sheet .choice-footnote { padding: 0; font-size: 11px; text-align: left; }
.studio-sheet .request-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px 10px; }
.studio-sheet .photo-name { font-size: 11px; }
.studio-sheet .request-actions { justify-content: space-between; gap: 10px; }
.studio-sheet .history-controls { display: flex; gap: 14px !important; }
.studio-sheet .empty-library { min-height: 210px; }
.designer-note { margin-top: 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.designer-note summary>.muted { margin-left: auto; font-size: 11px; }
.designer-note textarea { margin: 0 0 16px; }
.studio-sheet .service-terms { margin-top: 18px; }
.studio-upload { position: fixed; inset: 64px 0 0; padding: 0; margin: 0; width: 100%; max-width: none; height: calc(100svh - 64px); max-height: none; border-radius: 0; overflow: hidden; box-shadow: none; }
.studio-upload::backdrop { background: transparent; }
.studio-upload .studio-flow { height: 100%; }
.studio-upload .upload-drop { min-height: 210px; background: #f7f7f8; border: 1px dashed #c9ccce; gap: 18px; }
.studio-upload .upload-photos { max-height: none; gap: 10px; }
.upload-photo { position: relative; width: 100%; aspect-ratio: 1; padding: 6px; min-width: 0; border: 1px solid #e6e8e9; border-radius: 4px; background: #f5f6f6; }
.studio-upload .upload-photo>img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 0; }
.upload-photo>span { position: absolute; right: 4px; bottom: 4px; width: 24px; height: 24px; background: white; border-radius: 4px; display: grid; place-items: center; box-shadow: 0 1px 3px #0002; }
.studio-upload .upload-photo .icon { width: 14px; height: 14px; aspect-ratio: auto; }
.studio-upload .upload-footer { margin: 0; }
.studio-upload .sample-action { display: flex; margin: 12px auto 0; font-size: 12px; }
.upload-assurance { font-size: 12px; line-height: 1.7; color: var(--muted); margin-top: 20px; }
.design-included { margin: 0; color: #486557; font-size: 12px; }
.photo-preferences { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.photo-preferences button { min-height: 44px; flex: 1; font-size: 14px; white-space: normal; }
.photo-preferences [aria-pressed=true] { background: #202124; border-color: #202124; color: white; }
.photo-preferences [aria-pressed=true] .icon { filter: invert(1); }
@media (max-width: 900px) and (min-width: 761px) {
  .studio-flow { grid-template-columns: minmax(0,1fr) 390px; }
  .sheet-scroll, .sheet-footer { padding-inline: 22px; }
  .studio-sheet .picker-steps { margin-inline: 22px; }
  .studio-book { --studio-unit: min(1.1px,calc((100cqw - 76px) / var(--trim-w)),calc((100cqh - 160px) / var(--trim-h))); }
}
@media (max-width: 760px) {
  .topbar.studio-header { height: 56px; min-height: 56px; padding: 8px 16px; }
  .studio-header .brand img { width: 64px; }
  .studio-header .preview-label { font-size: 11px; }
  .studio-header .header-actions { flex-direction: row; align-items: center; gap: 8px; }
  .feedback-fab { min-width: 40px; padding: 6px; }
  .intake-stage .intake-cover-title.empty { display: none !important; }
  .feedback-fab span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
  .uploading .topbar { height: 56px; min-height: 56px; padding: 8px 16px; }
  .uploading .topbar .brand img { width: 64px; }
  .studio-flow { grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(150px,28svh) minmax(0,1fr); height: calc(100svh - 56px); }
  .studio-sheet { border-left: 0; border-top: 1px solid var(--rule); }
  .studio-book-stage { padding: 16px 40px 38px; }
  .studio-book { --studio-unit: min(1.15px,calc((100cqw - 100px) / var(--trim-w)),calc((100cqh - 66px) / var(--trim-h))); box-shadow: inset 5px 0 0 #2a2927, inset 6px 0 0 #4e4b46, 1px 1px 0 #f7f5f0, 2px 2px 0 #dad6cd, 3px 3px 0 #f7f5f0, 4px 4px 0 #cfcac0, 0 16px 26px -14px #00000055, 0 1px 3px #0000001a; }
  .studio-book>img { inset: 0 0 0 6px; width: calc(100% - 6px); border-radius: 0 2px 2px 0; }
  .studio-book>span { font-size: 12px; left: calc(6px + 8%); }
  .studio-scene-caption { bottom: 12px; font-size: 11px; line-height: 1.3; }
  .studio-scene-caption span { display: inline; font-size: 10px; padding-left: 10px; }
  .material-view .studio-book-stage { padding: 0 0 48px; }
  .material-view .studio-scene-caption { left: 20px; right: 124px; bottom: 12px; text-align: left; line-height: 1.5; }
  .material-view .studio-scene-caption span { display: block; padding: 0; }
  .material-view [data-action=config-inspect-material] { right: 12px; bottom: 6px; font-size: 11px; gap: 6px; }
  .studio-visual .material-spread { width: min(280px,74cqw); max-height: calc(100cqh - 64px); }
  .sheet-scroll { padding: 20px 22px 18px; }
  .studio-sheet .picker-steps { margin: 0 22px; gap: 10px; }
  .studio-sheet .picker-steps button { padding-block: 12px; font-size: 11px; }
  .studio-sheet .picker-heading { padding-bottom: 16px; }
  .studio-sheet h1, .studio-sheet #upload-title { font-size: 26px; }
  .studio-sheet .shape-tabs { margin-bottom: 8px; }
  .studio-sheet .shape-tabs button { height: 90px; gap: 7px; }
  .studio-sheet .format-options button { min-height: 60px; }
  .sheet-footer { gap: 10px; padding: 12px 22px max(16px,env(safe-area-inset-bottom)); }
  .sheet-footer .picker-footer-start { gap: 0 10px; }
  .sheet-footer .picker-price { grid-template-columns: auto; }
  .sheet-footer .picker-price span { display: none; }
  .sheet-topline { margin: -8px 0 16px; }
  .studio-sheet .method-option { padding-bottom: 20px; }
  .studio-sheet .method-option+ .method-option { padding: 20px 0; }
  .studio-sheet .method-option>p { margin: 8px 0 12px; }
  .studio-upload { inset-block-start: 56px; height: calc(100svh - 56px); }
  .studio-upload .upload-drop { min-height: 180px; gap: 14px; }
  .studio-upload .upload-drop>.icon { width: 28px; height: 28px; flex-basis: 28px; }
}
@media (max-height: 620px) and (max-width: 760px) {
  .studio-flow { grid-template-rows: 120px minmax(0,1fr); }
  .studio-book>span { display: none; }
  .studio-sheet .picker-steps button { min-height: 38px; padding-block: 8px; }
}
}
@media (prefers-reduced-motion: no-preference) {
  .studio-sheet .shape-tabs button, .size-radio, .material-check { transition: background-color 120ms, border-color 120ms; }
  .studio-material-image { animation: material-appear 140ms ease-out; }
}
@keyframes material-appear { from { opacity: .65; } to { opacity: 1; } }

/* ---------- Designer intake: hand photographs to IROHAS ---------- */
.designer-intake { grid-template-columns: minmax(0,1fr) minmax(440px,40%); }
.designer-intake :focus-visible { outline-color: var(--ink); }
.designer-intake>.studio-sheet { background: var(--sheet); }
.designer-intake .sheet-scroll { padding: 0 36px 28px; }
.book-summary { display: flex; align-items: center; gap: 12px; flex: none; padding: 14px 36px; border-bottom: 1px solid var(--rule); background: var(--sheet); }
.book-summary>div { flex: 1; min-width: 0; }
.book-summary strong { display: block; font-size: 13px; font-weight: 500; line-height: 1.5; }
.book-summary span { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.book-summary button { flex: none; min-height: 36px; padding: 6px 12px; font-size: 12.5px; border: 1px solid #cfccc4; background: #fff; }
.book-summary button .icon { width: 14px; height: 14px; flex-basis: 14px; }

.cover-placeholder { position: absolute; inset: 12% 12% 12% calc(10px + 12%); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; margin: 0; border: 1px solid #d3cfc6; color: #8c8980; }
.cover-placeholder .icon { width: 26px; height: 26px; opacity: .45; position: static; }
.cover-placeholder small { font-size: 12px; }
@media (max-width: 760px) { .cover-placeholder small { display: none; } .cover-placeholder .icon { width: 16px; height: 16px; } }
.intake-cover-title { max-width: 82%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-style: italic; }
.intake-cover-title.empty { color: #8c8980 !important; text-shadow: none; }
/* The cover photograph is the hero; loose prints would only compete with it. */
.intake-prints { display: none; }
.intake-prints img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #fff; border: 4px solid #fff; box-shadow: 0 10px 18px -10px #0007, 0 1px 2px #0002; transform: translate(calc(var(--i) * -62%), calc(var(--i) * 10%)); }

.intake-heading { padding: 36px 0 30px !important; }
.designer-intake .intake-heading h1 { font: 400 36px/1.1 var(--serif); letter-spacing: -.015em; }
.intake-steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 26px 0 0; padding: 0; }
.intake-steps li { counter-increment: step; border-top: 1px solid var(--rule); padding-top: 10px; font-size: 12px; line-height: 1.45; color: var(--muted); }
.intake-steps li::before { content: counter(step); display: block; margin-bottom: 4px; font: 400 14px/1 var(--serif); color: var(--muted); }
.intake-steps li.current { border-top-color: var(--ink); color: var(--ink); }
.intake-steps li.current::before { color: var(--ink); }

.designer-intake .request-photos, .intake-wishes { padding: 28px 0; border-top: 1px solid var(--rule); }
.designer-intake .section-heading { min-height: 32px; margin-bottom: 6px; }
.designer-intake .section-heading h2 { font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.designer-intake .section-heading h2 span { color: var(--muted); font-weight: 400; margin-left: 6px; }
.designer-intake .history-controls button { min-height: 32px; padding: 4px 6px; font-size: 12px; }
.intake-hint { font-size: 12.5px; line-height: 1.5; color: var(--muted); margin-bottom: 16px; }

.designer-intake .request-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; }
.intake-tile { animation: tile-in 260ms cubic-bezier(.2,.7,.2,1) both; }
.intake-tile .photo-image { aspect-ratio: 4/5; padding: 0; background: var(--cell); border-radius: 1px; overflow: hidden; }
.intake-tile .photo-image img { object-fit: cover; transition: transform 400ms cubic-bezier(.2,.7,.2,1); }
.intake-tile .photo-image:hover { background: var(--cell) !important; }
.intake-tile .photo-image:hover img { transform: scale(1.03); }
.intake-tile.reading .photo-image img { filter: blur(5px) saturate(.4); opacity: .55; }
.intake-tile.reading::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: 10px; height: 2px; background: #ffffffb0; }
.tile-actions { position: absolute; inset: 0 0 auto; display: flex; justify-content: space-between; align-items: flex-start; padding: 5px; pointer-events: none; }
.tile-actions button { pointer-events: auto; }
.tile-marks { display: flex; gap: 4px; }
.tile-mark, .intake-tile .remove-photo { position: static; width: 28px; height: 28px; min-height: 28px; padding: 0; display: grid; place-items: center; border-radius: 1px; background: #fffffff0; box-shadow: 0 1px 3px #0002; }
.tile-mark .icon, .intake-tile .remove-photo .icon { width: 14px; height: 14px; flex-basis: 14px; padding: 0; background: none; border-radius: 0; }
.tile-mark[aria-pressed=true] { background: var(--ink) !important; }
.tile-mark[aria-pressed=true] .icon { filter: invert(1); }
.tile-mark:hover:not([aria-pressed=true]) { background: white !important; }
.intake-tile .remove-photo { background: #1c1c1bd9; }
.intake-tile .remove-photo .icon { filter: invert(1); }
.intake-tile .remove-photo:hover { background: var(--ink) !important; }
@media (hover: hover) {
  .tile-marks .tile-mark[aria-pressed=false], .intake-tile .remove-photo { opacity: 0; transition: opacity 160ms; }
  .intake-tile:hover .tile-mark, .intake-tile:hover .remove-photo, .intake-tile:focus-within .tile-mark, .intake-tile:focus-within .remove-photo { opacity: 1; }
}
.intake-tile .photo-tags { position: absolute; left: 5px; bottom: 5px; display: flex; flex-wrap: wrap; gap: 3px; margin: 0; pointer-events: none; }
.intake-tile .photo-tags span { background: #fff; color: var(--ink); font-size: 10px; letter-spacing: .04em; text-transform: uppercase; line-height: 1; padding: 5px 6px; border-radius: 1px; animation: tag-in 220ms ease-out both; }
.low-res { position: absolute; right: 9px; bottom: 9px; width: 9px; height: 9px; border-radius: 50%; background: #b7791f; box-shadow: 0 0 0 2px white; }
.add-tile { aspect-ratio: 4/5; height: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1px solid #cfccc4; border-radius: 1px; color: var(--ink-2); font-size: 12px; }
.add-tile:hover:not(:disabled) { background: transparent !important; border-color: var(--ink); color: var(--ink); }
.add-tile .icon { width: 20px; height: 20px; opacity: .7; }

.designer-intake .intake-upload { min-height: 240px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 28px 20px; text-align: center; background: var(--sheet); border: 1px solid var(--rule); border-radius: 1px; transition: border-color 160ms, background-color 160ms; }
.designer-intake .intake-upload p { color: var(--muted); font-size: 12px; line-height: 1.5; }
.designer-intake .intake-upload.drag-over, .designer-intake .request-grid.drag-over { border-color: var(--ink); background: #00000008; }
.designer-intake .intake-upload .intake-invite { font: italic 400 21px/1.3 var(--serif); color: var(--ink); }
.step-short { display: none; }
@media (hover: none) { .drag-hint { display: none; } }
.designer-intake .intake-upload .primary { min-height: 48px; }
.designer-intake .intake-upload p:last-child { font-size: 12px; }
.sample-link { margin-top: 10px; padding-left: 0 !important; font-size: 12.5px; font-weight: 400; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.sample-link .icon { display: none; }
.intake-status { margin-top: 12px; display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); }
.intake-status:empty { display: none; }
.note-low::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: #b7791f; }
.import-progress { display: flex; align-items: center; gap: 12px; }
.progress-bar { flex: 1; height: 2px; background: var(--rule); position: relative; overflow: hidden; }
.progress-bar i { position: absolute; inset: 0 auto 0 0; background: var(--ink); transition: width 200ms ease-out; }
.import-progress button { min-height: 32px; padding: 4px 6px; font-size: 12px; }
.import-progress button .icon { width: 14px; height: 14px; flex-basis: 14px; }

.wish-group+.wish-group { margin-top: 18px; }
.wish-group>p { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.wish-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wish-chip { min-height: 36px; padding: 6px 12px; border: 1px solid #cfccc4; border-radius: 2px; background: #fff; font-size: 13px; line-height: 1.3; text-align: left; white-space: normal; transition: background-color 140ms, color 140ms, border-color 140ms; }
.wish-chip:hover:not(:disabled) { background: #fff; border-color: var(--ink); }
.wish-chip[aria-pressed=true], .wish-chip[aria-pressed=true]:hover { background: var(--ink); border-color: var(--ink); color: white; }
.line-field { display: block; margin-top: 22px; }
.line-field>span { display: block; font-size: 12px; color: var(--muted); }
.designer-intake .line-field input, .designer-intake .line-field textarea { display: block; width: 100%; min-height: 0; margin: 0; padding: 8px 0; border: 0; border-bottom: 1px solid #cfcdc7; border-radius: 0; background: transparent; color: var(--ink); font-size: 16px; line-height: 1.5; resize: none; outline: none; transition: border-color 160ms; }
.designer-intake .line-field input:focus, .designer-intake .line-field textarea:focus { border-bottom-color: var(--ink); }
.designer-intake .line-field input::placeholder, .designer-intake .line-field textarea::placeholder { color: #a09e97; }
.designer-intake .intake-promise { margin: 0; padding-top: 4px; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.designer-intake .self-design-link { margin-top: 8px; padding-left: 0; font-size: 12.5px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.designer-intake .self-design-link .icon { width: 14px; height: 14px; flex-basis: 14px; }

.intake-footer { flex-direction: row !important; align-items: center !important; justify-content: space-between; gap: 16px !important; padding: 14px 36px !important; background: #fff !important; border-top-color: var(--rule) !important; box-shadow: 0 -16px 24px -20px #0000001f; }
.intake-summary { min-width: 0; font-size: 12px; line-height: 1.45; color: var(--muted); }
.intake-summary b { display: block; font-size: 13px; font-weight: 500; color: var(--ink); }
.intake-footer>.primary { width: auto !important; min-height: 48px; flex: none; gap: 12px; }

.review-photos figure { position: relative; margin: 0; }
.review-photos figcaption { position: absolute; left: 4px; bottom: 4px; background: white; font-size: 10px; line-height: 1; padding: 4px 5px; border-radius: 2px; }
.review-more { display: grid; place-items: center; font-size: 13px; color: var(--muted); background: var(--wash); }

@keyframes tile-in { from { opacity: 0; transform: scale(.96); } }
@keyframes tag-in { from { opacity: 0; transform: translateY(3px); } }

@media (max-width: 900px) and (min-width: 761px) {
  .designer-intake { grid-template-columns: minmax(0,1fr) 420px; }
  .designer-intake .sheet-scroll, .book-summary, .intake-footer { padding-inline: 24px !important; }
  .designer-intake .request-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .designer-intake { grid-template-columns: minmax(0,1fr); grid-template-rows: 132px minmax(0,1fr); }
  .intake-stage .studio-book-stage { padding: 14px 40px 14px; }
  .intake-stage .studio-scene-caption, .intake-cover-title { display: none; }
  .intake-prints { width: 46px; right: 10%; bottom: 18px; top: auto; }
  .intake-prints img { border-width: 2px; }
  .designer-intake .sheet-scroll { padding: 0 18px 22px; }
  .book-summary { display: none; }
  .intake-heading { padding: 24px 0 24px !important; }
  .designer-intake .intake-heading h1 { font-size: 28px; }
  .intake-steps { gap: 8px; margin-top: 18px; }
  .intake-steps li { font-size: 12px; padding-top: 10px; }
  .intake-steps li::before { display: inline; margin: 0 6px 0 0; font-size: 13px; }
  .step-long { display: none; }
  .step-short { display: inline; }
  .designer-intake .request-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px; }
  .tile-mark, .intake-tile .remove-photo { width: 26px; height: 26px; min-height: 26px; }
  .intake-footer { padding: 12px 18px calc(12px + env(safe-area-inset-bottom)) !important; }
  .intake-summary span { display: none; }
  .intake-footer>.primary { padding-inline: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .intake-tile, .intake-tile .photo-tags span { animation: none; }
  .intake-tile .photo-image img, .progress-bar i { transition: none; }
}

/* Design request summary */
.design-request { width: min(720px,calc(100% - 32px)); padding: 32px 36px; }
.design-request .dialog-heading { margin-bottom: 18px; }
.design-request .dialog-heading h2 { font: 400 28px/1.15 var(--serif); letter-spacing: -.015em; }
.design-request .review-photos { display: grid; grid-template-columns: repeat(8,minmax(0,1fr)); gap: 4px; overflow: visible; margin-top: 0; }
.design-request .review-photos img { width: 100%; height: auto; aspect-ratio: 4/5; object-fit: cover; display: block; background: var(--cell); border-radius: 1px; }
.design-request .review-more { aspect-ratio: 4/5; border-radius: 1px; }
.design-request .review-details { margin: 16px 0 0; font-size: 13.5px; }
.design-request .review-details>div { padding: 11px 0; }
.design-request .review-details dd { color: var(--ink-2); }
.design-request .review-details dt { font-size: 12px; }
.request-book-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 18px; font-size: 13.5px; color: var(--ink-2); }
.request-book-line strong { font-weight: 500; color: var(--ink); }
.request-book-line .link-button { padding: 0; font-size: 13px; }
.review-summary { margin-top: 26px; border-top: 1px solid var(--rule); padding-top: 22px; }
.review-summary h3 { margin: 0 0 12px; font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.review-summary h3 span { color: var(--muted); font-weight: 400; margin-left: 6px; }
.review-summary .brief-review { margin: 12px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.design-request .preview-notice { margin: 18px 0 20px; }
@media (max-width: 760px) {
  .design-request { padding: 22px 20px; }
  .design-request .review-photos { grid-template-columns: repeat(6,minmax(0,1fr)); }
  .design-request .review-details>div { flex-direction: column; gap: 2px; }
  .design-request .review-details dd { text-align: left; }
}
.intake-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin-top: 8px; }
.designer-intake .intake-links .self-design-link { margin-top: 0; }
.start-over-link { padding-inline: 0 !important; font-size: 12.5px; color: var(--muted); }
.start-over-link .icon { width: 14px; height: 14px; flex-basis: 14px; opacity: .6; }

/* Picker refinements */
.studio-sheet .shape-tabs button { height: 116px; }
.shape-preview { width: 80px; height: 64px; }
.shape-preview img { width: 54px; height: 54px; }
.shape-preview.portrait img { width: 42px; height: 58px; }
.shape-preview.landscape img { width: 72px; height: 50px; }
.studio-sheet .paper-choices { border-top: 0; margin-top: 28px; padding-top: 0; }
.studio-sheet .paper-choices legend { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 0 0 8px; }
@media (max-width: 760px) {
  .studio-sheet .shape-tabs button { height: 96px; }
  .shape-preview { height: 52px; }
  .shape-preview img { width: 44px; height: 44px; }
  .shape-preview.portrait img { width: 34px; height: 47px; }
  .shape-preview.landscape img { width: 58px; height: 40px; }
}
.photo-quality { margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.photo-quality.is-low::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: #b7791f; }
.photo-inspection .photo-preferences [aria-pressed=true] .icon { filter: invert(1); }

/* Editor refinements */
.paper-options { align-items: center; gap: 4px; padding: 2px; border: 1px solid var(--line); border-radius: 999px; background: white; }
.paper-options .paper-label { padding: 0 6px 0 10px; font-size: 12px; color: var(--muted); }
.paper-options button { width: auto; min-height: 32px; display: inline-flex; gap: 6px; align-items: center; padding: 4px 12px 4px 8px; border-radius: 999px; font-size: 12px; }
.paper-options button::before { width: 12px; height: 12px; }
.paper-options button[aria-pressed=true] { background: #202124 !important; color: white; }
.paper-options button[aria-pressed=true]::before { outline: 0; border-color: #ffffff80; }
@media (hover: hover) {
  .thumb-delete { opacity: 0; transition: opacity 140ms; }
  .page-thumb-wrap:hover .thumb-delete, .page-thumb-wrap:focus-within .thumb-delete, .page-thumb[aria-current=page]+.thumb-delete { opacity: 1; }
}
#notice { bottom: auto; top: 150px; animation: notice-in 200ms ease-out; }
@keyframes notice-in { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (prefers-reduced-motion: reduce) { #notice { animation: none; } }

/* One accent: ink. Replaces the blue used for focus and selection. */
:root { --green: #202124; }
.label-page { display: none; }
@media (max-width: 760px) {
  .label-spread { display: none; }
  .label-page { display: inline; }
  .mobile-nav [aria-pressed=true] { background: #f1f1ef; color: var(--ink); }
  #notice { top: 150px; bottom: auto; }
}
/* Headlines share the serif used on the book cover. */
.studio-sheet h1, .studio-sheet #upload-title { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; }
.studio-sheet .offer { color: var(--muted); }

/* Self-design upload sheet: same photo tiles as the designer intake */
.studio-upload .upload-photos { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
.studio-upload .upload-photo { aspect-ratio: 4/5; padding: 0; border: 0; border-radius: 2px; background: #ececea; overflow: hidden; }
.studio-upload .upload-photo>img { object-fit: cover; transition: transform 400ms cubic-bezier(.2,.7,.2,1); }
.studio-upload .upload-photo:hover { background: #ececea !important; }
.studio-upload .upload-photo:hover>img { transform: scale(1.03); }
.studio-upload .upload-photo>span { opacity: 0; transition: opacity 160ms; }
.studio-upload .upload-photo:hover>span, .studio-upload .upload-photo:focus-visible>span { opacity: 1; }
.studio-upload .upload-drop { border-color: #c4c2bb; background: transparent; border-radius: 2px; }
.upload-progress { margin-top: 14px; }
@media (hover: none) { .studio-upload .upload-photo>span { display: none; } }

/* ---------- Phones ---------- */
@media (max-width: 760px) {
  .topbar.studio-header { padding-top: max(8px, env(safe-area-inset-top)); height: calc(56px + env(safe-area-inset-top)); min-height: 0; }
  .studio-flow, .designer-intake { height: calc(100svh - 56px - env(safe-area-inset-top)); }
  body.typing .intake-footer { display: none; }
}

/* ---------- Touch: photo sheet and long press ---------- */
.hint-touch { display: none; }
.intake-tile { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.sheet-remove { margin-top: 8px; width: 100%; color: #8a3a2e; font-size: 13px; }
.sheet-remove .icon { width: 14px; height: 14px; flex-basis: 14px; }
.photo-sheet .photo-preferences [aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: white; }
@media (hover: none) {
  .hint-pointer { display: none; }
  .hint-touch { display: inline; }
  .intake-tile .tile-actions { display: none; }
}
@media (pointer: coarse) {
  .wish-chip { min-height: 44px; padding-inline: 16px; }
  .designer-intake .history-controls button, .import-progress button { min-height: 44px; padding-inline: 10px; }
  .paper-options button { min-height: 40px; }
  .designer-intake .request-grid { gap: 6px; }
  .book-summary button { min-height: 44px; }
}
@media (max-width: 760px) {
  dialog.photo-sheet, dialog.design-request { margin: auto 0 0; width: 100%; max-width: none; max-height: 92svh; border-radius: 14px 14px 0 0; padding: 12px 18px calc(18px + env(safe-area-inset-bottom)); }
  dialog.photo-sheet::before, dialog.design-request::before { content: ""; display: block; width: 36px; height: 4px; margin: 0 auto 10px; border-radius: 2px; background: #d6d5d1; }
  dialog.photo-sheet[open], dialog.design-request[open] { animation: sheet-up 220ms cubic-bezier(.2,.7,.2,1); }
  .photo-sheet .dialog-heading { margin-bottom: 12px; }
  .photo-sheet .dialog-heading h2 { font-size: 15px; }
  .photo-sheet .inspect-photo { max-height: 46svh; }
  .photo-sheet .photo-preferences { gap: 8px; margin-top: 14px; }
  .photo-sheet .photo-preferences button { min-height: 52px; }
  /* Keep the book specification and its Change button on phones. */
  .designer-intake .book-summary { display: flex; padding: 8px 18px; gap: 10px; }
  .designer-intake .book-summary strong { font-size: 12px; }
  .designer-intake .book-summary>div span { display: none; }
  .designer-intake .book-summary button { flex-direction: row; font-size: 12px; padding: 6px 10px; }
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: .6; } }
@media (prefers-reduced-motion: reduce) { dialog.photo-sheet[open], dialog.design-request[open] { animation: none; } }
@media (max-width: 760px) {
  /* Toasts sit over the decorative stage, never over controls. */
  #notice { top: calc(68px + env(safe-area-inset-top)); bottom: auto; font-size: 12.5px; }
}

/* ---------- Phones: layout ---------- */
.summary-short { display: none !important; }
@media (max-width: 760px) {
  /* Stage: generous at first, then gives way to the photographs. */
  .designer-intake { grid-template-rows: 176px minmax(0,1fr); transition: grid-template-rows 240ms cubic-bezier(.2,.7,.2,1); }
  .designer-intake.stage-compact { grid-template-rows: 84px minmax(0,1fr); }
  .designer-intake .studio-book { transition: transform 240ms cubic-bezier(.2,.7,.2,1); }
  .designer-intake .intake-prints { transition: opacity 200ms; }
  .designer-intake.stage-compact .intake-prints { opacity: 0; }
  .designer-intake .intake-cover-title { display: block; font-size: 10px; }
  .designer-intake.stage-compact .intake-cover-title { display: none; }
  .intake-prints { width: 56px; right: 10%; bottom: 20px; }

  /* Wishes wrap on phones too: every option is readable without swiping. */
  .wish-chip { min-height: 38px; padding: 7px 12px; }

  /* Footer: one line. */
  .summary-long { display: none !important; }
  .summary-short { display: block !important; }
  .intake-footer>.primary { min-height: 48px; padding-inline: 20px; }
  .label-long { display: none; }

  /* Editor: one compact header row plus an icon-only context row. */
  .topbar:has(+ .editor-view) { height: calc(56px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 14px 0; }
  .topbar:has(+ .editor-view) .brand img { width: 62px; }
  .topbar:has(+ .editor-view) .preview-label { display: none; }
  .topbar:has(+ .editor-view) .header-actions { flex-direction: row; align-items: center; gap: 4px; }
  .topbar:has(+ .editor-view) .header-actions .primary { min-height: 40px; padding: 8px 14px; font-size: 13px; }
  .editor-view { height: calc(100svh - 56px - env(safe-area-inset-top)); }
  .editor-context { min-height: 48px; padding: 0 6px; }
  .editor-context .quiet { min-width: 44px; padding-inline: 10px; }
  .editor-context .quiet>span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
  .photo-tools { position: sticky; bottom: 0; z-index: 1; background: #f5f5f3; box-shadow: 0 -12px 16px -12px #0000001a; }
  body:has(.editor-view) #notice { top: calc(112px + env(safe-area-inset-top)); }
}
@media (max-width: 760px) {
  .designer-intake { grid-template-rows: 160px minmax(0,1fr); }
  .designer-intake.stage-compact { grid-template-rows: 72px minmax(0,1fr); }
  .intake-prints { right: 8%; bottom: 20px; width: 52px; }
  .designer-intake .book-summary button { min-height: 44px; }
  .intake-heading { padding: 20px 0 20px !important; }
  .designer-intake .intake-heading h1 { font-size: 26px; }
  .designer-intake .request-photos, .intake-wishes { padding: 22px 0; }
}
@media (max-width: 380px) {
  .designer-intake .book-summary strong { font-size: 11.5px; }
  .designer-intake .intake-heading h1 { font-size: 24px; }
}
.topbar .brand { display: flex; align-items: center; min-height: 44px; }
@media (max-width: 760px) {
  /* Once scrolled, the stage folds away entirely; the spec bar keeps the book in view. */
  .designer-intake.stage-compact { grid-template-rows: 0 minmax(0,1fr); }
  .designer-intake .intake-stage { transition: opacity 200ms; }
  .designer-intake.stage-compact .intake-stage { opacity: 0; }
  .designer-intake.stage-compact>.studio-sheet { border-radius: 0; }
}

.many-photos { margin-top: 12px; }

/* ---------- Arrange order: a quiet contact sheet ---------- */
.photo-heading-actions { display: flex; align-items: center; gap: 4px; }
.arrange-toggle { min-height: 36px; padding: 6px 12px; font-size: 12.5px; border: 1px solid #cfcdc7; border-radius: 999px; }
.arrange-toggle[aria-pressed=true] { border-color: var(--ink); }
.arrange-toggle .icon { width: 14px; height: 14px; flex-basis: 14px; }
.request-grid.arranging { row-gap: 10px; }
.arrange-tile { cursor: grab; touch-action: manipulation; outline-offset: 3px; }
.arrange-tile .photo-image { display: block; box-shadow: 0 0 0 1px #00000010; }
.arrange-tile img { pointer-events: none; -webkit-user-drag: none; }
.tile-number { display: block; margin-top: 6px; font-size: 11px; letter-spacing: .08em; color: var(--muted); font-variant-numeric: tabular-nums; }
/* The slot the lifted photograph will drop into. */
.arrange-tile.drag-source .photo-image { background: #e9e8e4; box-shadow: inset 0 0 0 1px #d9d7d1; }
.arrange-tile.drag-source img { opacity: 0; }
.arrange-tile.drag-source .tile-number { color: var(--ink); }
.drag-ghost { position: fixed; left: 0; top: 0; z-index: 50; pointer-events: none; border-radius: 2px; overflow: hidden; box-shadow: 0 22px 40px -14px #0000007a, 0 2px 6px #0000001f; }
.drag-ghost img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.03); }
body.dragging, body.dragging * { cursor: grabbing !important; -webkit-user-select: none; user-select: none; }
@media (hover: hover) { .arrange-tile:hover .photo-image { box-shadow: 0 0 0 1px #00000026, 0 6px 14px -8px #0000004d; } }
@media (pointer: coarse) { .arrange-toggle { min-height: 44px; padding-inline: 14px; } }
@media (max-width: 760px) {
  /* Keep "Photographs 12" on one line: history controls become icons. */
  .photo-heading-actions .history-controls .quiet>span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
  .photo-heading-actions .history-controls .quiet { min-width: 44px; padding-inline: 10px; }
  .designer-intake .section-heading h2 { white-space: nowrap; }
}

/* Send to IROHAS */
.send-area { margin-top: 0; }
.send-form h3 { margin: 0; font: 400 20px/1.3 var(--serif); color: var(--ink); }
.send-form .line-field { margin-top: 18px; }
.send-form .line-field em { font-style: normal; color: #9a9ca1; }
.send-form .line-field input { display: block; width: 100%; min-height: 0; margin: 0; padding: 8px 0; border: 0; border-bottom: 1px solid #cfccc4; border-radius: 0; background: transparent; color: var(--ink); font-size: 16px; line-height: 1.5; outline: none; transition: border-color 160ms; }
.send-form .line-field input:focus { border-bottom-color: var(--ink); }
.send-form .line-field.has-error input { border-bottom-color: #b3261e; }
.field-error { display: block; margin-top: 6px; font-size: 12.5px; color: #b3261e; }
.send-note { margin: 18px 0 0; font-size: 13px; line-height: 1.55; color: var(--muted); }
.send-error { margin: 14px 0 0; padding: 12px 14px; border-radius: 2px; border-left: 2px solid #8c1d18; background: #faf3f2; color: #7a1a15; font-size: 13.5px; line-height: 1.5; }
.send-footer { margin-top: 24px; display: flex; justify-content: space-between; gap: 10px; }
.send-footer:empty { display: none; }
.send-error { margin: 0 0 18px !important; }
.send-progress-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0; font-size: 14px; }
.send-progress-title span { color: var(--muted); font-variant-numeric: tabular-nums; }
.send-bar { height: 3px; margin-top: 14px; border-radius: 0; background: #e8e5de; overflow: hidden; }
.send-bar span { display: block; height: 100%; width: 0; background: var(--ink); transition: width 300ms ease-out; }
.send-hint { margin: 14px 0 0; font-size: 13px; line-height: 1.55; color: var(--muted); }
.sent-body { margin-top: 16px; font-size: 15px; line-height: 1.6; color: var(--ink); }
.sent-body p { margin: 0 0 12px; }
.sent-reference { padding: 14px 16px; border-radius: 2px; background: var(--wash); font-size: 14px; }
.sent-reference strong { font-size: 16px; letter-spacing: .02em; margin-left: 6px; }
.design-request .comparison-footer a.secondary { color: var(--ink); text-decoration: none; }
.preview-send { margin-top: 18px; display: flex; justify-content: space-between; gap: 10px; }
@media (max-width: 760px) {
  .design-request > .comparison-footer { position: sticky; bottom: -22px; z-index: 2; margin: 22px -20px -22px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--rule, #e4e2dc); }
  .design-request > .comparison-footer > * { flex: 1; }
  .send-footer .label-long { display: none; }
}
@media (prefers-reduced-motion: reduce) { .send-bar span { transition: none; } }
@media (min-width: 761px) {
  .send-form { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
  .send-form > h3, .send-form > .send-note, .send-form > .send-error { grid-column: 1 / -1; }
  .design-request > .comparison-footer { position: sticky; bottom: -32px; z-index: 2; margin: 24px -36px -32px; padding: 16px 36px; background: #fff; border-top: 1px solid var(--rule, #e4e2dc); }
}

/* Book sheet: one screen, changeable at any time */
dialog.book-sheet { width: min(640px, calc(100% - 32px)); padding: 28px 32px 24px; }
.book-sheet .dialog-heading h2 { font: 400 26px/1.2 var(--serif); display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.book-sheet-sub { font: 400 13px/1.4 var(--sans); color: var(--muted); }
.book-sheet-body { margin-top: 4px; }
.book-sheet .sheet-shapes { display: flex; gap: 8px; margin: 0 0 14px; padding: 0; background: transparent; border-radius: 0; }
.book-sheet .sheet-shapes button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; height: 84px; padding: 8px 4px; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; background: transparent; font-size: 12px; color: var(--muted); }
.book-sheet .sheet-shapes [aria-pressed=true] { background: transparent; box-shadow: none; border-bottom: 2px solid var(--ink); color: var(--ink); }
.book-sheet .shape-preview { width: 56px; height: 44px; }
.book-sheet .shape-preview img { width: 36px; height: 36px; }
.book-sheet .shape-preview.portrait img { width: 28px; height: 38px; }
.book-sheet .shape-preview.landscape img { width: 46px; height: 32px; }
.size-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.size-card { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 118px; padding: 12px 6px 10px; border: 1px solid var(--rule); border-radius: 2px; background: #fff; color: var(--ink); text-align: center; transition: border-color 140ms, background-color 140ms, transform 140ms; }
.size-card:hover { border-color: #b8b5ad; }
.size-card[aria-pressed=true] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: #fff; }
.size-card:active { transform: scale(.97); }
.size-shape { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; }
.size-shape i { display: block; background: #dedbd3; border-left: 2px solid #b9b5ac; box-shadow: 2px 2px 0 #eeece6; transition: width 180ms, height 180ms; }
.size-card[aria-pressed=true] .size-shape i { background: var(--ink); border-left-color: #000; box-shadow: 2px 2px 0 #cfccc4; }
.size-card strong { font-size: 13px; font-weight: 500; line-height: 1.25; }
.size-card small { font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.size-card[aria-pressed=true] small { color: var(--ink); }
.sheet-label { margin: 22px 0 8px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.choice-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.choice-card { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 2px; background: #fff; color: var(--ink); text-align: left; transition: border-color 140ms, background-color 140ms; }
.choice-card strong { font-size: 14px; font-weight: 500; }
.choice-card span { font-size: 12px; color: var(--muted); line-height: 1.4; }
.choice-card[aria-pressed=true] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: #fff; }
.sheet-included { margin: 22px 0 0; font-size: 13px; color: var(--muted); }
.sheet-note { margin: 20px 0 0; font-size: 13px; line-height: 1.55; color: var(--muted); }
.book-sheet-footer { margin-top: 22px; display: flex; justify-content: space-between; gap: 10px; }
.link-button { background: none; border: 0; padding: 0 0 0 8px; font: inherit; font-size: 13px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.book-settle { animation: book-settle 320ms cubic-bezier(.2,.7,.2,1); }
@keyframes book-settle { from { opacity: .55; transform: scale(.97); } to { opacity: 1; transform: scale(1); } }
.intake-stage .studio-book { transition: width 260ms cubic-bezier(.2,.7,.2,1), height 260ms cubic-bezier(.2,.7,.2,1); }
@media (max-width: 760px) {
  dialog.book-sheet { margin: auto 0 0; width: 100%; max-width: none; max-height: 88svh; border-radius: 10px 10px 0 0; padding: 12px 18px calc(16px + env(safe-area-inset-bottom)); }
  dialog.book-sheet::before { content: ""; display: block; width: 36px; height: 4px; margin: 0 auto 10px; border-radius: 2px; background: #d6d5d1; }
  dialog.book-sheet[open] { animation: sheet-up 240ms cubic-bezier(.2,.7,.2,1); }
  .book-sheet .dialog-heading h2 { font-size: 22px; }
  .size-cards { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .size-card { min-height: 104px; padding: 10px 4px 8px; }
  .size-shape { width: 52px; height: 52px; }
  .size-shape i { transform: scale(.8); }
  .book-sheet-footer { position: sticky; bottom: calc(-16px - env(safe-area-inset-bottom)); z-index: 2; margin: 18px -18px calc(-16px - env(safe-area-inset-bottom)); padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--rule, #e4e2dc); }
  .book-sheet-footer > * { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { .book-settle, dialog.book-sheet[open] { animation: none; } .intake-stage .studio-book, .size-shape i { transition: none; } }

/* Preview from the top bar: the book and photographs as they stand. */
.preview-button { min-height: 40px; padding: 6px 12px; font-size: 13px; }
.label-short { display: none; }
.preview-button .icon { width: 16px; height: 16px; flex-basis: 16px; }
dialog.material-preview { width: min(760px, calc(100% - 32px)); padding: 32px 36px; }
.material-preview .dialog-heading { margin-bottom: 14px; }
.material-preview .dialog-heading h2 { font: 400 28px/1.15 var(--serif); letter-spacing: -.015em; }
.preview-note { margin: 0; padding: 12px 14px; border-left: 2px solid var(--ink); background: var(--sheet); font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.preview-stage { position: relative; display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 28px; margin-top: 22px; padding: 28px; background: var(--paper); }
.preview-stage .studio-book { --studio-unit: min(0.9px, calc(180px / var(--trim-h)), calc(200px / var(--trim-w))); width: calc(var(--trim-w) * var(--studio-unit)); height: calc(var(--trim-h) * var(--studio-unit)); position: relative; flex: none; }
.preview-stage .studio-book>span { font-size: 13px; bottom: 8%; }
.preview-caption { display: grid; gap: 4px; margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.preview-caption strong { font-weight: 500; color: var(--ink); }
.preview-photos { margin-top: 26px; }
.preview-photos h3 { margin: 0 0 12px; font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.preview-photos h3 span { color: var(--muted); font-weight: 400; margin-left: 6px; letter-spacing: 0; text-transform: none; }
.preview-grid { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 10px 6px; }
.preview-grid figure { margin: 0; min-width: 0; }
.preview-grid img { display: block; width: 100%; aspect-ratio: 4/5; object-fit: cover; background: var(--cell); border-radius: 1px; }
.preview-grid figcaption { display: flex; flex-wrap: wrap; gap: 2px 6px; margin-top: 5px; font-size: 10.5px; line-height: 1.3; color: var(--muted); font-variant-numeric: tabular-nums; }
.preview-grid figcaption b { font-weight: 500; color: var(--ink); letter-spacing: .04em; text-transform: uppercase; font-size: 9.5px; }
.preview-order-note { margin: 14px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.preview-footer { margin-top: 26px; }
@media (min-width: 761px) {
  .material-preview > .comparison-footer { position: sticky; bottom: -32px; z-index: 2; margin: 26px -36px -32px; padding: 16px 36px; background: #fff; border-top: 1px solid var(--rule); }
}
@media (max-width: 760px) {
  /* The Preview entry keeps its word on phones; the save note yields first. */
  .preview-button { min-height: 44px; min-width: 44px; padding: 8px 12px; font-size: 13px; gap: 6px; flex: none; }
  .studio-header .feedback-fab { min-height: 44px; min-width: 44px; }
  .studio-header .save-status .label-long { display: none; }
  .studio-header .save-status .label-short { display: inline; }
  dialog.material-preview { margin: auto 0 0; width: 100%; max-width: none; max-height: 92svh; border-radius: 10px 10px 0 0; padding: 12px 18px calc(18px + env(safe-area-inset-bottom)); }
  dialog.material-preview::before { content: ""; display: block; width: 36px; height: 4px; margin: 0 auto 10px; border-radius: 2px; background: #d6d5d1; }
  dialog.material-preview[open] { animation: sheet-up 220ms cubic-bezier(.2,.7,.2,1); }
  .material-preview .dialog-heading h2 { font-size: 22px; }
  .preview-stage { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 16px; padding: 22px 16px; }
  .preview-stage .studio-book { --studio-unit: min(0.7px, calc(140px / var(--trim-h)), calc(220px / var(--trim-w))); box-shadow: inset 5px 0 0 #2a2927, inset 6px 0 0 #4e4b46, 1px 1px 0 #f7f5f0, 2px 2px 0 #dad6cd, 3px 3px 0 #f7f5f0, 4px 4px 0 #cfcac0, 0 16px 26px -14px #00000055, 0 1px 3px #0000001a; }
  .preview-stage .studio-book>img { inset: 0 0 0 6px; width: calc(100% - 6px); border-radius: 0 2px 2px 0; }
  .preview-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .material-preview > .comparison-footer { position: sticky; bottom: calc(-18px - env(safe-area-inset-bottom)); z-index: 2; margin: 22px -18px calc(-18px - env(safe-area-inset-bottom)); padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--rule); }
  .material-preview > .comparison-footer > * { flex: 1; }
}

/* Feedback lives in the top bar, so it never covers a control. */
body.uploading .feedback-fab { display: none; }
dialog.feedback-sheet { width: min(440px, calc(100% - 32px)); padding: 26px 28px 22px; }
.feedback-faces { display: flex; justify-content: space-between; gap: 6px; margin: 16px 0 4px; }
.feedback-faces button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 2px 8px; border: 1px solid transparent; border-radius: 2px; background: transparent; font-size: 26px; line-height: 1; color: var(--ink); transition: transform 140ms, background-color 140ms, border-color 140ms; }
.feedback-faces button small { font-size: 10.5px; color: var(--muted); }
.feedback-faces button:hover { transform: translateY(-2px); }
.feedback-faces [aria-pressed=true] { background: #fff; border-color: var(--ink); }
.feedback-sheet textarea { display: block; width: 100%; margin-top: 14px; padding: 10px 12px; border: 1px solid #cfccc4; border-radius: 2px; font: inherit; font-size: 15px; line-height: 1.5; resize: vertical; min-height: 86px; }
.feedback-sheet textarea:focus { outline: none; border-color: var(--ink); }
.feedback-sheet .line-field { margin-top: 12px; }
.feedback-sheet .line-field input { display: block; width: 100%; padding: 8px 0; border: 0; border-bottom: 1px solid #cfcdc7; background: transparent; font-size: 16px; outline: none; }
.feedback-sheet .line-field input:focus { border-bottom-color: var(--ink); }
.feedback-footer { margin-top: 18px; display: flex; justify-content: space-between; gap: 10px; }
.feedback-thanks { padding: 10px 0 4px; font: 400 20px/1.3 var(--serif); }
.feedback-thanks p { margin: 8px 0 0; font: 400 14px/1.5 var(--sans); color: var(--muted); }
@media (max-width: 760px) {
  dialog.feedback-sheet { margin: auto 0 0; width: 100%; max-width: none; border-radius: 10px 10px 0 0; padding: 12px 18px calc(16px + env(safe-area-inset-bottom)); }
  dialog.feedback-sheet::before { content: ""; display: block; width: 36px; height: 4px; margin: 0 auto 10px; border-radius: 2px; background: #d6d5d1; }
  dialog.feedback-sheet[open] { animation: sheet-up 240ms cubic-bezier(.2,.7,.2,1); }
  .feedback-footer > * { flex: 1; }
}

/* ---------- The self-layout editor in the studio's own style ----------
   Same paper header, the canvas on paper, panels on white, hairlines,
   square controls in ink. Only colour, type and edges change here. */
.topbar.studio-header:has(+ .editor-view) { height: 64px; min-height: 64px; padding: 10px 28px; }
.editor-view { height: calc(100svh - 64px); background: #fff; }
.editor-context { background: var(--sheet); border-bottom-color: var(--rule); }
.editor-context .quiet { font-size: 13px; color: var(--ink-2); }
.editor-context .context-spec { font-size: 12.5px; color: var(--muted); }
.pages-panel { background: #fff; border-right-color: var(--rule); }
.rail-title, .photos-panel .section-heading h2 { font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.photos-panel .section-heading h2 span { color: var(--muted); font-weight: 400; margin-left: 6px; }
.thumb-paper { border-color: var(--rule); }
.page-thumb[aria-current=page] .thumb-paper { outline: 1px solid var(--ink); outline-offset: 2px; }
.rail-add { border-top-color: var(--rule); color: var(--ink-2); }
.canvas-workspace { background: var(--paper); }
.canvas-meta { color: var(--ink-2); }
.book-spread { box-shadow: 0 30px 50px -26px #00000045, 0 2px 0 #e4e1da, 0 4px 0 #f7f5f0, 0 5px 0 #d6d1c7; }
.book-page:first-child { border-right-color: #ddd8ce; }
.empty-page { border: 1px solid #d3cfc6; color: var(--muted); }
.paper-options { border-radius: 2px; border-color: var(--rule); }
.paper-options button { border-radius: 2px; }
.paper-options button[aria-pressed=true] { background: var(--ink) !important; }
.size-options { padding: 0; background: transparent; border: 1px solid #cfccc4; border-radius: 2px; }
.size-options button { border-radius: 0; font-size: 13px; }
.size-options button + button { border-left: 1px solid #cfccc4; }
.size-options [aria-pressed=true] { background: var(--ink); color: #fff; box-shadow: none; }
.size-options [aria-pressed=true]:hover { background: var(--ink) !important; }
.photos-panel { background: #fff; border-left-color: var(--rule); }
.photo-tabs { border-bottom-color: var(--rule); }
.library-grid { gap: 6px; }
.library-grid .photo-image { aspect-ratio: 4/5; padding: 0; background: var(--cell); border-radius: 1px; overflow: hidden; }
.library-grid .photo-image img { width: 100%; height: 100%; object-fit: cover; }
.fill-actions, .placement-context { border-top-color: var(--rule); }
.designer-link button { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.studio-upload .upload-drop, .upload-drop { border: 1px solid var(--rule); background: var(--sheet); border-radius: 1px; }
@media (max-width: 760px) {
  .topbar.studio-header:has(+ .editor-view) { height: calc(56px + env(safe-area-inset-top)); min-height: 0; padding: max(8px, env(safe-area-inset-top)) 16px 8px; }
  .mobile-nav { background: var(--sheet); border-top-color: var(--rule); }
  .mobile-nav .quiet { color: var(--muted); border-top: 2px solid transparent; border-radius: 0; }
  .mobile-nav [aria-pressed=true] { background: transparent !important; color: var(--ink); border-top-color: var(--ink); }
  .photo-tools { background: var(--paper); box-shadow: 0 -12px 16px -12px #0000001a; }
}

/* Notices rise from the bottom, clear of the header and the content. */
#notice { top: auto !important; bottom: calc(96px + env(safe-area-inset-bottom)); max-width: calc(100% - 32px); border-radius: 2px; }
body:has(.editor-view) #notice { top: auto !important; bottom: 28px; }
@media (max-width: 760px) {
  #notice { bottom: calc(84px + env(safe-area-inset-bottom)); }
  body:has(.editor-view) #notice { bottom: calc(78px + env(safe-area-inset-bottom)); }
}

/* ---------- Headings in Inter Display ----------
   The display cut is drawn at 500 with tight tracking; titles on covers and
   invitations are set upright, since the family has no italic here. */
h1, .dialog-heading h2, .studio-sheet h1, .studio-sheet #upload-title,
.designer-intake .intake-heading h1, .design-request .dialog-heading h2,
.book-sheet .dialog-heading h2, .material-preview .dialog-heading h2,
.send-form h3, .feedback-thanks { font-weight: 500; }
.designer-intake .intake-heading h1 { letter-spacing: -.03em; line-height: 1.06; }
.studio-sheet h1, .studio-sheet #upload-title, h1 { letter-spacing: -.025em; }
.dialog-heading h2, .design-request .dialog-heading h2, .book-sheet .dialog-heading h2, .material-preview .dialog-heading h2 { letter-spacing: -.02em; }
.send-form h3, .feedback-thanks { letter-spacing: -.01em; }
.studio-book>span, .intake-cover-title, .designer-intake .intake-upload .intake-invite { font-style: normal; font-weight: 500; letter-spacing: -.01em; }
.intake-steps li::before { font-weight: 500; font-variant-numeric: tabular-nums; }

/* ---------- Wishes: whole rows, one gentle suggestion per group ---------- */
.wish-chips { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: 6px; }
.wish-chip { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; min-width: 0; min-height: 44px; padding: 8px 12px; text-align: left; overflow-wrap: anywhere; }
.wish-chip small { font-size: 9.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.wish-chip[aria-pressed=true] small { color: #ffffffb3; }
@media (max-width: 760px) { .wish-chip { min-height: 46px; padding: 8px 10px; } }

/* ---------- Cover: its own photograph, placed by the customer ----------
   One front drawn the same way everywhere (stage, card, editor, preview,
   handover). Type scales with the front through container units. */
.cover-front { position: absolute; inset: 0; display: block; overflow: hidden; background: #fbfaf7; container-type: inline-size; font: 400 12px/1.2 var(--sans); text-shadow: none; }
.studio-book>span.cover-front { inset: 0 0 0 10px; left: 10px; bottom: 0; border-radius: 0 3px 3px 0; display: block !important; color: inherit; font-style: normal; }
.studio-book.soft-cover>span.cover-front { inset: 0; left: 0; border-radius: 1px 4px 4px 1px; }
.cover-window { position: absolute; display: block; overflow: hidden; }
.cover-window img { position: absolute; display: block; max-width: none; margin: 0; object-fit: fill; user-select: none; -webkit-user-drag: none; }
.cover-front .cover-words { position: absolute; left: 7.5%; right: 7.5%; display: flex; flex-direction: column; gap: 1.6cqw; pointer-events: none; }
.at-bottom .cover-words { bottom: 7.5%; top: auto; }
.at-top .cover-words { top: 7.5%; bottom: auto; }
.at-middle .cover-words { top: 50%; bottom: auto; transform: translateY(-50%); }
.layout-border .cover-words { top: 73%; bottom: 0; justify-content: center; align-items: center; text-align: center; }
.layout-below .cover-words { top: 72%; bottom: 0; justify-content: center; }
.cover-front .cover-title { position: static; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; max-width: none; white-space: normal; text-overflow: clip; font: 500 8.5cqw/1.04 var(--serif); letter-spacing: -.02em; overflow-wrap: anywhere; }
.layout-border .cover-title, .layout-below .cover-title { font-size: 7cqw; }
.cover-front .cover-subtitle { position: static; font: 400 3cqw/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.tone-light .cover-words { color: #fff; text-shadow: 0 0 2.4cqw rgba(0,0,0,.38); }
.tone-dark .cover-words { color: var(--ink); text-shadow: none; }
.cover-front .cover-title.empty { opacity: .6; }
.ceremony-book>.cover-front { left: 9px; bottom: 0; }
.ceremony-book .cover-words { left: 7.5%; right: 7.5%; }
@media (max-width: 760px) { .studio-book>span.cover-front { inset: 0 0 0 6px; left: 6px; border-radius: 0 2px 2px 0; } }

/* A small book: the card, the review, the layout choices. */
.cover-mini { position: relative; display: block; width: 100%; aspect-ratio: var(--trim-w) / var(--trim-h); min-height: 0; padding: 0; border: 0; border-radius: 0; background: #e9e6df; box-shadow: 0 14px 22px -16px #0007, 0 1px 0 #d6d1c7; }
.cover-mini .mini-spine { position: absolute; left: 0; top: 0; bottom: 0; width: 5%; background: #2a2927; }
.cover-mini .mini-spine+.cover-front { left: 5%; }
button.cover-mini:hover:not(:disabled) { background: #e9e6df; }

/* In the request: the cover comes before the photographs. */
.designer-intake .request-cover { padding: 28px 0; border-top: 1px solid var(--rule); }
.cover-empty, .cover-card { display: grid; grid-template-columns: 116px minmax(0,1fr); gap: 18px; align-items: center; padding: 14px; background: #fff; }
.cover-empty { border: 1px dashed #cfccc4; }
.cover-card { border: 1px solid var(--rule); }
.cover-empty-frame { width: 100%; aspect-ratio: var(--trim-w) / var(--trim-h); min-height: 0; padding: 0; display: grid; place-items: center; background: var(--paper); border-radius: 0; }
.cover-empty-frame .icon { opacity: .5; }
.cover-empty p, .cover-card-text p { margin: 0; font-size: 13px; color: var(--ink-2); }
.cover-empty p:not(.cover-empty-title) { margin: 4px 0 12px; color: var(--muted); }
.cover-empty-title, .cover-card-title { font-size: 15px !important; font-weight: 500; color: var(--ink) !important; }
.cover-card-quality { margin-top: 4px !important; font-size: 12px !important; }
.cover-sharp { color: var(--muted); }
.cover-soft { color: #9a4a25; }
.cover-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cover-note { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }
.review-cover { display: grid; grid-template-columns: 76px minmax(0,1fr); gap: 14px; align-items: center; margin: 4px 0 20px; }
.review-cover p { margin: 0; display: grid; gap: 2px; font-size: 13px; }
.review-cover p span { color: var(--muted); }
.review-cover .link-button { justify-self: start; }
.review-cover.missing { grid-template-columns: minmax(0,1fr) auto; padding: 12px 14px; border: 1px solid #e7c9b7; background: #fbf3ee; }

/* The cover editor. */
dialog.cover-editor { width: min(720px, calc(100% - 32px)); height: min(880px, calc(100svh - 40px)); padding: 0; overflow: hidden; background: var(--paper); }
dialog.cover-editor[open] { display: grid; grid-template-rows: auto minmax(0,1fr) auto auto auto; }
.cover-editor-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 56px; padding: 0 10px; background: var(--sheet); border-bottom: 1px solid var(--rule); }
.cover-editor-head h2 { margin: 0; font: 500 17px/1 var(--serif); letter-spacing: -.01em; }
.cover-editor-head [data-action=cover-cancel] { justify-self: start; }
.cover-editor-head [data-action=cover-done] { justify-self: end; min-height: 38px; padding: 0 16px; }
.cover-stage { display: flex; align-items: center; justify-content: center; min-height: 0; padding: 26px 28px 12px; container-type: size; }
.cover-book { --unit: min(calc((100cqw - 40px) / var(--trim-w)), calc((100cqh - 16px) / var(--trim-h))); position: relative; display: flex; width: calc(var(--trim-w) * var(--unit) + 16px); height: calc(var(--trim-h) * var(--unit)); box-shadow: 0 26px 40px -24px #0007, 0 1px 0 #d6d1c7; }
.cover-spine { position: relative; flex: 0 0 16px; background: #2a2927; overflow: hidden; }
.cover-spine span { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%) rotate(90deg); white-space: nowrap; font: 500 8px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #fff; }
.cover-edit-front { position: relative; flex: 1; touch-action: none; cursor: grab; outline-offset: 4px; }
.cover-edit-front.moving { cursor: grabbing; }
.cover-safe { position: absolute; inset: 4.5%; border: 1px dashed rgba(255,255,255,.8); outline: 1px dashed rgba(0,0,0,.18); outline-offset: -2px; pointer-events: none; }
.cover-bleed { position: absolute; inset: -6px -6px -6px 10px; border: 1px solid rgba(180,83,42,.45); pointer-events: none; }
.cover-drag-hint { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); padding: 7px 11px; border-radius: 2px; background: rgba(28,28,27,.78); color: #fff; font-size: 12px; white-space: nowrap; pointer-events: none; transition: opacity 200ms; }
.cover-edit-front.moving .cover-drag-hint { opacity: 0; }
.cover-legend { display: flex; justify-content: center; gap: 16px; margin: 0; padding: 6px 16px 10px; font-size: 11.5px; color: var(--muted); }
.cover-legend i { display: inline-block; width: 14px; margin-right: 6px; vertical-align: middle; border-top: 1px dashed var(--muted); }
.cover-legend i.trim { border-top: 1px solid rgba(180,83,42,.6); }
.cover-tabs { display: grid; grid-template-columns: repeat(4,1fr); background: #fff; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.cover-tabs button { min-height: 46px; border-top: 2px solid transparent; border-radius: 0; font-size: 13.5px; color: var(--muted); }
.cover-tabs [aria-selected=true] { color: var(--ink); font-weight: 500; border-top-color: var(--ink); }
.cover-panel { min-height: 200px; padding: 16px 20px max(20px, env(safe-area-inset-bottom)); background: #fff; }
.cover-panel .line-field { margin: 0 0 14px; }
.cover-panel .line-field em { font-style: normal; color: #9a9ca1; }
.cover-panel .line-field input { display: block; width: 100%; min-height: 0; margin: 0; padding: 8px 0; border: 0; border-bottom: 1px solid #cfccc4; border-radius: 0; background: transparent; color: var(--ink); font-size: 16px; line-height: 1.5; outline: none; }
.cover-panel .line-field input:focus { border-bottom-color: var(--ink); }
.cover-panel .line-field input::placeholder { color: #a09e97; }
.cover-label { display: block; margin: 0 0 10px; font: 500 11px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.cover-zoom { display: block; }
.cover-zoom input { width: 100%; height: 32px; accent-color: var(--ink); }
.cover-photo-actions { display: flex; gap: 8px; margin-top: 12px; }
.cover-quality { margin: 12px 0 0; font-size: 12.5px; }
.cover-layouts { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.cover-layout { display: grid; gap: 8px; min-height: 0; padding: 8px; border: 1px solid var(--rule); border-radius: 0; background: #fff; font-size: 12.5px; text-align: center; }
.cover-layout[aria-checked=true] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.cover-layout .cover-mini { box-shadow: none; }
.cover-segments { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 6px; }
.segmented { display: inline-flex; border: 1px solid #cfccc4; }
.segmented button { min-height: 40px; padding: 0 14px; border-radius: 0; font-size: 13px; }
.segmented button+button { border-left: 1px solid #cfccc4; }
.segmented [aria-pressed=true], .segmented [aria-pressed=true]:hover { background: var(--ink) !important; color: #fff; }
.cover-help { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }
.cover-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cover-switch-title { margin: 0; font-weight: 500; }
.switch { position: relative; flex: none; width: 46px; height: 28px; min-height: 28px; padding: 0; border-radius: 14px; background: #cfccc4; }
.switch span { position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform 160ms; }
.switch[aria-checked=true], .switch[aria-checked=true]:hover { background: var(--ink) !important; }
.switch[aria-checked=true] span { transform: translateX(18px); }
@media (max-width: 760px) {
  dialog.cover-editor { width: 100%; max-width: none; height: 100svh; max-height: none; margin: 0; border-radius: 0; }
  .cover-stage { padding: 18px 16px 8px; }
  .cover-empty, .cover-card { grid-template-columns: 96px minmax(0,1fr); gap: 14px; }
  .designer-intake .request-cover { padding: 22px 0; }
}
@media (prefers-reduced-motion: reduce) { .switch span, .cover-drag-hint { transition: none; } }

/* After sending: the order page link */
.ceremony-link, .sent-link { font-size: 14px; color: var(--muted, #6f6d67); max-width: 32em; }
