.gallery-body{min-height:100vh;color:var(--text);background:radial-gradient(circle at 18% 0,#312e812e,#0000 30%),radial-gradient(circle at 86% 10%,#4f46e514,#0000 30%),linear-gradient(#080a0f,#10131a 46%,#080a0f);overflow-x:hidden}.gallery-shell{width:min(1440px,100% - 56px);margin:0 auto;padding:34px 0 64px}.gallery-toolbar{justify-content:space-between;align-items:flex-end;gap:24px;margin-bottom:24px;display:flex}.gallery-toolbar h1{margin:0;font-size:34px;line-height:1}.gallery-toolbar-actions{align-items:center;gap:14px;display:flex}.gallery-filters{border:1px solid var(--line);background:#ffffff09;border-radius:999px;gap:8px;padding:5px;display:flex}.gallery-filters button,.gallery-workspace-link,.gallery-pager button,.gallery-empty button,.gallery-empty a{color:var(--muted);white-space:nowrap;background:0 0;border:1px solid #0000;border-radius:999px;padding:9px 12px;font-size:12px;font-weight:900;text-decoration:none}.gallery-filters button.active,.gallery-workspace-link{color:#fff;background:#4f46e51f;border-color:#4f46e5ad}.gallery-list{gap:20px;display:grid}.gallery-task{border:1px solid var(--line);contain:content;background:#080a0fe0;border-radius:18px;gap:18px;padding:18px;display:grid}.gallery-task-header{border-bottom:1px solid var(--line);grid-template-columns:minmax(190px,1fr) auto max-content;align-items:flex-start;gap:16px;padding-bottom:14px;display:grid}.gallery-task-meta{gap:5px;min-width:0;display:grid}.gallery-task-header strong{color:var(--text);font-size:18px}.gallery-task-header span,.gallery-task-header b,.gallery-section-title span,.gallery-pager span{color:var(--muted);font-size:12px;font-weight:800}.gallery-source-thumbs{justify-content:center;align-items:center;gap:8px;min-width:0;display:flex}.gallery-source-thumbs>span{color:var(--muted);white-space:nowrap;font-size:12px;font-weight:900}.gallery-source-thumb-list{align-items:center;gap:6px;display:flex}.gallery-source-thumb-list button{cursor:zoom-in;background:#ffffff0a;border:1px solid #ffffff29;border-radius:8px;width:44px;height:44px;padding:0;overflow:hidden}.gallery-source-thumb-list img{object-fit:cover;width:100%;height:100%;transition:transform .18s;display:block}.gallery-source-thumb-list button:hover img{transform:scale(1.06)}.gallery-source-thumb-list em{border:1px solid var(--line);min-width:34px;height:34px;color:var(--muted);border-radius:999px;place-items:center;font-size:12px;font-style:normal;font-weight:900;display:inline-grid}.gallery-image-section{gap:10px;display:grid}.gallery-section-title{align-items:center;gap:8px;display:flex}.gallery-section-title strong{color:var(--text);font-size:15px}.gallery-image-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;display:grid}.gallery-image-card{contain:layout paint;background:#090b10;border:1px solid #4f46e529;border-radius:14px;display:grid;position:relative;overflow:hidden}.gallery-image-card.main{aspect-ratio:1}.gallery-image-card.detail{aspect-ratio:3/4}.gallery-image-card.generating{background:radial-gradient(circle at 50% 38%,#4f46e51f,#0000 38%),linear-gradient(135deg,#ffffff0a,#4f46e50b),#090b10;border-color:#4f46e53d}.gallery-image-card.generating:before{content:"";background:linear-gradient(110deg,#0000 0%,#4f46e526 46%,#0000 58%),linear-gradient(135deg,#ffffff09,#4f46e50a);animation:1.4s infinite scan;position:absolute;inset:0;transform:translate(-100%)}@keyframes scan{to{transform:translate(100%)}}.gallery-generating-text{z-index:2;color:var(--muted);font-size:13px;font-weight:900;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.gallery-image-preview{cursor:zoom-in;background:#ffffff08;border:0;width:100%;height:100%;padding:0}.gallery-image-preview img{object-fit:contain;opacity:0;width:100%;height:100%;transition:opacity .16s;display:block}.gallery-image-preview img.is-loaded{opacity:1}.gallery-is-scrolling .gallery-image-card.generating:before{animation-play-state:paused}.gallery-card-actions{z-index:3;opacity:0;pointer-events:none;background:#03060b94;grid-template-columns:repeat(2,minmax(0,82px));place-content:center;gap:9px;transition:opacity .18s;display:grid;position:absolute;inset:0}.gallery-image-card:hover .gallery-card-actions,.gallery-image-card:focus-within .gallery-card-actions{opacity:1;pointer-events:auto}.gallery-card-actions button{color:#f5f7fb;background:#07080bc7;border:1px solid #ffffff2e;border-radius:999px;min-height:34px;font-size:12px;font-weight:900}.gallery-card-actions button:hover{color:var(--cyan);border-color:#4f46e580}.gallery-card-actions button.danger:hover,.lightbox-download.danger:hover{color:var(--red);border-color:#fb718594}.gallery-empty{border:1px dashed var(--line);min-height:360px;color:var(--muted);text-align:center;background:#ffffff06;border-radius:18px;place-items:center;gap:14px;padding:28px;font-size:14px;font-weight:900;display:grid}.gallery-empty button,.gallery-empty a{color:#fff;background:#4f46e51f;border-color:#4f46e5ad}.gallery-pager{justify-content:flex-end;align-items:center;gap:10px;margin-top:20px;display:flex}.gallery-pager button{border-color:var(--line);color:var(--text);background:#ffffff0a}.gallery-pager button:disabled{cursor:not-allowed;opacity:.42}.gallery-lightbox-actions{flex-wrap:wrap;justify-content:flex-end;gap:8px;display:flex}.gallery-lightbox-actions .lightbox-download{color:#fff;white-space:nowrap;background:#4f46e51f;border:1px solid #4f46e5ad;border-radius:999px;justify-content:center;align-items:center;min-width:58px;min-height:36px;padding:0 12px;font-size:12px;font-weight:900;line-height:1;display:inline-flex}.gallery-lightbox-actions .lightbox-download:hover{color:#fff;background:#4f46e538;border-color:#4f46e5ad}.gallery-lightbox-actions .lightbox-download.danger{background:#fb718514;border-color:#fb71854d}.gallery-lightbox-actions .lightbox-download.danger:hover{color:var(--red);background:#fb718521;border-color:#fb718594}@media (width<=1180px){.gallery-image-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (width<=760px){.gallery-body{background:radial-gradient(circle at 20% -8%,#4f46e524,#0000 30%),linear-gradient(#080a0f,#0b0e14 48%,#080a0f)}.gallery-shell{width:100%;padding:18px 12px calc(34px + env(safe-area-inset-bottom))}.gallery-toolbar{flex-direction:column;align-items:stretch;gap:14px;margin-bottom:16px}.gallery-toolbar h1{font-size:28px}.gallery-toolbar-actions{flex-direction:column;align-items:stretch;gap:10px}.gallery-filters{border-radius:14px;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;display:grid}.gallery-filters button,.gallery-workspace-link,.gallery-pager button,.gallery-empty button,.gallery-empty a{border-radius:11px;min-height:42px;font-size:13px}.gallery-list{gap:14px}.gallery-task{contain:layout paint;border-radius:14px;gap:14px;padding:14px}.gallery-task-header{grid-template-columns:minmax(0,1fr) max-content;gap:10px;padding-bottom:12px}.gallery-source-thumbs{grid-column:1/-1;justify-content:flex-start}.gallery-source-thumb-list{scrollbar-width:none;overflow-x:auto}.gallery-source-thumb-list::-webkit-scrollbar{display:none}.gallery-source-thumb-list button{flex:none;width:42px;height:42px}.gallery-task-header strong{font-size:15px}.gallery-task-header span,.gallery-task-header b{font-size:11px}.gallery-image-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.gallery-card-actions{opacity:1;pointer-events:auto;background:#03060be6;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:8px;position:static}.gallery-card-actions button{border-radius:10px;min-height:34px;font-size:12px}.gallery-image-preview{min-height:0}.gallery-image-card.main,.gallery-image-card.detail{aspect-ratio:auto}.gallery-image-card.main .gallery-image-preview{aspect-ratio:1}.gallery-image-card.detail .gallery-image-preview{aspect-ratio:3/4}.gallery-empty{border-radius:14px;min-height:260px;padding:20px 14px}.gallery-pager{justify-content:center}.gallery-lightbox-dialog{width:100vw;max-width:none;height:100dvh;max-height:none;padding:calc(54px + env(safe-area-inset-top)) 12px calc(18px + env(safe-area-inset-bottom));border-radius:0}.gallery-lightbox-actions{grid-template-columns:repeat(2,minmax(0,1fr));width:100%;display:grid}.gallery-lightbox-actions .lightbox-download{min-width:0;min-height:40px;padding:0 8px}.repaint-dialog,.retry-dialog{width:100vw;max-width:none;max-height:100dvh;padding:calc(46px + env(safe-area-inset-top)) 12px calc(16px + env(safe-area-inset-bottom));border-radius:0}.repaint-header,.repaint-footer{flex-direction:column;align-items:stretch}.repaint-tools{justify-content:space-between;width:100%}.repaint-canvas-wrap{max-height:52dvh}.repaint-footer textarea,.retry-dialog textarea{font-size:16px}}@media (width<=420px){.gallery-shell{padding-left:10px;padding-right:10px}.gallery-image-grid{gap:8px}.gallery-card-actions{grid-template-columns:repeat(2,minmax(0,1fr))}}
