/* Inter for text, Inter Display for headings: self-hosted Latin subsets (SIL OFL, see fonts/OFL.txt). */
@font-face { font-family: "Inter"; src: url("fonts/Inter-Regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-Medium.woff") format("woff"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("fonts/InterDisplay-Medium.woff") format("woff"); font-weight: 500; font-style: normal; font-display: swap; }
:root {
  /* IROHAS studio system: one family in two cuts (text and display), weights 400 and 500, paper and ink. */
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  /* Headings. Kept under the old token name so every heading follows it. */
  --serif: "Inter Display", "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  font-family: var(--sans);
  color: #1c1c1b;
  background: #fff;
  font-synthesis: none;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  --ink: #1c1c1b;
  --ink-2: #4b4a47;
  --muted: #76746e;
  --line: #e4e1da;
  --rule: #e4e1da;
  --paper: #f1efea;
  --sheet: #faf9f7;
  --cell: #e8e5de;
  --green: #1c1c1b;
  --wash: #f3f1ec;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea, summary { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; border: 0; background: transparent; min-height: 44px; }
button:disabled { opacity: .38; cursor: default; }
button, a, input, textarea, summary { touch-action: manipulation; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
button:hover:not(:disabled) { background-color: #ecebe6; }
h1, h2, h3, p { margin: 0; }
h1 { font: 400 30px/1.2 var(--serif); letter-spacing: -.01em; }
h2 { font-size: 17px; line-height: 1.4; font-weight: 500; }
h3 { font-size: 15px; font-weight: 500; }
a { color: inherit; text-decoration: none; }
.icon { width: 18px; height: 18px; flex: 0 0 18px; }
.quiet, .primary, .secondary, .icon-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border-radius: 2px; padding: 11px 14px; font-size: 14px; font-weight: 500; line-height: 1.35; }
.primary { background: var(--ink); color: white; padding-inline: 20px; }
.primary .icon { filter: invert(1); }
.primary:hover:not(:disabled) { background: #333331; }
.secondary { border: 1px solid #cfccc4; background: #fff; padding-inline: 20px; }
.secondary:hover:not(:disabled) { background: #fff; border-color: var(--ink); }
.quiet { padding-inline: 10px; }
.icon-button { width: 44px; padding: 12px; flex: 0 0 44px; }
.muted, .preview-label { color: var(--muted); }
.eyebrow { font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
.topbar { height: 80px; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 12px 32px; border-bottom: 1px solid var(--line); background: #fff; }
.brand-group, .header-actions { display: flex; align-items: center; gap: 24px; min-width: 0; }
.brand { display: flex; align-items: center; flex: none; }
.brand img { display: block; width: 96px; height: auto; }
.header-divider, .context-divider { height: 26px; width: 1px; background: var(--line); flex: none; }
.project-name { font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-actions { flex: none; gap: 20px; }
.preview-label { font-size: 12px; }
.choice-heading { text-align: center; padding: 30px 20px 22px; }
.book-spec { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.sample-stage { position: relative; height: 330px; display: grid; place-items: center; background: #eef0eb; overflow: hidden; }
.sample-stage::before { content: ""; position: absolute; inset: 0; background: url('/assets/tabletop-book-picker/assets/tabletop-empty.png') center 52% / cover; opacity: .16; filter: grayscale(1); }
.sample-spread { width: min(540px,calc(var(--page-ratio,1) * 540px)); max-width: calc(100% - 48px); aspect-ratio: var(--spread-ratio,2); display: grid; grid-template-columns: 1fr 1fr; position: relative; box-shadow: 0 14px 24px #27372d1a, 0 2px 0 #d4d6d0, 0 5px 0 #fff, 0 6px 0 #d4d6d0; background: #fff; }
.sample-spread { grid-template-rows: minmax(0,1fr); }
.sample-left, .sample-right { min-width: 0; min-height: 0; position: relative; }
.sample-left { display: flex; flex-direction: column; justify-content: center; padding: 35px; border-right: 1px solid #e0e2dc; box-shadow: inset -6px 0 9px -8px #888; }
.sample-left p { font-family: Georgia, serif; font-size: 32px; line-height: 1.16; }
.sample-left small { font-size: 9px; margin-top: 15px; color: var(--muted); }
.sample-left>span { position: absolute; bottom: 24px; font-size: 8px; }
.sample-right { display: grid; place-items: center; padding: 25px 38px; box-shadow: inset 6px 0 9px -8px #888; }
.sample-right img { width: 100%; height: 100%; object-fit: contain; min-height: 0; }
.sample-caption { position: absolute; bottom: 12px; right: 24px; font-size: 11px; color: var(--muted); }
.method-options { max-width: 950px; margin: auto; display: grid; grid-template-columns: 1fr 1fr; padding: 28px 32px 16px; gap: 64px; }
.method-option { min-width: 0; }
.method-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.offer { font-size: 12px; color: var(--green); font-weight: 500; }
.method-title .offer { margin-left: auto; }
.method-option>p { font-size: 14px; line-height: 1.65; color: var(--muted); margin: 12px 0 20px; }
.method-option>button { width: 100%; justify-content: space-between; flex-direction: row-reverse; }
.choice-footnote { text-align: center; color: var(--muted); font-size: 12px; padding: 10px 24px 26px; line-height: 1.5; }
.request-view { max-width: 1336px; padding: 44px 48px; margin: auto; }
.workspace-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-bottom: 40px; }
.workspace-heading>button { flex: none; color: var(--muted); }
.request-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.request-actions .history-controls { display: flex; }
.workspace-heading h1 { font-size: 27px; }
.request-columns { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 64px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; min-height: 44px; gap: 12px; margin-bottom: 16px; }
.section-heading h2 { font-size: 15px; }
.section-heading h2>span { font-weight: 400; color: var(--muted); margin-left: 7px; font-size: 13px; }
.request-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px 18px; }
.photo-tile { position: relative; min-width: 0; }
.photo-image { display: block; padding: 0; width: 100%; aspect-ratio: 4 / 5; overflow: hidden; background: var(--wash); border-radius: 2px; }
.photo-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.remove-photo { position: absolute; top: 0; right: 0; width: 44px; height: 44px; display: grid; place-items: center; }
.remove-photo .icon { box-sizing: content-box; padding: 6px; background: #fffffff0; border-radius: 50%; width: 14px; height: 14px; }
.remove-photo:hover { background: transparent !important; }
.photo-name { display: block; margin-top: 10px; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.request-details { padding-top: 4px; }
.selected-book { display: flex; align-items: center; gap: 18px; margin-bottom: 32px; border-bottom: 1px solid var(--line); padding-bottom: 26px; }
.selected-book h2 { font-size: 15px; }
.selected-book p { font-size: 13px; line-height: 1.7; margin-top: 5px; color: var(--muted); }
.tiny-book { width: 72px; aspect-ratio: var(--page-ratio,1); flex: none; padding: 10px 14px; background: #fff; border: 1px solid var(--line); box-shadow: 2px 3px 0 #eceeeb; }
.tiny-book img { width: 100%; height: 100%; object-fit: contain; }
.request-details label { display: flex; flex-wrap: wrap; justify-content: space-between; font-size: 14px; line-height: 1.5; gap: 8px; }
.request-details label span { color: var(--muted); font-size: 12px; }
textarea { width: 100%; display: block; margin-top: 12px; border: 1px solid #d5dad4; border-radius: 4px; padding: 14px; resize: vertical; font-size: 14px; line-height: 1.6; color: var(--ink); background: white; min-height: 130px; }
textarea::placeholder { color: #767d77; }
.service-terms { margin-top: 24px; }
.service-terms p { font-size: 12px; color: var(--muted); line-height: 1.7; margin-top: 8px; }
.empty-library { min-height: 310px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; background: var(--wash); font-size: 14px; color: var(--muted); }
.empty-library>.icon { width: 32px; height: 32px; }
.editor-view { display: grid; grid-template-columns: 108px minmax(0,1fr) 280px; grid-template-rows: 58px minmax(0,1fr); height: calc(100svh - 80px); min-height: 600px; }
.editor-context { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; padding: 0 26px; border-bottom: 1px solid var(--line); gap: 16px; }
.editor-context>div { display: flex; align-items: center; gap: 16px; }
.context-spec { font-size: 12px; color: var(--muted); }
.history-controls { gap: 4px !important; }
.pages-panel { display: flex; flex-direction: column; align-items: stretch; border-right: 1px solid var(--line); min-height: 0; }
.rail-title { font-size: 12px; color: var(--muted); text-align: center; padding: 20px 0 12px; }
.page-thumbnails { padding: 0 14px; overflow: auto; flex: 1; }
.page-thumb-wrap { position: relative; padding-top: 10px; }
.page-thumb { display: flex; flex-direction: column; width: 100%; gap: 8px; align-items: center; padding: 5px; font-size: 11px; border-radius: 2px; color: var(--muted); }
.thumb-paper { width: 100%; aspect-ratio: var(--page-ratio,1); display: grid; place-items: center; background: var(--page-bg); border: 1px solid #dfe4df; }
.thumb-paper img { width: var(--photo-size); height: var(--photo-size); object-fit: contain; }
.thumb-paper.fill img { object-fit: cover; }
.page-thumb[aria-current=page] .thumb-paper { outline: 1px solid var(--green); outline-offset: 2px; }
.page-thumb[aria-current=page] { color: var(--ink); }
.thumb-delete { position: absolute; right: -10px; top: -3px; width: 44px; height: 44px; min-height: 44px; display: grid; place-items: center; }
.thumb-delete .icon { width: 12px; height: 12px; padding: 4px; box-sizing: content-box; background: white; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); }
.thumb-delete:hover { background: transparent !important; }
.rail-add { flex-direction: column; padding: 14px 4px; font-size: 11px; gap: 5px; border-top: 1px solid var(--line); border-radius: 0; }
.canvas-workspace { display: flex; flex-direction: column; min-width: 0; overflow: auto; padding: 20px 28px 24px; background: var(--wash); }
.canvas-meta { display: flex; align-items: center; justify-content: space-between; font-size: 13px; gap: 20px; min-height: 44px; }
.paper-options { display: flex; gap: 2px; }
.paper-options button { width: 44px; min-height: 44px; display: grid; place-items: center; border-radius: 4px; }
.paper-options button::before { content: ""; width: 18px; height: 18px; border: 1px solid #b6bdb7; border-radius: 50%; background: white; }
.paper-options .paper-black::before { background: #202321; border-color: #202321; }
.paper-options button[aria-pressed=true]::before { outline: 1px solid var(--green); outline-offset: 3px; }
.book-area { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 250px; padding: 30px 6px 20px; }
.book-spread { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: 100%; max-width: var(--spread-max,870px); aspect-ratio: var(--spread-ratio,2); box-shadow: 0 15px 30px #2c3e2f13, 0 3px 0 #d9ddd8, 0 5px 0 white, 0 6px 0 #d9ddd8; }
.book-page { position: relative; aspect-ratio: var(--page-ratio,1); background: var(--page-bg,white); display: flex; align-items: center; justify-content: center; min-width: 0; }
.book-page:first-child { border-right: 1px solid #d5d9d1; box-shadow: inset -6px 0 9px -8px #aaa; }
.book-page:nth-child(2) { box-shadow: inset 6px 0 9px -8px #aaa; }
.placed-photo { padding: 0; width: var(--photo-size); height: var(--photo-size); min-height: 0; border-radius: 0; }
.placed-photo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.placed-photo.fill img { object-fit: cover; }
.placed-photo:disabled { opacity: 1; }
.photo-selected .placed-photo { outline: 1px solid var(--green); outline-offset: 3px; }
.photo-close { position: absolute; top: max(4px,calc((100% - var(--photo-size)) / 2 - 14px)); right: max(4px,calc((100% - var(--photo-size)) / 2 - 14px)); width: 44px; height: 44px; display: grid; place-items: center; background: #fff; border-radius: 50%; box-shadow: 0 1px 5px #0001; }
.page-number { position: absolute; bottom: 10px; right: 12px; font-size: 10px; color: #858e87; pointer-events: none; }
.empty-page { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px; width: 78%; height: 78%; color: var(--muted); border: 1px dashed #cdd4cd; font-size: 13px; }
.book-navigation { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; margin-top: 12px; }
.book-navigation>span { font-size: 12px; color: var(--muted); min-width: 42px; text-align: center; }
.book-navigation button { font-size: 12px; }
.tools-reserved, .photo-tools { height: 182px; min-height: 182px; flex: none; }
.photo-tools { padding-top: 14px; max-width: 670px; width: 100%; margin: 0 auto; }
.photo-tool-title { font-size: 13px; color: var(--muted); text-align: center; margin-bottom: 8px; }
.canvas-add { border-left: 1px solid var(--line); border-radius: 0; }
.tool-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; }
.tool-heading { font-size: 12px; color: var(--muted); margin-right: 4px; }
.size-options { display: flex; padding: 2px; background: #e8e9ec; border-radius: 6px; }
.size-options button { padding: 8px 12px; font-size: 14px; border-radius: 4px; }
.size-options [aria-pressed=true] { background: #fff; box-shadow: 0 1px 3px #0001; }
.photo-tools .quiet { font-size: 12px; }
.custom-size { max-width: 390px; margin: 8px auto 0; font-size: 12px; color: var(--muted); }
.custom-size summary { cursor: pointer; text-align: center; padding: 14px; min-height: 44px; }
.custom-size label { display: flex; gap: 12px; align-items: center; justify-content: center; padding: 4px 0 12px; }
.custom-size input { min-width: 70px; min-height: 44px; accent-color: var(--green); }
.custom-size output { min-width: 34px; }
.photos-panel { border-left: 1px solid var(--line); padding: 16px 20px; min-height: 0; display: flex; flex-direction: column; }
.photos-panel .section-heading { margin-bottom: 10px; }
.placement-context { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.placement-context h3 { flex: 1 1 140px; font-size: 14px; line-height: 1.5; }
.placement-context .quiet { font-size: 12px; flex: none; }
.photo-image:disabled { opacity: .6; }
.photo-tabs { display: flex; border-bottom: 1px solid var(--line); gap: 18px; margin-bottom: 18px; }
.photo-tabs button { font-size: 12px; padding: 8px 0; border-bottom: 2px solid transparent; border-radius: 0; }
.photo-tabs button[aria-pressed=true] { border-color: var(--ink); }
.photo-tabs span { color: var(--muted); margin-left: 4px; }
.library-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; overflow-y: auto; align-content: start; }
.library-grid .photo-image { aspect-ratio: 1; }
.library-empty { grid-column: 1 / -1; font-size: 13px; color: var(--muted); padding: 10px 0; }
.used-mark { position: absolute; right: 5px; bottom: 5px; display: grid; place-items: center; background: #fff; border-radius: 50%; width: 20px; height: 20px; pointer-events: none; }
.used-mark .icon { width: 12px; height: 12px; }
.fill-button { font-size: 13px; }
.fill-actions { display: flex; flex-direction: column; align-items: stretch; margin-top: 12px; gap: 2px; border-top: 1px solid var(--line); padding-top: 12px; }
.fill-actions .quiet { justify-content: flex-start; font-size: 13px; }
.fill-summary { color: var(--muted); margin-bottom: 20px; font-size: 14px; }
.fill-preview { display: grid; grid-template-columns: repeat(var(--preview-columns,3),minmax(0,1fr)); gap: 16px; }
.fill-preview figure { margin: 0; text-align: center; }
.fill-preview .book-page { border: 1px solid var(--line); box-shadow: none; max-width: 260px; margin: auto; }
.fill-preview .page-number { display: none; }
.fill-preview figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }
.designer-link { margin-top: auto; padding-top: 24px; }
.designer-link button { justify-content: flex-start; padding-left: 0; font-size: 13px; }
.designer-link>span { display: block; font-size: 11px; color: var(--muted); margin: 0 0 6px 27px; }
.mobile-nav { display: none; }
dialog { border: 0; border-radius: 4px; width: min(680px,calc(100% - 32px)); padding: 32px; color: var(--ink); max-height: calc(100svh - 40px); overflow: auto; overscroll-behavior: contain; box-shadow: 0 20px 90px #15291c29; }
dialog::backdrop { background: #1c1c1b59; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.dialog-heading h2 { overflow-wrap: anywhere; min-width: 0; }
.dialog-heading h2 { font: 400 24px/1.2 var(--serif); letter-spacing: -.01em; }
.dialog-heading .eyebrow { font-size: 10px; margin-bottom: 10px; }
.dialog-heading .icon-button { margin: -10px -10px 0 0; }
.upload-drop { min-height: 250px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 20px; background: var(--wash); border: 1px dashed #cbd4cc; border-radius: 4px; }
.upload-drop>.icon { width: 36px; height: 36px; flex-basis: 36px; opacity: .7; }
.upload-drop>.muted { font-size: 12px; }
.upload-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding-top: 24px; font-size: 12px; }
.upload-photos { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; max-height: 350px; overflow-y: auto; }
.upload-photos img { width: 100%; aspect-ratio: 4 / 5; object-fit: contain; background: var(--wash); }
.upload-count { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.upload-feedback { border-left: 2px solid #ad382e; padding: 4px 0 4px 14px; margin: 0 0 20px; font-size: 13px; }
.upload-feedback>strong { color: #96342c; }
.upload-feedback ul { list-style: none; padding: 0; margin: 8px 0; max-height: 140px; overflow-y: auto; }
.upload-feedback li { display: grid; gap: 2px; margin: 8px 0; overflow-wrap: anywhere; }
.upload-feedback li span { color: var(--muted); }
.review-photos { display: flex; gap: 10px; overflow-x: auto; }
.review-photos img { width: 105px; height: 125px; object-fit: contain; background: var(--wash); }
.review-details { margin: 24px 0; font-size: 14px; }
.review-details>div { display: flex; justify-content: space-between; align-items: start; gap: 20px; border-bottom: 1px solid var(--line); padding: 14px 0; }
.review-details dt { color: var(--muted); }
.review-details dd { margin: 0; text-align: right; }
.brief-review { margin-top: 10px; font-size: 14px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.preview-notice { font-size: 12px; color: var(--muted); margin: 24px 0 16px; }
.inspect-photo { display: block; width: 100%; max-height: 65svh; object-fit: contain; }
.photo-inspection .inspect-photo { max-height: 50svh; }
.photo-choice-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 20px; }
.photo-choice-footer .primary { flex: 1 1 180px; }
.wide-review { width: min(1050px,calc(100% - 32px)); background: var(--wash); }
.review-book { padding: 20px; }
.review-book .book-spread { margin: auto; }
#notice { position: fixed; z-index: 5; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 8px 16px; border-radius: 4px; font-size: 13px; line-height: 1.5; box-shadow: 0 6px 20px #0002; max-width: calc(100% - 32px); width: max-content; display: flex; align-items: center; gap: 16px; }
.notice-undo { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #fff; flex: none; }
.notice-undo .icon { filter: invert(1); }
.notice-undo:hover { background: #46534a !important; }
.book-paper { font-size: 12px; color: var(--muted); margin: 8px 0; }
.book-picker { max-width: 1240px; margin: auto; padding: 0 32px; }
.picker-steps { display: flex; justify-content: center; gap: 24px; border-bottom: 1px solid var(--line); }
.picker-steps button { display: flex; gap: 8px; align-items: center; padding: 18px 0; color: var(--muted); font-size: 14px; border-bottom: 2px solid transparent; }
.picker-steps button:disabled { opacity: 1; color: var(--muted); }
.picker-steps [aria-current] { color: var(--ink); border-bottom-color: var(--ink); }
.picker-steps button>span { width: 18px; font-size: 12px; display: grid; place-items: center; }
.picker-steps .icon { width: 14px; height: 14px; }
.picker-layout { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); gap: 48px; padding: 36px 0; min-height: 540px; align-items: start; }
.picker-heading { text-align: left; padding: 8px 0 28px; }
.picker-heading h1 { font-size: 28px; }
.picker-heading>p:last-child:not(.eyebrow) { margin-top: 12px; font-size: 14px; color: var(--muted); }
.picker-content { text-align: left; }
.shape-tabs { display: flex; justify-content: stretch; gap: 2px; margin-bottom: 20px; padding: 3px; background: var(--wash); border-radius: 6px; }
.shape-tabs button { flex: 1; display: flex; justify-content: center; align-items: center; gap: 8px; padding: 8px; border-radius: 4px; font-size: 14px; }
.shape-tabs [aria-pressed=true] { background: white; box-shadow: 0 1px 4px #0002; }
.shape-symbol { display: block; width: 16px; height: 16px; border: 1px solid currentColor; }
.shape-symbol.portrait { width: 12px; height: 18px; }
.shape-symbol.landscape { width: 20px; height: 13px; }
.format-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-bottom: 8px; }
.format-options button { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 14px 12px; border: 1px solid var(--line); border-radius: 6px; min-height: 76px; text-align: left; }
.size-copy { display: grid; gap: 6px; min-width: 0; }
.size-copy small { font-size: 12px; color: var(--muted); line-height: 1.4; }
.size-outline { flex: none; border: 1px solid currentColor; color: #85898e; background: white; }
.size-check { margin-left: auto; flex: none; }
.size-check .icon { width: 14px; height: 14px; }
.size-group-heading { font-size: 14px; font-weight: 500; margin: 22px 0 12px; }
.format-options strong { font-size: 16px; font-weight: 500; }
.format-options [aria-pressed=false] .size-check { visibility: hidden; }
.format-options [aria-pressed=true], .material-options [aria-pressed=true] { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); background: #f5f9ff; }
.picker-scene { container-type: inline-size; position: sticky; top: 24px; }
.format-stage { --unit: min(1.1px,calc((100cqw - 120px) / 472)); position: relative; isolation: isolate; display: flex; align-items: flex-end; justify-content: center; gap: 24px; height: 510px; padding: 36px 20px; background: var(--wash); overflow: hidden; }
.format-stage::before { content: ''; position: absolute; inset: 0; z-index: -1; background: url('/assets/tabletop-book-picker/assets/tabletop-empty.png') center / cover; opacity: .22; }
.scene-caption { padding-top: 14px; font-size: 12px; color: var(--muted); text-align: center; }
.included-materials { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.6; }
.included-materials>span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.included-materials p:last-child { color: var(--muted); }
.format-object { flex: none; display: flex; flex-direction: column; align-items: center; gap: 16px; font-size: 12px; }
.format-book { background: white; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; gap: 14px; box-shadow: 2px 3px 0 #cad0c9, 4px 5px 0 white, 6px 8px 0 #bcc5bb, 10px 16px 18px #26392b26; }
.format-book img { width: 80%; height: 62%; object-fit: cover; }
.format-book>span { font-family: Georgia,serif; font-size: 13px; }
.compact-book>span { display: none; }
.compact-book img { height: 76%; width: 92%; }
.format-book.soft-cover { box-shadow: 2px 3px 0 #d3d8d1, 6px 9px 15px #26392b26; border-radius: 0 0 7px 0; }
.reference-phone { width: calc(72 * var(--unit)); height: calc(150 * var(--unit)); padding: 5px; border: 3px solid #252525; border-radius: 10px; background: #b2bac1; box-shadow: 3px 5px 10px #0002; }
.reference-phone span { display: block; width: 36%; height: 4px; background: #252925; margin: auto; border-radius: 4px; }
.material-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 0 0 24px; }
.material-options button { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 6px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.material-options strong { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; align-items: center; font-size: 16px; font-weight: 500; }
.material-options button>span:last-child { font-size: 13px; color: var(--muted); line-height: 1.5; }
.cover-example { width: 104px; max-width: 100%; height: 126px; padding: 18px 14px; display: block; background: white; margin: 12px 0; }
.cover-example img { width: 100%; height: 100%; object-fit: cover; }
.cover-example.hard { border: 3px solid #bec8bb; box-shadow: 4px 4px white,6px 6px #adb7a9,9px 10px 12px #0002; }
.cover-example.soft { border-bottom-right-radius: 35px 20px; transform: rotate(-5deg); box-shadow: 1px 2px #adb7a9,5px 8px 12px #0002; overflow: hidden; }
.paper-example { display: grid; grid-template-columns: 1fr 5px 1fr; width: 100%; height: 135px; background: white; padding: 20px 14px; box-shadow: 0 3px #cad0c9; }
.paper-example img { width: 100%; height: 100%; object-fit: cover; min-height: 0; }
.paper-example.flexible { border-radius: 0 0 20px 12px; }
.paper-example.flexible>span { background: #98a292; box-shadow: 0 0 10px 4px #55604b55; z-index: 1; }
.paper-example.layflat { grid-template-columns: 1fr 1px 1fr; box-shadow: 0 5px #c4cbc1,0 8px white,0 10px #b7c1b4; }
.paper-example.layflat>span { background: #dce0d9; }
.paper-choices { border: 0; border-top: 1px solid var(--line); margin: 24px 0 0; padding: 12px 0 0; display: flex; flex-direction: column; gap: 8px; }
.paper-choices legend { font-size: 14px; padding-bottom: 16px; }
.paper-choices label { display: flex; gap: 12px; align-items: center; text-align: left; padding: 12px 0; cursor: pointer; min-height: 44px; }
.paper-choices input { accent-color: var(--green); width: 18px; height: 18px; flex: none; }
.paper-choices strong,.paper-choices small { display: block; font-size: 13px; font-weight: 400; line-height: 1.6; }
.paper-choices small { color: var(--muted); }
.included-paper { font-size: 14px; line-height: 1.6; }
.included-paper strong, .included-paper span { display: block; font-weight: 400; }
.included-paper span { color: var(--muted); }
.material-spread { display: grid; grid-template-columns: 1fr 1fr; width: min(100%,410px); aspect-ratio: 1.8; align-self: center; background: white; box-shadow: 0 12px 24px #0002, 0 4px #ddd; }
.material-spread>div { padding: 18px; min-width: 0; }
.material-spread img { width: 100%; height: 100%; object-fit: contain; }
.material-spread.flexible>div:first-child { border-right: 1px solid #bbb; box-shadow: inset -12px 0 14px -13px #777; }
.material-spread.flexible>div:last-child { box-shadow: inset 12px 0 14px -13px #777; }
.material-spread.layflat { box-shadow: 0 4px white, 0 7px #ccc, 0 12px 24px #0002; }
.material-spread.layflat>div { padding-inline: 0; }
.comparison-dialog { width: min(820px,calc(100% - 28px)); container-type: inline-size; }
.compare-select { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 16px; font-size: 14px; }
.compare-select select { font: inherit; color: var(--ink); background: white; min-width: 0; min-height: 44px; border: 1px solid #b8bcc3; border-radius: 4px; padding: 8px; }
.format-stage.comparing { --unit: min(.8px,calc((100cqw - 140px) / 872)); height: 380px; padding: 28px 10px; gap: 22px; margin-top: 20px; }
.compare-book { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.compare-book>span { font-size: 12px; color: var(--muted); }
.comparison-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; }
.confirm-book { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; text-align: left; }
.confirm-book .format-stage { margin: 0; min-height: 365px; align-items: center; }
.spec-list { margin: 16px 0; font-size: 14px; }
.spec-list>div { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); min-height: 60px; padding: 6px 0; }
.spec-list dt { color: var(--muted); }
.spec-list dd { margin: 0 0 0 auto; text-align: right; }
.spec-list .quiet { flex: none; width: 44px; padding: 0; gap: 0; }
.quote-note,.compatibility-note { font-size: 12px; color: var(--muted); line-height: 1.65; margin: 14px 0; }
.compatibility-note { text-align: left; background: var(--wash); padding: 12px 14px; margin-bottom: 0; }
.picker-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; border-top: 1px solid var(--line); font-size: 13px; background: white; }
.picker-footer-start { display: flex; align-items: center; gap: 16px; }
.picker-price { display: grid; gap: 5px; font-size: 14px; }
.picker-price strong { font-weight: 500; }
.picker-price span { color: var(--muted); font-size: 12px; }
@media (min-width: 1500px) { .sample-stage { height: 380px; } .sample-spread { width: min(620px,calc(var(--page-ratio,1) * 620px)); } .sample-left p { font-size: 38px; } .method-options { padding-top: 34px; } }
@media (max-width: 1100px) {
  .request-view { padding: 32px; }
  .request-columns { gap: 32px; grid-template-columns: minmax(0,1fr) 260px; }
  .request-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .editor-view { grid-template-columns: 86px minmax(0,1fr) 225px; }
  .canvas-workspace { padding-inline: 18px; }
  .photos-panel { padding-inline: 14px; }
  .book-area { padding-inline: 0; }
  .tool-heading { display: none; }
  .header-actions .preview-label { font-size: 11px; }
  .picker-layout { gap: 28px; }
  .format-stage { gap: 24px; }
}
@media (max-width: 760px) {
  h1 { font-size: 25px; }
  .topbar { height: 72px; min-height: 72px; padding: 14px 18px; gap: 12px; }
  .brand img { width: 84px; }
  .brand-group { gap: 12px; }
  .header-divider, .project-name { display: none; }
  .header-actions { gap: 4px; flex-direction: column; align-items: flex-end; }
  .topbar:has(+ .editor-view), .topbar:has(+ .request-view) { height: 90px; }
  .header-actions .primary { font-size: 12px; padding: 12px; }
  .preview-label { font-size: 10px; }
  .topbar:has(+ .choice-view) .preview-label { display: inline; }
  .choice-heading { padding: 26px 16px 22px; }
  .book-spec { font-size: 12px; gap: 7px; margin-top: 12px; }
  .sample-stage { height: 225px; }
  .sample-spread { width: min(380px,calc(var(--page-ratio,1) * 350px)); max-width: calc(100% - 48px); }
  .sample-left { padding: 20px; }
  .sample-left p { font-size: 22px; }
  .sample-left small { font-size: 7px; margin-top: 10px; }
  .sample-left>span { font-size: 7px; bottom: 14px; }
  .sample-right { padding: 16px 22px; }
  .sample-caption { font-size: 9px; right: 18px; bottom: 8px; }
  .method-options { display: block; padding: 8px 24px 0; }
  .method-option { padding: 22px 0; border-bottom: 1px solid var(--line); }
  .method-option:last-child { border: 0; }
  .method-title h2 { font-size: 17px; }
  .method-title .offer { font-size: 11px; }
  .method-option>p { margin: 10px 0 16px; font-size: 14px; }
  .method-option>p br { display: none; }
  .method-option>button { min-height: 48px; }
  .choice-footnote { font-size: 11px; padding-top: 0; }
  .request-view { padding: 28px 22px; }
  .workspace-heading { flex-direction: column; align-items: flex-start; gap: 8px; padding-bottom: 16px; }
  .workspace-heading h1 { font-size: 25px; max-width: 320px; }
  .workspace-heading>.quiet { padding-left: 0; font-size: 12px; }
  .request-columns { display: flex; flex-direction: column; gap: 32px; }
  .request-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px 12px; }
  .request-details { border-top: 1px solid var(--line); padding-top: 28px; }
  .selected-book { margin-bottom: 24px; }
  .editor-view { display: flex; flex-direction: column; height: calc(100svh - 90px); min-height: 0; padding-bottom: calc(65px + env(safe-area-inset-bottom)); }
  .editor-context { min-height: 54px; padding: 4px 14px; gap: 6px; }
  .editor-context>div { gap: 0; }
  .editor-context .quiet { font-size: 12px; gap: 6px; padding-inline: 6px; }
  .context-divider, .context-spec { display: none; }
  .history-controls .quiet>span { display: inline; }
  .history-controls .quiet { min-width: 44px; }
  .canvas-workspace { flex: 1; padding: 12px 22px; min-height: 0; }
  .canvas-meta { min-height: 44px; flex: none; }
  .book-area { flex: none; min-height: 220px; padding: 12px 0 18px; }
  .book-area .book-spread { display: block; width: min(100%,360px,calc(var(--page-ratio,1) * 270px)); aspect-ratio: var(--page-ratio,1); }
  .book-area .book-page:not(.active-page) { display: none; }
  .book-area .book-page { border: 0; box-shadow: none; }
  .book-navigation { gap: 6px; margin-top: 0; }
  .book-navigation .quiet { padding-inline: 6px; font-size: 12px; gap: 5px; }
  .tools-reserved, .photo-tools { height: 206px; min-height: 206px; }
  .photo-tools { padding-top: 14px; }
  .tool-row { gap: 4px; }
  .size-options { width: 100%; }
  .size-options button { flex: 1; }
  .photo-tools .quiet { flex: 1; }
  .custom-size { margin-top: 0; }
  .pages-panel, .photos-panel { display: none; flex: 1; border: 0; padding: 16px 22px; overflow: auto; }
  .editor-view[data-mobile-tab=photos] .photos-panel { display: flex; }
  .editor-view[data-mobile-tab=pages] .pages-panel { display: flex; }
  .editor-view:not([data-mobile-tab=edit]) .canvas-workspace { display: none; }
  .library-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .photo-tabs button { font-size: 14px; }
  .designer-link { padding-top: 20px; margin-top: 24px; }
  .page-thumbnails { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; align-content: start; padding: 0; }
  .rail-title { text-align: left; font-size: 16px; padding: 0 0 12px; }
  .rail-add { flex-direction: row; font-size: 14px; margin-top: 20px; }
  .mobile-nav { position: fixed; display: grid; grid-template-columns: repeat(3,1fr); z-index: 2; bottom: 0; left: 0; right: 0; padding: 6px 14px calc(6px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); gap: 12px; }
  .mobile-nav .quiet { font-size: 12px; flex-direction: column; gap: 4px; min-height: 50px; }
  .mobile-nav [aria-pressed=true] { background: #f0f5fc; color: var(--green); }
  dialog { padding: 22px; max-height: calc(100svh - 28px); width: calc(100% - 28px); }
  .dialog-heading { gap: 10px; margin-bottom: 20px; }
  .dialog-heading h2 { font-size: 22px; }
  .dialog-heading .icon-button { margin: -8px -8px 0 0; }
  .upload-drop { min-height: 220px; }
  .upload-footer { gap: 12px; padding-top: 20px; }
  .upload-footer>.primary { width: 100%; min-height: 48px; }
  .upload-footer>.quiet { margin: auto; }
  .upload-footer>.muted { width: 100%; text-align: center; }
  .upload-photos { gap: 8px; }
  .review-details { font-size: 12px; }
  .review-book { padding: 10px 0 20px; }
  .review-book .page-number { font-size: 8px; bottom: 5px; right: 5px; }
  #notice { bottom: 85px; font-size: 12px; }
  .book-picker { padding: 0 18px; }
  .picker-steps { gap: 12px; justify-content: space-between; }
  .picker-steps button { font-size: 12px; gap: 4px; padding-block: 12px; }
  .picker-steps button>span { width: 14px; }
  .picker-layout { display: flex; flex-direction: column; gap: 12px; padding: 16px 0 24px; min-height: 0; }
  .picker-scene, .picker-decision { width: 100%; min-width: 0; }
  .picker-scene { position: static; }
  .picker-heading { padding: 12px 0 18px; }
  .picker-heading .eyebrow { display: none; }
  .picker-heading h1 { font-size: 25px; }
  .picker-content { min-height: 0; }
  .shape-tabs { gap: 4px; }
  .shape-tabs button { font-size: 14px; gap: 7px; padding-inline: 8px; }
  .format-options { gap: 10px; }
  .format-options button { padding: 12px 10px; gap: 8px; }
  .format-options strong { font-size: 14px; }
  .size-outline { display: none; }
  .format-stage { --unit: min(.66px,calc((100cqw - 112px) / 472)); height: 310px; gap: 18px; padding: 24px 16px; margin: 0; }
  .format-book { padding: 12px; gap: 10px; }
  .format-book>span { font-size: 11px; }
  .scene-caption { padding-top: 10px; font-size: 12px; }
  .format-stage.comparing { --unit: min(.36px,calc((100cqw - 44px) / 800)); display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: end; gap: 20px 12px; height: 310px; margin-top: 16px; padding: 22px 8px; }
  .comparing .format-book { padding: 6px; gap: 5px; }
  .comparing .format-book>span { font-size: 7px; }
  .comparing .format-object { font-size: 10px; }
  .comparing .reference-object { grid-column: 1 / -1; justify-self: center; text-align: center; }
  .comparing .reference-phone { border-width: 2px; border-radius: 5px; padding: 3px; }
  .comparing .format-object { gap: 12px; }
  .compare-book>span { font-size: 11px; }
  .comparison-dialog { padding: 18px; }
  .comparison-footer { flex-wrap: wrap; }
  .comparison-footer>.primary { flex: 1; }
  .compare-select { grid-template-columns: 1fr; gap: 8px; }
  .material-spread { max-width: 280px; }
  .included-materials { margin-top: 18px; padding-top: 18px; }
  .material-options { gap: 12px; }
  .material-options button { padding: 14px 10px; }
  .material-options strong { font-size: 15px; }
  .material-options button>span:last-child { font-size: 12px; }
  .cover-example { width: 100px; height: 135px; padding: 18px 10px; }
  .paper-example { height: 100px; padding: 12px 6px; }
  .paper-choices { flex-direction: column; gap: 0; }
  .confirm-book { grid-template-columns: 1fr; gap: 24px; }
  .confirm-book .format-stage { min-height: 230px; }
  .confirm-book h2 { font-size: 18px; }
  .picker-footer { position: sticky; z-index: 1; bottom: 0; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); gap: 12px; flex-wrap: wrap; }
  .picker-footer-start { width: 100%; gap: 8px; justify-content: space-between; }
  .picker-price { margin-left: auto; text-align: right; }
  .picker-footer .primary { width: 100%; min-height: 48px; font-size: 14px; padding: 12px; justify-content: space-between; }
  .comparison-footer { flex-direction: column-reverse; align-items: stretch; }
  .comparison-footer button { width: 100%; }
  .editor-context { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: no-preference) {
  button { transition: background-color 140ms ease, opacity 140ms ease; }
  dialog[open] { animation: appear 170ms ease-out; }
  @keyframes appear { from { opacity: .5; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
}
