html.dw-layout-open { overflow:hidden; }
.dw-layout-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:0 14px 12px; background:var(--dw-surface); border-bottom:1px solid var(--dw-line); }
.dw-layout-actions .dw-button { font-size:12px; padding:8px 12px; }
.dw-current-layout { color:var(--dw-muted); font-size:12px; flex:1 1 100%; }
.dw-layout-dialog,.dw-overview-dialog { width:1180px; }
.dw-layout-scroll { overflow:auto; overscroll-behavior:contain; min-height:0; padding:20px 24px; }
.dw-layout-intro { font-size:13px; color:var(--dw-muted); line-height:1.7; margin-bottom:18px!important; }
.dw-layout-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.dw-layout-tabs button { display:flex; align-items:center; justify-content:center; gap:8px; min-height:48px; border:1px solid var(--line-control,#768397); border-radius:10px; padding:9px; background:var(--dw-surface); font-size:13px; font-weight:700; line-height:1.5; }
.dw-layout-tabs button span { font-size:11px; opacity:.7; }
.dw-layout-tabs button[aria-pressed="true"] { color:var(--dw-primary); border:2px solid var(--dw-primary); background:var(--dw-tint); }
.dw-layout-compare { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:10px 0; font-size:12px; color:var(--dw-muted); }
.dw-layout-compare .dw-button { font-size:12px; }
.dw-layout-grid,.dw-overview-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; align-items:start; }
.dw-layout-grid:not(.is-ready) { opacity:.35; pointer-events:none; }
.dw-layout-card,.dw-overview-card { min-width:0; border:1px solid var(--dw-line); border-radius:12px; overflow:hidden; background:var(--dw-surface); }
.dw-layout-card.is-selected { border-color:var(--dw-primary); box-shadow:0 0 0 1px var(--dw-primary); }
.dw-layout-preview { display:block; width:100%; border:0; padding:18px 12px; background:#e9edf2; }
.dw-layout-sheet { display:flex; justify-content:center; min-width:0; min-height:80px; }
.dw-layout-card-copy { padding:14px 16px 8px; }
.dw-layout-name { display:block; text-align:left; border:0; padding:0; min-height:36px; background:none; font-size:15px; font-weight:750; }
.dw-layout-card-copy p { color:var(--dw-muted); font-size:12px; line-height:1.7; min-height:40px; margin-top:3px!important; }
.dw-layout-badge { display:inline-block; margin-top:8px; font-size:11px; color:var(--dw-primary); }
.dw-layout-card-actions { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; padding:4px 12px 12px; gap:4px; }
.dw-layout-card-actions>.dw-button { margin-left:auto; font-size:12px; }
.dw-layout-pager { display:flex; align-items:center; justify-content:center; gap:6px; font-size:11px; color:var(--dw-muted); }
.dw-layout-pager .dw-icon-button { border:0; width:44px; height:44px; font-size:22px; }
.dw-layout-dialog .dw-dialog-footer { gap:12px; }
.dw-layout-dialog .dw-dialog-footer>span { flex:1; text-align:center; }
.dw-layout-dialog.is-expanded .dw-layout-grid,.dw-layout-dialog.is-comparing .dw-layout-grid { grid-template-columns:minmax(0,1fr); max-width:780px; margin:auto; }
.dw-layout-dialog:is(.is-expanded,.is-comparing) .dw-layout-card[data-visible="false"] { display:none; }
.dw-overview-copy { padding:14px; display:grid; gap:8px; }
.dw-overview-copy>strong { font-size:14px; }
.dw-overview-copy>span { font-size:12px; color:var(--dw-muted); }
:root[data-theme="dark"] .dw-layout-preview,.dark .dw-layout-preview { background:#202733; }
@media(max-width:800px) {
  .dw-layout-dialog,.dw-overview-dialog { width:100%; max-width:100%; max-height:96dvh; margin:auto 0 0; border-radius:18px 18px 0 0; bottom:0; top:auto; }
  .dw-layout-dialog .dw-dialog-heading,.dw-overview-dialog .dw-dialog-heading { padding:12px 16px; }
  .dw-layout-scroll { padding:16px; }
  .dw-layout-dialog .dw-dialog-footer,.dw-overview-dialog .dw-dialog-footer { padding:12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .dw-layout-dialog .dw-dialog-footer>span { display:none; }
  .dw-layout-dialog .dw-dialog-footer>.dw-primary { flex:1; min-height:48px; }
  .dw-layout-grid { grid-template-columns:minmax(0,1fr); }
  .dw-layout-grid.is-ready .dw-layout-card[data-visible="false"] { display:none; }
  .dw-layout-tabs { gap:5px; }
  .dw-layout-tabs button { display:block; font-size:12px; min-height:58px; padding:7px 4px; }
  .dw-layout-tabs button span { display:block; margin-bottom:3px; }
  .dw-layout-card-copy p { min-height:0; }
  .dw-layout-preview { padding:16px; }
  .dw-overview-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .dw-overview-grid .dw-layout-preview { padding:12px 7px; }
  .dw-overview-copy { padding:10px; }
  .dw-overview-copy>.dw-button { padding:8px 4px; font-size:12px; }
  .dw-overview-copy>strong { font-size:12px; }
  .dw-overview-copy>span { font-size:11px; }
}
@media(max-height:480px) { .dw-layout-dialog,.dw-overview-dialog { max-height:98dvh; } }
