/* ============================================================
   SlipStream — Styles
   All original CSS variables preserved exactly as-is.
   Changes: liked-card grid layout, option-button class fix,
   liked-card-placeholder, apple-link, ad-placeholder.
   ============================================================ */

:root {
  --bg-absolute: #000000;
  --surface-base: #050506;
  --surface-card: #0b0b0f;
  --surface-raised: #111116;
  --accent-core: #5c3da6;
  --accent-glow: #120b21;
  --accent-green: #3dbf88;
  --accent-red: #d95757;
  --accent-gold: #d1a84f;
  --text-primary: #e1e1e6;
  --text-muted: #8a8a94;
  --text-faint: #5a5a61;
  --border: #24242b;
  --shadow: rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg-absolute);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text-primary);
  background:
    linear-gradient(180deg, rgba(18, 11, 33, 0.45), transparent 28rem),
    linear-gradient(90deg, rgba(12, 36, 34, 0.22), transparent 24rem),
    var(--bg-absolute);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: var(--text-primary);
}

/* ── App shell ──────────────────────────────────────────── */
.app-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

/* ── Top bar ────────────────────────────────────────────── */
.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(225, 225, 230, 0.08);
}

.brand,
.footer-link,
.text-button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  font-weight: 800;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-core), #0f766e);
  box-shadow: 0 12px 28px rgba(92, 61, 166, 0.24);
}

.nav-tabs,
.mode-row,
.account-strip {
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-strip {
  min-height: 38px;
  justify-content: flex-end;
  color: var(--text-muted);
  font-size: 0.86rem;
  white-space: nowrap;
}

.account-strip span {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Navigation pills / tabs ────────────────────────────── */
.nav-tab,
.mode-pill,
.option-button {
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(17, 17, 22, 0.72);
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.nav-tab {
  padding: 0 14px;
}

.nav-tab.active,
.mode-pill.active,
.option-button.selected {
  border-color: rgba(92, 61, 166, 0.78);
  background: rgba(92, 61, 166, 0.22);
  color: var(--text-primary);
}

/* ── Main layout ────────────────────────────────────────── */
main {
  flex: 1;
  padding: 24px 0 22px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.mode-row {
  width: min(420px, 100%);
  margin: 0 auto 14px;
}

.mode-pill {
  flex: 1;
  padding: 0 12px;
}

.deck-layout {
  display: grid;
  grid-template-columns: minmax(300px, 420px) minmax(280px, 1fr);
  gap: 22px;
  align-items: start;
  justify-content: center;
}

.swipe-panel {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.deck-status,
.panel-header,
.section-head,
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.deck-status {
  min-height: 32px;
  color: var(--text-faint);
  font-size: 0.85rem;
}

/* ── Swipe card ─────────────────────────────────────────── */
.swipe-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 610px;
  border: 1px solid rgba(225, 225, 230, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(92, 61, 166, 0.24), transparent 34%),
    var(--surface-card);
  box-shadow: 0 24px 70px var(--shadow);
  transform-origin: center 82%;
  transition: transform 170ms ease, border-color 170ms ease;
  touch-action: none;
  user-select: none;
}

.swipe-card.loading {
  opacity: 0.72;
  pointer-events: none;
}

.swipe-card.drag-like {
  border-color: rgba(61, 191, 136, 0.82);
}

.swipe-card.drag-skip {
  border-color: rgba(217, 87, 87, 0.82);
}

.swipe-card.fly-like {
  transform: translateX(130%) rotate(18deg);
  transition: transform 260ms ease;
}

.swipe-card.fly-skip {
  transform: translateX(-130%) rotate(-18deg);
  transition: transform 260ms ease;
}

.gesture-label {
  position: absolute;
  z-index: 5;
  top: 26px;
  border: 2px solid currentColor;
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 900;
  opacity: 0;
  transform: rotate(-8deg);
  pointer-events: none;
  transition: opacity 80ms ease;
}

.gesture-label.like {
  left: 24px;
  color: var(--accent-green);
}

.gesture-label.skip {
  right: 24px;
  color: var(--accent-red);
  transform: rotate(8deg);
}

.drag-like .gesture-label.like,
.drag-skip .gesture-label.skip {
  opacity: 1;
}

/* ── Artwork / canvas ───────────────────────────────────── */
.art-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #070709;
}

.art-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.art-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(11, 11, 15, 0.92));
  pointer-events: none;
}

#waveCanvas {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 12px;
  z-index: 2;
  width: calc(100% - 36px);
  height: 72px;
  opacity: 0.82;
}

