.needle {
  filter:
    drop-shadow(0 0 2px rgba(255, 255, 255, .95))
    drop-shadow(0 4px 6px rgba(0, 0, 0, .55));
}

.needle span {
  background: linear-gradient(
    90deg,
    #000 0%,
    #1c1c1c 35%,
    #4a4a4a 48%,
    #111 54%,
    #000 100%
  );
}

.wheel-center {
  width: 124px;
  height: 124px;
  padding: 0;
  border: 8px solid #fff0f6;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.wheel-center span {
  display: block;
  color: #fff;
  font: 800 20px/1 system-ui, sans-serif;
  letter-spacing: .2px;
}

.wheel-center:hover {
  transform: translate(-50%, -50%) scale(1.06);
  box-shadow: 0 9px 28px rgba(77, 8, 43, .72);
  filter: brightness(1.08);
}

.wheel-center:active {
  transform: translate(-50%, -50%) scale(.98);
}

.wheel-center:focus-visible {
  outline: 4px solid #111;
  outline-offset: 4px;
}

.wheel-center:disabled {
  cursor: wait;
  filter: saturate(.65);
}

.result-card {
  margin-top: 14px;
}

.result-card.show {
  height: 150px;
  max-height: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.result-card .result-level {
  display: block;
  margin: 2px 0 5px;
  color: #a1285d;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .3px;
}

.result-card .result-level[hidden] {
  display: none;
}

.draw-popup {
  position: fixed;
  inset: 0;
  z-index: 26;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(25, 16, 22, .72);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease;
}

.draw-popup.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.draw-popup-card {
  width: min(900px, 100%);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--theme-soft, #efc9da);
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .32);
}

.draw-popup-head {
  padding: 24px 26px 13px;
  text-align: center;
}

.draw-popup-head h2 {
  margin: 4px 0 8px;
  color: var(--theme-dark, #681038);
  font: italic 29px/1.15 Georgia, serif;
}

.draw-popup-level {
  display: inline-block;
  margin-top: 4px;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--blush, #fff0f6);
  color: var(--theme-dark, #681038);
  font-size: 12px;
  font-weight: 900;
}

.draw-popup-level[hidden] {
  display: none;
}

.draw-items {
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  overflow-y: auto;
  padding: 10px 22px 16px;
}

.draw-item {
  min-height: 67px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--theme-soft, #ead0dc);
  border-radius: 14px;
  background: var(--blush, #fff8fb);
}

.draw-number {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--theme-dark, #681038);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.draw-item p {
  margin: 0;
  color: #4d3040;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.draw-level-badge {
  max-width: 136px;
  padding: 5px 8px;
  border: 1px solid;
  border-radius: 999px;
  white-space: normal;
  text-align: center;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.2;
}

.draw-close {
  align-self: center;
  min-width: 180px;
  margin: 4px 0 22px;
  padding: 13px 24px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--theme-dominant, #b82c68), var(--theme-dark, #681038));
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 9px 22px rgba(0, 0, 0, .15);
}

.draw-close:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.celebration {
  position: absolute;
  inset: -9%;
  z-index: 8;
  pointer-events: none;
}

.celebration span {
  --delay: 0s;
  --size: 20px;
  --drift: 0px;
  position: absolute;
  opacity: 0;
  color: #ffd044;
  font-size: var(--size);
  line-height: 1;
  transform: translate(-50%, -50%) scale(.15);
  text-shadow:
    0 0 5px #fff,
    0 0 12px rgba(255, 185, 219, .95);
}

.celebration span.heart {
  color: #ed4d91;
}

.celebration span.star:nth-child(4n + 1) {
  color: #fff2a8;
}

.celebration.active span {
  animation: celebration-twinkle .85s ease-in-out var(--delay) 3 both;
}

@keyframes celebration-twinkle {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(.1) rotate(-12deg);
  }
  42% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.35) rotate(8deg);
    filter: brightness(1.25);
  }
  100% {
    opacity: .08;
    transform: translate(calc(-50% + var(--drift)), calc(-50% - 8px)) scale(.45) rotate(18deg);
  }
}

@media (max-width: 650px) {
  .draw-popup {
    padding: 12px;
  }

  .draw-popup-card {
    max-height: 92vh;
    border-radius: 20px;
  }

  .draw-popup-head {
    padding: 19px 16px 9px;
  }

  .draw-popup-head h2 {
    font-size: 23px;
  }

  .draw-items {
    grid-template-columns: 1fr;
    padding: 9px 12px 14px;
  }

  .draw-item {
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }

  .wheel-center {
    width: 96px;
    height: 96px;
    border-width: 6px;
  }

  .wheel-center span {
    font-size: 16px;
  }

  .result-card.show {
    height: 180px;
  }
}
