/* ==========================================================================
   GetRizzPilot — Warm Confidence Design System v5
   Clean typography · Rose & charcoal · Sora + DM Sans
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens
   -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600;9..40,700;9..40,800&display=swap');

:root {
  /* Warm dark palette */
  --bg: #1a1716;
  --bg-soft: #221f1d;
  --surface: #282422;
  --surface-hover: #302c29;
  --elevated: #322e2b;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.10);
  --border-accent: rgba(232, 93, 117, 0.15);

  /* Text */
  --text: #f5f0ea;
  --text-soft: #c9c2ba;
  --text-dim: #9e968e;
  --text-inverse: #1a1716;

  /* Brand — warm rose palette */
  --rose: #e85d75;
  --rose-hover: #f06b83;
  --rose-deep: #c73b54;
  --rose-dark: #8a2b40;
  --rose-subtle: rgba(232, 93, 117, 0.10);
  --rose-glow: rgba(232, 93, 117, 0.20);
  --rose-border: rgba(232, 93, 117, 0.20);

  /* Accents */
  --gold: #d4a853;
  --gold-subtle: rgba(212, 168, 83, 0.10);
  --green: #4a9e6f;
  --green-subtle: rgba(74, 158, 111, 0.10);
  --red: #d1455b;
  --red-subtle: rgba(209, 69, 91, 0.10);

  /* Gradients */
  --grad-brand: linear-gradient(135deg, #e85d75, #d14860);
  --grad-warm: linear-gradient(135deg, #e85d75, #d4a853);
  --grad-subtle: linear-gradient(180deg, rgba(232,93,117,0.06), transparent);

  /* Typography */
  --font-display: 'Sora', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.25);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.3);
  --shadow-xl: 0 16px 40px rgba(0,0,0,0.35);
  --shadow-rose: 0 4px 16px var(--rose-glow);

  /* Transitions */
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --fast: 0.15s;
  --normal: 0.25s;
  --slow: 0.4s;

  /* Layout */
  --max-w: 1120px;
  --max-w-narrow: 720px;
  --nav-h: 64px;

  /* Backward-compat aliases for JS inline styles */
  --accent-primary: var(--rose);
  --accent-secondary: var(--rose-deep);
  --accent-success: var(--green);
  --accent-warning: var(--gold);
  --accent-danger: var(--red);
  --glass-bg: var(--surface);
  --glass-border: var(--border);
  --text-bright: var(--text);
  --grad-premium: var(--grad-brand);
  --radius-pill: var(--radius-full);
  --neon-pink-glow: var(--rose-glow);
  --neon-purple-glow: var(--rose-glow);
  --glow-pink: 0 0 16px var(--rose-glow);
  --glow-neon: 0 0 16px var(--rose-glow);
  --glass-shadow: var(--shadow-md);
}

/* Light mode — warm, muted, easy on the eyes */
[data-theme="light"] {
  --bg: #eae4db;
  --bg-soft: #e0d9cf;
  --surface: #d6cec3;
  --surface-hover: #cec5b9;
  --elevated: #c8bfb2;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  --border-accent: rgba(199, 59, 84, 0.18);

  --text: #2a221c;
  --text-soft: #5a5047;
  --text-dim: #8a8075;
  --text-inverse: #eae4db;

  --rose: #b83850;
  --rose-hover: #c9455f;
  --rose-deep: #9a2f43;
  --rose-dark: #702536;
  --rose-subtle: rgba(199, 59, 84, 0.08);
  --rose-glow: rgba(199, 59, 84, 0.12);
  --rose-border: rgba(199, 59, 84, 0.22);

  --gold: #af8646;
  --gold-subtle: rgba(175, 134, 70, 0.10);
  --green: #3a7d58;
  --green-subtle: rgba(58, 125, 88, 0.10);
  --red: #c73b54;
  --red-subtle: rgba(199, 59, 84, 0.10);

  --grad-brand: linear-gradient(135deg, #b83850, #9a2f43);
  --grad-warm: linear-gradient(135deg, #b83850, #af8646);
  --grad-subtle: linear-gradient(180deg, rgba(199,59,84,0.04), transparent);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.09);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.11);
  --shadow-xl: 0 16px 40px rgba(0,0,0,0.13);
  --shadow-rose: 0 4px 16px var(--rose-glow);
}

