/* Random hunt roulette.
   Files in css/ load in name order (index.html); later files win on equal selectors. */
/* ---------- Random hunt ---------- */
.random-btn {
  height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 0 16px; border-radius: 14px; cursor: pointer;
  font-weight: 750; font-size: 13px; color: #fff; border: 0;
  background: linear-gradient(100deg, var(--accent), var(--accent2)); box-shadow: 0 10px 22px -12px var(--accent);
  transition: transform .1s, filter .2s;
}
.random-btn:hover { filter: brightness(1.08); }
.random-btn:active { transform: scale(.97); }
.random-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; }
.random-btn svg circle { fill: currentColor; stroke: none; }

.roulette {
  position: fixed; inset: 0; z-index: 95; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(7, 7, 13, .6); animation: rlFade .25s ease-out;
}
.roulette[hidden] { display: none; }
@keyframes rlFade { from { opacity: 0; } }
.rl-card {
  position: relative; flex: none; width: min(620px, 100%); min-width: 0; padding: 26px 26px 22px; border-radius: 28px; text-align: center;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(120deg, var(--accent), var(--accent2)) border-box;
  border: 1.5px solid transparent; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .7); animation: rlPop .35s cubic-bezier(.2, 1.3, .4, 1);
}
@keyframes rlPop { from { transform: scale(.92); opacity: 0; } }
.rl-card .eyebrow { justify-content: center; }
.rl-close { position: absolute; top: 14px; right: 14px; }
.rl-window {
  position: relative; height: 128px; margin: 6px -26px 0; overflow: hidden; contain: layout paint;
  background: radial-gradient(60% 100% at 50% 50%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
}
.rl-strip { display: flex; gap: 8px; padding: 16px 0; width: max-content; will-change: transform; }
.rl-tile {
  flex: none; width: 96px; height: 96px; border-radius: 20px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border);
}
.rl-tile img { width: 80px; height: 80px; object-fit: contain; filter: var(--silhouette); transition: filter .4s, transform .4s; }
.roulette.landed .rl-tile.win {
  border: 1.5px solid transparent; background: var(--caught-bg) padding-box, var(--holo-conic) border-box;
  animation: spin 3s linear infinite;
}
.roulette.landed .rl-tile.win img { filter: none; transform: scale(1.12); }
.rl-marker {
  position: absolute; left: 50%; top: 6px; bottom: 6px; width: 104px; transform: translateX(-50%); border-radius: 24px; pointer-events: none;
  border: 2px solid color-mix(in srgb, var(--accent) 70%, transparent);
  box-shadow: 0 0 24px -6px var(--accent);
}
.rl-result { min-height: 64px; margin-top: 8px; }
.rl-result h3 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.035em; }
.roulette:not(.landed) .rl-result h3 { color: var(--muted); font-weight: 650; font-size: 20px; }
.rl-result p { margin: 6px 0 0; font: 700 11px/1 var(--mono); color: var(--muted); letter-spacing: .04em; }
.rl-actions { display: flex; gap: 8px; margin-top: 12px; }
.rl-actions button { flex: 1; height: 48px; border-radius: 14px; cursor: pointer; font-weight: 750; font-size: 14px; }
.rl-again { border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text); }
.rl-go { border: 0; color: #fff; background: linear-gradient(100deg, var(--accent), var(--accent2)); opacity: .45; pointer-events: none; transition: opacity .3s; }
.roulette.landed .rl-go { opacity: 1; pointer-events: auto; }
@media (max-width: 560px) {
  .random-btn { flex: 1; justify-content: center; }
}
.chip-toggle[hidden] { display: none; }
