/* ==========================================================================
   4 Elements Calm - Design System & Responsive Stylesheet
   ========================================================================== */

:root {
  /* Color Palette - Elemental Themes */
  --bg-dark: #090d16;
  --card-bg: rgba(22, 30, 46, 0.75);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-glow: rgba(56, 189, 248, 0.05);

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

  /* Element Colors */
  --earth-primary: #10b981;
  --earth-glow: rgba(16, 185, 129, 0.25);
  --earth-gradient: linear-gradient(135deg, #064e3b, #047857);

  --air-primary: #38bdf8;
  --air-glow: rgba(56, 189, 248, 0.25);
  --air-gradient: linear-gradient(135deg, #075985, #0284c7);

  --water-primary: #06b6d4;
  --water-glow: rgba(6, 182, 212, 0.25);
  --water-gradient: linear-gradient(135deg, #155e75, #0891b2);

  --fire-primary: #f59e0b;
  --fire-glow: rgba(245, 158, 11, 0.25);
  --fire-gradient: linear-gradient(135deg, #9a3412, #ea580c);

  /* Fonts & Radius */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-serif: Georgia, Cambria, 'Times New Roman', Times, serif;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --trans-fast: 0.2s ease;
  --trans-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --trans-theme: background 1.2s ease, border-color 0.8s ease, box-shadow 0.8s ease;
}

/* Reset & Basics */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  line-height: 1.5;
}

/* Background Atmosphere Mesh */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: 
    radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(56, 189, 248, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 20% 80%, rgba(6, 182, 212, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(245, 158, 11, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(30, 41, 59, 0.5) 0%, #090d16 80%);
  transition: opacity 1.2s ease;
}

/* Dynamic theme background overlays */
body[data-theme="earth"] .ambient-bg {
  background: radial-gradient(circle at 50% 35%, rgba(16, 185, 129, 0.22) 0%, rgba(4, 120, 87, 0.1) 45%, #090d16 80%);
}
body[data-theme="air"] .ambient-bg {
  background: radial-gradient(circle at 50% 35%, rgba(56, 189, 248, 0.22) 0%, rgba(2, 132, 199, 0.1) 45%, #090d16 80%);
}
body[data-theme="water"] .ambient-bg {
  background: radial-gradient(circle at 50% 35%, rgba(6, 182, 212, 0.22) 0%, rgba(8, 145, 178, 0.1) 45%, #090d16 80%);
}
body[data-theme="fire"] .ambient-bg {
  background: radial-gradient(circle at 50% 35%, rgba(245, 158, 11, 0.22) 0%, rgba(234, 88, 12, 0.1) 45%, #090d16 80%);
}

/* App Header */
.app-header {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-main);
  cursor: pointer;
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-badge {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  color: var(--text-muted);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--trans-fast);
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.icon-btn.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  color: var(--air-primary);
}

.icon-btn.muted {
  color: var(--text-subtle);
}

/* App Main Container */
.app-container {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  padding: 1rem 1.25rem 2.5rem;
}

/* Screens / Cards Management */
.screen {
  display: none;
  width: 100%;
  animation: fadeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.screen.active {
  display: flex;
  flex-direction: column;
  align-items: center;
}

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

/* Card Shell */
.calm-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
  width: 100%;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 0 24px var(--card-glow);
  transition: var(--trans-theme);
  position: relative;
  overflow: hidden;
}

@media (max-width: 600px) {
  .calm-card {
    padding: 1.5rem 1.25rem;
    border-radius: var(--radius-md);
  }
}

/* Home / Welcome Screen */
.welcome-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.welcome-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #f8fafc, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.elemental-colors-text span {
  display: inline-block;
  font-weight: 800;
}
.elemental-colors-text .e-earth { color: var(--earth-primary); -webkit-text-fill-color: var(--earth-primary); }
.elemental-colors-text .e-air { color: var(--air-primary); -webkit-text-fill-color: var(--air-primary); }
.elemental-colors-text .e-water { color: var(--water-primary); -webkit-text-fill-color: var(--water-primary); }
.elemental-colors-text .e-fire { color: var(--fire-primary); -webkit-text-fill-color: var(--fire-primary); }

.welcome-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto;
}

/* Daily Habit Status Bar */
.daily-habit-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  width: 100%;
}

.habit-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.habit-ring-container {
  position: relative;
  width: 44px;
  height: 44px;
}

.habit-ring-svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.habit-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 4;
}

.habit-ring-val {
  fill: none;
  stroke: var(--earth-primary);
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dasharray 0.6s ease;
}

.habit-count-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.habit-label {
  font-size: 0.95rem;
  font-weight: 600;
}

.habit-subtext {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.streak-badge {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: var(--fire-primary);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
}

/* Practice Mode Selector Cards */
.mode-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

@media (max-width: 580px) {
  .mode-options-grid {
    grid-template-columns: 1fr;
  }
}

.mode-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: left;
  cursor: pointer;
  transition: var(--trans-smooth);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mode-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-2px);
}

.mode-card.selected {
  background: rgba(56, 189, 248, 0.08);
  border-color: var(--air-primary);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.2);
}

.mode-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mode-icon {
  font-size: 1.4rem;
}

.mode-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(56, 189, 248, 0.15);
  color: var(--air-primary);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
}

.mode-title {
  font-size: 1.05rem;
  font-weight: 700;
}

.mode-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Primary Action Buttons */
.btn-primary {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  padding: 0.95rem 2rem;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.35);
  transition: var(--trans-smooth);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.45);
  background: linear-gradient(135deg, #0ea5e9, #3b82f6);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  padding: 0.8rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--trans-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* --- Stress Rating Slider (SUDs 0-10) --- */
.suds-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin: 1.5rem 0;
  width: 100%;
}

