.catalog-360-toggle { margin: .5rem 0; }
.catalog-360 { color:#f3f6fc; background:#152033; border-radius:12px; padding:.65rem; width:100%; min-width:0; }
.catalog-360-status, .catalog-360-hint { margin:.25rem 0; color:#dbe5f5; font-size:.85rem; }
.catalog-360-stage { display:flex; flex-wrap:wrap; align-items:center; gap:.45rem; }
.catalog-360 canvas { display:block; flex:1 1 220px; width:100%; max-width:100%; height:clamp(210px,37vh,390px); min-width:0; background:#1c273c; border-radius:8px; touch-action:none; cursor:grab; }
.catalog-360 canvas:active { cursor:grabbing; }
.catalog-360 figure { flex:1 1 145px; min-width:0; margin:0; text-align:center; font-size:.75rem; }
.catalog-360 figure img { display:block; width:100%; max-height:240px; object-fit:contain; }
.catalog-360-controls { display:flex; flex-wrap:wrap; gap:.3rem; margin:.55rem 0 .2rem; }
.catalog-360-controls button { background:#25334b; color:#f3f6fc; border:1px solid #697997; border-radius:6px; min-height:34px; padding:.25rem .48rem; }
.catalog-360-controls button[aria-pressed="true"] { background:#ffe4a5; color:#21180f; }
.catalog-360 :focus-visible { outline:2px solid #ffe4a5; outline-offset:2px; }
.catalog-360[hidden], .catalog-360 [hidden] { display:none; }
#detail-dialog .catalog-360-photo-hidden { display:none; }
#detail-dialog .detail-image-wrap:has(.catalog-360-toggle) { flex-direction:column; }
#detail-dialog .detail-image-wrap:has(.catalog-360:not([hidden])) {
  justify-content:flex-start;
  padding:1rem;
  overflow:auto;
  max-height:85vh;
}
#detail-dialog .detail-image-wrap .catalog-360-toggle { flex:none; }
@media (max-width:760px) {
  #detail-dialog .detail-image-wrap:has(.catalog-360:not([hidden])) {
    max-height:none;
    overflow:visible;
    padding:2.4rem .65rem .65rem;
  }
}
