:root{--accent:#a64b32;--accent-strong:#873d29;--border:#e4ded5;--accent-soft:#f6ece6;--accent-hover:#873d29;--surface-soft:#f6f1eb;--border-hover:#b8a99b;--ink:#292724;--muted:#716b63;--page:#f5f3ef;--panel:#fff;--radius:16px;font-family:ui-sans-serif,system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;color:var(--ink);background:var(--page);font-synthesis:none}
*{box-sizing:border-box}body{margin:0;line-height:1.5;-webkit-font-smoothing:antialiased}button,input,textarea,select{font:inherit}button{cursor:pointer;touch-action:manipulation}button:disabled{cursor:not-allowed;opacity:.55}[hidden]{display:none!important}button,input,select,textarea{-webkit-tap-highlight-color:transparent}button:focus-visible,select:focus-visible,input:focus-visible,textarea:focus-visible,summary:focus-visible{outline:2px solid var(--accent);outline-offset:2px}input:focus-visible,textarea:focus-visible{outline-offset:0}::selection{background:#ead3c5;color:#633020}h1,h2,h3,p{margin:0}h1,h2,h3{text-wrap:balance}svg{width:22px;height:22px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}::-webkit-scrollbar{width:7px}::-webkit-scrollbar-thumb{background:#c7beb3;border-radius:8px}::-webkit-scrollbar-track{background:#f5f3ef}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.site-header{position:sticky;top:0;z-index:10;background:#fffffff5;padding:16px max(24px,calc((100vw - 1184px)/2));display:flex;align-items:center;justify-content:space-between;gap:16px;box-shadow:0 5px 15px #0000000b}.site-header h1{font-size:24px;font-weight:700;color:var(--ink)}.site-header p{font-size:14px;color:var(--muted);margin-top:2px}.header-note{color:var(--muted);font-size:14px}.workspace{max-width:1232px;margin:0 auto;padding:28px 24px 40px;display:grid;grid-template-columns:minmax(0,1fr) minmax(340px,420px);gap:28px;align-items:start}.editor-column{min-width:0;display:flex;flex-direction:column;gap:20px}.panel{background:var(--panel);border-radius:var(--radius);padding:24px;box-shadow:0 1px 2px #0000000d}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px;min-width:0}.section-heading h2{font-size:18px;font-weight:600;color:var(--ink)}.section-heading h3{font-size:15px;font-weight:600}.section-heading>span{font-size:12px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:50%}.section-heading>p{font-size:13px;color:var(--muted)}.plain-fieldset{margin:0;padding:0;border:0;min-width:0}.plain-fieldset legend{font-size:14px;font-weight:500;margin-bottom:10px}.ratio-grid,.template-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.ratio-option,.template-option{border:1px solid var(--border);border-radius:12px;background:#fff;min-width:0;color:var(--ink)}.ratio-option{padding:12px 8px;display:grid;grid-template-columns:30px 1fr;align-items:center;text-align:left;gap:2px 10px}.ratio-option strong{font-size:16px;font-weight:600}.ratio-option small{font-size:11px;color:var(--muted);white-space:nowrap}.ratio-shape{grid-row:span 2;justify-self:center;display:block;border:1.5px solid #8b7769;border-radius:3px;height:28px}.ratio-1-1{width:28px}.ratio-3-4{width:21px}.ratio-9-16{width:16px}.ratio-option[aria-pressed=true],.template-option[aria-pressed=true]{border-color:var(--accent);outline:1px solid var(--accent);background:#fbf6f2}.ratio-option:hover,.template-option:hover{background:var(--surface-soft)}.template-section{margin-top:24px}.template-option{padding:8px;text-align:left;display:flex;flex-direction:column;gap:6px}.template-option strong{font-size:14px;font-weight:600;margin-top:3px}.template-option small{font-size:11px;color:var(--muted)}.template-art{width:100%;height:84px;border-radius:6px;background:#f5f1e9;padding:12px;display:flex;flex-direction:column;justify-content:center;gap:4px}.template-art span{font-family:"Songti SC",serif;font-size:14px;line-height:1.3;color:#4b3d2f}.template-art i{height:2px;background:#b7ab9b;width:38px;display:block}.template-classic .template-art{align-items:center;text-align:center;background:#f3f1eb}.template-editorial .template-art{background:#fff1d9}.template-poster .template-art{background:#23322d}.template-poster .template-art span{font-family:inherit;font-weight:700;color:#fff;font-size:20px;line-height:1.2}.template-poster .template-art i{display:none}.helper{color:var(--muted);font-size:12px;line-height:1.7;margin-top:10px}.background-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.background-option{min-height:44px;border:1px solid var(--border);border-radius:10px;padding:9px 4px;font-size:14px;font-weight:500;background:var(--swatch);color:var(--swatch-text)}.background-option[aria-pressed=true]{outline:2px solid var(--accent);outline-offset:0}.background-option:hover{transform:translateY(-1px)}.local-backgrounds{border-top:1px solid var(--border);margin-top:24px;padding-top:20px}.local-backgrounds .section-heading{margin-bottom:12px}.upload-button{min-height:48px;display:flex;align-items:center;justify-content:center;gap:10px;background:#fbf6f2;border:1px dashed #b8a99b;border-radius:10px;width:100%;color:var(--accent-strong);font-size:14px}.upload-button:hover{background:var(--accent-soft)}.custom-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-top:16px}.custom-grid:empty{display:none}.custom-background{min-width:0}.custom-option{width:100%;height:78px;padding:3px;border:1px solid var(--border);border-radius:10px;background:#fff}.custom-option img{width:100%;height:100%;object-fit:cover;border-radius:6px;display:block}.custom-option[aria-pressed=true]{border-color:var(--accent);outline:1px solid var(--accent)}.custom-name{font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:5px}.remove-background{min-height:30px;padding:2px 0}.custom-background small{font-size:11px;color:#873d29;display:block}
.adjustment-details{border-top:1px solid var(--border);margin-top:22px;padding-top:16px}.adjustment-details summary{cursor:pointer;font-size:14px;font-weight:500;color:var(--ink);min-height:32px}.adjustment-details summary span{font-size:12px;color:var(--muted);font-weight:400;margin-left:10px}.adjustments-body{padding-top:16px}.adjustments-body .section-heading{margin-bottom:14px}.range-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px 20px}.range-control>div{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px;margin-bottom:4px}.range-control output{color:var(--accent-strong);font-variant-numeric:tabular-nums}.range-control input{width:100%;height:28px;margin:0;accent-color:var(--accent);cursor:pointer}.range-control input:disabled{opacity:.4;cursor:not-allowed}.inline-control{display:flex;align-items:center;gap:14px;font-size:13px;margin-top:16px}.inline-control input[type=color]{width:52px;height:34px;border:1px solid var(--border);padding:2px;background:#fff;border-radius:6px;cursor:pointer}.inline-controls{display:flex;align-items:end;gap:28px}.inline-controls .control{margin-top:16px;flex:1;max-width:160px}
#quote-form{display:flex;flex-direction:column;gap:26px}.field-group{border:0;padding:0;margin:0;min-width:0}.field-group>label{display:block;color:var(--ink);font-size:14px;font-weight:500;margin-bottom:8px}.text-input{width:100%;padding:12px 14px;border:1px solid var(--border);border-radius:10px;resize:vertical;min-height:48px;background:#fff;color:var(--ink);display:block;caret-color:var(--accent);font-size:16px}.text-input::placeholder{color:#716b63}.text-input:hover,select:hover{border-color:var(--border-hover)}.format-controls{margin-top:10px;display:grid;grid-template-columns:1.3fr .8fr .7fr 1fr;gap:12px;align-items:end}.control label{display:block;color:var(--muted);font-size:12px;margin-bottom:5px}.control select,.control input[type=number]{width:100%;height:38px;font-size:14px;padding:7px 10px;border:1px solid var(--border);border-radius:7px;background:#fff;color:var(--ink);min-width:0}.control select{padding-right:26px;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='m1 1 4 4 4-4' fill='none' stroke='%23716b63' stroke-width='1.5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 9px center}.color-input{display:block;width:100%;height:38px;border:1px solid var(--border);padding:3px;border-radius:7px;background:#fff;cursor:pointer}.format-toggles{display:flex;gap:20px;align-items:center;min-height:36px;margin-top:6px}.format-toggles label{display:flex;gap:6px;align-items:center;white-space:nowrap;font-size:12px;color:var(--muted);cursor:pointer;min-height:32px}.format-toggles input{accent-color:var(--accent);margin:0;width:16px;height:16px}.format-toggles>span{font-size:11px;color:var(--muted);margin-left:auto}.draft-status{font-size:12px;color:var(--muted);text-align:center}.primary-button,.secondary-button{display:flex;align-items:center;justify-content:center;gap:8px;border-radius:10px;font-weight:500;min-height:46px;padding:11px 18px;border:0;white-space:nowrap;font-size:14px}.primary-button{background:var(--accent);color:#fff;box-shadow:0 3px 8px #63302014}.primary-button:hover{background:var(--accent-hover)}.primary-button:active,.secondary-button:active{transform:translateY(1px)}.secondary-button{background:var(--surface-soft);color:var(--ink)}.secondary-button:hover{background:#eee2d8}.text-button{background:none;border:0;color:var(--accent-strong);font-size:12px;text-decoration:underline;text-underline-offset:3px;cursor:pointer;min-height:32px}.site-footer{text-align:center;padding:14px 16px;background:#fff;border-top:1px solid var(--border);font-size:14px;color:var(--muted)}
.live-panel{position:sticky;top:116px;min-width:0}.live-panel .section-heading{margin-bottom:14px}.live-stage{position:relative;display:flex;justify-content:center;align-items:center;padding:12px;background:#eae6df;min-height:160px;border-radius:10px;overflow:hidden}#live-canvas{display:block;width:auto;height:auto;max-width:100%;max-height:55dvh;box-shadow:0 4px 18px #30241416}.empty-preview{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);background:#ffffffef;color:#716b63;padding:10px 14px;border-radius:8px;text-align:center;font-size:13px;width:max-content;max-width:90%;pointer-events:none}.render-loading{position:absolute;inset:0;background:#f5f3efeb;display:flex;align-items:center;justify-content:center;font-size:14px;color:var(--muted)}.preview-meta{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:11px;color:var(--muted);margin-top:12px;font-variant-numeric:tabular-nums}.render-message{font-size:12px;line-height:1.7;color:var(--muted);margin-top:12px;min-height:40px}.render-message.is-error{color:#aa3013}.desktop-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px}.privacy-note{font-size:11px;color:var(--muted);margin-top:16px;padding-top:14px;border-top:1px solid var(--border)}.mobile-actions{display:none}#toggle-live{min-height:32px}
.preview-page{min-height:100dvh;background:#f5f3ef;padding:84px 24px 150px}.preview-toolbar{position:fixed;top:0;left:0;right:0;z-index:5;padding:14px 24px;display:flex;align-items:center;justify-content:space-between;background:#fffffff5;gap:12px}.preview-toolbar>span{font-size:13px;color:var(--muted)}.canvas-wrap{max-width:540px;margin:0 auto;box-shadow:0 12px 36px #22222217;line-height:0}#quote-canvas{width:100%;height:auto;display:block}#full-render-message{max-width:540px;margin:16px auto 0}.export-bar{position:fixed;z-index:5;bottom:0;left:0;right:0;background:#fffffff5;padding:14px 20px max(16px,env(safe-area-inset-bottom));display:grid;grid-template-columns:minmax(180px,280px) 110px;gap:10px;justify-content:center}.export-bar p{font-size:12px;color:var(--muted);text-align:center}.toast{position:fixed;left:50%;bottom:120px;transform:translateX(-50%);z-index:100;background:#292724;color:#fff;border-radius:12px;padding:12px 18px;font-size:14px;max-width:calc(100% - 32px);width:max-content;box-shadow:0 6px 18px #0002}dialog{border:0;border-radius:16px;padding:18px;width:min(480px,calc(100% - 24px));max-height:90dvh;box-shadow:0 20px 60px #0003}dialog::backdrop{background:#1c140bb3}.dialog-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px;gap:12px}.dialog-heading h2{font-size:18px}.dialog-heading button{min-height:44px;padding:8px 16px}#saved-image{display:block;width:100%;height:auto;border-radius:8px}
@media(min-width:861px) and (max-width:1100px){.workspace{grid-template-columns:minmax(0,1fr) 340px;gap:20px;padding-inline:20px}.panel{padding:20px}.ratio-option{grid-template-columns:20px 1fr;gap:2px 7px}.ratio-shape{height:23px}.ratio-1-1{width:23px}.ratio-3-4{width:17px}.ratio-9-16{width:13px}.ratio-option small{font-size:11px}.template-option small{font-size:11px}.format-controls{gap:8px}}
@media(max-width:860px){.site-header{position:static;padding:14px 20px}.site-header h1{font-size:22px}.header-note{display:none}.workspace{display:flex;flex-direction:column;max-width:680px;padding:16px 16px 28px;gap:20px}.editor-column{width:100%;gap:18px}.live-panel{position:static;order:-1;width:100%;padding:18px}.live-stage{padding:10px}#live-canvas{max-height:230px}.live-panel .section-heading{margin-bottom:10px}.preview-meta{margin-top:10px}.render-message{min-height:0;margin-top:8px}.desktop-actions,.privacy-note{display:none}.mobile-actions{position:fixed;bottom:0;left:0;right:0;z-index:12;display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:12px 16px max(12px,env(safe-area-inset-bottom));background:#fffffff5;box-shadow:0 -4px 16px #3024140a}.site-footer{padding-bottom:calc(94px + env(safe-area-inset-bottom))}.panel{padding:20px}.background-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.primary-button,.secondary-button{font-size:16px;min-height:46px}.control select,.control input[type=number]{font-size:16px;min-height:42px}.color-input{height:42px}.format-controls{grid-template-columns:1fr 1fr;gap:10px 14px}.format-toggles label{font-size:13px;min-height:38px}.format-toggles input{width:18px;height:18px}.helper{font-size:12px}.range-control>div{font-size:13px}.range-control input{height:32px}.preview-page{padding:78px 12px 150px}.preview-toolbar{padding:12px}.preview-toolbar>span{font-size:11px}.preview-toolbar .secondary-button{font-size:14px;padding-inline:12px}.export-bar{grid-template-columns:minmax(160px,1fr) 100px}.section-heading h2{font-size:17px}.template-option small{font-size:11px}.ratio-option{grid-template-columns:1fr;text-align:center;justify-items:center;gap:6px;padding:10px 4px}.ratio-shape{grid-row:auto;height:24px}.ratio-1-1{width:24px}.ratio-3-4{width:18px}.ratio-9-16{width:13.5px}.ratio-option small{font-size:11px}.template-art{height:80px;padding:10px}.template-option strong{font-size:13px}.template-grid,.ratio-grid{gap:10px}.custom-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.remove-background{min-height:38px}}
@media(max-width:360px){.workspace{padding-inline:12px}.panel{padding:16px}.template-grid,.ratio-grid{gap:8px}.template-option{padding:6px}.template-option small{font-size:11px}.template-option strong{font-size:12px}.range-grid{column-gap:12px}.adjustments-body .section-heading{align-items:start}.adjustments-body .section-heading p{font-size:12px}.mobile-actions{padding-inline:12px;gap:8px}.mobile-actions button{font-size:14px}.preview-meta{font-size:11px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

/* Ready-to-edit poster gallery: the entry is the leftmost action, not a sidebar. */
.desktop-actions{grid-template-columns:1fr 1fr 1fr;gap:8px}.desktop-actions button{padding-inline:9px;font-size:13px}
.preset-notice{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 18px;border-radius:12px;background:var(--accent-soft);color:var(--accent-strong);font-size:13px}.preset-notice p{min-width:0}.preset-notice button{flex-shrink:0;min-height:40px}
.gallery-page{min-height:100dvh;background:var(--page)}.gallery-header{display:flex;align-items:center;justify-content:space-between;gap:20px;background:#fff;padding:24px max(24px,calc((100vw - 1120px)/2));border-bottom:1px solid var(--border)}.gallery-header h1{font-size:26px;color:var(--ink);font-weight:600;outline:none}.gallery-main{max-width:1168px;padding:26px 24px 40px;margin:auto}.gallery-filters{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:24px}.gallery-filter{border:1px solid var(--border);background:#fff;border-radius:9px;color:var(--muted);font-size:14px;min-height:42px;padding:9px 20px}.gallery-filter[aria-pressed=true]{border-color:var(--accent-strong);background:var(--accent-soft);color:var(--accent-strong);font-weight:600}.gallery-filter:hover{background:var(--accent-soft)}.gallery-grid{columns:3;column-gap:24px}.gallery-card{break-inside:avoid;margin-bottom:24px;border-radius:14px;background:#fff;overflow:hidden;box-shadow:0 2px 10px #3024140a}.gallery-media{position:relative;background:#eae6df;line-height:0}.gallery-media canvas{display:block;width:100%;height:100%}.gallery-loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:var(--muted);font-size:14px;line-height:1.5}.gallery-retry{position:absolute;top:calc(50% + 24px);left:50%;transform:translateX(-50%);font-size:13px}.gallery-card-info{padding:18px}.gallery-card h3{font-size:16px;font-weight:600;color:var(--ink)}.gallery-card-info>p{font-size:12px;color:var(--muted);margin-top:6px}.apply-preset{width:100%;margin-top:16px;min-height:44px;font-size:14px}
@media(max-width:860px){.mobile-actions{grid-template-columns:1fr .8fr 1.2fr;gap:8px}.mobile-actions button{font-size:14px;padding-inline:8px}.gallery-header{padding:18px 16px;gap:12px}.gallery-header h1{font-size:23px}.gallery-header .secondary-button{font-size:14px;padding-inline:14px;flex-shrink:0}.gallery-main{padding:22px 16px 32px}.gallery-filters{gap:8px;margin-bottom:18px}.gallery-filter{font-size:13px;padding:8px 12px;min-height:42px}.gallery-grid{columns:2;column-gap:14px}.gallery-card{margin-bottom:14px;border-radius:12px}.gallery-card-info{padding:12px}.gallery-card h3{font-size:14px;line-height:1.5}.gallery-card-info>p{font-size:11px}.apply-preset{font-size:14px;margin-top:12px;padding:10px;min-height:44px}.gallery-loading{font-size:12px}.preset-notice{font-size:13px;padding:12px 14px;gap:10px}}
@media(max-width:360px){.gallery-main{padding-inline:12px}.gallery-grid{column-gap:10px}.gallery-card-info{padding:10px}.gallery-filter{font-size:12px;padding-inline:10px}.gallery-header h1{font-size:22px}.gallery-card h3{font-size:13px}}
