[hidden]{display:none!important}
.linked-layout-note{display:none;line-height:1.9;color:#73796b;font-size:14px;grid-column:1/-1}body[data-mode="import"] .linked-layout-note{display:block}
:root{color-scheme:light;--ink:#34362f;--muted:#82847a;--line:#dedfd6;--paper:#f9f9f3;--canvas:#eeeee6;--olive:#596047}
*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,'Hiragino Kaku Gothic ProN','Noto Sans JP',sans-serif;font-size:12px}button,input,select{font:inherit;color:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible{outline:2px solid var(--olive);outline-offset:4px}.topbar{height:66px;border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 29px;gap:56px}.wordmark{font-size:33px;font-weight:650;letter-spacing:-2px;line-height:1}.wordmark span{font-size:10px;letter-spacing:0;vertical-align:top;display:inline-block;padding-top:4px}.title{font-size:11px;letter-spacing:2.4px}.title i{font-style:normal;color:var(--muted);margin-left:12px}.editor-link{margin-left:auto;font-size:11px;color:#676c5c}main{height:calc(100dvh - 66px);display:grid;grid-template-columns:296px minmax(0,1fr)}.sidebar{padding:31px 27px 24px;overflow-y:auto;border-right:1px solid var(--line);scrollbar-width:thin}.eyebrow{font-size:10px;letter-spacing:1.6px;color:var(--muted)}h1{font-size:23px;font-weight:500;line-height:1.75;letter-spacing:1px;margin:12px 0 14px}.intro p{font-size:11px;color:var(--muted);line-height:1.9;margin:0 0 28px}.family-tabs{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;background:#eeeee5;border-radius:5px}.family-tabs button{border:0;background:none;font-size:11px;padding:11px 2px;border-radius:3px}.family-tabs .selected{background:#fff;box-shadow:0 1px 4px #00000009}.control-section{border-bottom:1px solid var(--line);padding:22px 0}.section-label{display:flex;gap:13px;align-items:center;margin-bottom:17px}.section-label span{font-size:9px;color:var(--muted);font-variant-numeric:tabular-nums}.section-label h2{margin:0;font-size:11px;font-weight:500;letter-spacing:1.5px}.finishes{display:flex;gap:12px;flex-wrap:wrap}.swatch{width:30px;height:30px;border:1px solid #00000012;border-radius:50%;background-size:cover;position:relative}.swatch.selected:after{content:'';position:absolute;inset:-5px;border:1px solid var(--olive);border-radius:50%}.caption{font-size:10px;line-height:1.8;margin:15px 0 0;color:var(--muted)}label{display:flex;align-items:center;justify-content:space-between;font-size:11px;margin:12px 0;gap:16px}select{width:147px;background:transparent;border:0;border-bottom:1px solid var(--line);padding:6px 1px;border-radius:0;font-size:11px}input[type=checkbox]{accent-color:var(--olive)}.checkline{justify-content:flex-start;gap:8px;font-size:10px}.checkline input{margin:0}.levels{display:flex;flex-direction:column;gap:4px}.level{display:flex;align-items:center;justify-content:space-between;background:transparent;border:0;padding:5px 0;font-size:9px;color:#9b9e90}.level i{width:70%;height:3px;background:#dcdfd1;border-radius:3px}.level.selected{color:var(--olive)}.level.selected i{height:4px;background:#7a8265}.level:disabled{cursor:default}.range-label{display:block;line-height:2}.range-label output{float:right;color:var(--muted);font-size:10px}.range-label input{display:block;width:100%;accent-color:var(--olive);height:3px;margin:15px 0}.sidebar-note{font-size:9px;color:#939789;line-height:1.8;margin-top:24px}.workspace{position:relative;min-width:0;overflow:hidden;background:var(--canvas)}#viewport{position:absolute;inset:0}#viewport canvas{display:block;width:100%;height:100%;touch-action:none}.scene-heading{position:absolute;top:32px;left:37px;right:31px;display:flex;align-items:flex-start;justify-content:space-between;z-index:2;pointer-events:none}.scene-heading h2{font-size:16px;letter-spacing:1px;font-weight:450;margin:10px 0}.quiet-button{pointer-events:auto;border:1px solid #bfc3b2;background:#f9f9f380;color:#656d55;padding:9px 12px;border-radius:4px;font-size:10px;backdrop-filter:blur(8px)}.view-controls{position:absolute;bottom:108px;left:50%;transform:translateX(-50%);display:flex;background:#ffffffc9;border:1px solid #dfdfd4;border-radius:7px;padding:4px;backdrop-filter:blur(10px)}.view-controls button{border:0;background:none;padding:9px 15px;font-size:10px;white-space:nowrap;border-radius:4px;color:#8b8f7f}.view-controls .selected{background:#e3e5d9;color:#424c33}.scene-bottom{position:absolute;left:35px;right:30px;bottom:23px;display:flex;align-items:flex-end;gap:20px;pointer-events:none}.measurement span{font-size:22px;font-weight:350;letter-spacing:.8px;font-variant-numeric:tabular-nums;white-space:nowrap}.measurement small{font-size:9px;display:block;color:var(--muted);margin-top:8px;letter-spacing:1px}.gesture{font-size:9px;color:var(--muted);margin:auto auto 0;white-space:nowrap}.export-actions{display:flex;gap:6px;pointer-events:auto}.export-actions button{border:1px solid #cfd3c3;background:#f4f5ebc4;font-size:10px;padding:9px 10px;border-radius:4px}#loader{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background:var(--canvas);z-index:4;font-size:11px;color:var(--muted);letter-spacing:1px}.loading-line{width:80px;height:2px;background:#adb69a;animation:pulse 1.1s infinite alternate}@keyframes pulse{to{opacity:.25;transform:scaleX(.3)}}#sceneError{position:absolute;inset:30%;z-index:5;line-height:1.8;padding:25px;background:#fff;border:1px solid var(--line)}#notice{position:absolute;left:50%;bottom:165px;transform:translateX(-50%);max-width:85%;background:#414833e8;color:#fff;line-height:1.7;border-radius:5px;padding:0;font-size:11px;pointer-events:none;opacity:0;transition:opacity .2s}#notice.show{opacity:1;padding:11px 17px}.dimension-label{font:10px ui-monospace,monospace;color:#777e6c;padding:3px 7px;background:#f8f9f0d9;border:1px solid #e1e5d4;border-radius:3px;white-space:nowrap}
@media(min-width:1600px){main{grid-template-columns:330px 1fr}.sidebar{padding-left:36px;padding-right:36px}.intro{margin-bottom:8px}}
@media(max-width:1000px){main{grid-template-columns:245px minmax(0,1fr)}.sidebar{padding:24px 20px}.gesture{display:none}.measurement span{font-size:17px}.scene-bottom{left:23px;right:20px;flex-wrap:wrap}.scene-heading{left:24px;right:23px}.export-actions{margin-left:auto}.export-actions button{font-size:9px;padding:8px}.title{letter-spacing:1px}.topbar{gap:26px}}
@media(max-width:650px){.topbar{height:54px;padding:0 16px;gap:23px}.wordmark{font-size:27px}.title{font-size:9px}.editor-link{font-size:9px}main{height:auto;display:flex;flex-direction:column-reverse}.workspace{height:65dvh;min-height:420px}.sidebar{overflow:visible;border-right:0;padding:22px;display:grid;grid-template-columns:1fr 1fr;gap:0 23px}.intro{display:none}.family-tabs{grid-column:1/-1}.sidebar .control-section{padding:18px 0}.sidebar-note{grid-column:1/-1}.scene-heading{top:20px;left:20px;right:15px}.scene-heading h2{font-size:13px}.quiet-button{font-size:9px;padding:7px}.scene-bottom{bottom:16px;left:20px;right:15px;gap:10px}.measurement span{font-size:16px}.measurement small{font-size:8px}.view-controls{bottom:83px}.view-controls button{padding:7px 13px}.export-actions button{font-size:8px;padding:7px}.export-actions #importConfig{display:none}select{width:105px}label{gap:5px}.finishes{gap:10px}.swatch{width:25px;height:25px}.levels{gap:1px}.level i{width:60%}}

/* v0.2: touch-first random exploration on the existing studio surface. */
body{font-size:14px}button:disabled{opacity:.42;cursor:default}
.intro p,.caption,.sidebar-note,.linked-layout-note,.measurement small{font-size:12px}
label,select,.checkline,.family-tabs button,.section-label h2,.export-actions button,.view-controls button,.editor-link{font-size:14px}
.level{font-size:12px;min-height:32px}.swatch{width:34px;height:34px}
.explore-settings,.explorer-panel{padding:20px 0;border-bottom:1px solid var(--line)}
.explore-settings h2,.explorer-panel h2{font-size:14px;font-weight:500;margin:0 0 18px}
.explore-settings input{width:110px;padding:8px;border:1px solid var(--line);background:transparent;border-radius:4px}
.explorer-panel{display:block}
.stack-label{display:block;line-height:1.7}.stack-label select{display:block;width:100%;margin-top:5px;min-height:44px;text-overflow:ellipsis}
.panel-button,.selection-tools button{width:100%;padding:10px 8px;min-height:44px;border:1px solid var(--line);background:transparent;border-radius:5px;margin:3px 0;font-size:14px}
.selection-tools{border-top:1px solid var(--line);padding-top:14px;margin-top:20px}.selection-tools p{font-size:13px;line-height:1.7}
.nudge{display:grid;grid-template-columns:repeat(4,1fr);gap:5px}.nudge button{font-size:20px}
.random-toolbar{position:absolute;z-index:3;left:35px;right:30px;top:100px;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.random-toolbar button{border:1px solid #bdc3ae;background:#f9f9f3e8;border-radius:6px;padding:11px 15px;min-height:46px;font-size:14px;backdrop-filter:blur(10px)}
.random-toolbar .primary-action{background:#596047;color:#fff;border-color:#596047}
#sceneItems{font-size:12px;color:#737968;white-space:nowrap}body:not([data-mode="explore"]) #sceneItems{display:none}
.view-controls button{min-height:44px;padding:8px 12px}.export-actions button{min-height:40px}
.scene-bottom{flex-wrap:wrap}.measurement small{letter-spacing:0;max-width:270px;line-height:1.5}
.gesture{font-size:12px}.sidebar-note{line-height:1.9}.sidebar-note a{text-decoration:underline}
#notice{font-size:14px;bottom:180px}#sceneError{inset:25% 12%;font-size:16px}
@media(max-width:1000px){.random-toolbar{left:23px;right:20px}.random-toolbar button{font-size:13px;padding:10px}.scene-bottom{gap:10px}.export-actions{margin-left:0}.export-actions button{font-size:12px}}
@media(max-width:650px){
  .topbar{gap:12px}.title{letter-spacing:.5px;font-size:10px}.editor-link{font-size:12px}
  .workspace{height:calc(88dvh - 54px);min-height:520px}.scene-heading{top:16px}.scene-heading h2{font-size:14px}
  .random-toolbar{top:83px;left:16px;right:16px;display:grid;grid-template-columns:1fr auto;gap:6px}
  .random-toolbar .primary-action{grid-column:1/-1}.random-toolbar button{min-height:44px;font-size:14px}
  #sceneItems{grid-column:1/-1;font-size:12px;text-align:center}
  .view-controls{bottom:118px;max-width:calc(100% - 20px)}.view-controls button{padding:8px 11px;font-size:14px}
  .scene-bottom{bottom:12px;left:16px;right:16px;display:block}.measurement span{font-size:17px}.measurement small{font-size:12px;margin-top:3px;max-width:none}
  .export-actions{margin-top:9px;display:grid;grid-template-columns:repeat(3,1fr)}.export-actions button{min-height:40px;font-size:12px}.export-actions #importConfig{display:block}
  .sidebar{padding:20px 16px;gap:0 16px}.explore-settings,.explorer-panel{grid-column:1/-1}.explore-settings label{margin:10px 0}
  select,input[type=number]{font-size:16px;min-height:44px}.swatch{width:34px;height:34px}.finishes{gap:12px}
  .family-tabs button{min-height:46px;font-size:14px}.caption{line-height:1.8}.quiet-button{min-height:38px;font-size:12px}
  #notice{bottom:178px;max-width:94%;width:max-content;font-size:13px}
}

/* v0.3: one persistent layout, with an inspector for the selected shelf. */
main{grid-template-columns:340px minmax(0,1fr)}
.sidebar{padding:22px 24px}.intro h1{font-size:22px;margin:7px 0}.intro p{margin-bottom:18px;font-size:14px;line-height:1.7}
#shelfEditor{border:0;margin:0;padding:20px 0 0;min-width:0}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.shelf-context{padding-bottom:16px}.shelf-context label{margin-top:0}.shelf-context select{background:#fff;padding:8px;border:1px solid var(--line);border-radius:5px}
.shelf-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.shelf-actions button{border:1px solid var(--line);border-radius:5px;background:transparent;min-height:44px;font-size:14px}
.editor-tabs{position:sticky;top:-22px;z-index:4;display:grid;grid-template-columns:repeat(3,1fr);background:var(--paper);padding:8px 0;border-bottom:1px solid var(--line)}
.editor-tabs button{border:0;border-radius:5px;background:transparent;min-height:44px;font-size:14px}.editor-tabs .selected{background:var(--olive);color:white}
select,input[type=number]{font-size:16px;min-height:44px}label,.caption,.sidebar-note,.section-label h2,.checkline{font-size:14px}.caption,.sidebar-note{color:#6e7366}
.family-tabs button,.level,.swatch{min-height:44px}.swatch{width:44px;height:44px}.level{font-size:14px}.level i{width:60%}
.control-section{padding:18px 0}.section-label{margin-bottom:12px}.family-tabs button{font-size:14px}.selection-tools{margin-top:16px}
#overflowTray{background:#f3ead4;border:1px solid #d9c99c;padding:12px;border-radius:6px;font-size:14px;line-height:1.7;margin-top:16px}#overflowTray p{margin:0}#overflowItems{margin:8px 0 0;padding-left:20px;max-height:170px;overflow:auto}
.sidebar-note{font-size:12px}summary{cursor:pointer;min-height:44px;line-height:44px}.scene-heading{top:24px}.random-toolbar{top:96px}.quiet-button{min-height:44px;font-size:14px}
@media(max-width:1100px) and (min-width:651px){main{grid-template-columns:310px minmax(0,1fr)}.sidebar{padding:20px}.random-toolbar{top:115px}.scene-heading{gap:10px}.scene-heading h2{font-size:14px}.quiet-button{max-width:110px}.measurement small{font-size:12px}}
@media(max-width:650px){
  main{height:calc(100dvh - 54px);display:flex;flex-direction:column-reverse;overflow:hidden}
  .workspace{flex:0 0 56%;height:auto;min-height:340px;border-bottom:1px solid var(--line)}
  .sidebar{flex:1;min-height:0;overflow-y:auto;display:block;padding:16px 18px;overscroll-behavior:contain;padding-bottom:max(24px,env(safe-area-inset-bottom))}
  .intro{display:none}.editor-tabs{top:-16px}.shelf-context{padding-bottom:8px}.shelf-context .stack-label{margin-bottom:6px}
  .scene-heading{top:10px;left:14px;right:14px;align-items:center}.scene-heading .eyebrow{display:none}.scene-heading h2{margin:4px 0;font-size:14px}.quiet-button{font-size:12px;padding:6px;min-height:38px}
  .random-toolbar{top:56px;left:10px;right:10px;display:grid;grid-template-columns:1.6fr 1fr auto;gap:4px}.random-toolbar .primary-action{grid-column:auto}.random-toolbar button{font-size:12px;padding:6px;white-space:nowrap}#sceneItems{grid-column:1/-1;font-size:12px}
  .view-controls{bottom:67px}.view-controls button{font-size:14px;padding:8px 12px}
  .scene-bottom{left:12px;right:12px;bottom:8px;display:flex;align-items:center;gap:4px}.measurement{flex:1}.measurement span{font-size:13px;letter-spacing:0}.measurement small{font-size:10px;line-height:1.2;max-width:160px;margin-top:2px}
  .export-actions{display:flex;margin:0;gap:3px}.export-actions button{font-size:12px;min-height:44px;padding:4px 6px}.export-actions #savePng{display:none}
  select{width:170px}.stack-label select{width:100%}.family-tabs button{font-size:14px}.finishes{gap:12px}.swatch{width:44px;height:44px}.level{min-height:44px}.sidebar .control-section{padding:16px 0}
  #notice{bottom:120px;font-size:13px;z-index:6}.sidebar-note{margin-bottom:0}.gesture{display:none}
}
@media(max-height:560px) and (max-width:650px){main{height:auto;overflow:visible}.workspace{height:420px;flex-basis:auto}.sidebar{overflow:visible}.editor-tabs{top:0}}

/* Direct manipulation controls are projected onto the actual model, not a
   second schematic. Only their buttons intercept the orbit/pan surface. */
#boardOverlay{position:absolute;inset:0;pointer-events:none;z-index:2;overflow:hidden;touch-action:none}
body[data-board-selected=true] .selection-tools{display:none}
#boardOverlay button{position:absolute;left:0;top:0;pointer-events:auto;touch-action:none;user-select:none;min-width:44px;min-height:44px;border:1px solid #929c82;background:#f9f9f3ee;border-radius:50%;color:#424d31;font-size:20px;box-shadow:0 2px 8px #2222}
#boardOverlay .board-handle{cursor:ns-resize;width:44px;font-size:19px;background:#f9f9f3d9}
#boardOverlay .board-handle::after{content:'';position:absolute;left:100%;top:50%;width:var(--stem,0px);height:1px;background:#929c82;pointer-events:none}
#boardOverlay .board-add{border-style:dashed;background:#fafbf3e8}
#boardOverlay .board-add:hover,#boardOverlay .board-handle:hover,#boardOverlay .selected{background:#596047;color:white;border-color:#596047}
#boardOverlay .frame-height-handle{font-size:14px;white-space:nowrap;border-radius:6px;padding:7px 12px;margin-top:-32px;cursor:ns-resize}
.board-guide{position:absolute;left:0;top:0;height:0;border-top:2px solid #79856160;transform-origin:0 0;pointer-events:none}
.board-guide.candidate{border-top:1px dashed #68764a75}.board-guide.selected{border-top:3px solid #596047}.board-guide.height-preview{border-top:3px dashed #596047}
#boardOverlay.dragging .candidate,#boardOverlay.dragging .board-add{visibility:hidden}
#boardOverlay.dragging .board-handle{pointer-events:none;opacity:.3}
#boardOverlay.blocked .height-preview{border-color:#b74b33}
.direct-toolbar{position:absolute;top:90px;left:35px;right:30px;z-index:3;display:flex;align-items:center;gap:12px;pointer-events:none}
.direct-toolbar button{pointer-events:auto;min-height:44px;padding:8px 14px;font-size:14px;background:#f9f9f3ee;border:1px solid #bdc3ae;border-radius:6px}
.direct-toolbar button[aria-pressed=true]{background:#596047;color:white;border-color:#596047}.direct-toolbar span{font-size:14px;color:#626c50}.direct-toolbar #undoLayout{margin-left:auto}
.direct-toolbar #boardColumnLabel{pointer-events:auto;margin:0}.direct-toolbar #boardColumn{width:90px;max-width:90px;min-height:44px;background:#fafbf5;border:1px solid #bdc3ae;border-radius:6px;padding:6px;font-size:14px}
body:not([data-mode=explore]) .direct-toolbar{display:none}
body:not([data-editor=random]) .random-toolbar{display:none}.random-toolbar{top:145px}
#boardSelection{position:absolute;z-index:4;bottom:165px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:5px;padding:6px 8px;background:#fafbf5f5;border:1px solid #9ca68a;border-radius:8px;box-shadow:0 3px 14px #2222;max-width:calc(100% - 20px);white-space:nowrap}
#boardSelection span{font-size:14px;margin:0 7px}#boardSelection button{min-width:44px;min-height:44px;border:1px solid #cdd2c2;background:#fff;border-radius:5px;font-size:16px}#boardSelection #boardRemove{font-size:14px;padding:0 10px;color:#8b4536}
#boardDragStatus{position:absolute;z-index:5;left:50%;top:145px;transform:translateX(-50%);border-radius:5px;background:#414833ed;color:white;font-size:14px;max-width:90%;pointer-events:none;text-align:center}#boardDragStatus:not(:empty){padding:9px 14px}
@media(max-width:650px){
  .workspace{flex-basis:72%;min-height:480px}.direct-toolbar{top:54px;left:10px;right:10px;gap:6px}.direct-toolbar span{display:none}.direct-toolbar button{padding:7px 10px}.random-toolbar{top:105px;grid-template-columns:1fr 1fr}
  #boardSelection{bottom:120px;flex-wrap:wrap;justify-content:center;width:max-content;max-width:calc(100% - 16px)}#boardSelection span{flex-basis:100%;text-align:center;font-size:14px}
  #boardDragStatus{top:106px}#boardOverlay .frame-height-handle{font-size:14px}
}