.suds-score-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.suds-score-num {
  font-size: 3.8rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #38bdf8;
  line-height: 1;
  transition: color 0.3s ease;
}

.suds-score-label {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-muted);
}

.suds-slider-wrap {
  width: 100%;
  max-width: 480px;
  position: relative;
  padding: 0.5rem 0;
}

.suds-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: var(--radius-full);
  background: linear-gradient(to right, #10b981 0%, #38bdf8 30%, #f59e0b 70%, #ef4444 100%);
  outline: none;
  cursor: pointer;
}

.suds-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.suds-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.suds-ticks {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-top: 0.5rem;
  color: var(--text-subtle);
  font-size: 0.8rem;
  font-weight: 600;
}

/* --- Element Step Screen Shell --- */
.step-progress-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  width: 100%;
}

.progress-dot {
  width: 36px;
  height: 6px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.12);
  transition: var(--trans-smooth);
}

.progress-dot.completed {
  background: rgba(255, 255, 255, 0.4);
}

.progress-dot.active {
  width: 54px;
}

body[data-theme="earth"] .progress-dot.active { background: var(--earth-primary); box-shadow: 0 0 10px var(--earth-glow); }
body[data-theme="air"] .progress-dot.active { background: var(--air-primary); box-shadow: 0 0 10px var(--air-glow); }
body[data-theme="water"] .progress-dot.active { background: var(--water-primary); box-shadow: 0 0 10px var(--water-glow); }
body[data-theme="fire"] .progress-dot.active { background: var(--fire-primary); box-shadow: 0 0 10px var(--fire-glow); }

.element-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.element-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.6rem;
}

.element-tag.earth { background: rgba(16, 185, 129, 0.15); color: var(--earth-primary); border: 1px solid rgba(16, 185, 129, 0.3); }
.element-tag.air { background: rgba(56, 189, 248, 0.15); color: var(--air-primary); border: 1px solid rgba(56, 189, 248, 0.3); }
.element-tag.water { background: rgba(6, 182, 212, 0.15); color: var(--water-primary); border: 1px solid rgba(6, 182, 212, 0.3); }
.element-tag.fire { background: rgba(245, 158, 11, 0.15); color: var(--fire-primary); border: 1px solid rgba(245, 158, 11, 0.3); }

.element-title {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.element-main-text {
  font-size: 1.12rem;
  line-height: 1.65;
  color: #e2e8f0;
  margin-bottom: 1.5rem;
  text-align: center;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Stacking anchor hint */
.stacking-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid var(--air-primary);
  padding: 0.6rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 1.5rem;
  text-align: left;
}

/* Interactive Somatic Container */
.somatic-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  width: 100%;
  margin-bottom: 1.5rem;
}

.somatic-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 0.75rem;
}

/* --- Earth: Foot Tension & Senses Tools --- */
.senses-grid {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.sense-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--trans-fast);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.sense-chip.checked {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--earth-primary);
  color: #ffffff;
}

.tension-timer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.btn-tension-timer {
  background: rgba(16, 185, 129, 0.18);
  border: 1.5px solid var(--earth-primary);
  color: #ffffff;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--trans-smooth);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-tension-timer:hover {
  background: rgba(16, 185, 129, 0.3);
}

