/* ============================================================
   Future Self — additions: Voice Clone, Install, Notifications,
   Settings, empty states, and aesthetic variants (editorial, brutalist)
   ============================================================ */

/* ---------- Topbar with gear ---------- */
.topbar-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 24px 8px;
}
.gear-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  color: var(--text-muted);
  border-radius: var(--r-pill);
  transition: color var(--dur-fast);
}
.gear-btn:hover { color: var(--gold); }

/* ---------- Voice Clone ---------- */
.voice-screen { padding: 32px 24px 40px; display: flex; flex-direction: column; gap: 24px; }

.voice-title {
  font-family: var(--font-display);
  font-size: 34px;
  letter-spacing: 0.02em;
  line-height: 1.05;
  color: var(--text-primary);
}
.voice-intro {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 320px;
}
.voice-intro strong { color: var(--text-primary); font-weight: 500; }

.script-card {
  background: var(--bg-card);
  border: 1px solid var(--divider);
  border-left: 2px solid var(--gold);
  border-radius: var(--r-md);
  padding: 20px 18px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-primary);
  font-style: italic;
  letter-spacing: 0.005em;
}
.script-card .label {
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 10px;
}

.record-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
}

.record-btn {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: var(--bg-elev);
  border: 2px solid var(--divider-strong);
  display: grid; place-items: center;
  position: relative;
  transition: all var(--dur-fast);
}
.record-btn .dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--danger);
  transition: all var(--dur-fast);
}
.record-btn.armed {
  border-color: var(--danger);
  background: rgba(232,92,92,0.05);
}
.record-btn.armed .dot {
  width: 20px; height: 20px;
  border-radius: 4px;
  animation: recordPulse 1s ease-in-out infinite;
}
@keyframes recordPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.6; transform: scale(0.9); }
}
.record-btn.done { border-color: var(--success); }
.record-btn.done .dot { background: var(--success); border-radius: 4px; }

.record-hint {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.record-time {
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  color: var(--text-primary);
  letter-spacing: 0.08em;
}

.waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 48px;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
}
.waveform .wbar {
  width: 3px;
  background: var(--gold-dim);
  border-radius: 2px;
  transition: height 80ms linear, background 200ms;
  min-height: 3px;
}
.waveform.active .wbar { background: var(--gold); }

.voice-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.voice-actions .row { display: flex; gap: 10px; }
.voice-actions .row button {
  flex: 1;
  padding: 12px;
  background: var(--bg-elev);
  border: 1px solid var(--divider);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: border-color var(--dur-fast);
}
.voice-actions .row button:hover { border-color: var(--gold-dim); }

.skip-btn {
  background: transparent;
  border: 1px solid var(--divider-strong);
  color: var(--text-muted);
  padding: 14px;
  border-radius: var(--r-md);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
}
.skip-btn:hover { color: var(--text-primary); }

/* ---------- Install Prompt (modal overlay) ---------- */
.modal-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 50;
  display: grid; place-items: center;
  padding: 24px;
  animation: fadeIn 200ms var(--ease);
}
.modal-card {
  background: var(--bg-elev);
  border: 1px solid var(--divider);
  border-radius: var(--r-lg);
  padding: 32px 24px 24px;
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: popIn 300ms var(--ease);
}
.modal-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--bg-base);
  border: 1px solid var(--divider);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 40px;
  color: var(--gold);
  align-self: flex-start;
}
.modal-title {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.02em;
  line-height: 1.05;
  color: var(--text-primary);
}
.modal-body {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
}
.install-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: var(--bg-base);
  border-radius: var(--r-md);
  border: 1px solid var(--divider);
}
.install-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.4;
}
.install-step .num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  display: grid; place-items: center;
  font-size: 12px;
  font-weight: 600;
  flex: none;
}
.install-step .share-ic {
  display: inline-flex; width: 18px; height: 18px;
  color: var(--gold); vertical-align: -3px; margin: 0 3px;
}
.modal-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }

/* ---------- Notifications screen ---------- */
.notif-screen {
  padding: 60px 24px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  height: 100%;
}
.bell-icon {
  width: 72px; height: 72px;
  display: grid; place-items: center;
  color: var(--gold);
  margin-bottom: 8px;
}
.notif-title {
  font-family: var(--font-display);
  font-size: 34px;
  letter-spacing: 0.02em;
  line-height: 1.05;
  color: var(--text-primary);
  max-width: 260px;
}
.notif-body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 280px;
}
.notif-body em { color: var(--text-primary); font-style: normal; font-weight: 500; }
.notif-actions { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 280px; margin-top: auto; }

