/* ══════════════════════════════════════════════════════════════
   SpinChain — Component Library
   Reusable, token-driven UI building blocks.
   Depends on tokens.css (do not redefine variables here).
   ══════════════════════════════════════════════════════════════ */


/* ════════════════════════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════════════════════════ */

/* Base button — all variants extend this */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 0 var(--s-5);
  height: 44px;
  border-radius: var(--r-pill);
  border: 1.5px solid transparent;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition:
    box-shadow  var(--t-fast) var(--ease-out),
    transform   var(--t-fast) var(--ease-spring),
    filter      var(--t-fast) var(--ease-out),
    background  var(--t-fast) var(--ease-out),
    border-color var(--t-fast) var(--ease-out);
}

/* Press animation — shared */
.btn:active {
  transform: scale(0.97);
}

/* Sheen sweep — shared */
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    108deg,
    rgba(255, 255, 255, 0) 25%,
    rgba(255, 255, 255, 0.22) 50%,
    rgba(255, 255, 255, 0) 75%
  );
  transform: translateX(-130%);
  transition: transform 0.6s var(--ease-out);
  pointer-events: none;
  border-radius: inherit;
}
.btn:hover::before {
  transform: translateX(130%);
}

/* ── Gold button ──────────────────────────────────────────── */
.btn-gold {
  background: var(--grad-gold);
  color: var(--text-on-gold);
  border-color: rgba(255, 220, 90, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18),
    var(--shadow-card);
}
.btn-gold:hover,
.btn-gold:focus-visible {
  box-shadow:
    var(--glow-gold),
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18);
  filter: brightness(1.06);
}
.btn-gold:active {
  box-shadow:
    0 0 14px rgba(255, 200, 80, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18);
}

/* ── Ghost button ─────────────────────────────────────────── */
.btn-ghost {
  background: transparent;
  color: var(--text-1);
  border-color: var(--stroke-strong);
}
.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.28);
}
.btn-ghost:active {
  background: rgba(255, 255, 255, 0.08);
}

/* ── Violet button ────────────────────────────────────────── */
.btn-violet {
  background: var(--grad-violet);
  color: var(--text-1);
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2),
    var(--shadow-card);
}
.btn-violet:hover,
.btn-violet:focus-visible {
  box-shadow:
    var(--glow-violet),
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  filter: brightness(1.08);
}
.btn-violet:active {
  box-shadow:
    0 0 14px rgba(139, 92, 246, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

/* ── Cyan button ──────────────────────────────────────────── */
.btn-cyan {
  background: var(--grad-cyan);
  color: #07060d;
  border-color: rgba(33, 200, 184, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18),
    var(--shadow-card);
}
.btn-cyan:hover,
.btn-cyan:focus-visible {
  box-shadow:
    var(--glow-cyan),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18);
  filter: brightness(1.06);
}

/* ── Modifiers ────────────────────────────────────────────── */
.btn-block {
  width: 100%;
  border-radius: var(--r-md);
}

.btn-lg {
  height: 52px;
  font-size: 16px;
  padding: 0 var(--s-6);
}

.btn-sm {
  height: 34px;
  font-size: 13px;
  padding: 0 var(--s-3);
}

/* Disabled state */
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.38;
  cursor: not-allowed;
  pointer-events: none;
}


/* ════════════════════════════════════════════════════════════
   CHIPS & BADGES
   ════════════════════════════════════════════════════════════ */

.chip,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.4;
  white-space: nowrap;
  border: 1px solid transparent;
}

/* Default chip: muted surface */
.chip {
  background: var(--bg-3);
  color: var(--text-2);
  border-color: var(--stroke);
}

/* Default badge: gold-tint */
.badge {
  background: rgba(255, 208, 85, 0.14);
  color: var(--gold-2);
  border-color: rgba(255, 208, 85, 0.25);
}

/* VIP badge — violet gradient + crown energy */
.badge-vip {
  background: linear-gradient(120deg, rgba(179, 136, 255, 0.2), rgba(109, 40, 217, 0.2));
  color: var(--violet-1);
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.18);
  text-shadow: 0 0 10px rgba(196, 168, 255, 0.45);
}

