@charset "UTF-8";
:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;color:#292c30;background:#f7f7f5;font-synthesis:none;--accent:#e64b35;--muted:#999c9f;--border:#ececea;--soft:#f4f4f2}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{opacity:.35;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible,canvas:focus-visible{outline:3px solid #eb998b;outline-offset:3px}button{border:0;background:none;color:inherit}a{color:inherit;text-decoration:none}.header{height:86px;padding:0 42px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--border);background:#fff}.brand{display:flex;align-items:center;gap:12px;font-size:20px;font-weight:750;letter-spacing:1px}.brand-icon{display:grid;place-items:center;width:43px;height:43px;border-radius:12px;background:var(--accent);color:#fff;font-family:serif;font-size:27px;font-weight:700;box-shadow:0 4px 9px #e64b3522}.brand small{display:block;font-size:10px;letter-spacing:2px;color:#949494;font-weight:400;margin-top:4px}.header-note{font-size:12px;color:#818586;display:flex;gap:8px;align-items:center}.status-dot,.live-dot{width:6px;height:6px;display:inline-block;border-radius:50%;background:#6d957e}.header-actions{display:flex;gap:14px;align-items:center}.button{border-radius:7px;font-size:13px;padding:11px 19px;font-weight:550;transition:background .2s,transform .2s}.button:hover{transform:translateY(-1px)}.button.primary{background:var(--accent);color:white;box-shadow:0 4px 8px #e64b3514}.button.primary:hover{background:#cf3f2b}.button.primary span{font-size:18px;margin-right:5px}.button.quiet{color:#7a7c80}.intro{max-width:1600px;margin:0 auto;padding:30px 38px 26px;display:flex;align-items:flex-end;justify-content:space-between}.eyebrow{font-size:10px;letter-spacing:2px;color:var(--accent);font-weight:600}.intro h1{font-size:25px;letter-spacing:.4px;font-weight:650;margin:8px 0 9px}.intro p{font-size:12px;color:#8a8e92;margin:0}.local-badge{font-size:10px;color:#838986;display:flex;gap:7px;align-items:center;margin-bottom:2px}.local-badge>span{font-size:17px}.workspace{max-width:1600px;padding:0 34px;display:grid;grid-template-columns:238px minmax(300px,1fr) 312px;gap:22px;margin:auto;align-items:start}.panel{border:1px solid #e9e9e6;background:#fff;border-radius:11px;box-shadow:0 2px 3px #00000002}.templates-panel{padding:19px 15px;position:sticky;top:16px}.panel-heading,.section-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}h2{font-size:13px;margin:0;font-weight:650}.count{font-size:10px;color:#a1a3a4;background:#f5f5f3;border-radius:4px;padding:4px 7px}.panel-caption{font-size:10px;color:#9a9da0;margin:9px 0 19px}.template-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px 10px}.template-card{padding:0;text-align:left;min-width:0}.template-visual{position:relative;border:2px solid transparent;border-radius:7px;overflow:hidden;background:#eee;transition:all .15s;padding:2px}.template-card.active .template-visual{border-color:var(--accent)}.template-card:hover .template-visual{border-color:#e7aa9f}.template-visual canvas{display:block;width:100%;height:auto;border-radius:3px}.template-check{display:none;position:absolute;right:4px;top:4px;width:17px;height:17px;border-radius:50%;background:var(--accent);color:#fff;text-align:center;font-size:10px;line-height:17px}.template-card.active .template-check{display:block}.template-name{display:block;font-size:11px;margin-top:7px;color:#62666a}.template-card.active .template-name{color:var(--accent);font-weight:600}.template-foot{border-top:1px solid var(--border);padding-top:18px;margin-top:23px;font-size:10px;color:#a1a3a5}.template-foot>span{color:#b79f72;margin-right:5px}.preview-panel{min-width:0}.canvas-toolbar{display:flex;align-items:center;justify-content:space-between;margin:0 0 17px;gap:7px}.segmented{display:flex;border:1px solid #e7e8e5;background:#fff;border-radius:7px;padding:3px;gap:2px}.segmented button{padding:7px 11px;border-radius:4px;font-size:10px;color:#979b9d;white-space:nowrap}.segmented button.active{background:#fcefe9;color:#dc5a43}.history{display:flex;gap:4px}.history button{font-family:Arial;font-size:21px;color:#85898c;width:28px;height:28px;background:#fff;border:1px solid var(--border);border-radius:5px}.canvas-stage{min-height:520px;height:min(68vw,706px);max-height:calc(100vh - 280px);display:flex;align-items:center;justify-content:center;background-color:#eeefec;background-image:radial-gradient(#c9ccca 1px,transparent 1px);background-size:15px 15px;border:1px solid #e5e6e2;border-radius:9px;padding:22px;overflow:hidden;transition:outline .15s}.canvas-stage.drag-over{outline:3px solid var(--accent);outline-offset:-3px;background-color:#f6e7e1}.canvas-wrap{position:relative;max-width:100%;max-height:100%;display:flex;justify-content:center;filter:drop-shadow(0 8px 13px #00000015)}#coverCanvas{max-width:100%;max-height:100%;width:auto;height:auto;display:block;touch-action:none;cursor:grab}#coverCanvas.dragging{cursor:grabbing}.empty-upload{position:absolute;top:22%;left:50%;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;justify-content:center;border:1px solid #ffffffb0;background:#ffffffed;padding:16px 24px;min-width:190px;border-radius:9px;box-shadow:0 4px 16px #00000009;color:#414945;font-size:12px;backdrop-filter:blur(8px)}.empty-upload>span{font-size:26px;color:var(--accent);margin-bottom:4px}.empty-upload small{font-size:9px;font-weight:400;color:#939996;margin-top:7px}.preview-footer{display:flex;justify-content:space-between;align-items:center;font-size:10px;color:#979e9c;margin-top:14px}.preview-footer>span{display:flex;align-items:center;gap:7px}.preview-footer b{font-size:10px;color:#939b98;font-weight:400;margin-left:5px}.text-button{font-size:10px;color:#a28c79;padding:0;white-space:nowrap}.text-button:hover{color:var(--accent)}.canvas-tip{margin-top:17px;font-size:10px;color:#a0a5a3;text-align:center}.warning{font-size:11px;color:#a66c30;border:1px solid #efd8b3;background:#fff5e6;padding:10px;line-height:1.6;margin-top:15px;border-radius:7px}.controls-panel{overflow:hidden}.control-section{padding:18px 18px;border-bottom:1px solid var(--border)}.control-section:last-child{border-bottom:0}.section-heading{margin-bottom:13px}.step{display:inline-flex;background:#f4f4f1;border:1px solid #eeefeb;color:#949b96;border-radius:4px;font-size:9px;align-items:center;justify-content:center;width:21px;height:21px;margin-right:6px;font-weight:500}.section-heading h2{font-size:12px;display:flex;align-items:center}.upload-card{display:flex;align-items:center;gap:10px;cursor:pointer;padding:13px 10px;border:1px dashed #d8ded7;background:#fafbf8;border-radius:7px;min-width:0}.upload-symbol{font-size:27px;color:#97aa94}.upload-card>div{min-width:0;flex:1}.upload-card strong{font-size:11px;font-weight:500;display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.upload-card small{display:block;font-size:8px;color:#a1a7a2;margin-top:5px}.upload-plus{color:#a3aba3;font-size:16px}.muted{font-size:10px;color:#a1a6a4}textarea{resize:vertical;display:block;width:100%;padding:12px;border:1px solid #e2e5e1;border-radius:6px;color:#414744;background:#fcfdfa;line-height:1.8;font-size:13px;min-height:100px;max-height:230px}textarea:focus{border-color:#d8a08e;outline:0;box-shadow:0 0 0 2px #e64b3510}.input-hint{display:flex;align-items:center;justify-content:space-between;font-size:9px;color:#a5aaa7;margin:9px 0 12px}.line-colors{display:flex;flex-direction:column;gap:5px;max-height:164px;overflow:auto}.line-color-row{display:flex;align-items:center;gap:8px;font-size:10px;background:#f7f8f5;border-radius:4px;padding:6px 8px;color:#818982}.line-color-row>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1}.line-color-row>small{font-size:8px;color:#b0b4ae}.line-color-row input[type=color]{width:20px;height:20px;padding:0;border:none;cursor:pointer;background:none}.line-color-row input::-webkit-color-swatch-wrapper{padding:2px}.line-color-row input::-webkit-color-swatch{border:1px solid #ccc;border-radius:3px}.two-cols{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:14px}.field-label{font-size:10px;color:#959c97;display:block}select,input[type=number]{background:#fafbf9;color:#626b63;border:1px solid #e3e6e1;border-radius:5px;padding:8px;font-size:11px;display:block;min-width:0;max-width:100%;width:100%}.field-label select,.field-label>input,.color-field,.align-control{margin-top:7px}.align-control{display:flex;border:1px solid #e3e6e1;border-radius:5px;background:#fafbf9;height:33px;align-items:center;padding:2px}.align-control button{flex:1;height:27px;font-size:17px;color:#a1aaa1;line-height:1}.align-control button.active{background:#fff;color:#e16b52;box-shadow:0 1px 4px #0000000a;border-radius:3px}.align-control button:last-child{transform:scaleX(-1)}.range-label{display:block;font-size:10px;color:#8e978f;margin:15px 0 16px}.range-label output{float:right;color:#777f77;font-size:10px}.range-label input{width:100%;display:block;accent-color:var(--accent);height:4px;margin-top:12px;cursor:pointer}.color-field{display:flex;align-items:center;border:1px solid #e3e6e1;border-radius:5px;padding:5px;gap:4px;height:33px}.color-field input[type=color]{width:23px;height:23px;border:0;padding:0;background:none;cursor:pointer}.color-field>span{font-size:9px;color:#919991}.checkbox-label{font-size:11px;color:#8e978f;display:flex;align-items:center;gap:6px}.checkbox-label input{accent-color:var(--accent)}details{margin-top:13px}summary{font-size:10px;color:#929a93;cursor:pointer;list-style:none;display:flex;justify-content:space-between;align-items:center}summary::-webkit-details-marker{display:none}summary>span{font-size:13px}.export-section{background:#fcfcfa}.export-options{display:grid;grid-template-columns:1fr 95px;gap:7px;margin-bottom:10px}.export-options select{background:white;font-size:10px}.full{width:100%}.save-indicator{font-size:9px;text-align:center;color:#a0a89f;margin-top:10px}.project-actions{display:flex;justify-content:center;gap:16px;margin-top:13px}.project-actions button{font-size:9px}.site-footer{display:flex;align-items:center;justify-content:space-between;max-width:1600px;margin:30px auto 0;padding:0 38px 25px;font-size:10px;color:#acb0ac}.footer-dot{margin:0 9px;color:#d3d5cf}.toast{position:fixed;bottom:30px;left:50%;transform:translateX(-50%);background:#303b35;color:white;font-size:12px;padding:13px 22px;border-radius:9px;box-shadow:0 7px 24px #0002;z-index:50;max-width:90vw;line-height:1.6}dialog{border:1px solid #ddd;border-radius:15px;width:440px;max-width:92vw;padding:30px;box-shadow:0 10px 50px #0002}dialog::backdrop{background:#1f2c2455;backdrop-filter:blur(3px)}dialog h2{font-size:20px;margin:12px 0 24px}.dialog-close{position:absolute;right:15px;top:10px;font-size:24px;color:#a8ada7}dialog ol{padding-left:23px}dialog li{font-size:13px;margin-bottom:20px;padding-left:5px}dialog li p{font-size:12px;line-height:1.8;color:#838e83}.dialog-note{font-size:10px;line-height:1.8;color:#a0a79e;margin:20px 0} [hidden]{display:none!important}
@media(min-width:1600px){.canvas-stage{height:760px;max-height:800px}.workspace{grid-template-columns:255px minmax(400px,1fr) 326px}.template-grid{gap:18px 12px}}@media(max-width:1180px){.workspace{grid-template-columns:190px minmax(250px,1fr) 285px;gap:14px;padding:0 20px}.intro{padding-left:23px;padding-right:23px}.header{padding:0 24px}.segmented button{padding:7px 7px}.canvas-stage{padding:15px;min-height:440px}.control-section{padding:16px 14px}.panel-caption{font-size:9px}.header-note{display:none}.templates-panel{padding:15px 10px}.template-name{font-size:10px}.history{gap:2px}.history button{width:23px}.canvas-toolbar{flex-wrap:wrap}}@media(max-width:960px){.workspace{grid-template-columns:minmax(270px,1fr) 302px;gap:18px}.templates-panel{grid-column:1/-1;position:static}.template-grid{grid-template-columns:repeat(8,1fr);gap:10px}.template-visual canvas{aspect-ratio:1;object-fit:cover}.panel-caption,.template-foot{display:none}.panel-heading{margin-bottom:13px}.canvas-stage{height:640px;max-height:750px;min-height:400px}.local-badge{display:none}.intro{padding:24px}.intro h1{font-size:23px}.canvas-toolbar{height:33px}}@media(max-width:650px){.header{padding:0 16px;height:72px}.brand{font-size:17px;gap:9px}.brand-icon{width:37px;height:37px;font-size:24px}.brand small{font-size:8px;letter-spacing:1px}.header-actions{gap:4px}.button.quiet{padding:9px 6px;font-size:10px}.header-actions .primary{font-size:11px;padding:10px}.intro{padding:22px 18px}.intro h1{font-size:22px}.intro p{font-size:10px;line-height:1.7}.workspace{display:flex;flex-direction:column;padding:0 13px;gap:18px}.templates-panel{width:100%;padding:14px 12px}.template-grid{display:flex;overflow:auto;gap:11px;padding-bottom:4px}.template-card{width:78px;flex-shrink:0}.template-visual canvas{aspect-ratio:3/4;object-fit:fill}.template-name{font-size:10px}.preview-panel{width:100%}.canvas-stage{height:510px;min-height:0;max-height:none;padding:18px}.canvas-toolbar{height:auto}.segmented button{padding:8px 9px;font-size:10px}.preview-footer{padding:0 5px}.canvas-tip{margin-top:12px}.controls-panel{width:100%}.control-section{padding:19px}.section-heading h2{font-size:13px}.field-label,.range-label{font-size:12px}.line-color-row{font-size:12px;padding:8px}textarea{font-size:15px}.upload-card{padding:16px}.upload-card strong{font-size:13px}.upload-card small{font-size:10px}summary{font-size:12px}.range-label input{height:6px;margin-top:16px}.range-label{margin:20px 0 24px}.site-footer{padding:0 20px 22px;gap:10px;line-height:1.8;font-size:8px}.canvas-wrap{max-width:100%;max-height:100%}}
/* Reference catalog: one entry for every source article. */
.template-search{width:100%;padding:10px;border:1px solid #e3e5e1;border-radius:5px;background:#fafbf9;font-size:10px;color:#505b51;margin:0 0 15px}.template-grid{max-height:calc(100vh - 230px);overflow-y:auto;align-items:start;padding-right:3px;scrollbar-width:thin}.template-visual{background:#eaede9}.template-visual img{display:block;width:100%;height:auto;border-radius:3px}.template-visual canvas{width:100%;height:auto}.template-name{font-size:10px;line-height:1.65;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:32px}.reference-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.reference-heading a{font-size:10px;color:#9d8d7c}.reference-info{margin-top:12px;padding:12px 14px;border:1px solid #e8e9e5;border-radius:7px;background:#fff}.reference-info strong{font-size:11px;font-weight:550}.reference-info p{font-size:10px;color:#949c94;line-height:1.7;margin:6px 0 0}.input-hint>div{display:flex;gap:10px}#referencePreview{display:block;object-fit:contain;max-width:100%;max-height:100%}.canvas-toolbar{margin-bottom:12px}.template-grid img{object-fit:contain}.canvas-tip{margin-top:12px}
@media(max-width:960px){.template-grid{max-height:none;overflow-x:auto;overflow-y:hidden;display:flex;padding:0 0 4px}.template-card{width:88px;flex-shrink:0}.template-visual{height:114px;display:flex;align-items:center;justify-content:center}.template-visual img,.template-visual canvas{height:auto;max-height:106px;max-width:100%;object-fit:contain;aspect-ratio:auto}.template-search{margin-bottom:12px}.template-name{min-height:34px}.reference-info p{font-size:10px}}
@media(max-width:650px){.template-card{width:85px}.reference-heading{padding:0 3px}.reference-info strong{font-size:12px}.canvas-stage{height:490px}}

/* Keep editing hints and source controls inside narrow screens. */
.input-hint{gap:8px;flex-wrap:wrap;line-height:1.6}.input-hint>span{white-space:normal}.reference-info strong,.reference-info p{overflow-wrap:anywhere}.controls-panel,.templates-panel{min-width:0}.two-cols:has(#alignField[hidden]){grid-template-columns:1fr}.canvas-wrap{min-width:0}
@media(max-width:380px){.header{padding:0 12px}.header-actions .quiet{display:none}.header-actions .primary{padding:10px 9px}.intro h1{font-size:20px}.canvas-toolbar{row-gap:9px}.segmented button{padding:8px 6px}.preview-footer{gap:8px;flex-wrap:wrap}}
.pending-references{border-top:1px solid #e7e9e4;padding-top:15px;margin-top:20px}.pending-references summary{color:#af865b}.pending-reference{padding:12px 0;border-bottom:1px solid #f0f1ed}.pending-reference strong{font-size:10px;font-weight:500;line-height:1.7;display:block}.pending-reference p{font-size:10px;line-height:1.7;color:#969d94;margin:5px 0}.pending-reference a{font-size:10px;color:#a18c75}.template-visual{aspect-ratio:3/4}.template-visual img,.template-visual canvas{width:100%;height:100%;object-fit:contain}
/* Mobile editing and complete-image saving. */
#coverCanvas{touch-action:pan-y pinch-zoom;cursor:default}#coverCanvas.dragging{cursor:grabbing}.text-selection{position:absolute;border:2px solid #1677ed;border-radius:4px;pointer-events:none;box-shadow:0 0 0 2px #ffffffbb,0 0 0 5px #1677ed18;z-index:3}.selection-corner{position:absolute;width:11px;height:11px;border:2px solid #1677ed;border-radius:3px;background:#fff;box-shadow:0 1px 3px #0002}.selection-corner.top-left{left:-6px;top:-6px}.selection-corner.top-right{right:-6px;top:-6px}.selection-corner.bottom-left{left:-6px;bottom:-6px}.selection-corner.bottom-right{right:-6px;bottom:-6px}.selection-badge{position:absolute;left:0;top:-27px;background:#1677ed;color:#fff;border-radius:4px 4px 4px 0;padding:4px 8px;font-size:11px;line-height:16px;white-space:nowrap}.text-selection.near-top .selection-badge{top:auto;bottom:-27px}.text-selection.near-top.near-bottom .selection-badge{top:5px;bottom:auto;left:5px}.canvas-wrap.image-selected{outline:3px solid #1677ed;outline-offset:5px;border-radius:3px}.selection-tools{margin-top:12px;border:1px solid #c9dffb;background:#f2f7ff;border-radius:9px;padding:11px 12px}.selection-state{font-size:11px;color:#4c78aa;line-height:1.6;margin:0 0 9px}.selection-tool-buttons{display:flex;gap:7px;align-items:center}.selection-tool-buttons button{min-height:42px;border:1px solid #d2e2f6;border-radius:6px;padding:8px 12px;font-size:12px;background:#fff;color:#4d6c90;touch-action:manipulation}.selection-tool-buttons .move-text-handle{background:#1677ed;border-color:#1677ed;color:#fff;font-weight:600;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;cursor:grab}.selection-tool-buttons .move-text-handle.dragging{background:#065fcb;cursor:grabbing;box-shadow:0 0 0 4px #1677ed25}.selection-tool-buttons .selection-edit{color:#1677ed;border-color:#9fc6f5}.selection-tool-buttons button.active{background:#e1edff;color:#1677ed}.image-actions{display:flex;align-items:center;gap:10px;margin-top:10px;flex-wrap:wrap}.image-actions button{padding:10px 12px;min-height:42px;font-size:12px;background:white;border:1px solid #dce1db;border-radius:6px}.image-actions span{font-size:10px;color:#969e94}.text-editor-section textarea{border:2px solid #c9dff8;background:#fbfdff;border-radius:8px;font-size:15px;line-height:1.9;padding:13px;scroll-margin:110px}.text-editor-section textarea:focus{border-color:#1677ed;outline:0;box-shadow:0 0 0 4px #1677ed15}.text-editor-section.editing{background:#f8fbff}.text-editor-done{display:none;margin-top:10px}.text-editor-done button{min-height:42px;color:#1677ed;background:#eaf3ff;border-radius:6px;padding:9px 12px;font-size:12px;width:100%}.text-editor-section:focus-within .text-editor-done,.text-editor-section.editing .text-editor-done{display:block}.line-color-row{gap:7px;padding:4px 6px}.line-select{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:left;padding:8px 5px;min-height:35px;font-size:11px;border-radius:4px}.line-select.active{background:#e4efff;color:#1267c8;font-weight:600}.line-color-row input[type=color]{flex-shrink:0;width:31px;height:31px}.wechat-save-hint{font-size:10px;color:#959e92;line-height:1.7;text-align:center;margin:8px 0 0}.mobile-actions{display:none}.toast{bottom:25px;pointer-events:none}
.image-export-dialog{padding:0;border:0;border-radius:14px;width:640px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);background:#f8f9f6;overflow:auto;overscroll-behavior:contain}.image-export-dialog::backdrop{background:#182522a6;backdrop-filter:blur(4px)}.image-export-panel{padding:18px}.image-export-header{display:flex;align-items:center;justify-content:space-between;gap:12px}.image-export-title{font-size:17px;font-weight:650;margin:0}.image-export-close{width:44px;height:44px;min-width:44px;font-size:25px;color:#6f7b71;background:#fff;border-radius:50%}.image-export-instructions{font-size:13px;line-height:1.8;color:#526c56;margin:10px 0;padding:10px 12px;background:#eaf2e6;border-radius:7px}.image-export-status{font-size:12px;color:#7b8579;min-height:20px;line-height:1.6;margin:7px 0}.image-export-stage{display:flex;align-items:center;justify-content:center;background:#e8ebe5;border-radius:7px;min-height:180px;padding:10px;overflow:auto}.image-export-preview{display:block;max-width:100%;max-height:64dvh;width:auto;height:auto;object-fit:contain;background:#fff;border:2px solid transparent;user-select:auto;-webkit-user-select:auto;-webkit-touch-callout:default;touch-action:pan-y pinch-zoom}.image-export-preview.image-export-selected{border-color:#1677ed;outline:2px solid #a0c8ff;outline-offset:2px}.image-export-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;position:sticky;bottom:-18px;padding:13px 0 3px;background:#f8f9f6}.image-export-actions button{min-height:44px;flex:1;min-width:100px;padding:11px 12px;border-radius:7px;border:1px solid #dae0d6;background:white;font-size:13px}.image-export-actions #imageExportDownload{background:#e64b35;border-color:#e64b35;color:white}.image-export-retry{min-height:44px;border-radius:6px;padding:10px 16px;border:1px solid #b4cba9;background:white;font-size:13px}
@media(max-width:650px){body{padding-bottom:calc(86px + env(safe-area-inset-bottom,0px))}.intro{padding:16px 18px}.intro h1{font-size:20px}.intro .eyebrow{font-size:9px}.header-actions .primary{min-height:44px}.mobile-actions{display:grid;grid-template-columns:1fr 1fr 1.2fr;gap:8px;position:fixed;bottom:0;left:0;right:0;z-index:40;background:#ffffffed;border-top:1px solid #e1e6dc;padding:10px 12px calc(10px + env(safe-area-inset-bottom,0px));backdrop-filter:blur(12px);box-shadow:0 -4px 18px #2132170a}.mobile-actions button{min-height:48px;border-radius:8px;border:1px solid #dce4d7;background:#f7f9f4;font-size:13px;display:flex;align-items:center;justify-content:center;gap:6px;color:#52624e;touch-action:manipulation}.mobile-actions button span{font-size:20px}.mobile-actions .mobile-save{background:#e64b35;border-color:#e64b35;color:#fff;font-weight:600}.input-editing .mobile-actions{display:none}.toast{bottom:calc(90px + env(safe-area-inset-bottom,0px));max-width:calc(100vw - 24px);font-size:12px}.selection-tools{padding:12px 10px}.selection-state{font-size:12px}.selection-tool-buttons{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:7px}.selection-tool-buttons button{min-height:46px;font-size:12px;padding:9px 6px}.selection-badge{font-size:11px}.image-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px}.image-actions button{min-height:44px}.image-actions span{grid-column:1/-1;text-align:center}.text-editor-section textarea{font-size:16px;min-height:150px;scroll-margin-top:95px}.line-select{min-height:44px;font-size:13px}.line-color-row input[type=color]{width:40px;height:40px}.text-button{min-height:30px;display:inline-flex;align-items:center}.selection-tools .move-text-handle{font-size:13px}.text-editor-done button{min-height:46px}.image-export-dialog{width:100%;max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);border-radius:12px}.image-export-panel{padding:12px}.image-export-title{font-size:16px}.image-export-preview{max-height:58dvh}.image-export-instructions{font-size:13px}.image-export-actions{bottom:-12px;padding-bottom:calc(2px + env(safe-area-inset-bottom,0px))}.image-export-actions button{font-size:13px;padding:10px 8px}.image-export-stage{padding:8px}}
.image-export-close{font-size:13px;border-radius:7px;width:56px;min-width:56px}.image-export-dialog-fallback{position:fixed;inset:12px;margin:auto;z-index:100;box-shadow:0 0 0 100vmax #182522a6}.line-color-row{cursor:default}.line-select:hover{background:#eaf2ff}.selection-tools button:focus-visible{outline:3px solid #83b5f4;outline-offset:2px}
.range-label input[type=range]{height:32px;margin-top:5px;appearance:none;-webkit-appearance:none;background:transparent;border:0;padding:0;touch-action:pan-y}.range-label input[type=range]::-webkit-slider-runnable-track{height:5px;border-radius:4px;background:#dfe5d9}.range-label input[type=range]::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:22px;height:22px;margin-top:-8.5px;border-radius:50%;border:3px solid #fff;background:#e64b35;box-shadow:0 0 0 1px #d86753,0 2px 5px #0002}.range-label input[type=range]::-moz-range-track{height:5px;border-radius:4px;background:#dfe5d9}.range-label input[type=range]::-moz-range-thumb{width:17px;height:17px;border:3px solid #fff;border-radius:50%;background:#e64b35;box-shadow:0 0 0 1px #d86753}.range-label input[type=range]:focus-visible{outline:2px solid #83b5f4;outline-offset:0;border-radius:6px}
@media(max-width:650px){.range-label{margin:12px 0 14px}.range-label input[type=range]{height:44px;margin-top:0}.range-label input[type=range]::-webkit-slider-thumb{width:26px;height:26px;margin-top:-10.5px}.line-color-row input[type=color]{width:44px;height:44px}.canvas-stage{height:clamp(330px,110vw,490px);max-height:calc(100svh - 250px);min-height:300px}}
/* Selection is named in the toolbar so its label never covers adjacent title lines. */
.selection-badge{display:none}
/* Direct touch manipulation is confined to the selected title. The photo still scrolls normally. */
.text-selection{pointer-events:auto;touch-action:none;cursor:grab;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;border-width:3px;background:#1677ed08}
.text-selection.dragging{cursor:grabbing;background:#1677ed12;box-shadow:0 0 0 2px #fff,0 0 0 6px #1677ed28}
.selection-corner{width:13px;height:13px;pointer-events:none}
.image-export-preview{touch-action:auto;-webkit-touch-callout:default;user-select:auto;-webkit-user-select:auto;border:0;border-radius:2px}
.image-export-actions:has(>button:not([hidden])){display:flex}
@media(max-width:650px){.mobile-actions{grid-template-columns:1fr 1.6fr}.image-actions{grid-template-columns:1fr}.image-export-instructions{font-size:15px;font-weight:600}.image-export-stage{overflow:visible;min-height:0;padding:0}.image-export-preview{max-height:none;width:100%;height:auto}.image-export-actions{position:static;padding:8px 0 0}.image-export-panel{padding:14px}.image-export-header{position:sticky;top:-14px;z-index:1;background:#f8f9f6;padding:4px 0 8px}.image-export-close{min-height:44px}.selection-tool-buttons button{min-height:48px}}
