#spellCircuit, #wheelCircuit, .wheel-cards {
  position: absolute;
  inset: 0;
}
#spellCircuit, #wheelCircuit { pointer-events: none; }
#spellCircuit { inset: -7%; }
.circuit-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.circuit-layer {
  transform-box: view-box;
  transform-origin: center;
  transform: scale(calc(.68 + var(--charge) * .32));
  opacity: calc(.08 + var(--charge) * .92);
}
.circuit-trace, .circuit-guide { fill: none; }
.circuit-trace {
  stroke: #f7d59a;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: calc((1 - var(--charge)) * 100);
  filter: drop-shadow(0 0 5px #f2bc77);
}
.circuit-guide { stroke: #d3a7edab; stroke-width: .7; stroke-dasharray: 1.5 3.5; }
.circuit-node { fill: #ffe8ad; opacity: calc(var(--charge) * var(--charge)); }
.is-shuffling .float { animation: none; }
.is-shuffling #holdbox { cursor: default; }
.is-shuffling #holdbox > .ring, .is-shuffling #incant,
.is-shuffling #incant + .hint, .is-shuffling #quick { display: none; }
.charge-label {
  margin: 13px 0 0;
  color: var(--gold2);
}
.charge-label b {
  display: inline-block;
  min-width: 3em;
  font: 700 15px Cinzel, Georgia, serif;
  font-variant-numeric: tabular-nums;
}
.card-wheel {
  position: relative;
  isolation: isolate;
  width: min(100%, 535px, 60vh);
  aspect-ratio: 1;
  margin: 0 auto;
}
#wheelCircuit {
  opacity: .6;
  border-radius: 50%;
  background: radial-gradient(circle, #c790ec27, #3e215751 50%, transparent 73%);
  animation: wheel-bloom .48s ease-out backwards;
}
.wheel-card.sc {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  margin: 0;
  display: block;
  transform: translate(-50%, -50%) rotate(var(--angle));
  transform-origin: center;
  box-shadow: 0 2px 5px #090512a6;
  background: #27133c;
  touch-action: manipulation;
  animation: wheel-deal .42s var(--delay) cubic-bezier(.2,.74,.3,1) backwards;
  transition: box-shadow .18s, transform .18s;
}
.wheel-card.sc svg { display: block; width: 100%; height: 100%; pointer-events: none; }
.wheel-card.sc:hover, .wheel-card.sc:focus-visible, .wheel-card.sc[aria-pressed="true"] {
  z-index: 2;
  outline: 1px solid #ffe5b8;
  outline-offset: 1px;
  transform: translate(-50%, -50%) rotate(var(--angle)) scale(1.14);
  box-shadow: 0 0 12px 2px #ffd39887;
}
.wheel-card.sc.gone { visibility: hidden; }
.wheel-center {
  pointer-events: none;
  position: absolute;
  display: grid;
  gap: 2px;
  justify-items: center;
  align-content: center;
  inset: 39% 37%;
  white-space: nowrap;
  line-height: 1.3;
  color: var(--gold2);
}
.wheel-center span { color: #fbe0a6; font-size: clamp(17px, 4vw, 28px); text-shadow: 0 0 13px #ebb985; }
.wheel-center b { font-size: clamp(11px, 3.3vw, 15px); }
.wheel-hint { margin: 0 0 8px; }
.wheel-actions { gap: 5px 8px; }
.wheel-actions .btn { min-height: 42px; padding: 4px 14px; font-size: 14px; }
.wheel-actions .btn:disabled { opacity: .54; cursor: default; }
.stage[data-view="pickWrap"] .table { padding: 7px 10px 13px; }
.stage[data-view="pickWrap"] .slots {
  display: flex;
  justify-content: center;
  gap: 4px;
  max-height: none;
  overflow: visible;
  margin: 0 auto 9px;
  padding: 0;
}
.stage[data-view="pickWrap"] :is(.rs,.ys,.mg) { display: flex; justify-content: center; gap: 4px; margin: 0; }
.stage[data-view="pickWrap"] .slots .slot { width: clamp(13px, 3.6vw, 28px); }
.stage[data-view="pickWrap"] .slots .sl { display: none; }
@keyframes wheel-deal {
  from { opacity: 0; transform: translate(calc(-50% + var(--from-x)), calc(-50% + var(--from-y))) rotate(var(--angle)) scale(.44); }
}
@keyframes wheel-bloom { from { transform: scale(.66); opacity: .14; } }
@media (max-width: 680px) {
  .stage[data-view="pickWrap"] { padding: 11px 8px 13px; }
  .stage[data-view="pickWrap"] .game-head h2 { font-size: 22px; }
  .stage[data-view="pickWrap"] .backhome { margin-bottom: 5px; padding-block: 4px; }
  .stage[data-view="pickWrap"] .period { font-size: 13px; margin-bottom: 7px; }
  .stage[data-view="pickWrap"] .table { min-height: 0; }
  .card-wheel { width: min(100%, 57vh); }
  .wheel-hint { font-size: 13px; }
}
