/* Mechanics shared by every look. No colours, no type choices: those belong to the look. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; min-height: 100vh; overflow-x: hidden; }
img, canvas, svg, video { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mono { font-variant-numeric: tabular-nums; }
.status:empty { display: none; }

/* ---------- the holder card object ---------- */
.hc {
  --mx: 50%; --my: 50%; --rx: 0deg; --ry: 0deg; --hyp: 0; --o: 0;
  position: relative;
  width: min(100%, var(--card-w, 380px));
  aspect-ratio: 5 / 7;
  perspective: 1400px;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
  outline-offset: 10px;
}
.hc-rot {
  position: absolute; inset: 0;
  border-radius: var(--card-r, 4.4% / 3.15%);
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}
.hc.held .hc-rot { transition: transform 0.08s linear; }
.hc-rot canvas { width: 100%; height: 100%; border-radius: inherit; }
.hc-foil, .hc-glare { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
.hc-glare {
  background: radial-gradient(farthest-corner circle at var(--mx) var(--my), rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.12) 28%, rgba(0, 0, 0, 0.32) 92%);
  mix-blend-mode: overlay;
  opacity: calc(0.4 + var(--o) * 0.45);
  transition: opacity 0.4s;
}

/* Full-bleed 3D scene canvases sit behind the content and never take input. */
.scene { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
