:root {
  color-scheme: dark;
  --bg: #0a0b0f;
  --surface: #131419;
  --surface-2: #191b22;
  --border: #262933;
  --border-soft: #1e2028;
  --text: #eceef2;
  --text-dim: #8c8fa0;
  --text-faint: #5c5f6e;
  --accent: #06b6d4;
  --accent-hover: #22d3ee;
  --accent-soft: rgba(6,182,212,0.12);
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 7px;

  --track-vocals: #6366f1;
  --track-drums: #f59e0b;
  --track-bass: #10b981;
  --track-other: #ec4899;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Top nav ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 860px;
  margin: 0 auto;
  padding: 22px 20px;
}

.brand, .brand-link {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent);
  color: white;
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

/* Primary nav tabs (logged in) */

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 18px;
  padding-left: 18px;
  border-left: 1px solid var(--border);
}

.nav-tab {
  position: relative;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  transition: color .15s ease, background .15s ease;
}
.nav-tab:hover { color: var(--text); background: var(--surface-2); }

.nav-tab.is-active {
  color: var(--text);
  background: var(--surface-2);
  font-weight: 600;
}

/* User menu */

.user-menu { position: relative; }

.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 4px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  color: var(--text-dim);
  transition: background .15s ease, border-color .15s ease;
}
.user-menu-trigger:hover,
.user-menu-trigger[aria-expanded="true"] {
  background: var(--surface-2);
  border-color: var(--border);
}

.user-menu-chevron { transition: transform .18s ease; flex-shrink: 0; }
.user-menu-trigger[aria-expanded="true"] .user-menu-chevron { transform: rotate(180deg); }

.user-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  flex-shrink: 0;
}

.user-menu-pop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  min-width: 232px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 18px 40px -16px rgba(0,0,0,0.85);
  animation: menuIn .14s ease;
}

@keyframes menuIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.user-menu-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px 12px;
}

.user-menu-name { font-size: 0.88rem; font-weight: 600; }
.user-menu-email {
  font-size: 0.78rem;
  color: var(--text-faint);
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-menu-sep {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.86rem;
  transition: background .15s ease, color .15s ease;
}
.user-menu-item:hover { background: var(--surface-2); color: var(--text); }
.user-menu-item svg { flex-shrink: 0; }

.user-menu-item-danger:hover { color: #fca5a5; background: rgba(239,68,68,0.08); }

.nav-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color .15s ease;
}
.nav-link:hover { color: var(--text); }

.nav-cta {
  background: var(--accent);
  color: white;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  transition: background .15s ease;
}
.nav-cta:hover { background: var(--accent-hover); }

.token-group {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid rgba(6,182,212,0.3);
  border-radius: 999px;
  background: var(--accent-soft);
  overflow: hidden;
}

.token-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  padding: 6px 11px;
  white-space: nowrap;
  text-decoration: none;
  transition: background .15s ease;
}
.token-pill:hover { background: rgba(6,182,212,0.16); }

.token-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  color: var(--accent);
  border-left: 1px solid rgba(6,182,212,0.3);
  text-decoration: none;
  transition: background .15s ease;
}
.token-add:hover { background: rgba(6,182,212,0.22); }

/* ---------- Hero ---------- */

.hero {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 20px 44px;
  text-align: center;
}

.hero h1 {
  margin: 0;
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.hero-sub {
  margin: 14px 0 0;
  color: var(--text-dim);
  font-size: 1.02rem;
  line-height: 1.55;
}

.hero-sub strong { color: var(--accent); font-weight: 700; }

.hero-compact { padding: 20px 20px 32px; }
.hero-compact h1 { font-size: 1.6rem; }

.hero-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(6,182,212,0.3);
  padding: 5px 13px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 26px;
  flex-wrap: wrap;
}

.hero-note {
  margin: 16px 0 0;
  color: var(--text-faint);
  font-size: 0.82rem;
}

/* ---------- Landing page sections ---------- */

/* Ambient glow behind the hero */
.landing::before {
  content: '';
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: min(900px, 100%);
  height: 560px;
  background: radial-gradient(ellipse at center, rgba(6,182,212,0.10), transparent 65%);
  pointer-events: none;
  z-index: -1;
}

.landing { position: relative; }

/* Product preview shell */

