/* Home orb energy field (assets/orb-energy.js). */
.orb-energy-field { position: absolute; inset: 0; pointer-events: none; }
body.gateway-active .orb-energy-field { opacity: 0; transition: opacity 0.22s ease; }

/* Kamehameha: the white core compresses and pulses while the wheel turns. */
.core-mass .orb-hot,
.core-mass .core-val { scale: calc(1 - var(--orb-squeeze, 0) * 0.12 + var(--orb-jitter, 0) * 0.05); }

/* Spirit Bomb: gathered energy (progress + streak) widens the outer aura. */
.core-system .core-ring { scale: calc(0.85 + var(--orb-level, 0.3) * 0.45); }

/* Softer tick ring at rest so the perimeter reads as corona, not gauge. */
.arena .dial::before { opacity: calc(0.4 + var(--motion-energy) * 0.55); }

/* Opening a chapter: a single comet of light runs once around the card rim,
   tinted by the subject colour, then fades. */
@property --orb-trace { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.shard::after { content: ''; position: absolute; inset: 0; z-index: 2; border-radius: inherit; padding: 2px; background: conic-gradient(from var(--orb-trace), transparent 0deg 210deg, color-mix(in srgb, currentColor 75%, transparent) 315deg, #e0ffff 352deg, transparent 360deg); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); opacity: 0; pointer-events: none; }
body[data-theme="CLASSIC"] .shard::after { background: conic-gradient(from var(--orb-trace), transparent 0deg 210deg, color-mix(in srgb, currentColor 60%, transparent) 315deg, currentColor 352deg, transparent 360deg); }
.shard-anchor.orb-charged .shard::after { animation: orbTrace 1.1s cubic-bezier(0.45, 0, 0.2, 1) both; }
@keyframes orbTrace { 0% { --orb-trace: -40deg; opacity: 0; } 12% { opacity: 1; } 78% { opacity: 1; } 100% { --orb-trace: 320deg; opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .shard-anchor.orb-charged .shard::after { animation: orbTraceCalm 0.5s ease-out both !important; background: linear-gradient(currentColor, currentColor); }
  @keyframes orbTraceCalm { 0% { opacity: 0; } 30% { opacity: 0.55; } 100% { opacity: 0; } }
}