/* --------------------------------------------------------------------------
   2. Reset & Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 17px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-weight: 500;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.35s ease, color 0.35s ease;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

::selection {
  background: var(--rose);
  color: var(--text-inverse);
}

:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 2px;
  border-radius: 2px;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* --------------------------------------------------------------------------
   3. Animations
   -------------------------------------------------------------------------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUpSm {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
@keyframes countIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes skeletonPulse {
  0% { opacity: 0.6; }
  50% { opacity: 0.3; }
  100% { opacity: 0.6; }
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(100%) translateY(-10px); }
  to { opacity: 1; transform: translateX(0) translateY(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0) translateY(0); }
  to { opacity: 0; transform: translateX(100%) translateY(-10px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.anim-fade-up { animation: fadeUp 0.6s var(--ease) backwards; }
.anim-fade-down { animation: fadeDown 0.4s var(--ease) backwards; }
.anim-scale-in { animation: scaleIn 0.4s var(--spring) backwards; }
.anim-slide-up { animation: slideUp 0.7s var(--ease) backwards; }

.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.10s; }
.stagger-3 { animation-delay: 0.18s; }
.stagger-4 { animation-delay: 0.26s; }
.stagger-5 { animation-delay: 0.34s; }
.stagger-6 { animation-delay: 0.42s; }
.stagger-7 { animation-delay: 0.50s; }
.stagger-8 { animation-delay: 0.58s; }

/* --------------------------------------------------------------------------
   4. Typography Utilities
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  line-height: 1.2;
  font-weight: 700;
}

.heading-xl {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.heading-lg {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  letter-spacing: -0.01em;
}
.heading-md {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}
.heading-sm {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.text-gradient {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-gradient-warm {
  background: var(--grad-warm);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-italic-accent {
  font-weight: 600;
  color: var(--rose);
}

/* --------------------------------------------------------------------------
   5. Layout
   -------------------------------------------------------------------------- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow {
  max-width: var(--max-w-narrow);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 48px;
}
.section-header h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  margin: 0 0 12px;
}
.section-header p {
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.6;
}

.page-section {
  padding: 40px 24px 80px;
  max-width: var(--max-w);
  margin: 0 auto;
}
.page-section-narrow {
  padding: 40px 24px 80px;
  max-width: var(--max-w-narrow);
  margin: 0 auto;
}

.page-heading {
  margin-bottom: 40px;
  text-align: center;
}
.page-heading h1 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin: 0 0 6px;
}
.page-heading p {
  color: var(--text-soft);
  font-size: 0.95rem;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* --------------------------------------------------------------------------
   6. Surface System
   -------------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--normal) var(--ease),
              box-shadow var(--normal) var(--ease),
              transform var(--normal) var(--ease);
}
.card:hover { border-color: var(--border-strong); }

.card-elevated {
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.card-soft {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.card-rose {
  background: var(--rose-subtle);
  border: 1px solid var(--rose-border);
  border-radius: var(--radius-lg);
}

.card-ghost {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: transparent;
}

/* Backward-compat for JS-generated HTML */
.bento-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card-inset {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

/* Backward-compat: glass was used in old JS templates */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.best-reply-label { font-size: 0.6875rem; font-weight: 700; color: var(--rose); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.best-reply-text { font-size: 0.8125rem; font-style: italic; line-height: 1.6; margin: 0; }

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

/* --------------------------------------------------------------------------
   7. Button System
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--fast) var(--ease);
  white-space: nowrap;
  line-height: 1.4;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }

.btn-primary {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: 0 2px 8px var(--rose-glow);
}
.btn-primary:hover {
  box-shadow: 0 4px 16px var(--rose-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-secondary:hover {
  border-color: var(--rose);
  color: var(--rose);
  background: var(--rose-subtle);
}

.btn-ghost {
  background: transparent;
  color: var(--text-soft);
  border: 1px solid transparent;
}
.btn-ghost:hover {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-outline {
  background: transparent;
  color: var(--rose);
  border: 1.5px solid var(--rose);
}
.btn-outline:hover {
  background: var(--rose-subtle);
  box-shadow: 0 2px 8px var(--rose-glow);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--red);
  color: #fff;
}
.btn-danger:hover {
  background: var(--rose-deep);
  transform: translateY(-1px);
}

.btn-sm { padding: 6px 14px; font-size: 0.8125rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 14px 32px; font-size: 1rem; }

.btn-icon {
  width: 36px; height: 36px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-soft);
  transition: all var(--fast) var(--ease);
}
.btn-icon:hover {
  border-color: var(--rose);
  color: var(--rose);
  background: var(--rose-subtle);
}

.btn-block { width: 100%; }

/* Backward-compat button classes for JS-generated HTML */
.btn-sota, .btn-neon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--fast) var(--ease);
  white-space: nowrap;
  line-height: 1.4;
}
.btn-sota-primary, .btn-neon {
  background: var(--grad-brand);
  color: #fff;
  border: none;
  box-shadow: 0 2px 8px var(--rose-glow);
}
.btn-sota-primary:hover, .btn-neon:hover {
  box-shadow: 0 4px 16px var(--rose-glow);
  transform: translateY(-1px);
}
.btn-sota-outline, .btn-neon-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-sota-outline:hover, .btn-neon-outline:hover {
  border-color: var(--rose);
  color: var(--rose);
  background: var(--rose-subtle);
}
.btn-sota-sm { padding: 6px 14px; font-size: 0.8125rem; border-radius: var(--radius-sm); }
.btn-sota-danger {
  background: var(--red);
  color: #fff;
  border: none;
}
.btn-sota-danger:hover {
  background: var(--rose-deep);
  transform: translateY(-1px);
}

.btn-loading {
  pointer-events: none;
  color: transparent !important;
  position: relative;
}
.btn-loading::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 18px; height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* --------------------------------------------------------------------------
   8. Form System
   -------------------------------------------------------------------------- */
.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

.form-input {
  width: 100%;
  padding: 11px 14px;
  height: 46px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--bg-soft);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.875rem;
  outline: none;
  transition: all var(--fast) var(--ease);
}
.form-input:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px var(--rose-subtle), 0 1px 4px rgba(0,0,0,0.1);
}
.form-input::placeholder { color: var(--text-dim); }
.form-input.input-error { border-color: var(--red); }
.form-input.input-error:focus {
  box-shadow: 0 0 0 3px var(--red-subtle);
}

textarea.form-input {
  height: auto;
  min-height: 100px;
  padding-top: 12px;
  resize: vertical;
}

select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a827a' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-error {
  font-size: 0.8125rem;
  color: var(--red);
  margin-top: 6px;
  display: none;
}
.form-error.visible { display: block; }

.form-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 4px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.toggle-row:last-child { border-bottom: none; }
.toggle-row-text { flex: 1; }
.toggle-row-text strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
}
.toggle-row-text span {
  font-size: 0.8125rem;
  color: var(--text-soft);
}

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--border-strong);
  border-radius: 12px;
  cursor: pointer;
  transition: background var(--fast);
}
.toggle-slider::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform var(--normal) var(--spring);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--grad-brand);
}
.toggle-switch input:checked + .toggle-slider::after { transform: translateX(20px); }

