@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #0A0A0F;
  --surface: #13131A;
  --surface2: #1C1C26;
  --accent: #C9A84C;
  --accent-dim: rgba(201, 168, 76, 0.15);
  --text: #F0F0F0;
  --text-secondary: #888899;
  --danger: #E05555;
  --danger-dim: rgba(224, 85, 85, 0.15);
  --success: #55C77A;
  --success-dim: rgba(85, 199, 122, 0.15);
  --radius-card: 12px;
  --radius-btn: 24px;
  --transition: 300ms ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
}

.screen {
  display: none;
  min-height: 100vh;
  padding-bottom: 80px;
}

.screen.has-nav {
  padding-bottom: 80px;
}

/* ==================== LAYOUT ==================== */
.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-header {
  padding: 24px 20px 16px;
  max-width: 480px;
  margin: 0 auto;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

/* ==================== BOTTOM NAV ==================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--surface);
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  padding: 8px 20px;
  border-radius: 8px;
  transition: color var(--transition);
  min-width: 64px;
  min-height: 44px;
}

.nav-btn svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-btn.active {
  color: var(--accent);
}

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-btn);
  border: none;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  min-height: 52px;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #0A0A0F;
}

.btn-primary:hover { filter: brightness(1.1); }
.btn-primary:active { filter: brightness(0.95); }

.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.08);
}

.btn-secondary:hover { background: #25253A; }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 16px;
}

.btn-ghost:hover { color: var(--text); }

.btn-danger {
  background: #c0392b;
  color: #fff;
  border: none;
}

.btn-danger:hover { background: #e74c3c; }

.btn-success {
  background: var(--success-dim);
  color: var(--success);
  border: 1px solid rgba(85, 199, 122, 0.3);
}

.btn-success:hover { background: rgba(85, 199, 122, 0.25); }

.btn-full { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ==================== FORMS ==================== */
input[type="text"],
input[type="email"],
input[type="password"],
textarea {
  width: 100%;
  background: var(--surface2);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-card);
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  padding: 14px 16px;
  transition: border-color var(--transition);
  resize: none;
  outline: none;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
textarea::placeholder {
  color: var(--text-secondary);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus {
  border-color: var(--accent);
}

/* ==================== CARDS ==================== */
.card {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 20px;
  border: 1px solid rgba(255,255,255,0.05);
}

/* ==================== LOADING / SPINNER ==================== */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(201, 168, 76, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px 20px;
  color: var(--text-secondary);
  text-align: center;
}

/* ==================== TOAST ==================== */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface2);
  color: var(--text);
  padding: 12px 20px;
  border-radius: var(--radius-btn);
  font-size: 14px;
  font-weight: 500;
  z-index: 200;
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,0.1);
  transition: opacity var(--transition);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}

.toast.success { border-color: rgba(85, 199, 122, 0.4); color: var(--success); }
.toast.error { border-color: rgba(224, 85, 85, 0.4); color: var(--danger); }
.toast.hidden { opacity: 0; pointer-events: none; }

/* ==================== ONBOARDING ==================== */
.onboarding-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.onboarding-header {
  padding: 56px 24px 24px;
}

.logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.5px;
}

.progress-bar-wrap {
  padding: 0 24px 32px;
}

.progress-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  font-weight: 500;
}

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

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.5s ease;
}

.onboarding-step {
  display: none;
  padding: 0 24px;
  flex: 1;
}

.onboarding-step.active {
  display: flex;
  flex-direction: column;
}

.step-question {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--text);
}

.step-hint {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.step-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

/* Voice preview cards */
.voice-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.voice-card {
  background: var(--surface2);
  border-radius: var(--radius-card);
  padding: 16px;
  border: 2px solid transparent;
  transition: border-color var(--transition);
}

.voice-card.selected {
  border-color: var(--accent);
}

.voice-card-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.voice-card-actions {
  display: flex;
  gap: 10px;
}

.voice-card-actions .btn {
  flex: 1;
  padding: 10px 16px;
  font-size: 14px;
  min-height: 44px;
}

/* Completion step */
.completion-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-align: center;
  padding: 40px 0;
  gap: 20px;
}

.completion-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}

.completion-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
}

.completion-sub {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 260px;
}

/* ==================== HOME ==================== */
.home-greeting {
  padding: 40px 24px 24px;
  max-width: 480px;
  margin: 0 auto;
}

.home-greeting-name {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 4px;
}

.home-greeting-date {
  font-size: 14px;
  color: var(--text-secondary);
}

.speak-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 24px 24px;
  gap: 16px;
}

.speak-btn {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #0A0A0F;
  letter-spacing: 0.5px;
  box-shadow: 0 0 0 0 rgba(201, 168, 76, 0.4);
  animation: speakPulse 2.5s ease-in-out infinite;
  transition: all var(--transition);
}

