.dq-background-settings-dialog,.dq-background-settings-dialog *{box-sizing:border-box}
.dq-background-settings-dialog{width:min(1080px,calc(100vw - 32px));max-width:none;max-height:calc(100dvh - 32px);margin:auto;padding:0;overflow:hidden;border:1px solid #d2d2d7;border-radius:14px;background:#fff;color:#1d1d1f;box-shadow:0 24px 80px #1d1d1f30;font-family:inherit}
.dq-background-settings-dialog[open]{display:flex;flex-direction:column}
.dq-background-settings-dialog::backdrop{background:#1d1d1f55}
.dq-background-settings-dialog>header{display:flex;flex:none;align-items:flex-start;justify-content:space-between;gap:16px;padding:20px 24px 17px;border-bottom:1px solid #e8e8ed}
.dq-background-settings-dialog h2{margin:0 0 5px;font-size:21px;font-weight:600;line-height:1.4}
.dq-background-settings-dialog header p{margin:0;color:#6e6e73;font-size:12px;line-height:1.6}
.dq-background-settings-dialog button{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:7px 11px;border:1px solid #d2d2d7;border-radius:7px;background:#fff;color:#6e6e73;font:inherit;font-size:12px;line-height:1.5;cursor:pointer;white-space:nowrap}
.dq-background-settings-dialog button:hover{background:#f5f5f7}
.dq-background-settings-dialog button[aria-pressed=true]{border-color:#9ac8fb;background:#edf5ff;color:#0071e3}
.dq-background-settings-dialog button[data-primary=true]{background:#0071e3;color:#fff;border-color:#0071e3}
.dq-background-settings-dialog button[data-primary=true]:hover{background:#0077ed}
.dq-background-settings-dialog button:disabled{opacity:.45;cursor:default}
.dq-background-settings-dialog :is(button,input):focus-visible{outline:2px solid #9ac8fb;outline-offset:3px}
.dq-background-settings-dialog header>button{width:32px;height:32px;min-height:32px;padding:0;border:0;background:#f5f5f7;font-size:23px}
.dq-background-settings-body{display:grid;grid-template-columns:minmax(0,1fr) 228px;height:min(61dvh,600px);min-height:280px;overflow:hidden}
.dq-background-settings-stage{position:relative;overflow:hidden;min-width:0;min-height:0;background:#eceef1;touch-action:none}
.dq-background-settings-stage>[data-background-settings-loading]{position:absolute;inset:45% 16px auto;margin:0;color:#6e6e73;text-align:center;font-size:12px;pointer-events:none}
.dq-background-settings-surface{position:absolute;transform-origin:0 0;overflow:hidden;background:#fff;box-shadow:0 2px 16px #1d1d1f15;cursor:grab;touch-action:none;user-select:none;outline:none}
.dq-background-settings-surface:focus-visible{outline:4px solid #9ac8fb;outline-offset:5px}
.dq-background-settings-surface.is-moving{cursor:grabbing}
.dq-background-settings-surface[data-mode=crop]{cursor:crosshair}
.dq-background-settings-paper-frame{position:absolute;border:1px solid #b7bcc3;pointer-events:none}
.dq-background-settings-clip{position:absolute;overflow:hidden;pointer-events:none}
.dq-background-settings-clip>img{position:absolute;display:block;max-width:none;max-height:none;pointer-events:none;user-select:none;object-fit:fill}
.dq-background-settings-crop-outline{position:absolute;border:3px dashed #0071e3;background:#0071e308;box-shadow:0 0 0 20000px #1d1d1f40;pointer-events:none}
.dq-background-settings-body>aside{overflow:auto;min-height:0;padding:20px 18px;border-left:1px solid #e8e8ed}
.dq-background-settings-modes{display:grid;grid-template-columns:1fr 1fr;gap:7px}
.dq-background-settings-hint{min-height:38px;margin:12px 0 16px;color:#6e6e73;font-size:12px;line-height:1.7}
.dq-background-settings-crop-actions{display:grid;gap:8px;margin:0 0 18px}
.dq-background-settings-crop-actions[hidden]{display:none}
.dq-background-settings-body aside section{margin-top:18px;padding-top:18px;border-top:1px solid #e8e8ed}
.dq-background-settings-body aside label{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px;font-weight:500}
.dq-background-settings-body aside output{color:#6e6e73;font-size:12px;font-weight:400}
.dq-background-settings-body input[type=range]{width:100%;margin:16px 0 12px;accent-color:#0071e3;cursor:pointer}
.dq-background-settings-scale-buttons{display:flex;justify-content:flex-end;gap:7px}
.dq-background-settings-scale-buttons button{width:38px;padding:4px;font-size:18px;line-height:1}
.dq-background-settings-body aside section>button{width:100%;white-space:normal}
.dq-background-settings-body aside section>p{margin:10px 0 0;color:#86868b;font-size:11px;line-height:1.7}
.dq-background-settings-dialog>footer{display:flex;flex:none;align-items:center;justify-content:space-between;gap:18px;padding:15px 24px;border-top:1px solid #e8e8ed;background:#fafafa}
.dq-background-settings-dialog footer>span{color:#6e6e73;font-size:11px;line-height:1.7}
.dq-background-settings-dialog footer>span[data-error=true]{color:#a86712}
.dq-background-settings-dialog footer>div{display:flex;gap:8px;flex:none}
@media(max-width:720px){.dq-background-settings-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);border-radius:10px}.dq-background-settings-dialog>header{padding:15px 16px}.dq-background-settings-body{grid-template-columns:minmax(0,1fr);height:auto;max-height:calc(100dvh - 195px);overflow:auto}.dq-background-settings-stage{height:42dvh;min-height:220px;flex:none}.dq-background-settings-body>aside{padding:14px 16px;border-left:0;border-top:1px solid #e8e8ed}.dq-background-settings-hint{min-height:0;margin:9px 0}.dq-background-settings-body aside section{margin-top:12px;padding-top:12px}.dq-background-settings-dialog>footer{flex-wrap:wrap;gap:8px;padding:12px 16px}.dq-background-settings-dialog footer>div{margin-left:auto}}

@media(min-width:721px){
 .dq-background-settings-dialog>header{padding:16px 20px}
 .dq-background-settings-dialog h2{font-size:20px}
 .dq-background-settings-dialog button{box-sizing:border-box;min-height:32px;padding:5px 11px;border-radius:6px;line-height:20px}
 .dq-background-settings-dialog header>button{width:32px;height:32px;padding:0;line-height:1}
 .dq-background-settings-scale-buttons button{width:32px;height:32px;padding:4px;line-height:1}
 .dq-background-settings-dialog>footer{padding:12px 20px}
}