.pwd-strength {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}
.pwd-bar {
  height: 100%;
  border-radius: 2px;
  width: 0;
  transition: width 0.3s ease, background 0.3s ease;
}
.pwd-bar.weak { width: 25%; background: var(--red); }
.pwd-bar.fair { width: 50%; background: var(--gold); }
.pwd-bar.good { width: 75%; background: #5b8def; }
.pwd-bar.strong { width: 100%; background: var(--green); }

/* --------------------------------------------------------------------------
   9. Navigation
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--surface);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--border-strong);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  transition: transform 0.35s var(--ease);
}

[data-theme="light"] .nav {
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}

.nav-inner { display: flex; align-items: center; gap: 28px; }

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.nav-brand-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--grad-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  box-shadow: 0 2px 8px var(--rose-glow);
}

.nav-links { display: flex; align-items: center; gap: 2px; }

.nav-link {
  position: relative;
  padding: 8px 14px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-soft);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--rose);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width 0.25s var(--spring);
}
.nav-link:hover {
  color: var(--text);
}
.nav-link:hover::after {
  width: 60%;
}
.nav-link.active {
  color: var(--rose);
  font-weight: 600;
}
.nav-link.active::after {
  width: 60%;
}

.nav-controls { display: flex; align-items: center; gap: 10px; }

.nav-auth-btn {
  padding: 6px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--fast) var(--ease);
}
.nav-auth-btn-primary {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: 0 2px 6px var(--rose-glow);
}
.nav-auth-btn-primary:hover {
  box-shadow: 0 3px 12px var(--rose-glow);
  transform: translateY(-1px);
}
.nav-auth-btn-secondary {
  color: var(--text-soft);
}
.nav-auth-btn-secondary:hover { color: var(--text); }

.user-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 10px 4px 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: all var(--fast) var(--ease);
}
.user-trigger:hover {
  border-color: var(--rose-border);
  box-shadow: 0 0 0 3px var(--rose-subtle);
}
.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}
.user-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 210px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 110;
  animation: scaleIn 0.2s var(--spring);
  transform-origin: top right;
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.8125rem;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  transition: all var(--fast) var(--ease);
}
.dropdown-item:hover { background: var(--rose-subtle); color: var(--rose); }
.dropdown-item svg { color: var(--text-dim); transition: color var(--fast); }
.dropdown-item:hover svg { color: var(--rose); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 8px; }
.dropdown-item-danger { color: var(--red) !important; }
.dropdown-item-danger:hover { background: var(--red-subtle) !important; color: var(--red) !important; }
.dropdown-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.dropdown-header-name { font-weight: 700; font-size: 0.875rem; }
.dropdown-header-credits { font-size: 0.6875rem; color: var(--rose); font-weight: 700; margin-top: 2px; }

.nav-bell {
  position: relative;
  display: flex;
  align-items: center;
}
.nav-bell-btn {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-soft);
  font-size: 1.1rem;
  transition: all var(--fast) var(--ease);
}
.nav-bell-btn:hover { color: var(--rose); background: var(--rose-subtle); }
.nav-bell-badge {
  position: absolute; top: 1px; right: 1px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px;
  background: var(--rose);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  border: 2px solid var(--bg);
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: -8px;
  width: 310px;
  max-height: 360px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 120;
  display: none;
}
.notif-dropdown.open { display: block; animation: scaleIn 0.2s var(--spring); }
.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 0.8125rem;
}
.notif-mark-all {
  background: none;
  border: none;
  color: var(--rose);
  font-size: 0.6875rem;
  font-weight: 700;
  cursor: pointer;
}
.notif-item {
  display: flex;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--fast);
}
.notif-item:hover { background: var(--rose-subtle); }
.notif-item.unread { border-left: 3px solid var(--rose); }
.notif-item.read { opacity: 0.55; }
.notif-msg { font-size: 0.8125rem; font-weight: 600; line-height: 1.4; }
.notif-time { font-size: 0.6875rem; color: var(--text-dim); margin-top: 2px; }
.notif-empty { text-align: center; padding: 40px 20px; color: var(--text-dim); font-size: 0.8125rem; }

.theme-btn {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all var(--fast) var(--ease);
}
.theme-btn:hover {
  border-color: var(--rose);
  color: var(--rose);
  background: var(--rose-subtle);
}
.theme-btn .icon-sun { display: none; }
.theme-btn .icon-moon { display: block; }
[data-theme="light"] .theme-btn .icon-sun { display: block; }
[data-theme="light"] .theme-btn .icon-moon { display: none; }

.credits-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: var(--gold-subtle);
  border: 1px solid var(--gold);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
}
.credits-badge.low {
  background: var(--red-subtle);
  border-color: rgba(209, 69, 91, 0.2);
  color: var(--red);
}
.credits-badge.low .credits-dot { background: var(--red); box-shadow: 0 0 4px var(--red); }
.credits-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

.ap-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: var(--green-subtle);
  border: 1px solid rgba(74, 158, 111, 0.15);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--green);
}
.ap-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 4px var(--green); animation: pulse 2s ease-in-out infinite; }

.nav-hamburger {
  display: none;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.nav-hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-soft);
  border-radius: 1px;
  transition: all var(--normal) var(--ease);
}
.nav-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(4px, -1px); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(4px, 1px); }

.nav-spacer { height: var(--nav-h); }

/* --------------------------------------------------------------------------
   10. Landing Page
   -------------------------------------------------------------------------- */

/* Hero — editorial split */
.hero {
  position: relative;
  padding: 80px 24px;
  overflow: hidden;
}
.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
}

.hero-content { max-width: 520px; }
@media (max-width: 860px) {
  .hero-content { max-width: 100%; text-align: center; }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  background: var(--rose-subtle);
  border: 1px solid var(--rose-border);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--rose);
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.hero-title em {
  color: var(--rose);
  font-weight: 800;
}

.hero-sub {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  color: var(--text-soft);
  line-height: 1.7;
  margin: 0 0 32px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
@media (max-width: 860px) {
  .hero-actions { justify-content: center; }
}

/* Hero visual — device frame */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.device-frame {
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.device-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.device-dot { width: 10px; height: 10px; border-radius: 50%; }
.device-dot:nth-child(1) { background: var(--red); }
.device-dot:nth-child(2) { background: var(--gold); }
.device-dot:nth-child(3) { background: var(--green); }
.device-dot-space { flex: 1; }

.device-screen { padding: 20px; display: flex; flex-direction: column; gap: 14px; }

.device-convo { display: flex; flex-direction: column; gap: 10px; }
.device-msg {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  line-height: 1.5;
}
.device-msg.incoming {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.device-msg.outgoing {
  background: var(--rose-subtle);
  border: 1px solid var(--rose-border);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.device-reply-card {
  margin-top: 4px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.device-reply-tag {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--rose);
  margin-bottom: 4px;
}
.device-reply-text {
  font-size: 0.8125rem;
  font-style: italic;
  color: var(--text-soft);
}

.device-score {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--grad-subtle);
  border: 1px solid var(--rose-border);
  border-radius: var(--radius-md);
}
.device-score-num {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--rose);
  line-height: 1;
}
.device-score-label {
  font-size: 0.6875rem;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.device-score-vibe {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--green);
}

/* Trust bar */
.trust-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 24px;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-soft);
}

/* Feature cards */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  padding: 28px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all var(--normal) var(--ease);
}
.feature-card:hover {
  border-color: var(--rose-border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  transform: translateY(-2px);
}
[data-theme="light"] .feature-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--rose-subtle);
  font-size: 1.25rem;
  margin-bottom: 16px;
}
.feature-card h3 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 6px;
}
.feature-card p {
  font-size: 0.875rem;
  color: var(--text-soft);
  line-height: 1.6;
  margin: 0;
}

/* How it works */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 800px;
  margin: 0 auto;
}
@media (max-width: 768px) { .steps-grid { grid-template-columns: 1fr; gap: 24px; } }

.step-card { text-align: center; padding: 36px 24px; }
.step-number {
  width: 44px;
  height: 44px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--rose-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--rose);
}
.step-card h3 {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 8px;
}
.step-card p {
  font-size: 0.875rem;
  color: var(--text-soft);
  line-height: 1.6;
  margin: 0;
}

/* CTA section */
.cta {
  text-align: center;
  padding: 80px 24px;
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: '';
  position: absolute;
  inset: -40px;
  background: var(--grad-brand);
  opacity: 0.03;
  filter: blur(60px);
}
.cta-inner {
  max-width: 500px;
  margin: 0 auto;
  position: relative;
}
.cta-card { max-width: 500px; margin: 0 auto; position: relative; }
.cta-inner h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin: 0 0 12px;
}
.cta-inner p {
  color: var(--text-soft);
  margin: 0 0 28px;
  font-size: 1rem;
}

/* Footer */
.footer {
  padding: 48px 24px 32px;
  border-top: 1px solid var(--border);
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 40px;
  padding-bottom: 32px;
}
.footer-brand { max-width: 260px; }
.footer-tagline {
  font-size: 0.8125rem;
  color: var(--text-dim);
  line-height: 1.6;
  margin: 6px 0 0;
}

.footer-links { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-soft);
  margin: 0 0 14px;
}
.footer-col a {
  display: block;
  color: var(--text-dim);
  font-size: 0.8125rem;
  margin-bottom: 8px;
  transition: color var(--fast);
}
.footer-col a:hover { color: var(--rose); }

.footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Age gate */
.age-gate {
  position: fixed; inset: 0; z-index: 99999;
  background: rgba(26, 23, 22, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}
.age-gate-modal {
  background: var(--elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-2xl);
  padding: 48px 40px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow-xl), 0 0 40px var(--rose-glow);
}
.age-gate-modal .brand-mark {
  width: 48px; height: 48px;
  margin: 0 auto 20px;
  border-radius: var(--radius-md);
  background: var(--grad-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px var(--rose-glow);
}
.age-gate-modal h2 { font-size: 1.5rem; margin: 0 0 10px; }
.age-gate-modal p { color: var(--text-soft); font-size: 0.875rem; line-height: 1.6; margin: 0 0 28px; }
.age-gate-actions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.age-gate-note { font-size: 0.75rem !important; color: var(--text-dim) !important; margin: 0 !important; }

.age-banner {
  background: var(--rose-subtle);
  border-bottom: 1px solid var(--rose-border);
  padding: 8px 24px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-soft);
}
.age-banner strong { color: var(--rose); }

/* --------------------------------------------------------------------------
   11. Auth Pages
   -------------------------------------------------------------------------- */
.auth-page {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 40px 32px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-2xl);
}
.auth-card h1 {
  font-size: 1.5rem;
  margin: 0 0 4px;
  text-align: center;
}
.auth-subtitle {
  font-size: 0.875rem;
  color: var(--text-soft);
  text-align: center;
  margin: 0 0 28px;
}
.auth-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  background: var(--rose-subtle);
  border: 1px solid var(--rose-border);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--rose);
  margin-bottom: 14px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px 0;
  color: var(--text-dim);
  font-size: 0.75rem;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.btn-social {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  height: 48px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--bg-soft);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--fast) var(--ease);
}
.btn-social:hover {
  border-color: var(--rose);
  background: var(--rose-subtle);
  transform: translateY(-1px);
}
.btn-google:hover { border-color: #4285F4; box-shadow: 0 0 0 3px rgba(66,133,244,0.1); }

.forgot-link {
  display: block;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 4px;
  cursor: pointer;
}
.forgot-link:hover { color: var(--rose); }

.forgot-view {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.forgot-title { font-size: 0.9375rem; font-weight: 600; margin-bottom: 4px; }
.forgot-desc { font-size: 0.8125rem; color: var(--text-soft); margin-bottom: 16px; }

.auth-terms {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 20px;
  line-height: 1.6;
}
.auth-terms a { font-weight: 600; color: var(--rose); }
.auth-terms a:hover { text-decoration: underline; }

.signup-layout {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 48px;
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 24px;
}

.signup-form-card { width: 400px; flex-shrink: 0; }

.signup-benefits { flex: 1; max-width: 320px; padding-top: 16px; }
.signup-benefits h2 { font-size: 1.25rem; margin-bottom: 24px; }

.benefit-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.benefit-item:last-child { border-bottom: none; }
.benefit-icon { font-size: 1.25rem; flex-shrink: 0; width: 32px; text-align: center; }
.benefit-text strong { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 2px; }
.benefit-text p { font-size: 0.8125rem; color: var(--text-soft); line-height: 1.4; }

/* --------------------------------------------------------------------------
   12. App Page — Core Tool
   -------------------------------------------------------------------------- */
.app-main { padding: 40px 24px 80px; display: flex; flex-direction: column; align-items: center; }
.app-header { margin-bottom: 40px; width: 100%; max-width: 620px; text-align: center; }
.app-header h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 6px;
}
.app-header p {
  color: var(--text-soft);
  font-size: 0.9375rem;
}
.app-section { width: 100%; max-width: 620px; }

.verify-banner {
  padding: 10px 20px;
  text-align: center;
  font-size: 0.8125rem;
  background: var(--gold-subtle);
  border-bottom: 1px solid rgba(212, 168, 83, 0.2);
  color: var(--gold);
}
.verify-banner a { color: var(--rose); font-weight: 600; cursor: pointer; }

.upload-zone {
  padding: 52px 24px;
  text-align: center;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-2xl);
  cursor: pointer;
  transition: all var(--normal) var(--ease);
  background: var(--bg-soft);
  position: relative;
}
.upload-zone:hover {
  border-color: var(--rose);
  background: var(--rose-subtle);
}
.upload-zone.drag-over {
  border-color: var(--rose);
  border-style: solid;
  background: var(--rose-subtle);
  box-shadow: 0 0 0 4px var(--rose-glow);
  transform: scale(1.005);
}
.upload-zone.has-files {
  border-style: solid;
  border-color: var(--border);
  padding: 24px;
}
.upload-icon { font-size: 2.25rem; margin-bottom: 16px; opacity: 0.5; }
.upload-zone h3 { font-family: var(--font-body); font-size: 1.1rem; font-weight: 700; margin: 0 0 6px; }
.upload-zone p { font-size: 0.8125rem; color: var(--text-soft); margin: 0; }
.upload-hint { font-size: 0.6875rem; color: var(--text-dim); margin-top: 12px; display: inline-block; }

.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.preview-item {
  position: relative;
  height: 120px;
  overflow: hidden;
  border-radius: var(--radius-md);
}
.preview-item img { width: 100%; height: 100%; object-fit: cover; }
.preview-remove {
  position: absolute;
  top: 6px; right: 6px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  border: none;
  color: #fff;
  font-size: 0.8125rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--fast);
}
.preview-item:hover .preview-remove { opacity: 1; }

.btn-generate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 20px;
  padding: 14px 28px;
  border-radius: var(--radius-lg);
  border: none;
  background: var(--grad-brand);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px var(--rose-glow);
  transition: all var(--normal) var(--spring);
}
.btn-generate:hover {
  box-shadow: 0 6px 20px var(--rose-glow), 0 0 0 3px var(--rose-subtle);
  transform: translateY(-1px);
}
.btn-generate:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; transform: none; }

.credit-notice {
  margin-top: 12px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-dim);
}
.credit-notice a { color: var(--rose); font-weight: 600; }

.context-section { margin-top: 24px; }
.context-section .panel { padding: 20px; }
.context-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.context-header h3 { font-family: var(--font-body); font-size: 0.9375rem; font-weight: 700; margin: 0; }
.context-count { font-size: 0.75rem; color: var(--text-dim); }
.context-desc { font-size: 0.75rem; color: var(--text-dim); margin: 0 0 14px; }
.context-list { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; }

.char-counter { margin-bottom: 12px; display: none; }
.char-bar { height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; }
.char-fill { height: 100%; border-radius: 2px; transition: width 0.3s, background 0.3s; }

