.sw-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
}

.sw-back {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text);
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
}

.sw-title-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.sw-store-name {
  font-size: clamp(20px, 1.6vw, 20px);
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
  text-shadow: 0 0 12px rgba(255, 209, 102, 0.5);
}

.sw-title {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: clamp(18px, 2.6vw, 26px);
  color: var(--gold-deep);
  text-shadow: 0 0 14px rgba(255, 209, 102, 0.6);
}

.sw-stage {
  position: relative;
  z-index: 1;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 70px;
}

#wheel-canvas {
  display: block;
  /* Portrait, not square — the scene now has a stand below the wheel and
     a taller pointer above it, so the composition needs more height than
     width to avoid wasted side margins. */
  width: min(55vh, 88vw);
  aspect-ratio: 4 / 5;
  max-height: 76vh;
  touch-action: none;
}

.sw-spin-btn {
  margin-top: 6px;
  position: relative;
  z-index: 2;
  font-family: 'Baloo 2', sans-serif;
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 800;
  letter-spacing: 1px;
  color: #3a1a00;
  background: linear-gradient(180deg, #fff0c2 0%, var(--gold) 45%, var(--gold-deep) 100%);
  border: 3px solid #fff3cf;
  border-radius: 999px;
  padding: 16px 56px;
  box-shadow: 0 10px 0 #8a6408, 0 18px 30px rgba(0, 0, 0, 0.45), 0 0 40px rgba(255, 209, 102, 0.5);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.sw-spin-btn:active {
  transform: translateY(6px);
  box-shadow: 0 4px 0 #8a6408, 0 10px 18px rgba(0, 0, 0, 0.4), 0 0 24px rgba(255, 209, 102, 0.4);
}

.sw-spin-btn:disabled {
  filter: grayscale(0.6) brightness(0.7);
  cursor: not-allowed;
  transform: none;
}

.sw-hint {
  margin-top: 14px;
  color: var(--text-dim);
  font-size: 14px;
  min-height: 20px;
}

/* ---------- Overlays (bill number gate + result) ---------- */

.sw-overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 2, 20, 0.78);
  backdrop-filter: blur(6px);
  padding: 20px;
}

.sw-overlay[hidden] {
  display: none !important;
}

.sw-modal {
  width: min(420px, 100%);
  background: linear-gradient(165deg, #2a1252, #180a34);
  border: 1px solid var(--panel-border);
  border-radius: 26px;
  padding: 34px 28px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 209, 102, 0.08) inset;
}

.sw-modal-icon {
  font-size: 44px;
}

.sw-modal h2 {
  font-family: 'Baloo 2', sans-serif;
  font-size: 24px;
  color: var(--gold);
  margin: 10px 0 4px;
}

.sw-modal p {
  color: var(--text-dim);
  font-size: 14px;
  margin: 0 0 20px;
}

.sw-input {
  width: 100%;
  font-size: 20px;
  letter-spacing: 2px;
  text-align: center;
  padding: 14px 16px;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  outline: none;
}

.sw-input:focus {
  border-color: var(--gold);
}

.sw-error {
  color: #ff6b6b;
  font-size: 13px;
  min-height: 18px;
  margin-top: 8px;
}

.sw-primary-btn {
  margin-top: 18px;
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: none;
  font-weight: 700;
  font-size: 16px;
  color: #3a1a00;
  background: linear-gradient(180deg, #fff0c2, var(--gold));
  box-shadow: 0 8px 20px rgba(255, 209, 102, 0.3);
}

.sw-primary-btn:active {
  transform: translateY(2px);
}

.sw-result-prize {
  font-family: 'Baloo 2', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(120deg, var(--magenta), var(--purple));
  padding: 14px 18px;
  border-radius: 16px;
  margin: 14px 0 20px;
  box-shadow: 0 0 30px rgba(255, 46, 136, 0.4);
}

.sw-result-prize.losing {
  background: linear-gradient(120deg, #4a4a68, #2a2a44);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.sw-secondary-btn {
  margin-top: 10px;
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: var(--text-dim);
  font-size: 14px;
}

#confetti-canvas {
  position: fixed;
  inset: 0;
  z-index: 11;
  pointer-events: none;
}
