/* Sidebar layout (sidebar-layout.js). Uses the theme's own button / card tokens; only sizes and grouping change here. */
.card svg{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round}

/* Canvas card folds to a summary line */
.sb-fold h3{cursor:pointer}
.sb-fold-btn{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:6px;width:100%;padding:2px 2px 0;cursor:pointer;font:600 11.5px var(--mono,ui-monospace),monospace;color:inherit;opacity:.85}
.sb-fold-btn:hover{opacity:1}
.sb-fold-btn:focus-visible{outline:1px dashed currentColor;outline-offset:2px}
.sb-fold-btn .sb-summary{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sb-fold-btn svg{width:14px;height:14px;stroke-width:1.8;transition:transform .15s}
.sb-fold.open .sb-fold-btn svg{transform:rotate(180deg)}
.sb-fold:not(.open) .sb-fold-body{display:none}
.sb-fold.open .sb-fold-body{margin-top:8px}
.card.sb-fold{padding-bottom:9px}

/* History / view row */
.sb-quick{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;margin:0 0 9px}
.sb-quick button{flex-direction:column;gap:2px;min-width:0;padding:5px 2px 4px;font-size:10.5px;line-height:1.1}
.sb-quick button svg{width:15px;height:15px}
.sb-quick button span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sb-quick kbd{display:none}

/* Tools: 3 × 3 icon tiles, shortcut badge in the corner */
.sb-tools{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-bottom:8px}
.sb-tools button{position:relative;flex-direction:column;justify-content:center;gap:4px;min-width:0;height:50px;padding:6px 2px 5px;font-size:10.5px;line-height:1.1}
.sb-tools button svg{width:18px;height:18px;stroke-width:1.6}
.sb-tools button span{max-width:100%;padding:0 2px;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sb-tools button kbd{position:absolute;top:3px;right:3px;margin:0;padding:0 3px;font-size:8.5px;line-height:12px;min-width:0}

/* Pen readout: the LCD first, the WinTab switch only in the desktop window */
#pressureStatus{margin:4px 0 6px}
#nativePenToggle{margin:0;padding:4px 8px;font-size:11px}
body.no-wintab #nativePenToggle{display:none}

/* Layers: icon toolbar, then the list */
.sb-layerbar{display:flex;align-items:center;gap:3px;margin:0 0 8px}
.sb-layerbar button{flex:1;min-width:0;height:28px;min-height:0;padding:0;justify-content:center}
.sb-layerbar button svg{width:15px;height:15px;margin:0}
.sb-layerbar button span,.sb-layerbar button kbd{display:none}
.sb-layerbar i{width:1px;align-self:stretch;margin:4px 1px;background:currentColor;opacity:.2}
.layers-card>small{display:block;margin:6px 2px 0;font-size:10.5px;opacity:.7}
.layers-card #textEditor{margin-top:8px}

/* Deformation card: labelled rows */
#deformPanel .sb-label,#oneOffDeform .sb-label{display:block;margin:2px 2px 4px;font-size:10.5px;opacity:.75}
#deformPanel .row3 button{font-size:11px}
#oneOffDeform{margin-bottom:6px}
#oneOffDeform .row3{margin-top:0}
.sb-quick .sb-long{display:none}
.sb-quick button{padding-left:1px;padding-right:1px}
.sb-quick button span{font-size:10px}
:lang(ja) .sb-tools button span{font-size:9.5px;letter-spacing:-.02em}
:lang(ja) .sb-quick button span{font-size:9.5px;letter-spacing:-.03em}
