:root{font-family:system-ui,-apple-system,Segoe UI,sans-serif;color:#26332e;background:#f4f2ec}*{box-sizing:border-box}body{margin:0}header{background:#173d35;color:#fff;padding:18px clamp(16px,3vw,36px)}header h1{margin:0;font-size:1.5rem}header p{margin:4px 0 0;color:#d5e7dd;font-size:.9rem}.layout{display:grid;grid-template-columns:230px minmax(0,1fr);gap:18px;padding:18px;max-width:1500px;margin:auto}.panel{background:white;border:1px solid #dddcd4;border-radius:12px;padding:16px;box-shadow:0 2px 8px #00000008}h2{font-size:1rem;margin:0 0 12px}.palette{display:grid;gap:9px;align-content:start;}.palette-scroll-hint{color:#64726a;font-size:13px;padding:8px 0 2px;text-align:center;}.part{background:#faf8f2;border:1px solid #d8d4c9;border-radius:9px;display:flex;align-items:center;gap:12px;padding:8px;text-align:left;cursor:grab;touch-action:none;color:inherit;font:inherit}.part:hover{border-color:#4c8c72;background:#f2f8f3}.part svg{width:78px;height:56px;flex-shrink:0}.part span{font-size:.9rem;font-weight:600}.hint{font-size:.8rem;line-height:1.5;color:#68726d;margin:12px 0 0}.main{min-width:0}.toolbar{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:12px}button.action{border:1px solid #c9d2c9;border-radius:8px;background:#fff;color:#233b30;padding:9px 12px;cursor:pointer;font:inherit;font-size:.86rem}button.action:hover:not(:disabled){background:#e9f3ec}button.action:disabled{opacity:.4;cursor:not-allowed}button.primary{background:#245c45;color:white;border-color:#245c45}button.primary:hover{background:#1c4937}.workspace{width:100%;height:clamp(250px,calc(100dvh - 375px),900px);min-height:250px;border:1px solid #cbd0c8;border-radius:10px;background:#fdfcf8;display:block;touch-action:none;cursor:crosshair}.track{cursor:grab}.track.dragging{cursor:grabbing}.track.selected .outline{stroke:#35886c;stroke-width:3}.track .wood{stroke:#d7b884;stroke-width:37;fill:none;stroke-linecap:butt}.track .outline{stroke:#8a6840;stroke-width:39;fill:none;stroke-linecap:butt}.track .groove{stroke:#a17c4d;stroke-width:1.8;fill:none;stroke-dasharray:3 7}.track .rail{stroke:#f0dcaf;stroke-width:2;fill:none}.track .joint{fill:#6e8e6c;stroke:#fff;stroke-width:1.3}.track.selected .joint{fill:#2b9e72}.track .hit{stroke:transparent;stroke-width:48;fill:none;pointer-events:stroke}.status{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;font-size:.83rem;color:#64726a;margin-top:10px}.settings{margin-top:16px;font-size:.88rem}.settings label{display:flex;align-items:center;gap:8px;margin:8px 0}.settings input[type=range]{width:100%}kbd{background:#e9ede7;border:1px solid #cbd2c9;padding:1px 4px;border-radius:4px}@media(max-width:750px){.layout{grid-template-columns:1fr;padding:10px;gap:10px}.palette{grid-template-columns:repeat(3,minmax(0,1fr))}.palette-scroll-hint {display:none;}.part{flex-direction:column;gap:2px;padding:5px}.part svg{width:100%;height:40px}.part span{font-size:.75rem}.workspace{height:57vh;min-height:340px}.panel{padding:12px}}

/* v0.2.2: purely decorative SVG woodwork; geometry and hit testing unchanged. */
.track .outline{stroke:#8d6b45;stroke-width:40;fill:none;stroke-linecap:butt}
.track.selected .outline{stroke:#398b70;stroke-width:42}
.track .wood{stroke:#dfbd87;stroke-width:38;fill:none;stroke-linecap:butt}
.track .wood-light{stroke:#f0d6a6;stroke-width:34;fill:none;stroke-linecap:butt;opacity:.55}
.track .grain{stroke:#987044;stroke-width:.65;fill:none;stroke-linecap:round;opacity:.21;pointer-events:none}
.track .grain-light{stroke:#fff0cd;stroke-width:.8;fill:none;stroke-linecap:round;opacity:.48;pointer-events:none}
.track .groove-shadow{stroke:#85613d;stroke-width:6.4;fill:none;stroke-linejoin:round;stroke-linecap:butt;opacity:.85;pointer-events:none}
.track .groove-bed{stroke:#b18754;stroke-width:4.25;fill:none;stroke-linejoin:round;stroke-linecap:butt;pointer-events:none}
.track .groove-highlight{stroke:#f5d9a5;stroke-width:.95;fill:none;stroke-linejoin:round;stroke-linecap:butt;opacity:.9;pointer-events:none}
.track .groove-soft-shadow{stroke:#997348;stroke-width:9;fill:none;stroke-linejoin:round;stroke-linecap:butt;opacity:.24;pointer-events:none}
.track .hit{stroke:transparent;stroke-width:48;fill:none;pointer-events:stroke}
.track .unified-outline{fill:none;pointer-events:none;stroke:#8d6b45;stroke-width:2;}

/* Manufacturer selector */
#manufacturer { background-color: #fff; border: 1px solid #cbd5cd; border-radius: 7px; box-sizing: border-box; color: #263d34; cursor: pointer; display: block; font: inherit; font-size: 14px; margin: 8px 0 12px; padding: 10px 34px 10px 12px; transition: border-color .15s, box-shadow .15s; width: 100%; }
#manufacturer:hover { border-color: #71988a; }
#manufacturer:focus-visible { border-color: #245b49; box-shadow: 0 0 0 3px rgba(36, 91, 73, .15); outline: none; }

/* Manifest */
.manifest-heading { align-items:center; display:flex; justify-content:space-between; margin-bottom:12px; }
.manifest-heading h2 { margin:0; }
.manifest-close { background:none; border:0; color:#64726a; cursor:pointer; font-size:26px; line-height:1; padding:4px 8px; }
.manifest-close:hover { color:#26332e; }

/* Builder footer */
.builder-footer { border-top:1px solid #e5e7e2; color:#64716b; font-size:13px; margin-top:12px; padding:12px 0 0; text-align:center; }
.builder-footer a { color: #245d49; text-decoration: none; }
.builder-footer a:hover { text-decoration: underline; }
.builder-footer span { color: #a5ada7; margin: 0 12px; }

/* Scrollable track palette — exact equal-height panels */
@media (min-width:751px) {
	.layout { align-items:stretch; }
	.layout > .panel:not(.main) { contain:size; display:grid; grid-template-rows:auto auto minmax(0,1fr) auto auto auto; min-height:0; overflow:hidden; }
	.layout > .panel:not(.main) .palette { min-height:0; overflow-y:auto; overscroll-behavior:contain; }
}

/* Narrow desktop windows with wrapping toolbar */
@media (min-width:1001px) and (max-width:1500px) {
	.workspace { height:clamp(250px,calc(100dvh - 430px),900px); }
}

/* Very narrow desktop windows with extra toolbar wrapping */
@media (min-width:751px) and (max-width:1000px) {
	.workspace { height:clamp(250px,calc(100dvh - 485px),900px); }
}
