/* ============================================================
   Arcade: round buttons, fairy lights, neon
   ============================================================ */
/* The +pages keys are round arcade buttons: a bezel ring and a domed cap */
.keys.round .key {
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #2a2a2a, #050505 70%);
  box-shadow: 0 0 0 3px #0d0d0d, 0 0 0 5px color-mix(in srgb, var(--kd) 70%, #fff), 0 6px 10px rgba(0, 0, 0, 0.45);
}
.keys.round .key .cap {
  inset: 5px 5px 11px;
  border-radius: 50%;
}
.keys.round .key .cap::after {
  left: 22%;
  width: 40%;
  height: 22%;
  top: 9%;
}
.keys.round .key::before { inset: 14px 0 -10px; border-radius: 50%; }
.keys.round .key b { font-size: 21px; }

/* A ▶ on START */
.play-tri {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 6px;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid currentColor;
  vertical-align: -1px;
}

/* Fairy lights strung across the top of the macropad. Each bulb only fades (cheap), at its
   own pace; on big moments they chase. */
.fairy {
  position: absolute;
  left: 18px;
  right: 18px;
  top: -16px;
  height: 26px;
  pointer-events: none;
  z-index: 2;
}
.fairy svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.fairy path {
  fill: none;
  stroke: #3a3a3a;
  stroke-width: 1.5;
}
.fairy i {
  position: absolute;
  top: var(--y);
  left: var(--x);
  width: 9px;
  height: 12px;
  margin: -2px 0 0 -4.5px;
  border-radius: 50% 50% 45% 45%;
  background: var(--c);
  box-shadow: 0 0 8px 2px var(--c);
  opacity: 0.35;
  /* opacity only: a tiny GPU fade, no repaint */
  animation: twinkle var(--d) ease-in-out var(--delay) infinite alternate;
  will-change: opacity;
}
.fairy i::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 2.5px;
  width: 4px;
  height: 4px;
  border-radius: 1px;
  background: #555;
}
@keyframes twinkle {
  0% { opacity: 0.25; }
  70% { opacity: 1; }
  100% { opacity: 0.9; }
}
.fairy.chase i {
  animation: chase 0.5s steps(1) calc(var(--n) * 50ms) 6;
}
@keyframes chase {
  0% { opacity: 1; }
  50% { opacity: 0.15; }
}

/* Neon: the shelf you're on hums like a sign, and now and then it flickers */
.tape-item[aria-selected="true"] b {
  position: relative;
  text-shadow: 0 0 2px #fff, 0 0 10px color-mix(in srgb, var(--neon, #e7ff3d) 80%, transparent), 0 0 24px color-mix(in srgb, var(--neon, #e7ff3d) 60%, transparent);
  will-change: opacity;
  animation: neon-flicker 7s steps(1) infinite;
}
@keyframes neon-flicker {
  0%, 91%, 93%, 96%, 100% { opacity: 1; }
  92% { opacity: 0.45; }
  94% { opacity: 0.75; }
  95% { opacity: 0.35; }
}
.install-actions.two { flex-direction: row; }
.install-actions.two > * { flex: 1; font-size: 15px; }
.explain {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.explain-row {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: start;
  gap: 8px;
  font: 400 13px/1.45 var(--mono);
}
.explain-row span:first-child {
  font-size: 24px;
  line-height: 1;
}
.levers {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

/* The hint chip can be tapped away */
.hint.on { pointer-events: auto; cursor: pointer; }
.hint-x {
  margin-left: 2px;
  font: 10px/1 var(--mono);
  opacity: 0.55;
}

/* Cover light: a glint now and then, and a hotspot that follows the tilt */
.shine {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}
.glint {
  position: absolute;
  top: -50%;
  left: -60%;
  width: 45%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08) 30%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0.08) 70%, transparent);
  transform: rotate(var(--shine-angle, 110deg)) translateX(-120%);
  opacity: 0;
}
.stamp.top .glint {
  animation: glint var(--shine-every, 7s) cubic-bezier(.4, 0, .2, 1) var(--shine-delay, 0s) infinite;
}
@keyframes glint {
  0%, 78% { transform: translateX(0) rotate(18deg); opacity: 0; }
  80% { opacity: 1; }
  100% { transform: translateX(420%) rotate(18deg); opacity: 0.2; }
}
.hotspot {
  position: absolute;
  left: 10%;
  top: 0;
  width: 80%;
  height: 70%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.32), transparent);
  /* moved by the tilt of the phone (set straight on transform by main.js) */
  transform: translate(-13%, -16%);
  opacity: 0.8;
}
.stamp:not(.top) .shine { display: none; }
