/* Keep the footer flush with the page; the floating tray clears it as it enters view. */
.batch-dock,.batch-panel{margin-bottom:var(--batch-footer-offset,0px)}
body:has(#batch-dock:not([hidden])) .library{padding-bottom:64px}
.library-source-row{margin-top:0}.library{padding-top:30px}
.batch-dock{position:fixed;left:50%;translate:-50% 0;bottom:calc(22px + env(safe-area-inset-bottom));z-index:22;display:flex;align-items:center;gap:8px;width:430px;max-width:calc(100vw - 48px);padding:8px;border:1px solid #e9e4e5;border-radius:24px;background:#fffffff5;backdrop-filter:blur(16px);box-shadow:0 12px 40px #35272c1a,0 2px 8px #35272c0a}
.batch-review{display:flex;align-items:center;gap:12px;flex:1;min-width:0;padding:7px 8px;background:transparent;border-radius:16px;text-align:left}
.batch-review:hover{background:var(--surface-soft)}
.batch-stack{display:block;position:relative;width:56px;height:40px;flex:0 0 56px}
.batch-mini{display:grid;place-items:center;position:absolute;top:4px;left:0;width:34px;height:34px;border:2px solid #fff;border-radius:10px;background:#f3e8eb;box-shadow:0 2px 5px #30232a15;transform:rotate(-12deg)}
.batch-mini:nth-child(2){left:10px;top:0;transform:rotate(-2deg);background:#eeeaf8}
.batch-mini:nth-child(3){left:20px;top:5px;transform:rotate(10deg);background:#fff0e2}
.batch-mini svg{width:25px;height:25px}
.batch-copy{display:flex;flex-direction:column;gap:2px;min-width:0}
.batch-copy strong{font-size:12px;font-weight:600;white-space:nowrap}
.batch-copy>span{font-size:11px;color:var(--muted);white-space:nowrap;font-variant-numeric:tabular-nums}
.batch-copy b{color:var(--ink);font-weight:600}
.batch-chevron{width:14px;height:14px;flex:0 0 14px;margin-left:auto;color:var(--muted);transition:transform .16s}
.batch-review[aria-expanded=true] .batch-chevron{transform:rotate(180deg)}
.batch-download{position:relative;display:flex;align-items:center;justify-content:center;gap:8px;flex:0 0 auto;min-height:50px;padding:12px 19px;border-radius:17px;background:linear-gradient(110deg,#ff385c,#df1550);color:#fff;font-size:12px;font-weight:600;box-shadow:0 3px 10px #df155026;overflow:visible}
.batch-download:hover:not(:disabled){background:linear-gradient(110deg,#ff4c6c,#ca1248);box-shadow:0 5px 16px #df155038;transform:translateY(-1px)}
.batch-download:active:not(:disabled){transform:translateY(0)}
.batch-download:disabled{color:var(--muted-soft);background:var(--surface);box-shadow:none}
.batch-download[aria-busy=true]{color:#fff;background:linear-gradient(110deg,#ff385c,#df1550);box-shadow:0 3px 10px #df155026;cursor:progress}
.batch-download[aria-busy=true] .batch-gift{animation:batch-gift-wiggle .9s ease-in-out infinite}
.batch-gift{width:19px;height:19px;flex:0 0 19px;transform-origin:50% 70%}
.batch-download:hover:not(:disabled) .batch-gift{animation:batch-gift-wiggle .5s ease}
.batch-dock.is-full .batch-copy>span{color:var(--primary-active)}
.batch-burst{position:absolute;inset:0;pointer-events:none;overflow:visible}
.batch-burst i{position:absolute;left:50%;top:10px;width:6px;height:9px;border-radius:2px;background:var(--particle);opacity:0;animation:batch-confetti .65s ease-out forwards}
.batch-panel{position:fixed;left:50%;translate:-50% 0;bottom:calc(106px + env(safe-area-inset-bottom));z-index:23;width:430px;max-width:calc(100vw - 48px);max-height:calc(100dvh - 210px);padding:22px;border:1px solid var(--hairline);border-radius:24px;background:var(--canvas);box-shadow:0 16px 50px #35272c24;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--hairline) transparent}
.batch-panel-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}
.batch-panel-heading h2{font-size:18px;font-weight:500;letter-spacing:-.3px;line-height:1.25;margin:0 0 4px}
.batch-panel-heading p{font-size:11px;color:var(--muted);margin:0;font-variant-numeric:tabular-nums}
.batch-close{display:grid;place-items:center;width:30px;height:30px;flex:0 0 30px;border-radius:50%;background:var(--surface-soft);font-size:21px;color:var(--muted)}
.batch-close:hover{background:var(--hover);color:var(--ink)}
.batch-picks{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px 10px;padding:0;margin:0 0 20px;list-style:none;max-height:300px;overflow:auto;overscroll-behavior:contain}
.batch-pick{position:relative;min-width:0;text-align:center}
.batch-pick-art{display:grid;place-items:center;aspect-ratio:1;background:var(--surface-soft);border-radius:14px}
.batch-pick-art svg{width:66%;height:66%}
.batch-pick-name{display:block;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:6px 0 1px}
.batch-pick-source{display:block;font-size:9px;color:var(--muted)}
.batch-remove{display:grid;place-items:center;position:absolute;right:3px;top:3px;width:24px;height:24px;border:1px solid #e9e4e5;border-radius:50%;background:var(--canvas);color:var(--muted);font-size:17px;line-height:1;box-shadow:0 1px 3px #2221}
.batch-remove:hover{color:var(--primary-active);border-color:#e6afbd;background:#fff1f4}
.batch-empty{text-align:center;padding:18px 5px 22px;color:var(--muted);font-size:12px;line-height:1.6}
.batch-empty p{max-width:240px;margin:0 auto 12px}
.batch-empty button{padding:8px 13px;border-radius:var(--radius-pill);background:var(--surface);font-size:11px}
.batch-panel-tools{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:16px 0 12px}
.batch-panel .selection-note{font-size:11px;line-height:1.6;color:var(--muted);margin:0 0 16px}
.batch-allowance{border-top:1px solid var(--hover);padding-top:14px;font-size:10px;line-height:1.6;color:var(--muted)}
.batch-allowance p{margin:0 0 6px}.batch-allowance .link-button{font-size:10px}
.batch-status{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.toast,.page-retry{bottom:calc(110px + env(safe-area-inset-bottom))}
@keyframes batch-gift-wiggle{0%,100%{transform:rotate(0)}25%{transform:rotate(-12deg)}65%{transform:rotate(10deg)}}
@keyframes batch-confetti{0%{opacity:1;transform:translate(0,0) rotate(0)}80%{opacity:1}100%{opacity:0;transform:translate(var(--x),var(--y)) rotate(var(--turn))}}
@media(max-width:700px){.sidebar{padding-bottom:24px}.batch-dock{bottom:calc(12px + env(safe-area-inset-bottom));max-width:calc(100vw - 24px);border-radius:22px}.batch-panel{bottom:calc(96px + env(safe-area-inset-bottom));max-width:calc(100vw - 24px);max-height:calc(100dvh - 180px);padding:19px}.batch-download{padding:12px 14px;font-size:11px}.batch-review{gap:8px;padding:7px 4px}.batch-stack{width:46px;flex-basis:46px}.batch-mini{width:29px;height:29px}.batch-mini:nth-child(2){left:8px}.batch-mini:nth-child(3){left:16px}.batch-mini svg{width:22px;height:22px}.batch-copy strong{font-size:11px}.batch-copy>span{font-size:10px}.batch-chevron{width:12px;height:12px;flex-basis:12px}.batch-picks{max-height:240px}.batch-dock{width:410px}}
@media(max-width:360px){.batch-dock{gap:4px;padding:7px}.batch-stack{width:30px;flex-basis:30px}.batch-mini{width:25px;height:25px}.batch-mini:nth-child(2){left:4px}.batch-mini:nth-child(3){left:8px}.batch-mini svg{width:18px;height:18px}.batch-review{gap:7px}.batch-download{gap:6px;padding:12px 11px;font-size:10px}.batch-gift{width:16px;height:16px;flex-basis:16px}.batch-chevron{display:none}}
@media(prefers-reduced-motion:reduce){.batch-download,.batch-chevron{transition:none}.batch-download:hover:not(:disabled){transform:none}.batch-download .batch-gift,.batch-burst i{animation:none}}
.batch-panel{display:flex;flex-direction:column;overflow:hidden}
.batch-panel-heading,.batch-panel-tools,.batch-panel .selection-note,.batch-allowance,.batch-empty{flex-shrink:0}
.batch-picks{min-height:0;flex:1 1 auto}
.skeleton-library>.skeleton-control{width:240px;max-width:70%;margin:0 0 18px}
@media(max-height:540px){.batch-panel{max-height:calc(100dvh - 110px);overflow:auto}.batch-picks{flex:none;max-height:160px}}
@media(prefers-reduced-motion:reduce){.batch-download[aria-busy=true] .batch-gift{animation:none}}