.ctx-card {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-soft);
  cursor: pointer;
  transition: all var(--fast) var(--ease);
}
.ctx-card:hover { border-color: var(--rose-border); }
.ctx-card.selected { border-color: var(--rose); background: var(--rose-subtle); }
.ctx-card-inner { display: flex; align-items: center; gap: 10px; }
.ctx-checkbox { display: flex; align-items: center; gap: 6px; cursor: pointer; flex-shrink: 0; }
.ctx-checkbox input { width: 16px; height: 16px; accent-color: var(--rose); cursor: pointer; }
.ctx-check-label { font-size: 0.625rem; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.3px; }
.ctx-checkbox input:checked + .ctx-check-label { color: var(--rose); }
.ctx-turn { font-size: 0.6875rem; font-weight: 700; color: var(--rose); min-width: 24px; text-align: center; }
.ctx-vibe { font-size: 0.875rem; }
.ctx-info { flex: 1; min-width: 0; }
.ctx-score { font-size: 0.75rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctx-snippet { font-size: 0.6875rem; color: var(--text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctx-meta { font-size: 0.625rem; color: var(--text-dim); margin-top: 2px; }
.ctx-delete, .ctx-delete-btn { background: none; border: none; color: var(--text-soft); cursor: pointer; font-size: 1rem; padding: 4px; }
.ctx-delete:hover, .ctx-delete-btn:hover { color: var(--red); }

/* Results section */
.results-section {
  max-width: 800px;
  margin: 0 auto;
  padding-top: 48px;
}

.score-card {
  padding: 28px;
  margin-bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
}
.score-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.score-ring {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}
.score-ring svg { transform: rotate(-90deg); }
.score-ring-bg { fill: none; stroke: var(--border); stroke-width: 3; }
.score-ring-fill {
  fill: none;
  stroke: var(--rose);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 94.2;
  transition: stroke-dashoffset 1.5s var(--spring), stroke 0.3s;
  filter: drop-shadow(0 0 4px var(--rose-glow));
}
.score-ring-fill.high { stroke: var(--green); filter: drop-shadow(0 0 4px rgba(74,158,111,0.3)); }
.score-ring-fill.mid { stroke: var(--gold); filter: drop-shadow(0 0 4px rgba(212,168,83,0.3)); }
.score-ring-fill.low { stroke: var(--red); filter: none; }

.score-value {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.score-number { font-family: var(--font-display); font-size: 2.25rem; font-weight: 800; line-height: 1; }
.score-label { font-size: 0.625rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; margin-top: 2px; }

.score-info { flex: 1; min-width: 200px; }
.score-vibe { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; margin: 0 0 6px; }
.score-detail { color: var(--text-soft); font-size: 0.8125rem; line-height: 1.6; margin: 0; }

.red-flags { margin-bottom: 16px; }
.red-flags-header { font-size: 1rem; font-weight: 700; margin: 0 0 14px; }
.flag-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 16px;
  background: var(--red-subtle);
  border-radius: var(--radius-md);
  border: 1px solid rgba(209, 69, 91, 0.12);
  margin-bottom: 6px;
}
.flag-text { font-size: 0.8125rem; color: var(--red); font-weight: 600; }
.flag-clear { text-align: center; padding: 16px; color: var(--text-soft); font-size: 0.8125rem; }
.flag-clear-icon { font-size: 1.5rem; display: block; margin-bottom: 6px; }

.reply-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 16px;
}
@media (max-width: 700px) { .reply-grid { grid-template-columns: 1fr; } }

.reply-card {
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  position: relative;
  overflow: hidden;
  transition: all var(--normal) var(--ease);
}
.reply-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.reply-card.smooth::before { background: var(--green); }
.reply-card.funny::before { background: #5b8def; }
.reply-card.bold::before { background: var(--rose); }
.reply-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.reply-card.smooth:hover { border-color: var(--green); }
.reply-card.funny:hover { border-color: #5b8def; }
.reply-card.bold:hover { border-color: var(--rose); }

.reply-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.reply-badge.smooth { background: var(--green-subtle); color: var(--green); }
.reply-badge.funny { background: rgba(91,141,239,0.1); color: #5b8def; }
.reply-badge.bold { background: var(--rose-subtle); color: var(--rose); }

.reply-text { font-size: 0.875rem; line-height: 1.6; margin: 0 0 14px; }
.reply-actions { display: flex; gap: 6px; }

/* Turn detail modal */
.turn-detail-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(26, 23, 22, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.turn-detail-modal {
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  animation: scaleIn 0.3s var(--spring);
}
.td-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.td-title { font-family: var(--font-body); font-size: 1rem; font-weight: 700; }
.td-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--rose-subtle);
  color: var(--rose);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--fast);
}
.td-close:hover { background: var(--rose); color: #fff; }
.td-body { padding: 24px; }
.td-score-row { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.td-score-badge {
  text-align: center;
  padding: 12px 20px;
  background: var(--rose-subtle);
  border: 1px solid var(--rose-border);
  border-radius: var(--radius-md);
}
.td-score-num { display: block; font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; color: var(--rose); }
.td-score-lbl { font-size: 0.625rem; color: var(--text-soft); text-transform: uppercase; }
.td-vibe-badge { padding: 8px 16px; border-radius: var(--radius-full); font-size: 0.875rem; font-weight: 700; }
.td-section { margin-bottom: 20px; }
.td-heading { font-family: var(--font-body); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-dim); margin-bottom: 10px; }
.td-convo { font-size: 0.8125rem; line-height: 1.7; color: var(--text-soft); white-space: pre-wrap; }
.td-detail-text { font-size: 0.875rem; color: var(--text-soft); line-height: 1.6; }
.td-replies { display: flex; flex-direction: column; gap: 10px; }
.td-reply { padding: 12px 16px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-md); }
.td-tag { font-size: 0.625rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.td-tag.smooth { color: var(--green); }
.td-tag.funny { color: #5b8def; }
.td-tag.bold { color: var(--rose); }
.td-reply p { font-size: 0.8125rem; margin: 4px 0 0; }
.td-meta { font-size: 0.75rem; color: var(--text-dim); }

.error-banner {
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: var(--red-subtle);
  border: 1px solid rgba(209,69,91,0.15);
  color: var(--red);
  font-size: 0.8125rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

/* --------------------------------------------------------------------------
   13. Modals
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(26, 23, 22, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-card {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 480px;
  padding: 32px;
  position: relative;
  animation: scaleIn 0.3s var(--spring);
}
.modal-title { font-size: 1.25rem; font-weight: 700; margin: 0 0 4px; }

/* --------------------------------------------------------------------------
   14. Dashboard
   -------------------------------------------------------------------------- */
.dash-header { margin-bottom: 32px; }
.dash-header h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 6px; }
.dash-header p { color: var(--text-soft); font-size: 0.9375rem; }

.tier-ribbon { margin-bottom: 32px; }
.tier-ribbon-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  flex-wrap: wrap;
}
.tier-label { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-dim); font-weight: 600; }
.tier-value { font-family: var(--font-display); font-size: 1.25rem; font-weight: 800; }
.tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.75rem;
}
.tier-free { background: var(--border); color: var(--text-dim); }
.tier-starter { background: rgba(91,141,239,0.1); color: #5b8def; border: 1px solid rgba(91,141,239,0.15); }
.tier-popular { background: var(--rose-subtle); color: var(--rose); border: 1px solid var(--rose-border); }
.tier-pro { background: var(--grad-brand); color: #fff; box-shadow: 0 2px 8px var(--rose-glow); }

.dash-actions { margin-bottom: 28px; display: flex; gap: 10px; flex-wrap: wrap; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.stat-card {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.stat-icon { font-size: 1.25rem; margin-bottom: 8px; }
.stat-value { font-size: 1.5rem; font-weight: 700; font-family: var(--font-display); }
.stat-label { font-size: 0.75rem; color: var(--text-soft); margin-top: 2px; }
.stat-sub { font-size: 0.6875rem; color: var(--rose); margin-top: 2px; }
.stat-card .stat-bar {
  position: absolute;
  top: 0; left: 12px; right: 12px;
  height: 2px;
  border-radius: 1px;
}
.stat-card.credits .stat-bar { background: var(--gold); }
.stat-card.streak .stat-bar { background: var(--rose); }
.stat-card.gens .stat-bar { background: #5b8def; }
.stat-card.tier .stat-bar { background: var(--green); }

.dash-grid { display: flex; flex-direction: column; gap: 32px; }

.report-card { padding: 24px; }
.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.report-header h3 { font-size: 1.1rem; margin: 0; }
.report-content { display: flex; align-items: center; gap: 28px; margin-bottom: 24px; flex-wrap: wrap; }
.report-score-ring { position: relative; width: 90px; height: 90px; flex-shrink: 0; }
.report-score-ring svg { transform: rotate(-90deg); }
.report-score-value { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.report-score-num { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; }

.vibe-bars { margin-bottom: 24px; }
.vibe-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 0.8125rem; }
.vibe-bar-bg { flex: 1; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.vibe-bar-fill { height: 100%; border-radius: 3px; transition: width 0.5s var(--ease); }
.vibe-bar-fill.win { background: var(--green); }
.vibe-bar-fill.neutral { background: var(--gold); }
.vibe-bar-fill.lose { background: var(--red); }

.trend-periods { display: flex; gap: 4px; }
.trend-btn {
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--fast);
}
.trend-btn.active { background: var(--rose); color: #fff; }
.trend-btn:hover:not(.active) { color: var(--rose); }

.recent-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: opacity var(--fast);
}
.recent-item:last-child { border-bottom: none; }
.recent-item:hover { opacity: 0.8; }
.recent-thumb { width: 36px; height: 36px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; background: var(--bg-soft); }
.recent-info { flex: 1; min-width: 0; }
.recent-date { display: block; font-size: 0.6875rem; color: var(--text-dim); }
.recent-reply { display: block; font-size: 0.8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-score { font-size: 0.8125rem; font-weight: 600; flex-shrink: 0; }
.recent-score.win { color: var(--green); }
.recent-score.neutral { color: var(--gold); }
.recent-score.lose { color: var(--red); }
.recent-empty { text-align: center; padding: 32px; color: var(--text-soft); font-size: 0.8125rem; }

.report-stats { display: flex; gap: 20px; margin-bottom: 18px; flex-wrap: wrap; }
.report-stat-item { text-align: center; min-width: 60px; }
.report-stat-num { display: block; font-size: 1.25rem; font-weight: 700; }
.report-stat-label { font-size: 0.6875rem; color: var(--text-soft); }

.best-label { font-size: 0.6875rem; font-weight: 700; color: var(--rose); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.best-text { font-size: 0.8125rem; font-style: italic; line-height: 1.6; margin: 0; }
.best-share { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 6px 16px; border-radius: var(--radius-full); border: 1px solid var(--rose); background: transparent; color: var(--rose); font-size: 0.75rem; font-weight: 500; cursor: pointer; transition: all var(--fast); }
.best-share:hover { background: var(--rose-subtle); }

.persona-badge { display: inline-block; padding: 10px 20px; border-radius: var(--radius-lg); background: var(--bg-soft); border: 1px solid var(--border); }
.persona-title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 800; display: block; }
.persona-desc { font-size: 0.75rem; color: var(--text-soft); }

/* --------------------------------------------------------------------------
   15. History Page
   -------------------------------------------------------------------------- */
.history-page { padding: 40px 24px 80px; max-width: var(--max-w); margin: 0 auto; }

.gen-card {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 14px;
  cursor: pointer;
  transition: all var(--normal) var(--ease);
}
.gen-card:hover { border-color: var(--rose-border); box-shadow: 0 2px 12px var(--rose-glow); }
.gen-card.expanded { border-color: var(--rose); border-left: 3px solid var(--rose); }

.gen-card-top { display: flex; gap: 14px; flex-wrap: wrap; }
.gen-thumbs { display: flex; gap: 6px; flex-shrink: 0; }
.gen-thumb { width: 48px; height: 48px; border-radius: var(--radius-sm); object-fit: cover; background: var(--bg-soft); }
.gen-meta { flex: 1; min-width: 160px; }
.gen-date { font-size: 0.75rem; color: var(--text-dim); }
.gen-score { font-size: 0.8125rem; font-weight: 600; margin-top: 4px; }
.gen-score.win { color: var(--green); }
.gen-score.neutral { color: var(--gold); }
.gen-score.lose { color: var(--red); }

.gen-replies { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.gen-reply-item { padding: 12px 16px; border-radius: var(--radius-md); background: var(--bg-soft); border: 1px solid var(--border); }
.gen-reply-tag { display: inline-block; padding: 2px 8px; border-radius: var(--radius-full); font-size: 0.625rem; font-weight: 700; text-transform: uppercase; margin-bottom: 6px; }
.gen-reply-tag.smooth { background: var(--green-subtle); color: var(--green); }
.gen-reply-tag.funny { background: rgba(91,141,239,0.1); color: #5b8def; }
.gen-reply-tag.bold { background: var(--rose-subtle); color: var(--rose); }
.gen-reply-text { font-size: 0.8125rem; line-height: 1.5; margin: 0 0 8px; }
.gen-reply-actions { display: flex; gap: 6px; }

.btn-reuse { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: var(--radius-full); border: 1px solid var(--border); background: transparent; color: var(--text-dim); font-size: 0.6875rem; cursor: pointer; transition: all var(--fast); }
.btn-reuse:hover { border-color: var(--rose); color: var(--rose); }

.pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 28px; }
.page-info { font-size: 0.8125rem; color: var(--text-dim); }

.history-empty, .history-error, .history-loading { text-align: center; padding: 60px 24px; color: var(--text-soft); }

/* History card expand/collapse */
.hist-card { cursor: pointer; }
.hist-card .hist-detail { display: none; }
.hist-card.expanded .hist-detail { display: block; }
.hist-card.expanded .hist-expand-icon { transform: rotate(180deg) !important; }
.hist-card .hist-summary { cursor: pointer; }

/* Batch selection dimming when at plan limit */
.hist-card.hist-maxed { opacity: 0.5; transition: opacity 0.2s ease; }
.hist-card.hist-maxed:hover { opacity: 0.7; }
.hist-checkbox-label { user-select: none; }

/* Custom checkbox: grey border, green fill when checked */
.hist-checkbox {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #555;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.hist-checkbox:hover {
  border-color: #888;
}
.hist-checkbox:checked {
  border-color: #10b981;
  background: #10b981;
}
.hist-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.hist-checkbox:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   16. Profile, Settings, Billing
   -------------------------------------------------------------------------- */
.profile-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid var(--rose); box-shadow: 0 0 0 3px var(--rose-subtle); }
.credit-count-large { font-family: var(--font-display); font-size: 2.5rem; font-weight: 800; line-height: 1; }
.danger-zone { border-color: var(--red) !important; background: var(--red-subtle) !important; }
.danger-zone h2 { color: var(--red) !important; }

.billing-credit-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 24px; margin-bottom: 24px; }

.pack-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 28px; }
.pack-card { padding: 24px; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); transition: all var(--normal) var(--ease); }
.pack-card:hover { border-color: var(--rose-border); transform: translateY(-2px); box-shadow: 0 4px 16px var(--rose-glow); }
.pack-credits { font-family: var(--font-display); font-size: 1.75rem; font-weight: 800; }
.pack-label { font-size: 0.8125rem; color: var(--text-soft); margin: 4px 0 12px; }
.pack-price { font-size: 1.125rem; font-weight: 700; color: var(--rose); margin-bottom: 14px; }
.pack-recommended { border-color: var(--rose); box-shadow: 0 0 0 1px var(--rose-border); }

/* --------------------------------------------------------------------------
   Payment gateway modal
   -------------------------------------------------------------------------- */
.pricing-gateway-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; backdrop-filter: blur(4px);
}
.pricing-gateway-modal {
  background: var(--surface); padding: 2rem;
  border-radius: 20px; text-align: center;
  min-width: 360px; max-width: 400px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}
.pricing-gateway-modal h3 {
  font-family: var(--font-display); margin: 0 0 1.25rem;
  font-size: 1.25rem; color: var(--text-bright);
}
.pricing-gateway-buttons {
  display: flex; flex-direction: column; gap: 0.75rem;
  margin-bottom: 1rem;
}
.btn-sota.gateway-select-btn {
  width: 100%; padding: 0; border-radius: 14px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  border: 1.5px solid var(--glass-border); overflow: hidden;
  background: var(--glass-bg); color: var(--text-bright);
  transition: all 0.25s ease;
}
.btn-sota.gateway-select-btn:hover {
  border-color: var(--accent-primary);
  background: rgba(139,92,246,0.06);
  transform: translateY(-1px);
  box-shadow: 0 0 24px rgba(139,92,246,0.08);
}
.gw-btn-content {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; padding: 14px 20px;
}
.gw-btn-icons {
  display: flex; align-items: center; gap: 5px;
}
.gw-btn-label {
  font-size: 15px; font-weight: 700;
  font-family: var(--font-display);
}
.gw-btn-desc {
  font-size: 11px; font-weight: 500; opacity: 0.8;
}
.gateway-cancel-btn {
  width: 100%; padding: 10px; margin-top: 0.5rem;
  background: none; border: none; color: var(--text-dim);
  cursor: pointer; font-size: 13px; font-weight: 600;
}
.pm {
  display: inline-flex; align-items: center; justify-content: center;
  height: 20px; padding: 0 5px; border-radius: 3px;
  font-size: 8px; font-weight: 800; letter-spacing: 0.3px;
  font-family: -apple-system, 'Helvetica Neue', system-ui, sans-serif;
}
.pm-visa     { background: linear-gradient(135deg, #1A1F71, #2A2F81); color: #fff; }
.pm-mc       { background: linear-gradient(135deg, #EB001B 40%, #F79E1B 60%, #FFD500); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.3); }
.pm-amex     { background: linear-gradient(135deg, #2E77BC, #4B8FCC); color: #fff; }
.pm-paypal   { background: linear-gradient(135deg, #003087, #009CDE); color: #fff; }
.pm-applepay { background: #000; color: #fff; }
.pm-upi      { background: linear-gradient(135deg, #6C3CF5, #8B5CF6); color: #fff; }
.pm-netbanking { background: linear-gradient(135deg, #0D9488, #14B8A6); color: #fff; }
.pm-rupay    { background: linear-gradient(135deg, #059669, #10B981); color: #fff; }

.table-wrap { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); }
.table-sota { width: 100%; border-collapse: collapse; }
.table-sota th { text-align: left; padding: 10px 16px; font-size: 0.6875rem; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; background: var(--bg-soft); border-bottom: 1px solid var(--border); }
.table-sota td { padding: 12px 16px; font-size: 0.8125rem; border-bottom: 1px solid var(--border); }
.table-sota tr:last-child td { border-bottom: none; }

/* --------------------------------------------------------------------------
   17. Pricing
   -------------------------------------------------------------------------- */
.pricing-header { text-align: center; padding: 16px 24px 48px; }
.pricing-header h1 { font-size: clamp(2rem, 4vw, 2.75rem); margin: 0 0 14px; }
.pricing-header p { font-size: 1rem; color: var(--text-soft); max-width: 520px; margin: 0 auto; line-height: 1.7; }

.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 960px; margin: 0 auto; align-items: start; }
.price-card { position: relative; padding: 36px 28px 32px; text-align: center; border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--border); transition: all var(--normal) var(--ease); }
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.price-card.popular { border-color: var(--rose); box-shadow: 0 0 0 1px var(--rose-border), var(--shadow-md); }
.price-card.popular:hover { box-shadow: 0 0 0 1px var(--rose-border), var(--shadow-lg); }

.popular-tag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); padding: 4px 16px; border-radius: var(--radius-full); background: var(--grad-brand); color: #fff; font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; box-shadow: 0 2px 8px var(--rose-glow); }

.price-card .plan-icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: var(--radius-md); font-size: 1.25rem; margin-bottom: 16px; }
.price-card .plan-icon.starter { background: rgba(91,141,239,0.08); }
.price-card .plan-icon.popular { background: var(--rose-subtle); }
.price-card .plan-icon.pro { background: var(--gold-subtle); }

.price-card .plan-name { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; margin: 0 0 2px; }
.price-card .plan-subtitle { font-size: 0.75rem; color: var(--text-soft); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; margin: 0 0 20px; }

.price-amount { font-family: var(--font-display); font-size: 2.75rem; font-weight: 800; line-height: 1; margin: 0 0 2px; color: var(--text); }
.price-period { font-size: 0.75rem; color: var(--text-dim); font-weight: 500; margin: 0 0 8px; }

.rollover-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: var(--radius-full); font-size: 0.6875rem; font-weight: 600; background: var(--gold-subtle); border: 1px solid rgba(212,168,83,0.15); color: var(--gold); margin: 0 auto 20px; }
.rollover-badge-generous { background: linear-gradient(135deg, rgba(212,168,83,0.15), rgba(255,45,149,0.08)); border-color: rgba(212,168,83,0.3); box-shadow: 0 0 12px rgba(212,168,83,0.08); }

.price-features { list-style: none; padding: 0; margin: 0 0 24px; text-align: left; border-top: 1px solid var(--border); padding-top: 16px; }
.price-features li { padding: 7px 0; font-size: 0.8125rem; color: var(--text-soft); display: flex; align-items: center; gap: 8px; }
.feat-check { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: var(--green-subtle); color: var(--green); font-size: 0.65rem; font-weight: 700; flex-shrink: 0; }

.plan-btn { display: block; width: 100%; padding: 12px; border-radius: var(--radius-md); font-family: var(--font-body); font-size: 0.875rem; font-weight: 700; cursor: pointer; text-decoration: none; transition: all var(--fast) var(--ease); }
.plan-btn.primary { background: var(--grad-brand); color: #fff; border: none; box-shadow: 0 2px 8px var(--rose-glow); }
.plan-btn.primary:hover { box-shadow: 0 4px 16px var(--rose-glow); transform: translateY(-1px); }
.plan-btn.outline { background: transparent; color: var(--text); border: 1px solid var(--border-strong); }
.plan-btn.outline:hover { border-color: var(--rose); color: var(--rose); }
.plan-badge-active { padding: 12px; border-radius: var(--radius-md); background: var(--green-subtle); color: var(--green); font-size: 0.8125rem; font-weight: 700; }

.guarantee-bar { text-align: center; padding: 28px 24px; font-size: 0.875rem; color: var(--text-soft); display: flex; align-items: center; justify-content: center; gap: 8px; }

.credits-explainer { max-width: 720px; margin: 48px auto; padding: 32px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); }
.credits-explainer h2 { font-size: 1.25rem; margin: 0 0 6px; }
.credits-explainer > p { color: var(--text-soft); font-size: 0.875rem; margin: 0 0 24px; }
.credits-item { display: flex; gap: 14px; padding: 16px; border-radius: var(--radius-md); background: var(--bg-soft); border: 1px solid var(--border); margin-bottom: 12px; }
.credits-item-icon { font-size: 1.25rem; flex-shrink: 0; padding-top: 2px; }
.credits-item-title { font-weight: 700; font-size: 0.875rem; margin-bottom: 4px; }
.credits-item-desc { font-size: 0.8125rem; color: var(--text-soft); line-height: 1.55; }
.credits-examples { margin-top: 20px; padding: 16px; border-radius: var(--radius-md); background: var(--rose-subtle); border: 1px solid var(--rose-border); }
.credits-examples-title { font-size: 0.8125rem; font-weight: 700; color: var(--rose); margin-bottom: 6px; }
.credits-examples-text { font-size: 0.75rem; color: var(--text-soft); line-height: 1.7; }

/* --------------------------------------------------------------------------
   18. FAQ
   -------------------------------------------------------------------------- */
.faq-page { padding: 40px 24px 80px; max-width: 680px; margin: 0 auto; }
.faq-item { padding: 16px 0; border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-q { display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-weight: 600; font-size: 0.9375rem; padding: 4px 0; }
.faq-q:hover { color: var(--rose); }
.faq-arrow { transition: transform var(--normal) var(--ease); color: var(--text-dim); }
.faq-item.open .faq-arrow { transform: rotate(180deg); color: var(--rose); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s var(--ease); color: var(--text-soft); font-size: 0.875rem; line-height: 1.7; }
.faq-item.open .faq-a { max-height: 500px; }
.faq-a-inner { padding-top: 12px; }

/* --------------------------------------------------------------------------
   19. Loading & Skeleton
   -------------------------------------------------------------------------- */
.loading-overlay { position: fixed; inset: 0; background: rgba(26, 23, 22, 0.85); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; z-index: 200; }
.loading-card { text-align: center; padding: 36px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-2xl); animation: scaleIn 0.3s var(--spring); }
.loading-spinner { display: inline-block; width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--rose); border-radius: 50%; animation: spin 0.7s linear infinite; margin-bottom: 14px; }
.loading-card p { font-weight: 600; margin: 0 0 4px; }
.loading-card .sub { font-size: 0.8125rem; color: var(--text-soft); }

.skeleton { background: linear-gradient(90deg, var(--surface) 25%, var(--surface-hover) 50%, var(--surface) 75%); background-size: 200% 100%; animation: skeletonPulse 1.5s ease-in-out infinite; border-radius: var(--radius-sm); }
.skeleton-text { height: 12px; margin-bottom: 6px; width: 80%; }
.skeleton-title { height: 18px; margin-bottom: 10px; width: 60%; }
.skeleton-card { height: 80px; border-radius: var(--radius-lg); }
.skeleton-avatar { width: 36px; height: 36px; border-radius: 50%; }

/* --------------------------------------------------------------------------
   20. Toast System
   -------------------------------------------------------------------------- */
.toast-container { position: fixed; top: 80px; right: 24px; z-index: 500; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { padding: 12px 18px; border-radius: var(--radius-md); font-size: 0.8125rem; font-weight: 600; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 8px; pointer-events: auto; animation: toastIn 0.35s var(--spring); max-width: 360px; }
.toast.removing, .toast.fade-out { animation: toastOut 0.25s var(--ease) forwards; }
.toast-success { border-left: 3px solid var(--green); }
.toast-error { border-left: 3px solid var(--red); }
.toast-info { border-left: 3px solid var(--rose); }

/* --------------------------------------------------------------------------
   21. Utilities
   -------------------------------------------------------------------------- */
.hidden { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.text-center { text-align: center; }
.text-rose { color: var(--rose); }
.text-soft { color: var(--text-soft); }
.text-dim { color: var(--text-dim); }
.text-sm { font-size: 0.8125rem; }
.text-xs { font-size: 0.6875rem; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 24px; }
.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 16px; }
.mt-lg { margin-top: 24px; }
.mb-sm { margin-bottom: 8px; }
.mb-md { margin-bottom: 16px; }
.mb-lg { margin-bottom: 24px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }

/* --------------------------------------------------------------------------
   22. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .signup-layout { flex-direction: column; max-width: 420px; gap: 32px; padding: 32px 24px; }
  .signup-form-card { width: 100%; }
  .signup-benefits { max-width: 100%; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; }
}

@media (max-width: 768px) {
  .section { padding: 48px 0; }
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: var(--nav-h); left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--border-strong); padding: 12px; gap: 4px; }
  .nav-hamburger { display: flex; }
  .nav { padding: 0 16px; }
  .nav-inner { gap: 14px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; gap: 24px; }
  .reply-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .feature-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .pack-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 400px) {
  .user-name { display: none; }
}
