.reference-picker{border:1px solid var(--border-strong);border-radius:12px;margin:12px 0;background:var(--input-bg)}
.reference-picker>summary{display:flex;gap:12px;align-items:center;padding:14px 16px;cursor:pointer;list-style:none;min-width:0}
.reference-picker>summary:before{content:'+';color:var(--muted)}.reference-picker[open]>summary:before{content:'−'}
.reference-picker>summary strong{font-size:13px;white-space:nowrap}.reference-picker>summary>span{margin-left:auto;color:var(--muted);font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:65%}
.reference-body{padding:0 14px 14px}.reference-toolbar{display:flex;gap:8px;align-items:center}.reference-search{flex:1;min-width:0}
.reference-search input{width:100%;min-width:0;border:1px solid var(--border-strong);background:var(--surface);color:var(--text);border-radius:8px;padding:10px;font:inherit;font-size:12px}
.reference-toolbar .secondary,.reference-pager .secondary{font-size:11px;padding:9px 10px;min-height:36px}
.reference-count{font-size:11px;color:var(--muted);line-height:1.7;margin:12px 0}
.reference-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.reference-card{position:relative;display:flex;flex-direction:column;align-items:stretch;gap:5px;padding:7px;border:1px solid var(--border-strong);border-radius:9px;background:var(--surface);color:var(--text);text-align:left;min-width:0;cursor:pointer}
.reference-card[aria-pressed=true]{border-color:var(--accent-text);box-shadow:0 0 0 1px var(--accent-text)}.reference-card:hover{background:var(--surface-raised)}
.reference-card img{width:100%;height:85px;object-fit:contain;background:#101014;border-radius:5px}.reference-card strong{font-size:12px;overflow-wrap:anywhere}.reference-card small{color:var(--muted);font-size:10px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:1.5}
.reference-letter{display:grid;place-items:center;height:54px;font-size:24px;background:linear-gradient(130deg,#32213c,#1c202b);border-radius:5px;color:#e6d1ec}
.reference-check{position:absolute;top:10px;right:10px;background:#141018;color:#ffe2f3;border-radius:20px;font-size:12px;line-height:20px;width:20px;text-align:center}.reference-check:empty{display:none}
.reference-selected{display:flex;gap:14px;margin-top:14px;padding:10px;background:var(--surface);border-radius:9px;min-width:0}.reference-selected img{width:45%;max-height:180px;object-fit:contain;background:#101014;border-radius:5px}.reference-selected>div{flex:1;min-width:0}.reference-selected small{color:var(--muted);font-size:10px}.reference-selected strong{display:block;font-size:13px;margin:5px 0;overflow-wrap:anywhere}.reference-selected p{font-size:11px;color:var(--muted);line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere;max-height:110px;overflow:auto}
.reference-pager{display:flex;justify-content:space-between;align-items:center;margin-top:12px;gap:8px;font-size:11px;color:var(--muted)}.reference-pager[hidden]{display:none}
button.asset-visual{width:100%;border:0;padding:0;cursor:zoom-in;position:relative}.asset-preview-hint{position:absolute;bottom:9px;right:9px;background:#15131edb;color:white;border-radius:6px;padding:5px 8px;font-size:10px}
.media-viewer-stage{height:min(56vh,500px);overflow:auto;background:#101014;border:1px solid var(--border-strong);border-radius:10px;display:flex;align-items:center;justify-content:center}.media-viewer-stage img{display:block;max-height:100%;max-width:100%;object-fit:contain}.media-viewer-stage[data-zoom=true]{display:block}.media-viewer-stage[data-zoom=true] img{width:200%;max-width:none;max-height:none}
.media-viewer-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:10px 0}.media-viewer-toolbar span{flex:1;font-size:11px;color:var(--muted)}.media-viewer-toolbar button{font-size:11px;min-height:36px}.media-viewer-notes{white-space:pre-wrap;font-size:12px;line-height:1.8;overflow-wrap:anywhere}.media-viewer-strip{display:flex;gap:8px;overflow-x:auto;padding:4px 2px 10px}.media-viewer-strip button{flex:0 0 75px;min-width:0;padding:4px;border:1px solid var(--border-strong);border-radius:6px;background:var(--surface);color:var(--text);font-size:10px}.media-viewer-strip button[aria-pressed=true]{border-color:var(--accent-text)}.media-viewer-strip img{width:65px;height:48px;object-fit:contain}.media-viewer-strip span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.media-image-status{font-size:11px;color:var(--muted)}
@media(max-width:600px){.reference-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.reference-body{padding:0 10px 10px}.reference-picker>summary{padding:13px 10px}.reference-toolbar{flex-wrap:wrap}.reference-search{flex-basis:100%}.reference-toolbar .secondary{margin-left:auto}.reference-selected{gap:9px}.media-viewer-stage{height:38vh}}
.proposal-help pre{max-width:100%;overflow:auto;padding:1rem;background:var(--surface-2,#181b22);border-radius:10px;font-size:.8rem}.proposal-help li{margin-block:.6rem;overflow-wrap:anywhere}.proposal-help code{display:block;font-size:.75rem;user-select:all}.plan-dialogue{white-space:pre-wrap;overflow-wrap:anywhere}
.production-plan-heading .button-row{max-width:100%;flex-wrap:wrap;justify-content:flex-end}
@media(max-width:700px){.production-plan-heading{flex-wrap:wrap}.production-plan-heading .button-row{width:100%;flex-shrink:1;justify-content:flex-start}}

.copy-batch-selection{border:1px solid var(--line);border-radius:12px;padding:14px;margin:16px 0}
.copy-batch-selection>div{display:flex;align-items:center;flex-wrap:wrap;gap:10px}
.copy-batch-selection>div>strong{flex:1;min-width:180px}
.copy-batch-selection ul{list-style:none;padding:0;margin:10px 0;max-height:180px;overflow:auto}
.copy-batch-selection li{display:flex;align-items:center;gap:8px;border-top:1px solid var(--line)}
.copy-batch-selection li button:first-child{flex:1;text-align:left;overflow-wrap:anywhere;min-width:0}
.copy-batch-selection button{min-height:44px}
.copy-batch-selection [role=status]{font-size:12px;color:var(--muted);margin:8px 0 0}

/* Reference boards retain image order without altering shot frame selection. */
.asset-reference-selected{border:1px solid var(--line,#e5e5e5);border-radius:16px;padding:12px}
.asset-reference-row{display:grid;grid-template-columns:64px minmax(0,1fr) auto auto;align-items:center;gap:10px;padding:8px 0}
.asset-reference-row img{width:64px;height:64px;object-fit:cover;border-radius:8px}
.asset-reference-row strong,.asset-reference-row small{display:block;overflow-wrap:anywhere}
.asset-reference-row small{margin-top:5px;color:var(--muted,#666)}
.asset-reference-row button{min-height:44px}
.asset-reference-editor button{min-height:44px}
@media(max-width:560px){.asset-reference-row{grid-template-columns:56px minmax(0,1fr);gap:8px}.asset-reference-row img{width:56px;height:56px}.asset-reference-row button{grid-row:2;min-width:44px}.asset-reference-row button:first-of-type{grid-column:1 / 2}.asset-reference-row button:last-of-type{grid-column:2 / 3;justify-self:start}}

.visual-pair-rows{display:grid;gap:12px}.visual-pair-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px;padding:14px;border:1px solid var(--border);border-radius:12px}.visual-pair-row p{font-size:12px;max-height:60px;overflow:auto;overflow-wrap:anywhere}.visual-pair-row select{width:100%;min-height:44px;min-width:0}.visual-pair-row img{display:block;width:100%;height:90px;object-fit:contain;margin-top:8px}.visual-pair-pager{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:14px 0}.visual-pair-pager button{min-height:44px}@media(max-width:600px){.visual-pair-row{grid-template-columns:1fr}.visual-pair-pager{flex-wrap:wrap}.visual-pair-row strong{overflow-wrap:anywhere}}
