.spin360 { max-width: 100%; margin: 0 auto; padding: 0; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; color: #1f2327; background: transparent; position: relative; display: flex; flex-direction: column; align-items: center; }
/* The frame is square. The stage is as wide as its container but never taller than the viewport, so the
   whole frame stays visible in a landscape viewport without scrolling; a host container with its own
   height bounds it too. Nothing is cropped: the image keeps its 1:1 aspect inside the stage. */
.spin360-stage { margin: 0; position: relative; line-height: 0; width: min(100%, calc(100vh - 16px), calc(100dvh - 16px), var(--spin360-max-size, 100vh)); aspect-ratio: 1 / 1; container-type: inline-size; }
.spin360-image { display: block; width: 100%; height: 100%; aspect-ratio: 1 / 1; object-fit: contain; max-width: 100%; background: #e2e4e7; cursor: grab; user-select: none; -webkit-user-drag: none; touch-action: pan-y pinch-zoom; border-radius: 4px; }
.spin360[data-spin360-dragging="true"] .spin360-image { cursor: grabbing; }
.spin360-image:focus-visible { outline: 3px solid #1a5fb4; outline-offset: 2px; }
.spin360-hint { position: absolute; left: 12px; bottom: 14px; margin: 0; padding: 6px 12px; font-size: 0.85rem; line-height: 1.2; color: #ffffff; background: rgba(31, 35, 39, 0.62); border-radius: 999px; pointer-events: none; transition: opacity 400ms ease; white-space: nowrap; max-width: calc(100% - 184px); overflow: hidden; text-overflow: ellipsis; box-sizing: border-box; }
.spin360-hint-icon { margin-right: 6px; }
@container (max-width: 379px) { .spin360-hint { font-size: 0.78rem; padding: 5px 10px; } .spin360-hint-icon { display: none; } }
.spin360[data-spin360-interacted="true"] .spin360-hint, .spin360[data-spin360-ready="error"] .spin360-hint { opacity: 0; }
.spin360-controls { position: absolute; right: 8px; bottom: 8px; display: flex; gap: 6px; }
.spin360-stage .spin360-controls { right: 8px; bottom: 8px; }
.spin360-controls button { width: 44px; height: 44px; padding: 0; font-size: 1.4rem; line-height: 1; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.82); color: #1f2327; cursor: pointer; opacity: 0.85; }
.spin360-controls button:hover { opacity: 1; }
.spin360-controls button:focus-visible { outline: 3px solid #1a5fb4; outline-offset: 2px; opacity: 1; }
.spin360-controls button:disabled { opacity: 0.35; cursor: default; }
.spin360-visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.spin360-noscript { font-size: 0.9rem; color: #4b5157; padding: 8px 0; }
.spin360-dialog { max-width: min(96vw, 2000px); padding: 8px; border: 1px solid #8a9096; border-radius: 8px; }
.spin360-dialog-image { display: block; max-width: 92vw; max-height: 84vh; width: auto; height: auto; }
.spin360-close { min-width: 44px; min-height: 44px; margin-top: 8px; }
@media (prefers-reduced-motion: reduce) { .spin360-hint { transition: none; } }