.demo-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 60px -30px rgba(0,0,0,0.9);
}

.demo-chrome {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.demo-dots { display: flex; gap: 6px; flex-shrink: 0; }
.demo-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border);
}

.demo-chrome-title {
  flex: 1;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-chrome-badge {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--success);
  background: rgba(34,197,94,0.12);
  border: 1px solid rgba(34,197,94,0.3);
  padding: 3px 9px;
  border-radius: 999px;
}

.demo-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

/* Spec strip */

.specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.spec {
  background: var(--surface);
  padding: 22px 18px;
  text-align: center;
}

.spec-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.03em;
}

.spec-label {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.4;
}

/* Section headers */

.section-head {
  text-align: center;
  margin-bottom: 30px;
}

.section-eyebrow {
  display: block;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.section-sub {
  margin: 8px 0 0;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.demo-mock-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.demo-mock-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--stem-color) 16%, transparent);
  color: var(--stem-color);
}

.demo-mock-label {
  font-weight: 600;
  font-size: 0.85rem;
  width: 60px;
  flex-shrink: 0;
}

.demo-mock-wave {
  flex: 1;
  height: 32px;
  color: var(--stem-color);
  opacity: 0.85;
}
.demo-mock-wave svg { width: 100%; height: 100%; display: block; }

.section-title {
  text-align: center;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}

.step {
  text-align: center;
  padding: 0 8px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.step h3 { margin: 0 0 6px; font-size: 0.98rem; font-weight: 600; }
.step p { margin: 0; color: var(--text-dim); font-size: 0.85rem; line-height: 1.55; }

.cta-card {
  position: relative;
  text-align: center;
  padding: 48px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.cta-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center top, rgba(6,182,212,0.12), transparent 60%);
  pointer-events: none;
}

.cta-card > * { position: relative; }
.cta-card h2 { margin: 0 0 8px; font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; }
.cta-card p { margin: 0; color: var(--text-dim); font-size: 0.92rem; }

/* ---------- Layout ---------- */

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 20px 64px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.container-wide { max-width: 780px; gap: 56px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

/* ---------- Dropzone ---------- */

.dropzone {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  background: var(--surface-2);
  transition: border-color .15s ease, background .15s ease;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dropzone-disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
.dropzone-disabled:hover { border-color: var(--border); background: var(--surface-2); }

.no-tokens-block {
  margin-bottom: 18px;
  padding: 14px 16px;
  background: rgba(239,68,68,0.07);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius-md);
  text-align: center;
}
.no-tokens-block p { margin: 0; font-size: 0.88rem; color: #fca5a5; }
.no-tokens-block strong { color: #fecaca; }

.drop-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent);
  margin-bottom: 14px;
}

.drop-title { margin: 0 0 4px; font-weight: 600; font-size: 0.98rem; }
.drop-sub { margin: 0; color: var(--text-dim); font-size: 0.86rem; }

.file-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.file-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}

.file-name { font-weight: 600; font-size: 0.92rem; }
.file-size { color: var(--text-dim); font-size: 0.82rem; }

.clear-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
}
.clear-btn:hover { border-color: var(--error); color: var(--error); }

/* ---------- Options ---------- */

.options {
  display: flex;
  gap: 18px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.option-group { flex: 1; min-width: 220px; }

.option-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.segmented {
  position: relative;
  display: flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 3px;
}

.seg-indicator {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  background: var(--accent);
  border-radius: 6px;
  transition: transform .25s cubic-bezier(.4,0,.2,1), width .25s cubic-bezier(.4,0,.2,1);
  z-index: 0;
}

.seg-btn {
  position: relative;
  z-index: 1;
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 9px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.83rem;
  font-weight: 500;
  font-family: inherit;
  transition: color .2s ease;
}

.seg-btn:hover:not(.active) { color: var(--text); }

.seg-btn.active {
  color: white;
}

/* ---------- Tooltips ---------- */

[data-tip] { position: relative; }

[data-tip]::after,
[data-tip]::before {
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}

/* Bubble */
[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 11px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  z-index: 60;
  width: max-content;
  max-width: 250px;
  padding: 9px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 14px 32px -14px rgba(0,0,0,0.9);
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
  white-space: normal;
}

/* Arrow */
[data-tip]::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(4px) rotate(45deg);
  z-index: 61;
  width: 9px;
  height: 9px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

[data-tip]:hover::after,
[data-tip]:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

[data-tip]:hover::before,
[data-tip]:focus-visible::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0) rotate(45deg);
}

