.rkn-rad {
  container: rkn-rad / inline-size;
  min-width: 0;
  border-radius: 25px;
  color-scheme: dark;
  color: #fbf7ff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  background:
    radial-gradient(ellipse 64% 45% at 42% 9%, #321651 0, transparent 100%),
    radial-gradient(ellipse 50% 60% at 100% 88%, #1e1034 0, transparent 100%),
    #10091b;
  --muted: #c1b0d4;
  --lime: #defd78;
  --line: #3b2857;
}

.rkn-rad, .rkn-rad *, .rkn-rad *::before, .rkn-rad *::after { box-sizing: border-box; }
.rkn-rad button { font-family: inherit; text-transform: none; -webkit-tap-highlight-color: transparent; }
.rkn-rad button:focus-visible { outline: 3px solid var(--lime); outline-offset: 4px; }

.rkn-rad .rkn-rad-wave { display: flex; align-items: center; color: var(--lime); }
.rkn-rad .rkn-rad-wave i {
  border-radius: 9px;
  background: currentColor;
  box-shadow: 0 0 9px #d8fd7070;
}

.rkn-rad .rkn-rad-page { max-width: 1232px; padding: 30px 26px 29px; margin-inline: auto; }
.rkn-rad .rkn-rad-intro { margin: 0 0 30px; text-align: center; }
.rkn-rad .rkn-rad-intro h2 {
  margin: 0;
  color: inherit;
  font-family: inherit;
  font-size: clamp(2.45rem, 6.5cqi, 4.35rem);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -.065em;
}

.rkn-rad .rkn-rad-intro h2 span {
  color: #d6a2ff;
  text-shadow: 0 0 32px #ac5af168;
}

.rkn-rad .rkn-rad-intro p { margin: 12px 0 0; color: var(--muted); font-size: clamp(.97rem, 2.5cqi, 1.12rem); line-height: 1.5; }

.rkn-rad .rkn-rad-game {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 22px;
}

.rkn-rad .rkn-rad-stage, .rkn-rad .rkn-rad-options {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 16px 38px #0804104a;
}

.rkn-rad .rkn-rad-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 17px;
  padding: 31px 22px 22px;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 50% 41%, #492570 0%, #211337 59%, #190e2b 100%);
}

.rkn-rad .rkn-rad-stage::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background:
    linear-gradient(#b685ff23 1px, transparent 1px),
    linear-gradient(90deg, #b685ff23 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: radial-gradient(ellipse at center, transparent 20%, #000 59%, transparent 100%);
}

.rkn-rad .rkn-rad-wheel-wrap {
  position: relative;
  width: min(100%, 462px);
  aspect-ratio: 1;
  isolation: isolate;
}

.rkn-rad .rkn-rad-wheel-wrap::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -2%;
  border: 1px solid #e0b7ff31;
  border-radius: 50%;
  box-shadow: 0 0 40px #a053ff3b;
}

.rkn-rad [data-rkn-wheel] { display: block; width: 100%; height: 100%; border-radius: 50%; }

.rkn-rad .rkn-rad-pointer {
  position: absolute;
  z-index: 2;
  top: -3.3%;
  left: 50%;
  width: 10.1%;
  height: 10.6%;
  transform: translateX(-50%);
  filter: drop-shadow(0 0 11px #d9ff7a9c) drop-shadow(0 4px 2px #170826b5);
}

.rkn-rad .rkn-rad-pointer::before, .rkn-rad .rkn-rad-pointer::after {
  content: "";
  position: absolute;
  clip-path: polygon(2% 10%, 12% 0, 88% 0, 98% 10%, 94% 25%, 56% 94%, 50% 100%, 44% 94%, 6% 25%);
}

.rkn-rad .rkn-rad-pointer::before {
  inset: 0;
  background: linear-gradient(#f1ffb5, #b8ee37);
}

.rkn-rad .rkn-rad-pointer::after {
  inset: 9% 20% 26%;
  background: linear-gradient(#91b322, #c5ed52);
}

.rkn-rad .rkn-rad-hub {
  position: absolute;
  inset: 39%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid #e4c0ff;
  background:
    radial-gradient(circle at 50% 42%, #3e235d 0 53%, transparent 55%),
    linear-gradient(150deg, #b074f5, #5e3588 65%, #ba83f6);
  box-shadow: 0 0 22px #150626ae, inset 0 0 6px 1px #2309408f;
}

.rkn-rad .rkn-rad-hub .rkn-rad-wave { gap: clamp(3px, .55vw, 5px); }
.rkn-rad .rkn-rad-hub .rkn-rad-wave i { width: clamp(3px, .45vw, 5px); height: clamp(8px, 1.05vw, 13px); }
.rkn-rad .rkn-rad-hub .rkn-rad-wave i:nth-child(2), .rkn-rad .rkn-rad-hub .rkn-rad-wave i:nth-child(4) { height: clamp(13px, 1.6vw, 21px); }
.rkn-rad .rkn-rad-hub .rkn-rad-wave i:nth-child(3) { height: clamp(19px, 2.45vw, 29px); }

.rkn-rad .rkn-rad-spin-button {
  width: min(100%, 280px);
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid #ead0ff;
  border-radius: 14px;
  color: #180829;
  background: linear-gradient(105deg, #c28bff, #e1aaff);
  box-shadow: 0 0 26px #a45cff65, inset 0 1px 0 #f0daffb0;
  font-size: 1.05rem;
  font-weight: 850;
  cursor: pointer;
  transition: background .2s, box-shadow .2s, transform .2s;
}

.rkn-rad .rkn-rad-spin-button:hover:not(:disabled) {
  background: linear-gradient(105deg, #d1a4ff, #ecc9ff);
  box-shadow: 0 0 32px #ac70ff9c;
  transform: translateY(-1px);
}
.rkn-rad .rkn-rad-spin-button:active:not(:disabled) { transform: translateY(1px); }
.rkn-rad .rkn-rad-spin-button:disabled { cursor: default; background: #b483de; }
.rkn-rad .rkn-rad-spin-icon { font-size: 1.55rem; line-height: 1; }
.rkn-rad .rkn-rad-script-message { margin: 0; color: var(--muted); }

.rkn-rad .rkn-rad-options { background: linear-gradient(148deg, #241637, #180f28); padding: 21px; }
.rkn-rad .rkn-rad-options-heading { padding: 0 0 14px; }
.rkn-rad .rkn-rad-options h3 { margin: 0; color: inherit; font: 820 1.5rem/1.3 system-ui, sans-serif; letter-spacing: -.035em; }
.rkn-rad .rkn-rad-options-heading p { margin: 5px 0 0; color: var(--muted); font-size: .88rem; }
.rkn-rad .rkn-rad-choices { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.rkn-rad .rkn-rad-choice {
  display: grid;
  grid-template-columns: 37px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 53px;
  padding: 6px 9px;
  border: 1px solid #3b2a50;
  border-radius: 10px;
  background: #1a102a;
}

.rkn-rad .rkn-rad-choice.rkn-rad-is-selected {
  border-color: var(--choice-color);
  background: color-mix(in srgb, var(--choice-color) 14%, #1a102a);
}

.rkn-rad .rkn-rad-choice-icon, .rkn-rad .rkn-rad-result-icon {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  border-radius: 9px;
  border: 1px solid color-mix(in srgb, var(--choice-color) 37%, transparent);
  background: color-mix(in srgb, var(--choice-color) 15%, #1d112e);
  color: var(--choice-color);
  font-size: 1.18rem;
  font-weight: 750;
  line-height: 1;
}

.rkn-rad .rkn-rad-choice strong { display: block; font-size: .87rem; line-height: 1.21; }
.rkn-rad .rkn-rad-choice p { margin: 3px 0 0; color: #c6b8d5; font-size: .76rem; line-height: 1.32; }

.rkn-rad .rkn-rad-result {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(calc(100% - 28px), 460px);
  max-height: calc(100% - 28px);
  overflow: auto;
  padding: 33px 24px 27px;
  border-radius: 25px;
  border: 1px solid #a065d8;
  background: radial-gradient(ellipse at top, #422365, #211332 65%);
  color: #fff9ff;
  box-shadow: 0 0 65px #a355fb62;
  text-align: center;
}

.rkn-rad .rkn-rad-result[open] { animation: rkn-rad-reveal .24s ease-out; }
.rkn-rad .rkn-rad-result::backdrop { background: #0a0414c7; backdrop-filter: blur(5px); }
@keyframes rkn-rad-reveal {
  from { opacity: 0; transform: translateY(8px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.rkn-rad .rkn-rad-close-button {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 44px;
  height: 44px;
  border: 1px solid #b586dd55;
  border-radius: 50%;
  background: #29163d;
  color: white;
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
}
.rkn-rad .rkn-rad-close-button:hover { background: #512d71; }

.rkn-rad .rkn-rad-result-icon {
  width: 66px;
  height: 66px;
  margin: 0 auto 16px;
  border-radius: 18px;
  font-size: 2rem;
}
.rkn-rad .rkn-rad-result-category { margin: 0 0 6px; color: var(--choice-color); font-weight: 700; font-size: .86rem; }
.rkn-rad .rkn-rad-result h3 {
  margin: 0;
  color: inherit;
  font: 800 clamp(1.65rem, 6vw, 2.25rem)/1.13 system-ui, sans-serif;
  letter-spacing: -.045em;
}
.rkn-rad [data-rkn-result-description] { margin: 12px auto 23px; max-width: 340px; color: #e0d2ed; line-height: 1.55; overflow-wrap: anywhere; }

.rkn-rad .rkn-rad-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@container rkn-rad (max-width: 850px) {
  .rkn-rad .rkn-rad-game { grid-template-columns: minmax(0, 1fr); gap: 17px; }
  .rkn-rad .rkn-rad-page { max-width: 640px; }
  .rkn-rad .rkn-rad-stage { padding-block: 28px 18px; }
  .rkn-rad .rkn-rad-choice { min-height: 54px; }
}

@container rkn-rad (max-width: 520px) {
  .rkn-rad .rkn-rad-page { padding: 24px 12px 30px; }
  .rkn-rad .rkn-rad-intro { margin-bottom: 20px; }
  .rkn-rad .rkn-rad-intro h2 { font-size: clamp(1.85rem, 8.45cqi, 2.75rem); }
  .rkn-rad .rkn-rad-intro p { margin-top: 7px; }
  .rkn-rad .rkn-rad-stage, .rkn-rad .rkn-rad-options { border-radius: 19px; }
  .rkn-rad .rkn-rad-stage { padding: 20px 13px 14px; gap: 13px; }
  .rkn-rad .rkn-rad-spin-button { min-height: 51px; }
  .rkn-rad .rkn-rad-options { padding: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .rkn-rad .rkn-rad-result[open] { animation: none; }
  .rkn-rad .rkn-rad-spin-button { transition: none; }
}
