.qp-page { --qp-ink:#342842; --qp-muted:#73647e; --qp-line:#e3d9ec; color:var(--qp-ink); min-width:0; }
.qp-page *, .qp-page *::before, .qp-page *::after { box-sizing:border-box; }
.qp-header,.qp-gallery>header,.qp-ref-label,.qp-summary,.qp-bottom,.qp-preview header { display:flex;justify-content:space-between;align-items:center;gap:10px; }
.qp-header { margin-bottom:22px;flex-wrap:wrap; }
.qp-header h1 { font:650 clamp(28px,4vw,46px)/1.2 var(--studio-serif,serif);margin:0;letter-spacing:-.04em; }
.qp-header p { margin:7px 0 0;color:var(--qp-muted);font-size:13px; }
.qp-balance { padding:7px 11px;background:#28272a;color:#f2eee4;border-radius:20px;font-size:12px;font-variant-numeric:tabular-nums; }
.qp-balance:empty { display:none; }
.qp-layout { display:grid;grid-template-columns:minmax(285px,.83fr) minmax(300px,1.17fr);gap:clamp(12px,2vw,26px);align-items:start; }
.qp-composer,.qp-gallery { padding:clamp(14px,2vw,26px);border:1px solid var(--qp-line);background:#1b1d20;border-radius:13px;min-width:0; }
.qp-page h2 { font:650 20px/1.3 var(--studio-serif,serif);margin:0; }
.qp-composer { display:grid;gap:15px; }
.qp-page select,.qp-page textarea,.qp-page input[type=number] { background:#1b1d20;color:var(--qp-ink);font:inherit;font-size:13px;border:1px solid #474238;border-radius:7px;width:100%;padding:9px; }
.qp-page input[type=number] { max-width:82px; }
.qp-page textarea { min-height:112px;resize:vertical;line-height:1.6; }
.qp-composer label:not(.qp-upload),.qp-ref-label>span { color:#f2eee4;font-size:13px;font-weight:610; }
.qp-composer label:not(.qp-upload) { display:grid;gap:6px;min-width:0; }
.qp-fields { display:grid;grid-template-columns:1fr 1fr;gap:9px; }
.qp-ref-label small,.qp-bottom small,.qp-result-body>small { color:var(--qp-muted);font-size:11px; }
.qp-upload { position:relative;display:flex;align-items:center;justify-content:center;padding:10px;border:1px dashed #474238;border-radius:7px;background:#1b1d20;color:#f2eee4;cursor:pointer;gap:5px;font-size:12px;font-weight:600; }
.qp-upload input { position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer; }
.qp-upload:focus-within { outline:2px solid #b69c69;outline-offset:2px; }
.qp-upload:has(input:disabled) { opacity:.52; }
.qp-references { display:flex;gap:8px;flex-wrap:wrap; }
.qp-references:empty { display:none; }
.qp-ref { display:grid;position:relative;justify-items:center;gap:1px; }
.qp-ref img { display:block;width:51px;height:51px;object-fit:cover;border-radius:5px; }
.qp-page button:not(.qp-primary) { color:#f2eee4;background:#1b1d20;border:1px solid #474238;border-radius:6px;padding:6px 9px;font-size:12px;cursor:pointer; }
.qp-page button:hover:not(:disabled) { border-color:#b69c69; }
.qp-page button:disabled { opacity:.52;cursor:default; }
.qp-page .qp-ref button { border:0;padding:1px 3px;font-size:10px; }
.qp-page .qp-ref .qp-remove { position:absolute;right:-3px;top:-3px;border-radius:100%;border:1px solid #474238;width:18px;height:18px;display:grid;place-items:center;line-height:1; }
.qp-bottom { border-top:1px solid #474238;padding-top:14px; }
.qp-bottom small { text-align:right; }
.qp-page .qp-primary { width:100%;padding:13px 16px;background:#d5b77c;border:0;border-radius:8px;color:#f2eee4;font-weight:650;font-size:14px; }
.qp-page .qp-primary:hover:not(:disabled) { background:#d5b77c; }
.qp-note { margin:0;color:#f2eee4;font-size:12px;line-height:1.6;overflow-wrap:anywhere; }
.qp-note:empty { display:none; }
.qp-page button.qp-reload { font-size:11px;justify-self:start;padding:0;border:0;background:none;color:#b9b1a2; }
.qp-gallery>header { margin-bottom:15px; }
.qp-empty { min-height:260px;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;border:1px dashed #474238;border-radius:9px;background:#1b1d20;padding:20px; }
.qp-empty-art { width:50px;height:40px;border:1px solid #b69c69;position:relative;border-radius:4px;transform:rotate(-5deg);background:linear-gradient(148deg,transparent 59%,#28272a 60%,#28272a 74%,#28272a 75%); }
.qp-empty-art i { position:absolute;width:6px;height:6px;border-radius:50%;background:#d5b77c;left:9px;top:7px; }
.qp-empty h3 { font-size:15px;font-weight:600;margin:16px 0 4px; }
.qp-empty p { color:var(--qp-muted);font-size:12px;margin:0; }
.qp-grid { display:grid;grid-template-columns:repeat(auto-fit,minmax(min(195px,100%),1fr));gap:11px; }
.qp-result { border:1px solid #474238;border-radius:9px;overflow:hidden;min-width:0; }
.qp-result-body { padding:12px;display:grid;gap:6px; }
.qp-summary { align-items:flex-start; }
.qp-summary strong { font-size:13px; }
.qp-summary span { white-space:nowrap;color:#f2eee4;background:#28272a;padding:2px 5px;border-radius:4px;font-size:10px; }
.qp-summary [data-stage=completed] { color:#f2eee4;background:#1b1d20; }
.qp-summary [data-stage=failed],.qp-summary [data-stage=uncertain] { color:#f2eee4;background:#28272a; }
.qp-result p { margin:0;color:#f2eee4;font-size:12px;line-height:1.5;overflow-wrap:anywhere; }
.qp-result-body>p:not(.qp-problem) { display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden; }
.qp-result-body code { font-family:Consolas,monospace;color:#b9b1a2;font-size:10px;overflow-wrap:anywhere; }
.qp-result-body>button,.qp-result .qp-reconcile { justify-self:start; }
.qp-result .qp-reconcile { font-size:12px;color:#f2eee4;text-decoration:underline; }
.qp-result .qp-problem { color:#f2eee4; }
.qp-page .qp-thumb { display:block;width:100%;padding:0;border:0;border-radius:0;background:#28272a; }
.qp-thumb img { display:block;width:100%;height:clamp(165px,19vw,270px);object-fit:contain; }
.qp-preview { width:min(800px,92vw);max-height:91vh;padding:12px;border:1px solid #474238;border-radius:11px;background:#1b1d20;color:var(--qp-ink); }
.qp-preview:not([open]) { display:none; }
.qp-preview header { margin-bottom:9px; }
.qp-preview>img { width:100%;max-height:74vh;object-fit:contain;display:block;background:#1b1d20; }
@media(max-width:960px) { .qp-layout { grid-template-columns:minmax(250px,.88fr) minmax(200px,1fr); } }
@media(max-width:760px) { .qp-layout { grid-template-columns:1fr; } .qp-empty { min-height:140px; } .qp-grid { grid-template-columns:repeat(auto-fit,minmax(min(160px,100%),1fr)); } }