.speak-btn svg {
  width: 28px;
  height: 28px;
  stroke: #0A0A0F;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.speak-btn.recording {
  background: var(--danger);
  animation: speakPulseActive 0.7s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(224, 85, 85, 0.5);
}

.speak-btn.recording svg { stroke: #fff; }

@keyframes speakPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 168, 76, 0.4); }
  50% { box-shadow: 0 0 0 18px rgba(201, 168, 76, 0); }
}

@keyframes speakPulseActive {
  0%, 100% { box-shadow: 0 0 0 0 rgba(224, 85, 85, 0.6); }
  50% { box-shadow: 0 0 0 24px rgba(224, 85, 85, 0); }
}

.speak-status {
  font-size: 14px;
  color: var(--text-secondary);
  min-height: 20px;
  text-align: center;
}

.speak-status.listening { color: var(--danger); font-weight: 500; }

.home-form {
  padding: 0 24px;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.notice-box {
  background: var(--surface2);
  border-radius: var(--radius-card);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  border: 1px solid rgba(255,255,255,0.06);
}

.tag-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-pill {
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all var(--transition);
  min-height: 36px;
  background: var(--surface2);
  color: var(--text-secondary);
  border: 1px solid rgba(255,255,255,0.06);
}

.tag-pill.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.tag-work.active { color: #6DB4FF; border-color: #6DB4FF; background: rgba(109, 180, 255, 0.1); }
.tag-relationships.active { color: #FF8FAB; border-color: #FF8FAB; background: rgba(255, 143, 171, 0.1); }
.tag-money.active { color: #55C77A; border-color: #55C77A; background: rgba(85, 199, 122, 0.1); }
.tag-health.active { color: #4ECDC4; border-color: #4ECDC4; background: rgba(78, 205, 196, 0.1); }
.tag-identity.active { color: #A78BFA; border-color: #A78BFA; background: rgba(167, 139, 250, 0.1); }
.tag-goals.active { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }
.tag-fear.active { color: var(--danger); border-color: var(--danger); background: var(--danger-dim); }
.tag-gratitude.active { color: #FCD34D; border-color: #FCD34D; background: rgba(252, 211, 77, 0.1); }

.success-msg {
  background: var(--success-dim);
  color: var(--success);
  border-radius: var(--radius-card);
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  border: 1px solid rgba(85, 199, 122, 0.3);
  display: none;
}

/* ==================== JOURNAL ==================== */
.entries-list {
  padding: 8px 20px;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.empty-state {
  text-align: center;
  color: var(--text-secondary);
  padding: 60px 20px;
  font-size: 16px;
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.entry-card {
  background: var(--surface);
  border-radius: var(--radius-card);
  border: 1px solid rgba(255,255,255,0.05);
  overflow: hidden;
  transition: border-color var(--transition);
}

.entry-card:hover { border-color: rgba(255,255,255,0.1); }

.entry-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 16px 0;
  gap: 10px;
}

.entry-meta {
  flex: 1;
}

.entry-date {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.entry-preview {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
  cursor: pointer;
  padding: 8px 16px 12px;
}

.entry-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  background: var(--surface2);
  color: var(--text-secondary);
}

.entry-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px 16px;
}

.entry-card-footer .btn {
  flex: 1;
  padding: 10px 12px;
  font-size: 13px;
  min-height: 40px;
  border-radius: 10px;
}

.btn-trash {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition);
  min-width: 40px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-trash:hover { color: var(--danger); border-color: var(--danger); background: var(--danger-dim); }

.btn-trash svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.entry-expanded {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid rgba(255,255,255,0.05);
  margin-top: 4px;
}

.entry-expanded.open {
  display: block;
}

.entry-full-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
  margin-bottom: 12px;
}

.qa-history-mini {
  margin-top: 12px;
}

.qa-history-mini-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.qa-pair-mini {
  margin-bottom: 12px;
  padding: 10px;
  background: var(--surface2);
  border-radius: 8px;
}

.qa-q-mini {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.qa-a-mini {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}

/* ==================== REFLECT ==================== */
.reflect-header {
  padding: 20px 24px 0;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.back-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  padding: 8px 0;
  transition: color var(--transition);
  min-height: 44px;
}

.back-link:hover { color: var(--text); }

.back-link svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.reflect-body {
  padding: 16px 24px;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.entry-text-display {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 20px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  max-height: 180px;
  overflow-y: auto;
  white-space: pre-wrap;
  border: 1px solid rgba(255,255,255,0.05);
}

.reflection-area {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 48px;
  display: none;
}

.waveform.active { display: flex; }

.waveform .bar {
  width: 5px;
  background: var(--accent);
  border-radius: 3px;
  animation: waveAnim 1.2s ease-in-out infinite;
}

.waveform .bar:nth-child(1) { animation-delay: 0s; }
.waveform .bar:nth-child(2) { animation-delay: 0.2s; }
.waveform .bar:nth-child(3) { animation-delay: 0.4s; }
.waveform .bar:nth-child(4) { animation-delay: 0.6s; }
.waveform .bar:nth-child(5) { animation-delay: 0.8s; }

@keyframes waveAnim {
  0%, 100% { height: 8px; }
  50% { height: 36px; }
}

.waveform.paused .bar {
  animation-play-state: paused;
}

.reflection-text-display {
  background: var(--surface2);
  border-radius: var(--radius-card);
  padding: 16px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  font-style: italic;
  border-left: 3px solid var(--accent);
  display: none;
}

.audio-unavailable {
  font-size: 13px;
  color: var(--text-secondary);
  display: none;
}

.qa-section {
  display: none;
}

.qa-section.visible {
  display: block;
}

.qa-input-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qa-voice-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

#qa-input {
  width: 100%;
  box-sizing: border-box;
  min-height: 72px;
  height: 72px;
  overflow: hidden;
  resize: none;
  transition: height 0.1s ease;
  line-height: 1.6;
  font-size: 15px;
  padding: 12px 14px;
}

.qa-mic-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--surface2);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-btn);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
  font-family: inherit;
}

.qa-mic-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.qa-mic-btn.recording {
  background: rgba(201, 168, 76, 0.12);
  border-color: var(--accent);
  color: var(--accent);
  animation: pulse 1.5s ease-in-out infinite;
}

.qa-mic-status {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.3px;
}

.qa-limit-msg {
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  font-style: italic;
  padding: 16px 0;
  display: none;
}

.qa-history {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.qa-pair {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.05);
}

.qa-question {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 500;
}

.qa-answer {
  font-size: 15px;
  color: var(--text);
  line-height: 1.6;
  font-style: italic;
}

/* ==================== SETTINGS ==================== */
.settings-body {
  padding: 16px 24px;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.settings-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.settings-section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.settings-note {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.settings-voice-prompt {
  background: var(--surface2);
  border-radius: var(--radius-card);
  padding: 14px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
  font-style: italic;
}

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

.field-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.privacy-notice {
  background: var(--surface2);
  border-radius: var(--radius-card);
  padding: 14px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==================== FADE IN ==================== */
.fade-in {
  animation: fadeIn 0.4s ease forwards;
}

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

/* ==================== LOADING SCREEN ==================== */
#loading-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease forwards;
}

.loading-logo {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.5px;
  animation: fadeIn 0.6s ease forwards;
}

/* ==================== AUTH ==================== */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 80px 20px 40px;
}

@media (max-width: 480px) {
  .auth-wrap {
    padding: 40px 0 40px;
  }
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border-radius: var(--radius-card);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (max-width: 480px) {
  .auth-card {
    border-radius: 0;
    border-left: none;
    border-right: none;
    padding: 28px 20px;
  }
}

.auth-logo {
  font-size: 24px;
}

.auth-tagline {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: -12px;
}

.auth-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.auth-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0 0 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: -1px;
}

.auth-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.auth-form-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 8px;
}

.auth-form-actions {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ==================== VOICE STEP INNER PANELS ==================== */
#voice-mode-ai,
#voice-mode-clone {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

#voice-mode-ai textarea,
#ob-step-3 textarea {
  flex: 1;
  min-height: 100px;
  max-height: 180px;
  resize: none;
}

/* ==================== VOICE MODE TABS ==================== */
.voice-mode-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface2);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 16px;
  margin-top: 4px;
}

.voice-mode-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  padding: 9px 8px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.voice-mode-tab.active {
  background: var(--surface);
  color: var(--accent);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* ==================== CLONE RECORDING ==================== */
.clone-record-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 12px 0 8px;
}

.clone-timer {
  font-size: 36px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: 2px;
  min-height: 44px;
}

.clone-hint-text {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  max-width: 260px;
}

.clone-script-card {
  background: var(--surface2);
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: var(--radius-card);
  padding: 16px 18px;
  margin: 12px 0;
}

.clone-script-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--accent);
  margin-bottom: 12px;
}

.clone-script-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 12px;
}

.clone-script-text:last-of-type {
  margin-bottom: 10px;
}

.clone-script-duration {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: right;
  font-style: italic;
}

.auth-error {
  font-size: 14px;
  color: var(--danger);
  min-height: 0;
  line-height: 1.4;
}

.auth-spinner {
  display: none;
  justify-content: center;
  padding: 8px 0;
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
}
