/* Two half-height widgets share a slot; other cabinet geometry is untouched. */
#widgets-top.widget-stack-grid{display:grid;grid-template-columns:repeat(var(--widgets,4),minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:6px 13px}
#widgets-top.widget-stack-grid>.widget{height:100%;min-height:0;width:auto!important;position:relative}
#widgets-top .widget-half>.wz{display:none}
.widget-half-summary{height:100%;display:flex;flex-direction:column;justify-content:center;gap:5px;padding:8px 12px;min-width:0;pointer-events:none}
.widget-half-summary>span{font-size:11px;line-height:14px;color:#657581;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.widget-half-summary>strong{font-size:17px!important;line-height:21px!important;margin:0!important;letter-spacing:-.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.widget-controls{position:absolute;top:5px;right:5px;display:flex;gap:2px;z-index:4;opacity:0;transition:opacity .12s}
.widget:hover>.widget-controls,.widget:focus-within>.widget-controls{opacity:1}
.widget-controls button{width:22px;height:22px;padding:0;border:0;border-radius:50%;background:#e7e9e6;color:#33454a;font:18px/22px Arial,sans-serif;cursor:pointer}
.widget-controls button:hover{background:#cbd8dc}
.widget-controls button:focus-visible{outline:2px solid #2f86e8;outline-offset:1px}
.widget-stack-gap{min-width:0;min-height:0;border:1px dashed #a9b8bd;border-radius:21px;background:#ffffff35;color:#72818a;font-family:inherit;font-size:11px;line-height:15px;padding:8px;cursor:pointer}
.widget-stack-gap.widget-drop-active{background:#d5e9f3;border-color:#4a91b9}
#widgets-top>.widget-dragged,#widgets-bar>.widget-dragged{display:block!important;opacity:.25}
#widgets-top>.widget-gap,#widgets-bar>.widget-gap{display:none!important}
.widget-pair-picker{border:0;border-radius:22px;padding:22px;max-width:420px;max-height:80vh;overflow:auto;background:#f6f5f1;color:#263e49}
.widget-pair-picker::backdrop{background:#14292d55}
.widget-pair-picker h3{font-size:17px;margin:0 0 12px}
.widget-pair-picker button{display:block;width:100%;border:0;border-radius:12px;padding:10px;margin:5px 0;background:#e5ebed;color:inherit;text-align:left;font:inherit;cursor:pointer}
@media(hover:none){.widget-controls{opacity:1}}
@media(prefers-reduced-motion:reduce){.widget-controls{transition:none}}
/* Preview: compact closed slots, colored identities, expanded product feed. */
body.widgets-empty #widgets-top{display:none!important}
#widgets-top .widget-stack-gap{visibility:hidden;pointer-events:none;border:0;background:transparent}
body.dragging-widget #widgets-top .widget-stack-gap{visibility:visible;pointer-events:auto;border:1px dashed #a9b8bd;background:#ffffff35}
#widgets-top .widget-corner-icon{position:absolute;top:9px;left:10px;width:18px;height:18px;z-index:2;stroke:var(--widget-color);fill:none;stroke-width:1.8;pointer-events:none}
#widgets-top .widget-corner-icon *{stroke:var(--widget-color)}
#widgets-top .widget>.wz{padding-top:43px}
#widgets-top .widget-half-summary{padding-top:25px}
#widgets-top .widget-half-summary>span{font-size:10px;line-height:11px}
#widgets-top .widget-half-summary>strong{font-size:15px!important;line-height:17px!important}
#widgets-bar>.widget>svg{display:block!important;width:20px;height:20px;flex:none;color:var(--widget-color);stroke:var(--widget-color);opacity:1}
#widgets-bar>.widget>svg *{stroke:var(--widget-color)}
#widgets-bar.compact-labels{gap:4px}
#widgets-bar.compact-labels>.widget{padding:0 4px;gap:4px;min-width:55px}
#widgets-bar.compact-labels>.widget>span{display:block!important;font-size:11px;overflow:visible;flex:none}
body.widgets-empty .products:not(.tab-view) .product-scroll>.product{height:var(--preview-card-height)!important}
body.widgets-empty .products:not(.tab-view) .product-scroll>.product .tip,body.widgets-empty .products:not(.tab-view) .product-scroll>.product .product-stats.visual-metrics{height:calc(100% - 18px)!important;top:9px}

body.widgets-empty.dragging-widget #widgets-top{display:grid!important;z-index:20;background:#e5eef1cc;outline:2px dashed #7ea6ba;border-radius:21px}
#widgets-bar>.widget>svg{background:#ffffffd9;border-radius:6px;padding:2px;width:22px;height:22px}

/* Keep focus navigation from scrolling the fixed application frame. */
.viewport{overflow:clip}