/* Tier-specific badge helpers */
.badge-tier-1 { background: rgba(154, 160, 180, 0.14); color: var(--tier-1); border-color: rgba(154, 160, 180, 0.22); }
.badge-tier-2 { background: rgba(255, 216, 107, 0.14); color: var(--tier-2); border-color: rgba(255, 216, 107, 0.25); }
.badge-tier-3 { background: rgba(185, 199, 230, 0.14); color: var(--tier-3); border-color: rgba(185, 199, 230, 0.22); }
.badge-tier-4 { background: rgba(139, 92, 246, 0.14); color: var(--tier-4); border-color: rgba(139, 92, 246, 0.25); box-shadow: 0 0 10px rgba(139, 92, 246, 0.18); }
.badge-tier-5 { background: rgba(255, 122, 184, 0.14); color: var(--tier-5); border-color: rgba(255, 122, 184, 0.25); box-shadow: 0 0 10px rgba(255, 122, 184, 0.18); }
.badge-tier-6 { background: rgba(33, 200, 184, 0.14); color: var(--tier-6); border-color: rgba(33, 200, 184, 0.25); box-shadow: 0 0 10px rgba(33, 200, 184, 0.18); }

/* Semantic badges */
.badge-success { background: rgba(61, 220, 151, 0.14); color: var(--success); border-color: rgba(61, 220, 151, 0.25); }
.badge-warning { background: rgba(255, 181, 71, 0.14); color: var(--warning); border-color: rgba(255, 181, 71, 0.25); }
.badge-danger  { background: rgba(255, 92, 114, 0.14); color: var(--danger);  border-color: rgba(255, 92, 114, 0.25); }
.badge-info    { background: rgba(90, 169, 255, 0.14); color: var(--info);    border-color: rgba(90, 169, 255, 0.25); }


/* ════════════════════════════════════════════════════════════
   STAT CARDS
   ════════════════════════════════════════════════════════════ */

.stat-card {
  /* Extends .card utility — use alongside it */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-1);
  padding: var(--s-4) var(--s-5);
  background: linear-gradient(
    160deg,
    var(--bg-2) 0%,
    var(--bg-1) 100%
  );
  border: 1px solid var(--stroke);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

/* Ambient top-left glow patch */
.stat-card::before {
  content: '';
  position: absolute;
  top: -18px;
  left: -18px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 200, 80, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text-1);
  /* Optionally composable with .text-gold */
}

.stat-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  line-height: 1;
}

.stat-delta {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 3px;
}
.stat-delta.negative { color: var(--danger); }


/* ════════════════════════════════════════════════════════════
   SEGMENTED CONTROL
   ════════════════════════════════════════════════════════════ */

.seg {
  display: inline-flex;
  align-items: stretch;
  gap: 3px;
  padding: 4px;
  background: var(--bg-2);
  border: 1px solid var(--stroke);
  border-radius: var(--r-pill);
  width: 100%;
}

.seg-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px var(--s-3);
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-3);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  user-select: none;
  transition:
    background  var(--t-fast) var(--ease-out),
    color       var(--t-fast) var(--ease-out),
    box-shadow  var(--t-fast) var(--ease-out),
    border-color var(--t-fast) var(--ease-out);
  white-space: nowrap;
}

.seg-btn:hover:not(.active) {
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.05);
}

