/* Minimal modal styles matching site theme */
.sm-overlay {
  /* GlassModal is the system error/confirm layer — must sit above the
     10000-tier app modals (bundle purchase, avatar, scenario char edit,
     etc.) so it's visible when surfaced from inside one of those flows.
     Stays below the 99999 admin/debug layer and the int-max landscape
     overlay, which are deliberate top-of-stack. */
  position: fixed; inset: 0; z-index: 10500;
  background: rgba(10, 11, 15, 0.6);
  backdrop-filter: blur(2px);
  display:flex; align-items:center; justify-content:center;
}

.sm-modal {
  background: var(--panel, #151824);
  color: var(--text, #e7e7ee);
  border-radius: 16px;
  border: 1px solid var(--glass-border, rgba(255,255,255,0.12));
  width: min(92vw, 520px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  overflow: hidden;
  transform: scale(0.98);
  transition: transform 120ms ease, opacity 120ms ease;
}

.sm-header { padding: 16px 18px; border-bottom: 1px solid var(--glass-border, rgba(255,255,255,0.08)); position: relative; }
.sm-title { font-weight: 600; font-size: 18px; letter-spacing: -0.2px; }
.sm-close { position:absolute; top:8px; right:8px; width:32px; height:32px; border:none; border-radius:8px; cursor:pointer; background: rgba(255,255,255,0.06); color: var(--muted, #8a8c9e); font-size:20px; line-height: 1; display:flex; align-items:center; justify-content:center; }
.sm-close:hover { background: rgba(255,255,255,0.1); color: var(--text,#e7e7ee); }

.sm-body { padding: 16px 18px; font-size: 14px; line-height: 1.6; }
.sm-footer { padding: 12px 18px; border-top: 1px solid var(--glass-border, rgba(255,255,255,0.08)); display:flex; gap: 10px; justify-content: flex-end; }

.sm-btn { appearance:none; border:1px solid var(--glass-border, rgba(255,255,255,0.18)); background: rgba(255,255,255,0.06); color: var(--text,#e7e7ee); border-radius: 10px; padding: 10px 14px; cursor:pointer; font-size: 14px; font-weight: 500; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.sm-btn:hover { background: rgba(255,255,255,0.1); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,0.25); }
.sm-btn:focus { outline: 2px solid var(--accent, #7c9cff); outline-offset: 2px; }
.sm-btn.primary { background: linear-gradient(135deg, var(--accent,#7c9cff), var(--accent-2,#9bffdc)); border-color: transparent; color: #000; font-weight:600; }
.sm-btn.primary:hover { filter: brightness(1.05); box-shadow: 0 8px 24px rgba(124,156,255,0.35); }

.sm-text { white-space: normal; }
.sm-loading { display:flex; gap:12px; align-items:center; }
.sm-spinner { width: 18px; height: 18px; border: 3px solid rgba(255,255,255,0.2); border-top: 3px solid var(--accent,#7c9cff); border-radius: 50%; animation: smspin 1s linear infinite; }
@keyframes smspin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
  .sm-modal { width: min(94vw, 520px); border-radius: 14px; }
  .sm-header, .sm-body, .sm-footer { padding-left: 14px; padding-right: 14px; }
}
