/* Size panel design (replaces the ruler) + the separate Rotating Sparklers section.
   Both use a small night-sky band so the live sparks glow in light and dark mode. */

/* shared: a quiet starfield made of tiny gradient dots */
.sa-stars {
  position: absolute; inset: 0; pointer-events: none; opacity: .8;
  background-image:
    radial-gradient(1px 1px at 8% 22%, #fff 99%, transparent), radial-gradient(1px 1px at 18% 70%, #fff 99%, transparent),
    radial-gradient(1.5px 1.5px at 27% 38%, #f3e9ff 99%, transparent), radial-gradient(1px 1px at 36% 84%, #fff 99%, transparent),
    radial-gradient(1px 1px at 44% 14%, #fff 99%, transparent), radial-gradient(1.5px 1.5px at 53% 58%, #fff 99%, transparent),
    radial-gradient(1px 1px at 62% 28%, #e8e2ff 99%, transparent), radial-gradient(1px 1px at 71% 78%, #fff 99%, transparent),
    radial-gradient(1.5px 1.5px at 81% 18%, #fff 99%, transparent), radial-gradient(1px 1px at 90% 62%, #fff 99%, transparent),
    radial-gradient(1px 1px at 95% 34%, #fff 99%, transparent), radial-gradient(1px 1px at 4% 90%, #fff 99%, transparent);
  animation: saTwinkle 5s ease-in-out infinite alternate;
}
@keyframes saTwinkle { to { opacity: .45; } }

/* ---------- size panel ---------- */
.sizer-art {
  position: relative; overflow: hidden; border-radius: calc(var(--r) - 4px);
  min-height: 170px; padding: 24px 26px; margin-bottom: 4px;
  display: flex; align-items: flex-end;
  background:
    radial-gradient(120% 90% at 78% 30%, rgb(124 104 196 / .45), transparent 60%),
    linear-gradient(160deg, #1c1830, #120f20 70%);
  color: #f4f0fb;
}
.sizer-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.sa-moon {
  position: absolute; right: 9%; top: 18px; width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fbf6ea, #d9d0bd 70%);
  box-shadow: 0 0 30px 6px rgb(251 246 234 / .18); opacity: .85;
}
.sizer .sizer-art .scale-readout { position: relative; z-index: 1; margin: 0; flex-direction: column; align-items: flex-start; gap: 6px; max-width: 62%; }
.sizer .sizer-art .scale-readout span { color: #fff; font-size: clamp(34px, 4vw, 46px); }
.sizer .sizer-art .scale-readout small { color: #cfc8e2; font-size: 13.5px; line-height: 1.45; }

/* ---------- rotating section ---------- */
.rotating { padding: clamp(80px, 11vw, 140px) 0; }
.rot-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.rot-stage {
  position: relative; aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  background:
    radial-gradient(closest-side, rgb(124 104 196 / .35), transparent 75%),
    linear-gradient(160deg, #1c1830, #0f0c1b);
  box-shadow: 0 40px 80px -40px rgb(40 30 80 / .6), inset 0 0 0 1px rgb(255 255 255 / .06);
}
.rot-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.rot-ring { position: absolute; inset: 26%; border-radius: 50%; border: 1px dashed rgb(255 255 255 / .16); animation: rotSpin 26s linear infinite; }
.rot-ring.r2 { inset: 14%; border-style: solid; border-color: rgb(255 255 255 / .07); animation-duration: 40s; animation-direction: reverse; }
.rot-ring.r3 { inset: 4%; border-color: rgb(185 200 242 / .12); animation-duration: 60s; }
@keyframes rotSpin { to { transform: rotate(360deg); } }
.rot-info .body { margin-bottom: 24px; }
.rot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 820px) {
  .sizer-art { min-height: 150px; padding: 18px; }
  .sizer .sizer-art .scale-readout { max-width: 64%; }
  .sizer .sizer-art .scale-readout span { font-size: 32px; }
  .sa-moon { width: 26px; height: 26px; top: 14px; }
  .rotating { padding: 72px 0; }
  .rot-wrap { grid-template-columns: 1fr; }
  .rot-stage { width: min(78vw, 340px); justify-self: center; }
}
@media (prefers-reduced-motion: reduce) { .rot-ring, .sa-stars { animation: none; } }