/* Lift the hovered option so its tooltip isn't painted over by the next one. */
.seg-btn:hover,
.seg-btn:focus-visible { z-index: 5; }

.cost-note {
  margin: 10px 0 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--warning);
}

/* ---------- Buttons ---------- */

.primary-btn {
  display: block;
  width: 100%;
  margin-top: 22px;
  padding: 14px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background .15s ease, transform .1s ease;
}

.primary-btn:hover:not(:disabled) { background: var(--accent-hover); }
.primary-btn:active:not(:disabled) { transform: scale(0.99); }

.primary-btn:disabled {
  background: var(--surface-2);
  color: var(--text-faint);
  border: 1px solid var(--border);
  cursor: not-allowed;
}

.secondary-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 500;
  font-family: inherit;
  font-size: 0.88rem;
  margin-top: 4px;
  text-decoration: none;
  display: inline-block;
}
.secondary-btn:hover { border-color: var(--text-faint); }

.btn-spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: -3px;
  margin-right: 8px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.hero-btn, .hero-btn-alt { width: auto; display: inline-block; margin-top: 0; padding: 13px 26px; }
.hero-btn-alt { text-decoration: none; }
.cta-btn { width: auto; display: inline-block; margin-top: 20px; padding: 13px 30px; }

/* ---------- Progress ---------- */

.progress-block { margin-top: 22px; }

.progress-bar-track {
  height: 6px;
  border-radius: 4px;
  background: var(--surface-2);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 30%;
  border-radius: 4px;
  background: var(--accent);
  animation: indeterminate 1.4s ease-in-out infinite;
}

@keyframes indeterminate {
  0% { transform: translateX(-100%); width: 40%; }
  50% { width: 55%; }
  100% { transform: translateX(220%); width: 40%; }
}

.progress-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 11px;
}

.progress-label { margin: 0; font-weight: 500; font-size: 0.87rem; color: var(--text); }
.progress-timer { margin: 0; color: var(--text-faint); font-size: 0.82rem; font-variant-numeric: tabular-nums; }

/* ---------- Errors ---------- */

.error-block {
  margin-top: 20px;
  padding: 16px;
  background: rgba(239,68,68,0.07);
  border: 1px solid rgba(239,68,68,0.35);
  border-radius: var(--radius-md);
  text-align: center;
  animation: cardIn .25s ease;
}
.error-block p { color: #fca5a5; margin: 0 0 6px; font-size: 0.88rem; }

/* ---------- Results ---------- */

.results-card {
  animation: cardIn .35s ease;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.results-header h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.status-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}

.status-pill.processing {
  color: var(--warning);
  background: rgba(245,158,11,0.12);
  border: 1px solid rgba(245,158,11,0.3);
}

.status-pill.done {
  color: var(--success);
  background: rgba(34,197,94,0.12);
  border: 1px solid rgba(34,197,94,0.3);
  animation: pillPop .3s ease;
}

.stems-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
}

.stem-row {
  display: flex;
  align-items: center;
  gap: 13px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 13px 14px;
  flex-wrap: wrap;
  transition: border-color .15s ease;
  animation: stemIn .35s ease backwards;
  animation-delay: calc(var(--i, 0) * 70ms);
}

.stem-row:hover { border-color: var(--text-faint); }

.stem-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--stem-color) 16%, transparent);
  color: var(--stem-color);
}

.stem-name {
  font-weight: 600;
  font-size: 0.88rem;
  width: 78px;
  flex-shrink: 0;
}

.stem-download {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.83rem;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.stem-download:hover { color: var(--text); border-color: var(--text-faint); }

/* Waveform player */

.wf-player {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 180px;
}

.wf-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--stem-color, var(--accent));
  color: var(--surface);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform .1s ease, opacity .15s ease;
}
.wf-play:hover { opacity: 0.88; }
.wf-play:active { transform: scale(0.93); }

.wf-canvas {
  flex: 1;
  min-width: 90px;
  height: 34px;
  cursor: pointer;
  display: block;
}

.wf-time {
  font-size: 0.76rem;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Skeleton loading state */

.skeleton-bar {
  flex: 1;
  min-width: 90px;
  height: 34px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--surface) 25%, var(--border) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}

