/* The crown ring (ui/stone.js, svg.stone[data-shape="crown"]): the elite shape. Its gold is fixed in the SVG (never the
   app colour); this file only moves it. At rest a soft gold light breathes behind it and a shine runs slowly round the
   outline; a part that becomes full sends out a few gold sparks. Each loop starts at a negative delay taken from the
   clock, so a redraw of Today carries it on where it was instead of starting again.
   Reduced motion (the system setting, or data-motion="still" written by stone.js): nothing moves, the gold stays. */
.stone__crown-glow { opacity: 0.5; animation: stone-crown-breathe 5s ease-in-out infinite alternate; }
@keyframes stone-crown-breathe { from { opacity: 0.35; } to { opacity: 0.9; } }

.stone__crown-shine path { animation: stone-crown-shine 9s linear infinite; }
@keyframes stone-crown-shine { from { stroke-dashoffset: 0; } to { stroke-dashoffset: calc(var(--len) * -1px); } }

.stone__crown-sparks { filter: drop-shadow(0 0 2px rgb(255 214 106 / 0.9)); }
.stone__crown-spark { opacity: 0; transform-box: fill-box; transform-origin: center; animation: stone-crown-spark 1s cubic-bezier(0.18, 0.75, 0.3, 1) both; }
@keyframes stone-crown-spark {
  0% { opacity: 0; transform: translate(0, 0) scale(0.4) rotate(0deg); }
  14% { opacity: 1; transform: translate(calc(var(--dx) * 0.18px), calc(var(--dy) * 0.18px)) scale(1.25) rotate(20deg); }
  100% { opacity: 0; transform: translate(calc(var(--dx) * 1px), calc(var(--dy) * 1px)) scale(0.35) rotate(90deg); }
}

.stone[data-motion="still"] .stone__crown-glow,
.stone[data-motion="still"] .stone__crown-shine path { animation: none; }
.stone[data-motion="still"] .stone__crown-shine,
.stone[data-motion="still"] .stone__crown-sparks { display: none; }
@media (prefers-reduced-motion: reduce) {
  .stone__crown-glow, .stone__crown-shine path { animation: none; }
  .stone__crown-shine, .stone__crown-sparks { display: none; }
}
