.qp-layer-style-dialog {
  width: min(620px, calc(100vw - 32px)); max-height: min(620px, calc(100vh - 32px));
  margin: auto; padding: 0; overflow: auto; border: 1px solid var(--qp-border, #484c54); border-radius: 10px;
  background: var(--qp-panel, #2b2d31); color: var(--qp-text, #e3e5e9); box-shadow: 0 22px 80px #0009;
  font: 13px/1.45 Arial, sans-serif; color-scheme: dark;
}
.qp-layer-style-dialog::backdrop { background: #0006; }
.qp-style-header { padding: 19px 22px 16px; border-bottom: 1px solid var(--qp-border, #484c54); }
.qp-style-header h2 { margin: 0 0 3px; font-size: 17px; font-weight: 650; color: inherit; }
.qp-style-layer-name { margin: 0; color: var(--qp-muted, #b4bac4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.qp-style-body { display: grid; grid-template-columns: 130px minmax(0, 1fr); min-height: 320px; }
.qp-style-tabs { display: flex; flex-direction: column; gap: 3px; padding: 12px 8px; border-right: 1px solid var(--qp-border, #484c54); background: var(--qp-input, #202226); }
.qp-layer-style-dialog button { cursor: pointer; font: inherit; }
.qp-style-tab { padding: 10px 12px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--qp-muted, #b4bac4); text-align: left; overflow-wrap: anywhere; }
.qp-style-tab:hover { background: var(--qp-hover, #383d45); color: var(--qp-text, #e3e5e9); }
.qp-style-tab[aria-selected="true"] { background: var(--qp-selected, #3b4c29); color: var(--qp-selected-text, #effbdb); border-color: var(--qp-selected-border, #a7d55e); }
.qp-style-panes { min-width: 0; }
.qp-style-pane { padding: 20px 22px 22px; }
.qp-style-pane[hidden] { display: none; }
.qp-style-pane h3 { margin: 0 0 18px; font-size: 14px; color: inherit; }
.qp-style-enable, .qp-style-preview { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.qp-style-enable { margin-bottom: 18px; }
.qp-layer-style-dialog input[type="checkbox"], .qp-layer-style-dialog input[type="range"] { accent-color: var(--qp-accent, #c7f36b); }
.qp-style-row { display: grid; grid-template-columns: 64px minmax(65px, 1fr) 54px 18px; align-items: center; gap: 8px; margin: 14px 0; font-size: 12px; }
.qp-style-row input[type="range"] { width: 100%; min-width: 0; }
.qp-style-row small { color: var(--qp-muted, #b4bac4); font-size: 10px; }
.qp-style-number, .qp-style-blend-row select { min-width: 0; padding: 6px 7px; border: 1px solid var(--qp-border, #484c54); border-radius: 4px; background: var(--qp-input, #202226); color: inherit; font: inherit; }
.qp-style-number { width: 54px; box-sizing: border-box; }
.qp-style-blend-row, .qp-style-color-row { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 8px; margin: 14px 0; font-size: 12px; }
.qp-style-color-row { grid-template-columns: 64px 45px 1fr; }
.qp-style-color-row input[type="color"] { width: 45px; height: 28px; padding: 2px; border: 1px solid var(--qp-border, #484c54); background: var(--qp-input, #202226); border-radius: 4px; cursor: pointer; }
.qp-style-color-value { color: var(--qp-muted, #b4bac4); font: 11px monospace; }
.qp-style-note { margin: 18px 0 0; color: var(--qp-muted, #b4bac4); font-size: 11px; line-height: 1.7; }
.qp-style-error { margin: 0; padding: 0 22px 8px; color: #f2a3a8; font-size: 12px; }
.qp-style-error:empty { display: none; }
.qp-style-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 22px; border-top: 1px solid var(--qp-border, #484c54); }
.qp-style-buttons { display: flex; gap: 8px; }
.qp-style-buttons button { min-width: 70px; padding: 7px 16px; border: 1px solid var(--qp-border, #484c54); border-radius: 5px; color: inherit; background: var(--qp-header, #303237); }
.qp-style-buttons button:hover { background: var(--qp-hover, #383d45); }
.qp-style-buttons button.is-primary { background: var(--qp-primary, #c7f36b); border-color: var(--qp-primary, #c7f36b); color: var(--qp-on-accent, #1b260d); font-weight: 650; }
.qp-style-buttons button.is-primary:hover { background: var(--qp-primary-hover, #d6ff87); }
.qp-layer-style-dialog :disabled { opacity: .5; cursor: default; }
.qp-layer-style-dialog :focus-visible { outline: 2px solid var(--qp-accent, #c7f36b); outline-offset: 2px; }
.qp-filter-dialog { box-sizing: border-box; max-height: calc(100vh - 24px); overflow: auto; }
.qp-filter-dialog h2 { margin-bottom: 12px; }
.qp-filter-note { color: var(--qp-muted, #b4bac4); font-size: 12px; line-height: 1.65; margin: 0 0 17px; }
.qp-filter-check { display: flex; align-items: center; gap: 7px; margin: 12px 0; font-size: 12px; }
.qp-filter-error { color: #f2a3a8; font-size: 12px; line-height: 1.5; }
.qp-filter-error:empty { display: none; }
.qp-gradient-editor { display: grid; gap: 9px; margin: 14px 0; }
.qp-gradient-preview { height: 30px; border: 1px solid #62666b; border-radius: 5px; }
.qp-gradient-stops { display: grid; gap: 6px; max-height: 210px; overflow: auto; }
.qp-gradient-stop, .qp-gradient-columns { display: grid; grid-template-columns: minmax(48px,1fr) 44px minmax(62px,1fr) 28px; gap: 7px; align-items: center; }
.qp-gradient-columns { font-size: 10px; color: var(--qp-muted, #b4bac4); }
.qp-gradient-preset-save { display: grid; grid-template-columns: minmax(70px,1fr) 44px 44px; gap: 6px; }
.qp-gradient-status { margin: 0; font-size: 11px; line-height: 1.5; color: var(--qp-muted, #b4bac4); }
.qp-gradient-status:empty { display: none; }
.qp-gradient-editor input, .qp-gradient-editor select, .qp-gradient-editor button, .qp-typography-fields input, .qp-typography-fields select, .qp-typography-text { min-width: 0; box-sizing: border-box; padding: 5px; color: inherit; background: var(--qp-input, #202226); border: 1px solid var(--qp-border, #484c54); border-radius: 4px; font: inherit; }
.qp-gradient-editor input[type="color"] { width: 44px; height: 28px; padding: 2px; }
.qp-gradient-dialog, .qp-typography-dialog { box-sizing: border-box; padding: 20px 24px; width: min(540px,calc(100vw - 24px)); }
.qp-gradient-dialog h2, .qp-typography-dialog h2 { margin: 0 0 14px; font-size: 17px; }
.qp-gradient-dialog .qp-style-buttons, .qp-typography-dialog .qp-style-buttons { margin-top: 18px; justify-content: flex-end; flex-wrap: wrap; }
.qp-typography-dialog .qp-style-note { margin: 8px 0 14px; }
.qp-typography-text { width: 100%; resize: vertical; display: block; margin: 6px 0; line-height: 1.5; }
.qp-typography-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.qp-typography-field { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; }
.qp-typography-field input[type="number"] { width: 76px; }
.qp-typography-field select { max-width: 145px; }
@media(max-width:480px) { .qp-typography-fields { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .qp-style-body { grid-template-columns: 105px minmax(0, 1fr); }
  .qp-style-pane { padding: 18px 12px; }
  .qp-style-row { grid-template-columns: 56px minmax(40px, 1fr) 48px 14px; gap: 5px; }
  .qp-style-number { width: 48px; }
}