.seg-btn.active {
  background: var(--grad-gold);
  color: var(--text-on-gold);
  border-color: rgba(255, 220, 90, 0.3);
  box-shadow:
    var(--glow-gold),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.seg-btn:active {
  transform: scale(0.97);
}


/* ════════════════════════════════════════════════════════════
   FORM FIELDS
   ════════════════════════════════════════════════════════════ */

.field {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.field-label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}

.field input,
.field textarea,
.field select,
input.input,
textarea.input,
select.input {
  width: 100%;
  padding: 12px var(--s-4);
  background: var(--bg-2);
  border: 1.5px solid var(--stroke);
  border-radius: var(--r-md);
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  transition:
    border-color var(--t-fast) var(--ease-out),
    box-shadow   var(--t-fast) var(--ease-out),
    background   var(--t-fast) var(--ease-out);
}

.field input::placeholder,
.field textarea::placeholder,
input.input::placeholder,
textarea.input::placeholder {
  color: var(--text-3);
}

.field input:hover,
.field textarea:hover,
.field select:hover,
input.input:hover,
textarea.input:hover {
  border-color: var(--stroke-strong);
  background: var(--bg-3);
}

.field input:focus,
.field textarea:focus,
.field select:focus,
input.input:focus,
textarea.input:focus {
  border-color: var(--gold-3);
  box-shadow: 0 0 0 3px rgba(233, 177, 62, 0.18);
  background: var(--bg-3);
}

.field textarea,
textarea.input {
  resize: vertical;
  min-height: 96px;
}

/* Input hint / error */
.field-hint {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.4;
}
.field-error {
  font-size: 12px;
  color: var(--danger);
  line-height: 1.4;
}
.field.has-error input,
.field.has-error textarea {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(255, 92, 114, 0.15);
}


/* ════════════════════════════════════════════════════════════
   LIST ROWS
   ════════════════════════════════════════════════════════════ */

.list-row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--stroke);
  transition: background var(--t-fast) var(--ease-out);
}

.list-row:last-child {
  border-bottom: none;
}

.list-row:hover,
.list-row.interactive:hover {
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.list-row:active {
  background: rgba(255, 255, 255, 0.06);
}

.list-row-main {
  flex: 1;
  min-width: 0;
}

.list-row-title {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-1);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-row-sub {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.3;
  margin-top: 2px;
}

.list-row-end {
  flex-shrink: 0;
  text-align: right;
}


/* ════════════════════════════════════════════════════════════
   AVATAR
   ════════════════════════════════════════════════════════════ */

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  position: relative;

  /* Default size */
  width: 40px;
  height: 40px;

  /* Default gold gradient ring */
  background: var(--grad-gold);
  padding: 2px;
}

.avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg-2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Size variants */
.avatar-sm  { width: 28px; height: 28px; }
.avatar-sm .avatar-inner { font-size: 11px; }
.avatar-lg  { width: 56px; height: 56px; }
.avatar-lg .avatar-inner { font-size: 22px; }
.avatar-xl  { width: 80px; height: 80px; }
.avatar-xl .avatar-inner { font-size: 32px; }

/* Tier ring variants */
.avatar-tier-1 { background: var(--tier-1); }
.avatar-tier-2 { background: var(--grad-gold); }
.avatar-tier-3 { background: linear-gradient(135deg, #b9c7e6, #6d8ec2); }
.avatar-tier-4 { background: var(--grad-violet); box-shadow: 0 0 12px rgba(139, 92, 246, 0.45); }
.avatar-tier-5 { background: linear-gradient(135deg, #ff7ab8, #e0337a); box-shadow: 0 0 12px rgba(255, 122, 184, 0.45); }
.avatar-tier-6 { background: var(--grad-cyan); box-shadow: 0 0 12px rgba(33, 200, 184, 0.45); }


/* ════════════════════════════════════════════════════════════
   PROGRESS BAR
   ════════════════════════════════════════════════════════════ */

.progress {
  width: 100%;
  height: 8px;
  background: var(--bg-3);
  border-radius: var(--r-pill);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--stroke);
}

.progress-bar {
  height: 100%;
  border-radius: var(--r-pill);
  background: var(--grad-gold);
  box-shadow: 0 0 8px rgba(255, 200, 80, 0.5);
  transition: width var(--t-med) var(--ease-out);
  position: relative;
  min-width: 4px;
}

/* Animated shimmer on the bar */
.progress-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.35) 45%,
    rgba(255, 255, 255, 0.35) 55%,
    transparent 100%
  );
  animation: progressShimmer 1.8s var(--ease-out) infinite;
  border-radius: inherit;
}

@keyframes progressShimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(300%); }
}

/* Variant: violet */
.progress-bar-violet {
  background: var(--grad-violet);
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
}