/* ---------- Settings ---------- */
.settings { padding: 20px 0 40px; }
.settings-header {
  display: flex; align-items: center; gap: 14px;
  padding: 0 20px 24px;
}
.settings-header .back {
  width: 36px; height: 36px; display: grid; place-items: center;
  color: var(--text-muted); border-radius: 50%;
  transition: color var(--dur-fast);
}
.settings-header .back:hover { color: var(--text-primary); }
.settings-header .title {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 0.06em;
  color: var(--text-primary);
}

.settings-group {
  padding: 0 24px 24px;
}
.settings-group h4 {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 12px;
}
.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--divider);
  gap: 12px;
}
.settings-row:last-child { border-bottom: 0; }
.settings-row .k { font-size: 14px; color: var(--text-muted); letter-spacing: 0.06em; text-transform: uppercase; font-weight: 500; }
.settings-row .v {
  font-size: 15px; color: var(--text-primary);
  display: inline-flex; align-items: center; gap: 8px;
  font-variant-numeric: tabular-nums;
}
.settings-row .edit { color: var(--text-faint); transition: color var(--dur-fast); }
.settings-row:hover .edit { color: var(--gold); }

.voice-pick { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.voice-option {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--bg-elev);
  border: 1px solid var(--divider);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--dur-fast);
}
.voice-option.on { border-color: var(--gold); background: rgba(212,175,55,0.05); }
.voice-option .radio {
  width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid var(--divider-strong);
  display: grid; place-items: center;
  flex: none;
}
.voice-option.on .radio { border-color: var(--gold); }
.voice-option.on .radio::after {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold);
}
.voice-option .name { font-size: 15px; color: var(--text-primary); flex: 1; }
.voice-option .meta { font-size: 12px; color: var(--text-muted); letter-spacing: 0.08em; text-transform: uppercase; }

.rerecord-btn {
  width: 100%;
  padding: 14px;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: background var(--dur-fast);
}
.rerecord-btn:hover { background: rgba(212,175,55,0.08); }

.section-divider {
  height: 1px;
  background: var(--divider);
  margin: 8px 24px 24px;
}

.switch {
  width: 44px; height: 26px;
  background: var(--divider-strong);
  border-radius: 14px;
  position: relative;
  transition: background var(--dur-fast);
  flex: none;
}
.switch::after {
  content: "";
  position: absolute;
  left: 3px; top: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--text-primary);
  transition: transform var(--dur-fast);
}
.switch.on { background: var(--gold); }
.switch.on::after { transform: translateX(18px); background: #0a0a0a; }

/* ---------- Today empty / first-morning ---------- */
.empty-state {
  margin: 40px 20px 0;
  padding: 40px 24px;
  background: var(--bg-card);
  border: 1px solid var(--divider);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}
.empty-glyph {
  width: 56px; height: 56px;
  color: var(--gold);
  display: grid; place-items: center;
  animation: gentlePulse 2.4s ease-in-out infinite;
}
@keyframes gentlePulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}
.empty-head {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  line-height: 1.1;
}
.empty-body {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 260px;
}

/* Brewing state — slow organic blob shown while the script is being written. */
.brewing-state { padding-top: 28px; padding-bottom: 28px; gap: 24px; }
.blob-wrap {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 8px 0 4px;
  filter: blur(0.5px);
}
.blob {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 35% 30%, rgba(212, 175, 55, 0.95), rgba(212, 175, 55, 0.35) 50%, rgba(212, 175, 55, 0) 72%);
  mix-blend-mode: screen;
  animation: blobMorph 9s ease-in-out infinite, blobDrift 11s ease-in-out infinite;
}
.blob-2 {
  background: radial-gradient(circle at 60% 70%, rgba(240, 200, 90, 0.75), rgba(240, 200, 90, 0.2) 55%, rgba(240, 200, 90, 0) 78%);
  animation: blobMorph 12s ease-in-out -3s infinite reverse, blobDrift 14s ease-in-out -2s infinite;
  opacity: 0.85;
}
@keyframes blobMorph {
  0%, 100% { border-radius: 42% 58% 68% 32% / 40% 52% 48% 60%; }
  25%      { border-radius: 52% 48% 32% 68% / 60% 40% 60% 40%; }
  50%      { border-radius: 62% 38% 48% 52% / 32% 68% 32% 68%; }
  75%      { border-radius: 38% 62% 58% 42% / 52% 40% 60% 48%; }
}
@keyframes blobDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(-6px, 4px) scale(1.04); }
  66%      { transform: translate(5px, -3px) scale(0.98); }
}
@media (prefers-reduced-motion: reduce) {
  .blob, .blob-2 { animation: none; }
}