.btn-tension-timer.pressing {
  background: var(--earth-primary);
  box-shadow: 0 0 20px var(--earth-glow);
  transform: scale(0.98);
}

/* --- Air: Breathing Pacer Orb --- */
.breath-pacer-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 0;
  width: 100%;
}

.breath-orb-outer {
  position: relative;
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.breath-orb-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(56, 189, 248, 0.2);
}

.breath-orb {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #7dd3fc, #0284c7);
  box-shadow: 0 0 35px rgba(56, 189, 248, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(1);
  transition: transform 4s cubic-bezier(0.4, 0, 0.2, 1);
}

.breath-orb.inhale {
  transform: scale(1.85);
  box-shadow: 0 0 50px rgba(56, 189, 248, 0.8);
}

.breath-orb.hold {
  transform: scale(1.85);
}

.breath-orb.exhale {
  transform: scale(1);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
  transition: transform 6s cubic-bezier(0.4, 0, 0.2, 1);
}

.breath-action-text {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-top: 1rem;
  color: var(--air-primary);
  min-height: 2rem;
}

.breath-sub-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- Water: Saliva Trigger Prompts --- */
.water-prompts-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
}

.water-prompt-card {
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* --- Fire: Safe Place Visualizer & Custom Place --- */
.safe-place-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.safe-place-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 0.8rem 1rem;
  color: #ffffff;
  font-size: 0.95rem;
  outline: none;
  transition: var(--trans-fast);
  width: 100%;
}

.safe-place-input:focus {
  border-color: var(--fire-primary);
  box-shadow: 0 0 12px var(--fire-glow);
}

.safe-place-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.preset-chip {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: #fde68a;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--trans-fast);
}

.preset-chip:hover {
  background: rgba(245, 158, 11, 0.25);
}

/* Step Navigation Footer Controls */
.step-nav-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: 1rem;
  gap: 1rem;
}

.step-timer-indicator {
  font-size: 0.85rem;
  color: var(--text-subtle);
  font-variant-numeric: tabular-nums;
}

/* --- Summary & Celebration Screen --- */
.summary-delta-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: rgba(16, 185, 129, 0.15);
  border: 1.5px solid var(--earth-primary);
  border-radius: var(--radius-lg);
  padding: 1.25rem 2rem;
  margin: 1.25rem 0;
}

.summary-delta-val {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--earth-primary);
  line-height: 1;
}

.summary-delta-text {
  font-size: 0.95rem;
  color: #a7f3d0;
  margin-top: 0.3rem;
  font-weight: 600;
}

.clinical-tip-box {
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  text-align: left;
  margin: 1.25rem 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.clinical-tip-box strong {
  color: #f1f5f9;
}

/* Modal Shell (About / Info) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop.open {
  display: flex;
}

.modal-card {
  background: #131c2e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  max-width: 580px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 2rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
}

.modal-body {
  color: #cbd5e1;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-top: 1rem;
}

.modal-body h3 {
  color: #ffffff;
  margin: 1.25rem 0 0.4rem;
  font-size: 1.1rem;
}

.modal-body ul {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.modal-body li {
  margin-bottom: 0.4rem;
}

/* Audio & Voice Settings Modal Controls */
.settings-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.settings-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.settings-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.settings-row:last-child {
  margin-bottom: 0;
}

.settings-label-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: #cbd5e1;
}

.settings-val-badge {
  font-size: 0.8rem;
  color: var(--air-primary);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.voice-select {
  width: 100%;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  color: #f8fafc;
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
  transition: var(--trans-fast);
}

.voice-select:focus {
  border-color: var(--air-primary);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.audio-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.12);
  outline: none;
  cursor: pointer;
}

.audio-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--air-primary);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.audio-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.ai-info-callout {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-md);
  padding: 1rem;
  font-size: 0.88rem;
  color: #e2e8f0;
  line-height: 1.5;
  margin-top: 1rem;
}

/* Footer & Legal Callouts */
.app-footer {
  text-align: center;
  padding: 2rem 1rem 2.5rem;
  font-size: 0.82rem;
  color: var(--text-subtle);
  line-height: 1.5;
}

.footer-link {
  color: #94a3b8;
  text-decoration: underline;
  transition: var(--trans-fast);
  cursor: pointer;
}

.footer-link:hover {
  color: var(--air-primary);
}

.crisis-callout-box {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-sm);
  padding: 0.9rem;
  margin-top: 1rem;
}

.privacy-callout-box {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-sm);
  padding: 0.9rem;
  margin-top: 0.85rem;
}
