.wheel-screen {
  --wheel-ink: #fff3e2;
  --wheel-soft: #c1dddd;
  --wheel-gold: #ffe4a3;
  --wheel-line: #8eb6b45e;
  --sector-common: #636366;
  --sector-rare: #376caa;
  --sector-epic: #8054aa;
  --sector-legendary: #bd8a43;
  max-width: 1330px;
  margin: 0 auto;
  padding: clamp(.7rem, 2.8vw, 2rem) clamp(.65rem, 3vw, 2.45rem) 2.7rem;
  color: var(--wheel-ink);
}
.wheel-layout {
  display: grid;
  grid-template: 'stage heading' auto 'stage controls' auto 'stage spotlight' 1fr / minmax(0, 1.55fr) minmax(19rem, 1fr);
  gap: clamp(.8rem, 1.75vw, 1.45rem) clamp(1.2rem, 3vw, 2.65rem);
  align-items: start;
  padding: clamp(1.15rem, 2.75vw, 2.4rem);
  border: 1px solid #b88d61;
  border-radius: 20px;
  background:
    radial-gradient(ellipse at 25% 65%, #17574e90, transparent 64%),
    radial-gradient(ellipse at 8% 0, #4c73929c, transparent 44%),
    linear-gradient(119deg, #173641 3%, #173038 51%, #151f2a 90%);
  box-shadow: inset 0 0 0 4px #0b1824aa, inset 0 0 0 5px #c29c6547;
}
.wheel-heading { grid-area: heading; }
.wheel-heading h1 {
  margin: 0 0 .65rem;
  font: normal clamp(3rem, 6.05vw, 5.85rem)/.94 var(--shell-serif);
  letter-spacing: -.048em;
  text-shadow: 0 .16rem .6rem #0d142bc2;
}
.wheel-today { margin: 0 0 .6rem; color: var(--wheel-soft); font-size: .84rem; }
.wheel-today strong {
  display: block;
  color: var(--wheel-gold);
  font: normal clamp(1.45rem, 2.6vw, 2.4rem)/1.04 var(--shell-serif);
  text-wrap: balance;
}
.wheel-reset {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .45rem .8rem;
  margin-top: .9rem;
  color: var(--wheel-soft);
  font-size: .78rem;
}
.wheel-reset p { margin: 0; }
.wheel-clock { display: inline-block; margin-inline-start: .22rem; color: #f3d09a; font-variant-numeric: tabular-nums; }

.wheel-stage {
  grid-area: stage;
  position: relative;
  isolation: isolate;
  align-self: center;
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 4.3% 3.2% 2.4%;
  background: radial-gradient(ellipse, #589fd62b 24%, #80d5e729 55%, transparent 75%);
}
.wheel-stage::before {
  position: absolute;
  z-index: -1;
  inset: -2% -3%;
  content: '';
  background: url('../art/style/rooms/baikal.webp') 47% 47% / cover no-repeat;
  mask-image: radial-gradient(ellipse, #000 29%, #0009 52%, transparent 74%);
  opacity: .48;
}
.wheel-frost {
  position: absolute;
  z-index: -1;
  inset: -4% -4% auto;
  width: 108%;
  max-width: none;
  height: 110%;
  pointer-events: none;
}
.wheel-rim {
  position: relative;
  width: min(100%, 630px);
  aspect-ratio: 1;
  border: 1px solid #fff1b7;
  border-radius: 50%;
  isolation: isolate;
  background: conic-gradient(from 25deg, #966136, #fff6c1 16%, #c68e4d 31%, #785137 45%, #ffdf8c 64%, #8d5f3d 82%, #fff3cb 94%, #966136);
  box-shadow: 0 .55rem 0 #75522e, 0 .72rem 0 #30241e, 0 1.05rem 1.9rem #051925e8, 0 0 2.8rem #81d8f25c;
}
.wheel-rim::before {
  position: absolute;
  inset: .82%;
  content: '';
  border: 1px solid #473125;
  border-radius: inherit;
  background: radial-gradient(circle, transparent 64%, #795533 65%, #ecc281 66%, #69452e 67.5%, #342920 69%, #f5d894 71%);
}
.wheel-lights { position: absolute; inset: 0; }
.wheel-bulb {
  position: absolute;
  inset: 1.13% auto auto 50%;
  width: 1.42%;
  height: 97.74%;
  translate: -50% 0;
  rotate: var(--bulb-angle);
}
.wheel-bulb::before {
  display: block;
  aspect-ratio: 1;
  border-radius: 50%;
  content: '';
  background: radial-gradient(circle at 39% 38%, #fffef2 9%, #ffe1a8 53%, #f5b954 85%);
  box-shadow: 0 0 .61rem #ffd081, 0 0 0 1px #68472e;
}
.wheel-bulb:nth-child(4n + 2)::before { background: #ebffff; box-shadow: 0 0 .72rem #9ee8ff, 0 0 0 1px #345d5f; }
.wheel-screen[data-available] .wheel-bulb::before { animation: wheel-glow 1.6s var(--bulb-delay) ease-in-out 3; }
.wheel-screen[data-spinning] .wheel-bulb::before { animation: wheel-glow 1.2s var(--bulb-delay) ease-in-out infinite; }
@keyframes wheel-glow { 50% { opacity: .46; } }

.wheel-rotor { position: absolute; inset: 0; overflow: clip; }
.wheel-disc {
  position: absolute;
  inset: 4.65%;
  overflow: hidden;
  border: 1px solid #ffdcaa;
  border-radius: 50%;
  background:
    radial-gradient(circle, #101927 0, #182836c9 20%, #07132617 54%, #f9edd126 62%, #0b1c2f80 76%),
    var(--wheel-paint, #253f38);
  box-shadow: 0 0 0 2px #3a2f26, inset 0 0 1.1rem #0a162bb5;
}
.wheel-disc::before, .wheel-disc::after {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  content: '';
}
.wheel-disc::before { inset: 2.2%; border: 1px solid #ffdfab80; }
.wheel-disc::after { inset: 29%; border: 1px solid #fcdfab59; box-shadow: 0 0 0 .3rem #f9eacc19; }
.wheel-slot {
  position: absolute;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  container-type: inline-size;
  background: radial-gradient(circle, #fff6d450, transparent 68%);
}
.wheel-slot[data-toy-tier='rare'] { background: radial-gradient(circle, #c0f6ff80, transparent 70%); }
.wheel-slot[data-toy-tier='epic'] { background: radial-gradient(circle, #ffe2ff92, transparent 70%); }
.wheel-slot[data-selected] {
  z-index: 1;
  background: radial-gradient(circle, #ffffdbc4, #ffe0a155 69%);
  box-shadow: 0 0 0 1px #fff3c3, 0 0 .95rem #ffdb8d;
}
.wheel-slot canvas { width: 100%; filter: drop-shadow(0 .19rem .19rem #151226b0); }
.wheel-coin {
  position: relative;
  display: grid;
  place-items: center;
  width: 78%;
  aspect-ratio: 1;
  font-size: .9rem;
}
.wheel-coin > .snow-coin { width: 88%; }
.wheel-coin-amount {
  position: absolute;
  inset: auto -5% -3% auto;
  display: grid;
  place-items: center;
  min-width: 1.5em;
  padding: .18em .22em;
  border: 1px solid #a9d8e6;
  border-radius: .35em;
  background: #173743;
  color: #fff1cc;
  font: 750 1em/1 var(--shell-sans);
  font-variant-numeric: tabular-nums;
  box-shadow: 0 1px 3px #102830ab;
}
.wheel-slot .wheel-coin { width: 77%; font-size: clamp(.63rem, 21cqw, 1rem); }
.wheel-slot .wheel-room-art { height: 66%; }
.wheel-garland { display: block; width: 100%; height: auto; }
.wheel-slot .wheel-garland { width: 112%; max-width: none; }
.wheel-hub {
  position: absolute;
  inset: 40.3%;
  display: grid;
  place-items: center;
  border: 1px solid #ffdfab;
  border-radius: 50%;
  background: radial-gradient(circle, #3f7777 0, #133c3a 49%, #163638 55%, #f0bf89 57%, #8d5a4f 62%, #f6d29e 67%, #936b45 71%);
  box-shadow: 0 .35rem .7rem #190c21ad;
}
.wheel-hub::before {
  width: 62%;
  aspect-ratio: 1;
  content: '';
  background: conic-gradient(from 22.5deg, #fff3d4, #c18a68 12.5%, #fff3d4 25%, #c18a68 37.5%, #fff3d4 50%, #c18a68 62.5%, #fff3d4 75%, #c18a68 87.5%, #fff3d4);
  clip-path: polygon(50% 0, 58% 33%, 86% 14%, 67% 42%, 100% 50%, 67% 58%, 86% 86%, 58% 67%, 50% 100%, 42% 67%, 14% 86%, 33% 58%, 0 50%, 33% 42%, 14% 14%, 42% 33%);
}
.wheel-hub::after {
  position: absolute;
  width: 12%;
  aspect-ratio: 1;
  border: 1px solid #fff4be;
  border-radius: 50%;
  content: '';
  background: #ecc285;
}
.wheel-pointer {
  position: absolute;
  z-index: 1;
  top: -3.2%;
  left: 50%;
  width: 10.1%;
  height: 13.8%;
  translate: -50% 0;
  filter: drop-shadow(0 .26rem .19rem #27131abb);
}
.wheel-pointer::before {
  position: absolute;
  inset: 0;
  content: '';
  background: linear-gradient(135deg, #fff9d4 7%, #edbc7f 44%, #9c5731 46%, #754825 49%, #ffde95 53%, #d99242 87%);
  clip-path: polygon(50% 0, 84% 11%, 100% 35%, 50% 100%, 0 35%, 16% 11%);
}
.wheel-pointer::after {
  position: absolute;
  top: 16%;
  left: 50%;
  width: 27%;
  aspect-ratio: 1;
  border: 1px solid #ffe5ad;
  border-radius: 50%;
  translate: -50% 0;
  content: '';
  background: radial-gradient(circle at 37% 27%, #ff9294, #a02b3f 60%, #3b1b2a);
}

.wheel-controls { grid-area: controls; min-width: 0; }
.wheel-free {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .2rem .48rem;
  min-height: 1.5rem;
  margin: 0 0 .45rem;
  color: #f0dfc0;
  font-size: .83rem;
  font-weight: 650;
}
.wheel-free .reward-clock {
  gap: .38rem;
  padding: .25rem .42rem;
  border: 1px solid #769fa9;
  border-radius: .4rem;
  background: #102731;
  color: #dcf5fb;
  font-size: 1rem;
  line-height: 1;
}
.wheel-spin {
  --reward-count-top: -.38rem;
  --reward-count-right: -.31rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min(100%, 10.5rem);
  max-width: 100%;
  min-height: 2.75rem;
  padding: .45rem .9rem;
  border: 1px solid #ffe8ac;
  border-radius: .65rem;
  background: linear-gradient(#fff1cc, #efc487 73%, #e4ad6a);
  box-shadow: inset 0 1px #fffae4, 0 .18rem .4rem #0819248c;
  color: #3c2315;
  text-align: center;
  font: 720 .9rem/1.2 var(--shell-sans);
}
.wheel-spin:hover:not([aria-disabled='true']) { background: linear-gradient(#fff8df, #f3cb92 73%, #e8b477); }
.wheel-spin:active:not([aria-disabled='true']) {
  box-shadow: inset 0 1px 3px #8f602d70;
  translate: 0 1px;
}
.wheel-spin[aria-disabled='true'] {
  cursor: default;
  border-color: #a18b6e;
  background: #4a4442;
  box-shadow: none;
  color: #fff0e8;
}
.wheel-apply { color: #ffe0a5; font-weight: 650; }
.ticket-recovery {
  --ticket-recovery-progress: 0%;
  --ticket-recovery-rail: #5e4034;
  position: relative;
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  justify-content: center;
  gap: .32rem;
  padding: .36rem .46rem .49rem;
  border: 1px solid #ac8152;
  border-radius: .38rem;
  background: #2c201e;
  color: #ffebc5;
  font: 650 .77rem/1.1 var(--shell-sans);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.ticket-recovery::after {
  position: absolute;
  inset: auto .4rem .23rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #f8c46f var(--ticket-recovery-progress), var(--ticket-recovery-rail) var(--ticket-recovery-progress));
  content: '';
}
.ticket-recovery .wheel-ticket { width: .96rem; }
.ticket-recovery__lead { color: #edcc9d; font-weight: 500; }
.ticket-recovery__time {
  min-width: 5ch;
  color: #ffd889;
  font-size: 1rem;
  font-weight: 800;
  text-align: center;
}
.wheel-ticket {
  position: relative;
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 1.4rem;
  aspect-ratio: 1.5;
  background: linear-gradient(150deg, #fff0a9, #e6a959 60%, #a76736);
  clip-path: polygon(0 0, 100% 0, 100% 31%, 88% 40%, 88% 60%, 100% 69%, 100% 100%, 0 100%, 0 69%, 12% 60%, 12% 40%, 0 31%);
}
.wheel-ticket::before { position: absolute; inset: 15% 17%; border: 1px solid #8e542bb3; border-radius: 2px; content: ''; }
.wheel-ticket::after {
  width: 34%;
  aspect-ratio: 1;
  content: '';
  background: #754324;
  clip-path: polygon(50% 0, 63% 36%, 100% 50%, 63% 64%, 50% 100%, 37% 64%, 0 50%, 37% 36%);
}
.wheel-error { margin: .5rem 0 0; color: #ffd2e0; font-size: .85rem; }
.wheel-error:empty { margin: 0; }
.wheel-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.wheel-spotlight {
  grid-area: spotlight;
  display: grid;
  grid-template-columns: minmax(0, 9.5rem) minmax(0, 1fr);
  align-items: center;
  gap: .8rem;
  min-height: 9.5rem;
  padding: .65rem .85rem .65rem .5rem;
  border: 1px solid #bf9c689e;
  border-radius: 10px;
  background: radial-gradient(ellipse at 23% 51%, #514342, transparent 75%), #242b31;
}
.wheel-spotlight[data-toy-tier] { border-color: var(--toy-tier-edge); background: var(--toy-tier-stage); }
.wheel-spotlight[data-kind='room'] {
  grid-template-columns: minmax(0, 1fr);
  gap: .75rem;
  overflow: hidden;
  padding: .45rem .45rem .8rem;
}
.wheel-spotlight[data-kind='room'] .wheel-spotlight-copy { padding-inline: .55rem; }
.wheel-spotlight[data-kind='room'] .wheel-feature-art { aspect-ratio: 2.25; overflow: hidden; border-radius: 5px; }
.wheel-spotlight[data-kind='room'] .wheel-room-art { position: absolute; inset: 0; object-position: center 35%; }
.wheel-feature-art, .wheel-prize-art { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1; }
.wheel-feature-art::before {
  position: absolute;
  inset: 7%;
  content: '';
  border: 1px solid #ffe6b957;
  border-radius: 50%;
  background: conic-gradient(from 40deg, #f4c38d57, transparent 20%, #bbe9f636 35%, transparent 58%, #ffd89745 70%, transparent 88%, #f4c38d57);
  box-shadow: inset 0 0 0 .35rem #ffedc513, 0 0 1rem #d3b08a38;
}
.wheel-spotlight[data-kind='room'] .wheel-feature-art::before { display: none; }
.wheel-feature-art > canvas, .wheel-prize-art > canvas { z-index: 1; width: 100%; filter: drop-shadow(0 .35rem .4rem #14283aba); }
.wheel-feature-art > .wheel-coin { z-index: 1; font-size: clamp(.85rem, 1.8vw, 1.45rem); }
.wheel-room-art { display: block; width: 100%; height: 100%; border: 1px solid #ffd59b65; border-radius: 5px; object-fit: cover; }
.wheel-spotlight h2 { margin: 0 0 .25rem; color: #ffdda0; font: 650 .82rem/1.2 var(--shell-sans); }
.wheel-spotlight[data-won] h2 { color: #ffdea3; }
.wheel-spotlight strong { display: block; font: normal clamp(1.18rem, 2.2vw, 1.85rem)/1.06 var(--shell-serif); text-wrap: balance; }
.wheel-spotlight p { margin: .4rem 0 0; color: #e2d7cd; font-size: .8rem; line-height: 1.3; }
.wheel-spotlight .game-prize-meta { margin-top: .42rem; }
.wheel-prize-actions { display: flex; flex-wrap: wrap; gap: .36rem; margin-top: .55rem; }
.wheel-prize-actions .ec-prize-place { margin: 0; }
.wheel-apply {
  display: inline-flex;
  align-items: center;
  min-height: 2.3rem;
  padding: .32rem .55rem;
  border: 1px solid #d3ac7185;
  border-radius: 5px;
  background: #29383a;
  font-size: .82rem;
}
.wheel-screen .toy-motion-preview:hover { filter: brightness(1.12); }
.wheel-screen :focus-visible { outline-color: #fff0b9; }
.wheel-screen ::selection { background: #c6e4f6; color: #132735; }

.wheel-shelf { padding: clamp(1.35rem, 3vw, 2.4rem) 0 0; }
.wheel-shelf-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .55rem 1rem; }
.wheel-shelf h2 { margin: 0; font: normal clamp(1.65rem, 3vw, 2.55rem)/1.12 var(--shell-serif); }
.wheel-rarities {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .82rem;
  margin: 0;
  padding: 0;
  color: var(--wheel-soft);
  font-size: .76rem;
  list-style: none;
}
.wheel-rarities li { display: flex; align-items: center; gap: .33rem; }
.wheel-rarities li::before {
  width: .56rem;
  aspect-ratio: 1;
  border: 1px solid #fff3da88;
  border-radius: 50%;
  background: var(--wheel-rarity-color);
  content: '';
}
.wheel-screen [data-toy-tier='common'] { --wheel-rarity-color: var(--sector-common); }
.wheel-screen [data-toy-tier='rare'] { --wheel-rarity-color: var(--sector-rare); }
.wheel-screen [data-toy-tier='epic'] { --wheel-rarity-color: var(--sector-epic); }
.wheel-screen [data-toy-tier='legendary'] { --wheel-rarity-color: var(--sector-legendary); }
.wheel-shuffle { display: flex; align-items: center; gap: .44rem; }
.wheel-shuffle button {
  flex: none;
  min-height: 2rem;
  padding: .3rem .56rem;
  border: 1px solid #c5baa560;
  border-radius: 5px;
  background: #132d36;
  color: #ffebc5;
  font: 650 .8rem/1.1 var(--shell-sans);
}
.wheel-shuffle button:hover:not([aria-disabled='true']), .wheel-apply:hover { border-color: #ffe1a0; background: #2f4d4a; }
.wheel-shuffle button[aria-disabled='true'] { cursor: default; border-color: #82939455; color: #bbcccd; background: #26363d; }
.wheel-prizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 8.15rem), 1fr)); gap: .58rem; margin: .85rem 0 0; padding: 0; list-style: none; }
.wheel-prize {
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  align-items: start;
  gap: .28rem;
  padding: .53rem .38rem;
  border: 1px solid var(--wheel-rarity-color);
  border-radius: 9px;
  background: var(--toy-tier-stage, #34343a);
  text-align: center;
}
.wheel-prize-art { width: clamp(3.9rem, 6vw, 5.8rem); background: radial-gradient(circle, var(--toy-tier-light, #e2c6e447), transparent 70%); }
.wheel-prize-art .wheel-room-art { height: 77%; }
.wheel-prize :is(strong, small) { overflow-wrap: anywhere; }
.wheel-prize strong { font: 600 .94rem/1.13 var(--shell-serif); text-wrap: balance; }
.wheel-prize small { color: var(--toy-tier-label, #d4dfd9); font-size: .72rem; }

.ec-room-prop--wheel .ec-room-prop__art {
  --reward-count-top: -.32rem;
  --reward-count-right: -.47rem;
  display: grid;
  place-items: center;
  overflow: visible;
}
.wheel-room-icon {
  display: block;
  width: 130%;
  height: 128%;
  background: url('../art/trees/room-prize-wheel.webp') center / contain no-repeat;
}

@media (max-width: 720px) {
  .wheel-layout { grid-template: 'heading' auto 'stage' auto 'controls' auto 'spotlight' auto / minmax(0, 1fr); gap: .85rem; padding: .87rem; }
  .wheel-heading h1 { font-size: clamp(2.6rem, 11vw, 4.4rem); }
  .wheel-today { margin-bottom: .35rem; }
  .wheel-today strong { font-size: 1.55rem; }
  .wheel-stage { width: min(100%, 32rem); justify-self: center; }
  .wheel-spotlight { grid-template-columns: minmax(0, 6.5rem) minmax(0, 1fr); min-height: 6rem; }
  .wheel-prizes { grid-template-columns: repeat(auto-fill, minmax(min(100%, 5.6rem), 1fr)); }
  .wheel-prize strong { font-size: .85rem; }
}
@media (prefers-reduced-motion: reduce) {
  .wheel-screen[data-available] .wheel-bulb::before,
  .wheel-screen[data-spinning] .wheel-bulb::before { animation: none; }
}

@media (max-width: 760px), (pointer: coarse) {
  .wheel-shuffle button, .wheel-apply { min-height: 44px; }
}