/* Loading spinner */
.mini-spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--divider-strong);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 900ms linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Aesthetic variants ---------- */

/* Editorial: Rapha-ish — rule-lines, serif accent, looser tracking */
body[data-aesthetic="editorial"] {
  --font-display: "Unica One", "Bebas Neue", Impact, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}
body[data-aesthetic="editorial"] .hero-card {
  border-radius: 0;
  border: 0;
  border-top: 1px solid var(--gold);
  border-bottom: 1px solid var(--divider);
  background: transparent;
  margin: 24px 20px 0;
  padding: 28px 0;
}
body[data-aesthetic="editorial"] .hero-card::before,
body[data-aesthetic="editorial"] .hero-card::after { display: none; }
body[data-aesthetic="editorial"] .hero-title { font-size: 68px; letter-spacing: 0.04em; }
body[data-aesthetic="editorial"] .stat-card { border-radius: 0; background: transparent; padding: 14px 4px; border: 0; border-top: 1px solid var(--divider); }
body[data-aesthetic="editorial"] .stat-value { font-size: 42px; }

/* Brutalist: thick borders, uppercase, exposed structure */
body[data-aesthetic="brutalist"] {
  --r-sm: 0; --r-md: 0; --r-lg: 0; --r-xl: 0; --r-pill: 0;
}
body[data-aesthetic="brutalist"] .hero-card { border: 2px solid var(--gold); border-radius: 0; }
body[data-aesthetic="brutalist"] .hero-card::before { opacity: 0.2; }
body[data-aesthetic="brutalist"] .play-btn { border-radius: 0; }
body[data-aesthetic="brutalist"] .play-btn::before { border-radius: 0; }
body[data-aesthetic="brutalist"] .stat-card {
  border: 2px solid var(--divider-strong);
  border-radius: 0;
}
body[data-aesthetic="brutalist"] .text-input,
body[data-aesthetic="brutalist"] .toggle-pill,
body[data-aesthetic="brutalist"] .submit-btn,
body[data-aesthetic="brutalist"] .onboard-choice,
body[data-aesthetic="brutalist"] .modal-card,
body[data-aesthetic="brutalist"] .script-card,
body[data-aesthetic="brutalist"] .voice-actions .row button,
body[data-aesthetic="brutalist"] .skip-btn,
body[data-aesthetic="brutalist"] .empty-state,
body[data-aesthetic="brutalist"] .rerecord-btn,
body[data-aesthetic="brutalist"] .voice-option {
  border-radius: 0;
  border-width: 1.5px;
}
body[data-aesthetic="brutalist"] .ghost-cta { border-radius: 0; border-width: 1.5px; }
body[data-aesthetic="brutalist"] .onboard-next { border-radius: 0; }
body[data-aesthetic="brutalist"] .record-btn { border-radius: 0; border-width: 2.5px; }
body[data-aesthetic="brutalist"] .switch { border-radius: 0; }
body[data-aesthetic="brutalist"] .switch::after { border-radius: 0; }

/* ============================================================
   Login / Register
   ============================================================ */

.login-screen {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 40px 28px 32px;
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}
.login-brand .mark {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gold, #d4af37); color: #0a0a0a;
  font-family: Impact, "Bebas Neue", sans-serif; font-size: 26px; font-weight: 700;
}
.login-wordmark {
  font-family: "Bebas Neue", Impact, sans-serif;
  letter-spacing: .22em;
  font-size: 18px;
  color: var(--text, #f5f2ea);
}
.login-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid rgba(245, 242, 234, .12);
}
.login-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted, #9a958b);
  padding: 12px 0;
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.login-tab.on {
  color: var(--text, #f5f2ea);
  border-bottom-color: var(--gold, #d4af37);
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.login-label {
  display: block;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-muted, #9a958b);
  margin-bottom: 6px;
}
.login-submit {
  margin-top: 8px;
}

/* Inline credentials form inside Settings → Account */
.creds-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 0;
}
.logout-row .k { color: #c77; }
