:root {
  --bg: #12070d;
  --rose: #ff4d8d;
  --rose-2: #ff7aa8;
  --gold: #f3c98a;
  --cream: #fff3ea;
  --wine: #3a1424;
  --line: rgba(255, 214, 226, 0.16);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg) no-repeat; }
body {
  font-family: Manrope, sans-serif;
  color: var(--cream);
  min-height: 100dvh;
}
button, input { font: inherit; color: inherit; }
#app { min-height: 100dvh; }
.screen {
  min-height: 100dvh;
  padding: calc(18px + env(safe-area-inset-top)) 18px calc(22px + env(safe-area-inset-bottom));
  background:
    radial-gradient(900px 420px at 50% -10%, rgba(255, 77, 141, 0.38), transparent 60%) no-repeat,
    radial-gradient(500px 280px at 100% 100%, rgba(243, 201, 138, 0.14), transparent 50%) no-repeat,
    var(--bg);
}
.hero {
  width: 112px;
  height: 112px;
  border-radius: 36px;
  object-fit: cover;
  box-shadow: 0 18px 50px rgba(255, 77, 141, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.kicker {
  margin: 18px 0 0;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
}
h1 {
  font-family: Unbounded, sans-serif;
  font-size: 34px;
  line-height: 1.05;
  margin: 8px 0 0;
}
.lead { color: rgba(255, 243, 234, 0.72); margin: 10px 0 0; line-height: 1.45; }
.timer {
  display: flex;
  gap: 8px;
  margin: 22px 0;
}
.timer b {
  min-width: 64px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px 0 8px;
  text-align: center;
  display: block;
}
.timer b span { display: block; color: rgba(255,243,234,.55); font-size: 11px; font-weight: 700; }
.timer strong { font-family: Unbounded, sans-serif; font-size: 22px; }
.field, .btn, .pack {
  width: 100%;
  border-radius: 18px;
  border: 0;
}
.name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 2px 8px;
}
.name-row span { font-size: 13px; font-weight: 700; color: rgba(255,243,234,.72); }
.anon {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.06);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 800;
}
.anon.on {
  background: rgba(255, 77, 141, 0.24);
  border-color: var(--rose);
}
.field {
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
  padding: 16px 18px;
  outline: none;
}
.btn {
  margin-top: 12px;
  background: linear-gradient(180deg, #ff6b9d, #e43278);
  color: white;
  font-weight: 800;
  padding: 16px 18px;
  box-shadow: 0 12px 30px rgba(255, 77, 141, 0.35);
}
.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
  box-shadow: none;
}
.packs { display: grid; gap: 10px; margin-top: 16px; }
.pack {
  text-align: left;
  padding: 14px 16px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pack b { color: var(--gold); }
.meta { color: rgba(255,243,234,.62); font-size: 14px; }
.list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.chip {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
  animation: rise .45s ease both;
}
.chip.me { border-color: var(--gold); }
.wheel-wrap { position: relative; width: min(92vw, 380px); margin: 12px auto 0; aspect-ratio: 1; }
.pointer {
  position: absolute;
  left: 50%;
  top: -6px;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 22px solid var(--gold);
  z-index: 2;
  filter: drop-shadow(0 6px 8px rgba(0,0,0,.4));
}
canvas { width: 100%; height: 100%; }
.winner {
  margin-top: 18px;
  text-align: center;
}
.winner strong {
  font-family: Unbounded, sans-serif;
  font-size: 28px;
  display: block;
}
.toast {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  background: #2a101a;
  border: 1px solid rgba(255, 214, 226, 0.2);
  border-radius: 16px;
  padding: 14px 16px;
  text-align: center;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