.stem-row.skeleton-row .stem-icon,
.stem-row.skeleton-row .stem-name {
  opacity: 0.55;
}

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

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

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

@keyframes pillPop {
  0% { transform: scale(0.85); }
  60% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* ---------- Features ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: transform .18s ease, border-color .18s ease;
}

.feature:hover {
  transform: translateY(-2px);
  border-color: var(--text-faint);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
}

.feature h3 { margin: 14px 0 6px; font-size: 0.94rem; font-weight: 600; }
.feature p { margin: 0; color: var(--text-dim); font-size: 0.85rem; line-height: 1.55; }

/* ---------- Account page ---------- */

.account-layout {
  max-width: 860px;
  margin: 0 auto;
  padding: 28px 20px 64px;
  display: grid;
  grid-template-columns: 280px 1fr;
  align-items: start;
  gap: 20px;
}

/* Sidebar */

.account-side {
  position: sticky;
  top: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.side-identity {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.side-identity-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.side-name {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.side-email {
  font-size: 0.78rem;
  color: var(--text-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-sep {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

/* Balance block */

.balance-label {
  display: block;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.balance-value {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 8px 0 12px;
}

.balance-number {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--accent);
}

.balance-of {
  font-size: 0.82rem;
  color: var(--text-faint);
}

.balance-track {
  height: 6px;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  overflow: hidden;
}

.balance-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  transition: width .4s ease;
}

.balance-note {
  margin: 8px 0 0;
  font-size: 0.76rem;
  color: var(--text-faint);
  line-height: 1.45;
}

.balance-split { margin-top: 4px; }

.split-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.82rem;
}

.split-row-paid { margin-top: 18px; margin-bottom: 0; }

.split-name { display: flex; align-items: center; gap: 7px; color: var(--text-dim); }

.split-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.split-dot-free { background: var(--accent); }
.split-dot-paid { background: var(--success); }

.split-value { font-weight: 600; white-space: nowrap; }
.split-of { font-weight: 400; color: var(--text-faint); font-size: 0.78rem; }

.balance-cta {
  margin-top: 16px;
  padding: 11px;
  font-size: 0.88rem;
}

.balance-cta-alt {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 10px;
  font-size: 0.85rem;
  text-align: center;
  text-decoration: none;
}

/* Right column holds the history and purchases cards */
.account-content-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.history-icon-buy {
  background: rgba(34,197,94,0.12);
  color: var(--success);
}

.no-tokens-btn {
  width: auto;
  display: inline-block;
  margin-top: 12px;
  padding: 9px 18px;
  font-size: 0.85rem;
  text-decoration: none;
}

/* Secondary facts */

.side-facts {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.side-fact {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.side-fact dt {
  font-size: 0.81rem;
  color: var(--text-dim);
}

.side-fact dd {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Main content column */

.account-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.content-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.content-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.content-sub {
  margin: 4px 0 0;
  font-size: 0.84rem;
  color: var(--text-dim);
}

.account-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  flex-shrink: 0;
}

.history-count {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 2px 9px;
  border-radius: 999px;
}

.history-empty-state {
  text-align: center;
  padding: 26px 0 8px;
}

.history-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-faint);
  margin-bottom: 14px;
}

.history-empty-state p {
  margin: 0 0 16px;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  transition: border-color .15s ease;
}
.history-row:hover { border-color: var(--text-faint); }

.history-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  flex-shrink: 0;
  background: var(--accent-soft);
  color: var(--accent);
}

.history-row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.history-filename {
  font-weight: 600;
  font-size: 0.88rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 260px;
}
.history-date { font-size: 0.76rem; color: var(--text-faint); }

.history-stamps {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 3px;
  font-size: 0.74rem;
  color: var(--text-faint);
}

.history-row-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.history-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 999px;
}

.history-tokens {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--error);
}

.history-expired {
  font-size: 0.74rem;
  color: var(--text-faint);
  border: 1px dashed var(--border);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.unverified-row .history-row-meta { gap: 10px; flex-wrap: wrap; }

.verify-link {
  width: 260px;
  max-width: 100%;
  padding: 7px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  cursor: pointer;
}
.verify-link:focus { outline: none; border-color: var(--accent); color: var(--text); }

/* Panel de almacenamiento */

.disk-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}

.disk-info { display: flex; flex-direction: column; gap: 2px; }
.disk-value { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.02em; }
.disk-label { font-size: 0.79rem; color: var(--text-dim); }

/* Must stay after .history-tokens: same specificity, later rule wins. */
.history-tokens-plus { color: var(--success); }

/* ---------- Pricing ---------- */

/* Los 4 planes entran en una fila; por eso esta página va un poco más ancha
   que el resto del sitio. */
.container-pricing { max-width: 920px; }

/* `stretch` (en vez de `start`) iguala la altura de las tarjetas aunque una
   tenga más viñetas; como .plan es flex y .plan-points crece, los botones
   quedan alineados abajo. */
.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  align-items: stretch;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  transition: border-color .18s ease, transform .18s ease;
}
.plan:hover { border-color: var(--text-faint); transform: translateY(-2px); }

