/* Quiet, reachable editing tools in the existing warm-white / champagne palette. */
.studio-design-panel { container-type:inline-size; }
.direct-workspace { display:grid; grid-template-columns:minmax(0,1fr) 128px; gap:10px; align-items:start; margin-top:18px; }
.direct-workspace .studio-canvas-wrap { margin:0; overflow:hidden; }
.direct-regions { min-width:0; background:#f4f0e7; border:1px solid #e2d9c6; padding:10px 8px; }
.direct-kicker { margin:0; color:#887a60; font-size:11px; letter-spacing:.12em; }
.direct-diagram svg { width:100%; height:auto; display:block; overflow:visible; }
.direct-product-line { fill:#fbf9f2; stroke:#8e927d; stroke-width:1.5; }
.direct-dashed { fill:none; stroke:#ac9c80; stroke-width:1; stroke-dasharray:3 3; }
.direct-svg-region { cursor:pointer; outline-offset:3px; }
.direct-region-dot { fill:#f6f2e6; stroke:#a29376; stroke-width:1; }
.direct-svg-region[aria-pressed="true"] .direct-region-dot { fill:#4d5f48; stroke:#4d5f48; }
.direct-svg-region text { fill:#4d5f48; font:12px Georgia,serif; pointer-events:none; }
.direct-svg-region[aria-pressed="true"] text { fill:#fffdf2; }
.direct-svg-note { font:8px "Microsoft YaHei",sans-serif; fill:#89826f; }
.direct-region-buttons { display:grid; gap:5px; }
.direct-region-buttons button,.direct-tools button,.direct-tools select { border:1px solid #d6cbb5; background:#fcfaf5; color:#526048; font:inherit; font-size:10px; padding:8px 7px; min-height:36px; cursor:pointer; border-radius:0; }
.direct-region-buttons button { text-align:left; line-height:1.6; }
.direct-region-buttons button[aria-pressed="true"] { border-color:#63725a; background:#e9ece1; }
.direct-region-note { font-size:9px; color:#928a78; line-height:1.8; margin:10px 0 0; }
.direct-tools { border:1px solid #ddd4c1; border-top:0; padding:10px; background:#f5f2ea; }
.direct-tools select { width:100%; max-width:100%; margin-bottom:7px; }
.direct-tool-row { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:5px; }
.direct-sources { margin-top:8px; padding-top:8px; border-top:1px solid #ded5c2; }
.direct-tools button:disabled { opacity:.38; cursor:default; }
.direct-tools > p { font-size:10px; color:#8b8472; line-height:1.9; margin:10px 0 0; }
#showKnitCharts { width:100%; margin-top:8px; text-align:left; }
.knit-chart-dialog { width:min(960px,94vw); max-height:90dvh; border:1px solid #c6b99f; background:#fcfaf3; color:#4d5e45; padding:24px; overflow:auto; }
.knit-chart-dialog::backdrop { background:#24332177; }
.knit-chart-heading { display:flex; justify-content:space-between; gap:16px; align-items:center; }
.knit-chart-heading h2 { font:400 24px/1.6 var(--font-editorial); margin:0; }
.knit-chart-dialog p,.knit-chart-dialog figcaption { font-size:13px; line-height:1.9; }
.knit-chart-dialog button,.knit-chart-dialog a { display:inline-block; border:1px solid #c6b99f; padding:10px; color:#526044; background:transparent; font:inherit; font-size:12px; cursor:pointer; margin-right:8px; }
.knit-chart-sheets figure { margin:24px 0; padding-top:18px; border-top:1px solid #ddd3bf; }
.knit-chart-sheets img { display:block; width:100%; height:auto; margin:12px 0; image-rendering:pixelated; }
.direct-tools button:focus-visible,.direct-region-buttons button:focus-visible { outline:2px solid #788463; outline-offset:2px; }
@container (max-width:420px) {
  .direct-workspace { grid-template-columns:1fr; }
  .direct-regions { grid-row:1; display:grid; grid-template-columns:100px minmax(0,1fr); gap:5px 10px; align-items:center; }
  .direct-kicker { grid-column:1/-1; }
  .direct-region-note { grid-column:1/-1; margin:0; }
  .direct-region-buttons { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .direct-region-buttons button { min-height:40px; font-size:10px; }
}
@media(max-width:599px){
  .direct-workspace { grid-template-columns:1fr; }
  .direct-regions { grid-row:1; display:grid; grid-template-columns:100px minmax(0,1fr); gap:5px 10px; align-items:center; }
  .direct-kicker,.direct-region-note { grid-column:1/-1; }
  .direct-region-buttons { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .direct-region-buttons button { min-height:40px; }
  .direct-tools button { min-height:42px; }
  .direct-tool-row { gap:5px; }
}
