:root{--ink:#22252c;--muted:#7c828b;--line:#e5e7eb;--paper:#fff;--accent:#a44939;--soft:#f8eeeb;--bg:#f4f5f7}*{box-sizing:border-box}body{margin:0;color:var(--ink);background:var(--bg);font:14px/1.6 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{min-height:40px;padding:8px 14px;border:1px solid var(--line);border-radius:7px;color:var(--ink);background:#fff;cursor:pointer;touch-action:manipulation}button:hover{border-color:#b7a49f}button:disabled{opacity:.45;cursor:not-allowed}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--accent);outline-offset:3px}button[aria-pressed=true]{border-color:var(--accent);background:var(--soft);color:var(--accent)}a{text-decoration:none;color:inherit}h1,h2,h3,p{margin:0}h1{font-size:20px;font-weight:600}h2{font-size:15px;font-weight:600}input,textarea,select{width:100%;border:1px solid var(--line);border-radius:6px;padding:10px 11px;background:#fff;color:var(--ink);min-height:42px;max-width:100%}textarea{resize:vertical;line-height:1.7}input[type=range]{padding:0;border:0;accent-color:var(--accent);min-height:30px}input[type=color]{height:40px;padding:4px;width:100%}label{display:block;font-size:12px;font-weight:500;margin:15px 0}label input,label textarea,label select{display:block;margin-top:7px;font-weight:400}input::placeholder,textarea::placeholder{color:#a5a9b1}[hidden]{display:none!important}.primary{background:var(--accent);border-color:var(--accent);color:#fff;font-weight:500}.primary:hover{background:#913b2e;border-color:#913b2e}.text-btn{padding:5px 2px;min-height:36px;border:0;background:none;color:var(--accent);font-size:12px}.wide{width:100%}.hint{font-size:12px;color:var(--muted);line-height:1.8;margin:10px 0}.studio-header{height:62px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:24px;padding:0 24px}.home-link{font-size:13px;color:var(--muted)}.studio-header>strong{font-weight:600;font-size:16px;border-left:1px solid var(--line);padding-left:24px}.header-actions{margin-left:auto;display:flex;gap:10px;align-items:center}.header-actions>span{font-size:11px;color:var(--muted);margin-right:8px}.steps{height:64px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:center;gap:50px}.steps button{border:0;background:none;display:flex;align-items:center;gap:9px;color:#858b94;padding:8px 10px}.steps b{font-size:13px;font-weight:500}.steps span{width:24px;height:24px;border:1px solid var(--line);border-radius:50%;font-size:11px;display:grid;place-items:center}.steps [aria-current=step]{color:var(--accent)}.steps [aria-current=step] span{color:#fff;background:var(--accent);border-color:var(--accent)}.studio{display:grid;grid-template-columns:450px minmax(0,1fr);height:calc(100dvh - 126px);max-width:1680px;margin:auto}.editor{display:flex;min-height:0;flex-direction:column;background:#fff;border-right:1px solid var(--line);min-width:0}.pane-heading{padding:24px 24px 20px;display:flex;align-items:center;gap:14px;border-bottom:1px solid var(--line)}.pane-heading>div{flex:1}.pane-heading span{font-size:10px;color:var(--muted);letter-spacing:1.5px}.pane-heading h1{margin-top:4px}.editor-scroll{overflow:auto;flex:1;min-height:0;padding:22px 24px;scroll-behavior:smooth}.flow-controls{display:flex;align-items:center;gap:10px;padding:14px 24px;border-top:1px solid var(--line);background:white}.flow-controls .primary{margin-left:auto}.flow-controls #mobile-preview{display:none}.template-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.template-card{padding:8px;text-align:left;min-width:0;overflow:hidden;border-radius:9px}.template-card[aria-pressed=true]{box-shadow:0 0 0 1px var(--accent)}.template-card svg{display:block;width:100%;height:auto;aspect-ratio:3/4;border-radius:4px}.template-card b{display:block;font-size:13px;font-weight:500;margin:9px 2px 2px}.template-card small{display:block;font-size:10px;color:var(--muted);margin:0 2px 4px}.form-section,.adjust-box,.export-summary{padding:0 0 23px;margin-bottom:22px;border-bottom:1px solid var(--line)}.section-heading{display:flex;align-items:center;gap:10px;margin-bottom:13px}.section-heading>h2{flex:1}.count{font-size:11px;color:var(--muted)}.row{display:flex;gap:12px}.row>*{flex:1;min-width:0}summary{cursor:pointer;font-size:14px;font-weight:500;list-style:none;display:flex;align-items:center;gap:10px;min-height:44px}summary::-webkit-details-marker{display:none}summary:after{content:'＋';margin-left:auto;color:var(--muted)}details[open]>summary:after{content:'−'}.optional-tag{font-size:10px;color:var(--muted);font-weight:400;background:var(--bg);border-radius:4px;padding:2px 5px}.details-content{padding-top:2px}.product-card{border:1px solid var(--line);border-radius:9px;padding:14px;margin:15px 0}.product-head{display:flex;align-items:center;gap:6px}.product-head b{flex:1;font-size:12px}.product-head button{min-height:32px;padding:4px 7px;font-size:11px}.product-picture{display:flex;align-items:center;gap:15px;margin:14px 0}.upload-button{width:84px;height:104px;flex:0 0 84px;padding:5px;overflow:hidden;border-style:dashed;background:#f7f8fa;color:var(--muted)}.upload-button img{width:100%;height:100%;object-fit:contain}.picture-options{display:flex;align-items:flex-start;flex-direction:column}.picture-options button{border:0;padding:3px 0;min-height:30px;font-size:11px;color:var(--accent);background:none}.picture-options .hint{font-size:10px;margin:2px 0}.product-card label{font-size:11px}.product-card .row{gap:8px}.add-product{width:100%;border-style:dashed;color:var(--accent)}.header-upload{padding:12px;background:#fafbfc;border:1px solid var(--line);border-radius:8px;margin:18px 0}.field-caption{font-size:12px;margin-bottom:9px}.header-upload-button{display:flex;align-items:center;justify-content:center;width:100%;height:100px;overflow:hidden;border-style:dashed;background:white;color:var(--accent)}.header-upload-button img{max-width:100%;max-height:100%;object-fit:contain}.header-tools{display:flex;gap:18px}.header-upload .hint{font-size:10px}.themes{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}.themes button{padding:5px;font-size:10px}.themes i{display:grid;place-items:center;height:48px;background:var(--paper);color:var(--swatch);font:22px Georgia;border-radius:4px;margin-bottom:5px}.border-options{padding:0;border:0;margin:22px 0}.border-options legend{font-size:12px;font-weight:500;margin-bottom:10px}.borders{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.borders button{font-size:10px;padding:7px}.border-demo{display:block;width:38px;height:42px;margin:0 auto 6px;color:var(--accent);background:#f6f0e7}.b-line{border:1px solid currentColor}.b-double,.b-classic{border:3px double currentColor}.b-classic{border-radius:9px 0}.b-corners{border-top:2px solid currentColor;border-bottom:2px solid currentColor}.b-stamp{border:2px dashed currentColor}.border-color-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.border-color-row label{margin:0}.border-color-row input{width:42px}.border-color-row .hint{font-size:10px}.adjust-box output{float:right;color:var(--muted);font-size:11px}.preview{display:flex;min-height:0;min-width:0;flex-direction:column;padding:24px 32px 16px}.preview-header{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:16px}.preview-header>div{display:flex;align-items:baseline;gap:14px}.preview-header h2{font-size:14px}.preview-header span{font-size:11px;color:var(--muted)}#preview-close{display:none}.view-tabs{display:flex;align-self:center;gap:4px;padding:4px;background:#e9ecf0;border-radius:8px;margin-bottom:18px}.view-tabs button{background:none;border:0;font-size:12px;min-height:34px;color:var(--muted);padding:5px 18px}.view-tabs button[aria-pressed=true]{background:#fff;color:var(--ink);box-shadow:0 1px 4px #0000000b}.preview-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:24px;border:1px solid #e3e6eb;background-color:#e9ecf0;border-radius:10px}.preview-scroll canvas{display:block;width:100%;height:auto;max-width:490px;margin:0 auto 24px;box-shadow:0 5px 20px #26303c16}#empty-preview{text-align:center;padding:0 0 15px}#template-preview{max-width:380px;margin:auto;box-shadow:0 5px 20px #26303c16}#template-preview svg{display:block;width:100%;height:auto}.page-label{text-align:center;font-size:11px;color:var(--muted);margin:14px 0 8px}.preview-footer{display:flex;align-items:center;justify-content:space-between;gap:15px;padding-top:14px}.preview-footer span{font-size:11px;color:var(--muted)}.preview-footer button{font-size:12px}.export-summary h2{margin-bottom:12px}.export-summary .primary{margin-top:12px}dialog{border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--ink);padding:22px;width:calc(100% - 28px);max-width:520px;max-height:90dvh;overflow:auto}dialog::backdrop{background:#22273566}.dialog-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.dialog-head h2{font-size:17px}.dialog-head button{border:0;font-size:22px}.draft-item{width:100%;display:flex;align-items:center;justify-content:space-between;text-align:left;gap:12px;margin-top:10px}.draft-item small{font-size:10px;color:var(--muted)}.type-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.type-grid button{font-size:24px;padding:20px 8px}.type-grid b,.type-grid small{display:block}.type-grid b{font-size:13px}.type-grid small{font-size:10px;color:var(--muted)}.export-item img{width:100%;max-height:55dvh;object-fit:contain;margin:18px 0 8px}.export-item a{display:block;text-align:center;padding:12px;background:var(--accent);color:#fff;border-radius:7px}.toast{position:fixed;bottom:90px;left:50%;transform:translateX(-50%);max-width:90%;padding:12px 18px;background:#252a33;color:#fff;font-size:12px;border-radius:8px;z-index:30}#mobile-summary{display:none}
@media(min-width:1500px){.studio{grid-template-columns:480px minmax(0,1fr)}}
@media(max-width:1000px){.studio{grid-template-columns:390px minmax(0,1fr)}.steps{gap:25px}.preview{padding:22px 20px 14px}.editor-scroll{padding:20px}.pane-heading,.flow-controls{padding-left:20px;padding-right:20px}.view-tabs button{padding:5px 13px}}
@media(max-width:760px){.studio-header{height:56px;padding:0 14px;gap:13px}.studio-header>strong{font-size:14px;padding-left:13px}.home-link{font-size:12px}.header-actions{gap:6px}.header-actions>span{display:none}.header-actions button{font-size:12px;padding:7px 10px;min-height:36px}.steps{height:58px;gap:0;justify-content:space-around;padding:0 8px}.steps button{gap:6px;padding:5px}.steps b{font-size:11px}.steps span{width:20px;height:20px;font-size:10px}.studio{display:block;height:calc(100dvh - 114px)}.editor{height:100%;border:0}.pane-heading{padding:16px 18px}.pane-heading h1{font-size:18px}.editor-scroll{padding:18px}.flow-controls{padding:12px 18px max(12px,env(safe-area-inset-bottom));gap:8px}.flow-controls button{font-size:12px;padding:9px 11px}.flow-controls #mobile-preview{display:block}.template-grid{gap:12px}.template-card svg{max-height:235px}.template-card b{font-size:12px}.template-card small{font-size:10px}.preview{display:none}.preview.mobile-open{display:flex;position:fixed;inset:0;z-index:15;background:var(--bg);padding:18px 16px max(16px,env(safe-area-inset-bottom))}.preview-header{margin-bottom:12px}.preview-header>div{gap:10px}#preview-close{display:block;padding:3px 10px;min-height:36px;font-size:20px}.preview-scroll{padding:16px}.preview-footer span{font-size:10px}.preview-footer button{white-space:nowrap}.view-tabs{margin-bottom:12px}.preview-scroll canvas{margin-bottom:16px}input,select,textarea{font-size:16px}.product-head{gap:5px}.product-head b{font-size:11px}.product-head button{padding:4px 6px}.template-card{padding:7px}.row{gap:8px}.product-card{padding:12px}.hint{font-size:11px}}
@media(max-width:360px){.home-link span{display:none}.steps button{gap:4px}.steps b{font-size:10px}.steps span{width:18px;height:18px}.flow-controls{padding-left:12px;padding-right:12px}.flow-controls button{padding:8px}.editor-scroll{padding:14px}.template-card small{font-size:9px}.product-head b{font-size:10px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
#step-title:focus{outline:none}

/* Local design review: full artwork thumbnails and an independent full-page background. */
.local-badge{font-size:11px;color:var(--accent);background:var(--soft);padding:3px 8px;border-radius:4px}
.template-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.template-heading span{font-size:11px;color:var(--muted)}
.template-card .template-art{display:block;width:100%;height:auto;aspect-ratio:3/4;object-fit:cover;border-radius:4px}
#template-preview .template-art{display:block;width:100%;height:auto}
.background-panel{padding-bottom:24px;margin-bottom:24px;border-bottom:1px solid var(--line)}
.background-upload{display:flex;align-items:center;justify-content:center;width:100%;height:118px;overflow:hidden;padding:8px;border-style:dashed;background:#f8f9fb;color:var(--accent);font-size:12px}
.background-upload img{width:100%;height:100%;object-fit:contain}
.background-panel output{float:right;font-size:11px;color:var(--muted)}
@media(max-width:760px){.local-badge{font-size:10px;padding:2px 5px}.studio-header{gap:9px}.studio-header>strong{padding-left:9px}.header-actions button{padding:6px 9px}.template-card .template-art{max-height:225px;object-fit:contain}.template-heading span{font-size:10px}}
@media(max-width:360px){.local-badge{display:none}}

.preview-footer{flex-wrap:wrap}.preview-footer>span{flex:1;min-width:120px}.preview-footer select{width:116px;min-height:36px;font-size:12px;padding:5px 8px}.preview-scroll canvas{transition:max-width .15s ease}@media(prefers-reduced-motion:reduce){.preview-scroll canvas{transition:none}}
.creation-method{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:24px}.creation-method button{font-size:12px}.direct-properties{border-bottom:1px solid var(--line);padding-bottom:20px;margin-bottom:22px}.object-property-head{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px}.object-actions,.move-pad,.background-presets{display:flex;gap:7px;flex-wrap:wrap;margin:10px 0}.object-actions button,.move-pad button,.background-presets button{font-size:11px;min-height:38px;padding:7px 11px}.move-pad button{flex:1;min-width:44px}.direct-toolbar{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 12px;align-self:center}.direct-toolbar button{font-size:11px;min-height:34px;padding:6px 10px}.direct-page{position:relative;max-width:100%;margin:0 auto 24px}.preview-scroll .direct-page canvas{width:100%;height:auto;display:block;margin:0;box-shadow:0 5px 20px #26303c16}.direct-overlay{position:absolute;inset:0;pointer-events:none;display:none}.direct-editing .direct-overlay{display:block}.edit-hit{position:absolute;pointer-events:none;min-width:1px;min-height:1px}.object-target{position:absolute;inset:0;width:100%;height:100%;min-height:20px;padding:0;background:transparent;border:0;border-radius:0;pointer-events:auto;touch-action:none;cursor:move;color:transparent}.object-target:hover{background:#a4493910;outline:1px dashed var(--accent)}.edit-hit.is-selected{outline:2px solid var(--accent)}.edit-hit.is-selected .object-target{background:#a4493909}.resize-grip{position:absolute;right:-10px;bottom:-10px;width:23px;height:23px;min-height:23px;padding:0;background:#fff;border:2px solid var(--accent);border-radius:4px;pointer-events:auto;touch-action:none;display:none;cursor:nwse-resize}.edit-hit.is-selected .resize-grip{display:block}.direct-notice{padding:9px 12px;margin-bottom:10px;background:#fff7e8;color:#755323;border:1px solid #eed8ad;border-radius:6px;font-size:11px}.mobile-object-actions{display:none}.background-advanced summary{font-size:12px;min-height:40px;color:var(--muted)}#board-entry{margin-bottom:24px}.direct-page canvas{transition:none!important}
@media(max-width:760px){.direct-toolbar{justify-content:center;gap:5px}.direct-toolbar button{min-height:38px;padding:6px 9px}.mobile-object-actions:not([hidden]){display:flex;flex-wrap:wrap;gap:6px;padding-bottom:10px}.mobile-object-actions button{flex:1;font-size:11px;padding:6px 8px;min-height:40px;white-space:nowrap}.resize-grip{width:34px;height:34px;min-height:34px;right:-17px;bottom:-17px}.object-target{min-height:30px}.creation-method button{font-size:11px}.direct-notice{font-size:11px}.move-pad button{min-height:44px}.object-actions button{min-height:42px}}

/* Purpose and visual style are independent; product groups share movement bounds. */
.style-heading{margin:26px 0 12px}.themes{grid-template-columns:repeat(3,minmax(0,1fr))}.check-field{display:flex;align-items:center;gap:8px;font-size:12px;line-height:1.6;margin:12px 0}.check-field input[type=checkbox]{width:17px;height:17px;min-height:17px;padding:0;margin:0;flex:0 0 17px;accent-color:var(--accent)}.group-outline{position:absolute;border:2px solid var(--accent);pointer-events:none;z-index:1}.is-group-member:not(.is-selected){outline:1px dashed var(--accent)}#export-set-btn{margin-top:12px}.template-card:last-child:nth-child(odd){grid-column:auto}.object-property-head strong{overflow-wrap:anywhere}#group-edit-field{background:var(--bg);padding:10px;border-radius:6px}@media(max-width:760px){.check-field{font-size:12px;min-height:36px}.check-field input[type=checkbox]{width:20px;height:20px;flex-basis:20px}.themes button{min-height:78px}.style-heading{margin-top:22px}}

.template-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.template-card .template-art{height:128px;max-height:none;aspect-ratio:auto;object-fit:contain;background:#f6f6f3}.template-card b{font-size:12px}.template-card{padding:6px}@media(max-width:760px){.template-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.template-card .template-art{height:142px}.template-card b{margin-bottom:4px}}

/* Campaign templates and structured optional pages. */
.base-templates{margin-top:14px}.base-templates summary{font-size:12px;color:var(--muted)}.base-templates .template-grid{padding-top:12px}.campaign-primary{padding-top:0}.campaign-item{padding:14px;border:1px solid var(--line);border-radius:7px;margin-bottom:14px}.campaign-item-head{display:flex;gap:5px;align-items:center;margin-bottom:12px}.campaign-item-head strong{flex:1;font-size:12px}.campaign-item-head button{font-size:10px;min-height:32px;padding:4px 7px}.campaign-item label{font-size:11px}.bonus-image-button{width:100%;height:140px;border-style:dashed;display:flex;align-items:center;justify-content:center;padding:8px;color:var(--accent);font-size:12px}.bonus-image-button img{width:100%;height:100%;object-fit:contain}.campaign-reading-image{display:block;max-height:200px;max-width:100%;object-fit:contain;margin:auto}.campaign-primary label{font-size:12px}#campaign-fields>section:first-child{padding-top:0}#empty-message{padding:12px}.template-card b{line-height:1.6;overflow-wrap:anywhere}.base-templates:not([open]) .template-grid{display:none}@media(max-width:760px){.campaign-item{padding:12px}.campaign-item-head button{min-height:38px;padding:4px 6px}.campaign-item .row{flex-wrap:wrap}.campaign-item .row>label{min-width:100px}.bonus-image-button{height:120px}.campaign-primary .row{flex-wrap:wrap}.campaign-primary .row>label{min-width:130px}}

@media(min-width:761px){#templates .template-art{height:96px}#templates .template-card b{font-size:11px;line-height:1.5}}