.plan-popular {
  border-color: rgba(6,182,212,0.45);
  box-shadow: 0 0 0 1px rgba(6,182,212,0.14), 0 20px 44px -28px rgba(6,182,212,0.6);
}
.plan-popular:hover { border-color: var(--accent); }

.plan-flag {
  position: absolute;
  top: -10px;
  left: 22px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  padding: 3px 10px;
  border-radius: 999px;
}

.plan-name {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.plan-tagline {
  margin: 3px 0 0;
  font-size: 0.8rem;
  color: var(--text-faint);
}

.plan-price { margin: 18px 0 16px; }

.plan-amount {
  display: block;
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.plan-unit {
  display: block;
  margin-top: 5px;
  font-size: 0.76rem;
  color: var(--text-faint);
}

.plan-tokens {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid rgba(6,182,212,0.28);
  color: var(--accent);
  font-size: 0.85rem;
}
.plan-tokens strong { font-size: 0.95rem; }

.plan-points {
  list-style: none;
  margin: 18px 0 22px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
}

.plan-points li {
  position: relative;
  padding-left: 20px;
  font-size: 0.83rem;
  color: var(--text-dim);
}

.plan-points li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.plan-btn { width: 100%; margin-top: 0; padding: 12px; display: block; text-align: center; text-decoration: none; }

/* Plan Free */

.plan-free { border-style: dashed; }

.plan-tokens-free {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text-dim);
}
.plan-tokens-free strong { color: var(--text); }

.plan-btn-current {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-faint);
  font-size: 0.88rem;
  font-weight: 500;
}

/* FAQ */

.faq-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 26px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}
.faq-item h3 { margin: 0 0 6px; font-size: 0.9rem; font-weight: 600; }
.faq-item p { margin: 0; font-size: 0.84rem; color: var(--text-dim); line-height: 1.55; }

/* ---------- Comunidad ---------- */

/* La comunidad es una lista, no una rejilla: cada publicación ocupa una fila
   completa, así la vista previa tiene ancho de sobra para la onda y el título
   no se parte en tarjetas estrechas. */
.community-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.post-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  transition: border-color .18s ease;
}
.post-row:hover { border-color: var(--text-faint); }

.post-main {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.post-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-faint);
}
.post-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* min-width:0 es imprescindible: sin él un título largo sin espacios impide
   que esta columna encoja y empuja el botón fuera de la fila. */
.post-info { flex: 1; min-width: 0; }

.post-side {
  display: flex;
  align-items: stretch;
  gap: 8px;
  width: 210px;
  flex-shrink: 0;
}

.post-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.post-artist { font-size: 0.82rem; color: var(--text-dim); }

.post-notes {
  margin: 8px 0 0;
  font-size: 0.83rem;
  color: var(--text-dim);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.post-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }

.preview-block {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 12px;
  margin-top: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.preview-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 2px;
}

.preview-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.preview-row .wf-play { width: 26px; height: 26px; }
.preview-row .wf-canvas { height: 26px; min-width: 50px; }
.preview-row .wf-time { font-size: 0.7rem; }

.preview-name {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-dim);
  width: 52px;
  flex-shrink: 0;
}

/* Deja claro por qué el clip suena peor que la descarga: sin esto, quien
   escucha una vista previa comprimida puede pensar que la separación es de
   mala calidad y no gastar el token. */
