/* Copyright (c) 2026 Daniel Hunter Drury. All rights reserved. GoDNA License Agreement (LICENSE.md). */
/* Drag-to-turn character viewer (assets/js/turntable.js). Frames are 2:3 portraits. */
.godna-turntable {
  position: relative;
  max-width: 12.5rem; /* the size of a pair on the Character Creator page, everywhere */
  margin: 1em auto;
  aspect-ratio: 2 / 3;
  border-radius: 0.4rem;
  overflow: hidden;
  background: #111;
  cursor: grab;
  touch-action: pan-y; /* vertical swipes still scroll the page */
  user-select: none;
}
.godna-turntable.is-dragging { cursor: grabbing; }
.godna-turntable:focus-visible { outline: 0.15rem solid var(--md-accent-fg-color); outline-offset: 0.15rem; }
.godna-turntable__view { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.godna-turntable img { display: block; width: 100%; } /* without JavaScript: the whole sheet */
.godna-turntable p { margin: 0; }
.godna-turntable__hint {
  position: absolute;
  left: 50%;
  bottom: 0.6rem;
  transform: translateX(-50%);
  padding: 0.15rem 0.6rem;
  border-radius: 1rem;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.65rem;
  pointer-events: none;
}
/* Head close-ups: square, as wide as the bodies. */
.godna-turntable--head { aspect-ratio: 1; }
/* Viewers side by side, each 12.5rem wide however many there are; one row, shrinking on a phone. */
.godna-turntables {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1.5em auto;
}
.md-typeset .godna-turntables figure { display: block; flex: 0 1 12.5rem; min-width: 0; max-width: none; margin: 0; }
.godna-turntables .godna-turntable { margin: 0 0 0.4rem; max-width: none; width: 100%; }
.md-typeset .godna-turntables figcaption { max-width: none; margin: 0; text-align: center; font-size: 0.7rem; }
.godna-turntable__hint { white-space: nowrap; }
.godna-turntables + .godna-turntables { margin-top: -0.4em; } /* the head row sits right under the bodies */

/* Looping videos (wiki renders): fit the column like images do. */
.md-typeset video:not(.godna-turntable__view) { display: block; width: 100%; height: auto; border-radius: 0.2rem; }