/* Variant: cyan */
.progress-bar-cyan {
  background: var(--grad-cyan);
  box-shadow: 0 0 8px rgba(33, 200, 184, 0.5);
}

/* Size variants */
.progress-sm { height: 4px; }
.progress-lg { height: 12px; }


/* ════════════════════════════════════════════════════════════
   BOTTOM SHEET / MODAL
   ════════════════════════════════════════════════════════════ */

/* Backdrop */
.sheet-backdrop,
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(7, 6, 13, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  animation: backdropIn var(--t-fast) var(--ease-out) both;
}

.modal-backdrop {
  align-items: center;
  padding: var(--s-4);
}

@keyframes backdropIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Sheet container */
.sheet {
  width: 100%;
  max-width: var(--maxw);
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg-1) 100%);
  border: 1px solid var(--stroke-strong);
  border-bottom: none;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  box-shadow:
    var(--shadow-pop),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 -1px 0 rgba(255, 255, 255, 0.06) inset;
  padding: var(--s-4) var(--s-4) calc(var(--s-6) + env(safe-area-inset-bottom, 0px));
  max-height: 90dvh;
  overflow-y: auto;
  position: relative;
  animation: sheetSlideUp var(--t-med) var(--ease-out) both;
}

@keyframes sheetSlideUp {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Drag handle */
.sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: var(--r-pill);
  background: var(--stroke-strong);
  margin: 0 auto var(--s-4);
}

.sheet-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-1);
  margin: 0 0 var(--s-4);
  text-align: center;
}

/* Modal container */
.modal-base {
  width: 100%;
  max-width: calc(var(--maxw) - var(--s-8));
  background: linear-gradient(160deg, var(--bg-2) 0%, var(--bg-1) 100%);
  border: 1px solid var(--stroke-strong);
  border-radius: var(--r-xl);
  box-shadow:
    var(--shadow-pop),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  padding: var(--s-6);
  max-height: 85dvh;
  overflow-y: auto;
  position: relative;
  animation: modalPopIn var(--t-med) var(--ease-spring) both;
}

@keyframes modalPopIn {
  from {
    opacity: 0;
    transform: scale(0.93) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Close button (common pattern inside sheets/modals) */
.sheet-close,
.modal-close {
  position: absolute;
  top: var(--s-4);
  right: var(--s-4);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--stroke);
  background: var(--bg-3);
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition:
    background var(--t-fast) var(--ease-out),
    color      var(--t-fast) var(--ease-out);
}
.sheet-close:hover,
.modal-close:hover {
  background: var(--bg-3);
  color: var(--text-1);
  border-color: var(--stroke-strong);
}


/* ════════════════════════════════════════════════════════════
   SKELETON SHIMMER
   ════════════════════════════════════════════════════════════ */

.skeleton {
  border-radius: var(--r-sm);
  background: linear-gradient(
    90deg,
    var(--bg-2) 25%,
    var(--bg-3) 50%,
    var(--bg-2) 75%
  );
  background-size: 200% 100%;
  animation: skeletonShimmer 1.6s linear infinite;
}

@keyframes skeletonShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Preset skeleton shapes */
.skeleton-text {
  height: 14px;
  width: 100%;
  border-radius: var(--r-pill);
}
.skeleton-text-short {
  height: 14px;
  width: 60%;
  border-radius: var(--r-pill);
}
.skeleton-heading {
  height: 22px;
  width: 75%;
  border-radius: var(--r-pill);
}
.skeleton-circle {
  border-radius: 50%;
}
.skeleton-card {
  border-radius: var(--r-lg);
  min-height: 80px;
}


/* ════════════════════════════════════════════════════════════
   DIVIDERS & SPACERS
   ════════════════════════════════════════════════════════════ */

.divider {
  height: 1px;
  background: var(--stroke);
  border: none;
  margin: var(--s-4) 0;
}

.divider-label {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  color: var(--text-3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: var(--s-4) 0;
}
.divider-label::before,
.divider-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--stroke);
}