.preview-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 6px 0 0;
  padding-top: 9px;
  border-top: 1px solid var(--border);
  font-size: 0.74rem;
  line-height: 1.5;
  color: var(--text-faint);
}
.preview-note svg { flex-shrink: 0; margin-top: 2px; }

.post-meta {
  margin: 10px 0 0;
  font-size: 0.76rem;
  color: var(--text-faint);
}

.post-btn {
  flex: 1;
  margin-top: 0;
  padding: 11px;
  font-size: 0.87rem;
  text-align: center;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* El reporte es un icono de bandera junto a Descargar, no un enlace de texto:
   compite mucho menos con la acción principal. */
.post-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--text-faint);
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.post-flag:hover { color: var(--text); border-color: var(--text-faint); }

/* Modal de reporte */

.modal {
  width: min(430px, calc(100vw - 32px));
  margin: auto;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  animation: menuIn .16s ease;
}
.modal::backdrop { background: rgba(0,0,0,0.66); }

/* padding:0 en el diálogo y todo el relleno aquí: así un clic en el diálogo
   pero fuera del formulario es realmente un clic en el fondo, que es lo que
   el JS usa para cerrar. */
.modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
}

.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }

.modal-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  transition: color .15s ease, background .15s ease;
}
.modal-close:hover { color: var(--text); background: var(--surface-2); }

.modal-sub {
  margin: -8px 0 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--text-dim);
}
.modal-sub strong { color: var(--text); }

.modal-reasons {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0;
  padding: 0;
  border: none;
}
.modal-reasons .field-label { margin-bottom: 3px; }

.reason-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color .15s ease;
}
.reason-opt:hover { border-color: var(--text-faint); }

/* El radio nativo no se puede pintar de forma consistente entre navegadores:
   se oculta y el círculo lo dibuja .reason-mark, que sigue su estado. */
.reason-opt input { position: absolute; opacity: 0; pointer-events: none; }

.reason-mark {
  position: relative;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border: 1.5px solid var(--text-faint);
  border-radius: 50%;
  transition: border-color .15s ease;
}
.reason-opt input:checked + .reason-mark { border-color: var(--accent); }
.reason-opt input:checked + .reason-mark::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--accent);
}
.reason-opt:has(input:checked) { border-color: var(--accent); }
.reason-opt:has(input:focus-visible) { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }

.reason-text { font-size: 0.86rem; }

.modal-textarea {
  resize: vertical;
  min-height: 72px;
  font-family: inherit;
  line-height: 1.5;
}

.modal-actions { display: flex; gap: 10px; }
.modal-cancel, .modal-send { flex: 1; margin-top: 0; }

/* En pantallas estrechas la columna de acciones no cabe al lado: pasa debajo,
   a lo ancho, y la carátula se encoge para no comerse el título. */
@media (max-width: 680px) {
  .post-main { flex-wrap: wrap; }
  .post-cover { width: 56px; height: 56px; }
  .post-info { flex: 1 1 200px; }
  .post-side { width: 100%; }
  .preview-name { width: 46px; }
}

.community-note {
  margin: 6px 0 0;
  text-align: center;
  font-size: 0.79rem;
  color: var(--text-faint);
  line-height: 1.55;
}

.history-shared {
  font-size: 0.74rem;
  color: var(--success);
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.28);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.report-title {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}

.field-optional { color: var(--text-faint); font-weight: 400; }

.rights-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.5;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
}
.rights-check input { margin-top: 2px; flex-shrink: 0; accent-color: var(--accent); }

/* ---------- Checkout ---------- */

.checkout-main {
  max-width: 480px;
  margin: 0 auto;
  padding: 36px 20px 64px;
}

.checkout-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 28px;
}

.checkout-title {
  margin: 0 0 6px;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.checkout-sub {
  margin: 0 0 22px;
  font-size: 0.9rem;
  color: var(--text-dim);
}
.checkout-sub strong { color: var(--accent); }

/* Flex + gap instead of a margin on the button: the spacing then holds no
   matter what gets added above it inside the form. */
.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 4px;
}

.checkout-submit { width: 100%; margin-top: 0; }

.checkout-back {
  margin: 18px 0 0;
  text-align: center;
  font-size: 0.84rem;
}
.checkout-back a { color: var(--text-dim); text-decoration: none; }
.checkout-back a:hover { color: var(--text); text-decoration: underline; }

