:root{--bg:#eceef1;--panel:#fff;--text:#1f2328;--muted:#5f6670;--line:#d8dce1;--hover:#eceef1;--button:#f6f7f9;color:var(--text);font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;font-size:14px}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{background:var(--bg)}.message{padding:24px}.app{flex-direction:column;height:100%;display:flex}.workspace{flex:1;min-height:0;display:flex}button{font:inherit;border:1px solid var(--line);background:var(--button);color:var(--text);cursor:pointer;white-space:nowrap;border-radius:6px;padding:5px 12px}button:hover:not(:disabled){background:var(--hover)}button:disabled{color:var(--muted);cursor:default;opacity:.6}button.open{background:var(--hover)}button.primary{background:var(--text);border-color:var(--text);color:#fff}button.primary:hover:not(:disabled){background:#3a4048}button.icon-button{width:30px;padding:5px 0;font-weight:600}.hint{color:var(--muted);margin:6px 0;font-size:12px;line-height:1.4}.segmented{border:1px solid var(--line);background:var(--button);border-radius:6px;display:flex;overflow:hidden}.segmented button{background:0 0;border:none;border-radius:0;flex:1}.segmented button+button{border-left:1px solid var(--line)}.segmented button.active{background:var(--text);color:#fff}.field{align-items:center;gap:8px;margin:4px 0;display:flex}.field>span:first-child{width:48px;color:var(--muted);flex:none}.field input[type=range]{flex:1;min-width:120px}.field .value{font-variant-numeric:tabular-nums;text-align:right;min-width:48px}.topbar{background:var(--panel);border-bottom:1px solid var(--line);flex:none;align-items:center;gap:10px;height:46px;padding:0 12px;display:flex}.topbar .brand{margin-right:6px;font-weight:600}.topbar .labelled{align-items:center;gap:8px;display:flex}.topbar .label{color:var(--muted);font-size:12px}.topbar-spacer{flex:1}.popover-root{position:relative}.popover{z-index:10;background:var(--panel);border:1px solid var(--line);border-radius:8px;min-width:240px;max-height:calc(100vh - 64px);padding:12px;position:absolute;overflow-y:auto;box-shadow:0 6px 24px #1f232824}.popover-below{top:calc(100% + 6px);left:0}.popover-below.popover-end{left:auto;right:0}.popover-right{top:0;left:calc(100% + 8px)}.popover-body{flex-direction:column;gap:6px;display:flex}.popover-body.wide{width:360px}.popover-body.menu{min-width:200px}.popover-body.menu button{text-align:left;background:0 0;border:none;padding:6px 8px}.popover-body.menu button:hover:not(:disabled){background:var(--hover)}.popover .hint{margin:0}.rail{background:var(--panel);border-right:1px solid var(--line);z-index:5;flex-direction:column;flex:none;align-items:center;gap:4px;width:52px;padding:8px 0;display:flex}.rail-button{background:0 0;border:1px solid #0000;justify-content:center;align-items:center;width:38px;height:38px;padding:0;display:flex}.rail-button.active{background:var(--text);color:#fff}.rail-button.active:hover:not(:disabled){background:#3a4048}.rail-button.brush-size{font-variant-numeric:tabular-nums;flex-direction:column;gap:2px;height:46px;font-size:11px}.brush-dot{background:var(--text);border-radius:50%;flex:none;display:block}.rail-divider{border-top:1px solid var(--line);width:28px;margin:4px 0}.rail-spacer{flex:1;min-height:8px}.rail-swatch-wrap{flex-direction:column;align-items:center;display:flex;position:relative}.rail-swatch{width:28px;height:28px;box-shadow:0 0 0 1px var(--line);border:2px solid #fff;border-radius:50%;margin:2px 0;padding:0}.rail-swatch.active{box-shadow:0 0 0 2px var(--text)}.rail-swatch.base{border-radius:6px}.rail-caption{color:var(--muted);font-size:10px}.hidden-picker{opacity:0;pointer-events:none;border:0;width:28px;height:28px;padding:0;position:absolute;top:0;left:0}.stage{flex:1;min-width:0;display:flex;position:relative}.stage-3d,.stage-pattern{flex:1;min-width:0;position:relative}.stage.layout-pattern .stage-3d{display:none}.stage.layout-split .stage-pattern{border-left:1px solid var(--line)}.overlay{z-index:2;position:absolute}.fit-status{color:var(--muted);font-variant-numeric:tabular-nums;background:#ffffffe6;border-radius:6px;padding:5px 10px;font-size:12px;top:12px;left:12px}.view-buttons{background:var(--panel);top:12px;right:12px}.view-buttons button{padding:4px 10px;font-size:13px}.nav-hint{max-width:calc(100% - 24px);color:var(--muted);pointer-events:none;margin:0;font-size:12px;bottom:6px;left:12px}.legend{background:#ffffffeb;border-radius:6px;margin:0;padding:8px 10px;font-size:12px;list-style:none;top:52px;left:12px}.legend li{align-items:center;gap:8px;padding:2px 0;display:flex}.swatch{border-radius:3px;flex:none;width:12px;height:12px}.stretch-legend{width:240px}.stretch-legend .bar{border-radius:3px;height:10px}.stretch-legend .ticks{height:18px;color:var(--muted);font-size:12px;position:relative}.stretch-legend .ticks span{white-space:nowrap;position:absolute;top:2px;transform:translate(-50%)}.stretch-legend .ticks span:first-child{transform:none}.stretch-legend .ticks span:last-child{transform:translate(-100%)}.pattern-view{position:absolute;inset:0}.pattern-view canvas{touch-action:none;cursor:grab;width:100%;height:100%;display:block}.pattern-view .fit-button{bottom:12px;right:12px}.toast{z-index:20;background:var(--text);color:#fff;border-radius:8px;max-width:min(560px,100% - 32px);padding:8px 14px;font-size:13px;position:fixed;bottom:24px;left:50%;transform:translate(-50%);box-shadow:0 6px 24px #1f232833}.topbar>:not(.topbar-spacer){flex:none}.steps button{padding:5px 8px}.model-name{text-overflow:ellipsis;vertical-align:bottom;max-width:150px;display:inline-block;overflow:hidden}@media (width<=1200px){.topbar.designer .brand,.topbar .label{display:none}}.step-page{max-width:640px;margin:32px auto;padding:0 16px;line-height:1.5}.step-page h2{margin:0 0 8px;font-size:18px}.step-page pre{white-space:pre-wrap;word-break:break-all;background:var(--panel);border:1px solid var(--line);border-radius:6px;padding:8px 10px;font-size:12px}.step-buttons{gap:8px;margin-top:16px;display:flex}.step-page.wide{max-width:900px}.dial-actions{gap:6px;margin:0 0 10px;display:flex}.pattern-list{grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:10px;margin:12px 0 0;padding:0;list-style:none;display:grid}.pattern{text-align:left;white-space:normal;flex-direction:column;gap:6px;width:100%;height:100%;padding:10px 12px;display:flex}.pattern.active{border-color:var(--text);box-shadow:inset 0 0 0 1px var(--text)}.pattern-name{font-weight:600}.pattern-note{color:var(--muted);font-size:12px}.pattern-thumb{width:100%;height:110px}.pattern-thumb path{fill:var(--panel);stroke:var(--muted);stroke-width:1px;vector-effect:non-scaling-stroke}.fit-choice{margin:8px 0 12px;display:inline-flex}.fit-table{border-collapse:collapse;font-variant-numeric:tabular-nums;margin:8px 0 16px;font-size:13px}.fit-table th,.fit-table td{text-align:right;border-bottom:1px solid var(--line);padding:3px 14px 3px 0}.fit-table th:first-child,.fit-table td:first-child{text-align:left}.fit-table th{color:var(--muted);font-weight:600}.fit-overlay{width:100%;max-height:420px;display:block}.fit-overlay path{fill:none;vector-effect:non-scaling-stroke}.fit-overlay .drafted{stroke:var(--muted);stroke-width:1px;stroke-dasharray:4 3}.fit-overlay .fitted{stroke:var(--text);stroke-width:1.4px}.muted{color:var(--muted)}button.link{color:#2f7fd0;background:0 0;border:none;padding:0;font-size:12px}button.link:hover:not(:disabled){background:0 0;text-decoration:underline}.model-screen{flex:1;min-height:0;display:flex}.model-stage{flex:1;min-width:0;position:relative}.model-panel{background:var(--panel);border-left:1px solid var(--line);flex-direction:column;flex:none;gap:10px;width:340px;padding:12px;display:flex;overflow-y:auto}.turntable-buttons{gap:6px;display:flex;top:12px;right:12px}.turntable-buttons button.active{background:var(--text);border-color:var(--text);color:#fff}.tabs{flex:none}.model-current{flex-wrap:wrap;align-items:baseline;gap:8px;display:flex}.preset-list{flex-direction:column;gap:6px;margin:0;padding:0;list-style:none;display:flex}.preset{text-align:left;white-space:normal;flex-direction:column;gap:2px;width:100%;padding:8px 10px;display:flex}.preset.active{border-color:var(--text);box-shadow:inset 0 0 0 1px var(--text)}.preset-name{justify-content:space-between;font-weight:600;display:flex}.preset-height{color:var(--muted);font-variant-numeric:tabular-nums;font-weight:400}.preset-note{color:var(--muted);font-size:12px}.preset-groups{flex-direction:column;gap:14px;display:flex}.preset-groups h3{color:var(--muted);text-transform:uppercase;letter-spacing:.06em;margin:0 0 6px;font-size:12px;font-weight:600}.head-panel{flex-direction:column;gap:14px;display:flex}.head-panel section{flex-direction:column;gap:6px;display:flex}.head-panel h3{color:var(--muted);text-transform:uppercase;letter-spacing:.06em;margin:0;font-size:12px;font-weight:600}.choice-grid{grid-template-columns:repeat(3,1fr);gap:6px;display:grid}.choice-grid button.active{border-color:var(--text);box-shadow:inset 0 0 0 1px var(--text);font-weight:600}.head-panel .field>span:first-child{width:64px}.head-panel .credits{color:var(--muted);font-size:12px}.head-panel .credits ul{margin:6px 0;padding-left:18px}.dials{flex-direction:column;gap:2px;display:flex}.dial{grid-template-columns:104px 1fr auto;align-items:center;column-gap:8px;padding:2px 0;display:grid}.dial input[type=range]{width:100%;min-width:0}.dial-name{font-size:13px}.dial .cm{color:var(--muted);align-items:center;gap:4px;font-size:12px;display:flex}.dial .cm input{width:58px;font:inherit;color:var(--text);border:1px solid var(--line);text-align:right;font-variant-numeric:tabular-nums;appearance:textfield;border-radius:4px;padding:2px 4px;font-size:13px}.dial .cm input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.dial .cm input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.dials details{border-top:1px solid var(--line);padding:4px 0}.dials summary{cursor:pointer;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);padding:4px 0;font-size:12px;font-weight:600}.tape-readout{background:#ffffffeb;border-radius:6px;width:230px;max-height:calc(100% - 24px);padding:8px 10px;transition:opacity .15s;top:12px;left:12px;overflow-y:auto}.tape-readout h3{text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin:0 0 6px;font-size:12px}.tape-readout.stale{opacity:.6}.tape-readout tr{cursor:pointer}.tape-readout tr:hover td{background:var(--hover)}.tape-readout tr.active td,.dial.active .dial-name{color:#d6336c;font-weight:600}.fit-table,.keys{border-collapse:collapse;width:100%;font-size:12px}.fit-table{font-variant-numeric:tabular-nums}.fit-table th{text-align:left;color:var(--muted);font-weight:500}.fit-table th,.fit-table td{border-bottom:1px solid var(--line);padding:2px 4px}.fit-table td:not(:first-child),.fit-table th:not(:first-child){text-align:right}.keys th{text-align:left;color:var(--muted);padding:8px 0 2px;font-weight:600}.keys tr:first-child th{padding-top:0}.keys td{vertical-align:top;padding:2px 0}.keys td:first-child{color:var(--muted);padding-right:12px}@media (width<=900px){.topbar{overflow-x:auto}.topbar .label{display:none}}@media (width<=700px){.model-screen{flex-direction:column}.model-panel{border-left:none;border-top:1px solid var(--line);width:auto;height:45%}.tape-readout{width:180px;max-height:calc(100% - 60px)}.stage{flex-direction:column}.stage.layout-split .stage-pattern{border-left:none;border-top:1px solid var(--line)}.nav-hint{display:none}}.brush-dot.tapered{border-radius:50% 0 50% 50%;transform:rotate(-45deg)}.brush-dot.smoothing{box-sizing:border-box;background:0 0;border:2px dashed #2f7fd0}.check{cursor:pointer;align-items:center;gap:8px;margin:8px 0 0;display:flex}.export-panel h3{text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin:4px 0 0;font-size:12px}.export-panel .field>span:first-child{width:110px}.export-panel input[type=number]{width:70px;font:inherit;border:1px solid var(--line);border-radius:4px;padding:3px 6px}.export-panel .unit{color:var(--muted)}.export-panel .warn{color:#a15c00}.sheet-list{margin:6px 0 0;padding:0;list-style:none}.sheet-list li{border-bottom:1px solid var(--line);align-items:center;gap:6px;padding:3px 0;display:flex}.sheet-list .sheet-name{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.sheet-list .sheet-size{color:var(--muted);font-variant-numeric:tabular-nums;font-size:12px}.sheet-list button{padding:2px 8px;font-size:12px}.sheet-list .sheet-note{color:var(--muted);text-align:center;width:64px;font-size:12px}.check-title{margin:6px 0 0;font-size:13px;font-weight:600}.issue-list{max-height:180px;margin:4px 0 0;padding-left:20px;font-size:12px;overflow-y:auto}.issue-list li{margin:2px 0}
