.studio-redesign #sourcePanel .asset-cards{align-items:start;grid-template-columns:repeat(3,minmax(0,1fr))}
.studio-reference-column{min-width:0}.studio-reference-tray{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin-top:8px;max-height:240px;overflow:auto;padding:2px}
.studio-reference-thumb,.studio-reference-add{min-width:0;padding:0;border:1px solid #dce8f1;border-radius:5px;background:#fff;color:#28425b;overflow:hidden;cursor:pointer;text-align:left;font:inherit}
.studio-reference-thumb[aria-pressed=true]{border-color:#1599ac;box-shadow:0 0 0 1px #1599ac}.studio-reference-thumb img,.studio-reference-thumb video{display:block;width:100%;height:46px;object-fit:cover;background:#eff6fa}.studio-reference-thumb>span,.studio-reference-thumb>small{display:block;padding:3px;font-size:9px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.studio-reference-thumb>small{color:#187f91;font-size:8px}.studio-reference-add{min-height:65px;text-align:center;border-style:dashed;color:#168697;font-size:11px}.reference-preset-icon{height:46px;text-align:center;background:#eff6fa;font-size:24px!important}.studio-reference-help{font-size:10px;line-height:1.45;color:#637b90;margin:8px 0}
.studio-reference-dialog{box-sizing:border-box;width:min(460px,calc(100vw - 28px));max-height:calc(100dvh - 32px);overflow:auto;border:1px solid #dce8f1;border-radius:12px;padding:18px;color:#203951;background:white;box-shadow:0 18px 70px #17334e30}.studio-reference-dialog::backdrop{background:#15304766}.reference-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.reference-dialog-head h2{font-size:18px;font-weight:500;margin:0 0 10px}.reference-dialog-head button{border:0;background:transparent;font-size:24px;cursor:pointer}.studio-reference-preview{display:flex;justify-content:center;background:#f5f9fb;border-radius:6px;margin-bottom:10px}.studio-reference-preview img,.studio-reference-preview video{max-width:100%;width:auto;height:120px;object-fit:contain}.studio-reference-dialog label{display:block;font-size:12px;margin:8px 0}.studio-reference-dialog input:not([type=checkbox]),.studio-reference-dialog textarea{box-sizing:border-box;display:block;width:100%;margin-top:4px;border:1px solid #cfdee9;border-radius:5px;padding:7px;font:inherit}.studio-reference-dialog .reference-select{display:flex;align-items:center;gap:7px}.reference-dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}.reference-dialog-actions button{border:1px solid #d7e4ed;border-radius:5px;padding:8px 10px;font-size:12px;background:white;color:#28425b;cursor:pointer}.reference-dialog-actions .primary{background:#138e9f;color:white;border-color:#138e9f}#deleteStudioReference{margin-right:auto}#studioReferenceError{font-size:12px;color:#a23035}.studio-reference-thumb:focus-visible,.studio-reference-add:focus-visible{outline:2px solid #168d9c;outline-offset:2px}
@media(max-width:600px){.studio-reference-tray{gap:3px}.studio-reference-thumb img,.studio-reference-thumb video{height:38px}.studio-reference-thumb>span{font-size:8px}.studio-reference-add{font-size:10px}}
/* Media is shown once in the collection; the original card is an add control. */
.studio-reference-column .asset-card>img,.studio-reference-column .asset-edit,.studio-reference-column .asset-remove{display:none!important}
.studio-reference-column .asset-choice{display:flex!important}
.studio-redesign #sourcePanel .has-references .asset-card{height:76px}
.studio-redesign #sourcePanel .has-references .asset-choice{padding:9px;gap:5px;flex-direction:row;flex-wrap:wrap;justify-content:center}
.studio-redesign #sourcePanel .has-references .asset-choice>span{font-size:22px}
.studio-redesign #sourcePanel .has-references .asset-choice small{width:100%;text-align:center}
.studio-reference-thumb img,.studio-reference-thumb video{height:80px;object-fit:contain}
.studio-reference-dialog .reference-select[hidden]{display:none!important}

/* The first photo occupies the main area; further photos appear as thumbnails. */
.studio-reference-column.has-main-photo .asset-choice{display:none!important}
.studio-redesign #sourcePanel .has-main-photo .asset-card{height:190px}
.studio-main-photo{position:absolute;inset:0;width:100%;height:100%;padding:0;border:0;background:#f2f7fb;cursor:pointer;overflow:hidden}
.studio-main-photo img{display:block;width:100%;height:100%;object-fit:contain}
.studio-main-photo:focus-visible{outline:2px solid #168d9c;outline-offset:-3px}
