/* Hallmark · shape: app screen · genre: modern-minimal · theme: inherited Formbox · signature: printable stacked boxes · nav: project actions · footer: live measurements · posture: restrained · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S5 R4 V3 · weakest: V, shared editor structure; independent desktop geometry and direct stacking controls make the task distinct */
:root {
  color-scheme:dark;
  --bg:#0b1115;--panel:#111a20;--raised:#17232b;--surface:#0e171d;--ink:#e3edf1;--muted:#a5b7c1;--line:#2c404d;--edge:#607985;--accent:#62d5c3;--accent-ink:#09221e;--accent-soft:#163831;--error:#ffb3ac;--warn:#e9c184;--viewer-background:#0e171d;--selection:#c4fff3;--shadow:#00000055;
  --font: -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;--mono:ui-monospace,SFMono-Regular,Consolas,monospace;
  --radius:6px;--space-xs:4px;--space-sm:8px;--space-md:12px;--space-lg:16px;--space-xl:24px;
}
*{box-sizing:border-box}html,body{margin:0;overflow-x:clip;background:var(--bg);color:var(--ink);font-family:var(--font);font-size:14px;scrollbar-color:var(--edge) var(--panel)}body{min-width:320px}::selection{background:var(--accent);color:var(--accent-ink)}button,input,select{font:inherit;color:inherit;caret-color:var(--accent)}button{height:36px;border:1px solid var(--edge);background:var(--raised);border-radius:var(--radius);padding:0 var(--space-md);cursor:pointer;white-space:nowrap}button:hover{background:var(--line)}button:active{background:var(--accent-soft)}button:disabled{opacity:.55;cursor:not-allowed;background:var(--panel);color:var(--muted)}button.primary{background:var(--accent);border-color:var(--accent);color:var(--accent-ink);font-weight:650}button.primary:hover{background:var(--selection)}:focus-visible{outline:2px solid var(--accent);outline-offset:3px}input,select{width:100%;min-width:0;height:36px;border:1px solid var(--edge);border-radius:var(--radius);background:var(--surface);padding:0 var(--space-sm)}input[type=checkbox]{width:16px;height:16px;margin:0;accent-color:var(--accent);flex-shrink:0}input[type=color]{padding:var(--space-xs)}input[aria-invalid=true]{border-color:var(--error)}select{padding-right:var(--space-xl)}label{display:flex;flex-direction:column;gap:var(--space-sm);color:var(--muted);font-size:13px}label.check{flex-direction:row;align-items:center;gap:var(--space-sm);min-height:32px;color:var(--ink);font-size:13px}h1,h2,h3,p{margin:0}h1,h2,h3{text-wrap:balance}h1{font-size:20px;letter-spacing:0;font-weight:650}h2{font-size:14px;font-weight:650}h3{font-size:14px;margin:var(--space-xl) 0 var(--space-md)}p{line-height:1.55}fieldset{margin:0;padding:0;border:0;min-width:0}fieldset:disabled{opacity:.65;cursor:not-allowed;background:var(--panel);color:var(--muted)}a{color:var(--accent)}[hidden]{display:none!important}
.topbar{height:64px;display:flex;align-items:center;justify-content:space-between;gap:var(--space-lg);padding:0 var(--space-xl);border-bottom:1px solid var(--line);background:var(--panel)}.identity{display:flex;align-items:center;gap:var(--space-md);min-width:0}.identity img{filter:brightness(0) invert(.85)}.tagline{color:var(--muted);font-size:13px}.topbar nav{display:flex;gap:var(--space-sm)}.topbar nav button:not(.primary){background:transparent;border-color:transparent}.topbar nav button:hover{background:var(--raised)}.workbench{display:grid;grid-template-columns:228px minmax(0,1fr) 292px;height:calc(100dvh - 96px);min-height:620px;max-width:1920px;margin:auto}.project-panel,.inspector{background:var(--panel);color:var(--ink);min-width:0;overflow-y:auto;padding:var(--space-lg) var(--space-lg)}.project-panel{border-right:1px solid var(--line);display:flex;flex-direction:column}.inspector{border-left:1px solid var(--line)}.project-name{margin-bottom:var(--space-xl)}.project-name input{font-weight:600;color:var(--ink)}.section-title{display:flex;justify-content:space-between;align-items:center;gap:var(--space-sm);margin:var(--space-lg) 0 var(--space-md)}.section-title span{font-size:12px;color:var(--muted)}.section-title button{width:30px;height:30px;padding:0;font-size:20px}.pair{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:var(--space-md)}.levels{display:flex;gap:var(--space-sm);flex-wrap:wrap}.levels button{height:34px;min-width:38px;padding:0 var(--space-md)}.levels button[aria-pressed=true]{background:var(--accent-soft);border-color:var(--accent);color:var(--accent)}.presets{display:grid;grid-template-columns:1fr 1fr;gap:var(--space-sm)}.hint{font-size:12px;color:var(--muted);margin:var(--space-md) 0;line-height:1.5}.bin-list{display:flex;flex-direction:column;gap:var(--space-xs);margin-bottom:var(--space-lg)}.bin-row{display:flex;align-items:center;gap:var(--space-sm);width:100%;height:auto;min-height:42px;padding:var(--space-sm);border-color:transparent;background:transparent;text-align:left}.bin-row[aria-pressed=true]{background:var(--accent-soft);border-color:var(--accent)}.swatch{height:14px;width:14px;flex-shrink:0;border-radius:3px;background:var(--bin-color)}.bin-text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}.bin-meta{font-size:12px;color:var(--muted)}.empty{font-size:13px;color:var(--muted);padding:var(--space-md) 0}.project-foot{margin-top:auto;display:flex;flex-direction:column;gap:var(--space-md);padding-top:var(--space-xl)}.project-foot span{font-size:12px;color:var(--muted)}.canvas-panel{display:flex;flex-direction:column;min-width:0;background:var(--surface);color:var(--ink);overflow:auto}.view-toolbar{display:flex;align-items:center;gap:var(--space-md);flex-wrap:wrap;padding:var(--space-md) var(--space-md);border-bottom:1px solid var(--line);min-height:56px}.view-toolbar button{font-size:12px;height:32px;padding:0 var(--space-sm)}.view-toolbar label{font-size:12px}.segmented{display:flex}.segmented button:first-child{border-radius:6px 0 0 6px}.segmented button:last-child{border-radius:0 6px 6px 0;border-left:0}.stage{position:relative;flex:1;min-height:280px}.stage canvas{width:100%;height:100%;position:absolute;inset:0;touch-action:none;cursor:grab}.stage canvas.dragging{cursor:grabbing}.labels{position:absolute;inset:0;pointer-events:none;overflow:clip}.labels svg{stroke:var(--muted);stroke-width:1;fill:none}.dimension{position:absolute;transform:translate(-50%,-50%);font:12px var(--mono);background:var(--panel);color:var(--ink);padding:var(--space-xs) var(--space-sm);border-radius:3px;white-space:nowrap}.stage-caption{position:absolute;bottom:12px;left:16px;right:16px;display:flex;justify-content:space-between;gap:var(--space-sm);pointer-events:none;color:var(--muted);font-size:12px}.viewer-error{position:absolute;inset:20px auto auto 20px;max-width:70%;background:var(--panel);padding:var(--space-lg);color:var(--error)}.plan-heading{display:flex;justify-content:space-between;align-items:center;gap:var(--space-md);padding:var(--space-md) var(--space-lg);border-top:1px solid var(--line);border-bottom:1px solid var(--line);background:var(--panel)}.edit-tools{display:flex;gap:var(--space-xs);flex-wrap:wrap}.edit-tools button{height:30px;font-size:12px;padding:0 var(--space-sm)}.plan-wrap{height:232px;min-height:200px;position:relative;padding:var(--space-md) var(--space-md) 32px}.plan-wrap svg{display:block;width:100%;height:100%;touch-action:none;user-select:none}.plan-hint{position:absolute;bottom:7px;left:0;right:0;text-align:center;font-size:11px;color:var(--muted);pointer-events:none}.cell{fill:var(--panel);stroke:var(--line);stroke-width:.014}.box{fill:var(--bin-color);fill-opacity:.14;stroke:var(--bin-color);stroke-width:.028}.box.selected{fill-opacity:.3;stroke:var(--selection);stroke-width:.045}.underlay{opacity:.15}.bin{cursor:grab}.bin:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.bin:focus-visible .box{stroke:var(--selection);stroke-width:.06}.bin-name{font-size:.26px;fill:var(--ink);font-family:var(--font)}.bin-size{font-size:.2px;fill:var(--muted);font-family:var(--font)}.resize{fill:var(--selection);cursor:nwse-resize}.ghost{fill:var(--accent);fill-opacity:.15;stroke:var(--accent);stroke-width:.04;stroke-dasharray:.1 .06}.warnings{padding:var(--space-md) var(--space-lg);background:var(--panel);border-top:1px solid var(--line);font-size:12px}.warnings summary{cursor:pointer;color:var(--muted)}.warnings.has-warnings summary{color:var(--warn)}.warnings ul{padding-left:var(--space-xl);line-height:1.6;margin:var(--space-md) 0;color:var(--warn)}.warnings p{color:var(--muted)}.inspector-heading{display:flex;align-items:center;justify-content:space-between;gap:var(--space-sm);min-height:30px;margin-bottom:var(--space-lg)}.inspector-heading button{font-size:12px;padding:0 var(--space-sm);height:30px}.selection-empty{padding:44px var(--space-xs);color:var(--muted)}.selection-empty h3{color:var(--ink);margin:var(--space-xl) 0 var(--space-sm)}.selection-empty p{font-size:13px}.empty-box{width:48px;height:40px;border:2px solid var(--edge);border-radius:5px;border-top:5px solid var(--edge)}#property-fields>label,#property-fields>.pair{margin-bottom:var(--space-md)}#property-fields>h3{border-top:1px solid var(--line);padding-top:var(--space-lg);margin-top:var(--space-lg)}details{min-width:0}summary{cursor:pointer;line-height:1.5}#properties details{margin-top:var(--space-lg);color:var(--muted);font-size:13px}#properties details .pair,#properties details>label{margin-top:var(--space-md)}.export-one{display:flex;gap:var(--space-sm);padding-top:var(--space-lg);border-top:1px solid var(--line)}.export-one button{flex:1;padding:0 var(--space-sm);font-size:13px}.statusbar{display:flex;gap:var(--space-xl);justify-content:space-between;align-items:center;height:32px;padding:0 var(--space-lg);border-top:1px solid var(--line);font-size:12px;background:var(--panel);color:var(--muted)}#status{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#status.error{color:var(--error)}dialog{background:var(--panel);color:var(--ink);border:1px solid var(--edge);border-radius:10px;max-width:640px;width:calc(100% - 32px);max-height:85dvh;padding:var(--space-xl)}dialog::backdrop{background:var(--shadow)}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:var(--space-lg);margin-bottom:var(--space-xl)}.dialog-heading h2{font-size:20px}.dialog-heading button{height:32px}dialog p{margin:var(--space-md) 0;font-size:14px}.dialog-actions{display:flex;flex-wrap:wrap;gap:var(--space-md);margin-top:var(--space-xl)}.project-entry{display:flex;justify-content:space-between;align-items:center;gap:var(--space-md);border-top:1px solid var(--line);padding:var(--space-md) 0}.project-entry span{overflow-wrap:anywhere}.project-entry small{display:block;color:var(--muted);margin-top:var(--space-xs)}#help-dialog{max-width:720px}#export-status{min-height:22px;color:var(--muted)}noscript p{padding:var(--space-xl);color:var(--error)}
@media(min-width:1921px){.workbench{border-left:1px solid var(--line);border-right:1px solid var(--line)}}
@media(max-width:1180px){.tagline{display:none}.workbench{grid-template-columns:200px minmax(0,1fr) 264px}.topbar{padding:0 var(--space-lg)}.topbar nav{gap:var(--space-xs)}.topbar nav button{padding:0 var(--space-sm)}.view-toolbar{gap:var(--space-sm)}.view-toolbar label{font-size:11px}.stage-caption span:last-child{display:none}.plan-heading{align-items:flex-start;flex-direction:column}.project-panel,.inspector{padding:var(--space-lg) var(--space-md)}}
@media(max-width:900px){.workbench{height:auto;min-height:0;grid-template-columns:190px minmax(0,1fr)}.canvas-panel{min-height:750px}.inspector{grid-column:1/-1;border-top:1px solid var(--line);border-left:0;overflow:visible}.inspector form{max-width:720px;margin:auto}.selection-empty{padding:var(--space-sm) 0}.empty-box{display:none}.selection-empty h3{margin:0 0 var(--space-sm)}.statusbar{height:auto;min-height:36px;flex-wrap:wrap;gap:var(--space-xs);padding-block:var(--space-sm)}.topbar nav #save{display:none}}
@media(max-width:600px){.topbar{height:auto;min-height:64px;flex-wrap:wrap;padding:var(--space-md);gap:var(--space-md)}.topbar nav{width:100%;justify-content:flex-start;flex-wrap:wrap;gap:var(--space-xs)}.topbar nav button{font-size:12px;padding:0 var(--space-sm);flex:1 1 auto}.topbar nav #help{display:none}.workbench{display:flex;flex-direction:column}.project-panel{overflow:visible;border-right:0;padding:var(--space-lg)}.project-name{margin-bottom:0}.project-panel .section-title{margin-top:var(--space-lg)}.project-panel>.pair{max-width:300px}.project-panel .presets{display:flex}.project-panel .bin-list{max-height:160px;overflow:auto}.project-foot{margin-top:0;padding-top:var(--space-sm);flex-direction:row;align-items:center;justify-content:space-between}.project-panel #list-empty{padding:0}.canvas-panel{min-height:730px;border-top:1px solid var(--line)}.stage{min-height:340px}.view-toolbar{padding:var(--space-md)}.view-toolbar label{font-size:12px}.plan-heading{padding:var(--space-md)}.plan-wrap{height:255px}.plan-hint{font-size:10px}.inspector{padding:var(--space-xl) var(--space-lg)}.inspector-heading{margin-bottom:var(--space-lg)}.selection-empty{padding-bottom:var(--space-lg)}input,select{font-size:16px}.topbar nav #save{display:block}.statusbar{padding:var(--space-md) var(--space-lg)}.statusbar #status{white-space:normal}.edit-tools{gap:var(--space-xs)}.edit-tools button{font-size:11px}.dialog-heading h2{font-size:18px}dialog{padding:var(--space-xl)}.dialog-heading button{padding:0 var(--space-sm)}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto}}
