:root{color-scheme:dark;font-family:Inter,Arial,sans-serif;background:#0b0b0c;color:#f3f3f0;font-synthesis:none;--line:#ffffff29;--panel:#171718;--muted:#a3a3a4;--accent:var(--rd-a)}*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:#0b0b0c}button,input,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:wait}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,summary:focus-visible{outline:2px solid var(--accent);outline-offset:2px}[hidden]{display:none!important}.shell{width:100%;min-height:100vh;padding:0 clamp(16px,2.4vw,42px) 38px}.topbar{min-height:76px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:28px}.brand{display:flex;align-items:center;gap:10px;color:#f5f5f5;text-decoration:none;white-space:nowrap}.brand-mark{display:grid;place-items:center;width:37px;height:37px;background:#232324;border:1px solid #4a4a4b;border-radius:14px;color:var(--accent);font-weight:800}.brand strong{display:block;font-size:14px}.brand small{display:block;color:#89898a;font-size:9px;letter-spacing:.12em;margin-top:3px}.topbar-section,.eyebrow{font-size:10px;font-weight:700;letter-spacing:.16em;color:#a0a0a1}.topbar-section{margin-left:auto}.account{display:flex;align-items:center;gap:12px;font-size:13px}.quiet{background:transparent;color:#bbb;border:1px solid var(--line);border-radius:13px;padding:8px 12px}.quiet:hover{color:#fff;background:#262627}.page-heading{display:flex;align-items:end;justify-content:space-between;gap:20px;padding:26px 0 25px}.page-heading .eyebrow{margin:0 0 8px}.page-heading h1{font-size:clamp(26px,3vw,39px);letter-spacing:-.045em;line-height:1.05;margin:0}.page-heading p:last-child{font-size:13px;color:var(--muted);margin:9px 0 0}.quota-chip{border:1px solid var(--line);border-radius:13px;padding:10px 14px;font-size:12px;color:#bbb;white-space:nowrap}.quota-chip strong{color:var(--accent)}.workspace{display:grid;grid-template-columns:minmax(200px,240px) minmax(330px,1fr) minmax(360px,1.15fr);gap:14px;align-items:start}.workspace>*{min-width:0}.panel{background:var(--panel);border:1px solid var(--line);border-radius:16px}.presets-panel,.composer,.results-panel{padding:18px;min-height:610px}.panel-heading{display:flex;justify-content:space-between;align-items:start;gap:12px}.panel-heading .eyebrow{margin:0 0 5px}.panel-heading h2,.settings-form h2,.users-panel h2{font-size:18px;letter-spacing:-.025em;margin:0}.section-note,.muted{color:var(--muted);font-size:12px;line-height:1.5}.section-note{margin:10px 0 15px}.presets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.preset-card{position:relative;min-width:0;border:1px solid var(--line);background:#1e1e1f;border-radius:14px;overflow:hidden}.preset-card.selected{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}.preset-card>button.select-preset{width:100%;padding:0;border:0;background:none;color:#eee;text-align:left}.preset-art{height:84px;display:grid;place-items:center;background:#272728;color:#777;font-size:30px;overflow:hidden}.preset-art img{width:100%;height:100%;object-fit:cover}.preset-name{display:block;font-size:11px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:8px}.preset-controls{display:flex;position:absolute;top:5px;right:5px;gap:3px}.preset-controls button,.job-controls button{border:1px solid #ffffff55;background:#111d;color:#fff;border-radius:12px;min-width:27px;min-height:27px;padding:3px;font-size:14px}.preset-controls button:hover,.job-controls button:hover{background:#eee;color:#141415}.preset-plus .preset-art{color:var(--accent)}.hidden-presets{border-top:1px solid var(--line);margin-top:16px;padding-top:12px}.hidden-presets summary{font-size:12px;color:#bbb;cursor:pointer;margin-bottom:10px}.composer-spark{color:var(--accent);font-size:22px}.composer>label,.settings-form label,.dialog label{display:block;margin-top:18px;color:#d8d8d9;font-size:12px;font-weight:650}.composer textarea,.dialog textarea{min-height:170px;resize:vertical}.composer textarea,.dialog textarea,input:not([type=radio]):not([type=file]){width:100%;margin-top:8px;padding:12px;border:1px solid #3d3d3e;border-radius:13px;background:#0e0e0f;color:#eee;outline:none}.composer textarea:focus,.dialog textarea:focus,input:focus{border-color:var(--accent)}.selected-preset{margin-top:16px;padding:10px 12px;border:1px solid #c4f53d66;border-radius:13px;background:#c4f53d10;color:var(--rd-a4);font-size:12px;display:flex;align-items:center;justify-content:space-between;gap:8px}.selected-preset button{background:none;border:0;color:var(--rd-a4);font-size:17px}.attachments-heading{display:flex;justify-content:space-between;align-items:baseline;gap:10px;margin-top:17px}.attachments-heading strong{font-size:12px}.attachments-heading span{font-size:10px;color:#999}.attachments{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px}.attachment{position:relative;width:58px;height:58px;border:1px solid var(--line);border-radius:12px;overflow:hidden}.attachment img{width:100%;height:100%;object-fit:cover}.attachment button{position:absolute;right:2px;top:2px;background:#111d;color:#fff;border:0;border-radius:11px}.upload-zone{display:flex!important;gap:9px;align-items:center;justify-content:center;min-height:47px;border:1px dashed #5a5a5b;border-radius:13px;color:#bdbdbe!important;cursor:pointer;margin-top:12px!important}.upload-zone span{font-size:23px;color:var(--accent)}.composer-bottom{border-top:1px solid var(--line);margin-top:20px;padding-top:16px;display:flex;align-items:center;justify-content:space-between;gap:12px}.composer-bottom small{font-size:11px;line-height:1.5;color:#888}.primary{border:1px solid var(--rd-a4);background:#eeeeec;color:#141415;border-radius:13px;padding:10px 15px;font-size:12px;font-weight:750;white-space:nowrap}.primary:hover{background:var(--accent);border-color:var(--accent)}.message{color:#ff9c9c;font-size:12px;line-height:1.5}.result-tabs{display:flex;gap:2px;border-bottom:1px solid var(--line);margin-top:18px}.result-tabs button{padding:10px 13px;border:0;border-bottom:2px solid transparent;background:none;color:#aaa;font-size:12px}.result-tabs button.active{color:var(--accent);border-bottom-color:var(--accent)}.jobs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;max-height:70vh;overflow:auto}.job{border:1px solid var(--line);border-radius:14px;background:#1e1e1f;overflow:hidden;min-width:0}.job-media{position:relative}.job-image,.job-placeholder{width:100%;aspect-ratio:1/1;display:block;object-fit:cover;background:#272728}.job-placeholder{display:grid;place-items:center;text-align:center;padding:14px;color:#bbb;font-size:12px}.job-controls{position:absolute;right:6px;top:6px;display:flex;flex-wrap:wrap;justify-content:end;gap:4px;max-width:calc(100% - 12px);opacity:0;transition:opacity .15s}.job:hover .job-controls,.job:focus-within .job-controls{opacity:1}.job-meta{padding:10px}.job-meta p{font-size:11px;line-height:1.4;margin:0 0 7px;overflow-wrap:anywhere}.job-meta small{color:#999;font-size:10px}.job-controls .on{color:var(--accent)}.empty{grid-column:1/-1;color:#8d8d8e;font-size:13px;line-height:1.5;padding:18px 0}.login{max-width:470px;margin:70px auto;padding:30px}.login h1{font-size:32px;margin:9px 0}.login form label{display:block;margin-top:15px;font-size:12px}.login .primary{width:100%;margin-top:20px}.notice{border:1px solid #c4f53d55;background:#c4f53d10;padding:12px;margin-top:15px;border-radius:13px}.notice p{font-size:12px}.notice button{background:#252526;border:1px solid var(--line);border-radius:12px;color:#fff;padding:8px}.owner-settings{margin-top:24px;border-top:1px solid var(--line);padding-top:20px}.owner-settings>summary{cursor:pointer;font-size:15px;font-weight:700;color:#eee}.admin-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:16px}.settings-form,.users-panel{padding:18px}.settings-form .primary{margin-top:16px}.users-panel{max-height:520px;overflow:auto}.user-row{border-bottom:1px solid var(--line);padding:11px 0}.user-row summary{cursor:pointer;font-size:12px}.user-row small{color:#999}.user-images{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-top:9px}.user-images img{width:100%;aspect-ratio:1;object-fit:cover}.dialog{width:min(560px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;border:1px solid #444;border-radius:16px;background:#181819;color:#eee;padding:20px}.dialog::backdrop{background:#000b}.dialog-head{display:flex;justify-content:space-between;align-items:start}.dialog-head h2{margin:4px 0 0;font-size:20px}.icon-button{background:none;border:0;color:#aaa;font-size:23px}.dialog fieldset{border:1px solid var(--line);border-radius:13px;margin-top:15px}.dialog fieldset label{display:inline-flex;align-items:center;gap:5px;margin:3px 14px 3px 0}.dialog-actions{display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:9px;margin-top:20px}.dialog-actions button:not(.primary){border:1px solid var(--line);border-radius:13px;background:#272728;color:#eee;padding:10px 12px;font-size:12px}.dialog-actions .danger{color:#ffaaa3!important}.recipe-media{display:flex;flex-wrap:wrap;gap:7px}.recipe-media img{width:90px;height:90px;object-fit:cover;border-radius:12px}.recipe-copy{white-space:pre-wrap;overflow-wrap:anywhere;background:#0e0e0f;padding:12px;border-radius:13px;font-size:12px;line-height:1.5}@media(max-width:1150px){.workspace{grid-template-columns:220px minmax(0,1fr)}.results-panel{grid-column:1/-1;min-height:0}.jobs{grid-template-columns:repeat(4,minmax(0,1fr))}.admin-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.users-panel{grid-column:1/-1}}@media(max-width:720px){.shell{padding:0 14px 30px}.topbar{gap:10px}.topbar-section{display:none}.account{margin-left:auto}.page-heading{padding:22px 0}.workspace,.admin-grid{grid-template-columns:1fr}.results-panel{grid-column:auto}.presets-panel,.composer,.results-panel{min-height:0}.presets{grid-template-columns:repeat(3,minmax(0,1fr))}.jobs{grid-template-columns:repeat(2,minmax(0,1fr));max-height:none}.composer-bottom{align-items:stretch;flex-direction:column}.composer-bottom .primary{width:100%}.users-panel{grid-column:auto}}@media(hover:none){.job-controls{opacity:1}}@media(max-width:390px){.brand small{display:none}.presets{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Compact studio: composition and library share the gallery's height. */
.results-tools{display:flex;flex-direction:column;align-items:flex-end;gap:7px;color:var(--muted);font-size:11px}
.result-scale{display:flex;align-items:center;gap:8px;white-space:nowrap}
.result-scale input[type=range]{width:96px;margin:0;padding:0;border:0;accent-color:var(--accent);cursor:pointer}
.result-scale output{min-width:34px;text-align:right;color:#eee;font-variant-numeric:tabular-nums}
.jobs{display:flex;flex-wrap:wrap;align-content:flex-start;align-items:flex-start;scrollbar-gutter:stable}
.job{flex:0 0 min(100%,var(--result-width,calc(50% - 5px)));max-width:100%}
.job-image{object-fit:contain}
.job-controls button,.job-controls a,.preset-controls button{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;min-width:30px;min-height:30px;padding:5px;border:1px solid #ffffff38;border-radius:12px;background:#1b1c19ee;color:#f2f3f5;text-decoration:none;box-shadow:0 1px 4px #0003;transition:background .15s,border-color .15s,color .15s}
.job-controls button:hover,.job-controls a:hover,.preset-controls button:hover{background:#363637;color:#fff;border-color:#ffffff80}
.job-controls button[aria-label="Удалить изображение"]:hover{background:#542b30;color:#ffd4d4;border-color:#dd7272}
.job-controls .on{color:var(--accent);border-color:#c4f53d66}
.job-controls .on svg{fill:#c4f53d20}
.job-controls svg,.preset-controls svg,.icon-button svg{display:block;flex-shrink:0}
.job-meta p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.attachment button,.selected-preset button{display:inline-flex;padding:3px}
.presets-panel{grid-area:presets}
.composer{grid-area:composer}
.results-panel{grid-area:results}
@media(min-width:901px){
  .shell{padding:0 clamp(16px,2.4vw,42px) 12px}
  .topbar{min-height:60px;height:60px}
  #studio{height:calc(100dvh - 72px);min-height:580px;display:flex;flex-direction:column}
  .page-heading{padding:14px 0;flex:none}
  .page-heading .eyebrow{margin-bottom:5px}
  .page-heading h1{font-size:28px}
  .page-heading p:last-child{margin-top:6px;font-size:12px}
  .workspace{flex:1;min-height:0;grid-template-columns:minmax(350px,1fr) minmax(390px,1.15fr);grid-template-rows:minmax(310px,1.65fr) minmax(158px,1fr);grid-template-areas:"composer results" "presets results";gap:12px;align-items:stretch}
  .presets-panel,.composer,.results-panel{min-height:0;padding:14px;min-width:0}
  .composer{display:flex;flex-direction:column;overflow:auto}
  .composer>*{flex-shrink:0}
  .composer>label{margin-top:10px}
  .composer textarea{flex:1 0 65px;min-height:65px;resize:none;margin-top:6px;padding:10px}
  .selected-preset{margin-top:8px;padding:6px 9px}
  .attachments-heading{margin-top:10px}
  .attachments:empty{display:none}
  .composer .attachments{margin-top:7px}
  .composer .attachment{width:42px;height:42px}
  .composer .upload-zone{min-height:34px;margin-top:8px!important}
  .composer-bottom{margin-top:10px;padding-top:10px}
  .composer-bottom small{max-width:260px}
  .presets-panel{overflow:auto}
  .presets-panel .panel-heading .eyebrow{display:none}
  .presets-panel .section-note{margin:6px 0 9px}
  .presets{grid-template-columns:repeat(auto-fill,minmax(105px,1fr))}
  .preset-art{height:66px}
  .hidden-presets{margin-top:10px;padding-top:8px}
  .results-panel{display:flex;flex-direction:column;grid-column:auto}
  .results-panel>.panel-heading,.results-panel>.result-tabs,.results-panel>.section-note{flex-shrink:0}
  .result-tabs{margin-top:10px}
  .results-panel .section-note{margin:8px 0 10px;font-size:11px}
  .jobs{flex:1;min-height:0;max-height:none;margin-top:10px;overflow:auto}
  .owner-settings{flex:none;margin-top:10px;padding-top:8px}
  .owner-settings>summary{font-size:12px}
  #studio:has(.owner-settings[open]){height:auto;min-height:calc(100dvh - 72px)}
  #studio:has(.owner-settings[open]) .workspace{flex:none;height:calc(100dvh - 202px);min-height:480px}
}
@media(max-width:900px){
  .workspace{grid-template-columns:1fr;grid-template-rows:auto;grid-template-areas:"composer" "presets" "results"}
  .presets-panel,.composer,.results-panel{min-height:0}
  .results-panel{grid-column:auto}
  .presets{grid-template-columns:repeat(auto-fill,minmax(100px,1fr))}
  .jobs{max-height:70dvh;overflow:auto}
  .job-controls{opacity:1}
  .results-panel>.panel-heading{align-items:center}
}
@media(max-width:440px){
  .results-panel>.panel-heading{flex-wrap:wrap}
  .results-tools{flex:1;min-width:180px}
  .result-scale input[type=range]{width:84px}
}

@media(min-width:901px){
  .workspace:has(.composer .attachments:not(:empty)){grid-template-rows:minmax(410px,1.65fr) minmax(130px,1fr)}
  .composer:has(.attachments:not(:empty)) .panel-heading .eyebrow{display:none}
  .composer:has(.attachments:not(:empty)) .selected-preset{margin-top:6px;padding:4px 8px}
  .composer:has(.attachments:not(:empty)) .composer-bottom{margin-top:8px;padding-top:8px}
}
/* Full-window image viewing and compact owner controls. */
.job-open{display:block;width:100%;padding:0;border:0;background:none;cursor:zoom-in}
.image-viewer{inset:0;width:100vw;max-width:none;height:100dvh;max-height:none;margin:0;padding:24px;border:0;background:#0a0a09f5;color:#eee;overflow:auto}
.image-viewer[open]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px}
.image-viewer::backdrop{background:#000d}
body:has(.image-viewer[open]){overflow:hidden}
.viewer-stage{display:flex;align-items:center;justify-content:center;flex:1;min-height:0;width:100%;cursor:zoom-out}
#viewer-image{display:block;max-width:100%;max-height:100%;object-fit:contain;box-shadow:0 12px 60px #0006}
.viewer-close{position:absolute;right:18px;top:14px;width:38px;height:38px;border:1px solid #ffffff40;border-radius:14px;background:#1b1c19ee;color:#fff;font-size:26px;z-index:1;cursor:pointer}
.viewer-actions{flex:none;max-width:100%;cursor:default}
.viewer-buttons{display:flex;justify-content:center;gap:8px;flex-wrap:wrap}
.viewer-buttons button,.viewer-buttons a{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 13px;min-height:40px;border:1px solid #ffffff35;border-radius:13px;background:#242425;color:#eee;text-decoration:none;font-size:12px;cursor:pointer}
.viewer-buttons button:hover,.viewer-buttons a:hover{background:#39393a;border-color:#ffffff80}
.viewer-buttons .on{color:var(--accent);border-color:#c4f53d66}
.viewer-buttons .delete-result:hover,.job-controls .delete-result:hover{background:#542b30;color:#ffd4d4}
.viewer-hint{margin:0;color:#999;font-size:11px;text-align:center}
#viewer-message{margin:0;flex:none}
.admin-grid{grid-template-columns:minmax(0,1.65fr) minmax(0,1fr);align-items:start}
#guest-password-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 14px}
#guest-password-form>h2,#guest-password-form>p{grid-column:1/-1;margin:0}
#guest-password-form>label{margin:0}
#guest-password-form>button{justify-self:start;margin:0;grid-column:1/-1}
.settings-form{padding:16px}
.settings-form label{margin-top:10px}
.settings-form .muted{margin:7px 0 10px;font-size:11px}
.settings-form input:not([type=checkbox]){padding:8px 10px;margin-top:5px}
.settings-form .primary{margin-top:10px}
#limits-form{display:grid;grid-template-columns:1fr 1fr;gap:10px 14px}
#limits-form>h2,#limits-form>p{grid-column:1/-1;margin:0}
#limits-form>label{margin:0}
#limits-form>button{margin:0;justify-self:start;grid-column:1/-1}
.users-panel{grid-column:1/-1;max-height:none;padding:16px}
.user-row{padding:13px 0}
.user-row>summary{font-size:13px;line-height:1.5}
.user-detail{display:grid;grid-template-columns:minmax(230px,300px) minmax(0,1fr);gap:22px;margin-top:14px}
.user-limit-form{align-self:start;display:flex;flex-direction:column;gap:10px;padding:14px;border:1px solid var(--line);border-radius:13px}
.user-limit-form label{font-size:12px;color:#ddd}
.check-label{display:flex;align-items:center;gap:8px;line-height:1.5}
input[type=checkbox]{width:16px!important;height:16px;margin:0!important;padding:0!important;accent-color:var(--accent);flex:none}
.user-limit-form input[type=number]{margin-top:6px;padding:8px 10px}
.user-limit-form input:disabled{opacity:.45}
.user-limit-form p{margin:0;font-size:11px;line-height:1.5}
.user-limit-actions{display:flex;flex-wrap:wrap;gap:8px}
.user-limit-actions button:not(.primary){padding:9px 10px;border:1px solid var(--line);border-radius:12px;background:#282829;color:#eee;font-size:11px}
.user-library{min-width:0}
.user-library h3{font-size:13px;margin:0 0 9px}
.user-library h3:not(:first-child){margin-top:20px}
.user-images{grid-template-columns:repeat(auto-fill,minmax(155px,1fr));max-height:420px;overflow:auto;gap:10px}
.user-images .job{width:100%}.user-images .job-controls{opacity:1}
.user-styles{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px}
.user-style{padding:10px;border:1px solid var(--line);border-radius:13px;min-width:0}
.user-style summary{font-size:12px;overflow-wrap:anywhere;cursor:pointer}
.user-style .recipe-copy{max-height:250px;overflow:auto}
@media(max-width:900px){.admin-grid{grid-template-columns:1fr}.user-detail{grid-template-columns:1fr}.user-limit-form{max-width:none}.image-viewer{padding:16px 10px}.viewer-buttons{gap:6px}.viewer-buttons button,.viewer-buttons a{padding:9px;font-size:11px}.viewer-stage{min-height:180px}.viewer-close{right:10px;top:10px}}
@media(max-width:540px){#guest-password-form,#limits-form{grid-template-columns:1fr}.user-styles{grid-template-columns:1fr}.viewer-buttons button span,.viewer-buttons a span{display:none}.viewer-buttons button,.viewer-buttons a{width:42px;height:42px}.image-viewer[open]{gap:10px}}
/* Natural image proportions and a compact, staggered gallery. */
#jobs{display:grid;grid-auto-rows:1px;grid-auto-flow:row dense;gap:10px;align-content:start;align-items:start}
#jobs>.job{height:auto;align-self:start;width:100%;max-width:100%}
#jobs>.empty{grid-column:1/-1;grid-row:span 6}
.job-image{height:auto;aspect-ratio:auto;object-fit:contain;background:none}
.job-open{line-height:0}
.composer-bottom{display:flex;flex-direction:column;align-items:stretch;gap:8px}
.composer-bottom small{max-width:none}
.generation-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.queue-toggle{border:1px solid var(--line);border-radius:13px;background:#252526;color:#ddd;padding:10px 12px;font-size:12px;white-space:nowrap}
.queue-toggle[aria-pressed=true]{border-color:var(--accent);color:var(--accent);background:#c4f53d10}
.copies-control{display:flex;flex-direction:column;gap:3px;width:78px;flex:none;font-size:10px;color:#aaa;margin:0!important}
.copies-control>span:first-child{display:flex;justify-content:space-between}
.copies-control output{color:#eee}
.copies-control input[type=range]{width:100%;padding:0;margin:0;border:0;accent-color:var(--accent);cursor:pointer}
.copies-control:has(input:disabled){opacity:.4}
.copies-ticks{display:flex;justify-content:space-between;font-size:9px;line-height:1}
.generation-actions .primary{width:auto;white-space:nowrap}
.composer .attachments{max-height:98px;overflow:auto;flex-shrink:0}
@media(min-width:901px){.composer-bottom small{max-width:none}.generation-actions{gap:8px}.queue-toggle{padding:10px;font-size:11px}.generation-actions .primary{font-size:12px;padding:11px}}
@media(max-width:900px){
  .shell{padding-left:14px;padding-right:14px}
  .result-scale{display:none}
  .results-panel{margin-left:-14px;margin-right:-14px;border-left:0;border-right:0;border-radius:0;padding-left:0;padding-right:0}
  .results-panel>.panel-heading,.results-panel>.result-tabs,.results-panel>.section-note{margin-left:16px;margin-right:16px}
  #jobs{max-height:none;overflow:visible;scrollbar-gutter:auto}
  #jobs>.job{border-left:0;border-right:0;border-radius:0}
  .generation-actions{gap:8px;justify-content:space-between}
  .generation-actions .primary{font-size:11px;padding:10px}
  .queue-toggle{font-size:11px;padding:10px 8px}
  .copies-control{width:64px}
}
@media(min-width:901px){
  .workspace:has(.composer .attachments:not(:empty)){grid-template-rows:minmax(445px,2.4fr) minmax(130px,1fr)}
  .composer .attachment{width:36px;height:36px}
}
/* Coherent generation controls, larger references, horizontal preset shelves. */
.composer-bottom{display:grid;grid-template-columns:minmax(125px,1fr) auto;align-items:center;gap:14px}
.composer-bottom #generation-note{max-width:215px;line-height:1.5;font-size:11px;margin:0;color:#a3a3a4}
.generation-actions{display:flex;flex-wrap:nowrap;align-items:center;gap:8px}
.generation-actions .queue-toggle,.generation-actions .primary{height:44px;border-radius:14px;padding:0 12px;font-size:11px;font-weight:650}
.queue-toggle{background:#1e1e1f;border-color:#414348;color:#c7c9cd;transition:background .15s,border-color .15s}
.queue-toggle:hover{background:#2d2d2e;border-color:#777}
.queue-toggle[aria-pressed=true]{background:#c4f53d14;border-color:#c4f53d77;color:var(--rd-a4)}
.copies-control{position:relative;gap:4px;width:104px;font-size:9px}
.copies-control>span:first-child{padding:0 2px;color:#aaa}
.copies-control output{display:none}
.copies-control #generation-copies{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none;padding:0;border:0}
.copies-segments{display:grid;grid-template-columns:repeat(4,1fr);padding:3px;gap:2px;background:#0c0c0d;border:1px solid #3e4145;border-radius:13px}
.copies-segments button{border:0;border-radius:11px;background:none;color:#999;font-size:11px;font-weight:650;height:25px;padding:0}
.copies-segments button[aria-pressed=true]{background:var(--rd-a4);color:#101011;box-shadow:0 1px 3px #0006}
.copies-segments button:hover:not(:disabled){background:#303031;color:var(--rd-a4)}
.copies-control:has(input:disabled){opacity:.4}
.composer .attachments{flex-wrap:nowrap;max-height:none;height:70px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;gap:8px;padding:3px 0}
.composer .attachment{width:64px;height:64px;flex:0 0 64px;border-radius:13px}
.attachment img{cursor:zoom-in}.attachment-preview{position:fixed;z-index:10000;padding:7px;border:1px solid #ffffff45;border-radius:16px;background:#171718;box-shadow:0 16px 60px #000b;pointer-events:none}
.attachment-preview img{width:100%;height:100%;object-fit:contain;border-radius:11px}
.presets-panel{overflow:visible}
.presets{display:flex;flex-wrap:nowrap;gap:8px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;min-height:0}
.presets::-webkit-scrollbar,.composer .attachments::-webkit-scrollbar{display:none}
.presets .preset-card{flex:0 0 86px;min-width:0}
.presets .preset-art{height:48px;font-size:25px}.presets .preset-name{padding:5px 7px;font-size:10px}
.presets .preset-controls{top:3px;right:3px;gap:3px}.presets .preset-controls button{width:24px;height:24px;min-width:24px;min-height:24px;padding:4px}
.hidden-presets{margin-top:7px;padding-top:6px}.hidden-presets summary{font-size:10px;margin-bottom:6px}
#hidden-presets .preset-card{flex-basis:72px}#hidden-presets .preset-art{height:30px;font-size:18px}#hidden-presets .preset-name{padding:4px 5px;font-size:9px}
#hidden-presets .preset-controls button{width:22px;height:22px;min-width:22px;min-height:22px;padding:3px}
@media(min-width:901px){
 .workspace:has(.composer .attachments:not(:empty)){grid-template-rows:minmax(385px,1.8fr) minmax(195px,1fr)}
 .presets-panel{padding:12px 14px}
 .presets-panel .section-note{margin:4px 0 7px;font-size:10px}
 .presets-panel .panel-heading h2{font-size:16px}
 .hidden-presets{margin-top:5px;padding-top:4px}
 .composer:has(.attachments:not(:empty)) .composer-bottom{padding-top:8px;margin-top:8px}
}
@media(min-width:901px) and (max-width:1200px){.composer-bottom{grid-template-columns:1fr;gap:7px}.composer-bottom #generation-note{max-width:none}.generation-actions{justify-content:space-between}.generation-actions .queue-toggle,.generation-actions .primary{padding:0 9px}}
@media(max-width:900px){.composer-bottom{grid-template-columns:1fr;gap:10px}.composer-bottom #generation-note{max-width:260px}.generation-actions{justify-content:space-between}.copies-control{width:100px}.generation-actions .queue-toggle,.generation-actions .primary{padding:0 9px}.presets-panel{overflow:visible}}
@media(min-width:901px){
 .composer{position:relative}
 .composer>.selected-preset{position:absolute;top:10px;left:145px;right:45px;margin:0!important;padding:2px 8px!important;height:30px;overflow:hidden;white-space:nowrap}
 .composer>.selected-preset button{flex-shrink:0}
}
@media(max-width:540px){
 .generation-actions{display:grid;grid-template-columns:1fr 100px;gap:8px}
 .generation-actions .primary{grid-column:1/-1;width:100%}
 .generation-actions .queue-toggle{width:100%}
 .generation-actions .copies-control{justify-self:end}
}
@media(min-width:1201px){
 .generation-actions{gap:6px}
 .generation-actions .queue-toggle{width:92px;padding:0 5px;font-size:10px}
 .generation-actions .primary{padding:0 9px;font-size:10px}
 .copies-control{width:84px}
 .composer-bottom #generation-note{font-size:10px;line-height:1.5}
 .composer .message{margin:5px 0;font-size:11px;line-height:1.35}
}
@media(min-width:901px){.composer:has(.attachments:not(:empty)) .composer-bottom{margin-top:6px;padding-top:6px}}
@media(min-width:901px){.presets-panel:has(.hidden-presets[open])>.section-note{display:none}}

.composer.file-drag-over{outline:2px solid var(--rd-a2);outline-offset:-2px}.composer.file-drag-over .upload-zone{border-color:var(--rd-a2);background:rgba(var(--rd-rgb),.09)}

/* Compact horizontal preset tiles; reveal tools without shifting the label. */
.presets .preset-card{flex:0 0 212px}
.presets .preset-card>button.select-preset{display:flex;align-items:center;min-height:62px;gap:0}
.presets .preset-art{flex:0 0 62px;width:62px;height:62px;font-size:25px}
.presets .preset-name{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal;overflow:hidden;overflow-wrap:anywhere;padding:0 12px;font-size:12px;line-height:1.4;text-overflow:ellipsis}
.presets .preset-controls{left:5px;right:auto;top:50%;transform:translateY(-50%);opacity:0;pointer-events:none;transition:opacity .15s}
.presets .preset-card:hover .preset-controls,.presets .preset-card:focus-within .preset-controls{opacity:1;pointer-events:auto}
#hidden-presets .preset-card{flex-basis:190px}
#hidden-presets .preset-card>button.select-preset{min-height:48px}
#hidden-presets .preset-art{flex-basis:54px;width:54px;height:48px;font-size:22px}
#hidden-presets .preset-name{padding:0 10px;font-size:11px;line-height:1.35}
@media(hover:none){.presets .preset-controls{opacity:1;pointer-events:auto}}

.preset-scale-control{display:flex;align-items:center;gap:7px;font-size:10px;color:var(--muted);white-space:nowrap}
.preset-scale-control input[type=range]{width:78px;margin:0;padding:0;border:0;accent-color:var(--accent)}
.preset-scale-control output{width:30px;text-align:right;color:#eee}
@media(min-width:901px){
 .presets .preset-card{flex-basis:var(--preset-tile-width,212px);height:var(--preset-row-height,64px)}
 .presets .preset-card>button.select-preset{height:100%;min-height:0}
 .presets .preset-art{height:100%;width:var(--preset-row-height,62px);flex-basis:var(--preset-row-height,62px);flex-shrink:0}
 .presets .preset-name{font-size:clamp(10px,calc(var(--preset-row-height,62px) * .19),14px);line-height:1.25;padding:0 10px}
 #hidden-presets .preset-card{flex-basis:var(--hidden-tile-width,190px);height:var(--hidden-row-height,48px)}
 #hidden-presets .preset-card>button.select-preset{height:100%;min-height:0}
 #hidden-presets .preset-art{height:100%;width:var(--hidden-row-height,48px);flex-basis:var(--hidden-row-height,48px)}
 #hidden-presets .preset-name{font-size:clamp(10px,calc(var(--hidden-row-height,48px) * .21),13px);line-height:1.2}
}
@media(max-width:900px){.preset-scale-control{display:none}}

/* Same source, independent executor embedded in the main HomeAI shell. */
.embedded .topbar,.admin-only .topbar{display:none}.embedded .shell{padding:0;min-height:100dvh}.embedded .page-heading{padding:10px 2px 12px}.embedded .page-heading h1{font-size:23px}.embedded .page-heading .eyebrow,.embedded .page-heading p:last-child{display:none}.embedded #studio{padding:0}.admin-only .shell{padding:0;min-height:100dvh}.admin-only .page-heading,.admin-only .workspace,.admin-only #admin-settings>summary{display:none}.admin-only #admin-settings{margin:0;padding:0;border:0}.admin-only .admin-grid{margin-top:0}.admin-only .users-panel{max-height:none}.admin-only .login{display:none}@media(min-width:901px){.embedded .workspace{height:calc(100dvh - 55px);min-height:0}.embedded .shell:has(#studio:not([hidden])){height:100dvh}}@media(max-width:900px){.embedded .shell{padding:4px}.embedded .workspace{height:auto}}

/* Compact ratio selector shared by PC studio and VPS photo. */
.prompt-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;position:relative;z-index:12;min-height:34px}.prompt-heading>label{margin:0}.aspect-picker{position:relative;font-size:12px}.aspect-picker summary{display:flex;align-items:center;gap:8px;cursor:pointer;list-style:none;padding:6px 10px;border:1px solid #444;border-radius:12px;background:#252526;min-width:104px;justify-content:space-between}.aspect-picker summary::-webkit-details-marker{display:none}.aspect-symbol{display:inline-block;flex-shrink:0;border:1.5px solid currentColor;border-radius:2px;box-sizing:border-box}.aspect-options{position:absolute;right:0;top:calc(100% + 5px);width:164px;max-height:55vh;overflow:auto;padding:5px;background:#232324;border:1px solid #454546;border-radius:14px;box-shadow:0 12px 32px #0009;z-index:50}.aspect-options button{display:flex;align-items:center;gap:13px;width:100%;min-height:33px;padding:6px 12px;background:transparent;border:0;border-radius:11px;text-align:left}.aspect-options button[aria-pressed=true]{background:#b8f21720;color:var(--rd-a)}.aspect-options button:hover{background:#ffffff12}.aspect-options button:focus-visible,.aspect-picker summary:focus-visible{outline:2px solid var(--rd-a);outline-offset:1px}

/* Match the rectangular main HomeAI workspace; independent /photo keeps its theme. */
.main-photo :is(.panel,button,input,textarea,select,.preset-card,.job-card,.upload-zone,.dialog,.copies-control,.aspect-picker summary){border-radius:10px!important}
.quality-control{display:flex;flex-direction:column;gap:3px;font-size:11px}.quality-control select{padding:7px;background:#1a1a1b;color:inherit;border:1px solid #444;max-width:150px}
.embedded .shell:has(#admin-settings[open]){height:auto;overflow:visible}.embedded #admin-settings{margin-top:12px}.embedded .shell{height:auto!important;min-height:100dvh}

.gallery-only .topbar,.gallery-only .page-heading,.gallery-only .composer,.gallery-only .presets-panel,.gallery-only #admin-settings{display:none!important}
.gallery-only .shell,.gallery-only #studio{padding:0;min-height:0;height:100dvh}.gallery-only .workspace{display:block;height:100%;min-height:0}.gallery-only .results-panel{height:100%;min-height:0}.gallery-only .jobs{flex:1;min-height:0}
.main-photo .quality-control{flex-direction:row;align-items:center;white-space:nowrap;font-size:12px;margin:0;gap:6px}.main-photo .quality-control select{width:60px;padding:5px}.main-photo .prompt-heading>label:first-child{flex:1}.main-photo .job,.main-photo .job-image,.main-photo .job-media{border-radius:10px!important}

.gallery-only .results-panel{margin:0;width:100%;min-width:0!important;padding:12px;border-radius:10px;min-height:0!important;display:flex;flex-direction:column}
.gallery-only #jobs{min-width:0;min-height:0;overflow:auto;max-height:none;flex:1}
.gallery-only .results-panel>.panel-heading,.gallery-only .results-panel>.result-tabs,.gallery-only .results-panel>.section-note{margin-left:0;margin-right:0}
.gallery-only.desktop-gallery .result-scale{display:flex}.gallery-only .panel-heading{flex-wrap:wrap}
/* Compact gallery captions; actions reveal on hover or keyboard focus. */
.jobs .job .job-controls{opacity:0;pointer-events:none;transition:opacity .16s}.jobs .job:hover .job-controls,.jobs .job:focus-within .job-controls{opacity:1;pointer-events:auto}.job-meta{padding:5px 7px!important}.job-meta p{font-size:10px!important;line-height:1.35!important;margin:0!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.job-meta small{font-size:9px!important;line-height:1.2}.job-meta:has(+*){min-height:0}.job-controls{gap:3px}.job-controls button,.job-controls a{width:26px!important;height:26px!important;min-width:26px!important;min-height:26px!important;border-radius:10px!important;background:#111e!important}
@media(hover:none){.jobs .job .job-controls{opacity:1;pointer-events:auto;position:static;padding:4px;background:#171718}}
.workspace-divider{display:none}.embedded .page-heading{display:none}.embedded .composer .eyebrow,.embedded .presets-panel .eyebrow{display:none}.embedded .composer-spark{display:none}.embedded .composer,.embedded .presets-panel{background:#161617;border-color:#3c3c3d;border-radius:10px;padding:12px}.embedded .panel-heading h2{font-size:18px}.embedded .prompt-heading{gap:7px;flex-wrap:wrap}.embedded .composer-bottom{border-top:1px solid #414142;padding-top:9px;gap:8px}.embedded .generation-actions{display:flex;flex-wrap:wrap;gap:7px;justify-content:flex-end}.embedded .generation-actions button{min-height:34px;border-radius:10px}.embedded #generate-submit{background:var(--rd-a4);color:#161617;flex:1;font-weight:750}.embedded .composer #prompt{min-height:70px;flex:1;margin-top:8px;border-color:#434344;border-radius:10px}.embedded .attachments{max-height:100px;min-height:0}.embedded .attachment{width:72px;height:72px}.embedded .composer .upload-zone{margin-top:7px;padding:8px;background:#202021;border:1px dashed var(--rd-a2)}.embedded #generation-note{font-size:10px;line-height:1.4;max-width:210px}.embedded .presets-panel .section-note{margin:4px 0 7px;font-size:10px}
@media(min-width:901px){.embedded .workspace,.embedded .workspace:has(.composer .attachments:not(:empty)){height:100%;min-height:0;grid-template-columns:minmax(280px,var(--composer-ratio,48%)) 12px minmax(220px,1fr);grid-template-rows:minmax(0,1fr) minmax(115px,.45fr);grid-template-areas:'composer divider results' 'presets divider results';gap:0;row-gap:10px}.embedded #studio{height:100%;min-height:0}.embedded .workspace-divider{display:block;grid-area:divider;cursor:col-resize;touch-action:none;position:relative}.workspace-divider:after{content:'';position:absolute;left:5px;top:42%;bottom:42%;width:3px;background:var(--rd-a2);border-radius:10px}.workspace-divider:hover:after,.workspace-divider:focus-visible:after{background:var(--rd-a);top:15%;bottom:15%}.embedded .composer{min-height:0;overflow:auto}.embedded .presets-panel{min-height:0}.embedded .results-panel{min-height:0}.embedded .shell:has(#studio:not([hidden])){height:100dvh}.embedded:has(.owner-settings[open]) .workspace{height:calc(100dvh - 40px)}.embedded .owner-settings{margin-top:8px;padding-top:7px}}
@media(max-width:900px){.embedded .generation-actions{justify-content:stretch}.embedded .composer-bottom{align-items:stretch}}
@media(max-width:900px){.embedded .prompt-heading>label:first-child{flex-basis:100%;font-size:12px}.embedded .attachments:empty{display:none!important}.embedded .attachments-heading{margin-top:10px}.embedded .composer #prompt{min-height:100px}.embedded .composer-bottom{margin-top:10px}.embedded .generation-actions .queue-toggle{width:auto;flex:1}.embedded .composer{min-height:0}.embedded .attachments-heading span{max-width:160px;text-align:right}.embedded .shell{min-height:0}}

/* Scoped preset library embedded by Project Posts. */
html.library-only .topbar,html.library-only .page-heading,html.library-only .composer,html.library-only .results-panel,html.library-only #admin-settings,html.library-only .workspace-divider{display:none!important}
html.library-only .shell{max-width:none;padding:8px}html.library-only .workspace{display:block!important;height:auto!important;min-height:0!important}html.library-only .presets-panel{height:auto!important;min-height:220px;overflow:visible!important}html.library-only .presets{display:flex!important;flex-wrap:wrap!important;height:auto!important;overflow:visible!important}html.library-only .preset-card{width:220px;min-height:66px}html.library-only .preset-scale-control{display:none}#preset-sections{display:grid;gap:8px}#preset-sections label{display:flex;align-items:center;gap:8px;font-size:13px}

/* Give the embedded grid a definite viewport, including the collapsed settings row. */
@media(min-width:901px){
 html.embedded .shell:has(#studio:not([hidden])){height:100dvh!important;min-height:0;display:flex;flex-direction:column;padding:0}
 html.embedded #studio:not([hidden]){height:100%;min-height:0;display:flex;flex-direction:column}
 html.embedded #studio>.workspace,html.embedded #studio>.workspace:has(.composer .attachments:not(:empty)){flex:1;min-height:0;height:0!important;grid-template-rows:minmax(0,1fr) clamp(190px,32%,300px);grid-template-columns:minmax(0,var(--composer-ratio,48%)) 12px minmax(0,1fr)}
 html.embedded #admin-settings{flex:none;margin:8px 0 0;padding-top:7px}
 html.embedded .shell:has(#admin-settings[open]){height:auto!important;min-height:100dvh}
 html.embedded #studio:has(#admin-settings[open]){height:auto}
 html.embedded #studio:has(#admin-settings[open])>.workspace{flex:none;height:calc(100dvh - 36px)!important;min-height:480px}
 html.embedded .presets-panel{overflow:hidden}
 html.embedded .composer #prompt{max-height:none;resize:none}
 html.embedded .presets .preset-name{font-size:clamp(11px,calc(var(--preset-row-height,80px) * .18),16px)}
}
@media(min-width:901px){html.embedded .composer{container-type:inline-size}}
@container(min-width:460px){html.embedded .composer-bottom{display:grid!important;grid-template-columns:minmax(100px,1fr) auto!important;align-items:center!important;gap:10px!important}html.embedded .generation-actions{flex-wrap:nowrap!important}html.embedded .generation-actions .primary{flex:none!important}html.embedded .copies-control{width:82px}html.embedded .generation-actions button{font-size:11px!important;padding-left:8px;padding-right:8px}}
@media(min-width:901px){html.embedded #studio>.workspace:has(.composer .attachments:not(:empty)){grid-template-rows:minmax(0,1fr) clamp(170px,30%,280px)}html.embedded .generation-actions .copies-segments button{padding:0!important;min-width:0!important;min-height:25px!important;height:25px!important}}

.failed-job-actions{display:flex;flex-wrap:wrap;gap:6px;padding:10px}.failed-job-actions button{flex:1;min-width:76px;min-height:34px;font-size:12px;border-radius:11px}.failed-job-actions .retry-result{background:var(--rd-a4);color:#171718}.failed-job-actions .delete-result{background:transparent;color:#c9c9ca;border:1px solid #454546}

/* Preset tools occupy the label area, leaving the image available for preview. */
.presets .preset-controls{left:auto;right:6px;top:50%;transform:translateY(-50%);padding:3px;background:#1e1e1f;border-radius:11px}
.presets .preset-art img{cursor:zoom-in}
@media(hover:hover){.presets .preset-card:hover .preset-name,.presets .preset-card:focus-within .preset-name{opacity:0}}
#selected-preset{display:none!important}
.composer.has-preset #prompt{border-color:var(--rd-a4);box-shadow:0 0 0 1px #dceab640}
.job.job-failed .job-placeholder{aspect-ratio:auto;height:auto;min-height:38px;padding:10px 12px;background:#202021;font-size:11px;text-align:left;place-items:center start}
.job.job-failed .failed-job-actions{padding:6px 8px;gap:5px}
.job.job-failed .failed-job-actions button{min-height:30px;padding:5px 8px}
.job.job-failed .job-meta{padding:6px 8px 9px}
.job.job-failed .job-meta small{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}

/* Content-sized labels keep the image square and reserve room for hover tools. */
.presets .preset-card{flex:0 0 auto!important;width:auto!important;max-width:none}
.presets .preset-card>button.select-preset{width:auto;min-width:0}
.presets .preset-name{flex:none!important;width:max-content!important;max-width:none!important;min-width:66px;white-space:pre!important;display:block!important;-webkit-line-clamp:unset;overflow:hidden;text-overflow:ellipsis;padding:0 10px}
.presets .preset-art{aspect-ratio:1;flex-shrink:0}
.generation-actions .queue-toggle,.embedded .generation-actions .queue-toggle{width:auto!important;min-width:max-content;flex-shrink:0;white-space:nowrap;padding:0 12px!important}
.generation-actions{flex-wrap:wrap}
.attachment-preview.preset-preview{display:flex;flex-direction:column;gap:7px;padding:10px;overflow:hidden}
.attachment-preview.preset-preview img{flex:1;min-height:0;height:0;object-fit:contain}
.attachment-preview.preset-preview strong{font-size:14px;line-height:1.35;overflow-wrap:anywhere;flex-shrink:0}
.attachment-preview.preset-preview p{margin:0;font-size:12px;line-height:1.4;color:#bdbdbe;overflow:auto;max-height:100px;flex-shrink:0}
#preset-description{min-height:70px}

.project-enhance-row{display:flex;align-items:center;gap:10px;margin-top:10px;font-size:11px}.project-enhance-row>button{padding:7px 12px;border:1px solid #666;background:#252526;color:#eee;white-space:nowrap}.project-enhance-row span{display:flex;gap:6px;align-items:center;min-width:0}.project-result-nav{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#1b1b1c;color:var(--rd-a4);font-size:12px;padding:4px 8px}.project-result-nav button{background:transparent;color:inherit;border:0;font-size:23px;padding:0 12px;min-height:30px}.job-project .job-media{position:relative}

/* Results scope switch (Home / Standalone / All) and animated gallery */
.scope-switch{display:inline-flex;gap:3px;padding:3px;margin:0 0 8px;border:1px solid rgba(255,255,255,.16);border-radius:14px;background:rgba(255,255,255,.04)}
.scope-switch button{padding:5px 14px;border:0;border-radius:12px;background:transparent;color:inherit;font:inherit;font-size:12.5px;font-weight:600;cursor:pointer;transition:background .18s,color .18s}
.scope-switch button:hover{background:rgba(255,255,255,.1)}
.scope-switch button[aria-pressed=true]{background:var(--rd-a);color:#09090a}
.jobs>.job{will-change:transform}
@media (prefers-reduced-motion:reduce){.jobs>.job{will-change:auto}}

.settings-form .check-row{display:flex;gap:.6rem;align-items:flex-start;flex-direction:row;line-height:1.35}.settings-form .check-row input{width:auto;margin-top:.25rem}

.job[data-engine="banana"] .job-media::after{content:'Banana';position:absolute;top:8px;left:8px;padding:3px 8px;border-radius:999px;background:#f5d547;color:#1a1500;font-size:10px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;pointer-events:none}.job-media{position:relative}

.storage-open{margin-left:8px;padding:3px 10px;font-size:11px}
.storage-dialog{width:min(560px,94vw)}
.storage-bar{height:8px;border-radius:99px;background:#ffffff1a;overflow:hidden;margin:6px 0 4px}.storage-bar i{display:block;height:100%;background:var(--accent);border-radius:99px}
.storage-list{list-style:none;margin:10px 0;padding:0;max-height:48vh;overflow:auto;display:grid;gap:6px}
.storage-list li{display:grid;grid-template-columns:52px 1fr auto;gap:12px;align-items:center;padding:6px 8px;border:1px solid var(--line);border-radius:14px;background:#1b1b1c}
.storage-list img{width:52px;height:52px;object-fit:cover;border-radius:13px;background:#252526}
.storage-meta{display:grid;gap:2px;font-size:13px}.storage-meta small{color:var(--muted);font-size:11px}
.storage-list .danger{border-radius:14px;padding:8px 12px}
/* self-hosted fonts (CSP allows only self) */
@font-face{font-family:'Geist Mono';font-style:normal;font-weight:400 600;font-display:swap;src:url('/photo/fonts/geist-mono-cyrillic.woff2') format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116}
@font-face{font-family:'Geist Mono';font-style:normal;font-weight:400 600;font-display:swap;src:url('/photo/fonts/geist-mono-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Manrope';font-style:normal;font-weight:400 800;font-display:swap;src:url('/photo/fonts/manrope-cyrillic.woff2') format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116}
@font-face{font-family:'Manrope';font-style:normal;font-weight:400 800;font-display:swap;src:url('/photo/fonts/manrope-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Unbounded';font-style:normal;font-weight:300 700;font-display:swap;src:url('/photo/fonts/unbounded-cyrillic.woff2') format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116}
@font-face{font-family:'Unbounded';font-style:normal;font-weight:300 700;font-display:swap;src:url('/photo/fonts/unbounded-latin.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
/* ===== photo-service · OBSIDIAN AURORA overrides ===== */
html:root{
  --rd-bg:#080809;--rd-s0:rgba(255,255,255,.022);--rd-s1:rgba(255,255,255,.04);--rd-s2:rgba(255,255,255,.07);--rd-s3:rgba(255,255,255,.11);
  --rd-line:rgba(255,255,255,.075);--rd-line2:rgba(255,255,255,.15);--rd-tx:#f1f6ec;--rd-tx2:#b0b0b1;--rd-tx3:#747475;
  --rd-a:#c6f432;--rd-a2:#9fe22b;--rd-a3:#e8ff7a;--rd-a4:#e8ff9a;--rd-rgb:198,244,50;--rd-ok:#5ef2b0;--rd-bad:#ff6b83;
  --rd-grad:linear-gradient(120deg,var(--rd-a) 0%,var(--rd-a2) 55%,var(--rd-a2) 100%);
  --rd-ease:cubic-bezier(.22,1,.36,1);--rd-spring:cubic-bezier(.34,1.56,.64,1);
  --rd-font:Manrope,Inter,system-ui,sans-serif;--rd-disp:Unbounded,Manrope,sans-serif;--rd-mono:"Geist Mono",ui-monospace,Consolas,monospace;
  --accent:var(--rd-a);--line:rgba(255,255,255,.1);--panel:#111112;--muted:#9d9d9e;
  font-family:var(--rd-font);background:var(--rd-bg);color:var(--rd-tx)}
html:root body{background:var(--rd-bg)!important;color:var(--rd-tx);font-family:var(--rd-font);-webkit-font-smoothing:antialiased;position:relative}
html:root.embedded,html:root.embedded body,html:root.admin-only,html:root.admin-only body{background:transparent!important}
html:root body::before{content:"";position:fixed;inset:-20%;z-index:-2;pointer-events:none;background:radial-gradient(38% 34% at 12% 8%,rgba(var(--rd-rgb),.18),transparent 70%),radial-gradient(34% 30% at 92% 18%,rgba(var(--rd-rgb),.10),transparent 70%),radial-gradient(40% 36% at 70% 105%,rgba(var(--rd-rgb),.09),transparent 70%);animation:rd-aurora 28s ease-in-out infinite alternate}
html:root.embedded body::before,html:root.admin-only body::before{display:none}
@keyframes rd-aurora{0%{transform:translate3d(0,0,0) scale(1)}50%{transform:translate3d(3%,2%,0) scale(1.08)}100%{transform:translate3d(-3%,3%,0) scale(1.03)}}
html:root *{scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.16) transparent}
html:root ::-webkit-scrollbar{width:9px;height:9px}html:root ::-webkit-scrollbar-thumb{background:rgba(255,255,255,.14);border-radius:9px;border:2px solid transparent;background-clip:content-box}html:root ::-webkit-scrollbar-thumb:hover{background:rgba(var(--rd-rgb),.5);background-clip:content-box}
html:root ::selection{background:rgba(var(--rd-rgb),.45);color:#fff}
html:root :focus-visible{outline:2px solid var(--rd-a)!important;outline-offset:2px!important}
@keyframes rd-in{from{opacity:0;transform:translateY(20px) scale(.985)}to{opacity:1;transform:none}}
@keyframes rd-pop{from{opacity:0;transform:scale(.88) translateY(10px)}to{opacity:1;transform:none}}
@keyframes rd-rip{to{transform:scale(1);opacity:0}}
@keyframes rd-sheen{0%,60%{transform:translateX(-120%)}100%{transform:translateX(120%)}}
@keyframes rd-pulse{0%,100%{box-shadow:0 0 0 0 rgba(var(--rd-rgb),.5)}60%{box-shadow:0 0 0 12px rgba(var(--rd-rgb),0)}}
@keyframes rd-spin{to{transform:rotate(360deg)}}
@keyframes rd-shimmer{to{background-position:-200% 0}}

/* typography */
html:root :is(h1,h2,h3){font-family:var(--rd-disp);letter-spacing:-.02em;font-weight:600;color:var(--rd-tx)}
html:root .eyebrow{font:600 11.2px var(--rd-mono)!important;letter-spacing:.2em!important;color:var(--rd-a2)!important;text-transform:uppercase}
html:root :is(.muted,.section-note,small){color:var(--rd-tx3)!important}
html:root .section-note{font-size:11.5px}

/* topbar (standalone /photo) */
html:root .topbar{margin:12px 0 0;padding:0 16px!important;border-radius:18px!important;background:linear-gradient(180deg,rgba(255,255,255,.05),rgba(255,255,255,.02))!important;border:1px solid var(--rd-line)!important;animation:rd-in .7s var(--rd-ease) both}
html:root .brand{display:flex;align-items:center;gap:11px;text-decoration:none;color:var(--rd-tx)}
html:root .brand-mark{width:36px;height:36px;border-radius:12px!important;display:grid;place-items:center;font:700 15px var(--rd-disp)!important;color:#0b0b0c!important;background:var(--rd-grad)!important;border:0!important;box-shadow:0 8px 26px -6px rgba(var(--rd-rgb),.7);position:relative;overflow:hidden}
html:root .brand-mark::after{content:"";position:absolute;inset:0;background:linear-gradient(115deg,transparent 30%,rgba(255,255,255,.55) 50%,transparent 70%);transform:translateX(-120%);animation:rd-sheen 5.5s var(--rd-ease) infinite}
html:root .brand strong{font:600 14px var(--rd-disp);display:block}html:root .brand small{font:500 11px var(--rd-mono);letter-spacing:.18em;display:block;margin-top:2px}
html:root .topbar-section{font:600 11.2px var(--rd-mono);letter-spacing:.18em;color:var(--rd-tx3)}
html:root .page-heading h1{font-size:26px;letter-spacing:-.03em}
html:root .quota-chip{padding:7px 13px;border-radius:99px!important;background:var(--rd-s1)!important;border:1px solid var(--rd-line)!important;font:600 11px var(--rd-mono);color:var(--rd-tx2)}
html:root .quota-chip strong{color:var(--rd-a2)}

/* panels */
html:root .panel{background:linear-gradient(180deg,var(--rd-s1),var(--rd-s0))!important;border:1px solid var(--rd-line)!important;border-radius:20px!important;box-shadow:0 24px 60px -36px #000,inset 0 1px 0 rgba(255,255,255,.04)!important;animation:rd-in .8s var(--rd-ease) both;transition:border-color .35s}
html:root .composer{animation-delay:.05s}html:root .presets-panel{animation-delay:.14s}html:root .results-panel{animation-delay:.22s}
html:root .panel:hover{border-color:var(--rd-line2)!important}
html:root .panel-heading h2,html:root .panel h2{font-size:16px}
html:root .composer-spark{color:var(--rd-a);font-size:18px;animation:rd-spin 14s linear infinite}

/* inputs */
html:root :is(input:not([type=range]):not([type=checkbox]):not([type=radio]):not([type=file]),textarea,select){background:rgba(255,255,255,.035)!important;border:1px solid var(--rd-line)!important;border-radius:13px!important;color:var(--rd-tx)!important;font-family:var(--rd-font)!important;transition:border-color .25s,box-shadow .3s var(--rd-ease),background .25s}
html:root :is(input,textarea,select):hover{border-color:var(--rd-line2)!important}
html:root :is(input,textarea,select):focus{border-color:rgba(var(--rd-rgb),.7)!important;background:rgba(var(--rd-rgb),.06)!important;box-shadow:0 0 0 4px rgba(var(--rd-rgb),.14),0 10px 30px -14px rgba(var(--rd-rgb),.5)!important;outline:none!important}
html:root ::placeholder{color:var(--rd-tx3)!important}
html:root input[type=range]{accent-color:var(--rd-a)}
html:root label{color:var(--rd-tx2);font-family:var(--rd-font)}
html:root .prompt-heading label{font:600 13px var(--rd-font);color:var(--rd-tx)}
html:root .upload-zone{border:1.5px dashed rgba(var(--rd-rgb),.35)!important;border-radius:14px!important;background:rgba(var(--rd-rgb),.05)!important;color:var(--rd-tx2)!important;font:600 13px var(--rd-font);transition:all .35s var(--rd-ease)}
html:root .upload-zone:hover,html:root .upload-zone.file-drag-over,html:root .file-drag-over .upload-zone{border-color:var(--rd-a)!important;background:rgba(var(--rd-rgb),.14)!important;color:#fff!important;transform:translateY(-2px);box-shadow:0 14px 36px -18px rgba(var(--rd-rgb),.8)}
html:root .upload-zone>span{color:var(--rd-a2)!important;font-size:18px;display:inline-block;transition:transform .45s var(--rd-spring)}html:root .upload-zone:hover>span{transform:rotate(90deg) scale(1.2)}
html:root .attachments-heading strong{font:600 13px var(--rd-font)}
html:root .attachments-heading span{font:500 11px var(--rd-font);color:var(--rd-tx3)}
html:root .attachment{border-radius:12px!important;border:1px solid var(--rd-line2)!important;overflow:hidden;animation:rd-pop .45s var(--rd-spring) both}

/* buttons */
html:root button{font-family:var(--rd-font)}
html:root button:not(:disabled):active{transform:scale(.97)!important}
html:root .primary{position:relative;overflow:hidden;border:0!important;border-radius:14px!important;background:var(--rd-grad)!important;color:#0a0a0b!important;font:700 14px var(--rd-font)!important;padding:13px 20px;box-shadow:0 14px 40px -14px rgba(var(--rd-rgb),.85),inset 0 1px 0 rgba(255,255,255,.5)!important;transition:transform .4s var(--rd-spring),box-shadow .4s,filter .3s!important}
html:root .primary::after{content:"";position:absolute;inset:0;background:linear-gradient(110deg,transparent 35%,rgba(255,255,255,.55) 50%,transparent 65%);transform:translateX(-130%);transition:transform .9s var(--rd-ease);pointer-events:none}
html:root .primary:not(:disabled):hover{transform:translateY(-3px) scale(1.02);box-shadow:0 22px 52px -12px rgba(var(--rd-rgb),.95),inset 0 1px 0 rgba(255,255,255,.6)!important}
html:root .primary:not(:disabled):hover::after{transform:translateX(130%)}
html:root .primary:disabled{opacity:.45;filter:saturate(.4)}
html:root .primary.rd-busy{animation:rd-pulse 1.2s infinite}
html:root :is(.quiet,.queue-toggle,.select-preset,.icon-button,.copies-segments button,.result-tabs button,.scope-switch button,.aspect-picker summary,.storage-open){border-radius:12px!important;border:1px solid var(--rd-line)!important;background:var(--rd-s1)!important;color:var(--rd-tx2)!important;font-family:var(--rd-font)!important;font-weight:600;transition:all .3s var(--rd-ease)!important}
html:root :is(.quiet,.queue-toggle,.icon-button,.storage-open,.aspect-picker summary):hover{background:var(--rd-s2)!important;border-color:var(--rd-line2)!important;color:var(--rd-tx)!important;transform:translateY(-2px)}
html:root .queue-toggle[aria-pressed=true]{border-color:rgba(var(--rd-rgb),.6)!important;color:#fff!important;background:rgba(var(--rd-rgb),.18)!important;box-shadow:0 0 22px -6px rgba(var(--rd-rgb),.7)}
html:root .danger{border-radius:12px!important;border:1px solid rgba(255,107,131,.4)!important;background:rgba(255,107,131,.1)!important;color:var(--rd-bad)!important;font-weight:600}
html:root .danger:hover{background:rgba(255,107,131,.2)!important}
html:root .copies-segments{display:flex;gap:3px;padding:3px;border-radius:13px;background:var(--rd-s1);border:1px solid var(--rd-line)}
html:root .copies-segments button{flex:1;padding:5px 0!important;border:0!important;background:transparent!important;border-radius:10px!important}
html:root .copies-segments button[aria-pressed=true]{background:var(--rd-grad)!important;color:#0a0a0b!important;box-shadow:0 6px 16px -6px rgba(var(--rd-rgb),.9)}
html:root .copies-control{color:var(--rd-tx3)}html:root .copies-control output{color:var(--rd-a2)}
html:root .aspect-options{border-radius:16px!important;background:rgba(20,20,21,.96)!important;border:1px solid var(--rd-line2)!important;backdrop-filter:blur(20px);box-shadow:0 30px 80px -20px #000;animation:rd-pop .3s var(--rd-ease)}
html:root .aspect-options button{border-radius:10px!important;transition:all .25s var(--rd-ease)}html:root .aspect-options button:hover{background:rgba(var(--rd-rgb),.18)!important;transform:translateX(3px)}

/* selected preset chip */
html:root .selected-preset{border-radius:13px!important;background:rgba(var(--rd-rgb),.12)!important;border:1px solid rgba(var(--rd-rgb),.35)!important;animation:rd-pop .4s var(--rd-spring)}

/* presets */
html:root .presets{display:grid;gap:10px}
html:root .preset-card{position:relative;border-radius:15px!important;border:1px solid var(--rd-line)!important;background:var(--rd-s1)!important;overflow:hidden;transition:transform .45s var(--rd-ease),border-color .3s,box-shadow .45s;animation:rd-pop .6s var(--rd-ease) both}
html:root .preset-card:hover{transform:translateY(-5px) scale(1.02);border-color:rgba(var(--rd-rgb),.55)!important;box-shadow:0 22px 50px -20px rgba(var(--rd-rgb),.65)}
html:root .preset-card.selected{border-color:var(--rd-a)!important;box-shadow:0 0 0 2px rgba(var(--rd-rgb),.35),0 18px 44px -18px rgba(var(--rd-rgb),.8)}
html:root .preset-art{transition:transform .8s var(--rd-ease)}html:root .preset-card:hover .preset-art{transform:scale(1.08)}
html:root .preset-name{font:600 12px var(--rd-font)!important}
html:root .preset-plus{border-style:dashed!important;border-color:rgba(var(--rd-rgb),.4)!important;background:rgba(var(--rd-rgb),.06)!important}
html:root .preset-plus:hover .preset-art{transform:rotate(90deg)}
html:root .hidden-presets>summary,html:root .owner-settings>summary{font:600 12px var(--rd-font);color:var(--rd-tx2);cursor:pointer;transition:color .2s}html:root .hidden-presets>summary:hover,html:root .owner-settings>summary:hover{color:var(--rd-tx)}

/* results */
html:root .result-tabs{display:flex;gap:2px;border-bottom:1px solid var(--rd-line)!important;padding:0;position:relative}
html:root .result-tabs button{border:0!important;background:transparent!important;border-radius:10px 10px 0 0!important;padding:10px 14px!important;position:relative;color:var(--rd-tx3)!important}
html:root .result-tabs button:hover{color:var(--rd-tx)!important;background:var(--rd-s1)!important}
html:root .result-tabs button.active{color:#fff!important}
html:root .result-tabs button.active::after{content:"";position:absolute;left:12px;right:12px;bottom:-1px;height:2px;border-radius:2px;background:var(--rd-grad);box-shadow:0 0 14px var(--rd-a);animation:rd-pop .4s var(--rd-ease)}
html:root .scope-switch{display:inline-flex;gap:3px;padding:3px;border-radius:14px;background:var(--rd-s1);border:1px solid var(--rd-line)!important}
html:root .scope-switch button{border:0!important;background:transparent!important;padding:6px 14px!important;border-radius:11px!important}
html:root .scope-switch button.active,html:root .scope-switch button[aria-pressed=true]{background:var(--rd-grad)!important;color:#0a0a0b!important;box-shadow:0 6px 18px -6px rgba(var(--rd-rgb),.9)}
html:root .job{position:relative;border-radius:16px!important;border:1px solid var(--rd-line)!important;background:var(--rd-s1)!important;overflow:hidden;animation:rd-pop .65s var(--rd-ease) both;animation-delay:calc(var(--rd-i,0)*45ms);transition:transform .45s var(--rd-ease),border-color .3s,box-shadow .45s}
html:root .job:hover{transform:translateY(-4px);border-color:rgba(var(--rd-rgb),.5)!important;box-shadow:0 26px 60px -24px rgba(var(--rd-rgb),.6)}
html:root .job-image{transition:transform .9s var(--rd-ease),filter .4s}html:root .job:hover .job-image{transform:scale(1.04)}
html:root .job-meta p{font:600 12px var(--rd-font)}
html:root .job-controls{transition:opacity .3s,transform .4s var(--rd-ease)}
html:root .job-controls button,html:root .job-controls a,html:root .preset-controls button{border-radius:10px!important;background:rgba(15,15,16,.78)!important;backdrop-filter:blur(10px);border:1px solid var(--rd-line2)!important;transition:all .3s var(--rd-spring)!important}
html:root .job-controls button:hover,html:root .job-controls a:hover,html:root .preset-controls button:hover{background:rgba(var(--rd-rgb),.35)!important;border-color:rgba(var(--rd-rgb),.8)!important;transform:translateY(-3px) scale(1.1)}
html:root .job-controls .on{color:var(--rd-a3)!important;border-color:rgba(var(--rd-rgb),.5)!important}
html:root .job-controls .on svg{fill:rgba(var(--rd-rgb),.35)!important}
html:root .job-placeholder{border-radius:14px;background:linear-gradient(100deg,rgba(255,255,255,.03) 30%,rgba(var(--rd-rgb),.14) 50%,rgba(255,255,255,.03) 70%);background-size:200% 100%;animation:rd-shimmer 1.6s linear infinite}
html:root .job-failed{border-color:rgba(255,107,131,.4)!important}
html:root .empty{color:var(--rd-tx3);font:500 13px var(--rd-font);text-align:center;border:1px dashed var(--rd-line2);border-radius:16px;padding:22px}
html:root .message{font:500 12.5px var(--rd-font)}
html:root .notice{border-radius:14px!important;background:rgba(var(--rd-rgb),.1)!important;border:1px solid rgba(var(--rd-rgb),.3)!important}

/* dialogs & viewer */
html:root .dialog{border-radius:24px!important;border:1px solid var(--rd-line2)!important;background:rgba(17,17,18,.94)!important;backdrop-filter:blur(30px);color:var(--rd-tx);box-shadow:0 50px 120px -30px #000,0 0 0 1px rgba(var(--rd-rgb),.1);animation:rd-pop .45s var(--rd-ease)}
html:root dialog::backdrop{background:rgba(6,6,7,.65);backdrop-filter:blur(8px);animation:rd-in .35s ease both}
html:root .dialog-head{border-bottom:1px solid var(--rd-line)}
html:root .image-viewer{background:rgba(7,7,8,.94)!important;backdrop-filter:blur(26px)}
html:root #viewer-image{border-radius:14px;animation:rd-pop .55s var(--rd-ease)}
html:root .viewer-close{border-radius:12px!important;background:var(--rd-s2)!important;border:1px solid var(--rd-line2)!important;transition:all .35s var(--rd-spring)}html:root .viewer-close:hover{transform:rotate(90deg) scale(1.1);background:rgba(255,107,131,.25)!important}
html:root .viewer-buttons button,html:root .viewer-buttons a{border-radius:12px!important;background:var(--rd-s2)!important;border:1px solid var(--rd-line2)!important;color:var(--rd-tx)!important;transition:all .3s var(--rd-spring)}
html:root .viewer-buttons button:hover,html:root .viewer-buttons a:hover{background:rgba(var(--rd-rgb),.3)!important;border-color:rgba(var(--rd-rgb),.7)!important;transform:translateY(-3px)}
html:root .viewer-hint{color:var(--rd-tx3)!important}

/* ripple helper */
html:root .rd-ripple{position:absolute;border-radius:50%;background:rgba(255,255,255,.4);transform:scale(0);animation:rd-rip .7s var(--rd-ease) forwards;pointer-events:none}

@media(prefers-reduced-motion:reduce){html:root *{animation-duration:.01ms!important;animation-delay:0s!important;transition-duration:.01ms!important}}

/* particles (photo) */
.rd-particle{position:fixed;width:7px;height:7px;margin:-3.5px;border-radius:50%;pointer-events:none;z-index:9999;background:hsl(calc(var(--h,78)*1deg) 95% 70%);box-shadow:0 0 12px hsl(calc(var(--h,78)*1deg) 95% 65%);animation:rd-burst .85s cubic-bezier(.12,.8,.3,1) forwards}
@keyframes rd-burst{from{transform:translate(0,0) scale(1);opacity:1}to{transform:translate(var(--dx),var(--dy)) scale(.1);opacity:0}}
/* ---- layout polish (photo-service) ---- */
html:root .presets{grid-template-columns:repeat(auto-fill,minmax(var(--rd-pt,124px),1fr))!important;grid-auto-rows:auto!important;gap:10px!important;height:auto!important}
html:root .preset-card{display:block;padding:0!important;width:auto!important;height:auto!important;min-width:0!important;flex:none!important}
html:root .select-preset{display:flex!important;flex-direction:column!important;align-items:stretch!important;width:100%;padding:0!important;border:0!important;background:none!important;border-radius:0!important;text-align:left;cursor:pointer;transform:none!important}
html:root .select-preset:hover{transform:none!important;background:none!important}
html:root .preset-art{display:block;height:72px!important;width:100%!important;overflow:hidden;background:rgba(255,255,255,.04)}
html:root .preset-art img{width:100%;height:100%;object-fit:cover;display:block}
html:root .preset-name{display:block;padding:8px 10px 9px;font:600 12px/1.25 var(--rd-font)!important;color:var(--rd-tx);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html:root .preset-plus .preset-art{display:grid;place-items:center;font-size:26px;color:var(--rd-a2)}
html:root .preset-controls{position:absolute;top:5px;right:5px;display:flex;gap:4px;opacity:0;transform:translateY(-4px);transition:opacity .25s,transform .35s var(--rd-ease)}
html:root .preset-card:hover .preset-controls{opacity:1;transform:none}
html:root .preset-card.selected::after{content:"✓";position:absolute;left:7px;top:7px;width:20px;height:20px;border-radius:50%;display:grid;place-items:center;font:700 11px var(--rd-font);background:var(--rd-grad);color:#0a0a0b;animation:rd-pop .4s var(--rd-spring)}
@media(min-width:901px){
  html:root .workspace,html:root .workspace:has(.composer .attachments:not(:empty)){grid-template-rows:minmax(0,1fr) auto!important;gap:12px!important}
  html:root .presets-panel{max-height:min(36vh,300px);overflow:auto}
  html:root .composer textarea{min-height:90px!important}
}

html:root .presets .preset-card,html:root #hidden-presets .preset-card{flex:none!important;width:auto!important;height:auto!important;max-width:none!important;min-width:0!important}
html:root .presets .preset-card>button.select-preset,html:root #hidden-presets .preset-card>button.select-preset{display:flex!important;flex-direction:column!important;align-items:stretch!important;width:100%!important;height:auto!important;min-height:0!important;gap:0!important}
html:root .presets .preset-art,html:root #hidden-presets .preset-art{width:100%!important;flex:none!important;height:calc(var(--rd-pt,124px)*.58)!important;aspect-ratio:auto!important;font-size:26px}
html:root .presets .preset-card:hover .preset-name,html:root .presets .preset-card:focus-within .preset-name{opacity:1!important}
html:root .presets .preset-art img{cursor:pointer}
html:root :is(.composer,.presets-panel,.results-panel,.dialog) button:not([class]),html:root :is(.composer,.presets-panel,.results-panel,.dialog) button[class=""]{border-radius:12px!important;border:1px solid var(--rd-line2)!important;background:var(--rd-s1)!important;color:var(--rd-tx2)!important;font:600 12px var(--rd-font)!important;padding:8px 14px;transition:all .3s var(--rd-ease)}
html:root :is(.composer,.presets-panel,.results-panel,.dialog) button:not([class]):hover:not(:disabled){background:var(--rd-s2)!important;border-color:rgba(var(--rd-rgb),.6)!important;color:#fff!important;transform:translateY(-2px)}
html:root .quality-control{font:600 12px var(--rd-font);color:var(--rd-tx2)}
html:root .quality-control select{height:34px;padding:0 10px!important}
html:root details.aspect-picker>summary{list-style:none;display:flex;align-items:center;gap:8px;padding:6px 12px;cursor:pointer}
html:root .project-result-nav,html:root .project-enhance-row{border-radius:14px;background:var(--rd-s1);border:1px solid var(--rd-line);padding:8px 12px}
html:root input[type=checkbox]{accent-color:var(--rd-a)}
html:root fieldset{border:1px solid var(--rd-line)!important;border-radius:16px!important}
html:root legend{font:600 12px var(--rd-font);color:var(--rd-tx2);padding:0 8px}
html:root .storage-dialog,html:root .storage-list li{border-radius:14px}
html:root .recipe-copy{border-radius:14px;background:rgba(255,255,255,.04);border:1px solid var(--rd-line)}
html:root .recipe-media img{border-radius:12px}
html:root .job-controls,html:root .preset-controls{pointer-events:none}
html:root .job-controls>*,html:root .preset-controls>*{pointer-events:auto}
html:root .job-controls{gap:5px}
/* ===== photo-service: login card ===== */
html:root .login{max-width:440px;margin:7vh auto 0;padding:34px 30px 30px!important;border-radius:30px!important;background:linear-gradient(180deg,rgba(255,255,255,.07),rgba(255,255,255,.025))!important;border:1px solid var(--rd-line2)!important;backdrop-filter:blur(34px) saturate(1.4);box-shadow:0 70px 140px -40px #000,0 0 0 1px rgba(var(--rd-rgb),.1),inset 0 1px 0 rgba(255,255,255,.1)!important;animation:rd-card 1s var(--rd-ease) both;position:relative}
@keyframes rd-card{from{opacity:0;transform:translateY(40px) scale(.95)}to{opacity:1;transform:none}}
html:root .login::before{content:"";position:absolute;inset:-1px;border-radius:inherit;padding:1px;background:conic-gradient(from var(--rd-ang,0deg),transparent 0 60%,rgba(var(--rd-rgb),.9) 78%,rgba(var(--rd-rgb),.9) 88%,transparent 100%);-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;pointer-events:none;animation:rd-border 6s linear infinite}
@property --rd-ang{syntax:"<angle>";initial-value:0deg;inherits:false}
@keyframes rd-border{to{--rd-ang:360deg}}
html:root .login h1{font:600 28px var(--rd-disp);letter-spacing:-.04em;margin:8px 0 10px;background:linear-gradient(120deg,#fff,var(--rd-a4) 70%,var(--rd-a2));-webkit-background-clip:text;background-clip:text;color:transparent}
html:root .login form{display:grid;gap:14px}
html:root .login form>*{animation:rd-in .7s var(--rd-ease) both}
html:root .login form>*:nth-child(1){animation-delay:.25s}html:root .login form>*:nth-child(2){animation-delay:.33s}html:root .login form>*:nth-child(3){animation-delay:.41s}html:root .login form>*:nth-child(n+4){animation-delay:.5s}
html:root .login label{display:grid;gap:7px;font:600 12px var(--rd-font);color:var(--rd-tx2)}
html:root .login input{height:46px;padding:0 14px!important;font:500 14.5px var(--rd-font)!important}
html:root .login .primary{height:48px;font-size:15px!important}
html:root .login .message{padding:11px 14px;border-radius:13px;background:rgba(255,107,131,.1);border:1px solid rgba(255,107,131,.35);color:#ffb3c0;animation:rd-shake .5s var(--rd-ease)}
@keyframes rd-shake{0%,100%{transform:none}20%{transform:translateX(-8px)}40%{transform:translateX(7px)}60%{transform:translateX(-5px)}80%{transform:translateX(3px)}}
@media(max-width:560px){html:root .login{margin-top:3vh;padding:26px 20px 22px!important}}
html:root .account{display:flex;align-items:center;gap:10px;font:600 12.5px var(--rd-font);color:var(--rd-tx2)}
/* minimum type sizes (readability pass) */
html:root :is(small,output,.section-note,.copies-control,.preset-scale-control,.result-scale,.attachments-heading span,.job-meta small,.job-meta span,.composer-bottom small,.results-tools,.results-tools span){font-size:12px!important}
html:root .eyebrow{font-size:10.5px!important}
html:root .preset-name{white-space:normal!important;line-height:1.25;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.5em}
html:root .job-meta{padding:9px 12px 11px!important}
html:root .job-meta p{font-size:12.5px!important;line-height:1.35}
html:root .copies-control{width:96px!important}
html:root .copies-segments button{min-width:24px;min-height:26px;font-size:12px!important}
html:root .result-tabs button{font-size:13px!important}
html:root .scope-switch button{font-size:12.5px!important}
html:root.admin-only,html:root.admin-only body{overflow:hidden!important;height:auto!important}
html:root.admin-only .shell{padding:0!important;min-height:0!important;height:auto!important}
/* embedded in the site's Photo section: calm, no pointer glow */
html:root.embedded .job::after,html:root.embedded .preset-card::before,html:root.gallery-only .job::after{display:none!important}
/* project-posts style library embedded inline */
html:root.library-only,html:root.library-only body{background:transparent!important}
html:root.library-only .shell{padding:0!important;min-height:0!important}
html:root.library-only .topbar{display:none!important}
html:root.library-only .presets-panel{border:0!important;background:transparent!important;box-shadow:none!important;padding:2px!important;max-height:none!important;animation:none!important}
/* result tile controls: always legible on any picture */
html:root .job-controls>:is(button,a),html:root .preset-controls>button{background:rgba(12,12,13,.9)!important;color:#fff!important;border:1px solid rgba(255,255,255,.38)!important;box-shadow:0 4px 14px rgba(0,0,0,.65)!important;backdrop-filter:none!important}
html:root .job-controls>:is(button,a) svg,html:root .preset-controls>button svg{stroke:#fff;color:#fff;filter:drop-shadow(0 1px 1px rgba(0,0,0,.7))}
html:root .job-controls>:is(button,a):hover,html:root .preset-controls>button:hover{background:rgba(var(--rd-rgb),.95)!important;border-color:#fff!important}
html:root .job-controls>.delete-result:hover{background:rgba(255,80,110,.95)!important}
html:root .job-controls .on{background:rgba(var(--rd-rgb),.9)!important}
html:root .job-controls .on svg{fill:rgba(255,255,255,.55)!important}
html:root .job-times{display:block;margin-top:2px;font:500 11.5px var(--rd-mono)!important;color:var(--rd-tx3)!important;letter-spacing:.02em}
@media(hover:none){html:root .job-controls{opacity:1!important}}
/* standalone work pill */
#rd-activity{position:fixed;z-index:60;top:84px;left:50%;transform:translateX(-50%);width:min(440px,calc(100vw - 32px));padding:10px 14px 12px;border-radius:16px;background:rgba(20,20,21,.94);border:1px solid rgba(var(--rd-rgb),.4);box-shadow:0 18px 44px -18px rgba(var(--rd-rgb),.7);animation:rd-pop .45s var(--rd-spring)}
#rd-activity>div{display:flex;justify-content:space-between;gap:12px;margin-bottom:8px;font:600 12.5px var(--rd-font);color:var(--rd-tx)}
#rd-activity span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#rd-activity b{font:700 12px var(--rd-mono);color:var(--rd-a2);flex:none}
#rd-activity>i{display:block;height:5px;border-radius:9px;background:rgba(255,255,255,.08);overflow:hidden}
#rd-activity u{display:block;height:100%;width:0;border-radius:9px;background:linear-gradient(90deg,var(--rd-a),var(--rd-a2),var(--rd-a));background-size:200% 100%;animation:rd-slide-x 2.4s linear infinite;transition:width .8s var(--rd-ease)}
@keyframes rd-slide-x{to{background-position:-200% 0}}
#rd-activity[hidden]{display:none}
/* in-progress slots */
#rd-pending{display:flex;flex-wrap:wrap;gap:10px;margin:10px 0 0}
#rd-pending[hidden]{display:none}
.rd-pending-tile{position:relative;overflow:hidden;width:clamp(110px,18%,170px);aspect-ratio:3/4;display:flex;flex-direction:column;justify-content:flex-end;gap:3px;padding:10px;border-radius:16px;border:1px solid rgba(var(--rd-rgb),.4);
  background:linear-gradient(0deg,rgba(var(--rd-rgb),.75) var(--p),rgba(var(--rd-rgb),.25) var(--p),rgba(255,255,255,.04) calc(var(--p) + 1%));animation:rd-pop .45s var(--rd-spring) both;transition:background .8s}
.rd-pending-tile::after{content:"";position:absolute;inset:0;background:linear-gradient(110deg,transparent 30%,rgba(255,255,255,.14) 50%,transparent 70%);transform:translateX(-120%);animation:rd-sheen 2.2s linear infinite}
.rd-pending-tile b{position:relative;z-index:1;font:700 13px var(--rd-font);color:#fff;text-shadow:0 1px 6px rgba(0,0,0,.6)}
.rd-pending-tile span{position:relative;z-index:1;font:500 11.5px/1.3 var(--rd-font);color:rgba(255,255,255,.85);text-shadow:0 1px 6px rgba(0,0,0,.6)}

/* a task card / a file tile exists from the first second: the picture of the source and a loading animation */
.rd-pending-tile[data-thumb]{background-image:linear-gradient(180deg,rgba(0,0,0,.05),rgba(0,0,0,.72)),var(--thumb);background-size:cover;background-position:center}
.rd-pending-tile::before{content:"";position:absolute;left:0;bottom:0;height:3px;width:var(--p,4%);background:var(--rd-a);box-shadow:0 0 12px rgba(var(--rd-rgb),.9);transition:width .6s ease}
html:root .attachment.attachment-uploading{position:relative;overflow:hidden}
html:root .attachment.attachment-uploading img{opacity:.55;filter:saturate(.7)}
html:root .attachment.attachment-uploading::after{content:"";position:absolute;inset:0;margin:auto;width:26px;height:26px;border-radius:50%;border:3px solid rgba(255,255,255,.25);border-top-color:var(--rd-a);animation:rd-upload-spin .8s linear infinite}
@keyframes rd-upload-spin{to{transform:rotate(360deg)}}
/* ===== results: picture, then a grey bar (origin · done mark + times · actions) ===== */
html:root .result-filters{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin:12px 0 10px}
html:root .result-filters .result-tabs{display:inline-flex;gap:3px;padding:3px;border-radius:14px;background:var(--rd-s1);border:1px solid var(--rd-line)!important;margin:0!important}
html:root .result-filters .result-tabs button{border-radius:11px!important;padding:7px 14px!important;border:0!important;background:transparent!important}
html:root .result-filters .result-tabs button.active{background:var(--rd-grad)!important;color:#0a0a0b!important;font-weight:700}
html:root .result-filters .result-tabs button.active::after{display:none}
html:root .result-filters .scope-switch{margin:0!important}
html:root .scope-switch[hidden]{display:none!important}

html:root .job:not(.job-project) .job-meta{display:none!important}
html:root .job .job-media .job-controls{display:none!important}
html:root .job .job-bar{display:grid;gap:7px;padding:8px 8px 9px;background:#222223;border-top:1px solid var(--rd-line)}
html:root .job .job-bar-head{display:flex;align-items:center;gap:8px;min-width:0}
html:root .job .job-origin{flex:none;display:inline-grid;place-items:center;min-width:30px;height:28px;padding:0 9px!important;border-radius:9px!important;border:0!important;background:var(--rd-grad)!important;color:#0a0a0b!important;font:800 10.5px var(--rd-font);letter-spacing:.06em;cursor:pointer;transition:transform .3s var(--rd-spring),box-shadow .3s}
html:root .job .job-origin svg{stroke:#0a0a0b;width:16px;height:16px}
html:root .job .job-origin:not(:disabled):hover{transform:translateY(-2px) scale(1.06);box-shadow:0 10px 22px -8px rgba(var(--rd-rgb),.9)}
html:root .job .job-origin:disabled{cursor:default;opacity:.85}
html:root .job .job-origin-banana{background:#34290c!important;box-shadow:inset 0 0 0 1.5px #f5d547}
html:root .job .job-origin-photo{background:#f3f4f8!important}
html:root .job .job-origin-chatgpt svg,html:root .job .job-origin-gwen svg,html:root .job .job-origin-banana svg{stroke:none!important}
html:root .job .job-origin svg{width:17px;height:17px}
html:root .job .job-stamp{display:inline-flex;align-items:center;gap:6px;min-width:0;font:600 12px var(--rd-mono);color:#d1d1d2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html:root .job .job-stamp i{display:inline-grid;place-items:center;font-style:normal}
html:root .job .job-stamp svg{width:15px;height:15px;stroke:#7be0a0;stroke-width:2.4}
html:root .job .job-stamp.bad{color:#ff8fa0}
html:root .job .job-bar .job-controls{position:static!important;opacity:1!important;pointer-events:auto!important;display:flex;flex-wrap:wrap;gap:5px;padding:0;background:none!important;transform:none!important}
html:root .job .job-bar .job-controls>:is(button,a){width:30px;height:28px;border-radius:8px!important;background:#333334!important;border:0!important;color:#d1d1d2!important}
html:root .job .job-bar .job-controls>:is(button,a) svg{stroke:#d1d1d2;color:#d1d1d2;filter:none;width:16px;height:16px}
html:root .job .job-bar .job-controls>:is(button,a):hover{background:#474748!important;color:#fff!important}
html:root .job .job-bar .job-controls>:is(button,a):hover svg{stroke:#fff}
html:root .job .job-bar .job-controls>.delete-result:hover{background:rgba(255,80,110,.9)!important}
html:root .job .job-bar .job-controls .on{background:#333334!important;color:#d1d1d2!important}
html:root .job .job-bar .job-controls .on svg{fill:currentColor!important;stroke:currentColor}
html:root .job[data-engine="banana"] .job-media::after{display:none!important}
html:root .viewer-caption{margin:0 0 10px;padding:0 6px;text-align:center;color:#ecf2e6;font:600 14px var(--rd-font);max-width:min(92vw,900px)}
html:root .quota-chip{white-space:nowrap}

html:root .edit-chat-choice{display:inline-flex;align-items:center;gap:4px;padding:3px;margin:8px 0 0;border-radius:14px;background:var(--rd-s1);border:1px solid var(--rd-line)}
html:root .edit-chat-choice[hidden]{display:none!important}
html:root .edit-chat-choice span{padding:0 10px 0 8px;font:600 12px var(--rd-font);color:var(--rd-tx3)}
html:root .edit-chat-choice button{padding:7px 13px!important;border-radius:11px!important;border:0!important;background:transparent!important;color:var(--rd-tx2)!important;font:600 12.5px var(--rd-font)!important;cursor:pointer}
html:root .edit-chat-choice button[aria-pressed=true]{background:var(--rd-grad)!important;color:#0a0a0b!important}

/* one compact toolbar: filters on the left, count and scale on the right (no separate heading, no holes) */
html:root .results-panel{padding-top:14px!important}
html:root .result-filters{margin:0 0 8px!important}
html:root .results-tools{margin-left:auto;display:inline-flex;align-items:center;gap:12px;padding:4px 6px 4px 14px;border-radius:14px;background:var(--rd-s1);border:1px solid var(--rd-line)}
html:root .results-tools #job-count{font:600 12px var(--rd-mono);color:var(--rd-tx3);white-space:nowrap}
html:root .results-tools .result-scale{display:inline-flex;align-items:center;gap:8px;margin:0}
html:root .results-tools .result-scale>span{font:600 12px var(--rd-font);color:var(--rd-tx3)}
html:root .results-tools .result-scale input{width:90px}
html:root .results-tools .result-scale output{min-width:36px;text-align:right;font:600 12px var(--rd-mono)}

/* tighter pills so the whole toolbar stays on one line */
html:root .result-filters{gap:10px!important;flex-wrap:nowrap}
html:root .result-filters .result-tabs button{padding:7px 11px!important}
html:root .result-filters .scope-switch button{padding:6px 10px!important}
html:root .results-tools{margin-left:auto;flex:0 1 auto;min-width:0;padding:4px 10px!important;gap:8px}
html:root .results-tools .result-scale>span{display:none}
html:root .results-tools .result-scale input{width:76px}
@media(max-width:620px){html:root .result-filters{flex-wrap:wrap}}
html:root .results-tools{flex-wrap:nowrap!important;white-space:nowrap;min-width:max-content!important}
html:root .results-tools .result-scale{flex-wrap:nowrap;white-space:nowrap}
html:root .result-filters .result-tabs,html:root .result-filters .scope-switch{flex:0 0 auto}
html:root .results-tools{flex-direction:row!important;align-items:center!important}

/* launch burst (same as on the main site) */
.rd-shock{position:fixed;z-index:9998;width:80px;height:80px;margin:-40px 0 0 -40px;border-radius:50%;pointer-events:none;border:2px solid rgba(var(--rd-rgb),.85);box-shadow:0 0 40px rgba(var(--rd-rgb),.5),inset 0 0 30px rgba(var(--rd-rgb),.25);opacity:0;animation:rd-shock 1.15s cubic-bezier(.16,.8,.3,1) both}
@keyframes rd-shock{0%{opacity:.95;transform:scale(.2)}70%{opacity:.25}100%{opacity:0;transform:scale(22)}}
.rd-flash{position:fixed;inset:0;z-index:9997;pointer-events:none;background:radial-gradient(circle at var(--fx) var(--fy),rgba(var(--rd-rgb),.28),rgba(var(--rd-rgb),.07) 32%,transparent 60%);opacity:0;animation:rd-flash .8s ease-out both}
@keyframes rd-flash{0%{opacity:0}18%{opacity:1}100%{opacity:0}}

/* phones: the create row wraps instead of running out of the frame */
@media(max-width:560px){
  html:root .composer-bottom{flex-direction:column;align-items:stretch;gap:10px}
  html:root .generation-actions{flex-wrap:wrap;justify-content:space-between;gap:8px;width:100%}
  html:root .generation-actions #generate-submit{flex:1 1 100%;min-height:48px}
  html:root .result-filters{flex-wrap:wrap}
  html:root .results-tools{margin-left:0;flex:1 1 100%;justify-content:space-between}
  html:root .job .job-bar .job-controls>:is(button,a){width:34px;height:32px}
}
/* ===== calmer controls: lime only as an outline or a glow; the bar under a picture is one row of equal buttons + the time ===== */
/* one shared "selected" look for every small switcher: dark pill, lime outline, soft glow */
html:root .result-filters .result-tabs button.active,html:root .result-filters .scope-switch button.active,html:root .result-filters .scope-switch button[aria-pressed=true]{background:rgba(var(--rd-rgb),.1)!important;color:var(--rd-a4)!important;font-weight:700;box-shadow:0 0 0 1px rgba(var(--rd-rgb),.55),0 0 18px -4px rgba(var(--rd-rgb),.6)!important}
html:root .result-filters .result-tabs button.active::after{display:none}

/* the create button: dark glass with a lime outline instead of a solid lime block */
html:root #generate-submit,html:root #generate-submit.primary{background:rgba(var(--rd-rgb),.12)!important;color:var(--rd-a4)!important;border:0!important;box-shadow:inset 0 0 0 1.5px rgba(var(--rd-rgb),.6),0 0 26px -10px rgba(var(--rd-rgb),.7)!important;transition:transform .3s cubic-bezier(.34,1.56,.64,1),box-shadow .3s,background .3s}
html:root #generate-submit:not(:disabled):hover{background:rgba(var(--rd-rgb),.2)!important;box-shadow:inset 0 0 0 1.5px rgba(var(--rd-rgb),.9),0 0 34px -6px rgba(var(--rd-rgb),.8)!important;transform:translateY(-2px)}

/* under the picture */
html:root .job .job-bar{display:grid;gap:7px;padding:8px 8px 9px}
html:root .job .job-bar-row{display:flex;gap:4px;align-items:center}
html:root .job .job-bar-row .job-controls{display:contents!important}
html:root .job .job-bar-row>*,html:root .job .job-bar .job-controls>:is(button,a){flex:1 1 0;min-width:0;max-width:36px;height:28px;width:auto!important;border-radius:8px!important;display:grid;place-items:center;padding:0!important}
html:root .job .job-origin,html:root .job .job-origin-banana,html:root .job .job-origin-photo,html:root .job .job-origin:disabled{background:#2a2e3c!important;color:var(--rd-a)!important;box-shadow:inset 0 0 0 1.5px rgba(var(--rd-rgb),.7)!important;border:0!important;font:800 10px var(--rd-font);opacity:1!important}
html:root .job .job-origin svg{width:16px;height:16px;stroke:currentColor;fill:none}
html:root .job .job-origin-chatgpt svg,html:root .job .job-origin-gwen svg,html:root .job .job-origin-banana svg{stroke:none!important;fill:currentColor}
html:root .job .job-origin:not(:disabled):hover{background:rgba(var(--rd-rgb),.18)!important;transform:translateY(-2px)}
html:root .job .job-stamp{display:flex;align-items:center;gap:6px;font:600 12px var(--rd-mono);color:#c9ccd8}
html:root .job .job-stamp-ok svg{width:15px;height:15px;stroke:#7be0a0;stroke-width:2.4}
html:root .job .job-who{margin-left:auto;display:grid;place-items:center;width:22px;height:22px;border-radius:7px;background:#2a2e3c;color:#adadae;font-style:normal;cursor:help}
html:root .job .job-who svg{width:14px;height:14px}
html:root .job .job-who-owner{color:var(--rd-a4);box-shadow:inset 0 0 0 1px rgba(var(--rd-rgb),.45)}

/* the wave on a standalone page (inside HomeAI the main page draws it) */
html:root .rd-shock{width:90px!important;height:90px!important;margin:-45px 0 0 -45px!important;border-width:3px!important;background:radial-gradient(circle,rgba(var(--rd-rgb),0) 52%,rgba(var(--rd-rgb),.16) 68%,rgba(var(--rd-rgb),0) 72%)!important;animation:rd-shock-big 1.7s cubic-bezier(.12,.7,.25,1) both!important}
@keyframes rd-shock-big{0%{opacity:.95;transform:scale(.2)}55%{opacity:.5}100%{opacity:0;transform:scale(34)}}
/* ===== presets: a picture in its own proportions + a text block on the right ===== */
html:root:root :is(#presets,#hidden-presets){display:flex!important;flex-wrap:wrap;gap:10px!important;align-items:stretch;grid-template-columns:none!important}
html:root:root :is(#presets,#hidden-presets) .preset-card{--ph:calc(var(--rd-pt,124px)*.62);display:flex!important;flex-direction:row!important;align-items:stretch;width:auto!important;max-width:100%;height:var(--ph)!important;min-height:0!important;border-radius:15px!important;overflow:hidden;transform:none;transition:transform .4s var(--rd-spring),border-color .3s,box-shadow .35s}
html:root:root :is(#presets,#hidden-presets) .preset-card:hover{transform:translateY(-3px)!important;border-color:rgba(var(--rd-rgb),.55)!important;box-shadow:0 18px 40px -20px rgba(var(--rd-rgb),.65)!important}
html:root:root :is(#presets,#hidden-presets) .preset-card .preset-pic{flex:none;display:block!important;width:auto!important;height:100%!important;min-height:0!important;padding:0!important;border:0!important;background:rgba(255,255,255,.04)!important;border-radius:0!important;cursor:zoom-in}
html:root:root :is(#presets,#hidden-presets) .preset-card .preset-pic .preset-art{display:block!important;width:auto!important;height:100%!important;flex:none!important;aspect-ratio:auto!important;transform:none!important;overflow:hidden;font-size:22px;line-height:var(--ph);text-align:center;min-width:calc(var(--ph)*.8)}
html:root:root :is(#presets,#hidden-presets) .preset-card .preset-pic img{display:block;height:100%!important;width:auto!important;max-width:calc(var(--ph)*2.4);object-fit:contain;transition:transform .7s var(--rd-ease)}
html:root:root :is(#presets,#hidden-presets) .preset-card:hover .preset-pic img{transform:scale(1.05)}
html:root:root :is(#presets,#hidden-presets) .preset-card .preset-side{position:relative;display:flex;align-items:center;width:fit-content;min-width:92px;max-width:168px;border-left:1px solid var(--rd-line)}
html:root:root :is(#presets,#hidden-presets) .preset-card .preset-name{display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden;width:auto!important;height:auto!important;padding:8px 13px!important;border:0!important;background:none!important;border-radius:0!important;font:600 12.5px/1.3 var(--rd-font)!important;color:var(--rd-tx)!important;text-align:left;white-space:normal!important;overflow-wrap:anywhere;opacity:1!important}
html:root:root :is(#presets,#hidden-presets) .preset-card .preset-controls{position:absolute!important;inset:0;top:0!important;right:0!important;display:flex;align-items:center;justify-content:center;gap:8px;background:rgba(9,9,10,.88);backdrop-filter:blur(6px);opacity:0;transform:none!important;transition:opacity .25s}
html:root:root :is(#presets,#hidden-presets) .preset-card .preset-side:hover .preset-controls,html:root:root :is(#presets,#hidden-presets) .preset-card:focus-within .preset-controls{opacity:1}
html:root:root :is(#presets,#hidden-presets) .preset-card .preset-controls>button{width:34px;height:34px;display:grid;place-items:center;padding:0!important}
@media(hover:none){html:root:root :is(#presets,#hidden-presets) .preset-card .preset-controls{position:static!important;opacity:1;background:none;backdrop-filter:none;padding:0 8px}html:root:root :is(#presets,#hidden-presets) .preset-card .preset-side{flex-direction:column;align-items:flex-start}}
/* "+" tile */
html:root:root :is(#presets) .preset-plus{padding:0!important}
html:root:root :is(#presets) .preset-plus>.select-preset{display:flex!important;flex-direction:row!important;align-items:center;gap:0;height:100%!important;width:auto!important}
html:root:root :is(#presets) .preset-plus .preset-art{display:grid!important;place-items:center;width:var(--ph)!important;height:100%!important;font-size:28px}
html:root:root :is(#presets) .preset-plus .preset-name{display:flex!important;align-items:center;white-space:nowrap!important;padding:0 14px 0 0!important;width:auto!important;background:none!important;border:0!important;font:600 12.5px var(--rd-font)!important;color:var(--rd-tx)!important}
html:root:root :is(#presets) .preset-plus:hover .preset-art{transform:none!important}
/* the enlarged picture */
.attachment-preview.preset-preview{border-radius:18px;box-shadow:0 30px 80px -10px #000,0 0 0 1px rgba(var(--rd-rgb),.4);animation:rd-pop .35s var(--rd-spring,ease) both}
.attachment-preview.preset-preview img{object-fit:contain}

/* Banana: standard / Pro switch */
html:root:root .banana-model{display:inline-flex;gap:3px;padding:4px;border-radius:14px;background:var(--rd-s1);border:1px solid var(--rd-line);margin-left:auto;align-self:center}
html:root:root .banana-model button{height:32px;padding:0 16px!important;border:0!important;border-radius:11px!important;background:transparent!important;color:var(--rd-tx2)!important;font:600 12.5px var(--rd-font)!important;transition:all .25s var(--rd-ease)}
html:root:root .banana-model button:hover{color:var(--rd-tx)!important;background:var(--rd-s2)!important}
html:root:root .banana-model button[aria-pressed=true]{background:rgba(var(--rd-rgb),.1)!important;color:var(--rd-a4)!important;box-shadow:inset 0 0 0 1.5px rgba(var(--rd-rgb),.65),0 0 18px -6px rgba(var(--rd-rgb),.7)}

/* seven result buttons (with "в чат") must fit even in narrow cards */

/* /photo: GPT | Banana switch */
html:root:root .engine-switch.standalone{display:inline-flex;gap:3px;padding:4px;border-radius:14px;background:var(--rd-s1);border:1px solid var(--rd-line);margin-left:auto}
html:root:root .engine-switch.standalone button{height:34px;padding:0 20px!important;border:0!important;border-radius:11px!important;background:transparent!important;color:var(--rd-tx2)!important;font:600 13px var(--rd-font)!important;transition:all .25s var(--rd-ease)}
html:root:root .engine-switch.standalone button:hover{color:var(--rd-tx)!important;background:var(--rd-s2)!important}
html:root:root .engine-switch.standalone button[aria-selected=true]{background:rgba(var(--rd-rgb),.1)!important;color:var(--rd-a4)!important;box-shadow:inset 0 0 0 1.5px rgba(var(--rd-rgb),.65),0 0 18px -6px rgba(var(--rd-rgb),.7)}

/* ===== composer footer: one tidy row (queue · count · create) ===== */
html:root:root .composer-bottom{display:grid!important;gap:12px;align-items:stretch}
html:root:root .composer-bottom>small{margin:0;color:var(--rd-tx3);font:500 12px/1.4 var(--rd-font)}
html:root:root .generation-actions{display:grid!important;grid-template-columns:auto auto minmax(180px,1fr);gap:10px;align-items:stretch;width:100%}
html:root:root .generation-actions .queue-toggle{height:50px;padding:0 18px!important;border-radius:15px!important;white-space:nowrap;display:inline-flex;align-items:center;justify-content:center}
html:root:root .copies-control{display:flex!important;align-items:center;gap:12px;height:50px;padding:0 8px 0 16px;border-radius:15px;background:rgba(255,255,255,.04);border:1px solid var(--rd-line);margin:0!important}
html:root:root .copies-control>span{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;font:600 12.5px var(--rd-font);color:var(--rd-tx2)}
html:root:root .copies-control>span output{display:none}
html:root:root .copies-control input[type=range]{display:none!important}
html:root:root .copies-segments{display:inline-flex!important;gap:3px;padding:3px;border-radius:12px;background:rgba(0,0,0,.35);border:1px solid rgba(255,255,255,.06)}
html:root:root .copies-segments button{width:34px!important;height:34px!important;min-width:0!important;padding:0!important;border-radius:9px!important;background:transparent!important;border:0!important;color:var(--rd-tx2)!important;font:700 13px var(--rd-font)!important;transition:all .25s var(--rd-ease)}
html:root:root .copies-segments button:hover{color:#fff!important;background:rgba(255,255,255,.07)!important}
html:root:root .copies-segments button[aria-pressed=true]{background:rgba(var(--rd-rgb),.14)!important;color:var(--rd-a4)!important;box-shadow:inset 0 0 0 1.5px rgba(var(--rd-rgb),.7),0 0 14px -4px rgba(var(--rd-rgb),.7)!important}
html:root:root .generation-actions #generate-submit{height:50px;min-width:0;width:100%;padding:0 20px!important;border-radius:15px!important;font-size:14.5px!important;white-space:nowrap;display:inline-flex;align-items:center;justify-content:center;gap:8px}
@media(max-width:700px){html:root:root .generation-actions{grid-template-columns:1fr 1fr}html:root:root .generation-actions #generate-submit{grid-column:1/-1}}
/* fix: the count control is one horizontal pill; the create button takes its own full row */
html:root:root .generation-actions{grid-template-columns:auto minmax(0,1fr)!important}
html:root:root .generation-actions #generate-submit{grid-column:1/-1!important;height:54px;font-size:15.5px!important}
html:root:root .copies-control{flex-direction:row!important;flex-wrap:nowrap!important;width:auto!important;min-width:0;justify-content:space-between;overflow:visible!important;padding:0 8px 0 16px!important}
html:root:root .copies-control>span{flex:none;white-space:nowrap}
html:root:root .copies-segments{flex:none;position:static!important}
html:root:root .generation-actions .queue-toggle{font-size:13px!important}

/* preset names wrap onto 2-3 lines to save width; the block is never narrower than the two hover buttons */
html:root:root :is(#presets,#hidden-presets) .preset-card .preset-side{min-width:76px!important;max-width:108px!important}
html:root:root :is(#presets,#hidden-presets) .preset-card .preset-name{-webkit-line-clamp:3!important;padding:6px 10px!important;font:600 12px/1.25 var(--rd-font)!important;overflow-wrap:break-word!important;word-break:normal!important;hyphens:auto}
html:root:root :is(#presets,#hidden-presets) .preset-card .preset-controls{gap:6px!important}
html:root:root :is(#presets,#hidden-presets) .preset-card .preset-controls>button{width:28px!important;height:28px!important;border-radius:9px!important}
html:root:root :is(#presets,#hidden-presets) .preset-card .preset-controls>button svg{width:14px;height:14px}
html:root:root #presets .preset-plus .preset-name{white-space:normal!important;max-width:84px;line-height:1.2}
html:root:root :is(#presets,#hidden-presets) .preset-card .preset-side{max-width:96px!important}
html:root:root :is(#presets,#hidden-presets) .preset-card .preset-name{padding:6px 8px!important}
html:root:root :is(#presets,#hidden-presets) .preset-card .preset-name{box-sizing:border-box!important;min-width:0!important;flex:1 1 0!important;width:100%!important;max-width:100%!important;white-space:normal!important}
html:root:root :is(#presets,#hidden-presets) .preset-card .preset-side{display:flex!important;width:96px!important}
html:root:root :is(#presets,#hidden-presets) .preset-card .preset-side{width:100px!important;max-width:100px!important}
html:root:root :is(#presets,#hidden-presets) .preset-card .preset-name{hyphens:manual!important}

/* ===== adaptive layout: presets never scroll (the prompt box above gives way), results narrow when scale leaves empty space ===== */
@media(min-width:901px){
  html:root:root .presets-panel{max-height:none!important;overflow:visible!important}
  html:root:root .workspace,html:root:root .workspace:has(.composer .attachments:not(:empty)),html:root:root.embedded #studio>.workspace,html:root:root.embedded #studio>.workspace:has(.composer .attachments:not(:empty)),html:root:root.embedded .workspace{grid-template-rows:minmax(0,1fr) auto!important}
  html:root:root .composer{min-height:0!important;overflow:auto}
  html:root:root .composer textarea{flex:1 1 56px!important;min-height:56px!important}
}
/* ===== result card buttons: they get a little smaller and then wrap into a second row instead of being cut ===== */
html:root:root .job-bar{container-type:inline-size}
html:root:root .job-controls{display:flex!important;flex-wrap:wrap!important;gap:4px!important;justify-content:flex-end;min-width:0}
html:root:root .job-controls>:is(button,a){flex:none!important;width:clamp(24px,8.6cqw,32px)!important;height:clamp(24px,8.6cqw,32px)!important;min-width:0!important;padding:0!important}
html:root:root .job-controls>:is(button,a) svg{width:62%;height:62%}
html:root:root .job-bar-row{align-items:flex-start;flex-wrap:nowrap}
/* sliders: a comfortable click area */
html:root:root :is(#preset-scale,#result-scale){height:22px;cursor:pointer;touch-action:none;position:relative;z-index:2}
html:root:root :is(.preset-scale-control,.result-scale){position:relative;z-index:2}
/* the real culprit of the squeezed buttons: p71 gave every button of the row flex:1 with a 36px cap. Now: fixed square, slightly smaller on narrow cards, wrapping into rows */
html:root:root .job .job-bar-row{--jb:clamp(24px,8.8cqw,32px);flex-wrap:wrap!important;gap:4px!important;align-items:flex-start!important;justify-content:flex-start}
html:root:root .job .job-bar-row>*,html:root:root .job .job-bar .job-controls>:is(button,a){flex:0 0 auto!important;min-width:0!important;max-width:none!important;width:var(--jb)!important;height:var(--jb)!important}
html:root:root .job .job-bar-row>*>svg,html:root:root .job .job-bar .job-controls>:is(button,a) svg{width:66%!important;height:66%!important}

/* results scale: smooth, never a horizontal scroll, the header never wraps (so the slider keeps its place) */
html:root:root,html:root:root body{overflow-x:hidden}
@media(min-width:901px){
    html:root:root .results-panel{min-width:0;overflow:hidden}
  html:root:root .results-tools,html:root:root .result-tabs-row,html:root:root .results-panel>div:first-child{flex-wrap:nowrap!important}
  html:root:root .results-tools{justify-content:flex-end;white-space:nowrap}
  html:root:root #jobs{overflow-x:hidden}
}

/* ======================= round 3 ======================= */
/* page heading text is gone on both sites (only the guest quota chip may stay) */
html:root:root .page-heading>div:first-child{display:none!important}
html:root:root .page-heading{display:none!important}
html:root:root:not(.embedded):not(.gallery-only) .page-heading:has(#quota-chip:not([hidden])){display:flex!important;justify-content:flex-end;margin:0 0 6px}

/* left block: no hint text; queue · count · create in one row, the create button is shorter */
html:root:root #generation-note,html:root:root .composer-bottom>small{display:none!important}
html:root:root .composer-bottom{display:block!important}
html:root:root .generation-actions{display:flex!important;flex-wrap:wrap!important;grid-template-columns:none!important;gap:10px!important;align-items:center!important;justify-content:flex-start!important}
html:root:root .generation-actions .queue-toggle{order:1;flex:0 0 auto;height:48px}
html:root:root .generation-actions .copies-control{order:2;flex:0 0 auto;height:48px}
html:root:root .generation-actions #generate-submit{order:3;flex:1 1 190px!important;width:auto!important;max-width:260px;min-width:170px;height:48px!important;grid-column:auto!important;font-size:14.5px!important}

/* presets: one long strip, scrolled sideways (no visible scrollbar), never a second row */
html:root:root :is(#presets,#hidden-presets){flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:none;-ms-overflow-style:none;scroll-behavior:smooth;padding-bottom:2px}
html:root:root :is(#presets,#hidden-presets)::-webkit-scrollbar{display:none;width:0;height:0}
html:root:root :is(#presets,#hidden-presets) .preset-card{flex:0 0 auto!important}
html:root:root .presets-panel .panel-heading{display:flex;align-items:center;gap:12px}
html:root:root .presets-wide{margin-left:auto;height:34px;padding:0 14px!important;border-radius:11px!important;background:var(--rd-s1)!important;border:1px solid var(--rd-line2)!important;color:var(--rd-tx2)!important;font:600 12.5px var(--rd-font)!important;white-space:nowrap;transition:all .25s var(--rd-ease)}
html:root:root .presets-wide:hover{color:#fff!important;border-color:rgba(var(--rd-rgb),.6)!important}
html:root:root .presets-wide[aria-pressed=true]{background:rgba(var(--rd-rgb),.12)!important;color:var(--rd-a4)!important;box-shadow:inset 0 0 0 1.5px rgba(var(--rd-rgb),.65)}
@media(max-width:900px){html:root:root .presets-wide{display:none!important}}
@media(min-width:901px){
  html.wide-presets:root:root .workspace,html.wide-presets:root:root .workspace:has(.composer .attachments:not(:empty)){grid-template-areas:"composer results" "presets presets"!important}
  html.wide-presets.embedded:root:root .workspace,html.wide-presets.embedded:root:root #studio>.workspace,html.wide-presets.embedded:root:root #studio>.workspace:has(.composer .attachments:not(:empty)){grid-template-areas:"composer divider results" "presets presets presets"!important}
  html.wide-presets:root:root .workspace-divider{grid-row:1!important}
}

/* GPT | Banana next to the aspect picker, the same size and look */
html:root:root .prompt-heading{display:flex!important;align-items:center;gap:10px}
html:root:root .prompt-heading>label:first-child{margin-right:auto}
html:root:root details.aspect-picker>summary,html:root:root .engine-switch.standalone{height:40px!important;border-radius:13px!important;background:rgba(255,255,255,.045)!important;border:1px solid var(--rd-line2)!important;box-sizing:border-box}
html:root:root .engine-switch.standalone{display:inline-flex;align-items:center;gap:2px;padding:3px!important;margin:0!important}
html:root:root .engine-switch.standalone button{height:32px!important;padding:0 16px!important;border-radius:10px!important}

/* result cards: four layouts (2, 3, 4, 5 in a row). Buttons sit flush with both card edges; only a second row is left-aligned */
html:root:root .job .job-bar{container-type:inline-size}
html:root:root .job .job-bar-row{display:flex!important;flex-wrap:nowrap!important;justify-content:space-between!important;align-items:center!important;gap:4px!important;--jb:40px;--cols:8}
html:root:root .job .job-bar-row>*,html:root:root .job .job-bar .job-controls>:is(button,a){flex:0 0 auto!important;width:var(--jb)!important;height:var(--jb)!important;min-width:0!important;max-width:none!important}
@container (min-width:380px){html:root:root .job .job-bar-row{--jb:46px}}
@container (max-width:279px){html:root:root .job .job-bar-row{display:grid!important;grid-template-columns:repeat(var(--cols),var(--jb))!important;row-gap:4px!important;--jb:44px;--cols:5}}
@container (max-width:229px){html:root:root .job .job-bar-row{--jb:40px;--cols:4}}
@container (max-width:189px){html:root:root .job .job-bar-row{--jb:38px;--cols:4}}
@container (max-width:149px){html:root:root .job .job-bar-row{--jb:32px;--cols:4}}
@container (max-width:219px){html:root:root .job-stamp .t-from,html:root:root .job-stamp .t-sep{display:none}}
html:root:root .job-stamp{display:flex;align-items:center;gap:6px;min-width:0;overflow:hidden}
html:root:root .job-stamp .stamp-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}

/* the stepped scale: four notches */
html:root:root .result-scale{display:inline-flex!important;align-items:center;gap:8px}
html:root:root .results-tools .result-scale>span{display:inline!important}
html:root:root .result-scale input[type=range]{-webkit-appearance:none;appearance:none;width:92px!important;height:22px!important;margin:0;background:
  radial-gradient(circle at 8px 50%,rgba(255,255,255,.55) 2.5px,transparent 3.2px),
  radial-gradient(circle at calc(8px + (100% - 16px)/3) 50%,rgba(255,255,255,.55) 2.5px,transparent 3.2px),
  radial-gradient(circle at calc(8px + (100% - 16px)*2/3) 50%,rgba(255,255,255,.55) 2.5px,transparent 3.2px),
  radial-gradient(circle at calc(100% - 8px) 50%,rgba(255,255,255,.55) 2.5px,transparent 3.2px)!important;cursor:pointer}
html:root:root .result-scale input[type=range]::-webkit-slider-runnable-track{height:3px;border-radius:3px;background:rgba(255,255,255,.14)}
html:root:root .result-scale input[type=range]::-moz-range-track{height:3px;border-radius:3px;background:rgba(255,255,255,.14)}
html:root:root .result-scale input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;margin-top:-6.5px;border-radius:50%;background:var(--rd-a);box-shadow:0 0 0 3px rgba(var(--rd-rgb),.25),0 0 12px rgba(var(--rd-rgb),.7);border:0}
html:root:root .result-scale input[type=range]::-moz-range-thumb{width:16px;height:16px;border-radius:50%;background:var(--rd-a);border:0;box-shadow:0 0 12px rgba(var(--rd-rgb),.7)}
html:root:root .result-scale output{min-width:14px;text-align:center;font:700 13px var(--rd-mono)!important;color:var(--rd-a4)}
/* the scale is stepped now (the block no longer changes width), so the header may wrap safely on narrow panels */
@media(min-width:901px){
  html:root:root .result-filters{display:flex!important;flex-wrap:wrap!important;gap:8px 10px!important;align-items:center}
  html:root:root .results-tools{flex-wrap:nowrap!important;margin-left:auto;justify-content:flex-end}
}
html:root:root .results-panel{overflow:hidden}
@media(min-width:901px){html:root:root .results-panel>div.result-filters:first-child{display:flex!important;flex-wrap:wrap!important;gap:8px 10px!important}}

/* editor-only page (the big preset editor inside Project posts) */
html.editor-only .topbar,html.editor-only .page-heading,html.editor-only .workspace,html.editor-only #admin-settings,html.editor-only .shell>*:not(dialog){display:none!important}
html.editor-only,html.editor-only body{background:transparent!important}
html.editor-only #preset-dialog{max-height:calc(100dvh - 24px)}
/* the stepped scale and the full-width toggle do not exist on phones */
@media(max-width:900px){html:root:root .result-scale{display:none!important}}
html.editor-only #preset-dialog{width:min(760px,96vw)!important;max-width:none!important;max-height:calc(100dvh - 20px)!important;overflow:auto!important;margin:auto!important}

/* /photo: the same draggable split between the prompt block and the results */
@media(min-width:901px){
  html.split-on:not(.embedded):root:root .workspace,html.split-on:not(.embedded):root:root .workspace:has(.composer .attachments:not(:empty)){grid-template-columns:minmax(0,var(--composer-ratio,48%)) 14px minmax(0,1fr)!important;grid-template-areas:"composer divider results" "presets divider results"!important;column-gap:0!important}
  html.split-on.wide-presets:not(.embedded):root:root .workspace,html.split-on.wide-presets:not(.embedded):root:root .workspace:has(.composer .attachments:not(:empty)){grid-template-areas:"composer divider results" "presets presets presets"!important}
  html.split-on:not(.embedded):root:root .workspace-divider{display:block!important;grid-area:divider;grid-row:1!important;cursor:col-resize;touch-action:none;position:relative;outline:0}
  html.split-on:not(.embedded):root:root .workspace-divider::after{content:"";position:absolute;left:50%;top:12%;bottom:12%;width:3px;margin-left:-1.5px;border-radius:3px;background:rgba(255,255,255,.16);transition:background .2s,box-shadow .2s}
  html.split-on:not(.embedded):root:root .workspace-divider:hover::after,html.split-on:not(.embedded):root:root .workspace-divider:focus-visible::after{background:var(--rd-a);box-shadow:0 0 14px rgba(var(--rd-rgb),.8)}
}

/* vertical split handle on the top edge of the presets block */
html:root:root .presets-panel{position:relative}
html:root:root .presets-hdivider{display:none}
@media(min-width:901px){
  html:root:root .presets-hdivider{display:block;position:absolute;left:12%;right:12%;top:-7px;height:14px;z-index:6;cursor:row-resize;touch-action:none;outline:0}
  html:root:root .presets-hdivider::after{content:"";position:absolute;left:50%;top:50%;width:64px;height:4px;margin:-2px 0 0 -32px;border-radius:4px;background:rgba(255,255,255,.2);transition:background .2s,box-shadow .2s,width .2s,margin .2s}
  html:root:root .presets-hdivider:hover::after,html:root:root .presets-hdivider:focus-visible::after,html:root:root.resizing-rows .presets-hdivider::after{width:96px;margin-left:-48px;background:var(--rd-a);box-shadow:0 0 14px rgba(var(--rd-rgb),.8)}
  html:root:root.resizing-rows,html:root:root.resizing-rows *{cursor:row-resize!important;user-select:none!important}
}

/* style library inside Project posts: just one sideways strip of tiles */
html.library-only:root:root .presets-panel{min-height:0!important;padding:2px!important;background:transparent!important;border:0!important;box-shadow:none!important}
html.library-only:root:root .presets-panel .section-note,html.library-only:root:root .presets-panel .eyebrow,html.library-only:root:root .presets-panel .panel-heading>div:first-child,html.library-only:root:root .presets-panel .presets-wide{display:none!important}
html.library-only:root:root .presets-panel .panel-heading{display:flex!important;justify-content:flex-end;margin:0 0 6px!important;padding:0!important;min-height:0}
html.library-only:root:root .presets-panel .preset-scale-control{display:flex!important;margin-left:auto}
/* the same sideways strip as in Фото: no scroll bar, wheel and drag move it */
html.library-only:root:root :is(#presets,#hidden-presets){display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:none!important;gap:10px!important}
html.library-only:root:root :is(#presets,#hidden-presets)::-webkit-scrollbar{display:none!important}
html.library-only:root:root :is(#presets,#hidden-presets) .preset-card{flex:0 0 auto!important}
html.library-only:root:root .shell{padding:2px!important}
html.library-only:root:root .preset-card{width:auto!important;min-height:0!important}
html.library-only:root:root .hidden-presets{margin:4px 0 0}

html.library-only:root:root,html.library-only:root:root body{overflow:hidden!important}
html.library-only:root:root .hidden-presets>summary{font-size:11px;padding:2px 0}

/* dragging the presets block higher than the biggest scale adds whole rows: the strip wraps into 2 or 3 lines */
html[data-preset-rows="2"]:root:root #presets,html[data-preset-rows="3"]:root:root #presets{flex-wrap:wrap!important;overflow:visible!important;align-content:flex-start}
html.library-only[data-preset-rows]:root:root #presets{flex-wrap:nowrap!important;overflow-x:auto!important}

html[data-preset-rows="4"]:root:root #presets{flex-wrap:wrap!important;overflow:visible!important;align-content:flex-start}
/* names shorter than 50 characters are always shown in full: up to four lines, the block widens a little when it has to */
html:root:root :is(#presets,#hidden-presets) .preset-card[data-fit="1"]{height:auto!important;min-height:var(--ph)}
html:root:root :is(#presets,#hidden-presets) .preset-card[data-fit="1"] .preset-pic{height:auto!important;align-self:stretch}
html:root:root :is(#presets,#hidden-presets) .preset-card[data-fit="1"] .preset-pic .preset-art{height:100%!important;min-height:var(--ph)}
html:root:root :is(#presets,#hidden-presets) .preset-card[data-fit="1"] .preset-side{width:auto!important;min-width:100px!important;max-width:152px!important}
html:root:root :is(#presets,#hidden-presets) .preset-card[data-fit="1"] .preset-name{-webkit-line-clamp:4!important;font-size:11.5px!important;line-height:1.22!important;width:auto!important;flex:1 1 auto!important}
html:root:root body .studio-shell .creative-tile[data-fit="1"]{height:auto;min-height:var(--ph)}
html:root:root body .studio-shell .creative-tile[data-fit="1"] .creative-tile-side{width:auto;min-width:100px;max-width:152px}
html:root:root body .studio-shell .creative-tile[data-fit="1"] .creative-tile-name{-webkit-line-clamp:4;font-size:11.5px!important;line-height:1.22!important}

/* fix: with a taller card the picture keeps its own height (it must not stretch with the text) */
html:root:root :is(#presets,#hidden-presets) .preset-card[data-fit="1"] .preset-pic{height:auto!important;align-self:flex-start}
html:root:root :is(#presets,#hidden-presets) .preset-card[data-fit="1"] .preset-pic .preset-art{height:var(--ph)!important;min-height:0!important}
html:root:root :is(#presets,#hidden-presets) .preset-card[data-fit="1"] .preset-pic img{height:var(--ph)!important}
html:root:root :is(#presets,#hidden-presets) .preset-card[data-fit="1"]{align-items:flex-start!important}
html:root:root :is(#presets,#hidden-presets) .preset-card[data-fit="1"] .preset-side{align-self:stretch}
/* ===== dark graphite surfaces with an accent glow (no olive mud), HomeAI ===== */
:root{--rd-bg:#070708;--rd-bg2:#0b0b0c;--background:#070708;--card:#0e0e10;--popover:#111113;--secondary:rgba(255,255,255,.055);--muted:rgba(255,255,255,.045)}
html:root body::before{background:
  radial-gradient(34% 30% at 10% 6%,rgba(var(--rd-rgb),.055),transparent 70%),
  radial-gradient(30% 26% at 94% 14%,rgba(var(--rd-rgb),.03),transparent 70%)}
html:root :is(.panel,.job,.preset-card,.queue-job){background:linear-gradient(180deg,#131315,#0d0d0f)!important;border:1px solid rgba(255,255,255,.07)!important;box-shadow:0 0 0 1px rgba(var(--rd-rgb),.045),0 26px 60px -36px rgba(var(--rd-rgb),.32),inset 0 1px 0 rgba(255,255,255,.04)!important}
html:root .never-sidebar{background:linear-gradient(180deg,#111113,#0a0a0b)!important;border:1px solid rgba(255,255,255,.07)!important;box-shadow:0 0 0 1px rgba(var(--rd-rgb),.05),0 30px 70px -40px rgba(var(--rd-rgb),.35)!important}
html:root .topbar{background:linear-gradient(180deg,#121214,#0c0c0e)!important;border:1px solid rgba(255,255,255,.07)!important;box-shadow:0 0 0 1px rgba(var(--rd-rgb),.04),0 20px 50px -34px rgba(var(--rd-rgb),.3)!important}
html:root :is(.dialog,.disk-dialog,.house-editor,.house-picker,.creative-editor-modal,.photo-archive-modal,.cover-editor-modal,.dp-dialog[data-slot=dialog-content]){background:linear-gradient(180deg,#121214,#0b0b0d)!important;border:1px solid rgba(var(--rd-rgb),.22)!important;box-shadow:0 60px 140px -30px #000,0 0 0 1px rgba(var(--rd-rgb),.08),0 0 60px -26px rgba(var(--rd-rgb),.5)!important}
html:root :is(input,textarea,select):not([type=range]):not([type=color]):not([type=checkbox]):not([type=radio]){background:rgba(255,255,255,.045)!important}
/* ===== p95-audit (2026-10-15): phone fixes found in the full pass ===== */
@media(max-width:560px){
  /* /photo header: the account block (name + exit) ran 130 px off the right edge */
  html:root:root body .topbar{gap:8px!important;flex-wrap:nowrap!important}
  html:root:root body .topbar .brand{flex:1 1 auto!important;min-width:0!important}
  html:root:root body .topbar .brand>span:last-child{min-width:0;overflow:hidden}
  html:root:root body .topbar .brand>span:last-child *{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  html:root:root body .topbar .rd-accent-btn{flex:none!important;width:38px!important;min-width:38px!important;height:38px!important;padding:0!important;justify-content:center;gap:0!important}
  html:root:root body .topbar .rd-accent-btn>span{display:none!important}
  html:root:root body .topbar .account{flex:none!important;margin-left:0!important;gap:6px!important;min-width:0}
  html:root:root body .topbar .account>span{display:none!important}
}

/* result cards: every button shares the width of the card equally (a square, 42 px at most), so the row always fits and never leaves the card;
   on a narrow card the row breaks into lines of five instead of squeezing the icons */
html:root:root:root:root .job .job-bar-row{display:flex!important;flex-wrap:nowrap!important;justify-content:space-between!important;align-items:center!important;gap:4px!important;grid-template-columns:none!important;min-width:0}
html:root:root:root:root .job .job-bar-row>.job-controls{display:contents!important}
html:root:root:root:root .job .job-bar-row>.job-origin,html:root:root:root:root .job .job-bar-row .job-controls>:is(button,a){flex:1 1 0!important;width:auto!important;height:auto!important;aspect-ratio:1/1!important;max-width:42px!important;min-width:0!important}
@container (max-width:239px){
  html:root:root:root:root .job .job-bar-row{flex-wrap:wrap!important;justify-content:flex-start!important;row-gap:4px!important}
  html:root:root:root:root .job .job-bar-row>.job-origin,html:root:root:root:root .job .job-bar-row .job-controls>:is(button,a){flex:0 0 calc((100% - 16px) / 5)!important;max-width:none!important}
}

/* a button never jumps up on hover (it was cut off by the edge of its block); the hover is shown by colour only */
html:root:root:root :is(button,a.btn,[role=tab],[role=button],summary):hover,html:root:root:root :is(button,a.btn,[role=tab],[role=button],summary):active{transform:none!important}

/* segmented switches and small buttons: room on every side */
html:root:root:root :is(.engine-switch,.aspect-options,.copies-segments,.result-tabs,.scope-switch,.adm-seg){padding:5px!important;gap:4px!important}
html:root:root:root :is(button.quiet,.storage-open){padding-top:7px!important;padding-bottom:7px!important;padding-left:13px!important;padding-right:13px!important}
/* ===== p96-studio: Banana model/quality row and the Video tab (Google AI Studio) ===== */
html:root:root .studio-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(138px,1fr));gap:10px 12px;align-items:end;margin:10px 0 4px;width:100%;min-width:0;box-sizing:border-box}
html:root:root .studio-row[hidden],html:root:root .video-results[hidden]{display:none!important}
html:root:root .studio-field{display:grid;gap:5px;min-width:0;font:600 11.5px var(--rd-font,inherit);color:var(--rd-tx3,#8d8d94);letter-spacing:.02em}
html:root:root .studio-field select{width:100%;min-width:0;max-width:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;height:38px;padding:0 34px 0 12px;border-radius:12px;border:1px solid var(--rd-line,rgba(255,255,255,.12));background-color:var(--rd-s1,#16171a);color:var(--rd-tx,#f1f1f3);font:600 13px var(--rd-font,inherit);cursor:pointer;appearance:none;-webkit-appearance:none;background-image:linear-gradient(45deg,transparent 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,transparent 50%);background-position:calc(100% - 17px) 16px,calc(100% - 12px) 16px;background-size:5px 5px;background-repeat:no-repeat}
html:root:root .studio-field select:disabled{opacity:.55;cursor:default}
html:root:root .studio-field select:focus-visible{outline:2px solid var(--rd-a,#c6f432);outline-offset:1px}
html:root:root .banana-model.studio-row{flex:1 1 100%;margin:8px 0 2px;max-width:none}
@media(min-width:620px){html:root:root .studio-row>.studio-field:first-child{grid-column:span 2}}
@media(max-width:619px){html:root:root .studio-row>.studio-field:first-child{grid-column:1/-1}}
html.banana-mode:root:root .quality-control{display:none!important}
html:root:root #generate-form .panel-heading{flex-wrap:wrap;gap:10px}

/* video mode: the picture-only controls are hidden */
html.video-mode:root:root :is(#queue-mode,.copies-control,#aspect-picker,.presets-panel,#selected-preset,#edit-chat-choice,.result-filters,#retention-note,#scope-note,#jobs,.quality-control){display:none!important}
html.video-mode:root:root .workspace{grid-template-rows:1fr!important}

/* the list of videos */
html:root:root .video-results{display:grid;gap:14px;align-content:start;padding:2px 2px 16px;overflow:auto}
html:root:root .video-head{display:flex;flex-wrap:wrap;gap:4px 12px;align-items:baseline}
html:root:root .video-head strong{font:700 15px var(--rd-font,inherit);color:var(--rd-tx,#fff)}
html:root:root .video-head small{color:var(--rd-tx3,#8d8d94);font-size:12px}
html:root:root .video-card{display:grid;gap:10px;padding:14px;border-radius:16px;background:var(--rd-s1,#16171a);border:1px solid var(--rd-line,rgba(255,255,255,.1))}
html:root:root .video-card header{display:flex;flex-wrap:wrap;gap:2px 10px;align-items:baseline}
html:root:root .video-card header strong{font:700 14px var(--rd-font,inherit);color:var(--rd-tx,#fff)}
html:root:root .video-card header small{color:var(--rd-tx3,#8d8d94);font-size:12px}
html:root:root .video-files{display:grid;gap:10px;grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}
html:root:root .video-files video{width:100%;max-height:420px;border-radius:12px;background:#000;display:block}
html:root:root .video-state{display:flex;align-items:center;gap:10px;margin:0;padding:18px 14px;border-radius:12px;background:rgba(255,255,255,.03);color:var(--rd-tx2,#c4c4c8);font:600 13px var(--rd-font,inherit)}
html:root:root .video-failed .video-state{color:#ff9aa8;background:rgba(255,90,110,.08)}
html:root:root .video-bar{flex:none;width:34px;height:4px;border-radius:4px;background:linear-gradient(90deg,transparent,var(--rd-a,#c6f432),transparent);background-size:200% 100%;animation:video-run 1.2s linear infinite}
@keyframes video-run{from{background-position:200% 0}to{background-position:-200% 0}}
html:root:root .video-prompt{margin:0;color:var(--rd-tx3,#8d8d94);font-size:12.5px;line-height:1.45;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
html:root:root .video-actions{display:flex;flex-wrap:wrap;gap:8px}
html:root:root .video-actions :is(a,button){display:inline-flex;align-items:center;height:34px;padding:0 14px;border-radius:10px;border:1px solid var(--rd-line,rgba(255,255,255,.14));background:transparent;color:var(--rd-tx2,#c4c4c8);font:600 12.5px var(--rd-font,inherit);text-decoration:none;cursor:pointer}
html:root:root .video-actions :is(a,button):hover:not(:disabled){border-color:var(--rd-a,#c6f432);color:var(--rd-a,#c6f432)}
html:root:root .video-actions button:disabled{opacity:.45;cursor:default}

/* ===== content settings (owner), quota note, storage time ===== */
html.video-mode:root:root #admin-settings{display:none!important}
html:root:root .video-note{grid-column:1/-1;margin:2px 0 0;color:var(--rd-tx3,#8d8d94);font-size:12px;line-height:1.4}
html:root:root .video-keep{color:var(--rd-tx3,#8d8d94);font-size:12px}
html:root:root .content-settings{margin:12px 0 0;border-radius:16px;background:var(--rd-s1,#16171a);border:1px solid var(--rd-line,rgba(255,255,255,.1));overflow:hidden}
html:root:root .content-settings>summary{padding:12px 16px;cursor:pointer;font:700 13px var(--rd-font,inherit);color:var(--rd-tx2,#c4c4c8)}
html:root:root .cs-panel{display:grid;gap:12px;padding:4px 16px 16px;max-height:70vh;overflow:auto}
html:root:root .cs-panel h3{margin:6px 0 0;font:700 13px var(--rd-font,inherit);color:var(--rd-tx,#fff)}
html:root:root .cs-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px 12px;align-items:end}
html:root:root .cs-form input{height:38px;padding:0 12px;border-radius:12px;border:1px solid var(--rd-line,rgba(255,255,255,.12));background:var(--rd-bg,#0c0c0d);color:var(--rd-tx,#f1f1f3);font:600 13px var(--rd-font,inherit);width:100%;box-sizing:border-box}
html:root:root .cs-form button,html:root:root .cs-refresh{height:38px;padding:0 16px;border-radius:12px;border:1px solid var(--rd-a,#c6f432);background:transparent;color:var(--rd-a,#c6f432);font:700 13px var(--rd-font,inherit);cursor:pointer;justify-self:start}
html:root:root .cs-status{grid-column:1/-1;color:var(--rd-tx3,#8d8d94);font-size:12px}
html:root:root .cs-table{display:grid;gap:2px}
html:root:root .cs-row{display:grid;grid-template-columns:1.6fr 1fr 1fr .8fr;gap:10px;padding:8px 10px;border-radius:10px;background:rgba(255,255,255,.03);font-size:12.5px;color:var(--rd-tx2,#c4c4c8)}
html:root:root .cs-row.cs-j{grid-template-columns:110px 1.1fr 2.2fr 1fr}
html:root:root .cs-row.cs-head{background:none;color:var(--rd-tx3,#8d8d94);font:700 11px var(--rd-font,inherit);text-transform:uppercase;letter-spacing:.05em}
html:root:root .cs-row span{min-width:0;overflow-wrap:anywhere}
@media(max-width:700px){html:root:root .cs-row,html:root:root .cs-row.cs-j{grid-template-columns:1fr 1fr}html:root:root .cs-row.cs-head{display:none}}
/* site switch */
.adn{--adn-ac:var(--rd-a,#8f7dff);display:inline-flex;gap:2px;padding:3px;border-radius:999px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.09);font:600 12.5px/1 inherit;font-family:inherit;flex:none;align-items:center;margin-right:12px}
.adn a{padding:7px 12px;border-radius:999px;color:rgba(255,255,255,.62);text-decoration:none;transition:color .2s,background .25s;white-space:nowrap}
.adn a:hover{color:#fff;background:rgba(255,255,255,.08)}
.adn a.on{background:var(--adn-ac);color:#0a0a0b;box-shadow:0 0 18px -4px var(--adn-ac)}
@media(max-width:900px){html:root:root body .topbar .topbar-section{display:none}}
@media(max-width:640px){
  html:root:root body .topbar{gap:6px!important;padding:0 8px!important}
  html:root:root body .topbar .adn{margin-right:4px}
  html:root:root body .topbar .adn a{padding:6px 8px;font-size:11.5px}
  html:root:root body .topbar .brand span:last-child{display:none}
}
@media(max-width:400px){html:root:root body .topbar .adn a{padding:6px 6px;font-size:11px}}
/* accent picker (button in the header + pop-up). Shared by both sites. */
.rd-accent-btn{display:inline-flex;align-items:center;gap:8px;height:36px;padding:0 14px 0 10px;border-radius:12px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.1);color:#d7d7d9;font:600 12.5px var(--rd-font,Manrope,sans-serif);cursor:pointer;transition:border-color .25s,box-shadow .3s,transform .3s var(--rd-spring,ease)}
.rd-accent-btn:hover{border-color:rgba(var(--rd-rgb),.7);box-shadow:0 0 22px -6px rgba(var(--rd-rgb),.7);transform:translateY(-1px)}
.rd-accent-dot{width:16px;height:16px;border-radius:50%;background:var(--rd-a);box-shadow:0 0 12px rgba(var(--rd-rgb),.8),inset 0 0 0 2px rgba(255,255,255,.35);flex:none}
.rd-accent-pop{position:fixed;z-index:100000;width:270px;display:none;gap:12px;padding:16px;border-radius:20px;background:#0e0e10;border:1px solid rgba(var(--rd-rgb),.35);box-shadow:0 40px 90px -20px #000,0 0 40px -14px rgba(var(--rd-rgb),.6);color:#e8e8ea;font:500 12.5px var(--rd-font,Manrope,sans-serif)}
.rd-accent-pop[data-open="1"]{display:grid;animation:rd-accent-in .3s var(--rd-spring,ease) both}
@keyframes rd-accent-in{from{opacity:0;transform:translateY(-8px) scale(.97)}to{opacity:1;transform:none}}
.rd-accent-pop strong{font:700 14px var(--rd-font,sans-serif)}
.rd-accent-wheel{position:relative;width:200px;height:200px;margin:0 auto;border-radius:50%;box-shadow:0 0 0 1px rgba(255,255,255,.12),0 18px 40px -16px rgba(var(--rd-rgb),.6)}
.rd-accent-wheel canvas{width:100%;height:100%;border-radius:50%;touch-action:none;cursor:crosshair;display:block}
.rd-accent-knob{position:absolute;width:20px;height:20px;margin:-10px 0 0 -10px;border-radius:50%;border:3px solid #fff;box-shadow:0 0 0 1px rgba(0,0,0,.5),0 4px 10px rgba(0,0,0,.5);pointer-events:none}
.rd-accent-pop label{display:grid;gap:6px;color:#9a9a9e;font-size:11.5px}
.rd-accent-pop input[type=range]{width:100%;height:12px;border-radius:8px;-webkit-appearance:none;appearance:none;cursor:pointer}
.rd-accent-pop input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:18px;height:18px;border-radius:50%;background:#fff;border:2px solid #0e0e10;box-shadow:0 0 0 1px rgba(255,255,255,.5)}
.rd-accent-hex{height:36px;padding:0 12px;border-radius:11px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.14);color:#fff;font:600 13px ui-monospace,Consolas,monospace;text-transform:uppercase;outline:none}
.rd-accent-hex:focus{border-color:rgba(var(--rd-rgb),.8)}
.rd-accent-swatches{display:flex;gap:8px;flex-wrap:wrap}
.rd-accent-swatches button{width:24px;height:24px;border-radius:50%;border:2px solid rgba(255,255,255,.25);cursor:pointer;transition:transform .2s}
.rd-accent-swatches button:hover{transform:scale(1.18)}
.rd-accent-reset{height:34px;border-radius:11px;background:transparent;border:1px solid rgba(255,255,255,.14);color:#c5c5c8;font:600 12px var(--rd-font,sans-serif);cursor:pointer}
.rd-accent-reset:hover{border-color:rgba(var(--rd-rgb),.7);color:#fff}
.rd-accent-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:8px}
.rd-accent-actions button{height:38px;border-radius:12px;background:rgba(var(--rd-rgb),.12);border:0;box-shadow:inset 0 0 0 1.5px rgba(var(--rd-rgb),.65);color:var(--rd-a4);font:700 12.5px var(--rd-font,sans-serif);cursor:pointer;transition:background .2s,box-shadow .25s}
.rd-accent-actions button:hover{background:rgba(var(--rd-rgb),.22);box-shadow:inset 0 0 0 1.5px rgba(var(--rd-rgb),.95),0 0 20px -6px rgba(var(--rd-rgb),.8)}
.rd-accent-actions button[hidden]{display:none}
.rd-accent-status{min-height:14px;color:#9a9a9e;font-size:11.5px}