/* Success state */

.checkout-success { text-align: center; }

.success-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(34,197,94,0.12);
  border: 1px solid rgba(34,197,94,0.35);
  color: var(--success);
  margin-bottom: 18px;
  animation: pillPop .35s ease;
}

.balance-callout {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 16px;
  margin: 22px 0;
  background: var(--accent-soft);
  border: 1px solid rgba(6,182,212,0.3);
  border-radius: var(--radius-md);
}

.balance-callout-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.balance-callout-value {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--accent);
}

.receipt {
  margin: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.receipt > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.receipt dt { font-size: 0.82rem; color: var(--text-dim); }
.receipt dd { margin: 0; font-size: 0.84rem; font-weight: 600; white-space: nowrap; }

.checkout-actions { display: flex; flex-direction: column; gap: 10px; }
.checkout-btn { margin-top: 0; }
.checkout-btn-alt {
  display: block;
  text-align: center;
  text-decoration: none;
  padding: 12px;
  margin-top: 0;
}

/* ---------- Yape payment ---------- */

.pay-amount {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px;
  margin-bottom: 16px;
  background: var(--accent-soft);
  border: 1px solid rgba(6,182,212,0.3);
  border-radius: var(--radius-md);
  text-align: center;
}

.pay-amount-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.pay-amount-value {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.pay-amount-hint {
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.45;
}

.yape-box {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px;
  margin-bottom: 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.yape-qr {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-sm);
  background: white;
  flex-shrink: 0;
  object-fit: contain;
}

.yape-data { display: flex; flex-direction: column; gap: 3px; min-width: 0; }

.yape-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.yape-number {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.yape-holder { font-size: 0.84rem; color: var(--text-dim); }

.review-mark {
  background: rgba(245,158,11,0.12);
  border-color: rgba(245,158,11,0.35);
  color: var(--warning);
}

/* Status badges shared by account and admin */

.state-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.state-ok { color: var(--success); background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.3); }
.state-wait { color: var(--warning); background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.3); }
.state-bad { color: #fca5a5; background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); }

.history-icon-wait { background: rgba(245,158,11,0.12); color: var(--warning); }
.history-icon-bad { background: rgba(239,68,68,0.1); color: #fca5a5; }

/* ---------- Admin review panel ---------- */

.admin-main { gap: 18px; }

/* Separa el encabezado de la página del primer bloque: sin esto, dos pares
   de título+subtítulo quedaban pegados y se leían como repetidos. */
.admin-header {
  margin-bottom: 10px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-soft);
}

.admin-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.admin-sub {
  margin: 6px 0 0;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.flash-ok {
  padding: 12px 16px;
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.35);
  border-radius: var(--radius-md);
  color: var(--success);
  font-size: 0.86rem;
  animation: cardIn .25s ease;
}

.review-list { display: flex; flex-direction: column; gap: 14px; }

/* Van anidadas dentro de .account-content, por eso el fondo más claro: con
   el mismo tono que la tarjeta contenedora se perdía el límite entre ambas. */
.review-card {
  background: var(--surface-2);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}

.review-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.review-amount {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.review-pkg { font-size: 0.82rem; color: var(--text-dim); }

.review-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 7px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.review-facts {
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.review-facts > div { display: flex; gap: 10px; font-size: 0.82rem; }
.review-facts dt { color: var(--text-faint); min-width: 84px; }
.review-facts dd { margin: 0; color: var(--text-dim); min-width: 0; overflow-wrap: anywhere; }

.review-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.review-btn { width: auto; margin-top: 0; padding: 11px 18px; font-size: 0.86rem; }

.review-reject { display: flex; gap: 8px; flex: 1; min-width: 240px; }
.review-reason { flex: 1; padding: 10px 12px; font-size: 0.84rem; }
.review-btn-alt { margin-top: 0; white-space: nowrap; }

/* ---------- Auth pages (split layout) ---------- */

.auth-split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 100vh;
}

/* Left showcase panel */

.auth-showcase {
  position: relative;
  display: flex;
  align-items: center;
  padding: 48px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow: hidden;
}

.auth-showcase::before {
  content: '';
  position: absolute;
  top: -180px;
  left: -120px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(6,182,212,0.14), transparent 68%);
  pointer-events: none;
}

.auth-showcase-inner {
  position: relative;
  max-width: 420px;
  margin: 0 auto;
  width: 100%;
}

.auth-showcase-brand { margin-bottom: 40px; }

.auth-showcase-title {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.auth-showcase-sub {
  margin: 12px 0 30px;
  color: var(--text-dim);
  font-size: 0.94rem;
  line-height: 1.6;
}

.auth-showcase-mock {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.auth-points {
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.auth-points li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-dim);
  font-size: 0.87rem;
  line-height: 1.5;
}

.auth-point-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 2px;
  background: var(--accent-soft);
  border: 1px solid rgba(6,182,212,0.4);
  color: var(--accent);
}

/* Right form panel */

.auth-panel {
  display: flex;
  flex-direction: column;
  padding: 28px 40px 32px;
  background: var(--bg);
}

.auth-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.auth-panel-brand { display: none; }

.auth-panel-alt {
  margin-left: auto;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 500;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: color .15s ease, border-color .15s ease;
}
.auth-panel-alt:hover { color: var(--text); border-color: var(--text-faint); }

.auth-form-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  padding: 32px 0;
}

.auth-title {
  margin: 0 0 6px;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.auth-sub {
  margin: 0 0 26px;
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.5;
}

.auth-error {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 20px;
  padding: 12px 14px;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.35);
  border-radius: var(--radius-md);
  color: #fca5a5;
  font-size: 0.85rem;
  line-height: 1.45;
  animation: cardIn .25s ease;
}
.auth-error svg { flex-shrink: 0; margin-top: 1px; }

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field { display: flex; flex-direction: column; gap: 7px; }

.field-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-dim);
}

