.mellow-wheel-shell {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--wheel-size, min(68cqw, 68cqh, 560px));
  aspect-ratio: 1;
  padding: clamp(6px, 1.2cqmin, 12px);
  perspective: 1100px;
}

.mellow-wheel {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  border: clamp(4px, 0.75cqmin, 7px) solid var(--wheel-rim, #d7bb70);
  border-radius: 50%;
  background: #0b0f1d;
  box-shadow:
    0 clamp(6px, 1.4cqmin, 12px) 0
      color-mix(in srgb, var(--wheel-rim, #d7bb70) 42%, #101321),
    0 clamp(18px, 3cqmin, 34px) clamp(28px, 5cqmin, 62px) rgb(0 0 0 / 42%),
    inset 0 0 0 clamp(2px, 0.45cqmin, 4px) rgb(5 7 14 / 88%);
  transform: none;
  transform-style: preserve-3d;
}

.mellow-wheel::after {
  content: "";
  position: absolute;
  z-index: 4;
  inset: 3.5%;
  border-radius: 50%;
  background: linear-gradient(
    148deg,
    rgb(255 255 255 / 18%),
    transparent 24%,
    transparent 64%,
    rgb(0 0 0 / 20%)
  );
  pointer-events: none;
}

.mellow-wheel-disc {
  position: absolute;
  top: 2.5%;
  left: 2.5%;
  display: block;
  width: 95%;
  height: 95%;
  overflow: hidden;
  border-radius: 50%;
  transform: rotate(var(--wheel-rotation, 0deg));
  transform-origin: 50% 50%;
  backface-visibility: hidden;
  isolation: isolate;
  will-change: transform;
  contain: strict;
  image-rendering: auto;
}

.mellow-wheel-disc::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 18%),
    inset 0 -18px 34px rgb(7 8 18 / 34%);
  pointer-events: none;
}

.mellow-wheel-a11y {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.mellow-wheel-shell.is-spinning .mellow-wheel-disc {
  animation: none;
  filter: none;
}

/* Browser sources can fall back to software compositing. Keep the moving
   layer isolated and remove large live shadows only while it is spinning. */
.mellow-wheel-shell.is-spinning {
  contain: layout paint style;
}

.mellow-wheel-shell.is-spinning .mellow-wheel {
  box-shadow:
    0 clamp(5px, 1cqmin, 9px) 0
      color-mix(in srgb, var(--wheel-rim, #d7bb70) 38%, #101321),
    0 18px 28px rgb(0 0 0 / 32%),
    inset 0 0 0 clamp(2px, 0.45cqmin, 4px) rgb(5 7 14 / 88%);
}

.mellow-wheel-shell.is-spinning .mellow-wheel::after {
  opacity: 0.72;
}

.mellow-wheel-shell.has-js-wheel-motion .mellow-wheel-disc {
  animation: none !important;
}

.mellow-wheel-pointer {
  position: absolute;
  z-index: 8;
  top: 0;
  left: 50%;
  width: clamp(22px, 5.2cqmin, 42px);
  height: clamp(26px, 6.2cqmin, 50px);
  border: 1px solid color-mix(in srgb, var(--wheel-rim, #d7bb70) 74%, #fff);
  border-radius: 50% 50% 58% 58%;
  background: linear-gradient(145deg, #f0d78d, var(--wheel-rim, #d7bb70) 55%, #8d6f32);
  box-shadow: 0 8px 18px rgb(0 0 0 / 45%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform: translate(-50%, -18%);
}

.mellow-wheel-hub {
  position: absolute;
  z-index: 6;
  display: grid;
  place-items: center;
  width: clamp(46px, 14%, 78px);
  aspect-ratio: 1;
  border: clamp(2px, 0.45cqmin, 4px) solid var(--wheel-rim, #d7bb70);
  border-radius: 50%;
  background: linear-gradient(145deg, #171b2c, #080a12);
  box-shadow: 0 8px 22px rgb(0 0 0 / 48%);
  color: #f6e7bd;
  font-style: normal;
  line-height: 1;
}

.mellow-wheel-hub b {
  font: 900 clamp(0.8rem, 2.6cqmin, 1.35rem) Cairo, sans-serif;
}

.mellow-wheel-hub small {
  color: #cdbd94;
  font-size: clamp(0.34rem, 1cqmin, 0.52rem);
  font-weight: 800;
}

.mellow-wheel-label {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 43%;
  height: 0;
  transform: rotate(var(--angle));
  transform-origin: 0 0;
  pointer-events: none;
}

.mellow-wheel-label b {
  position: absolute;
  left: 60%;
  width: clamp(48px, 16cqmin, 132px);
  overflow: hidden;
  color: #fff;
  font-size: clamp(0.52rem, 2.05cqmin, 0.94rem);
  font-weight: 900;
  text-align: center;
  text-overflow: ellipsis;
  text-shadow: 0 2px 6px rgb(0 0 0 / 80%);
  transform: translate(-50%, -50%) rotate(calc(-1 * var(--angle)));
  white-space: nowrap;
  direction: auto;
}

.mellow-wheel-label.is-winner b {
  color: #fff1b8;
  text-shadow: 0 0 12px rgb(231 197 111 / 72%);
}

.mellow-wheel-empty {
  display: grid;
  place-items: center;
  gap: 8px;
  width: min(100%, 310px);
  padding: clamp(18px, 4cqmin, 34px);
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 24px;
  background: rgb(17 21 37 / 88%);
  color: #f5f2ff;
  text-align: center;
}

.mellow-wheel-empty-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 82px;
  aspect-ratio: 1;
  border: 4px solid #51427f;
  border-radius: 50%;
  background: #0b0e1a;
  color: #c9baff;
}

.mellow-wheel-empty-mark b {
  font-size: 1.45rem;
}

.mellow-wheel-empty-mark i {
  position: absolute;
  inset-inline-end: -7px;
  inset-block-end: -4px;
  display: grid;
  place-items: center;
  width: 30px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #7c5cff;
  color: #fff;
  font: normal 900 0.72rem Cairo, sans-serif;
}

.mellow-wheel-empty strong {
  font-size: clamp(1rem, 2.6cqmin, 1.35rem);
}

.mellow-wheel-empty small {
  color: #a8aec0;
  font-size: clamp(0.76rem, 1.9cqmin, 0.9rem);
}

@keyframes mellow-wheel-spin {
  from {
    transform: rotate(calc(var(--wheel-rotation, 0deg) - 1440deg));
  }
  to {
    transform: rotate(var(--wheel-rotation, 0deg));
  }
}

@media (prefers-reduced-motion: reduce) {
  .mellow-wheel-shell.is-spinning .mellow-wheel-disc {
    animation-duration: 1ms;
  }
}

