:root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;color:#1b1d1c;font-synthesis:none;text-rendering:optimizelegibility;--surface:#f6f7f6;--surface-raised:#fff;--surface-muted:#e8ebea;--line:#ccd2cf;--line-strong:#aab3af;--text:#1b1d1c;--text-muted:#626a66;--accent:#0d7757;--accent-strong:#075f45;--accent-soft:#d7eee5;--danger:#b2382f;--radius:12px;background:#e8ebea;font-family:SF Pro Text,PingFang SC,Noto Sans CJK SC,system-ui,sans-serif}@media (prefers-color-scheme:dark){:root{--lightningcss-light: ;--lightningcss-dark:initial}}*{box-sizing:border-box}body{background:var(--surface-muted);min-width:320px;min-height:100dvh;color:var(--text);margin:0}button,input,select{font:inherit}button,.file-button{border:1px solid var(--line-strong);min-height:40px;color:var(--text);background:var(--surface-raised);cursor:pointer;border-radius:8px;padding:0 14px;transition:transform .12s,border-color .12s,background .12s}button:hover,.file-button:hover,.template-import-icon:hover{border-color:var(--accent)}button:active,.file-button:active,.template-import-icon:active{transform:translateY(1px)}button:disabled{cursor:not-allowed;opacity:.42}button:focus-visible,.file-button:focus-within,.template-import-icon:focus-within,input:focus-visible,select:focus-visible{outline:3px solid color-mix(in srgb, var(--accent) 35%, transparent);outline-offset:2px}.primary-button{border-color:var(--accent);color:#f7fffb;background:var(--accent)}.primary-button:hover{border-color:var(--accent-strong);background:var(--accent-strong)}.app-shell{min-height:100dvh}.topbar{border-bottom:1px solid var(--line);background:color-mix(in srgb, var(--surface) 92%, transparent);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);grid-template-columns:minmax(220px,1fr) auto minmax(220px,1fr);align-items:center;gap:24px;min-height:68px;padding:12px 24px;display:grid}.brand-block{align-items:center;gap:12px;min-width:0;display:flex}.brand-block>div{min-width:0}.kold-logo{object-fit:contain;mix-blend-mode:multiply;flex:none;width:66px;height:30px;display:block}.page-tabs{border:1px solid var(--line);background:var(--surface-muted);border-radius:10px;gap:3px;padding:3px;display:flex}.page-tabs button{min-height:34px;color:var(--text-muted);background:0 0;border:0;align-items:center;gap:7px;padding:0 14px;font-size:13px;font-weight:650;display:inline-flex}.page-tabs button.active{color:var(--text);background:var(--surface-raised);box-shadow:0 1px 3px #2e3a341f}.page-tabs button span{min-width:18px;height:18px;color:var(--accent-strong);background:var(--accent-soft);border-radius:9px;place-items:center;font-size:10px;display:grid}.product-name,.product-subtitle,.status,.preview-toolbar h1,.preview-toolbar p,.section-heading h2,.section-heading p{margin:0}.product-name{letter-spacing:-.01em;font-size:15px;font-weight:700}.product-subtitle,.preview-toolbar p,.section-heading p{color:var(--text-muted);margin-top:3px;font-size:12px}.status{max-width:46ch;color:var(--text-muted);text-align:right;justify-self:end;font-size:12px}.status-error{color:var(--danger)}.workspace{grid-template-columns:minmax(360px,440px) minmax(0,1fr);height:calc(100dvh - 68px);min-height:0;display:grid}.control-panel{border-right:1px solid var(--line);background:var(--surface);min-height:0;overflow-y:auto}.panel-section{border-bottom:1px solid var(--line);padding:20px}.section-heading{grid-template-columns:28px 1fr;gap:10px;margin-bottom:16px;display:grid}.section-heading.no-index{grid-template-columns:1fr}.section-index{width:26px;height:26px;color:var(--accent-strong);background:var(--accent-soft);border-radius:50%;place-items:center;font-size:12px;font-weight:700;display:grid}.section-heading h2{font-size:15px;line-height:1.4}.file-button{justify-content:center;align-items:center;font-size:13px;font-weight:650;display:inline-flex}.file-button input{opacity:0;width:1px;height:1px;position:absolute;overflow:hidden}.file-row,.export-actions{flex-wrap:wrap;gap:8px;display:flex}.template-picker{grid-template-columns:minmax(0,1fr);align-items:end;gap:8px;display:grid}.template-picker>label:first-child{gap:5px;display:grid}.template-picker>label:first-child span{color:var(--text-muted);font-size:11px}.template-ready{gap:14px;display:grid}.template-list-heading{grid-template-columns:minmax(0,1fr) auto;align-items:center}.template-import-icon{border:1px solid var(--line-strong);width:36px;height:36px;color:var(--text-muted);background:var(--surface-raised);cursor:pointer;border-radius:8px;place-items:center;font-size:20px;line-height:1;transition:transform .12s,border-color .12s,color .12s;display:grid;position:relative}.template-import-icon:hover{color:var(--accent-strong)}.template-import-icon input{opacity:0;width:1px;height:1px;position:absolute;overflow:hidden}.template-library-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;display:grid}.template-library-item{border:1px solid var(--line);border-radius:var(--radius);background:var(--surface-raised);padding:7px}.template-library-item.active{border-color:var(--accent);background:color-mix(in srgb, var(--accent-soft) 48%, var(--surface-raised))}.template-library-item .template-summary{text-align:left;background:0 0;border:0;gap:9px;width:100%;min-width:0;padding:0;display:grid}.template-thumbnail{background-color:#0000;background-image:linear-gradient(45deg,#dfe3e1 25%,#0000 25%),linear-gradient(-45deg,#dfe3e1 25%,#0000 25%),linear-gradient(45deg,#0000 75%,#dfe3e1 75%),linear-gradient(-45deg,#0000 75%,#dfe3e1 75%);background-position:0 0,0 8px,8px -8px,-8px 0;background-repeat:repeat,repeat,repeat,repeat;background-size:16px 16px;background-attachment:scroll,scroll,scroll,scroll;background-origin:padding-box,padding-box,padding-box,padding-box;background-clip:border-box,border-box,border-box,border-box;border-radius:8px;width:100%;height:auto;display:block}.template-summary-copy{gap:4px;min-width:0;padding:0 2px;display:grid}.template-summary-copy>strong,.template-summary-copy>span{text-overflow:ellipsis;white-space:nowrap;max-width:100%;overflow:hidden}.template-summary-copy>strong{font-size:13px}.template-summary-copy>span{color:var(--text-muted);font-size:11px}.template-item-actions{flex-wrap:wrap;justify-content:flex-end;gap:6px;margin-top:8px;display:flex}.template-item-actions button{min-height:34px;padding:0 11px;font-size:12px}.template-delete-confirm button{min-height:36px;padding:0 10px;font-size:12px}.template-delete-confirm{flex-wrap:wrap;justify-content:flex-end;gap:6px;margin-top:8px;display:flex}.template-delete-confirm span{width:100%;color:var(--danger);text-align:right;font-size:12px}.danger-text-button{color:var(--danger)}.danger-button{border-color:var(--danger);color:#fff;background:var(--danger)}.new-template-tile{min-height:204px;color:var(--text-muted);background:color-mix(in srgb, var(--surface-raised) 58%, transparent);text-align:center;border-style:dashed;place-content:center;justify-items:center;gap:7px;display:grid}.new-template-tile:hover{color:var(--accent-strong);background:color-mix(in srgb, var(--accent-soft) 40%, var(--surface-raised))}.new-template-tile span{font-size:30px;font-weight:300;line-height:1}.new-template-tile strong{color:var(--text);font-size:13px}.new-template-tile small{font-size:11px}.template-ready h2,.template-ready p{margin:0}.template-name-field{gap:5px;margin-bottom:14px;display:grid}.template-name-field span{color:var(--text-muted);font-size:11px}.template-elements-editor{border:1px solid var(--line);border-radius:var(--radius);background:color-mix(in srgb, var(--surface-muted) 48%, transparent);gap:10px;margin-bottom:16px;padding:12px;display:grid}.template-elements-heading{justify-content:space-between;align-items:flex-start;gap:10px;display:flex}.template-elements-heading h3,.template-elements-heading p{margin:0}.template-elements-heading h3{font-size:14px}.template-elements-heading p{color:var(--text-muted);margin-top:3px;font-size:11px;line-height:1.5}.template-elements-heading .file-button{white-space:nowrap;min-height:34px;padding:0 10px}.template-element-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;max-height:180px;display:grid;overflow:auto}.template-element-list button{text-align:left;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:6px;min-height:34px;padding:0 8px;display:grid}.template-element-list button>span{color:var(--accent-strong);font-size:10px;font-weight:700}.template-element-list button>strong{text-overflow:ellipsis;white-space:nowrap;font-size:11px;overflow:hidden}.template-element-list button>small{color:var(--text-muted);font-size:9px}.template-element-list button.selected{border-color:var(--accent);box-shadow:inset 3px 0 0 var(--accent);background:var(--accent-soft)}.template-element-list button.selected>strong:after{content:" · 已选中";color:var(--accent-strong);font-size:9px;font-weight:650}.selected-element-editor{border-top:1px solid var(--line);padding-top:2px}.unsaved-edit-prompt{border:1px solid color-mix(in srgb, var(--accent) 58%, var(--line));border-radius:var(--radius);background:var(--accent-soft);gap:10px;margin-top:12px;padding:12px;display:grid}.save-as-prompt{border:1px solid var(--line);border-radius:var(--radius);background:var(--surface-muted);gap:10px;margin-top:12px;padding:12px;display:grid}.save-as-prompt>label{gap:5px;display:grid}.save-as-prompt>label>span{color:var(--text-muted);font-size:11px}.unsaved-edit-prompt strong,.unsaved-edit-prompt p{margin:0}.unsaved-edit-prompt p{color:var(--text-muted);margin-top:3px;font-size:11px}.template-field-list .candidate-toggle{grid-template-columns:1fr auto}.template-ready h2{font-size:15px}.template-ready p{color:var(--text-muted);margin-top:4px;font-size:12px}.candidate-list{gap:10px;margin-bottom:14px;display:grid}.candidate-row{border:1px solid var(--line);border-radius:var(--radius);background:var(--surface-raised);padding:12px}.candidate-toggle{grid-template-columns:auto 1fr auto;align-items:center;gap:8px;margin-bottom:10px;display:grid}.candidate-toggle span{font-size:13px;font-weight:650}.candidate-toggle small{color:var(--text-muted)}.candidate-row>label:not(.candidate-toggle),.mapping-list label,.measure-grid label,.row-picker{gap:5px;display:grid}.candidate-row label>span,.mapping-list label>span,.measure-grid label>span,.row-picker span{color:var(--text-muted);font-size:11px}input[type=number],input[type=text],select{border:1px solid var(--line);width:100%;min-height:36px;color:var(--text);background:var(--surface-raised);border-radius:7px;padding:0 9px}.field-color-editor{gap:5px;margin-top:10px;display:grid}.field-color-editor>span:first-child{color:var(--text-muted);font-size:11px}.field-color-controls{grid-template-columns:44px minmax(0,1fr);gap:7px;display:grid}.field-color-controls input[type=color]{border:1px solid var(--line);background:var(--surface-raised);cursor:pointer;border-radius:7px;width:44px;min-height:36px;padding:3px}.field-color-controls input[type=text]{letter-spacing:.04em;text-transform:uppercase;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.measure-grid{grid-template-columns:repeat(5,1fr);gap:6px;margin-top:10px;display:grid}.mapping-list{grid-template-columns:1fr 1fr;gap:10px;margin-bottom:14px;display:grid}.preview-panel{grid-template-rows:auto minmax(0,1fr) auto;min-width:0;min-height:0;display:grid;overflow:hidden}.preview-toolbar{border-bottom:1px solid var(--line);background:var(--surface);grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:20px;min-height:68px;padding:12px 20px;display:grid}.preview-toolbar h1{font-size:16px}.preview-title-block{justify-self:start;min-width:0}.preview-title-row{align-items:center;gap:7px;min-height:36px;display:flex}.preview-title-row h1{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.preview-title-edit,.preview-title-action{min-width:32px;min-height:32px;padding:0 8px}.preview-title-edit{color:var(--text-muted);background:0 0;border-color:#0000;font-size:18px}.preview-name-input{width:clamp(160px,30vw,320px);min-height:36px}.preview-controls,.zoom-controls,.history-controls,.save-controls{align-items:center;gap:8px;display:flex}.preview-controls{grid-column:3;justify-self:end}.zoom-controls,.history-controls{gap:3px}.zoom-controls button,.history-controls button{min-width:34px;min-height:34px;padding:0 9px}.history-controls{border:1px solid var(--line);background:var(--surface-muted);border-radius:9px;grid-column:2;justify-self:center;padding:3px}.save-controls{grid-column:2;justify-self:center;gap:4px}.save-controls button{min-height:34px;padding:0 10px;font-size:12px}.history-controls button{background:0 0;border-color:#0000;place-items:center;display:grid}.history-controls button:not(:disabled):hover{border-color:var(--line-strong);background:var(--surface-raised)}.history-controls svg{fill:none;stroke:currentColor;stroke-width:1.8px;stroke-linecap:round;stroke-linejoin:round;width:18px;height:18px}.zoom-controls .zoom-fit{min-width:102px;color:var(--text-muted);font-size:12px}.canvas-area{background-color:#0000;background-image:linear-gradient(45deg,#dfe3e1 25%,#0000 25%),linear-gradient(-45deg,#dfe3e1 25%,#0000 25%),linear-gradient(45deg,#0000 75%,#dfe3e1 75%),linear-gradient(-45deg,#0000 75%,#dfe3e1 75%);background-position:0 0,0 12px,12px -12px,-12px 0;background-repeat:repeat,repeat,repeat,repeat;background-size:24px 24px;background-attachment:scroll,scroll,scroll,scroll;background-origin:padding-box,padding-box,padding-box,padding-box;background-clip:border-box,border-box,border-box,border-box;place-items:safe center;min-height:0;padding:36px;display:grid;overflow:auto}.card-overview-grid{grid-template-columns:repeat(auto-fill,minmax(min(260px,100%),1fr));align-self:start;gap:20px;width:100%;display:grid}.overview-card{background:color-mix(in srgb, var(--surface-raised) 78%, transparent);text-align:left;border-color:#0000;gap:8px;min-width:0;height:auto;padding:8px;display:grid}.overview-card:hover{border-color:var(--accent);background:var(--surface-raised)}.overview-card img{border-radius:8px;width:100%;height:auto;display:block;box-shadow:0 10px 26px #2e3a3424}.overview-card>span{color:var(--text-muted);text-overflow:ellipsis;white-space:nowrap;align-items:center;gap:7px;font-size:11px;display:flex;overflow:hidden}.overview-card>span strong{min-width:20px;color:var(--accent-strong);font-size:10px}.card-filmstrip{border-top:1px solid var(--line);background:color-mix(in srgb, var(--surface) 94%, transparent);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);min-width:0;padding:10px 14px 12px}.card-filmstrip-track{scroll-snap-type:x proximity;scrollbar-width:thin;gap:9px;padding:2px;scroll-padding-inline:2px;display:flex;overflow-x:auto}.filmstrip-card{background:var(--surface-raised);scroll-snap-align:center;border:2px solid #0000;border-radius:9px;flex:0 0 112px;width:112px;height:auto;padding:4px;display:block;position:relative}.filmstrip-overview{width:54px;color:var(--text-muted);background:var(--surface-raised);scroll-snap-align:start;border:2px solid #0000;border-radius:9px;flex:0 0 54px;place-items:center;padding:0;display:grid}.filmstrip-overview:hover{border-color:var(--line-strong)}.filmstrip-overview.active{border-color:var(--accent);color:var(--accent-strong);background:var(--accent-soft);box-shadow:0 0 0 2px color-mix(in srgb, var(--accent) 20%, transparent)}.filmstrip-overview svg{fill:none;stroke:currentColor;stroke-width:1.4px;width:22px;height:22px}.filmstrip-card:hover{border-color:var(--line-strong)}.filmstrip-card.active{border-color:var(--accent);box-shadow:0 0 0 2px color-mix(in srgb, var(--accent) 20%, transparent)}.filmstrip-card img{border-radius:5px;width:100%;height:auto;display:block}.filmstrip-card>span{color:#fff;background:#101613b8;border-radius:9px;place-items:center;min-width:18px;height:18px;font-size:9px;font-weight:700;display:grid;position:absolute;bottom:7px;right:7px}.card-preview{background:var(--surface-raised);border-radius:var(--radius);flex:none;max-width:none;height:auto;display:block;overflow:visible;box-shadow:0 20px 60px #2e3a3429}.candidate-overlay{pointer-events:none}.candidate-overlay.interactive{pointer-events:auto}.candidate-overlay rect{fill:color-mix(in srgb, var(--accent) 16%, transparent);stroke:var(--accent);stroke-width:1.25px;vector-effect:non-scaling-stroke}.candidate-overlay.interactive .field-drag-area{cursor:move;touch-action:none}.candidate-overlay.interactive g.selected .field-drag-area{fill:color-mix(in srgb, var(--accent) 24%, transparent);stroke-width:2px}.candidate-overlay.interactive .field-resize-handle{fill:var(--accent-strong);stroke:var(--surface-raised);stroke-width:2px;cursor:nwse-resize;touch-action:none}.template-field-list .candidate-row.selected{border-color:var(--accent);background:color-mix(in srgb, var(--accent-soft) 58%, var(--surface-raised))}.candidate-overlay text{fill:var(--accent-strong);font-size:11px;font-weight:700}.graphic-overlay .graphic-drag-area{fill:color-mix(in srgb, var(--accent) 8%, transparent);stroke:color-mix(in srgb, var(--accent) 65%, transparent);stroke-width:1px;stroke-dasharray:4 3;vector-effect:non-scaling-stroke;cursor:move;touch-action:none;transition:opacity .12s,fill .12s,stroke .12s}.graphic-overlay:has(g.selected) g:not(.selected){opacity:.28}.graphic-overlay g.selected .graphic-drag-area{fill:color-mix(in srgb, var(--accent) 28%, transparent);stroke:var(--accent-strong);stroke-width:3px;stroke-dasharray:none;filter:drop-shadow(0 0 5px color-mix(in srgb, var(--accent) 72%, transparent))}.graphic-overlay .graphic-resize-handle{fill:var(--accent-strong);stroke:var(--surface-raised);stroke-width:2px;vector-effect:non-scaling-stroke;cursor:nwse-resize;touch-action:none}.graphic-overlay text{fill:var(--accent-strong);pointer-events:none;font-size:10px;font-weight:750}.graphic-overlay g.selected text{paint-order:stroke;stroke:var(--surface-raised);stroke-width:3px;stroke-linejoin:round;font-size:12px}.empty-state{text-align:center;max-width:360px;color:var(--text-muted)}.empty-state h2{color:var(--text);margin:18px 0 6px;font-size:18px}.empty-state p{margin:0;font-size:13px;line-height:1.6}.empty-card{aspect-ratio:8/5;border:1px solid var(--line-strong);border-radius:var(--radius);background:linear-gradient(145deg, transparent 64%, var(--accent-soft) 64%), var(--surface-raised);width:220px;margin:0 auto;box-shadow:0 16px 42px #2e3a341f}.svg-measurement-host{visibility:hidden;pointer-events:none;width:1000px;position:fixed;top:0;left:-100000px}@media (prefers-color-scheme:dark){:root{--surface:#171a19;--surface-raised:#212523;--surface-muted:#101211;--line:#343a37;--line-strong:#4b5550;--text:#edf2ef;--text-muted:#a3ada8;--accent:#50bd93;--accent-strong:#78d7b2;--accent-soft:#163d2f;--danger:#ff8e83}.canvas-area{background-color:#101211;background-image:linear-gradient(45deg,#181c1a 25%,#0000 25%),linear-gradient(-45deg,#181c1a 25%,#0000 25%),linear-gradient(45deg,#0000 75%,#181c1a 75%),linear-gradient(-45deg,#0000 75%,#181c1a 75%);background-position:0 0,0 12px,12px -12px,-12px 0;background-repeat:repeat,repeat,repeat,repeat;background-size:24px 24px;background-attachment:scroll,scroll,scroll,scroll;background-origin:padding-box,padding-box,padding-box,padding-box;background-clip:border-box,border-box,border-box,border-box}.primary-button{color:#082117}.kold-logo{filter:invert();mix-blend-mode:screen}}@media (width<=900px){.topbar{grid-template-columns:1fr;align-items:flex-start;gap:8px}.page-tabs{width:100%}.page-tabs button{flex:1;justify-content:center}.status{text-align:left;justify-self:start}.workspace{grid-template-columns:1fr;height:auto;min-height:calc(100dvh - 110px)}.control-panel{border-right:0;overflow:visible}.preview-panel{min-height:620px}.mapping-list,.template-picker{grid-template-columns:1fr}.preview-controls{flex-wrap:wrap;justify-content:flex-end}}@media (width<=560px){.topbar,.panel-section,.preview-toolbar{padding-left:14px;padding-right:14px}.measure-grid{grid-template-columns:repeat(2,1fr)}.template-library-list{grid-template-columns:1fr}.canvas-area{min-height:430px;padding:16px}.preview-toolbar{grid-template-columns:minmax(0,1fr) auto;align-items:flex-start}.preview-controls{grid-area:1/2;justify-content:flex-start}.history-controls,.save-controls{grid-area:2/1/auto/-1}}@media (prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;transition-duration:.01ms!important}}
