/* One inherited editor, responsive at the same content breakpoint. */
.public-templates{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin-top:24px}
.public-template{min-width:0;border:1px solid var(--line);border-radius:18px;background:var(--panel)}
.public-template-body{display:flex;flex-direction:column;padding:28px}
.public-tag{color:#526d4c;font-size:14px;line-height:1.6;margin-bottom:16px}
.public-template h3{font-size:30px;line-height:1.25;margin:0 0 6px}
.public-template .subtitle{font-size:17px;color:var(--muted);margin-bottom:22px}
.public-template p{font-size:17px;line-height:1.75;margin-bottom:16px;overflow-wrap:anywhere}
.public-template .book-purpose{font-weight:600}
.book-card-action{margin-top:auto;display:flex;align-items:center;gap:16px;padding-top:12px;flex-wrap:wrap}
.book-card-action button{font-size:17px;min-height:50px;min-width:132px}
.book-versions{margin-top:18px;border-top:1px solid var(--line);padding-top:14px}
.book-versions summary{font-size:14px;color:var(--muted);cursor:pointer}
.book-versions button{display:block;margin-top:10px;max-width:100%;text-align:left;overflow-wrap:anywhere;font-size:16px;min-height:44px}
.more-books{text-align:center;font-size:17px;color:var(--muted);padding:32px 0 12px;margin:0}
.library-tools{text-align:center}.library-tools button{font-size:14px;min-height:44px}
.public-muted,.public-note{font-size:14px;line-height:1.6;color:var(--muted)}
.public-buttons{display:flex;gap:10px;flex-wrap:wrap}.public-buttons button{min-height:50px;font-size:16px}
.public-toolbar{display:none}.mobile-views{display:none}
.draft-tools{position:relative;margin-left:auto;font-size:16px;z-index:30}
.draft-tools summary{cursor:pointer;border:1px solid var(--line);background:var(--panel);padding:12px 16px;border-radius:10px;min-height:48px}
.draft-tools-content{position:absolute;right:0;top:calc(100% + 6px);width:260px;max-width:calc(100vw - 32px);background:var(--panel);border:1px solid var(--line);box-shadow:var(--shadow);padding:16px;border-radius:12px}
.draft-tools-content p{font-size:14px;line-height:1.6;overflow-wrap:anywhere}.draft-tools-content button{font-size:16px;min-height:48px;width:100%;margin-top:8px}
.public-spread-link{margin:12px 0}.public-spread-link button{min-height:48px;font-size:16px}
#public-dialog{border:1px solid var(--line);background:var(--panel);color:var(--ink);border-radius:18px;padding:25px;width:min(620px,94vw);max-height:90dvh;overflow:auto}
#public-dialog::backdrop{background:#24302b80}#public-dialog h2{font-size:24px;margin-bottom:15px}#public-dialog p{font-size:16px;line-height:1.8}#public-dialog input{font:inherit;width:100%;padding:12px;margin:12px 0;border:1px solid var(--line);border-radius:8px}#public-dialog-close{margin-top:18px}
#public-status{position:fixed;bottom:18px;left:50%;transform:translateX(-50%);max-width:92%;background:var(--ink);color:white;border-radius:8px;padding:10px 18px;font-size:16px;z-index:100;display:none}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #a17937;outline-offset:3px}
img,canvas{max-width:100%}.family-page-canvas>canvas{height:auto}
.is-editing .page-head{display:none}
@media(max-width:1000px){.workbench-grid{grid-template-columns:minmax(270px,.8fr) minmax(0,1fr)}.privacy-note{white-space:normal}.page-head{align-items:start}}
@media(max-width:860px){
 .workbench-shell{width:calc(100% - 32px);padding:20px 0 max(32px,env(safe-area-inset-bottom))}
 .page-head{display:block;margin-bottom:24px}.page-head h1{font-size:24px;line-height:32px}.privacy-note{font-size:14px;line-height:22px;margin:8px 0 0}.eyebrow{display:none}
 .book-library{padding:0;border:0;border-radius:0;background:none;box-shadow:none}
 .library-head{display:block}.library-head h2{font-size:24px;line-height:32px;margin:0}.library-head p{font-size:17px;line-height:28px;margin:8px 0 0;max-width:none}
 .public-templates{grid-template-columns:1fr;gap:20px;margin-top:20px}.public-template-body{padding:22px}.public-template h3{font-size:24px;line-height:32px}.public-template p{font-size:17px;line-height:28px}.public-template .subtitle{font-size:14px;line-height:22px;margin-bottom:18px}.public-tag{font-size:14px;line-height:22px;margin-bottom:12px}
 .book-card-action{display:block;padding-top:6px}.book-card-action button{width:100%;min-height:52px}.book-card-action .public-muted{display:block;text-align:center;margin-top:10px}.more-books{font-size:17px;line-height:28px;padding-top:24px}.local-note{font-size:14px;line-height:22px;margin-bottom:0}
 .editor-topbar{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:12px;margin-bottom:16px}.editor-topbar>div{grid-column:1/-1;grid-row:2}.editor-topbar h2{font-size:24px;line-height:32px;margin:0}.editor-topbar .step-label{font-size:14px;line-height:22px;letter-spacing:0}.editor-topbar>.text-button{font-size:16px;min-height:48px;text-align:left}.editor-topbar .save-status{grid-column:1/-1;grid-row:3;font-size:14px;line-height:22px;white-space:normal}.draft-tools{grid-column:2;grid-row:1;font-size:16px}
 .book-progress{padding:14px;flex-wrap:wrap;gap:12px}.book-progress-copy strong{font-size:17px;line-height:26px}.book-progress-copy span{font-size:14px;line-height:22px}.book-progress button{font-size:16px;min-height:44px}
 .public-toolbar{display:block;position:sticky;top:0;z-index:20;background:var(--page-bg);padding:8px 0;margin:0 0 12px}
 .mobile-views{display:flex;gap:6px}.mobile-views button{flex:1;min-width:0;min-height:48px;font-size:16px;line-height:24px;background:var(--panel);border:1px solid var(--line);border-radius:8px;color:var(--ink);padding:10px 6px}.mobile-views button[aria-pressed=true]{background:var(--accent);color:white;border-color:var(--accent)}
 .workbench-grid{display:block}.control-panel,.preview-panel{padding:16px;border-radius:16px;min-width:0}.section-head{gap:12px}.section-head h2{font-size:24px;line-height:32px}.section-head .step-label{display:none}.page-count{font-size:14px}
 .editor-shell[data-mobile-view=edit] .preview-panel{display:none}.editor-shell[data-mobile-view=preview] .control-panel,.editor-shell[data-mobile-view=group] .control-panel{display:none}.editor-shell[data-mobile-view=group] .preview-panel>.preview-toolbar,.editor-shell[data-mobile-view=group] .preview-frame,.editor-shell[data-mobile-view=group] .preview-panel>.preview-note{display:none}.editor-shell[data-mobile-view=preview] .paired-spread-preview{display:none}
 .field-group>label,.field-label{font-size:16px;line-height:26px}.field-group input,.field-group select,.field-list input,.book-field-list input{font-size:17px;min-height:50px;max-width:100%}.photo-guide{font-size:16px}.photo-guide-item p,.photo-guide-item li{font-size:16px;line-height:26px}.photo-guide-item>span{font-size:14px;line-height:22px}.upload-copy strong{font-size:17px;line-height:28px}.upload-copy small,.file-note,.preview-note,.layout-check-control p{font-size:14px;line-height:22px}.layout-check-control label{font-size:16px}
 .action-row{flex-wrap:wrap}.action-row button,.save-control{width:100%}.action-row button{font-size:16px;min-height:50px}.preview-panel{padding:12px}.preview-toolbar{flex-wrap:wrap;gap:8px}.preview-toolbar h2{font-size:24px;line-height:32px}.preview-frame{padding:0}.page-preview{width:100%;aspect-ratio:1}.paired-spread-head{display:block}.paired-spread-head h3{font-size:17px;line-height:28px}.paired-spread-head>span{font-size:14px}.paired-spread-pages{gap:6px;grid-template-columns:repeat(2,minmax(0,1fr))}.spread-surface{margin:0;min-width:0}.spread-surface figcaption{font-size:14px;line-height:22px;white-space:normal;overflow-wrap:anywhere}
 .missing-page-list{grid-template-columns:1fr}.missing-page-card{min-width:0}.review-panel-head{flex-wrap:wrap}.review-panel-head h2{font-size:24px}.book-overview-intro p,.review-summary{font-size:16px;line-height:26px}.print-actions{flex-wrap:wrap}.print-actions button{width:100%;font-size:16px}.page-nav-row button{font-size:16px;min-height:48px}.photo-slot-list{grid-template-columns:repeat(2,minmax(0,1fr))}#public-dialog{padding:20px}
}

.illustration-reference{border-top:1px solid var(--line);margin-top:18px;padding-top:16px}.illustration-reference>strong{font-size:16px}.illustration-figures{display:grid;grid-template-columns:repeat(auto-fit,minmax(100px,1fr));gap:8px;margin:12px 0}.illustration-figures img{display:block;width:100%;aspect-ratio:4/3;object-fit:contain;background:white;border-radius:8px;max-height:230px}.illustration-reference button{font-size:16px;min-height:48px;width:100%}.illustration-reference .public-muted{margin:8px 0 12px}

/* Demo references stay visibly distinct from family photographs. */
.illustration-frame{position:relative;min-width:0;display:grid;place-items:center}
.illustration-frame img{width:100%}
.illustration-frame span{position:absolute;left:50%;top:57%;transform:translate(-50%,-50%) rotate(-15deg);padding:4px 14px;background:rgba(255,255,255,.85);color:#414c44;font-size:18px;font-weight:600;white-space:nowrap;pointer-events:none}

/* Guides are separate reading pages, reachable before creation and after output. */
.book-guide-link{display:inline-flex;align-items:center;justify-content:center;min-height:50px;font-size:17px;color:var(--accent);text-underline-offset:4px;padding:10px 14px;overflow-wrap:anywhere}.output-guide-link{margin-top:18px}
@media(max-width:860px){.book-card-action .book-guide-link{display:flex;width:100%;margin-top:8px}.output-guide-link{font-size:16px;text-align:center}}

/* Book samples and the same live renderer are shared by desktop and mobile. */
/* Preserve the finished cover; give it a small physical-book edge in layout. */
.book-title-row{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:24px;min-width:0}
.book-title-copy{min-width:0;flex:1}
.public-template .book-title-copy .subtitle{margin:4px 0 0}
.book-cover-mini{position:relative;flex:0 0 110px;transform:perspective(650px) rotateY(-12deg) rotateZ(2deg);margin:4px 8px 8px 0;isolation:isolate}
.book-cover-mini::before{content:"";position:absolute;inset:4px -5px -4px 4px;background:repeating-linear-gradient(to bottom,#fffdf6 0 2px,#d8d4c9 2px 3px);border:1px solid #c7c4b9;border-radius:2px 5px 5px 2px;z-index:-1;box-shadow:4px 8px 12px #343b3026}
.book-cover-mini::after{content:"";position:absolute;inset:0 auto 0 0;width:5px;background:linear-gradient(90deg,#3332,transparent);pointer-events:none}
.book-cover-mini img{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:contain;border-radius:2px;box-shadow:0 0 0 1px #45453515}
@media(max-width:860px){.book-title-row{gap:12px;margin-bottom:22px}.book-cover-mini{flex-basis:96px;margin-right:5px}.public-template .book-title-copy h3{font-size:24px;line-height:1.3}}
@media(max-width:360px){.book-cover-mini{flex-basis:84px}.book-title-row{gap:10px}}
.sample-book-button{width:100%;margin:4px 0 16px;min-height:50px;font-size:17px}
.inline-page-preview{margin:18px 0;padding:16px;background:#f7f7f0;border:1px solid #dfe3d5;border-radius:14px}
.inline-page-preview>strong{display:block;font-size:17px;margin-bottom:12px}
.inline-page-preview canvas{display:block;width:100%;height:auto;max-width:420px;margin:auto;border-radius:6px;box-shadow:0 3px 14px rgba(40,50,40,.08)}
.inline-page-preview p{font-size:14px;line-height:22px;margin:12px 0 0;color:#536254}
.illustration-reference{margin-top:12px}.illustration-reference .secondary-button{width:100%}
.surface-overview-row{grid-template-columns:76px 28px minmax(0,1fr) auto}
.overview-page-thumb{width:76px;height:76px;object-fit:contain;border-radius:5px;background:#f6f2e9}
.book-showcase{position:fixed;inset:0;z-index:1000;background:rgba(38,46,38,.48);display:flex;align-items:center;justify-content:center;padding:20px}
.showcase-sheet{width:100%;max-width:960px;max-height:94vh;overflow:auto;background:#fffdf8;border-radius:20px;padding:22px;box-sizing:border-box}
.showcase-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.showcase-head h2{font-size:24px;line-height:32px;margin:0}.showcase-head p,.showcase-hint{font-size:14px;line-height:22px;margin:6px 0 12px;color:#536254}.showcase-head button{flex-shrink:0;min-height:44px}
/* Two-sided leaves turn about the spine; no image slider. */
.showcase-stage{padding:24px 8px 20px;touch-action:pan-y;user-select:none;perspective:1800px}
.showcase-book{position:relative;display:block;width:100%;isolation:isolate;perspective:1800px;filter:drop-shadow(0 12px 10px #342b202b)}
.showcase-book::before{content:"";display:block;padding-top:50%}
.showcase-paper{display:block;position:absolute;top:0;bottom:0;height:100%;width:50%;min-width:0;padding:0;border:0;border-radius:0;background:#f9f4e9;cursor:zoom-in;box-shadow:0 3px 0 #e2dccc,0 5px 0 #bdb7a7;overflow:hidden}
.showcase-paper:disabled{opacity:1;cursor:default;pointer-events:none}
.showcase-paper img,.showcase-leaf img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none}
.showcase-paper.is-left{left:0;border-radius:5px 0 0 5px}.showcase-paper.is-right{right:0;border-radius:0 5px 5px 0}
.showcase-paper.is-left::after,.showcase-paper.is-right::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,transparent 84%,#483b211c)}
.showcase-paper.is-right::after{background:linear-gradient(90deg,#483b2126,transparent 14%)}
.showcase-paper.is-absent{visibility:hidden}.showcase-spine{position:absolute;left:50%;top:0;bottom:0;width:2px;background:#71634f38;z-index:2;pointer-events:none}.is-closed .showcase-spine{display:none}
.showcase-blank{display:block;width:100%;height:100%;background:#fbf7f0}
.showcase-leaf{position:absolute;top:0;width:50%;height:100%;transform-style:preserve-3d;z-index:3;transition:transform 620ms cubic-bezier(.3,.05,.25,1);pointer-events:none}
.turn-forward{left:50%;transform-origin:left center}.turn-back{left:0;transform-origin:right center}
.turn-forward.is-turning{transform:rotateY(-180deg)}.turn-back.is-turning{transform:rotateY(180deg)}
.leaf-front,.leaf-back{position:absolute;inset:0;backface-visibility:hidden;-webkit-backface-visibility:hidden;background:#fbf7f0;overflow:hidden;box-shadow:0 2px 6px #30291933}
.leaf-back{transform:rotateY(180deg)}.leaf-front::after,.leaf-back::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#44351e30,transparent 25%,#44351e14);pointer-events:none}
.showcase-caption{font-size:14px;line-height:22px;min-height:44px;margin:8px 0;color:#536254;text-align:center;overflow-wrap:anywhere}
.showcase-footer{margin-top:18px;text-align:center}
.showcase-zoom{position:absolute;inset:12px;max-width:850px;margin:auto;overflow:auto;background:#fffdf8;padding:16px;border-radius:16px;z-index:10;text-align:center}
.showcase-zoom[hidden]{display:none}.showcase-zoom button{display:block;position:sticky;top:0;margin:0 0 12px auto;z-index:1;min-height:48px}.showcase-zoom img{display:block;width:auto;max-width:100%;max-height:75vh;margin:auto}.showcase-zoom p{font-size:16px;line-height:26px}
@media(prefers-reduced-motion:reduce){.showcase-leaf{transition:none}}
.showcase-nav{display:flex;justify-content:space-between;align-items:center;margin-top:12px}.showcase-nav button{min-height:48px;font-size:16px}.showcase-nav span{font-size:14px}
@media(max-width:860px){.book-showcase{padding:10px}.showcase-sheet{padding:16px;max-height:94vh}.showcase-head h2{font-size:24px}.surface-overview-row{grid-template-columns:64px 22px minmax(0,1fr)}.overview-page-thumb{width:64px;height:64px;grid-row:span 2}.surface-overview-status{grid-column:3}.public-template h3{font-size:24px}.inline-page-preview{padding:12px}}
