/* The daily spin: a painted wheel (img/icons/spin-*.webp) with the prizes set
   in type over it, so the numbers stay crisp and the server's segment order
   stays the only truth. The wheel moves by transform alone; nothing on it is
   filtered while it turns, so the spin stays smooth on a cheap phone. */
#daily-spin .spin-card { padding: 20px 18px 22px; width: min(380px, 100%); }
#daily-spin .spin-card::after { display: none; }
.spin-close { position: absolute; top: 10px; right: 10px; z-index: 3; }
#daily-spin h2 { margin-top: 2px; }

.spin-stage { position: relative; width: min(290px, 100%); aspect-ratio: 1; margin: 18px auto 12px; }
.spin-wheel {
  position: absolute; inset: 0; border-radius: 50%;
  background: url(../img/icons/spin-wheel.webp) center / contain no-repeat;
  transform: rotate(0deg); will-change: transform;
  transition: transform 4.6s cubic-bezier(.12, .74, .08, 1);
}
.spin-seg {
  position: absolute; left: 0; top: 0; width: 100%; height: 50%;
  transform-origin: 50% 100%; transform: rotate(var(--a));
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 1px;
  padding-top: 15%; pointer-events: none;
}
.spin-seg img.ico { width: 24px; height: 24px; }
.spin-seg b { font-size: 17px; font-weight: 800; line-height: 1; color: #fff3d6; text-shadow: 0 1px 2px rgba(0, 0, 0, .65); }
.spin-seg small { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #ffe6a8; text-shadow: 0 1px 2px rgba(0, 0, 0, .65); }
.spin-seg.is-top b { font-size: 19px; color: var(--gold-satin-hi); }
.spin-seg.is-double b { font-size: 20px; color: var(--gold-satin-hi); }
.spin-pointer {
  position: absolute; left: 50%; top: -26px; width: 54px; height: 70px; margin-left: -27px; z-index: 2;
  background: url(../img/icons/spin-pointer.webp) center / contain no-repeat;
  filter: drop-shadow(0 4px 6px rgba(14, 4, 3, .55));
}
.spin-hub {
  position: absolute; left: 50%; top: 50%; width: 70px; height: 70px; margin: -35px 0 0 -35px; z-index: 2;
  background: url(../img/icons/spin-hub.webp) center / contain no-repeat;
}
.spin-stage::after {   /* the soft lamp under the wheel */
  content: ""; position: absolute; inset: -8%; border-radius: 50%; z-index: -1; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 196, 96, .16), transparent 62%);
}

/* the week: seven pips, today lit, the capstone marked */
.spin-track { list-style: none; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 6px 0 4px; padding: 0; }
.spin-track li { display: grid; justify-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--ink-3); }
.spin-track li i { width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--hair); background: rgba(0, 0, 0, .28); }
.spin-track li.is-done i { background: linear-gradient(180deg, var(--gold-satin-hi), var(--gold-satin-lo)); border-color: rgba(255, 238, 190, .5); }
.spin-track li.is-now i { background: linear-gradient(180deg, var(--gold-satin-hi), var(--gold-satin-lo)); border-color: rgba(255, 238, 190, .6); box-shadow: 0 0 0 3px rgba(255, 196, 96, .22), var(--halo); }
.spin-track li.is-now { color: var(--ink); }
.spin-track li em { font-style: normal; font-size: 11px; color: var(--gold-satin); min-height: 12px; }
.spin-shield { display: inline-flex; align-items: center; gap: 6px; margin: 4px auto 0; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--hair-soft); font-size: 12px; color: var(--ink-2); background: rgba(0, 0, 0, .2); }
.spin-shield img.ico { width: 16px; height: 16px; }

.spin-result { min-height: 22px; margin: 8px 0 10px; font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--ink); text-align: center; }
.spin-card.is-won .spin-result { animation: royal-rise .4s var(--royal-ease) both; color: var(--gold-satin-hi); }
.spin-next { margin: 10px 0 0; }
#btn-spin-go { margin-top: 6px; }

/* the home chip: velvet when done, lit gold when a spin is waiting */
.spin-chip {
  justify-self: end; display: inline-flex; align-items: center; gap: 6px; height: 46px; padding: 0 12px 0 8px; margin: 0;
  border-radius: 13px; border: 1px solid var(--hair-soft); cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink-2);
  background: linear-gradient(180deg, var(--velvet-hi), var(--velvet-lo));
  box-shadow: inset 0 0 14px rgba(255, 200, 110, .05), 0 3px 10px rgba(20, 6, 4, .26);
  position: relative; transition: transform .16s var(--royal-ease);
}
.spin-chip:active { transform: scale(.96); }
.spin-chip img.ico { width: 32px; height: 32px; }
.spin-chip.is-ready { color: #3a2208; border-color: rgba(255, 238, 190, .45); background: linear-gradient(180deg, var(--gold-satin-hi), var(--gold-satin) 60%, var(--gold-satin-lo)); box-shadow: inset 0 0 0 1px rgba(255, 238, 190, .26), var(--soft-lift), var(--halo); }
.spin-chip .spin-chip-dot { position: absolute; top: -4px; right: -4px; width: 12px; height: 12px; border-radius: 50%; background: #e8623f; box-shadow: 0 0 0 2px var(--velvet-lo); display: none; }
.spin-chip.is-ready .spin-chip-dot { display: block; animation: spin-dot 2.2s ease-in-out infinite; }
@keyframes spin-dot { 0%, 100% { opacity: .7; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .spin-wheel { transition-duration: .8s; } .spin-chip .spin-chip-dot { animation: none; } }
