.stitch-workbench{display:grid;grid-template-columns:minmax(226px,.34fr) minmax(0,1fr);background:var(--surface);border:1px solid var(--border);border-radius:12px;overflow:hidden;box-shadow:0 20px 45px color-mix(in srgb,var(--ink),transparent 91%)}.stitch-controls,.stitch-main{min-width:0;padding:clamp(16px,2.5vw,28px)}.stitch-controls{background:color-mix(in srgb,var(--paper),var(--accent) 21%);border-right:1px solid var(--border)}.stitch-workbench h2{font:700 1.42rem/1.22 var(--head);letter-spacing:-.025em;margin:0}.stitch-file{display:grid;gap:.33rem;border:1px dashed var(--muted);border-radius:8px;margin:.85rem 0 .45rem;background:var(--surface);padding:.68rem .74rem;color:var(--ink)}.stitch-file>span{font-weight:700}.stitch-file input{min-width:0;width:100%;font-size:.8rem}.stitch-file input::file-selector-button{background:var(--white);color:var(--ink);padding:.35rem .43rem;border:1px solid var(--border);border-radius:4px;margin-right:.35rem;cursor:pointer}.stitch-file small,.stitch-hint,.stitch-summary{font-size:.82rem;color:var(--muted);margin:0}.stitch-source{display:flex;gap:.4rem;justify-content:space-between;align-items:center;line-height:1.25;margin-bottom:.85rem}.stitch-source>span{font-size:.82rem;font-weight:650;overflow-wrap:anywhere}.stitch-link{padding:.38rem 0;border:0;background:transparent;color:var(--action);font-weight:700;white-space:nowrap;text-decoration:underline;text-decoration-thickness:.08em;text-underline-offset:.15em;font-size:.81rem}.stitch-field{display:grid;grid-template-columns:minmax(0,1fr) minmax(62px,.48fr);align-items:center;gap:.75rem;margin:.45rem 0;font-size:.89rem;font-weight:650}.stitch-workbench select{min-width:0;font-weight:650;border:1px solid var(--border);border-radius:5px;background:var(--white);color:var(--ink);padding:.37rem .36rem;min-height:39px}.stitch-state{font-size:.81rem;color:var(--action);padding-top:.58rem;border-top:1px solid var(--border);margin:.72rem 0 0}.stitch-state.error{color:var(--rust)}
.stitch-tabs,.stitch-view,.stitch-actions{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}.stitch-tabs{justify-content:space-between;margin-bottom:.68rem}.stitch-view select{font-size:.81rem}.stitch-summary{line-height:1.4;margin-top:.24rem}.stitch-chart-scroll{overflow:auto;display:grid;place-items:center;min-height:110px;max-height:min(540px,58vh);padding:10px;background:var(--paper);border:1px solid var(--border);border-radius:8px;overscroll-behavior:contain}.stitch-chart-scroll.wide{display:block;max-height:min(560px,68vh)}.stitch-chart-scroll canvas{display:block;width:auto;max-width:100%;height:auto;max-height:min(450px,calc(58vh - 22px));object-fit:contain;background:var(--white);box-shadow:0 0 0 1px var(--border)}.stitch-chart-scroll.wide canvas{max-width:none;max-height:none}.stitch-actions{margin:.82rem 0 .25rem}.stitch-button{border:1px solid var(--border);border-radius:6px;background:var(--white);color:var(--ink);padding:.53rem .74rem;min-height:41px;font-weight:720;font-size:.81rem;line-height:1.25}.stitch-button.primary{background:var(--action);color:var(--white);border-color:var(--action)}.stitch-button:disabled{opacity:.55}.stitch-button:hover:not(:disabled),.stitch-button[aria-pressed=true]{box-shadow:0 0 0 2px var(--accent)}.stitch-palette{border-top:1px solid var(--border);padding-top:.8rem;margin-top:.9rem}.stitch-palette h2{font-size:1.2rem}.stitch-key-grid{margin:.62rem 0 0;padding:0;list-style:none;display:grid;grid-template-columns:repeat(auto-fit,minmax(119px,1fr));gap:5px}.stitch-key-item{display:flex;align-items:center;gap:.47rem;padding:.37rem .42rem;border:1px solid var(--border);border-radius:5px;min-width:0;font-size:.75rem}.stitch-key-symbol{min-width:2rem;width:2rem;min-height:1.7rem;display:grid;place-items:center;font:700 1rem/1 ui-monospace,monospace;border:1px solid var(--border);border-radius:3px}.stitch-key-name{display:block;font-weight:700;line-height:1.15}.stitch-key-detail{display:block;line-height:1.2;margin-top:.17rem;color:var(--muted);font-size:.68rem}.visually-hidden{position:absolute;overflow:hidden;clip-path:inset(50%);width:1px;height:1px;padding:0;margin:-1px;white-space:nowrap}
.stitch-printed{display:none}@media(max-width:760px){.stitch-workbench{grid-template-columns:1fr}.stitch-controls{border-right:0;border-bottom:1px solid var(--border)}.stitch-field{grid-template-columns:minmax(0,1fr) minmax(70px,.4fr)}.stitch-controls,.stitch-main{padding:15px}.stitch-tabs{align-items:start}.stitch-tabs .stitch-view{margin-top:.22rem}.stitch-chart-scroll{max-height:47vh}.stitch-chart-scroll canvas{max-height:min(420px,calc(47vh - 22px))}.stitch-actions .stitch-button{flex:1 1 auto}.stitch-key-grid{grid-template-columns:repeat(auto-fit,minmax(108px,1fr))}}
@media print{@page{size:auto;margin:11mm}html,body{background:white!important;color:black!important}.masthead,.site-foot,.text-layout,.hero,.skip,.stitch-workbench{display:none!important}.studio-shell{width:auto;max-width:none;margin:0;padding:0}.stitch-printed{display:block;font:11pt/1.3 var(--plain)}.print-sheet{page-break-after:always;break-after:page}.print-sheet:last-child{page-break-after:auto;break-after:auto}.print-sheet h1{font:700 19pt/1.2 var(--head);margin:0 0 4mm}.print-sheet h2{font:700 15pt/1.2 var(--head);margin:0 0 2mm}.print-sheet p{margin:0 0 4mm}.print-sheet canvas{display:block;width:min(165mm,100%);height:auto;max-height:220mm;object-fit:contain;object-position:left top}.stitch-key-grid.print-key{display:grid;grid-template-columns:repeat(3,1fr);gap:2mm;margin-top:5mm}.print-key .stitch-key-item{break-inside:avoid;page-break-inside:avoid;color:black}.print-key .stitch-key-symbol{print-color-adjust:exact;-webkit-print-color-adjust:exact}.print-key .stitch-key-detail{color:black}}
.stitch-floss{margin-top:.83rem;border:1px solid var(--border);border-radius:6px;background:var(--surface);padding:.52rem .62rem;font-size:.79rem}.stitch-floss summary{color:var(--action);font-weight:750;cursor:pointer;padding:.11rem 0}.stitch-floss label{display:block;font-weight:650;margin:.52rem 0 .27rem}.stitch-floss textarea{width:100%;min-width:0;color:var(--ink);background:var(--white);border:1px solid var(--border);border-radius:5px;padding:.35rem;resize:vertical;font: .79rem/1.35 ui-monospace,monospace}.stitch-floss-upload input{display:block;min-width:0;width:100%;font-size:.77rem}.stitch-floss-actions{display:flex;flex-wrap:wrap;gap:.33rem;margin:.45rem 0}.stitch-floss-actions .stitch-button{padding:.35rem .45rem;min-height:36px}.stitch-hint.floss-error{color:var(--rust);font-weight:700}.stitch-key-item>span:last-child{min-width:0;overflow-wrap:anywhere}