/* ──────────────────────────────────────────────────────
   WIN POPUP — magazine-style ticker
   ────────────────────────────────────────────────────── */

#popupStack {
  position: fixed;
  bottom: 24px;
  left: 14px;
  right: 14px;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  z-index: 300;
  pointer-events: none;
  max-width: 340px;
  margin: 0 auto;
}
@media (max-width: 480px) {
  #popupStack {
    bottom: 16px;
    left: 12px;
    right: 12px;
    max-width: none;
  }
}

.win-popup {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px 12px 14px;
  background: linear-gradient(180deg, rgba(42, 26, 71, 0.96), rgba(20, 9, 43, 0.96));
  border: 1px solid rgba(212, 169, 92, 0.32);
  border-left: 2px solid var(--gold);
  border-radius: 4px;
  box-shadow: 0 18px 40px -16px rgba(0,0,0,0.7), 0 0 0 1px rgba(0,0,0,0.5);
  font-family: var(--font-body);
  pointer-events: auto;
  animation: slideIn 320ms cubic-bezier(.22,.61,.36,1) both;
  /* backdrop-filter removed — iOS WebKit promotes the canvas behind it into a
     compositing layer with integer-DPI downsampling, leaving canvas blurry
     even after popup is removed. The 96% opaque gradient above masks the loss. */
}
.win-popup--out { animation: fadeOut 240ms ease both; }

.win-popup__icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 35% 30%, var(--gold-bright), var(--gold) 60%, var(--gold-deep));
  color: #2A1A47;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(244, 213, 141, 0.35);
}
.win-popup__icon svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.win-popup__body { min-width: 0; }
.win-popup__name {
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0 0 2px;
}
.win-popup__meta {
  color: var(--ink-faded);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.win-popup__amount {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--gold-bright);
  line-height: 1;
  white-space: nowrap;
  text-shadow:
    0 2px 0 rgba(0,0,0,0.45),
    0 0 16px rgba(244, 213, 141, 0.30);
}

@keyframes slideIn {
  from { transform: translateY(120%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
@keyframes fadeOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(20%); }
}

/* ─── Toast ─── */
#toastStack {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 320;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.toast {
  pointer-events: auto;
  padding: 12px 18px;
  background: linear-gradient(180deg, rgba(42, 26, 71, 0.96), rgba(20, 9, 43, 0.96));
  border: 1px solid rgba(212, 169, 92, 0.30);
  border-radius: var(--radius-soft);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.01em;
  /* backdrop-filter removed (same iOS canvas-downsample reason as .win-popup). */
  animation: toast-rise 240ms ease both;
}
.toast--error { border-color: rgba(197, 56, 75, 0.5); }
@keyframes toast-rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
