.hd-launcher{position:fixed;left:20px;top:208px;z-index:100;background:#fff;color:#77608d;border:1px solid #e3ddea;border-radius:9px;padding:9px 13px;box-shadow:0 5px 20px #29213318;font:12px Inter,"Microsoft YaHei",sans-serif;cursor:pointer}.hd-launcher:hover{background:#f4f1f8}
@media(max-height:900px){body:has(.hd-launcher) div.absolute.left-4[class~="top-1/2"][class~="z-[155]"]{top:255px;transform:none;translate:none;max-height:calc(100dvh - 267px);overflow-y:auto;scrollbar-width:none}}
.hd-open-error{position:fixed;left:20px;bottom:30px;z-index:3500;max-width:min(450px,calc(100vw - 40px));padding:13px;border-radius:8px;background:#fbf1f3;color:#b45e6a;font:12px/1.7 sans-serif;overflow-wrap:anywhere}

[data-upscale-studio]{position:fixed;inset:0;z-index:2300;display:grid;place-items:center;padding:16px;background:#28233055;backdrop-filter:none;color:#45414c;font:13px/1.6 Inter,"Microsoft YaHei",sans-serif;--hd-line:#e3ddea;--hd-muted:#857b91;--hd-accent:#eee8f6}
[data-upscale-studio] *{box-sizing:border-box}
[data-upscale-studio] [hidden]{display:none!important}
[data-upscale-studio] .hd-shell{width:min(860px,100%);max-width:100%;max-height:calc(100dvh - 32px);min-height:0;display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--hd-line);border-radius:20px;background:#fff;box-shadow:0 28px 100px #29213326}
[data-upscale-studio] button,[data-upscale-studio] input,[data-upscale-studio] select{min-width:0;max-width:100%;min-height:40px;border:1px solid var(--hd-line);border-radius:10px;background:#fff;color:inherit;font:inherit;line-height:1.4;padding:9px 12px}
[data-upscale-studio] button{cursor:pointer;overflow-wrap:anywhere}
[data-upscale-studio] button:hover:not(:disabled){background:#f4f1f8}
[data-upscale-studio] button:disabled{cursor:default;opacity:.45}
[data-upscale-studio] :is(button,input,select,summary):focus-visible{outline:2px solid #aa8dcd;outline-offset:3px}
[data-upscale-studio] :is(h1,h2,p){margin:0}
[data-upscale-studio] h1{font-size:24px;font-weight:600;line-height:1.3}
[data-upscale-studio] h2{font-size:14px;font-weight:500;line-height:1.5}
[data-upscale-studio] small,[data-upscale-studio] .muted{color:var(--hd-muted);font-size:11px;line-height:1.6;overflow-wrap:anywhere}
[data-upscale-studio] .error{color:#b45e6a!important}

[data-upscale-studio] .hd-header{display:flex;align-items:center;justify-content:space-between;gap:16px;flex:none;padding:20px 24px;border-bottom:1px solid var(--hd-line)}
[data-upscale-studio] [data-close]{flex:none;width:40px;height:40px;padding:0;border-color:transparent;font-size:25px;font-weight:300;line-height:1}
[data-upscale-studio] .hd-content{flex:1 1 auto;min-height:0;min-width:0;overflow:auto;overscroll-behavior:contain;padding:20px 24px 22px;scrollbar-width:thin;scrollbar-color:#d6c9e3 transparent}
[data-upscale-studio] .hd-comparison{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
[data-upscale-studio] .hd-comparison>section{min-width:0}
[data-upscale-studio] .hd-section{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:40px;margin-bottom:12px}
[data-upscale-studio] .hd-section>button{flex:none;padding-inline:12px;font-size:12px}
[data-upscale-studio] .hd-section>small{min-width:0;text-align:right}
[data-upscale-studio] .hd-preview{height:245px;display:grid;place-items:center;overflow:hidden;border:1px solid var(--hd-line);border-radius:12px;background:#faf9fc;margin-bottom:12px}
[data-upscale-studio] .hd-preview>img{display:block;width:100%;height:100%;min-height:0;object-fit:contain}
[data-upscale-studio] .hd-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;width:100%;height:100%;padding:24px;text-align:center;color:var(--hd-muted);font-size:12px;line-height:1.7;overflow-wrap:anywhere}
[data-upscale-studio] button.hd-placeholder{border:0;border-radius:0;background:transparent;font-size:28px;font-weight:300}
[data-upscale-studio] .hd-placeholder>span{font-size:12px;font-weight:400}
[data-upscale-studio] [data-source-select]{display:block;width:100%;height:40px;text-overflow:ellipsis}
[data-upscale-studio] .hd-result-actions{display:flex;gap:8px;min-width:0}
[data-upscale-studio] .hd-result-actions>button{flex:1 1 0;padding-inline:8px;font-size:12px}
[data-upscale-studio] .hd-dimensions{display:block;min-height:18px;margin-top:7px}
[data-upscale-studio] .hd-warning{margin-top:10px;font-size:11px;line-height:1.7;color:#a17447;overflow-wrap:anywhere}
[data-upscale-studio] .hd-warning:empty{display:none}

[data-upscale-studio] .hd-picker{margin-top:18px;border:1px solid var(--hd-line);border-radius:12px;background:#fff}
[data-upscale-studio] .hd-picker>summary{min-height:44px;padding:12px 14px;cursor:pointer;font-size:12px;color:#6b6079;overflow-wrap:anywhere}
[data-upscale-studio] .hd-picker>summary::marker{color:#aa94c3}
[data-upscale-studio] .hd-picker[open]>summary{border-bottom:1px solid var(--hd-line)}
[data-upscale-studio] .hd-picker-tools{display:flex;align-items:center;gap:8px;min-width:0;padding:12px}
[data-upscale-studio] .hd-picker-tools>input{flex:1 1 140px;width:0}
[data-upscale-studio] .hd-picker-tools>button{flex:none;font-size:12px}
[data-upscale-studio] .hd-sources{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:10px;max-height:270px;overflow:auto;overscroll-behavior:contain;padding:0 12px 12px;scrollbar-width:thin}
[data-upscale-studio] .hd-sources>.muted{grid-column:1/-1;padding:8px 0}
[data-upscale-studio] .hd-source{min-width:0;padding:6px;border:1px solid var(--hd-line);border-radius:10px;background:#fff}
[data-upscale-studio] .hd-source.chosen{border-color:#c7b6df;background:var(--hd-accent)}
[data-upscale-studio] .hd-thumb-button{display:block;width:100%;height:88px;padding:0;border:0;border-radius:6px;overflow:hidden}
[data-upscale-studio] .hd-thumb-button>img{display:block;width:100%;height:100%;object-fit:contain;background:#fff}
[data-upscale-studio] .hd-source>label{display:flex;align-items:center;gap:7px;min-width:0;min-height:32px;margin-top:5px;cursor:pointer;font-size:11px}
[data-upscale-studio] .hd-source input[type=checkbox]{flex:none;min-height:0;width:15px;height:15px;margin:0;padding:0;accent-color:#a58ac8}
[data-upscale-studio] .hd-source label>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

[data-upscale-studio] .hd-quality{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-top:20px}
[data-upscale-studio] .hd-quality>span{font-size:13px;font-weight:500}
[data-upscale-studio] .hd-quality>[role=group]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;min-width:0;max-width:100%}
[data-upscale-studio] [data-resolution]{min-width:64px;padding:9px 14px}
[data-upscale-studio] [data-resolution][aria-pressed=true]{background:var(--hd-accent);border-color:#c7b6df;color:#57416f;font-weight:600}
[data-upscale-studio] .hd-batch-tasks{display:grid;gap:8px;max-height:228px;overflow:auto;overscroll-behavior:contain;margin-top:20px;scrollbar-width:thin}
[data-upscale-studio] .hd-task{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;padding:11px 12px;border:1px solid var(--hd-line);border-radius:10px;background:#faf9fc}
[data-upscale-studio] .hd-task-copy{flex:1;min-width:0}
[data-upscale-studio] .hd-task-copy>b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:500}
[data-upscale-studio] .hd-task-copy>small{display:block;margin-top:3px;overflow-wrap:anywhere}
[data-upscale-studio] .hd-task-actions{display:flex;gap:7px;flex:none}
[data-upscale-studio] .hd-task-actions>button{padding-inline:12px;font-size:12px}

[data-upscale-studio] .hd-footer{flex:none;min-width:0;padding:16px 24px 18px;border-top:1px solid var(--hd-line);background:#fff;text-align:center}
[data-upscale-studio] .hd-primary{display:block;width:100%;min-height:40px;border-color:#ddd0ec;background:var(--hd-accent);color:#6b4f88;font-size:14px;font-weight:600}
[data-upscale-studio] .hd-note{margin-top:10px;color:var(--hd-muted);font-size:11px;line-height:1.6;overflow-wrap:anywhere}
[data-upscale-studio] [data-status]{margin-top:6px;color:var(--hd-muted);font-size:11px;line-height:1.6;overflow-wrap:anywhere}
[data-upscale-studio] [data-status]:empty{display:none}

@media(max-width:780px){
 [data-upscale-studio] .hd-header{padding:18px 20px}
 [data-upscale-studio] .hd-content{padding:18px 20px 20px}
 [data-upscale-studio] .hd-footer{padding:16px 20px}
 [data-upscale-studio] .hd-comparison{gap:16px}
}
@media(max-width:560px){
 [data-upscale-studio] .hd-shell{border-radius:16px}
 [data-upscale-studio] .hd-header{padding:14px 16px}
 [data-upscale-studio] .hd-content{padding:16px}
 [data-upscale-studio] .hd-footer{padding:14px 16px}
 [data-upscale-studio] .hd-comparison{grid-template-columns:minmax(0,1fr);gap:18px}
 [data-upscale-studio] .hd-preview{height:220px}
 [data-upscale-studio] .hd-quality{gap:12px}
 [data-upscale-studio] .hd-quality>[role=group]{width:100%}
 [data-upscale-studio] [data-resolution]{min-width:0;padding-inline:10px}
 [data-upscale-studio] .hd-picker-tools{flex-wrap:wrap}
 [data-upscale-studio] .hd-picker-tools>input{flex-basis:100%;width:100%}
 [data-upscale-studio] .hd-sources{grid-template-columns:repeat(2,minmax(0,1fr))}
 [data-upscale-studio] .hd-task{align-items:flex-start;flex-wrap:wrap;gap:8px}
 [data-upscale-studio] .hd-task-copy{flex-basis:100%}
 [data-upscale-studio] .hd-task-actions{margin-left:auto}
}