/* ════════════════════════════════════════════════════════════
   ICON BUTTON
   ════════════════════════════════════════════════════════════ */

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  border: 1px solid var(--stroke);
  background: var(--bg-2);
  color: var(--text-2);
  cursor: pointer;
  font-size: 18px;
  flex-shrink: 0;
  transition:
    background    var(--t-fast) var(--ease-out),
    border-color  var(--t-fast) var(--ease-out),
    color         var(--t-fast) var(--ease-out),
    transform     var(--t-fast) var(--ease-spring);
}
.icon-btn:hover {
  background: var(--bg-3);
  border-color: var(--stroke-strong);
  color: var(--text-1);
}
.icon-btn:active {
  transform: scale(0.92);
}


/* ════════════════════════════════════════════════════════════
   TOAST (inline — anchored to fx-root by effects agent)
   ════════════════════════════════════════════════════════════ */

.toast {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  padding: 12px var(--s-4);
  background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
  border: 1px solid var(--stroke-strong);
  border-radius: var(--r-pill);
  box-shadow:
    var(--shadow-pop),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
  pointer-events: none;
  white-space: nowrap;
  max-width: calc(var(--maxw) - var(--s-8));
}

.toast-success { border-color: rgba(61, 220, 151, 0.3); box-shadow: var(--shadow-pop), 0 0 18px rgba(61, 220, 151, 0.15); }
.toast-warning { border-color: rgba(255, 181, 71, 0.3);  box-shadow: var(--shadow-pop), 0 0 18px rgba(255, 181, 71, 0.15); }
.toast-danger  { border-color: rgba(255, 92, 114, 0.3);  box-shadow: var(--shadow-pop), 0 0 18px rgba(255, 92, 114, 0.15); }
.toast-gold    { border-color: rgba(255, 208, 85, 0.3);  box-shadow: var(--shadow-pop), var(--glow-gold); }


/* ════════════════════════════════════════════════════════════
   REWARD / PRIZE CARD (used in spin results, wheel listings)
   ════════════════════════════════════════════════════════════ */

.prize-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-5);
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255, 200, 80, 0.08) 0%, transparent 70%),
              linear-gradient(180deg, var(--bg-2) 0%, var(--bg-1) 100%);
  border: 1px solid rgba(255, 208, 85, 0.18);
  border-radius: var(--r-xl);
  box-shadow:
    var(--shadow-card),
    0 0 32px -12px rgba(255, 200, 80, 0.2);
  text-align: center;
}

.prize-icon {
  font-size: 48px;
  line-height: 1;
  filter: drop-shadow(0 0 12px rgba(255, 200, 80, 0.5));
}

.prize-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.prize-sub {
  font-size: 13px;
  color: var(--text-2);
}


/* ════════════════════════════════════════════════════════════
   LEADERBOARD RANK ROW (convenience)
   ════════════════════════════════════════════════════════════ */

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.rank-badge-1 {
  background: var(--grad-gold);
  color: var(--text-on-gold);
  box-shadow: var(--glow-gold);
}
.rank-badge-2 {
  background: linear-gradient(135deg, #d0d8ec, #8e9ab8);
  color: #1a1e2e;
}
.rank-badge-3 {
  background: linear-gradient(135deg, #d4895a, #a0522d);
  color: #fff;
}
.rank-badge-n {
  background: var(--bg-3);
  color: var(--text-3);
}


/* ════════════════════════════════════════════════════════════
   UTILITY: GLOW RING (wraps any element with a tier-colored ring)
   ════════════════════════════════════════════════════════════ */

.glow-ring {
  box-shadow: 0 0 0 2px var(--bg-1), 0 0 0 4px var(--gold-3), var(--glow-gold);
}
.glow-ring-violet {
  box-shadow: 0 0 0 2px var(--bg-1), 0 0 0 4px var(--violet-2), var(--glow-violet);
}
.glow-ring-cyan {
  box-shadow: 0 0 0 2px var(--bg-1), 0 0 0 4px var(--cyan-2), var(--glow-cyan);
}


/* ════════════════════════════════════════════════════════════
   NUMERIC VALUE DISPLAY (big on-screen counter)
   ════════════════════════════════════════════════════════════ */

.num-display {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 14px rgba(255, 200, 80, 0.3));
}
