/* Each image / shot owns this reference frame; theme tokens stay shared. */
.batch-reference-panel{padding:14px;margin-top:14px;border:1px solid var(--dz-border);border-radius:9px;background:var(--dz-elevated);color:var(--dz-text);min-width:0}
.batch-reference-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px}
.batch-reference-head>strong{display:flex;align-items:center;gap:7px;font-size:13px;flex-wrap:wrap}.batch-reference-head>strong>svg{width:15px;height:15px;color:var(--dz-accent)}
.batch-reference-head small,.batch-reference-head strong>span{font-size:11px;color:var(--dz-secondary);font-weight:400}
.batch-reference-controls{display:flex;align-items:center;gap:12px}.batch-reference-controls>button{padding:3px 0;border:0;background:transparent;font-size:12px;color:var(--dz-secondary)}
.batch-reference-controls>button svg{width:14px;height:14px}.batch-reference-controls label{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--dz-secondary);white-space:nowrap}
.batch-reference-controls input{appearance:none;width:27px;height:15px;position:relative;margin:0;border:0;border-radius:10px;background:var(--dz-border);cursor:pointer;flex:0 0 27px}
.batch-reference-controls input:after{content:"";position:absolute;top:2px;left:2px;width:11px;height:11px;border-radius:50%;background:var(--dz-surface);transition:transform .15s}
.batch-reference-controls input:checked{background:var(--dz-accent)}.batch-reference-controls input:checked:after{transform:translateX(12px)}.batch-reference-controls input:focus-visible{outline:2px solid var(--dz-accent);outline-offset:2px}
.batch-reference-tabs{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:0 0 12px}.batch-reference-tabs button{border:1px solid transparent;background:transparent;color:var(--dz-secondary);font-size:12px;min-height:32px;padding:5px 9px;gap:5px}
.batch-reference-tabs button svg{width:14px;height:14px}.batch-reference-tabs b{font-weight:400}.batch-reference-tabs [aria-pressed=true]{color:var(--dz-accent-hover);background:var(--dz-accent-soft);border-color:color-mix(in srgb,var(--dz-accent) 30%,var(--dz-border))}
.batch-reference-tiles{display:flex;align-items:flex-start;gap:10px;flex-wrap:wrap;min-width:0}.batch-reference-tile,.batch-reference-add{width:96px;height:96px;flex:0 0 96px;border:1px solid var(--dz-border);border-radius:8px;position:relative;background:var(--dz-elevated)}
.batch-reference-tile>img,.batch-reference-tile>video,.batch-reference-tile>.art{width:100%;height:100%;object-fit:cover;border-radius:7px}.batch-reference-tile .art small,.batch-reference-option-art .art small{display:none}
.batch-reference-tile>button{position:absolute;right:4px;top:4px;border:1px solid var(--dz-border);width:22px;min-height:22px;height:22px;border-radius:50%;padding:0;background:var(--dz-surface);color:var(--dz-text);font-size:15px;z-index:1}
.batch-reference-name{display:none;position:absolute;bottom:0;left:0;right:0;padding:3px 5px;border-radius:0 0 7px 7px;background:color-mix(in srgb,var(--dz-surface) 92%,transparent);color:var(--dz-text);font-size:10px;line-height:1.5;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.show-names .batch-reference-name{display:block}.batch-reference-origin{position:absolute;left:4px;top:4px;background:var(--dz-accent-soft);color:var(--dz-accent-hover);padding:1px 4px;border-radius:3px;font-size:9px;line-height:1.5;max-width:65px}
.batch-reference-add{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;border-style:dashed;color:var(--dz-secondary);font-size:12px;padding:6px}
.batch-reference-add svg{width:20px;height:20px}.batch-reference-add:hover{background:var(--dz-accent-soft);border-color:var(--dz-accent);color:var(--dz-accent-hover)}
.batch-reference-hint{font-size:11px;line-height:1.7;color:var(--dz-secondary);margin:10px 0 0}.batch-reference-media-icon,.batch-reference-audio,.batch-reference-unavailable{display:flex;width:100%;height:100%;flex-direction:column;align-items:center;justify-content:center;gap:5px;color:var(--dz-secondary);overflow:hidden;border-radius:7px}
.batch-reference-media-icon small,.batch-reference-unavailable small{font-size:11px}.batch-reference-audio audio{width:90px;height:28px;max-width:100%}.batch-reference-unavailable svg{width:19px;height:19px}.batch-reference-tile.is-unavailable{border-style:dashed}
#batch-reference-picker{width:min(760px,calc(100% - 24px));max-width:760px;max-height:90dvh;padding:22px;background:var(--dz-surface);border:1px solid var(--dz-border);border-radius:12px;color:var(--dz-text)}
.batch-picker-head{display:flex;align-items:flex-start;justify-content:space-between;gap:15px;margin-bottom:16px}.batch-picker-head h2{font-size:18px;margin:0}.batch-picker-head p{font-size:12px;line-height:1.7;color:var(--dz-secondary);margin:6px 0 0}.batch-picker-head>button{padding:3px 9px;font-size:20px;background:var(--dz-elevated)}
.batch-picker-search-label{display:flex;flex-direction:column;gap:7px;font-size:12px;color:var(--dz-secondary)}.batch-picker-search-label input{width:100%;font:inherit;font-size:14px;color:var(--dz-text);background:var(--dz-elevated);border:1px solid var(--dz-border);border-radius:7px;padding:9px 11px}
.batch-reference-options{margin-top:14px;max-height:52dvh;overflow:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:10px;padding:2px}
.batch-reference-option{position:relative;display:flex;flex-direction:column;min-width:0;gap:7px;padding:8px;border:1px solid var(--dz-border);border-radius:8px;background:var(--dz-elevated);cursor:pointer;font-size:12px;overflow-wrap:anywhere}
.batch-reference-option:has(input:checked){border-color:var(--dz-accent);background:var(--dz-accent-soft)}.batch-reference-option>input{position:absolute;top:12px;left:12px;z-index:1;width:16px;height:16px;accent-color:var(--dz-accent)}
.batch-reference-option-art{display:block;height:110px;overflow:hidden;border-radius:5px}.batch-reference-option-art>img,.batch-reference-option-art>video,.batch-reference-option-art>.art{width:100%;height:100%;object-fit:cover}
.batch-picker-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:18px;padding-top:14px;border-top:1px solid var(--dz-border)}.batch-picker-footer>span,.batch-reference-empty{font-size:12px;color:var(--dz-secondary)}.batch-reference-empty{grid-column:1/-1;padding:20px;text-align:center}
.batch-reference-panel button:focus-visible,#batch-reference-picker button:focus-visible{outline:2px solid var(--dz-accent);outline-offset:2px}
@media(max-width:600px){.batch-reference-panel{padding:10px}.batch-reference-head{gap:9px}.batch-reference-controls{width:100%;justify-content:space-between}.batch-reference-tiles{gap:8px}#batch-reference-picker{padding:16px}.batch-reference-options{grid-template-columns:repeat(2,minmax(0,1fr))}}
