/* Колесо. Mobile-first: 360 → 768 → 1024 → 1280. */

.wheel.band--honey {
  background: var(--honey);
}

.wheel__panel {
  display: grid;
  gap: 18px;
  padding: 16px 14px 18px;
  background: var(--white);
  border: var(--line) solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: visible;
}

.wheel__copy {
  order: 1;
}

.wheel__copy .h2 {
  text-wrap: balance;
}

.wheel__result {
  order: 3;
}

.wheel__spinbox {
  order: 2;
}

.wheel__text {
  margin: 12px 0 0;
  max-width: 36ch;
  font-size: 16px;
  line-height: 1.45;
  text-wrap: pretty;
}

.wheel__go {
  margin-top: 16px;
}

.wheel__spinbox {
  display: flow-root;
  position: relative;
  width: 100%;
  max-width: 460px;
  margin: 2px auto 0;
  overflow: visible;
}

.wheel__rim {
  container-type: inline-size;
  position: relative;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--berry);
  border: 6px solid var(--ink);
  margin-top: 17%;
  overflow: visible;
}

.wheel__bulb {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3.2cqw;
  height: 3.2cqw;
  margin: -1.6cqw 0 0 -1.6cqw;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  transform: rotate(calc(var(--b) * 22.5deg)) translateY(-45.6cqw);
}

.wheel__rim.is-spinning .wheel__bulb {
  animation: bulb 0.36s steps(1) infinite;
}

.wheel__rim.is-spinning .wheel__bulb:nth-child(even) {
  animation-delay: 0.18s;
}

.wheel__rim.is-won .wheel__bulb {
  background: var(--honey);
}

@keyframes bulb {
  0% {
    background: var(--honey);
  }
  50% {
    background: var(--paper);
  }
}

.wheel__disc {
  container-type: inline-size;
  position: absolute;
  inset: 9%;
  border-radius: 50%;
  border: var(--line) solid var(--ink);
  background:
    repeating-conic-gradient(
      from -22.5deg,
      transparent 0deg 43.55deg,
      var(--ink) 43.55deg 45deg
    ),
    conic-gradient(
      from -22.5deg,
      var(--honey) 0deg 45deg,
      var(--apple) 45deg 90deg,
      var(--rose) 90deg 135deg,
      var(--amber) 135deg 180deg,
      var(--berry) 180deg 225deg,
      var(--cream) 225deg 270deg,
      var(--leaf) 270deg 315deg,
      var(--paper) 315deg 360deg
    );
  will-change: transform;
}

.wheel__mark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22cqw;
  height: 22cqw;
  margin: -11cqw 0 0 -11cqw;
  transform: rotate(calc(var(--i) * 45deg)) translateY(-31cqw);
}

.wheel__mark .ill {
  display: block;
  width: 100%;
  height: 100%;
  transform: rotate(calc(var(--i) * -45deg));
}

.wheel__hub {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 28%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border: var(--line) solid var(--ink);
  border-radius: 50%;
  background: var(--honey);
  color: var(--ink);
  font: 800 clamp(12px, 4cqw, 18px) / 1 var(--f-text);
  text-align: center;
  transform: translate(-50%, -50%);
}

.wheel__hub:hover {
  background: var(--amber);
}

.wheel__hub:disabled {
  cursor: default;
  background: var(--honey);
}

.wheel__pointer {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 0;
  width: 16%;
  height: auto;
  overflow: visible;
  transform: translateX(-50%);
  transform-origin: 50% 43%;
  pointer-events: none;
}

.wheel__pointer.is-tick {
  animation: tick 0.14s ease-out;
}

@keyframes tick {
  40% {
    transform: translateX(-50%) rotate(-22deg);
  }
  100% {
    transform: translateX(-50%) rotate(0);
  }
}

.wheel__result {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  background: var(--cream);
  border: var(--line) solid var(--ink);
  border-radius: var(--radius);
  box-shadow: none;
}

.wheel__result.is-in {
  animation: wheel-in 0.45s cubic-bezier(0.2, 0.9, 0.25, 1.2);
}

@keyframes wheel-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.wheel__photo {
  width: 88px;
  height: 88px;
  background: var(--cream);
  border-radius: 14px;
  overflow: hidden;
  isolation: isolate;
}

.wheel__photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.wheel__result-body {
  display: grid;
  gap: 8px;
  min-width: 0;
  align-content: center;
}

.wheel__result .h3 {
  font-size: 22px;
  line-height: 1.05;
  padding-top: 0.08em; /* Bebas: капс и «Й/Ё» не срезаются overflow */
}

.wheel__result .mp {
  flex-wrap: nowrap;
  gap: 6px;
}

.wheel__result .mp__btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  padding: 0 4px;
  font-size: 14px;
}

.wheel__confetti {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 8%;
  width: 10px;
  height: 14px;
  border-radius: 2px;
  pointer-events: none;
  animation: confetti 1s cubic-bezier(0.2, 0.7, 0.4, 1) forwards;
}

@keyframes confetti {
  from {
    transform: translate(-50%, 0) rotate(0);
    opacity: 1;
  }
  to {
    transform: translate(calc(-50% + var(--dx)), var(--dy)) rotate(var(--r));
    opacity: 0;
  }
}

/* ≤359 фото над текстом: колонка имени ~140px, длинный приз не влезает рядом */
@media (max-width: 359px) {
  .wheel__result {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 768px) {
  .wheel__panel {
    grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
    grid-template-rows: 1fr auto auto 1fr;
    align-items: center;
    column-gap: 28px;
    row-gap: 16px;
    gap: 16px 28px;
    padding: 24px;
  }
  .wheel__text {
    font-size: 17px;
  }
  .wheel__copy {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
  }
  .wheel__spinbox {
    grid-column: 1;
    grid-row: 1 / -1;
    align-self: center;
    width: 100%;
    max-width: none;
    margin: 0;
  }
  .wheel__result {
    grid-column: 2;
    grid-row: 3;
    align-self: center;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
    max-width: none;
  }
  .wheel__photo {
    width: 88px;
    height: 88px;
  }
  .wheel__result .mp {
    gap: 6px;
  }
  .wheel__result .mp__btn {
    min-height: 44px;
    font-size: 14px;
  }
}

@media (min-width: 1024px) {
  .wheel__panel {
    grid-template-columns: minmax(320px, 460px) minmax(0, 1fr);
    column-gap: 48px;
    row-gap: 20px;
    gap: 20px 48px;
    padding: 36px 40px;
  }
  .wheel__result {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 14px;
    padding: 12px;
    max-width: 520px;
  }
  .wheel__photo {
    width: 112px;
    height: 112px;
  }
  .wheel__result .mp {
    gap: 8px;
  }
  .wheel__result .mp__btn {
    min-height: 48px;
    font-size: 15px;
  }
  .wheel__result .h3 {
    font-size: 26px;
  }
}

@media (min-width: 1280px) {
  .wheel__panel {
    grid-template-columns: minmax(340px, 480px) minmax(0, 1fr);
    column-gap: 64px;
    padding: 44px 52px;
  }
}


/* Карточка результата целиком ведёт на товар, кнопки WB/Ozon/ЯМ — поверх */
.wheel__result { position: relative; cursor: pointer; }
.wheel__link { color: inherit; text-decoration: none; }
.wheel__link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.wheel__result .mp { position: relative; z-index: 2; }
.wheel__result:hover { transform: translate(-2px, -2px); }
.wheel__result:has(.wheel__link:focus-visible) { outline: 3px solid var(--berry); outline-offset: 3px; }
.wheel__link:focus-visible { outline: none; }
