@font-face{font-family:LBSans;src:url('./fonts/Sans.ttf')}@font-face{font-family:LBBold;src:url('./fonts/Bold.ttf')}@font-face{font-family:LBHeavy;src:url('./fonts/Heavy.ttf')}@font-face{font-family:LBSerif;src:url('./fonts/Serif.ttf')}@font-face{font-family:LBItalic;src:url('./fonts/Italic.ttf')}@font-face{font-family:LBCondensed;src:url('./fonts/Condensed.ttf')}@font-face{font-family:LBCyrillic;src:url('./fonts/Cyrillic.ttf')}
:root{--paper:#faf9f6;--ink:#252822;--muted:#85877f;--line:#e5e5df;--accent:#596c51;--stage:#eae9e4}*{box-sizing:border-box}body{margin:0;color:var(--ink);background:var(--paper);font:13px -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}button,input,select{font:inherit}button{cursor:pointer;color:inherit}button:disabled{cursor:not-allowed;opacity:.4}button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid #83977a;outline-offset:3px}button{transition:background .15s,box-shadow .15s,opacity .15s}input,select{min-width:0}button svg{pointer-events:none}.icon{display:inline-flex;width:16px;height:16px;flex-shrink:0;align-items:center;justify-content:center}.icon svg{width:100%;height:100%}h1,h2,h3,p{margin:0}h2{font-size:14px;font-weight:650}h3{font-size:12px;font-weight:650;margin-bottom:13px}small{font-size:11px}.app-header{height:76px;display:flex;align-items:center;padding:0 25px;gap:25px;border-bottom:1px solid var(--line);background:#fff;position:relative;z-index:3}.wordmark{display:flex;gap:11px;text-decoration:none;color:var(--ink);min-width:215px;align-items:center;font-family:Georgia,serif;font-size:28px;letter-spacing:-1px;line-height:1}.brand-mark{display:flex;align-items:center;justify-content:center;font-style:italic;font-size:37px;width:41px;height:42px;background:var(--ink);color:var(--paper);padding-bottom:5px;border-radius:4px}.wordmark-sub{display:block;font:8px -apple-system,BlinkMacSystemFont,sans-serif;letter-spacing:2.2px;margin-top:6px}.document-name{flex:1;display:flex;gap:14px;align-items:center}.document-name>span{font-size:14px;font-weight:600}.document-name small{color:var(--muted);display:flex;align-items:center;gap:5px}.document-name i{height:5px;width:5px;background:#7f956e;border-radius:50%}.header-actions{display:flex;gap:9px;align-items:center}.primary,.secondary,.quiet,.icon-button{border:0;display:inline-flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap}.primary{background:var(--ink);color:#fff;padding:12px 17px;border-radius:7px;font-size:12px;font-weight:550}.primary:hover{background:#3e4838}.secondary{background:#fff;border:1px solid var(--line);padding:10px;border-radius:6px;font-size:11px}.secondary:hover,.quiet:hover,.icon-button:hover{background:#efefe9}.quiet{padding:9px 11px;background:transparent;border-radius:5px;font-size:12px}.icon-button{width:30px;height:30px;border-radius:5px;background:transparent}.full{width:100%}.text-button{padding:0;border:0;background:none;color:var(--accent);font-size:11px}.text-button:hover{text-decoration:underline}.workspace{display:grid;grid-template-columns:250px minmax(310px,1fr) 300px;height:calc(100vh - 76px);height:calc(100dvh - 76px);min-height:610px}.library{display:flex;flex-direction:column;background:var(--paper);padding:22px 18px 0;border-right:1px solid var(--line);min-height:0}.section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px;gap:8px}.section-head.compact{margin-bottom:10px}.section-head h3{margin:0}.count{font-size:10px;display:inline-block;background:#e9ebe4;color:#666f5e;border-radius:4px;line-height:18px;padding:0 5px;margin-left:5px}.drop-zone{display:flex;align-items:center;flex-direction:column;gap:6px;flex-shrink:0;width:100%;border:1px dashed #bfc5b6;background:#f2f3ed;color:#505c46;padding:17px 6px;border-radius:8px}.drop-zone strong{font-size:12px;font-weight:600}.drop-zone span:not(.upload-symbol){font-size:11px;color:#8b9382}.drop-zone small{font-size:9px;color:#93998a;margin-top:4px}.upload-symbol{font-size:24px;line-height:1;margin-bottom:4px}.drop-zone:hover,.drop-zone.dragover{background:#e8ecdf;border-color:#6a805d}.library-note{font-size:10px;color:var(--muted);margin:13px 0 18px;line-height:1.5}.library-toolbar{display:flex;justify-content:space-between;font-size:10px;color:#7c8175;margin-bottom:12px}.photo-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;overflow:auto;min-height:0;align-content:start;padding-bottom:20px;scrollbar-width:thin}.photo-item{position:relative;min-width:0;cursor:grab}.photo-item button.photo-pick{border:0;padding:0;background:#e7e5df;width:100%;height:132px;border-radius:5px;overflow:hidden;display:block;position:relative}.photo-item img{width:100%;height:100%;object-fit:cover;transition:transform .2s}.photo-item:hover img{transform:scale(1.035)}.photo-item .photo-name{font-size:9px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#888c80;margin:5px 0 3px}.photo-item .used-badge{position:absolute;bottom:6px;right:6px;border-radius:3px;background:#f9faf4e8;padding:2px 4px;font-size:9px;color:#56654b}.photo-item .remove-photo{position:absolute;right:5px;top:5px;display:none;border:0;background:#ffffffdc;border-radius:50%;width:20px;height:20px;padding:0;font-size:12px}.photo-item:hover .remove-photo,.photo-item:focus-within .remove-photo{display:block}.photo-item.current .photo-pick{outline:2px solid #718565;outline-offset:-2px}.library-bottom{border-top:1px solid var(--line);padding:16px 0;display:flex;gap:7px;color:#8b9082;align-items:center;font-size:10px;margin-top:auto}.editor{min-width:0;display:flex;flex-direction:column;background:var(--stage);overflow:hidden}.editor-toolbar{display:flex;align-items:center;justify-content:space-between;padding:20px 25px 14px;min-height:77px;gap:8px}.eyebrow{font-size:8px;font-weight:650;letter-spacing:2px;color:#93958c}.editor-toolbar h1{font-size:15px;margin-top:6px;font-weight:550}.toolbar-buttons{display:flex;gap:3px}.stage{flex:1;min-height:120px;display:flex;align-items:center;justify-content:center;padding:8px 28px 10px;overflow:auto}.canvas-host{height:100%;width:100%;display:flex;justify-content:center;align-items:center}.canvas-host>svg{display:block;max-width:100%;max-height:100%;height:100%;width:auto;filter:drop-shadow(0 8px 14px #28291c18);background:white}.canvas-host svg [data-crop-key]{cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none}.canvas-host svg.is-panning,.canvas-host svg.is-panning [data-crop-key]{cursor:grabbing}.canvas-host svg text{pointer-events:none}.canvas-host svg image{-webkit-user-drag:none}.slot-highlight{pointer-events:none;stroke:#759868;stroke-width:2;stroke-dasharray:6 4;fill:none;vector-effect:non-scaling-stroke}.canvas-caption{display:flex;justify-content:space-between;padding:10px 27px 16px;gap:8px;font-size:10px;color:#82877a;min-height:39px}.canvas-caption>span:nth-child(2){font-size:9px}.page-strip{height:128px;min-height:128px;display:flex;gap:12px;padding:15px 23px 8px;overflow:auto;background:#efeee9;border-top:1px solid #dfdfd7;scrollbar-width:thin}.page-card{width:104px;min-width:104px;position:relative;border:0;background:none;padding:0;display:flex;flex-direction:column;align-items:center;gap:5px}.page-thumbnail{height:80px;width:104px;display:flex;align-items:center;justify-content:center;background:#e2e2da;border:2px solid transparent;border-radius:5px;padding:4px}.page-thumbnail svg{max-width:100%;height:100%;width:auto;box-shadow:0 1px 3px #0002;pointer-events:none}.page-card.selected .page-thumbnail{border-color:#6e805d;background:#e0e6d8}.page-card>span:last-child{font-size:9px;color:#868b7c}.page-lock{position:absolute;right:5px;top:4px;background:#fff;border-radius:3px;padding:2px 4px;font-size:9px}.editor-footer{height:36px;flex-shrink:0;background:#efeee9;display:flex;align-items:center;padding:0 25px;gap:20px;font-size:9px;color:#95998e}.editor-footer>span:last-child{margin-left:auto;font-size:8px}.inspector{background:#fff;border-left:1px solid var(--line);overflow:auto;scrollbar-width:thin}.generate-panel{padding:22px 20px 17px;background:#fcfcf9;border-bottom:1px solid var(--line)}.generate-panel .section-head{margin-bottom:15px}.generate-panel h2{font-size:12px}.tiny-badge{font-size:8px;background:#eceee6;color:#7f8875;padding:4px 5px;border-radius:4px;white-space:nowrap}.generate-panel small{display:block;text-align:center;color:#979c8e;margin-top:9px;font-size:9px}label{display:flex;flex-direction:column;gap:7px;font-size:10px;color:#777d6d;margin-bottom:13px}input:not([type=range]):not([type=color]),select{width:100%;padding:10px 9px;border:1px solid #dedfd7;border-radius:5px;background:#fff;color:#3f4537;font-size:11px;min-height:35px}input::placeholder{color:#aaaDA2;font-size:10px}select{appearance:auto;padding-right:3px}.two-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}.two-fields label{min-width:0}.order-field{flex-direction:row;align-items:center;justify-content:space-between}.order-field select{width:153px;min-height:28px;padding:6px;font-size:10px}.inspector-tabs{display:flex;border-bottom:1px solid var(--line);padding:0 20px;gap:24px}.inspector-tabs button{border:0;background:none;padding:15px 0 12px;font-size:11px;color:#9b9e93;border-bottom:2px solid transparent}.inspector-tabs button.active{color:#3f5034;border-color:#667859}.inspector-content{padding:22px 20px 30px}.template-button{width:100%;display:flex;align-items:center;justify-content:space-between;text-align:left;background:#f5f5ef;border:1px solid #e5e6dc;border-radius:6px;padding:12px;margin-bottom:10px}.template-button strong{display:block;font-size:11px;font-weight:550}.template-button small{display:block;font-size:9px;color:#919785;margin-top:5px}.two-buttons{display:grid;grid-template-columns:1fr 1fr;gap:8px}.two-buttons button{font-size:9px;gap:4px}.lock-button{border:0;display:flex;align-items:center;gap:4px;font-size:9px;padding:4px;background:none;color:#87917b}.lock-button.is-locked{color:#445d32;background:#eaf0e3;border-radius:4px}.divider{height:1px;background:var(--line);margin:22px 0}.swatches{display:flex;gap:9px;margin-bottom:18px;align-items:center}.swatch{width:25px;height:25px;padding:0;border:1px solid #d6d8cf;border-radius:50%;background:var(--swatch);flex-shrink:0}.swatch.active{outline:2px solid #738564;outline-offset:3px}.swatch.original{font:12px Georgia,serif;background:linear-gradient(135deg,#171714 50%,#f3f0e8 50%);color:#a6997f}.color-custom{position:relative;width:25px;height:25px;margin:0}.color-custom input{position:absolute;inset:0;width:25px;height:25px;opacity:0;cursor:pointer}.color-custom span{width:25px;height:25px;border:1px dashed #a6af9a;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#859475;font-size:15px;pointer-events:none}input[type=color]{height:35px;width:100%;border:1px solid #dedfd7;border-radius:5px;background:white;padding:4px;cursor:pointer}.range-label{position:relative;display:block;margin:16px 0}.range-label output{float:right;color:#46563b;font-size:10px}.range-label input{display:block;width:100%;height:14px;margin:9px 0 0;accent-color:#677c57;cursor:pointer}.inline-label{flex-direction:row;align-items:center;justify-content:space-between}.inline-label input{width:40px;height:26px}.crop-note{font-size:10px;color:#919786;line-height:1.6;margin:0 0 15px}.muted{color:#858b7b;font-size:11px;line-height:1.7;margin-bottom:16px}.space-top{margin-top:10px}.empty-state{text-align:center;color:#7a826d}.empty-art{font:italic 90px Georgia,serif;color:#b9c1ac;line-height:1.1;margin-bottom:15px}.empty-state h2{font-size:22px;font-weight:500;color:#515c45}.empty-state p{font-size:12px;line-height:1.8;margin:15px 0 25px}.toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);z-index:100;background:#293123;color:#fff;padding:13px 20px;border-radius:8px;max-width:min(650px,90vw);font-size:12px;box-shadow:0 5px 25px #0002;line-height:1.6}.toast.error{background:#743c31}.busy{position:fixed;inset:0;background:#f5f4efcc;z-index:90;display:flex;align-items:center;justify-content:center;gap:15px;font-size:16px;backdrop-filter:blur(2px)}.spinner{height:23px;width:23px;border:2px solid #c1c8b8;border-top-color:#526747;border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}[hidden]{display:none!important}dialog{border:0;border-radius:12px;background:#faf9f6;color:var(--ink);box-shadow:0 30px 100px #0003;padding:25px;width:min(1050px,94vw);max-height:90vh;overflow:auto}dialog::backdrop{background:#191d1760;backdrop-filter:blur(3px)}.dialog-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.dialog-head h2{font-family:Georgia,serif;font-size:27px;font-weight:400;margin-top:5px}.filter-row{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:22px}.filter-row button{background:#eeeee7;border:0;border-radius:20px;font-size:11px;padding:7px 12px}.filter-row button.active{background:#3e4c34;color:#fff}.template-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}.template-choice{background:none;border:0;text-align:left;padding:0}.template-preview{height:205px;background:#e7e6df;padding:14px;display:flex;justify-content:center;align-items:center;border:2px solid transparent;border-radius:5px}.template-preview svg{max-height:100%;max-width:100%;height:100%;width:auto;pointer-events:none;box-shadow:0 2px 8px #0002}.template-choice:hover .template-preview{border-color:#8b9f7a}.template-choice.selected .template-preview{border-color:#536d43}.template-choice strong{display:block;font-size:12px;font-weight:500;margin:10px 0 4px}.template-choice small{font-size:9px;color:#919684}.help-list{padding-left:22px;line-height:1.8}.help-list li{margin:16px 0;padding-left:5px}.help-list strong{font-weight:600}#help-dialog{max-width:630px}.drag-target{outline:2px dashed #758c64!important;outline-offset:2px}.uploading{pointer-events:none;opacity:.55}
@media(min-width:1600px){.workspace{grid-template-columns:275px minmax(400px,1fr) 325px}.library{padding:24px 22px 0}.photo-item button.photo-pick{height:149px}.inspector-content,.generate-panel{padding-left:25px;padding-right:25px}.canvas-host>svg{max-width:90%}}
@media(max-width:1120px){.workspace{grid-template-columns:190px minmax(280px,1fr) 270px}.library{padding:18px 12px 0}.photo-item button.photo-pick{height:108px}.app-header{padding:0 16px;gap:10px}.wordmark{min-width:164px}.document-name small{display:none}.header-actions{gap:2px}.header-actions .quiet{padding:8px;font-size:10px}.editor-toolbar{padding:18px 15px 12px}.canvas-caption>span:nth-child(2){display:none}.inspector-content,.generate-panel{padding-left:15px;padding-right:15px}.template-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:850px){.workspace{grid-template-columns:155px 1fr;height:auto;min-height:calc(100dvh - 66px)}.app-header{height:66px}.wordmark{min-width:140px;font-size:23px}.brand-mark{width:33px;height:36px;font-size:31px}.wordmark-sub{font-size:6px}.document-name{display:none}.header-actions{margin-left:auto}.header-actions .primary{padding:10px}.header-actions #new-button{display:none}.library{grid-row:1 / 3;max-height:calc(100dvh - 66px);position:sticky;top:0}.photo-grid{grid-template-columns:1fr}.photo-item button.photo-pick{height:155px}.library-note{font-size:9px}.drop-zone{padding:12px 3px}.drop-zone strong{font-size:10px}.drop-zone small{font-size:8px}.editor{height:680px;min-height:0}.inspector{grid-column:2;border-top:1px solid var(--line);overflow:visible}.generate-panel{display:block}.inspector-content{max-width:620px}.editor-footer>span:last-child{display:none}.toolbar-buttons{gap:0}.editor-toolbar h1{font-size:12px}.editor-toolbar .eyebrow{font-size:7px}.stage{padding:10px 15px}.template-grid{grid-template-columns:repeat(2,1fr)}}

@font-face{font-family:LBSansItalic;src:url('./fonts/SansItalic.ttf')}@font-face{font-family:LBSansBoldItalic;src:url('./fonts/SansBoldItalic.ttf')}@font-face{font-family:LBSerifBold;src:url('./fonts/SerifBold.ttf')}@font-face{font-family:LBSerifItalic;src:url('./fonts/SerifItalic.ttf')}@font-face{font-family:LBSerifBoldItalic;src:url('./fonts/SerifBoldItalic.ttf')}
.text-library{padding-bottom:15px;margin-bottom:18px;border-bottom:1px solid var(--line);flex-shrink:0}.text-list{display:flex;flex-direction:column;gap:5px;max-height:170px;overflow:auto;scrollbar-width:thin}.text-layer{text-align:left;border:1px solid transparent;border-radius:5px;background:transparent;color:#5b6552;padding:8px 7px;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex-shrink:0}.text-layer:hover{background:#ecefe5}.text-layer.selected{background:#e7eedf;border-color:#92a780;color:#34462a}.text-toolbar{display:flex;gap:7px;padding:0 24px 8px;flex-wrap:wrap}.text-toolbar button{font-size:11px;padding:7px 10px}.selected-text-panel{padding:20px;background:#f7f9f2;border-bottom:1px solid #dce4d2}.selected-text-panel textarea,.inline-text-editor textarea{display:block;resize:vertical;width:100%;min-height:74px;border:1px solid #c9d1be;background:white;border-radius:5px;padding:9px;color:#303a29;font:13px/1.4 -apple-system,BlinkMacSystemFont,Arial,sans-serif}.text-style-buttons{margin:0 0 14px}.text-style-buttons button[aria-pressed=true]{background:#e3ecd9;border-color:#81986a;color:#3e5530}.legacy-texts summary{cursor:pointer;font-size:11px;color:#737d67;margin-bottom:16px}.stage{position:relative}.inline-text-editor{position:absolute;z-index:12;left:50%;top:50%;transform:translate(-50%,-50%);width:min(340px,calc(100% - 32px));border:1px solid #b7c6a8;background:#fffffc;border-radius:10px;padding:17px;box-shadow:0 12px 40px #0003}.inline-text-editor small{display:block;margin-top:10px;color:#7e8873;font-size:10px}.canvas-host svg [data-text-id]{cursor:move;touch-action:none;user-select:none;-webkit-user-select:none}.canvas-host svg .text-hit{stroke:transparent;stroke-width:1;vector-effect:non-scaling-stroke}.canvas-host svg [data-text-id]:hover .text-hit{stroke:#9aad84}.canvas-host svg [data-text-id].text-selected .text-hit{stroke:#739854;stroke-width:2}.canvas-host svg [data-text-id]:focus-visible{outline:2px solid #739854}.canvas-host svg.is-text-dragging,.canvas-host svg.is-text-dragging [data-text-id]{cursor:grabbing}
@media(max-width:850px){.text-toolbar{padding-left:15px;padding-right:15px}.text-toolbar button{font-size:10px}.text-list{max-height:130px}}
.canvas-host svg.has-text-selection .slot-highlight{display:none}

.frame-settings{margin-top:20px;border-top:1px solid var(--line);padding-top:16px}.frame-settings summary{cursor:pointer;font-size:11px;color:var(--accent)}.frame-settings[open] summary{margin-bottom:14px}.selected-photo-name{font-size:11px;color:var(--muted);overflow-wrap:anywhere;margin-bottom:14px}
/* Document view: the canvas scrolls; the library and inspector stay available. */
.stage{display:block;padding:8px 26px 30px;overflow:auto;scroll-behavior:smooth;overflow-anchor:none}
.canvas-host{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;height:auto;width:100%;gap:0}
.document-page{width:100%;max-width:1100px;flex-shrink:0;scroll-margin-top:14px;border:1px solid transparent;border-radius:8px;padding:12px;background:#f2f1ec}
.document-page.active{border-color:#8b9b7c;background:#eef1e8}
.document-page-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:13px;flex-wrap:wrap}
.page-label{border:0;background:transparent;font-size:12px;font-weight:600;text-align:left;padding:4px}
.page-actions{display:flex;gap:15px;flex-wrap:wrap}.page-actions button{font-size:10px}
.page-surface{width:100%;display:flex;justify-content:center;align-items:flex-start}
.page-surface>svg{display:block;width:100%;height:auto;max-width:100%;max-height:none;background:white;box-shadow:0 3px 10px #0002}
.page-surface.drop-ready{outline:3px solid #7a9565;outline-offset:3px}
.insert-page{flex-shrink:0;border:1px dashed #b5bcae;border-radius:6px;background:#f8f9f3;color:#536646;font-size:11px;padding:9px 20px;margin:16px 0}
.insert-page:hover{background:#e7eddd;border-color:#7a9565}
.page-strip{display:none}.canvas-caption{padding-bottom:9px}.editor-footer{height:36px}
.inline-text-editor{position:fixed;top:50%;left:50%;width:min(420px,calc(100vw - 40px));z-index:30}
.library-filters{display:flex;gap:5px;margin-bottom:12px}.library-filters button{border:1px solid var(--line);border-radius:5px;background:transparent;padding:7px;font-size:10px}.library-filters button.active{background:#e4ebdc;border-color:#a6b19c;color:#3c5031}
.library-empty{grid-column:1/-1;color:var(--muted);font-size:11px;line-height:1.6;padding:10px 0}
#template-dialog-note{max-width:760px;margin-bottom:20px}.template-choice.incompatible{opacity:.65;cursor:not-allowed}.template-choice.incompatible .template-preview{filter:grayscale(1);opacity:.55}.template-choice small{white-space:normal;line-height:1.5}
#layout-trial-preview{display:flex;justify-content:center;background:var(--stage);padding:18px;border-radius:7px;height:60vh;min-height:260px}
#layout-trial-preview svg{height:100%;width:auto;max-width:100%;object-fit:contain;box-shadow:0 3px 10px #0002}#layout-trial-note{margin:15px 0;line-height:1.6;color:var(--accent)}
[hidden]{display:none!important}
@media(max-width:1100px){.page-actions{gap:10px}.stage{padding-left:12px;padding-right:12px}.editor-toolbar{padding:14px 12px}.toolbar-buttons{flex-wrap:wrap;justify-content:flex-end}.toolbar-buttons .primary{padding:8px;font-size:11px}.canvas-caption>span:nth-child(2){display:none}}
.reference-dialog{width:min(1260px,96vw);max-width:96vw;max-height:94dvh;padding:24px;overflow:auto}.reference-intro{margin-bottom:20px}.reference-upload{max-width:540px;margin:40px auto}.reference-upload .drop-zone{padding:50px 16px;margin-bottom:18px}.reference-workspace{display:grid;grid-template-columns:minmax(280px,1fr) 270px;gap:24px}.reference-main{min-width:0;position:sticky;top:0;align-self:start}.reference-surface{height:65dvh;min-height:300px;background:#e6e6df;border-radius:7px;padding:14px;display:flex;align-items:center;justify-content:center;overflow:hidden}.reference-surface>svg{display:block;width:100%;height:100%;max-width:100%;max-height:100%;touch-action:none;user-select:none;-webkit-user-select:none}.reference-surface svg image{pointer-events:none}.reference-surface .ref-hit{cursor:move}.reference-surface .ref-handle{cursor:nwse-resize;fill:#fff;stroke:#607b4e;stroke-width:2;vector-effect:non-scaling-stroke}.reference-surface.drawing{cursor:crosshair}.reference-settings{max-height:69dvh;overflow:auto;padding:2px 7px 12px 0}.reference-settings textarea{width:100%;min-height:75px;padding:8px;border:1px solid var(--line);border-radius:5px;font:12px/1.4 Arial;resize:vertical}.reference-modes{display:flex;gap:5px}.reference-modes button{flex:1;padding:8px 3px;font-size:10px}.reference-modes button.active{background:#e4ecd9;border-color:#82966f}.reference-toggle{flex-direction:row;align-items:center;gap:7px;margin-top:15px}.reference-toggle input{width:auto!important;min-height:0!important}.reference-block-list{max-height:150px;overflow:auto;margin-bottom:15px;display:flex;flex-direction:column;gap:4px}.reference-block-list button{text-align:left;border:1px solid transparent;border-radius:4px;background:#f4f5ef;padding:7px;font-size:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex-shrink:0}.reference-block-list button.active{border-color:#7e956a;background:#e5eddc}.reference-progress{position:sticky;bottom:0;background:#f5f8ed;border:1px solid #b7c6a8;border-radius:6px;padding:12px;display:flex;align-items:center;gap:12px;margin-top:15px;font-size:12px}.reference-progress button{margin-left:auto}#reference-hint{margin-top:12px}#reference-preview-tools .muted{margin-bottom:20px}
@media(max-width:850px){.reference-workspace{grid-template-columns:1fr}.reference-main{position:static}.reference-surface{height:50dvh}.reference-settings{max-height:none}.reference-dialog{padding:16px}}
/* One document, one design family. Compact workspace and screen-only magnification. */
.app-header{height:52px;padding:0 16px;gap:18px}.wordmark{min-width:200px;font-size:23px;gap:8px}.brand-mark{width:29px;height:30px;font-size:28px}.wordmark-sub{display:none}.app-header .primary{padding:9px 13px}.document-name{min-width:0}.document-name>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.document-name small{font-size:10px}.app-menu{position:relative}.app-menu summary{cursor:pointer;list-style:none;padding:8px 12px;border-radius:5px}.app-menu summary::-webkit-details-marker{display:none}.app-menu[open]>div{position:absolute;right:0;top:35px;background:white;border:1px solid var(--line);border-radius:8px;box-shadow:0 8px 30px #0002;min-width:190px;padding:7px;display:flex;flex-direction:column}.app-menu button{justify-content:flex-start}
.workspace{height:calc(100dvh - 52px);min-height:0;grid-template-columns:250px minmax(280px,1fr) 280px}.library{padding:12px 12px 0;max-height:none}.library .section-head{margin-bottom:10px;flex-shrink:0}.library .library-filters{margin-bottom:8px;flex-shrink:0}.library-toolbar{margin-bottom:8px;flex-shrink:0}.library .library-note{display:none}.library .drop-zone{margin:0 0 12px}.photo-grid{flex:1;padding:0 3px 12px 0;gap:8px}.photo-item button.photo-pick{height:145px}.library-bottom{height:28px;min-height:28px;flex-shrink:0;font-size:9px;margin:0}.library.file-hover{background:#e6eddf;outline:2px dashed #7a9565;outline-offset:-5px}.text-layers-details{padding:14px 18px;border-top:1px solid var(--line)}.text-layers-details>summary,.auto-draft>summary{cursor:pointer;color:var(--accent);font-size:12px}.text-library{padding:12px 0 0;margin:0;border:0}
.editor{min-height:0;min-width:0;display:flex;flex-direction:column}.editor-toolbar{padding:8px 12px;min-height:48px;gap:10px;flex-shrink:0;flex-wrap:wrap}.editor-toolbar h1{font-size:11px;flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.view-switch{display:flex;border:1px solid #cdd2c6;border-radius:6px;overflow:hidden;flex-shrink:0}.view-switch button{padding:7px 10px;background:transparent;border:0;font-size:11px}.view-switch button.active{background:#53664b;color:white}.editor-toolbar .secondary{padding:7px 9px}.stage{flex:1;min-height:0;padding:10px 18px 20px;scroll-behavior:auto}.canvas-host{width:100%;min-width:100%;align-items:flex-start}.document-page{max-width:none;width:max-content;padding:8px;margin:0 auto;scroll-margin-top:8px}.document-page-head{margin-bottom:6px;gap:4px;min-height:22px;flex-wrap:nowrap}.page-label{font-size:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.page-actions{gap:8px;flex-wrap:nowrap}.page-actions button{font-size:9px}.page-surface{width:max-content}.page-surface>svg{width:auto;height:auto;max-width:none;max-height:none}.insert-page{margin:7px auto;padding:5px 12px;font-size:10px}.editor-footer{height:40px;flex-shrink:0;display:flex;align-items:center;gap:10px;padding:0 14px;font-size:10px;border-top:1px solid var(--line)}.zoom-controls{margin-left:auto;display:flex;align-items:center;gap:4px}.zoom-controls select{width:145px;font-size:11px;border:1px solid #d4d7ce;border-radius:5px;background:#fafbf7;padding:4px}.editor-footer>span:last-child{margin-left:0}.canvas-host.overview{display:grid;grid-template-columns:repeat(auto-fill,minmax(var(--overview-width,240px),1fr));gap:20px;align-items:start;justify-items:center}.overview .insert-page{display:none}.overview .document-page{margin:0;padding:7px;cursor:pointer;max-width:100%}.overview .page-actions{display:none}.overview .document-page-head{cursor:grab}.overview .page-surface svg [data-text-id],.overview .page-surface svg [data-crop-key]{cursor:pointer}.overview .slot-highlight{display:none}.overview .document-page.active{box-shadow:0 0 0 2px #81976e}.document-style-panel{padding:16px 18px;border-bottom:1px solid var(--line)}.document-style-panel>strong{font:21px Georgia,serif;display:block;margin:8px 0}.document-style-panel p{font-size:10px;margin-bottom:12px}.auto-draft{border-bottom:1px solid var(--line);padding:13px 18px}.auto-draft .generate-panel{padding:15px 0 0;border:0}.auto-draft .section-head{display:none}.inspector-content,.selected-text-panel{padding:18px}.design-options{display:flex;gap:10px;margin:22px 0;flex-wrap:wrap}.design-options button{flex:1;min-width:180px;text-align:left;padding:16px;border:2px solid transparent;border-radius:8px}.design-options button.selected{border-color:#7c9567}.design-options strong{display:block;font-size:17px;margin-bottom:6px}.design-options small{font-size:11px;line-height:1.5}.design-preview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;padding:16px;background:#e7e7e0;border-radius:8px;margin:16px 0}.design-preview svg{width:100%;height:auto;box-shadow:0 2px 8px #0002}.design-preview small{display:block;text-align:center;margin-top:7px;color:#71766b}.design-actions{position:sticky;bottom:-25px;background:#faf9f6;padding:15px 0;display:flex;justify-content:flex-end;gap:10px}#design-status{font-size:12px;line-height:1.6;white-space:pre-line}#design-status.error{color:#9d332a}
@media(min-width:1600px){.workspace{grid-template-columns:270px minmax(350px,1fr) 290px}.photo-item button.photo-pick{height:160px}}
@media(max-width:1100px){.workspace{grid-template-columns:190px minmax(260px,1fr) 245px}.wordmark{min-width:130px}.photo-item button.photo-pick{height:115px}.document-name small{display:none}.page-actions button:not(:first-child){display:none}.editor-toolbar h1{display:none}.editor-footer{gap:5px;padding:0 8px}}
@media(max-width:850px){.workspace{grid-template-columns:145px minmax(0,1fr);height:calc(100dvh - 52px);overflow:auto}.editor{height:calc(100dvh - 52px)}.library{grid-row:1/3;position:sticky;top:0;height:calc(100dvh - 52px)}.inspector{grid-column:2}.app-header{height:52px;padding:0 8px;gap:5px}.app-menu #new-button{display:block}.wordmark{min-width:95px;font-size:19px}.document-name{display:none}.header-actions{gap:2px}.photo-grid{grid-template-columns:1fr}.photo-item button.photo-pick{height:160px}.editor-footer>span:first-child{display:none}.design-preview{grid-template-columns:repeat(2,minmax(0,1fr))}}

.template-origin{display:block;margin:5px 0;color:#67765b;font-size:10px}.filter-row{position:sticky;top:-25px;background:#faf9f6;padding:12px 0;z-index:2}.template-grid .template-preview{height:230px}.template-choice.incompatible .template-preview{filter:none;opacity:.8}

#swap-photos.active{background:#53664b;color:#fff;border-color:#53664b}.swap-hint{padding:7px 14px;background:#e3ebda;color:#425536;font-size:11px;line-height:1.5;flex-shrink:0}.swap-outline{fill:none;stroke-width:3;vector-effect:non-scaling-stroke;pointer-events:none}.swap-source{stroke:#bb8530;stroke-dasharray:6 4}.swap-target{stroke:#568738;stroke-width:5}.swap-enabled [data-crop-key]{cursor:copy!important}.swap-enabled .slot-highlight{display:none}

.template-wrapper{min-width:0}.template-wrapper .template-choice{width:100%}.delete-template{margin-top:5px;background:none;border:0;color:#8b554e;padding:5px 0;font-size:11px;cursor:pointer}.delete-template:hover{text-decoration:underline}.style-choice .template-preview{background:#3b2441;color:#f7f5ee;font-family:Georgia,serif;font-size:22px;letter-spacing:1px}.style-choice{min-width:0}
.social-export-dialog{width:min(440px,calc(100vw - 24px));max-height:calc(100dvh - 40px);overflow:auto}.social-export-dialog label{display:block;margin:12px 0}.social-preview{height:320px;display:flex;align-items:center;justify-content:center;background:#e8e7e3;border:1px solid #d4d3cc;margin:16px 0;overflow:hidden}.social-preview canvas{max-height:100%;max-width:100%;width:auto;height:auto;box-shadow:0 2px 14px #0002}
/* Families are browsed first; compositions are the next level. */
.style-family-heading{grid-column:1/-1;display:flex;align-items:center;gap:16px;margin-bottom:4px}.style-family-heading .muted{margin:0}.style-choice .style-cover{background:#e9e7e1;padding:12px;gap:8px;align-items:center}.style-cover-page{width:50%;height:100%;display:flex;align-items:center;justify-content:center}.style-cover-page svg{width:100%;height:auto;max-height:100%;box-shadow:0 3px 10px #0002}.style-choice strong{font-size:15px}.style-choice small{display:block;font-size:11px;line-height:1.5;color:#73766e}.style-choice .template-preview{height:210px}
/* Style constructor: a reusable family, with direct manipulation of frames. */
.style-builder-dialog{width:min(1440px,97vw);max-height:96vh;padding:20px}.builder-toolbar{display:flex;gap:10px;align-items:center;margin-bottom:16px}.builder-toolbar>input{font-size:18px;flex:1}.builder-layout{display:grid;grid-template-columns:180px minmax(300px,1fr) 245px;gap:18px;align-items:start}.builder-variants,.builder-settings{max-height:68vh;overflow:auto;padding-right:6px}.builder-variants button{margin-bottom:8px}#builder-variant-list>button{display:block;background:#eeeae2;border:2px solid transparent;border-radius:7px;padding:8px;width:100%}#builder-variant-list>button.active{border-color:#617950}#builder-variant-list svg{display:block;width:100%;height:105px}#builder-variant-list span{display:block;font-size:11px;margin-top:7px}.builder-tools{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:10px}.builder-surface{background:#deded6;border-radius:7px;min-height:350px;height:60vh;padding:25px;display:flex;align-items:center;justify-content:center;touch-action:none;user-select:none}.builder-surface>svg{display:block;width:100%;height:100%;overflow:visible}.builder-surface [data-block-id]{cursor:move}.builder-surface [data-corner]{cursor:nwse-resize}.builder-surface [data-rotate]{cursor:grab}.builder-main>.crop-note{margin-top:12px}.builder-settings label{margin-bottom:10px}.builder-settings hr,.builder-variants hr{border:0;border-top:1px solid #ddd;margin:18px 0}.builder-settings input[type=number]{width:100%}#builder-blocks{display:flex;flex-direction:column;margin-bottom:12px;max-height:145px;overflow:auto}#builder-blocks button{border:0;background:transparent;text-align:left;padding:7px;border-radius:4px}#builder-blocks button.active{background:#e3e9dc}#builder-proposals{margin-top:20px;border-top:1px solid #ddd;padding-top:20px}#builder-proposal-list{display:grid;grid-template-columns:repeat(5,1fr);gap:15px;margin-bottom:15px}#builder-proposal-list label{font-size:12px}#builder-proposal-list svg{display:block;width:100%;height:170px;background:#e4e2db;margin:8px 0}#builder-preview-result svg{height:400px;width:100%;margin:15px 0}#builder-status{margin:14px 0 0}@media(max-width:950px){.builder-layout{grid-template-columns:140px minmax(240px,1fr)}.builder-settings{grid-column:1/-1;max-height:none;display:block}.builder-toolbar{flex-wrap:wrap}#builder-proposal-list{grid-template-columns:repeat(2,1fr)}}

.section-nav{display:flex;gap:3px}.section-nav a{padding:8px 10px;border-radius:5px;color:#697260;text-decoration:none;font-size:11px}.section-nav a[aria-current=page]{background:#e8eddf;color:#36432f;font-weight:600}

.library-search-tools{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:0 0 20px}.library-search-tools input{flex:1;min-width:220px;padding:12px;border:1px solid var(--line);border-radius:6px;font:inherit}.library-search-tools select{padding:11px;border:1px solid var(--line);border-radius:6px;background:white}.library-search-tools span{font-size:11px;color:var(--muted)}.style-choice .template-preview{height:245px}.style-choice[hidden]{display:none!important}
/* Editable style variants share the main canvas; selections only control batch regeneration. */
.builder-variant-card{border:2px solid transparent;background:#eeeae2;border-radius:8px;padding:7px;margin-bottom:10px}
.builder-variant-card.active{border-color:#617950;background:#e9efdf}
.builder-variant-card>label,.builder-select-all{display:flex;align-items:center;gap:7px;font-size:11px;color:#59674e;margin-bottom:5px}
.builder-variant-card .builder-variant-edit{display:block;background:none;border:0;padding:0;width:100%;text-align:left;margin:0}
#builder-variant-list .builder-variant-edit svg{display:block;width:100%;height:110px}
#builder-variant-list .builder-variant-edit span{font-size:11px;display:block;margin:6px 0;overflow-wrap:anywhere}
.builder-variant-actions{display:flex;gap:6px}.builder-variant-actions button{background:white;border:1px solid #d6d8cf;border-radius:4px;min-width:30px;height:28px;margin:0;flex:1}
.builder-batch-tools{display:flex;flex-wrap:wrap;align-items:center;gap:7px;background:#f0f2e9;padding:10px;border-radius:7px;margin-bottom:10px}
.builder-batch-tools>span{flex-basis:100%;color:#637257;font-size:11px}.builder-batch-tools button{white-space:normal;text-align:left}
.builder-variants .primary{white-space:normal}#builder-regenerate-current{margin-left:auto;white-space:normal}

.favorite-wrapper{position:relative}.style-favorite{border:1px solid #d8ddcf;border-radius:50%;width:34px;height:34px;flex-shrink:0;background:#fffffff5;color:#4d653d;font-size:25px;line-height:26px;cursor:pointer}.favorite-wrapper>.style-favorite{position:absolute;right:9px;top:9px;z-index:1}.style-favorite[aria-pressed=true]{color:#7b570a;background:#fff1bc}.favorite-wrapper[hidden]{display:none!important}

/* Presentation layout library: explicit entry and reachable dismissal while scrolling. */
.library-launch{font-size:14px;font-weight:650;min-height:40px;padding:9px 15px;flex-shrink:0}
.template-button strong{font-size:16px;font-weight:650;color:var(--ink)}
.template-button #template-name{font-size:12px;color:var(--ink);line-height:1.45}
.template-button #template-description{font-size:11px;line-height:1.45}
#template-dialog{padding:0;overflow:auto;overscroll-behavior:contain}
#template-dialog>.dialog-head{position:sticky;top:0;z-index:5;background:var(--paper);padding:16px 24px;margin:0;border-bottom:1px solid var(--line);gap:16px}
#template-dialog>.dialog-head h2{margin:0;line-height:1.2}
#template-dialog .library-close{width:44px;height:44px;min-width:44px;flex-shrink:0;border:1px solid var(--line);border-radius:6px;background:white;font-size:23px}
.template-dialog-body{padding:0 24px 24px;min-width:0}
@media(max-width:600px){.library-launch{font-size:13px;padding:9px 12px}#template-dialog>.dialog-head{padding:12px 16px;gap:10px}#template-dialog>.dialog-head h2{font-size:23px}.template-dialog-body{padding:0 16px 16px}}

.page-actions button.page-layout-library{font-size:12px;font-weight:650;padding:5px 0}