/* ── Track copy ─────────────────────────────────────────── */
.track-copy {
  min-height: 162px;
  padding: 18px 18px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.lane-label {
  margin: 0 0 7px;
  color: var(--accent-gold);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

h1, h2, p {
  margin-top: 0;
}

.track-copy h1,
.section-head h1,
.premium-copy h1,
.onboarding-panel h1 {
  margin-bottom: 8px;
  font-size: 2rem;
  line-height: 1.02;
  letter-spacing: 0;
}

.track-copy p {
  margin-bottom: 0;
  color: var(--text-muted);
}

.track-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.track-meta span,
.taste-chip {
  border: 1px solid rgba(225, 225, 230, 0.1);
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.78rem;
}

audio {
  width: calc(100% - 36px);
  height: 42px;
  margin: 0 18px 10px;
  display: block;
}

.preview-notice {
  min-height: 34px;
  padding: 0 18px 16px;
  color: var(--text-faint);
  font-size: 0.85rem;
}

.preview-notice a,
.apple-link {
  color: var(--accent-green);
  text-decoration: none;
  font-weight: 700;
}

.preview-notice a:hover,
.apple-link:hover {
  text-decoration: underline;
}

/* ── Action buttons ─────────────────────────────────────── */
.action-row {
  display: grid;
  grid-template-columns: repeat(3, 64px);
  justify-content: center;
  gap: 16px;
  padding: 16px 0 14px;
}

.icon-action {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(17, 17, 22, 0.92);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.icon-action span {
  line-height: 1;
  font-size: 1.55rem;
  font-weight: 800;
}

.icon-action:hover {
  transform: translateY(-2px);
}

.icon-action:focus-visible {
  outline: 2px solid var(--accent-core);
  outline-offset: 3px;
}

.skip-action { color: var(--accent-red); }
.play-action { color: var(--text-primary); }
.like-action { color: var(--accent-green); }

/* ── Ad slot ────────────────────────────────────────────── */
.ad-slot {
  min-height: 82px;
  border: 1px dashed rgba(225, 225, 230, 0.18);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  background: rgba(5, 5, 6, 0.84);
  margin-top: 8px;
}

.ad-placeholder {
  color: var(--text-faint);
  font-size: 0.75rem;
  text-align: center;
  margin: 0;
}

/* ── Insight panel ──────────────────────────────────────── */
.insight-panel {
  min-height: 560px;
  border-left: 1px solid rgba(225, 225, 230, 0.08);
  padding: 8px 0 0 22px;
}

.panel-header h2,
.onboarding-section h2,
.legal-grid h2 {
  margin-bottom: 0;
  font-size: 1rem;
}

.text-button {
  padding: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.text-button:hover {
  color: var(--text-primary);
}

.chip-grid {
  min-height: 92px;
  margin: 18px 0;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
}

.taste-chip-empty {
  color: var(--text-faint);
  font-size: 0.82rem;
}

.meter-list {
  display: grid;
  gap: 14px;
}

.meter-list label {
  display: grid;
  gap: 7px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

meter {
  width: 100%;
  height: 12px;
}

.micro-stats {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.micro-stats div {
  border: 1px solid rgba(225, 225, 230, 0.1);
  border-radius: 8px;
  background: rgba(17, 17, 22, 0.66);
  min-height: 84px;
  padding: 12px;
}

.micro-stats strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.5rem;
}

.micro-stats span {
  color: var(--text-faint);
  font-size: 0.8rem;
}

/* ── Section headers ────────────────────────────────────── */
.section-head {
  margin-bottom: 18px;
}

.section-head h1 {
  margin-bottom: 0;
}

/* ── Primary button ─────────────────────────────────────── */
.primary-button {
  min-height: 44px;
  border: 1px solid rgba(92, 61, 166, 0.88);
  border-radius: 8px;
  padding: 0 16px;
  background: linear-gradient(135deg, var(--accent-core), #0f766e);
  color: var(--text-primary);
  font-weight: 800;
  cursor: pointer;
  transition: opacity 150ms ease, transform 150ms ease;
}

.primary-button:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.primary-button:focus-visible {
  outline: 2px solid var(--accent-core);
  outline-offset: 3px;
}

/* ── Liked Songs grid ───────────────────────────────────── */
.liked-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

/* Fixed: class is now .liked-card (matching CSS) — was .liked-track-card in old JS */
.liked-card {
  min-height: 104px;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 10px 12px;
  border: 1px solid rgba(225, 225, 230, 0.1);
  border-radius: 8px;
  padding: 10px;
  background: rgba(11, 11, 15, 0.82);
  align-items: start;
}

.liked-card img {
  width: 74px;
  height: 74px;
  object-fit: cover;
  border-radius: 6px;
  grid-row: span 2;
  display: block;
}

.liked-card-placeholder {
  width: 74px;
  height: 74px;
  border-radius: 6px;
  background: var(--surface-raised);
  grid-row: span 2;
}

.liked-card-info h2 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
  color: var(--text-primary);
}

.liked-card-info p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.liked-card-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.liked-card-actions .remove-track-btn {
  color: var(--accent-red);
  font-size: 0.82rem;
}

.empty-state {
  min-height: 180px;
  border: 1px solid rgba(225, 225, 230, 0.1);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  background: rgba(11, 11, 15, 0.6);
  grid-column: 1 / -1;
  text-align: center;
  padding: 24px;
}

/* ── Premium ────────────────────────────────────────────── */
.premium-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.4fr) minmax(220px, 0.7fr) minmax(220px, 0.7fr);
  gap: 16px;
  align-items: stretch;
}

.premium-copy {
  padding-right: 18px;
}

.premium-copy h1 {
  max-width: 680px;
}

.premium-copy p,
.legal-grid p,
.form-note {
  color: var(--text-muted);
}

.waitlist-form {
  max-width: 520px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 10px;
}

.waitlist-form input {
  min-height: 44px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--surface-base);
  color: var(--text-primary);
}

.waitlist-form input:focus {
  outline: 2px solid var(--accent-core);
  outline-offset: 2px;
  border-color: rgba(92, 61, 166, 0.6);
}

.premium-card {
  min-height: 260px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(225, 225, 230, 0.1);
  border-radius: 8px;
  background: rgba(17, 17, 22, 0.66);
}

.premium-card.featured {
  border-color: rgba(61, 191, 136, 0.62);
  background: linear-gradient(180deg, rgba(61, 191, 136, 0.13), rgba(17, 17, 22, 0.84));
}

.premium-card span {
  color: var(--text-muted);
}

.premium-card strong {
  font-size: 2.2rem;
}

.premium-card p {
  color: var(--text-muted);
  margin: 0;
}

/* ── Legal ──────────────────────────────────────────────── */
.legal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.legal-grid article {
  padding: 18px;
  border: 1px solid rgba(225, 225, 230, 0.1);
  border-radius: 8px;
  background: rgba(17, 17, 22, 0.66);
}

/* ── Footer ─────────────────────────────────────────────── */
.footer {
  min-height: 58px;
  border-top: 1px solid rgba(225, 225, 230, 0.08);
  color: var(--text-faint);
  font-size: 0.83rem;
}

.footer-link {
  padding: 0;
  color: var(--text-muted);
}

/* ── Overlays: Auth gate + Onboarding ───────────────────── */
.auth-gate,
.onboarding {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.84);
}

.auth-gate.active,
.onboarding.active {
  display: flex;
}

.auth-panel,
.onboarding-panel {
  width: min(720px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  border: 1px solid rgba(225, 225, 230, 0.12);
  border-radius: 8px;
  padding: 22px;
  background: linear-gradient(180deg, rgba(18, 11, 33, 0.94), rgba(5, 5, 6, 0.98));
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.62);
}

.auth-panel {
  width: min(520px, 100%);
}

.auth-copy,
.onboarding-copy {
  color: var(--text-muted);
  margin-bottom: 0;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 20px 0 16px;
}

.auth-tab {
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(17, 17, 22, 0.72);
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.auth-tab.active {
  border-color: rgba(92, 61, 166, 0.78);
  background: rgba(92, 61, 166, 0.22);
  color: var(--text-primary);
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form label {
  display: grid;
  gap: 7px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.auth-form input {
  min-height: 44px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--surface-base);
  color: var(--text-primary);
}

.auth-form input:focus {
  outline: 2px solid var(--accent-core);
  outline-offset: 2px;
  border-color: rgba(92, 61, 166, 0.6);
}

/* ── Onboarding ─────────────────────────────────────────── */
.onboarding-section {
  margin: 20px 0;
}

.option-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

/* Fixed: class is now .option-button (matching CSS) — was .option-pill in old JS */
.option-button {
  padding: 0 12px;
}

.full-width {
  width: 100%;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 860px) {
  .app-shell {
    width: min(100% - 22px, 520px);
  }

  .topbar {
    min-height: 84px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 12px 0;
  }

  .nav-tabs {
    width: 100%;
  }

  .nav-tab {
    flex: 1;
  }

  .account-strip {
    width: 100%;
    justify-content: space-between;
  }

  .deck-layout,
  .premium-grid,
  .legal-grid {
    grid-template-columns: 1fr;
  }

  .insight-panel {
    min-height: auto;
    border-left: 0;
    border-top: 1px solid rgba(225, 225, 230, 0.08);
    padding: 20px 0 0;
  }

  .premium-copy {
    padding-right: 0;
  }
}

@media (max-width: 480px) {
  .app-shell {
    width: min(100% - 14px, 420px);
  }

  main {
    padding-top: 14px;
  }

  .brand {
    font-size: 0.95rem;
  }

  .nav-tab,
  .mode-pill {
    min-height: 36px;
    padding: 0 8px;
    font-size: 0.84rem;
  }

  .swipe-card {
    min-height: 570px;
  }

  .track-copy h1,
  .section-head h1,
  .premium-copy h1,
  .onboarding-panel h1 {
    font-size: 1.65rem;
  }

  .track-copy {
    min-height: 148px;
    padding: 16px 14px 8px;
  }

  audio {
    width: calc(100% - 28px);
    margin-left: 14px;
    margin-right: 14px;
  }

  .preview-notice {
    padding-left: 14px;
    padding-right: 14px;
  }

  .action-row {
    grid-template-columns: repeat(3, 58px);
    gap: 12px;
  }

  .icon-action {
    width: 58px;
    height: 58px;
  }

  .waitlist-form {
    grid-template-columns: 1fr;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
  }
}

/* ── Keyboard hint ──────────────────────────────────────── */
.kbd-hint {
  display: none;
  align-items: center;
  gap: 4px;
  color: var(--text-faint);
  font-size: 0.78rem;
}

kbd {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.74rem;
  background: var(--surface-raised);
  color: var(--text-muted);
  font-family: inherit;
}

/* Only visible on devices with a real pointer (desktop / laptop) */
@media (hover: hover) and (pointer: fine) {
  .kbd-hint { display: inline-flex; }
}

/* ── Stats page — share row ─────────────────────────────── */
.stats-share-row {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

/* ── Stats page — summary cards ─────────────────────────── */
.stat-summary-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}

.stat-card {
  min-height: 96px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  border: 1px solid rgba(225,225,230,0.1);
  border-radius: 8px;
  background: rgba(17,17,22,0.66);
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.stat-value {
  font-size: 2rem;
  line-height: 1;
  color: var(--text-primary);
  font-weight: 800;
}

/* ── Stats page — DRIFT panel ───────────────────────────── */
.drift-status-panel {
  margin-bottom: 22px;
  padding: 16px 18px 14px;
  border: 1px solid rgba(225,225,230,0.1);
  border-radius: 8px;
  background: rgba(11,11,15,0.72);
}

.drift-status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.drift-status-header .lane-label {
  margin: 0;
}

.drift-active-label {
  font-size: 0.82rem;
  font-weight: 700;
}

.drift-explainer {
  margin: 10px 0 0;
  font-size: 0.78rem;
  color: var(--text-faint);
}

/* ── Stats page — chart grid ────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 10px;
}

.stats-panel {
  padding: 18px;
  border: 1px solid rgba(225,225,230,0.1);
  border-radius: 8px;
  background: rgba(17,17,22,0.66);
}

.stats-panel h2 {
  margin: 0 0 14px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

/* ── Bar chart rows (shared by stats + DRIFT panel) ─────── */
.bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.82rem;
}

.bar-label {
  width: 90px;
  flex-shrink: 0;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-track {
  flex: 1;
  height: 6px;
  background: var(--surface-raised);
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--accent-core);
  border-radius: 999px;
  transition: width 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.bar-count {
  width: 26px;
  flex-shrink: 0;
  text-align: right;
  color: var(--text-faint);
  font-size: 0.76rem;
}

.empty-bar-msg {
  color: var(--text-faint);
  font-size: 0.82rem;
  margin: 0;
}

/* ── Session strip ──────────────────────────────────────── */
.session-strip {
  color: var(--text-faint);
  font-size: 0.82rem;
  margin: 14px 0 0;
}

/* ── Viral stats preview banner ─────────────────────────── */
.stats-preview-banner {
  border: 1px solid rgba(92,61,166,0.42);
  border-radius: 8px;
  background: rgba(92,61,166,0.12);
  padding: 14px 16px;
  margin-bottom: 18px;
}

.stats-preview-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.stats-preview-text {
  flex: 1;
  font-size: 0.88rem;
  color: var(--text-muted);
  min-width: 200px;
}

.stats-preview-text strong {
  color: var(--text-primary);
}

.stats-preview-cta {
  flex-shrink: 0;
}

.stats-preview-dismiss {
  flex-shrink: 0;
  font-size: 1.2rem;
  padding: 0 4px;
}

/* ── Responsive — stats ─────────────────────────────────── */
@media (max-width: 860px) {
  .stat-summary-row  { grid-template-columns: repeat(2, 1fr); }
  .stats-grid        { grid-template-columns: 1fr; }
  .stats-share-row   { flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .stat-summary-row  { grid-template-columns: repeat(2, 1fr); }
  .stat-value        { font-size: 1.65rem; }
  .stats-share-row   { flex-direction: column; }
  .stats-preview-inner { flex-direction: column; align-items: flex-start; }
}

/* ── Admin dashboard ─────────────────────────────────────── */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 10px;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
}

.admin-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(92,61,166,0.08);
  font-size: 0.82rem;
  gap: 12px;
}

.admin-user-id {
  font-family: "Courier New", monospace;
  color: var(--text-muted);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-date {
  color: var(--text-faint);
  flex-shrink: 0;
  font-size: 0.78rem;
}

@media (max-width: 860px) {
  .admin-grid { grid-template-columns: 1fr; }
}
