/* ACHIEVEMENT INSPECT — waves #972 + #974. The FO4 legendary
 * overlay: dark backdrop, the trophy's name in large type, its
 * condition in one short line, the piece center-stage on a
 * turntable pedestal (--ai9-accent, set per achievement). All
 * classes are ai9-prefixed; the overlay sits above the room's
 * sheets but below the #873 context veil (99990). #974: the stage
 * carries a radial studio vignette behind the (transparent)
 * canvas, and the medallion styles remain only for the no-WebGL
 * fallback — the coin itself is real 3D now. */

.ai9-overlay {
  position: fixed; inset: 0; z-index: 99980;
  display: none; align-items: center; justify-content: center;
  background: rgba(3, 4, 6, 0.88);
  font-family: Georgia, 'Times New Roman', serif;
  color: #e8e2d2;
}
.ai9-overlay.open { display: flex; }

.ai9-panel {
  width: min(680px, 94vw);
  max-height: 94vh; overflow-y: auto;
  text-align: center;
  padding: 26px 28px 30px;
  background: radial-gradient(ellipse at 50% 30%, rgba(24, 22, 16, 0.96), rgba(6, 5, 4, 0.98) 75%);
  border: 1px solid var(--ai9-accent, #c9a227);
  border-radius: 10px;
  box-shadow: 0 0 44px rgba(0, 0, 0, 0.85), 0 0 18px var(--ai9-accent, #c9a227);
}

.ai9-eyebrow {
  margin: 0 0 6px;
  font-size: 0.95rem; letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--ai9-accent, #c9a227);
}
.ai9-name {
  margin: 0 0 8px;
  font-size: clamp(2rem, 6vw, 3.3rem);
  line-height: 1.08; font-weight: 700;
  color: #f4eedd;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.9);
}
.ai9-cond {
  margin: 0 auto 14px; max-width: 46ch;
  font-size: 1.12rem; line-height: 1.45;
  color: #bdb49c;
}

.ai9-stage {
  position: relative;
  width: min(480px, 82vw); height: min(480px, 82vw);
  margin: 0 auto;
  touch-action: none; cursor: grab;
  /* the studio: a warm lit centre falling off to dark edges, with
   * a floor pool at the pedestal's feet — depth behind the canvas */
  background:
    radial-gradient(58% 34% at 50% 88%, rgba(122, 79, 32, 0.28), rgba(0, 0, 0, 0) 70%),
    radial-gradient(120% 95% at 50% 38%, #2e2317 0%, #1a130b 46%, #0a0705 78%, #050403 100%);
  border-radius: 8px;
}
.ai9-stage:active { cursor: grabbing; }
.ai9-canvas, .ai9-canvas canvas { width: 100%; height: 100%; display: block; }

/* the medallion fallback: the trophy's own colour as a gem in a
 * brass ring, the painted trophy tile at its heart */
.ai9-medallion {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.ai9-medallion[hidden] { display: none; }
.ai9-medal-ring {
  width: min(320px, 58vw); height: min(320px, 58vw);
  border-radius: 50%;
  padding: 14px; box-sizing: border-box;
  background: conic-gradient(from 210deg, #6e5620, #c9a227, #57431a, #d8b25c, #6e5620);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.8), inset 0 2px 8px rgba(255, 240, 200, 0.35);
}
.ai9-medal-gem {
  width: 100%; height: 100%;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 6px 22px rgba(0, 0, 0, 0.55), inset 0 -4px 12px rgba(255, 255, 255, 0.12);
}
.ai9-medal-icon {
  width: 46%; height: 46%; object-fit: contain;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.7));
}

.ai9-hint {
  margin: 12px 0 0;
  font-size: 1rem; color: #8f866e; letter-spacing: 0.06em;
}

.ai9-take {
  margin-top: 18px;
  font-family: inherit; font-size: 1.2rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: #14100a; background: var(--ai9-accent, #c9a227);
  border: none; border-radius: 6px;
  padding: 13px 52px; cursor: pointer; font-weight: 700;
}
.ai9-take:hover, .ai9-take:focus-visible {
  filter: brightness(1.14);
  outline: 2px solid #f4eedd; outline-offset: 2px;
}