.field-control { position: relative; display: flex; align-items: center; }

.field-icon {
  position: absolute;
  left: 13px;
  display: flex;
  color: var(--text-faint);
  pointer-events: none;
  transition: color .15s ease;
}

.field-input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px 12px 40px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.field-input::placeholder { color: var(--text-faint); }

.field-input:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(6,182,212,0.14);
}

.field-control:focus-within .field-icon { color: var(--accent); }

.field-toggle {
  position: absolute;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  transition: color .15s ease, background .15s ease;
}
.field-toggle:hover { color: var(--text); background: var(--border-soft); }

.field-hint {
  margin: 0;
  font-size: 0.76rem;
  color: var(--text-faint);
}

.auth-submit { margin-top: 6px; padding: 13px; }

.auth-footer-link {
  margin: 22px 0 0;
  text-align: center;
  font-size: 0.86rem;
  color: var(--text-dim);
}
.auth-footer-link a { color: var(--accent); text-decoration: none; font-weight: 600; }
.auth-footer-link a:hover { text-decoration: underline; }

.auth-panel-foot {
  margin: 0;
  text-align: center;
  font-size: 0.76rem;
  color: var(--text-faint);
}

@media (max-width: 900px) {
  .auth-split { grid-template-columns: 1fr; min-height: 100dvh; }
  .auth-showcase { display: none; }
  .auth-panel-brand { display: flex; }
  .auth-panel { padding: 22px 20px 28px; }
}

/* ---------- Footer ---------- */

.footer {
  text-align: center;
  padding: 26px 20px 40px;
  color: var(--text-faint);
  font-size: 0.8rem;
  border-top: 1px solid var(--border-soft);
  max-width: 640px;
  margin: 0 auto;
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.6rem; }
  .stem-name { width: auto; }
  .card { padding: 22px; }
}

/* The account sidebar stacks above the history below this width */
@media (max-width: 820px) {
  .account-layout { grid-template-columns: 1fr; }
  .account-side { position: static; }
}

@media (max-width: 560px) {
  .topbar { gap: 8px; padding: 14px 16px; }
  .nav-links { display: none; }
  .nav-right { gap: 8px; }
  .nav-link { font-size: 0.8rem; }
  .token-pill { font-size: 0.76rem; padding: 5px 10px; }
  .nav-cta { font-size: 0.8rem; padding: 7px 14px; }
  .brand-name { font-size: 0.98rem; }

  .account-layout { padding: 20px 16px 48px; }
  .history-row-meta { width: 100%; justify-content: flex-start; padding-left: 42px; }
}

.disk-actions { display: flex; gap: 10px; flex-wrap: wrap; }
