.picture-modal{width:min(640px,94vw);max-height:90dvh;overflow:auto;background:#1b191f;color:#f0ebf5;border:1px solid #53495e;border-radius:18px;padding:clamp(14px,2vw,24px)}.picture-modal::backdrop{background:#08060cc9;backdrop-filter:blur(6px)}.picture-modal header,.picture-modal footer,#picture-shots header,.picture-tools,#picture-reference{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.picture-modal header{justify-content:space-between;margin-bottom:12px}.picture-modal h2{margin:0;font-size:1.2rem}.picture-modal p{line-height:1.6}.picture-modal footer{margin-top:14px}.picture-modal footer label{margin-right:auto}#example-stage{width:100%;height:clamp(160px,42vh,395px);object-fit:contain;background:#121015;border-radius:10px;display:block}#example-strip{display:flex;gap:6px;margin-top:8px}#example-strip button{flex:1;min-width:0;padding:2px}#example-strip img{display:block;width:100%;height:48px;object-fit:cover;border-radius:4px}#example-strip button[aria-pressed=true],#picture-shots button[aria-pressed=true]{border-color:#cbb1e4;color:#ead6ff}#image-input-tools{margin:10px 0}.picture-tools{margin-top:10px}.picture-tools select,.picture-modal select{padding:6px;color:inherit;background:#211d26;border:1px solid #54485e;border-radius:6px}#picture-reference:empty{display:none}#picture-reference img{width:48px;height:48px;object-fit:cover;border-radius:6px}#picture-reference span{max-width:45%;overflow-wrap:anywhere}#picture-shots{padding:15px 0 8px;margin-top:13px;border-top:1px solid #3a333e}#picture-shots header strong{margin-right:auto}.frame-line{display:flex;align-items:center;gap:10px;margin:8px 0}.frame-line small{color:#ac9bb9}.frame-line input{flex:1;min-width:0;padding:8px;color:inherit;background:#17151a;border:1px solid #473e4e;border-radius:6px}.frame-line span{font-size:.9rem}.gif-switch{position:relative;display:inline-flex;align-items:center;gap:9px;cursor:pointer;margin:8px 0}.gif-switch input{position:absolute;width:1px;height:1px;opacity:0}.gif-switch i{width:34px;height:20px;border-radius:20px;background:#4c4654;display:grid;align-items:center;padding:3px;box-sizing:border-box}.gif-switch i::before{content:'';display:block;width:14px;height:14px;border-radius:50%;background:#eee8f3;transition:transform .16s}.gif-switch input:checked+i{background:#8b64aa}.gif-switch input:checked+i::before{transform:translateX(14px)}.gif-switch input:focus-visible+i{outline:2px solid white;outline-offset:2px}#mask-stage{display:block;max-width:100%;max-height:52vh;margin:auto;touch-action:none;cursor:crosshair}.picture-modal [hidden],#image-input-tools[hidden],#image-input-tools [hidden],.gif-switch[hidden]{display:none!important}

#work-list.gallery{display:grid;width:100%;max-width:none;grid-template-columns:repeat(var(--archive-cols,3),minmax(0,1fr));gap:16px;align-items:start}
#work-list .server-work{min-width:0;min-height:180px;padding:16px;gap:9px;border-radius:16px}
#work-list .server-work>img,#work-list .archive-video{width:100%;height:auto;max-height:none;aspect-ratio:16/10;object-fit:contain;background:#101015;border-radius:9px}
#work-list .archive-excerpt{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;line-height:1.55;color:#cdc7d1}
#work-list .server-work small{line-height:1.45}
#source .release-template{margin-inline-start:auto;font-size:.8rem}
body[data-mode=image]:is([data-page=generate],[data-page=batch]) #gallery{grid-template-columns:repeat(auto-fit,minmax(min(100%,215px),1fr));gap:16px}
body[data-mode=image]:is([data-page=generate],[data-page=batch]) #gallery .tile-art{width:100%;height:auto;aspect-ratio:4/3;object-fit:cover}
#picture-preview{width:min(880px,94vw)}#picture-preview #example-stage{width:100%;max-height:62dvh;object-fit:contain}
.fc-work{align-items:stretch}.fc-graph-pane{display:flex;flex-direction:column}.fc-graph-pane #fc-graph{flex:1}
#fc-sources .fc-node{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;padding:5px 13px 5px 4px;min-height:54px}#fc-sources .fc-unplug{padding:6px;line-height:1.45}#fc-sources .fc-choose{min-height:38px;line-height:1.5}
#fc-edit label{line-height:1.5}#fc-edit textarea{font:inherit;line-height:1.5;padding:8px}
@media(max-width:600px){body[data-mode=image]:is([data-page=generate],[data-page=batch]) #gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}#fc-sources .fc-node{grid-template-columns:1fr}}
@media(min-width:801px){#layout-space .fc-graph-pane{align-self:stretch}#layout-space .fc-work{align-items:start}#layout-space .fc-graph-pane .fc-tools{margin-top:auto}}

.preview-badge{position:absolute;z-index:2;inset:9px 9px auto auto;display:inline-flex;align-items:center;justify-content:center;gap:5px;width:max-content;height:28px;box-sizing:border-box;padding:0 9px;border-radius:99px;border:1px solid #ffffff50;background:rgba(21,18,29,.85);color:#fff;box-shadow:0 2px 7px #0004;font:600 12px/1.1 system-ui,sans-serif;white-space:nowrap;backdrop-filter:blur(8px)}
.preview-badge svg{width:15px;height:15px;flex:none;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linejoin:round;stroke-linecap:round}
.tile.selected .preview-badge{color:#23182f;background:#ecdcfc;border-color:#f7eaff}
button.preview-badge{cursor:pointer}button.preview-badge:focus-visible,.tile:focus-visible{outline:2px solid #ecdcfc;outline-offset:2px}
@media(max-width:760px){button.preview-badge::after{content:"";position:absolute;inset:-8px}}
