/* Scoped late overrides: one 48px action row, not a second grid of equal buttons. */
#design-root #dp-selection.stool-selection-compact{padding:10px 12px!important;max-height:min(56dvh,calc(100dvh - 148px))!important;overflow:auto!important;overscroll-behavior:contain;scroll-padding:10px;box-sizing:border-box}
#dp-selection.stool-selection-compact .dp-selected-heading{flex-wrap:nowrap;min-height:44px;flex-shrink:0;position:relative;background:#fff}
#dp-selection.stool-selection-compact .dp-selected-heading>div:first-child{flex:1;min-width:0}
#dp-selection.stool-selection-compact #stool-selection-utility{display:flex;align-items:center;gap:4px;flex:0 0 auto!important;border-left:1px solid #e8e7e0;padding-left:6px}
#stool-selection-utility #dp-remove,#dp-selection.stool-selection-compact #dp-done{display:grid!important;place-items:center;flex:none;width:44px;height:44px;min-width:44px;min-height:44px;padding:0!important;border:0;background:#fff;color:#77776f;border-radius:10px}
#stool-selection-utility #dp-remove{font:12px NotoSansJP}#stool-selection-utility #dp-remove:hover{background:#f7f1ed;color:#8c574c}
#dp-selection.stool-selection-compact #dp-done{font-size:24px}
#design-root #dp-selection.stool-selection-compact #muji-selection-actions{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:6px;margin:8px 0 0!important;background:#fff}
#design-root #dp-selection.stool-selection-compact #muji-selection-actions button{display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;min-height:48px;padding:4px 5px!important;font:11px/1.25 NotoSansJP,sans-serif!important;border:1px solid #e0dfd7;border-radius:10px;background:#fff;color:#373735!important;white-space:normal;text-align:center}
#design-root #dp-selection.stool-selection-compact #muji-selection-actions #dp-move{background:#373735!important;color:#fff!important;border-color:#373735}
#design-root #dp-selection.stool-selection-compact #muji-selection-actions #dp-move[aria-pressed=true]{background:#efeee8!important;color:#373735!important}
#design-root #dp-selection.stool-selection-compact #muji-selection-actions #dp-edit-toggle{background:#f5f4ef!important;border-color:#f5f4ef}
#design-root #dp-selection.stool-selection-compact #muji-move-panel{max-height:none!important;overflow:visible!important;border-top:1px solid #e8e7df;margin-top:10px;padding-top:10px}
#design-root #dp-selection.stool-selection-compact #muji-fine-move summary{display:flex!important;min-height:44px}
#design-root #dp-selection.stool-selection-compact #muji-move-done,#design-root #dp-selection.stool-selection-compact #muji-rotate-done{min-height:44px!important;width:100%}
#muji-extra-edit #muji-height-open{display:block;min-height:44px;width:100%;margin:8px 0;border:1px solid #deded6;border-radius:10px;background:#fff;color:#373735;font:12px NotoSansJP}
#muji-extra-edit #muji-height-panel button{min-height:44px}
#stool-remove-confirm{width:min(360px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;padding:22px;border:1px solid #deded6;border-radius:18px;background:#fff;color:#373735;font:14px/1.6 NotoSansJP, sans-serif;box-sizing:border-box}
#stool-remove-confirm::backdrop{background:#37373555}#stool-remove-confirm h2{border:0;padding:0;font:16px/1.6 NotoSansJP;margin:0 0 12px}#stool-remove-name{overflow-wrap:anywhere;margin:0 0 8px}#stool-remove-note{font-size:12px;color:#77776f;margin:0 0 20px}
#stool-remove-confirm>div{display:flex;gap:10px}#stool-remove-confirm button{flex:1;min-height:44px;border:1px solid #deded6;border-radius:10px;background:#fff;color:#373735;font:13px NotoSansJP}#stool-remove-confirm #stool-remove-accept{background:#373735;color:#fff;border-color:#373735}
#dp-selection.stool-selection-compact button:focus-visible,#stool-remove-confirm button:focus-visible{outline:2px solid #73736b;outline-offset:2px}

/* C-6 (Issue #234): delete at the end of the action row, clearly destructive; undo snackbar */
#muji-selection-actions #dp-remove.stool-danger{color:#a3402f!important;background:#fff!important;border:1px solid #e9cfc8!important;font:13px NotoSansJP,sans-serif}
#muji-selection-actions #dp-remove.stool-danger:hover{background:#fbf1ee!important}
#design-root #dp-selection.stool-selection-compact #muji-selection-actions{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:6px}
#stool-undo-snackbar{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(150px + env(safe-area-inset-bottom,0px));z-index:10002;display:flex;align-items:center;gap:12px;max-width:calc(100% - 32px);box-sizing:border-box;padding:8px 8px 8px 16px;border-radius:14px;background:#373735;color:#fff;font:13px/1.4 NotoSansJP,sans-serif;box-shadow:0 6px 20px #0003;white-space:nowrap}
#stool-undo-snackbar[hidden]{display:none!important}
#stool-undo-snackbar button{flex:none;min-height:40px;padding:6px 14px;border:0;border-radius:10px;background:#fff;color:#373735;font:inherit;font-weight:500}
