/* =========================================================
   ReWire UI — Felix's New Design (v12)
   Complete styling matching the new HTML structure
   ========================================================= */

/* ====== Design Tokens - Felix's Palette ====== */
:root {
  /* Felix's Color Palette */
  --text: #1a1a1a;
  --text-2: #555;
  --text-3: #999;
  --green: #6aaa6a;
  --green-light: #e8f5e8;
  --blue-light: #e4eef8;
  --peach: #f8ebe4;
  --peach-dark: #e8c4b8;

  /* Legacy mappings for compatibility */
  --bg-paper: #faf9f6;
  --bg-warm: #f5f4f0;
  --surface: #ffffff;
  --ink: #1a1a1a;
  --ink-medium: #555;
  --ink-light: #999;
  --ink-faint: #c5c5c5;
  --ink-whisper: #e8e8e8;
  --accent: #4a5568;
  --accent-warm: #9b8b7a;
  --sage: #6aaa6a;

  /* System */
  --radius-sm: 4px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --shadow-whisper: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.08);
  --shadow-strong: 0 12px 40px rgba(0, 0, 0, 0.12);

  --nav-height: 70px;
  --spacing: 24px;

  /* Typography - Felix uses Inter */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-sans: 'Inter', -apple-system, sans-serif;
  --font-serif: 'Inter', Georgia, serif;
}

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

html {
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  background: linear-gradient(155deg, #f0e4e0 0%, #e8e0f0 50%, #e0e8f4 100%);
  color: var(--text);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  width: 100vw;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  font-weight: 400;
}

/* ====== App Container ====== */
.app-container {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  position: relative;
}

/* ====== Screen/View Layout ====== */
.app-view,
.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 140px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  z-index: 1;
  background: linear-gradient(180deg, #fafafa 0%, #f8f6fa 100%);
}

.app-view.active,
.app-view.visible,
.screen.visible,
.screen.active {
  opacity: 1;
  visibility: visible;
}

.app-view::-webkit-scrollbar,
.screen::-webkit-scrollbar {
  display: none;
}

.hidden {
  display: none !important;
}

.visible {
  display: block;
}

.container {
  padding: 0 var(--spacing);
  max-width: 500px;
  margin: 0 auto;
}

/* ====== Bottom Gradient Bar (Felix's design) ====== */
.bottom-gradient-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 140px;
  background: linear-gradient(180deg, 
    transparent 0%,
    rgba(248,228,220,0.5) 40%,
    rgba(220,232,248,0.6) 100%
  );
  pointer-events: none;
  z-index: 40;
}

/* ====== Typography ====== */
.text-display {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.text-title {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
}

.text-body {
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-2);
}

.text-small {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--text-3);
}

.text-label {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-3);
}

/* ====== Bottom Navigation - Felix's Frosted Glass ====== */
.bottom-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 16px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}

.bottom-container > * {
  pointer-events: auto;
}

/* Nav Bar - Frosted Glass Pill */
.nav-bar,
.app-tabbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 32px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  z-index: 50;
  transition: opacity 0.3s, visibility 0.3s;
}

.nav-bar.hidden,
.app-tabbar.hidden {
  opacity: 0;
  visibility: hidden;
}

.nav-item,
.tab-btn {
  width: 56px;
  height: 56px;
  border-radius: 22px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: var(--text-3);
}

.nav-item svg,
.tab-btn svg {
  width: 24px;
  height: 24px;
  stroke: var(--text-3);
  stroke-width: 1.5;
  fill: none;
}

.nav-item:hover:not(.active),
.tab-btn:hover:not(.active) {
  background: rgba(0, 0, 0, 0.03);
}

.nav-item.active,
.tab-btn.active {
  background: white;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.nav-item.active svg,
.tab-btn.active svg {
  stroke: var(--text);
}

/* Play/Journey Nav Button - Center prominent button */
.nav-item.play-nav,
.tab-btn.play-nav,
.nav-item-journey,
.nav-play-center {
  background: var(--text);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin: -2px 4px;
}

.nav-item.play-nav svg,
.tab-btn.play-nav svg,
.nav-item-journey svg,
.nav-play-center svg {
  stroke: white;
  fill: white;
  width: 22px;
  margin-left: 3px;
}

.nav-item.play-nav:hover,
.tab-btn.play-nav:hover,
.nav-item-journey:hover,
.nav-play-center:hover {
  background: #333;
}
/* Legacy tab icon/label */
.tab-icon {
  line-height: 1;
  font-size: 16px;
}

.tab-label {
  display: none;
}

/* ====== Header - Felix's Design ====== */
.header,
.activation-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 70px var(--spacing) 24px;
}

/* Day Badge */
.day-badge {
  text-align: right;
}

.day-badge .num {
  font-size: 32px;
  font-weight: 600;
  line-height: 1;
  color: var(--text);
}

.day-badge .label {
  font-size: 11px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* User Avatars */
.user-avatars {
  display: flex;
  align-items: center;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--peach) 0%, var(--peach-dark) 100%);
  border: 2px solid white;
  margin-right: -10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
}

.avatar:last-of-type {
  margin-right: 0;
}

.avatar-sm {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
  box-shadow: var(--shadow-whisper);
}

.status-dot {
  width: 10px;
  height: 10px;
  background: #4a90d9;
  border-radius: 50%;
  margin-left: 12px;
}

/* Settings Button */
.settings-btn {
  width: 46px;
  height: 46px;
  background: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
}

.settings-btn:hover {
  box-shadow: var(--shadow-medium);
}

.settings-btn svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-2);
  fill: none;
  stroke-width: 1.5;
}

/* Header Actions Row */
/* Header Actions Row */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Header Icon Button (Journal button in Today header) */
.header-icon-btn {
  width: 44px;
  height: 44px;
  background: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
}

.header-icon-btn:hover {
  box-shadow: var(--shadow-medium);
  transform: scale(1.05);
}

.header-icon-btn svg {
  width: 20px;
  height: 20px;
  fill: var(--text);
}
/* Location Refresh Button */
.location-refresh-btn {
  width: 44px;
  height: 44px;
  background: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-whisper);
  transition: all 0.2s ease;
}

.location-refresh-btn:hover {
  box-shadow: var(--shadow-soft);
}

.location-refresh-btn svg {
  width: 18px;
  height: 18px;
  fill: var(--text);
  transition: transform 0.3s ease;
}

.location-refresh-btn:hover svg {
  fill: var(--green);
}

.location-refresh-btn.refreshing svg {
  animation: spin-gps 1s linear infinite;
}

.location-refresh-btn.refreshing {
  opacity: 0.7;
  pointer-events: none;
}

@keyframes spin-gps {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Location Refresh Button - Inline (inside activity card) */
.location-refresh-btn-inline {
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 8px;
  vertical-align: middle;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.location-refresh-btn-inline:hover {
  background: rgba(255, 255, 255, 0.3);
}

.location-refresh-btn-inline svg {
  width: 14px;
  height: 14px;
  fill: white;
  transition: transform 0.3s ease;
}

.location-refresh-btn-inline:hover svg {
  fill: white;
}

.location-refresh-btn-inline.refreshing svg {
  animation: spin-gps 1s linear infinite;
}

.location-refresh-btn-inline.refreshing {
  opacity: 0.7;
  pointer-events: none;
}

/* ====== Main Activity Card - Felix's Green Gradient ====== */
.activity-card {
  background: linear-gradient(145deg, #5a8a5a 0%, #4a7a4a 100%);
  border-radius: var(--radius-xl);
  padding: 24px;
  color: white;
  position: relative;
  overflow: hidden;
  margin: 0 var(--spacing) 16px;
  box-shadow: 0 12px 40px rgba(90, 138, 90, 0.3);
}

.activity-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  pointer-events: none;
}

.activity-card::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -30px;
  width: 140px;
  height: 140px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  pointer-events: none;
}

/* Activity Card - Empty State (white card) */
.activity-card-empty {
  background: white;
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

.activity-card-empty::before,
.activity-card-empty::after {
  display: none;
}

.activity-card-empty .section-heading {
  margin: 0 0 8px;
  color: var(--text);
}

.activity-card-empty .section-subtitle {
  margin: 0;
  color: var(--text-3);
}

/* Heart/Favorite Button */
.heart-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2;
  transition: all 0.2s ease;
}

.heart-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.heart-btn svg {
  width: 20px;
  height: 20px;
  stroke: white;
  fill: none;
  stroke-width: 1.5;
}

.heart-btn.liked svg {
  fill: white;
}

/* Activity Type Label */
.activity-type {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.8;
  margin-bottom: 12px;
}

/* Activity Name/Title */
.activity-name,
.activity-title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
  color: white;
}

/* Activity Meta (rating, duration) */
.activity-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  opacity: 0.85;
  margin-bottom: 20px;
}

.activity-rating {
  display: flex;
  align-items: center;
  gap: 4px;
}

.activity-rating svg {
  fill: #ffd700;
  width: 14px;
  height: 14px;
}

/* Activity Description */
.activity-desc {
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.9;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

/* Activity Location */
.activity-location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  opacity: 0.85;
  margin-bottom: 12px;
}

.activity-location svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  opacity: 0.8;
}

.activity-location-prominent {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
}

.activity-location-prominent svg {
  width: 18px;
  height: 18px;
  fill: rgba(255, 255, 255, 0.8);
}

/* Start Button - Main CTA */
.btn-start-main,
.activity-begin-btn {
  width: 100%;
  padding: 16px;
  border-radius: 16px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  transition: all 0.2s ease;
  position: relative;
  z-index: 1;
}

.btn-start-main:hover,
.activity-begin-btn:hover {
  background: white;
  transform: translateY(-1px);
}

.btn-start-main:active,
.activity-begin-btn:active {
  transform: scale(0.98);
}

/* Begin Button - Primary Green State */
.activity-begin-btn-primary {
  background: var(--green) !important;
  color: white !important;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 12px rgba(106, 170, 106, 0.3);
}

.activity-begin-btn-primary:hover {
  background: #5a9a5a !important;
  box-shadow: 0 6px 16px rgba(106, 170, 106, 0.4);
}

/* Activity Card Actions */
.activity-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.activity-actions-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ====== Mini Cards (Switch/Share) - Felix's Design ====== */
.mini-cards {
  display: flex;
  gap: 12px;
  margin: 0 var(--spacing) 16px;
}

.mini-card {
  flex: 1;
  background: white;
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mini-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.mini-card.blue {
  background: linear-gradient(135deg, #f5f8fc 0%, var(--blue-light) 100%);
}

.mini-card.peach {
  background: linear-gradient(135deg, #fcf8f5 0%, var(--peach) 100%);
}

.mini-card .blob {
  position: absolute;
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  bottom: -30px;
  right: -20px;
  pointer-events: none;
}

.mini-card .label {
  font-size: 11px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.mini-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 2px 0;
  color: var(--text);
}

.mini-card p {
  font-size: 12px;
  color: var(--text-3);
  margin: 0;
}

/* ====== Feedback Card ====== */
.feedback-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 18px;
  margin: 0 var(--spacing) 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: all 0.2s ease;
}

.feedback-card:hover {
  background: #fafafa;
}

.feedback-card p {
  font-size: 15px;
  color: var(--text-3);
  margin: 0;
}

.feedback-card span {
  color: var(--text-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ====== Activity Mode - In-Activity Experience ====== */
.activity-mode {
  display: none;
  position: fixed;
  inset: 0;
  flex-direction: column;
  background: linear-gradient(180deg, #fafafa 0%, #f8f6fa 100%);
  z-index: 200;
}

.activity-mode.active {
  display: flex;
}

/* Directions View */
.directions-view {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.directions-view.hidden {
  display: none;
}

/* Map Container */
.map-container {
  flex: 1;
  background: linear-gradient(180deg, #e8f0e8 0%, #d0e0d0 100%);
  position: relative;
  overflow: hidden;
}

.map-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
}

.map-placeholder svg {
  width: 64px;
  height: 64px;
  stroke: var(--green);
  fill: none;
  stroke-width: 1.5;
  opacity: 0.6;
}

.map-placeholder p {
  font-size: 14px;
  color: var(--text-3);
}

/* Map visual elements */
/* FIX Issue #2: Completely remove decorative cross overlay on map */
.map-container::before {
  content: none !important; /* Prevents pseudo-element generation entirely */
  display: none !important;
}

.map-container::after {
  content: none !important; /* Prevents pseudo-element generation entirely */
  display: none !important;
}

/* FIX Issue #2: Ensure map fills container properly */
.map-container {
  flex: 1;
  min-height: 0; /* Prevents flex item from overflowing */
  background: linear-gradient(180deg, #e8f0e8 0%, #d0e0d0 100%);
  position: relative;
  overflow: hidden;
}

.map-iframe-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.map-iframe-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block; /* Removes inline spacing */
}

/* Google Map iframe container */
.map-iframe-container {
  position: absolute;
  inset: 0;
}

.map-iframe-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Directions Card */
.directions-card {
  background: white;
  border-radius: 28px 28px 0 0;
  padding: 24px 24px 40px;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.08);
}

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

.directions-info h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 4px 0;
  color: var(--text);
}

.directions-info p {
  font-size: 14px;
  color: var(--text-3);
  margin: 0;
}

.directions-eta {
  text-align: right;
}

.directions-eta .time {
  font-size: 24px;
  font-weight: 600;
  color: var(--green);
}

.directions-eta .label {
  font-size: 12px;
  color: var(--text-3);
}

.directions-actions {
  display: flex;
  gap: 12px;
}

.dir-btn {
  flex: 1;
  padding: 16px;
  border-radius: 16px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.dir-btn:active {
  transform: scale(0.98);
}

.dir-btn.primary {
  background: var(--text);
  color: white;
}

.dir-btn.primary:hover {
  background: #333;
}

.dir-btn.secondary {
  background: #f3f3f3;
  color: var(--text-2);
}

.dir-btn.secondary:hover {
  background: #e8e8e8;
}

/* Journal View (In-Activity) */
.journal-view {
  flex: 1;
  display: none;
  flex-direction: column;
  padding: 70px 24px 140px;
}

.journal-view.active {
  display: flex;
}

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

.journal-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--green);
  font-weight: 500;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.9);
  }
}

.end-btn {
  font-size: 14px;
  color: var(--text-3);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.2s ease;
}

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

.journal-area {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.journal-prompt {
  font-size: 28px;
  font-weight: 400;
  color: var(--text-3);
  margin-bottom: 16px;
  transition: all 0.3s ease;
}

.journal-prompt.hidden {
  opacity: 0;
  height: 0;
  margin: 0;
  overflow: hidden;
}

.journal-input {
  flex: 1;
  font-family: inherit;
  font-size: 22px;
  color: var(--text);
  border: none;
  outline: none;
  resize: none;
  background: transparent;
  line-height: 1.6;
}

.journal-input::placeholder {
  color: var(--text-3);
  opacity: 0.6;
}

/* Play Floating Button (in Activity Mode) - FIX Issue #4a: Better spacing */
.play-float-btn {
  position: fixed;
  bottom: 100px; /* FIX #4a: Increased from 40px to avoid cramping with directions card */
  left: 50%;
  transform: translateX(-50%);
  width: 72px; /* FIX #4a: Slightly larger for better tap target */
  height: 72px;
  background: var(--text);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  transition: all 0.2s ease;
  z-index: 70;
}

.play-float-btn:hover {
  background: #333;
  transform: translateX(-50%) translateY(-2px);
}

.play-float-btn:active {
  transform: translateX(-50%) scale(0.95);
}

.play-float-btn svg {
  width: 28px; /* FIX #4a: Slightly larger icon */
  height: 28px;
  fill: white;
  margin-left: 4px;
}

/* FIX Issue #4a: Playing state for floating button */
.play-float-btn.playing svg {
  margin-left: 0;
}
/* ====== Mini Player - Background Audio (Issue #4b) ====== */
.mini-player {
  position: fixed;
  bottom: 160px; /* Above the nav bar but below activity mode elements */
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 400px;
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 180;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(20px);
  transition: all 0.3s ease;
}

.mini-player.visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.mini-player.hidden {
  display: none;
}

.mini-player-content {
  display: flex;
  flex-direction: column;
}

.mini-player-progress-bar {
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  width: 100%;
}

.mini-player-progress {
  height: 100%;
  width: 0%;
  background: var(--green);
  transition: width 0.1s linear;
}

.mini-player-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
}

.mini-player-info {
  flex: 1;
  min-width: 0;
}

.mini-player-title {
  font-size: 14px;
  font-weight: 500;
  color: white;
  margin: 0 0 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-player-time {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.mini-player-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mini-player-btn {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mini-player-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.mini-player-btn svg {
  width: 18px;
  height: 18px;
  fill: white;
}

.mini-player-play-btn svg {
  margin-left: 2px;
}

.mini-player-play-btn.playing svg {
  margin-left: 0;
}

.mini-player-icon-play {
  display: block;
}

.mini-player-icon-pause {
  display: none;
}

.mini-player-play-btn.playing .mini-player-icon-play {
  display: none;
}

.mini-player-play-btn.playing .mini-player-icon-pause {
  display: block;
}

.mini-player-close-btn {
  background: transparent;
  width: 32px;
  height: 32px;
}

.mini-player-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.mini-player-close-btn svg {
  width: 16px;
  height: 16px;
  fill: rgba(255, 255, 255, 0.6);
}

/* Mini player responsive */
@media (max-width: 480px) {
  .mini-player {
    bottom: 140px;
    width: calc(100% - 24px);
  }
  
  .mini-player-main {
    padding: 10px 14px;
  }
  
  .mini-player-title {
    font-size: 13px;
  }
  
  .mini-player-btn {
    width: 36px;
    height: 36px;
  }
  
  .mini-player-btn svg {
    width: 16px;
    height: 16px;
  }
}
/* ====== Stimulus Page - Felix's Redesigned Player ====== */
.stimulus-page {
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background: #000;
  min-height: 100vh;
}

.stimulus-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.stimulus-title {
  position: absolute;
  top: 80px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 24px;
  font-weight: 500;
  color: var(--text-3);
  z-index: 5;
  opacity: 0.6;
}

.stimulus-tap-area {
  position: absolute;
  inset: 0;
  z-index: 10;
  cursor: pointer;
}

.chills-counter {
  position: absolute;
  bottom: 130px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border-radius: 20px;
  padding: 16px 28px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  text-align: center;
  z-index: 20;
}

.chills-counter .count {
  font-size: 28px;
  font-weight: 600;
  color: var(--text);
}

.chills-counter .label {
  font-size: 13px;
  color: var(--text-3);
}

/* ====== Timeline Page - Felix's Design ====== */
.timeline-page {
  padding: 70px 24px 140px;
  overflow-y: auto;
  background: linear-gradient(180deg, #fafafa 0%, #f8f6fa 100%);
}

.timeline-page::-webkit-scrollbar {
  display: none;
}

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

.timeline-header h1 {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -1px;
  margin: 0;
  color: var(--text);
}

/* Timeline Stats */
.timeline-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
}

.stat-card {
  flex: 1;
  background: white;
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
}

.stat-card.green {
  background: linear-gradient(135deg, #f0f8f0 0%, var(--green-light) 100%);
}

.stat-card.blue {
  background: linear-gradient(135deg, #f5f8fc 0%, var(--blue-light) 100%);
}

.stat-card .blob {
  position: absolute;
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  top: -20px;
  right: -10px;
  pointer-events: none;
}

.stat-card .value {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 2px;
  color: var(--text);
}

.stat-card .label {
  font-size: 12px;
  color: var(--text-3);
}

/* Timeline Sections */
.t-section {
  margin-bottom: 24px;
}

.t-date {
  font-size: 12px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.t-item {
  background: white;
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 10px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
}

.t-item::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, transparent 0%, rgba(200, 220, 200, 0.2) 100%);
  border-radius: 0 20px 0 80px;
  pointer-events: none;
}

.t-item h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px 0;
  color: var(--text);
}

.t-item p {
  font-size: 13px;
  color: var(--text-3);
  margin: 0;
}

.t-item.journal {
  border-left: 3px solid var(--peach-dark);
  background: linear-gradient(135deg, #fefefe 0%, #faf8f6 100%);
}

.t-item.journal .entry {
  margin-top: 10px;
  font-size: 14px;
  color: var(--text-2);
  font-style: italic;
  line-height: 1.5;
}

/* ====== Overlays - Felix's Bottom Sheet Style ====== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 150;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  display: flex;
  align-items: flex-end;
}

.overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  width: 100%;
  background: white;
  border-radius: 32px 32px 0 0;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 85%;
  overflow: hidden;
}

.overlay.open .modal {
  transform: translateY(0);
}

.modal-handle {
  width: 40px;
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  margin: 16px auto;
}

.modal-body {
  padding: 0 24px 40px;
  max-height: 70vh;
  overflow-y: auto;
}

.modal-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text);
}

/* Detail Modal */
.detail-image {
  height: 160px;
  background: linear-gradient(145deg, #5a8a5a 0%, #4a7a4a 100%);
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 20px;
}

.detail-image h2 {
  font-size: 24px;
  font-weight: 600;
  color: white;
  margin: 0;
  position: relative;
  z-index: 1;
}

.detail-content {
  padding: 24px;
}

.detail-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.detail-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-3);
}

.detail-meta-item svg {
  width: 16px;
  height: 16px;
  stroke: var(--text-3);
  fill: none;
  stroke-width: 1.5;
}

.detail-desc {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-2);
  margin-bottom: 20px;
}

.detail-why {
  padding: 16px;
  background: var(--green-light);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.detail-why-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 6px;
}

.detail-why-text {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.5;
  margin: 0;
}

.detail-actions {
  display: flex;
  gap: 12px;
}

.detail-actions .btn {
  flex: 1;
}

/* Switch Activity Modal */
.switch-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.switch-option {
  padding: 18px;
  background: white;
  border: 2px solid var(--ink-whisper);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.switch-option:hover {
  border-color: var(--text-3);
  background: #fafafa;
}

.switch-option.selected {
  border-color: var(--green);
  background: linear-gradient(135deg, #fafafa 0%, rgba(106, 170, 106, 0.05) 100%);
}

.switch-option-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.switch-option h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 4px 0;
  color: var(--text);
}

.switch-option .type-badge {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 12px;
  background: var(--green-light);
  color: var(--green);
  font-weight: 500;
}

.switch-option .meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 10px;
}

.switch-option .meta .rating {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-2);
}

.switch-option .meta .rating svg {
  width: 12px;
  height: 12px;
  fill: #ffd700;
}

.switch-option .desc {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.5;
}

/* Feedback Modal */
.feedback-input {
  width: 100%;
  padding: 16px;
  border: 2px solid #f0f0f0;
  border-radius: 16px;
  font-family: inherit;
  font-size: 15px;
  resize: none;
  outline: none;
  min-height: 120px;
  margin-bottom: 16px;
  transition: border-color 0.2s ease;
}

.feedback-input:focus {
  border-color: var(--green);
}

.feedback-submit {
  width: 100%;
  padding: 16px;
  background: var(--text);
  color: white;
  border: none;
  border-radius: 16px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.feedback-submit:hover {
  background: #333;
}

/* ====== Centered Modal (Legacy + New) ====== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 149;
}

.modal-content {
  width: 100%;
  max-width: 520px;
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-strong);
  position: relative;
  z-index: 150;
  max-height: 86vh;
  overflow: auto;
  margin: 16px;
}

.modal.hidden {
  display: none !important;
}

/* Activity Detail Modal - Centered */
.activity-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.activity-detail-modal.open {
  opacity: 1;
  visibility: visible;
}

.activity-detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.activity-detail-content {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  margin: 16px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.activity-detail-modal.open .activity-detail-content {
  transform: translateY(0);
}

.activity-detail-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

.activity-detail-close:hover {
  background: white;
  transform: scale(1.05);
}

.activity-detail-close svg {
  width: 18px;
  height: 18px;
  fill: var(--text);
}

.activity-detail-image {
  position: relative;
  height: 220px;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(145deg, #5a8a5a 0%, #4a7a4a 100%);
}

.activity-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.activity-detail-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.4) 100%);
}

.activity-detail-badge {
  position: absolute;
  bottom: 16px;
  left: 16px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.activity-detail-badge svg {
  width: 14px;
  height: 14px;
  fill: var(--text-2);
}

.activity-detail-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.activity-detail-category {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 8px;
}

.activity-detail-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 12px 0;
  line-height: 1.3;
  color: var(--text);
}

.activity-detail-desc {
  font-size: 0.9375rem;
  color: var(--text-2);
  margin: 0 0 20px 0;
  line-height: 1.7;
}

.activity-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.activity-detail-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--text-3);
}

.activity-detail-meta-item svg {
  width: 14px;
  height: 14px;
  fill: var(--text-3);
}

.activity-detail-connection {
  padding: 16px;
  background: var(--green-light);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--green);
  margin-bottom: 24px;
}

.activity-detail-connection-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 6px;
}

.activity-detail-connection-text {
  font-size: 0.9375rem;
  font-style: italic;
  color: var(--text-2);
  margin: 0;
  line-height: 1.5;
}

.activity-detail-body .btn {
  width: 100%;
}

/* ====== Buttons - Felix's Style ====== */
.btn {
  padding: 14px 20px;
  border-radius: 16px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.btn-primary {
  background: var(--text);
  color: white;
}

.btn-primary:hover {
  background: #333;
}

.btn-secondary {
  background: #f3f3f3;
  color: var(--text-2);
}

.btn-secondary:hover {
  background: #e8e8e8;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--ink-whisper);
}

.btn-ghost:hover {
  background: #f5f5f5;
}

.btn-sm {
  padding: 10px 16px;
  font-size: 14px;
  border-radius: 12px;
}

/* Legacy button classes */
.primary-btn {
  border-radius: 16px;
  border: none;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  background: var(--text);
  color: white;
  transition: all 0.2s ease;
}

.primary-btn:hover {
  background: #333;
}

.secondary-btn {
  border-radius: 16px;
  border: none;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  background: #f3f3f3;
  color: var(--text-2);
  transition: all 0.2s ease;
}

.secondary-btn:hover {
  background: #e8e8e8;
}

.ghost-btn {
  border-radius: 16px;
  border: 1px solid var(--ink-whisper);
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  background: transparent;
  color: var(--text);
  transition: all 0.2s ease;
}

.ghost-btn:hover {
  background: #f5f5f5;
}

.small-btn {
  font-size: 14px;
  padding: 10px 16px;
}

/* Swap Button - Prominent Style */
.activity-swap-btn,
.activity-swap-btn-prominent {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: white;
  border: 1px solid var(--ink-whisper);
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-2);
}

.activity-swap-btn:hover,
.activity-swap-btn-prominent:hover {
  background: #f5f5f5;
  border-color: var(--text-3);
  color: var(--text);
}

.activity-swap-btn svg,
.activity-swap-btn-prominent svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.swap-btn-text {
  display: inline;
}

/* Share Button */
.activity-share-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.97);
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
}

.activity-share-btn:hover {
  background: white;
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.activity-share-btn svg {
  width: 16px;
  height: 16px;
  fill: var(--text);
}

.activity-share-btn.whatsapp svg {
  fill: #25D366;
}

/* Directions Button */
.activity-directions-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #f3f3f3;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.activity-directions-btn:hover {
  background: #e8e8e8;
  color: #4285F4;
}

.activity-directions-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ====== Forms - Felix's Clean Style ====== */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-label {
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.02em;
}

.form-label-light {
  font-size: 0.9375rem;
  font-weight: 500;
  color: white;
  margin: 0 0 12px 0;
}

.required {
  color: #dc2626;
  margin-left: 3px;
}

.form-input,
.form-textarea {
  border-radius: 16px;
  border: 2px solid #f0f0f0;
  padding: 14px 16px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  background: white;
  color: var(--text);
  transition: border-color 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--green);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-textarea-dark {
  width: 100%;
  min-height: 100px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  color: white;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
}

.form-textarea-dark::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.form-textarea-dark:focus {
  border-color: rgba(255, 255, 255, 0.3);
}

.form-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--ink-whisper);
  border-radius: 999px;
  outline: none;
}

.form-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--green);
  border: 3px solid white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-section {
  margin-bottom: 28px;
}

.form-hint {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 12px 0;
}

.form-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-option {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  color: white;
  font-family: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.form-option:hover {
  background: rgba(255, 255, 255, 0.12);
}

.form-option.active,
.form-option.selected {
  background: var(--green);
  border-color: var(--green);
}

.form-submit {
  width: 100%;
  padding: 16px;
  background: white;
  border: none;
  border-radius: 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.form-submit:hover {
  background: #f5f5f5;
}

/* Legacy form classes */
.text-input,
.textarea-input {
  border-radius: 16px;
  border: 2px solid #f0f0f0;
  padding: 14px 16px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  background: white;
  color: var(--text);
  transition: border-color 0.2s ease;
}

.text-input:focus,
.textarea-input:focus {
  border-color: var(--green);
}

.textarea-input {
  resize: vertical;
  min-height: 100px;
}

/* Segmented options */
.segmented-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.segmented-option {
  border-radius: 100px;
  border: 2px solid #f0f0f0;
  background: white;
  padding: 10px 16px;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
  color: var(--text-2);
  transition: all 0.2s ease;
}

.segmented-option.selected {
  background: var(--text);
  color: white;
  border-color: var(--text);
}

/* ====== Toast ====== */
.toast {
  position: fixed;
  bottom: 200px;
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 24px;
  border-radius: 100px;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  font-size: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  z-index: 500;
  max-width: 320px;
  text-align: center;
}

/* ====== Generating/Loading State ====== */
.generating-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing);
  background: linear-gradient(180deg, #fafafa 0%, #f8f6fa 100%);
}

.generating-card {
  max-width: 400px;
  width: 100%;
  background: white;
  border-radius: var(--radius-xl);
  padding: 48px 32px;
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.gen-spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid #f0f0f0;
  border-top-color: var(--green);
  margin: 0 auto 20px;
  animation: spin 1s linear infinite;
}

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

/* Inline Loader */
.inline-loader {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 16px;
  background: white;
  box-shadow: var(--shadow-whisper);
}

.inline-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #f0f0f0;
  border-top-color: var(--green);
  animation: spin 1s linear infinite;
}

.inline-loader-text {
  font-size: 13px;
  color: var(--text-2);
}

/* ====== Share Modal ====== */
.share-modal-content {
  text-align: center;
  padding: 28px 24px;
}

.share-modal-content .section-heading {
  margin-bottom: 8px;
}

.share-modal-subtitle {
  font-size: 0.9375rem;
  color: var(--text-3);
  margin: 0 0 24px 0;
}

.share-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 8px;
}

.share-option-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 16px 20px;
  background: #f5f5f5;
  border: none;
  border-radius: 16px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
}

.share-option-btn:hover {
  background: #e8e8e8;
}

.share-option-btn .share-icon {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

#share-whatsapp {
  color: #25D366;
}

#share-whatsapp:hover {
  background: rgba(37, 211, 102, 0.1);
}

#share-whatsapp .share-icon {
  fill: #25D366;
}

#share-sms {
  color: var(--text-2);
}
/* ====== Landing Page ====== */
.landing-layout {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 40px var(--spacing);
  background: linear-gradient(155deg, #f0e4e0 0%, #e8e0f0 50%, #e0e8f4 100%);
}

.landing-card {
  width: 100%;
  max-width: 400px;
  background: white;
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.landing-logo {
  width: 100px;
  height: auto;
  display: block;
  border-radius: 16px;
  margin: 0 auto 24px;
  box-shadow: var(--shadow-whisper);
}

.landing-kicker {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 11px;
  color: var(--green);
  font-weight: 600;
  margin: 0 0 8px;
}

.landing-title {
  margin: 0 0 28px;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--text);
}

/* Auth Form */
.auth-form-container {
  margin-top: 24px;
  width: 100%;
}

.auth-tabs {
  display: flex;
  background: #f5f5f5;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 20px;
}

.auth-tab {
  flex: 1;
  padding: 10px 16px;
  background: transparent;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-3);
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab:hover {
  color: var(--text);
}

.auth-tab.active {
  background: white;
  color: var(--text);
  box-shadow: var(--shadow-whisper);
}

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

.auth-form .form-field {
  margin-bottom: 0;
}

.auth-form .form-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
}

.auth-name-field {
  overflow: hidden;
  max-height: 70px;
  opacity: 1;
  transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
}

.auth-name-field.hidden {
  max-height: 0;
  opacity: 0;
  margin: 0;
}

.auth-error {
  padding: 12px 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  color: #dc2626;
  font-size: 14px;
  text-align: center;
}

.auth-error.hidden {
  display: none;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}

.auth-divider-line {
  flex: 1;
  height: 1px;
  background: #e8e8e8;
}

.auth-divider-text {
  font-size: 12px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

#auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ====== Pre-Intake Screen ====== */
.pre-intake-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing);
  background: linear-gradient(155deg, #f0e4e0 0%, #e8e0f0 50%, #e0e8f4 100%);
}

.pre-intake-content {
  width: 100%;
  max-width: 480px;
}

.pre-intake-header {
  text-align: center;
  margin-bottom: 24px;
}

.pre-intake-title {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0;
  color: var(--text);
}

.pre-intake-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-soft);
}

.pre-intake-question {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text);
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.pre-intake-hint {
  font-size: 15px;
  color: var(--text-3);
  margin: 0 0 20px 0;
  font-style: italic;
}

.pre-intake-textarea {
  min-height: 140px;
  font-size: 1rem;
  line-height: 1.7;
}

.pre-intake-footer {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.pre-intake-footer .btn-primary {
  width: 100%;
  max-width: 280px;
}

.pre-intake-footer .btn-ghost {
  font-size: 14px;
  color: var(--text-3);
  border: none;
  padding: 8px 16px;
}

.pre-intake-footer .btn-ghost:hover {
  color: var(--text);
  background: transparent;
}

/* ====== Intake Flow ====== */
.intake-shell {
  margin: 0 auto;
  max-width: 500px;
  padding: 0 var(--spacing);
  min-height: 100vh;
  background: linear-gradient(180deg, #fafafa 0%, #f8f6fa 100%);
}

.intake-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding-top: 70px;
}

.intake-step-pill {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--green);
  color: white;
  font-weight: 600;
  font-size: 15px;
}

.intake-title {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--text);
}

.intake-subtitle {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--text-3);
}

/* Intake Progress - Dots only */
.intake-progress-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-bottom: 24px;
}

.intake-progress-bar {
  display: none;
}

.intake-progress-fill {
  display: none;
}

.intake-progress-steps {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.intake-progress-step {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e8e8e8;
  transition: background 0.3s ease;
}

.intake-progress-step.active {
  background: var(--green);
}

.intake-progress-step.completed {
  background: var(--green);
}

.intake-card {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  padding: 24px;
}

.intake-step {
  min-height: 200px;
}

.section-heading {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.section-subtitle {
  margin: 0 0 18px;
  font-size: 14px;
  color: var(--text-3);
}

.intake-footer {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.intake-footer-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.step-label {
  font-size: 13px;
  color: var(--text-3);
}

/* Schema Questions */
.schema-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.schema-item {
  border-radius: 16px;
  border: 2px solid #f0f0f0;
  padding: 16px;
  background: white;
}

.schema-title {
  font-size: 15px;
  margin: 0 0 4px;
  color: var(--text);
  font-weight: 500;
}

.schema-subtitle {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin-bottom: 10px;
}

.schema-visual-scale {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.schema-slider-container {
  position: relative;
  padding: 0 8px;
}

.schema-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: linear-gradient(to right, #e8e8e8 0%, var(--green) 100%);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.schema-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: white;
  border: 3px solid var(--green);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.schema-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.schema-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: white;
  border: 3px solid var(--green);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}

.schema-scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-3);
  padding: 0 4px;
}

.schema-scale-label {
  max-width: 80px;
  text-align: center;
  line-height: 1.3;
}

.schema-scale-label:first-child {
  text-align: left;
}

.schema-scale-label:last-child {
  text-align: right;
}

.schema-scale {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.schema-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 6px;
}

.schema-radio {
  border-radius: 100px;
  border: 2px solid #f0f0f0;
  background: white;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-2);
  transition: all 0.2s ease;
}

.schema-radio-active {
  background: var(--text);
  border-color: var(--text);
  color: white;
}

.schema-radio-number {
  font-weight: 600;
  font-size: 12px;
}

/* =============================================================================
   PHQ-9 Questions - NEW DESIGN (Matching rewire-phq9.html)
   ============================================================================= */

/* PHQ-9 Container - Full Screen */
.phq9-screen-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(155deg, #f0e4e0 0%, #e8e0f0 50%, #e0e8f4 100%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.phq9-screen-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
  background: linear-gradient(180deg, #fefefe 0%, #faf8fc 100%);
  overflow: hidden;
}

/* PHQ-9 Header */
.phq9-header {
  padding: 60px 28px 16px;
  text-align: center;
}

.phq9-header-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.phq9-header-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.phq9-header-subtitle {
  font-size: 15px;
  color: var(--text-3);
}

/* PHQ-9 Questions Container (scrollable) */
.phq9-questions-container {
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px 20px;
  scroll-behavior: smooth;
}

.phq9-questions-container::-webkit-scrollbar {
  display: none;
}

/* PHQ-9 Question Card */
.phq9-question-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 18px 20px;
  margin-bottom: 14px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
}

.phq9-question-card.answered {
  background: #f8f7f6;
}

.phq9-question-text {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.45;
  margin-bottom: 16px;
}

/* PHQ-9 Frequency Scale */
.phq9-frequency-scale {
  position: relative;
}

.phq9-scale-track {
  position: relative;
  height: 48px;
  background: linear-gradient(90deg, #f5f2f0 0%, #f0eeec 50%, #eceae8 100%);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
}

.phq9-scale-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, #e8e4e0 0%, #ddd8d4 50%, #d0ccc8 100%);
  border-radius: 14px;
  transition: width 0.3s ease;
}

.phq9-scale-options {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.phq9-scale-option {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2;
}

.phq9-scale-option:hover .phq9-option-dot {
  transform: scale(1.2);
}

.phq9-option-dot {
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.phq9-scale-option.selected .phq9-option-dot {
  width: 18px;
  height: 18px;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.phq9-scale-bottom-labels {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 10px;
  text-align: center;
}

.phq9-bottom-label {
  font-size: 10px;
  color: var(--text-3);
  line-height: 1.3;
  padding: 0 2px;
  transition: all 0.2s ease;
}

.phq9-bottom-label.selected {
  color: var(--text);
  font-weight: 600;
}

/* PHQ-9 Safety Warning for Question 9 */
.phq9-safety-warning {
  margin-top: 16px;
  padding: 16px;
  background: linear-gradient(135deg, #fff8e6 0%, #fff3d4 100%);
  border-radius: 14px;
  border-left: 4px solid #f59e0b;
}

.phq9-safety-warning-title {
  font-size: 14px;
  font-weight: 600;
  color: #92400e;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.phq9-safety-warning-text {
  font-size: 13px;
  color: #78350f;
  line-height: 1.5;
  margin: 0;
}

/* PHQ-9 Optional Text Fields */
.phq9-textbox-container {
  display: none;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed #e8e8e8;
}

.phq9-textbox-container.visible {
  display: block;
}

.phq9-textbox-label {
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 8px;
  display: block;
}

.phq9-textarea {
  width: 100%;
  min-height: 80px;
  padding: 14px;
  background: #fafafa;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  resize: none;
  outline: none;
  line-height: 1.5;
}

.phq9-textarea:focus {
  border-color: var(--green);
  background: white;
}

.phq9-textarea::placeholder {
  color: #bbb;
}

/* PHQ-9 Bottom Action */
.phq9-bottom-action {
  padding: 12px 24px 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(180deg, transparent 0%, rgba(248, 228, 220, 0.3) 50%, rgba(220, 232, 248, 0.4) 100%);
}

.phq9-continue-btn {
  width: 100%;
  padding: 17px 32px;
  background: var(--text);
  color: white;
  border: none;
  border-radius: 16px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.phq9-continue-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.phq9-continue-btn:disabled {
  background: #d0d0d0;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* PHQ-9 Completion Screen */
.phq9-completion-screen {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #fefefe 0%, #faf8fc 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 28px;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s ease;
  z-index: 50;
}

.phq9-completion-screen.show {
  opacity: 1;
  visibility: visible;
}

.phq9-completion-check {
  width: 72px;
  height: 72px;
  background: var(--green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.phq9-completion-check svg {
  width: 36px;
  height: 36px;
  stroke: white;
  stroke-width: 3;
  fill: none;
}

.phq9-completion-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.phq9-completion-subtitle {
  font-size: 15px;
  color: var(--text-3);
  line-height: 1.5;
  max-width: 260px;
  margin-bottom: 40px;
}

/* Legacy PHQ-9 Styles (for backwards compatibility) */
.phq9-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.phq9-item {
  border-radius: 20px;
  padding: 18px 20px;
  background: white;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
}

.phq9-item.answered {
  background: #f8f7f6;
}

.phq9-question {
  font-size: 15px;
  font-weight: 500;
  margin: 0 0 16px;
  color: var(--text);
  line-height: 1.45;
}

.phq9-slider-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.phq9-slider-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.phq9-slider-line span {
  font-size: 11px;
  color: var(--text-3);
  min-width: 20px;
}

.phq9-slider {
  flex: 1;
}

.phq9-chip {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  background: var(--green-light);
  color: var(--green);
  margin-top: 6px;
  font-weight: 500;
}

.phq9-note {
  margin-top: 10px;
}

.phq9-note .form-textarea,
.phq9-textbox-container .form-textarea {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

/* Range input global */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: #e8e8e8;
  border-radius: 3px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--green);
  border: 3px solid white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--green);
  border: 3px solid white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

/* Callouts */
.callout {
  margin-top: 16px;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}

.callout strong {
  font-weight: 600;
}

.callout-danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
}

.callout-info {
  background: var(--blue-light);
  border: 1px solid #c7d7eb;
  color: var(--text-2);
}

/* Card choices (Step 4) */
.card-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-choice {
  border-radius: 16px;
  border: 2px solid #f0f0f0;
  padding: 14px 16px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
}

.card-choice:hover {
  border-color: #e0e0e0;
  background: #fafafa;
}

.card-choice-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-emoji {
  font-size: 20px;
}

.card-label {
  font-size: 15px;
  color: var(--text);
}

.card-choice.selected {
  border-color: var(--green);
  background: var(--green-light);
}

.step4-stage {
  min-height: 260px;
}

.inline-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mt-sm {
  margin-top: 6px;
}

.mt-md {
  margin-top: 12px;
}

.actions-list {
  margin: 12px 0 0;
  padding-left: 18px;
  font-size: 14px;
  color: var(--text-2);
}

.weekplan-card {
  margin-top: 16px;
  border-radius: 16px;
  padding: 16px;
  background: var(--green-light);
  border: 1px solid rgba(106, 170, 106, 0.3);
}

.weekplan-title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--green);
}

.weekplan-body {
  margin: 0;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
}

.weekplan-summary {
  margin-top: 16px;
  padding: 0;
  background: none;
  border-radius: 0;
  border: none;
}

.weekplan-summary .weekplan-body {
  margin: 0;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
}

.card-block {
  margin-top: 16px;
  border-radius: 16px;
  border: 2px solid #f0f0f0;
  padding: 14px 16px;
  background: #fafafa;
}

.card-nested {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #e0e0e0;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-2);
}

/* ====== Welcome Card (Today Screen) ====== */
.welcome-card {
  background: white;
  margin: 0 var(--spacing) 24px;
  padding: 24px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  position: relative;
}

.welcome-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.welcome-greeting {
  font-size: 14px;
  color: var(--text-3);
  margin: 0 0 4px 0;
}

.welcome-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.2;
  color: var(--text);
}

.divider {
  height: 1px;
  background: #f0f0f0;
  margin: 16px 0;
}

.narrative-section {
  position: relative;
}

.narrative-text {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-2);
  margin: 0 0 16px 0;
}

.edit-btn {
  position: absolute;
  top: 0;
  right: 0;
  width: 32px;
  height: 32px;
  background: #f5f5f5;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.edit-btn:hover {
  opacity: 1;
}

.edit-btn svg {
  width: 14px;
  height: 14px;
  fill: var(--text-3);
}

.insight-box {
  background: var(--peach);
  padding: 16px;
  border-radius: 16px;
  border-left: 3px solid var(--peach-dark);
}

.insight-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--peach-dark);
  margin-bottom: 6px;
}

.insight-question {
  font-size: 15px;
  font-style: italic;
  color: var(--text-2);
  margin: 0;
  line-height: 1.5;
}

.today-hero-footer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 13px;
  color: var(--text-3);
}

.today-streak-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
}

.today-streak-value {
  font-weight: 600;
  color: var(--text);
}

/* Reflection Input */
.reflection-section {
  margin: 0 var(--spacing) 32px;
}

.reflection-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 10px;
  display: block;
}

.reflection-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-whisper);
  border: 2px solid #f0f0f0;
  transition: all 0.2s ease;
}

.reflection-card:focus-within {
  border-color: var(--green);
  box-shadow: var(--shadow-soft);
}

.reflection-textarea {
  width: 100%;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  resize: none;
  outline: none;
  min-height: 80px;
}

.reflection-textarea::placeholder {
  color: var(--text-3);
}

.reflection-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
}

.prompt-chip {
  padding: 8px 14px;
  background: #f5f5f5;
  border: none;
  border-radius: 100px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.2s ease;
}

.prompt-chip:hover {
  background: #e8e8e8;
}

.reflection-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

/* Section Header */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0 var(--spacing);
  margin-bottom: 16px;
}

.section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.section-link {
  font-size: 14px;
  color: var(--text-3);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* Date Badge */
.date-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: white;
  border-radius: 100px;
  box-shadow: var(--shadow-whisper);
}

.date-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.date-text {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text);
}

/* ====== Library/Explore View ====== */
.library-header {
  padding: 70px var(--spacing) 24px;
}

.library-title {
  font-size: 2rem;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: var(--text);
}

.library-subtitle {
  font-size: 15px;
  color: var(--text-3);
  margin: 0;
}

.goal-banner,
.explore-banner {
  margin: 0 var(--spacing) 24px;
  padding: 18px;
  background: white;
  border-radius: var(--radius-lg);
  border-left: 3px solid var(--green);
  box-shadow: var(--shadow-whisper);
}

.goal-label,
.explore-banner-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 6px;
}

.goal-text,
.explore-banner-text {
  font-size: 15px;
  color: var(--text);
  margin: 0 0 10px 0;
  line-height: 1.5;
}

.goal-source {
  font-size: 13px;
  color: var(--text-3);
  font-style: italic;
}

.explore-banner-icon {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.library-filters {
  display: flex;
  gap: 8px;
  padding: 0 var(--spacing);
  margin-bottom: 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.library-filters::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  padding: 10px 18px;
  background: white;
  border: 2px solid #f0f0f0;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-3);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: #e0e0e0;
}

.filter-btn.active {
  background: var(--text);
  border-color: var(--text);
  color: white;
}

.library-grid {
  padding: 0 var(--spacing);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lib-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-whisper);
  cursor: pointer;
  transition: all 0.2s ease;
}

.lib-card:hover {
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

.lib-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.lib-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 4px 0;
  color: var(--text);
}

.lib-card-duration {
  font-size: 13px;
  color: var(--text-3);
}

.lib-card-icon {
  width: 40px;
  height: 40px;
  background: var(--green-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lib-card-icon svg {
  width: 20px;
  height: 20px;
  fill: var(--green);
}

.lib-card-desc {
  font-size: 14px;
  color: var(--text-2);
  margin: 0;
  line-height: 1.5;
}

.lib-card-connection {
  display: none;
}

.lib-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

/* ====== Journal View ====== */
.journal-header {
  padding: 70px var(--spacing) 24px;
}

.journal-title {
  font-size: 2rem;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: var(--text);
}

.journal-subtitle {
  font-size: 15px;
  color: var(--text-3);
  margin: 0;
}

/* Journal Typewriter Screen */
.journal-typewriter-screen {
  min-height: 100vh;
  background: white;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.journal-typewriter-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 80px var(--spacing) 120px;
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
}

.journal-typewriter-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 24px 0;
  line-height: 1.4;
  text-align: left;
  width: 100%;
}

.journal-typewriter-prompt {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-3);
  text-align: left;
  margin: 0 0 16px 0;
  line-height: 1.5;
  width: 100%;
}

.journal-typewriter-textarea {
  width: 100%;
  min-height: 120px;
  flex: 0 0 auto;
  background: transparent;
  border: none;
  border-bottom: 2px solid #f0f0f0;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.7;
  resize: none;
  outline: none;
  padding: 12px 0;
  text-align: left;
}

.journal-typewriter-textarea::placeholder {
  color: var(--text-3);
  font-size: 1.5rem;
  font-weight: 400;
  opacity: 0.7;
}

.journal-typewriter-textarea:focus {
  border-bottom-color: var(--green);
}

.journal-previous-entries {
  width: 100%;
  margin-bottom: 0;
}

.journal-previous-entry {
  padding: 12px 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-2);
}

.journal-entry-separator {
  width: 100%;
  height: 1px;
  background: #f0f0f0;
  margin: 8px 0 16px 0;
}

.journal-entry-separator:empty {
  display: none;
}

.journal-previous-entries:empty + .journal-entry-separator {
  display: none;
}

/* Journal Mind Heading - "What's on your mind today?" */
.journal-mind-heading {
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text-3);
  margin: 0 0 16px 0;
  line-height: 1.4;
  width: 100%;
  opacity: 0.7;
}

.journal-typewriter-actions {
  display: none;
}

.journal-autosave-indicator {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: var(--text-3);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.journal-autosave-indicator.visible {
  opacity: 1;
}

.journal-autosave-indicator.saving {
  color: var(--text-3);
}

.journal-autosave-indicator.saved {
  color: var(--green);
}

.journal-typewriter-close {
  display: none;
}

.journal-typewriter-date {
  display: none;
}

/* Journal Entry Screen */
.journal-entry-screen {
  padding-bottom: 200px;
}

.journal-entry-header {
  padding: 70px var(--spacing) 24px;
}

.journal-entry-title {
  font-size: 2rem;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: var(--text);
}

.journal-entry-subtitle {
  font-size: 15px;
  color: var(--text-3);
  margin: 0;
}

.journal-entry-container {
  padding: 0 var(--spacing);
}

.journal-entry-card {
  padding: 24px;
}

.journal-entry-card .reflection-textarea {
  min-height: 150px;
}

.journal-entry-card .reflection-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 12px;
  display: block;
}

.journal-prompt-chip {
  padding: 8px 14px;
}

/* Profile Header */
.profile-header {
  padding: 70px var(--spacing) 24px;
}

.profile-title {
  font-size: 2rem;
  font-weight: 600;
  margin: 0;
  color: var(--text);
}

.profile-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-soft);
  margin: 0 var(--spacing) 20px;
}

/* Timeline */
.timeline-container {
  padding: 0 var(--spacing);
}

.timeline-scroll-hint {
  text-align: center;
  padding: 16px 0 24px;
  font-size: 13px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.timeline-scroll-hint:hover {
  color: var(--text);
}

.timeline-scroll-hint svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #f0f0f0;
}

.timeline-section {
  margin-bottom: 32px;
}

.timeline-section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 16px;
  padding-left: 4px;
}

.timeline-section-label.today {
  color: var(--peach-dark);
}

.timeline-section-label.upcoming {
  color: var(--green);
}

.timeline-item {
  position: relative;
  margin-bottom: 16px;
}

.timeline-dot {
  position: absolute;
  left: -28px;
  top: 16px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  border: 3px solid #e0e0e0;
}

.timeline-item.today .timeline-dot {
  border-color: var(--peach-dark);
  background: var(--peach-dark);
}

.timeline-item.upcoming .timeline-dot {
  border-color: var(--green);
  background: white;
}

.timeline-dot.chills {
  border-color: var(--green);
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(106, 170, 106, 0.2);
}

.timeline-card {
  background: white;
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow-whisper);
}

.timeline-item.today .timeline-card {
  border: 2px solid var(--peach);
  border-left-width: 4px;
  border-left-color: var(--peach-dark);
}

.timeline-item.upcoming .timeline-card {
  border: 2px solid var(--green-light);
  border-left-width: 4px;
  border-left-color: var(--green);
  opacity: 0.9;
}

.timeline-card.chills-card {
  border-left: 4px solid var(--green);
}

.timeline-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.timeline-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: var(--text);
}

.timeline-card-date {
  font-size: 12px;
  color: var(--text-3);
}

.timeline-card-meta {
  font-size: 13px;
  color: var(--text-3);
  margin: 0 0 12px 0;
}

.timeline-card-insight {
  padding: 12px;
  background: var(--peach);
  border-radius: 12px;
  margin-top: 12px;
}

.timeline-card-insight.chills-insight {
  background: var(--green-light);
}

.timeline-card-insight-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--peach-dark);
  margin-bottom: 6px;
}

.timeline-card-insight.chills-insight .timeline-card-insight-label {
  color: var(--green);
}

.timeline-card-insight-text {
  font-size: 14px;
  font-style: italic;
  color: var(--text-2);
  margin: 0;
  line-height: 1.5;
}

.timeline-past-section {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
}

.timeline-past-section.expanded {
  max-height: 3000px;
}

/* Stats Section */
.stats-section {
  margin-top: 40px;
  padding: 24px 0;
  border-top: 1px solid #f0f0f0;
}

.stats-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 16px;
  padding-left: 4px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stat-item {
  text-align: center;
  padding: 16px 12px;
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow-whisper);
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* ====== Player/Audio Modal ====== */
.player-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 199;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.player-overlay.open {
  opacity: 1;
  visibility: visible;
}

.player {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--text);
  z-index: 200;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.player.open {
  transform: translateY(0);
}

.player-header {
  padding: 16px var(--spacing);
  display: flex;
  justify-content: center;
}

.player-handle {
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.player-handle:hover {
  background: rgba(255, 255, 255, 0.4);
}

.player-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 var(--spacing) 60px;
  color: white;
}

.player-artwork {
  width: 240px;
  height: 240px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-xl);
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.player-artwork::before {
  content: "";
  position: absolute;
  inset: 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  animation: pulse-ring 3s ease-in-out infinite;
}

.player-artwork::after {
  content: "";
  position: absolute;
  inset: 60px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  animation: pulse-ring 3s ease-in-out infinite 0.5s;
}

@keyframes pulse-ring {
  0%, 100% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.05);
    opacity: 1;
  }
}

.player-artwork-rings {
  position: relative;
  width: 180px;
  height: 180px;
}

.player-artwork-rings .artwork-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  animation: pulse-ring 3s ease-in-out infinite;
}

.player-artwork-rings .artwork-ring:nth-child(1) {
  inset: 0;
}

.player-artwork-rings .artwork-ring:nth-child(2) {
  inset: 30px;
  animation-delay: 0.5s;
}

.player-artwork-rings .artwork-ring:nth-child(3) {
  inset: 60px;
  animation-delay: 1s;
  background: radial-gradient(circle, var(--green) 0%, transparent 70%);
  opacity: 0.3;
}

.player-info {
  text-align: center;
  margin-bottom: 32px;
}

.player-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 8px;
}

.player-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 4px 0;
  color: white;
}

.player-subtitle {
  font-size: 14px;
  opacity: 0.6;
  margin: 0;
}

.player-progress {
  width: 100%;
  max-width: 300px;
  margin-bottom: 32px;
}

.player-progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  margin-bottom: 8px;
  overflow: hidden;
  cursor: pointer;
}

.player-progress-fill {
  height: 100%;
  width: 0%;
  background: white;
  border-radius: 2px;
  transition: width 0.1s linear;
}

.player-times {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  opacity: 0.5;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 24px;
}

.player-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.player-btn svg {
  width: 24px;
  height: 24px;
  fill: rgba(255, 255, 255, 0.6);
  transition: fill 0.2s ease;
}

.player-btn:hover svg {
  fill: white;
}

.player-btn.play {
  width: 64px;
  height: 64px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-btn.play svg {
  width: 24px;
  height: 24px;
  fill: var(--text);
  margin-left: 3px;
}

.player-btn.play svg.icon-pause,
.player-btn.play #icon-pause {
  margin-left: 0;
}

/* Chills Button */
.chills-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 100px;
  color: white;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.chills-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.chills-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.chills-btn.recorded {
  background: var(--green);
  border-color: var(--green);
  transform: scale(1.05);
}

.chills-btn.pulse {
  animation: chills-pulse 0.3s ease;
}

@keyframes chills-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); background: var(--green); border-color: var(--green); }
  100% { transform: scale(1); }
}

.chills-hint {
  margin-top: 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}

.chills-recorded {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.9);
  padding: 24px 32px;
  border-radius: var(--radius-lg);
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 10;
}

.chills-recorded.visible {
  opacity: 1;
  visibility: visible;
}

.chills-recorded-icon {
  font-size: 2rem;
  color: var(--green);
  margin-bottom: 8px;
}

.chills-recorded-text {
  color: white;
  font-size: 14px;
  margin: 0;
}

/* Post-Session Form */
.player-form {
  position: absolute;
  inset: 0;
  background: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  overflow-y: auto;
}

.player-form.visible {
  opacity: 1;
  visibility: visible;
}

.player-form-content {
  width: 100%;
  max-width: 400px;
  padding: 40px var(--spacing);
  color: white;
}

.player-form-header {
  text-align: center;
  margin-bottom: 32px;
}

.player-form-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: white;
}

.player-form-subtitle {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

/* ====== Settings Panel ====== */
.settings-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 299;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.settings-overlay.open {
  opacity: 1;
  visibility: visible;
}

.settings-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 85%;
  max-width: 320px;
  height: 100%;
  background: white;
  z-index: 300;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.settings-panel.open {
  transform: translateX(0);
}

.settings-header {
  padding: 70px var(--spacing) 24px;
  border-bottom: 1px solid #f0f0f0;
  position: relative;
}

.settings-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
  color: var(--text);
}

.settings-close {
  position: absolute;
  top: 70px;
  right: var(--spacing);
  width: 40px;
  height: 40px;
  background: #f5f5f5;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.settings-close svg {
  width: 18px;
  height: 18px;
  fill: var(--text);
}

.settings-section {
  padding: 20px var(--spacing);
  border-bottom: 1px solid #f0f0f0;
}

.settings-section-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 16px;
}

.settings-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
}

.settings-item-label {
  font-size: 15px;
  color: var(--text);
}

.settings-toggle {
  width: 48px;
  height: 28px;
  background: #e8e8e8;
  border-radius: 14px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s ease;
}

.settings-toggle.active {
  background: var(--green);
}

.settings-toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.settings-toggle.active::after {
  transform: translateX(20px);
}

.settings-desc {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--text-3);
}

.settings-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.settings-drawer.hidden {
  display: none !important;
}

.settings-h3 {
  font-size: 15px;
  margin: 0 0 4px;
  font-weight: 600;
}

/* ====== Immersive Journey Player ====== */
.immersive-intro {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px;
  z-index: 400;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.immersive-intro.visible {
  opacity: 1;
  visibility: visible;
}

.immersive-intro.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.immersive-intro-content {
  max-width: 320px;
  text-align: center;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.8s ease 0.3s, transform 0.8s ease 0.3s;
}

.immersive-intro.visible .immersive-intro-content {
  opacity: 1;
  transform: translateY(0);
}

.immersive-intro-text {
  font-size: 1.2rem;
  font-weight: 300;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

.immersive-intro-text em {
  font-style: italic;
  color: rgba(255, 255, 255, 0.6);
}

.immersive-intro-duration {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 32px;
}

.immersive-intro-begin {
  margin-top: 40px;
  padding: 14px 44px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.4s ease;
}

.immersive-intro-begin:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.85);
}

.immersive-intro-begin:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.immersive-intro-loading {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.immersive-intro.loading .immersive-intro-loading {
  opacity: 1;
}

.immersive-intro.ready .immersive-intro-loading {
  opacity: 0;
}

.immersive-spinner {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: rgba(255, 255, 255, 0.4);
  animation: spin 1s linear infinite;
}

.immersive-loading-text {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.3);
  margin: 0;
}

/* Immersive Particle Player */
.immersive-player {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 401;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.immersive-player.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.immersive-player.dark-mode canvas {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.immersive-player.dark-mode.particles-visible canvas {
  opacity: 1;
}

.immersive-player .particle-wave-active {
  animation: particle-wave-fade 2s ease-out forwards;
}

@keyframes particle-wave-fade {
  0% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; }
}

.immersive-player canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.immersive-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.05);
  z-index: 10;
}

.immersive-progress-fill {
  height: 100%;
  width: 0%;
  background: rgba(255, 255, 255, 0.15);
  transition: width 0.3s ease;
}

.immersive-time-display {
  position: fixed;
  top: 36px;
  left: 20px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.2);
  letter-spacing: 0.03em;
  z-index: 10;
}

.immersive-tap-hint {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  opacity: 1;
  transition: opacity 1s ease;
  pointer-events: none;
  z-index: 10;
}

.immersive-tap-hint.hidden {
  opacity: 0;
}

.immersive-tap-hint-text {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.05em;
}

.immersive-close-btn {
  position: fixed;
  top: 32px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
}

.immersive-close-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.immersive-close-btn svg {
  width: 14px;
  height: 14px;
  fill: rgba(255, 255, 255, 0.25);
}

.immersive-controls {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.immersive-play-pause-btn {
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.immersive-play-pause-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.immersive-play-pause-btn svg {
  width: 18px;
  height: 18px;
  fill: rgba(255, 255, 255, 0.4);
}

.immersive-icon-play {
  margin-left: 3px;
}

.immersive-icon-pause {
  display: none;
}

.immersive-play-pause-btn .immersive-icon-play {
  display: block;
}

.immersive-play-pause-btn .immersive-icon-pause {
  display: none;
}

.immersive-play-pause-btn.playing .immersive-icon-play {
  display: none !important;
}

.immersive-play-pause-btn.playing .immersive-icon-pause {
  display: block !important;
}

/* Immersive Reflection Screen */
.immersive-reflection {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  flex-direction: column;
  z-index: 402;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 1s ease, visibility 1s ease;
}

.immersive-reflection.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.immersive-reflection-canvas {
  position: absolute;
  inset: 0;
}

.immersive-reflection-content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 80px 28px 32px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.8s ease 0.4s;
}

.immersive-reflection.visible .immersive-reflection-content {
  opacity: 1;
  transform: translateY(0);
}

.immersive-reflection-prompt {
  font-size: 1.3rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 16px 0;
}

.immersive-reflection-textarea {
  flex: 1;
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  font-family: inherit;
  font-size: 1.05rem;
  line-height: 1.75;
  resize: none;
  outline: none;
  padding: 16px 0;
}

.immersive-reflection-textarea::placeholder {
  color: rgba(255, 255, 255, 0.2);
  font-style: italic;
}

.immersive-reflection-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 20px;
}

.immersive-reflection-done {
  padding: 12px 28px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.3s ease;
}

.immersive-reflection-done:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.75);
}

/* Immersive Post-Session Form */
.immersive-post-session {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 403;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.8s ease, visibility 0.8s ease;
  overflow-y: auto;
}

.immersive-post-session.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.immersive-post-session-content {
  width: 100%;
  max-width: 400px;
  padding: 40px 28px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.8s ease 0.3s;
}

.immersive-post-session.visible .immersive-post-session-content {
  opacity: 1;
  transform: translateY(0);
}

.immersive-post-session-header {
  text-align: center;
  margin-bottom: 36px;
}

.immersive-post-session-title {
  font-size: 1.5rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 8px 0;
}

.immersive-post-session-subtitle {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.4);
  margin: 0;
}

.immersive-form-section {
  margin-bottom: 28px;
}

.immersive-form-label {
  font-size: 0.9375rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 14px 0;
}

.immersive-form-hint {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.35);
  margin: 0 0 12px 0;
}

.immersive-form-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.immersive-form-option {
  padding: 12px 18px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 100px;
  color: rgba(255, 255, 255, 0.5);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.immersive-form-option:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
}

.immersive-form-option.selected {
  background: rgba(106, 170, 106, 0.3);
  border-color: var(--green);
  color: rgba(255, 255, 255, 0.9);
}

.immersive-form-textarea {
  width: 100%;
  min-height: 100px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.85);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.7;
  resize: vertical;
  outline: none;
  transition: border-color 0.3s ease;
}

.immersive-form-textarea::placeholder {
  color: rgba(255, 255, 255, 0.25);
  font-style: italic;
}

.immersive-form-textarea:focus {
  border-color: rgba(255, 255, 255, 0.2);
}

.immersive-form-submit {
  width: 100%;
  margin-top: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 16px;
  color: #000;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.3s ease;
}

.immersive-form-submit:hover {
  background: #fff;
}

/* Screen Transition Flash Prevention */
.app-view {
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

#screen-intake.transitioning-out {
  opacity: 0;
  pointer-events: none;
}

.immersive-intro {
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.immersive-intro.visible {
  z-index: 400;
}

.immersive-active .app-view {
  opacity: 0 !important;
  visibility: hidden !important;
  transition: none;
}

/* Journey Button (legacy) */
.journey-button {
  width: 100%;
  max-width: 360px;
  background: var(--text);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: none;
}

.journey-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.journey-button:active {
  transform: translateY(0);
}

.journey-button-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  color: white;
}

.journey-button-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.journey-button-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.journey-button-icon svg {
  width: 18px;
  height: 18px;
  fill: white;
  margin-left: 2px;
}

.journey-button-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.journey-button-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  opacity: 0.6;
}

.journey-button-title {
  font-size: 1rem;
  font-weight: 600;
}

.journey-button-arrow svg {
  width: 20px;
  height: 20px;
  fill: rgba(255, 255, 255, 0.4);
}

.journey-button-progress {
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
}

.journey-button-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--green);
  transition: width 0.3s ease;
}

/* Hidden category labels */
.activity-category-badge,
.lib-card-category,
.activity-life-area-label,
.activity-reward-badge {
  display: none !important;
}

/* Personal tags - hidden */
.personal-tags {
  display: none;
}

/* Activity secondary actions - hidden in new layout */
.activity-secondary-actions {
  display: none;
}

/* Swap icon link */
.swap-icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #f5f5f5;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.swap-icon-link:hover {
  background: #e8e8e8;
}

.swap-icon-link svg {
  fill: var(--text-3);
  transition: fill 0.2s ease;
}

.swap-icon-link:hover svg {
  fill: var(--text);
}

/* ====== Responsive Styles ====== */
@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .schema-options {
    grid-template-columns: repeat(2, 1fr);
  }

  .header,
  .activation-header {
    padding: 60px var(--spacing) 20px;
  }

  .welcome-card {
    margin: 0 16px 20px;
    padding: 20px;
  }

  .reflection-section {
    margin: 0 16px 28px;
  }

  .activity-card {
    margin: 0 16px 16px;
  }

  .mini-cards {
    margin: 0 16px 16px;
  }

  .feedback-card {
    margin: 0 16px 16px;
  }

  .section-header {
    padding: 0 16px;
  }

  .library-header,
  .journal-header,
  .profile-header {
    padding: 60px 16px 20px;
  }

  .library-filters {
    padding: 0 16px;
  }

  .library-grid {
    padding: 0 16px;
  }

  .timeline-container {
    padding: 0 16px;
  }

  .goal-banner,
  .explore-banner {
    margin: 0 16px 20px;
  }

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .stat-item {
    padding: 12px 8px;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  .activity-detail-content {
    max-height: 95vh;
    margin: 8px;
  }

  .activity-detail-image {
    height: 180px;
  }

  .activity-detail-body {
    padding: 20px;
  }

  .activity-detail-title {
    font-size: 1.25rem;
  }

  .timeline-page {
    padding: 60px 16px 140px;
  }

  .journal-entry-header {
    padding: 60px 16px 20px;
  }

  .journal-entry-container {
    padding: 0 16px;
  }
}

@media (max-width: 480px) {
  :root {
    --spacing: 16px;
  }

  .welcome-title {
    font-size: 1.25rem;
  }

  .narrative-text {
    font-size: 14px;
  }

  .activity-name,
  .activity-title {
    font-size: 24px;
  }

  .library-title,
  .journal-title,
  .profile-title {
    font-size: 1.5rem;
  }

  .player-artwork {
    width: 200px;
    height: 200px;
  }

  .player-title {
    font-size: 1.25rem;
  }

  .activity-detail-image {
    height: 160px;
  }

  .activity-detail-close {
    width: 32px;
    height: 32px;
    top: 12px;
    right: 12px;
  }

  .activity-detail-close svg {
    width: 16px;
    height: 16px;
  }

  .activity-swap-btn-prominent {
    padding: 8px 10px;
  }

  .swap-btn-text {
    display: none;
  }

  .share-options {
    gap: 10px;
  }

  .share-option-btn {
    padding: 14px 16px;
    font-size: 14px;
  }

  .activity-actions-row {
    flex-direction: column;
  }

  .activity-actions-row .activity-directions-btn {
    width: 100%;
    justify-content: center;
  }

  .immersive-intro {
    padding: 24px;
  }

  .immersive-intro-text {
    font-size: 1.1rem;
    line-height: 1.75;
  }

  .immersive-reflection-content {
    padding: 60px 20px 24px;
  }

  .immersive-reflection-prompt {
    font-size: 1.15rem;
  }

  .immersive-post-session-content {
    padding: 32px 20px;
  }

  .immersive-post-session-title {
    font-size: 1.3rem;
  }

  .immersive-form-options {
    flex-direction: column;
  }

  .immersive-form-option {
    text-align: center;
  }

  .journal-typewriter-content {
    padding: 60px 20px 100px;
  }

  .journal-typewriter-prompt {
    font-size: 1rem;
  }

  .journal-typewriter-textarea {
    font-size: 1rem;
  }

  .pre-intake-shell {
    padding: 16px;
    align-items: flex-start;
    padding-top: 80px;
  }

  .pre-intake-card {
    padding: 24px 20px;
  }

  .pre-intake-title {
    font-size: 1.5rem;
  }

  .pre-intake-question {
    font-size: 1.125rem;
  }

  .day-badge .num {
    font-size: 28px;
  }

  .mini-card h3 {
    font-size: 15px;
  }

  .mini-card p {
    font-size: 11px;
  }

  .stat-card .value {
    font-size: 24px;
  }

  .t-item h3 {
    font-size: 15px;
  }

  .directions-info h3 {
    font-size: 18px;
  }

  .directions-eta .time {
    font-size: 20px;
  }
}

@media (max-width: 360px) {
  .nav-item,
  .tab-btn {
    width: 48px;
    height: 48px;
  }

  .nav-item.play-nav,
  .tab-btn.play-nav,
  .nav-item-journey {
    width: 52px;
    height: 52px;
  }

  .activity-swap-btn-prominent {
    padding: 6px 8px;
  }

  .mini-cards {
    gap: 8px;
  }

  .mini-card {
    padding: 14px;
  }
}
/* =============================================================================
   ML VIDEO REFACTOR - NEW STYLES
   Added for: Video player, chills tracking, body map, ML questionnaire
   ============================================================================= */

/* -----------------------------------------------------------------------------
   VIDEO PLAYER CONTAINER
   ----------------------------------------------------------------------------- */
.video-experience-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #0a0a0f 100%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.video-player-wrapper {
  position: relative;
  width: 100%;
  max-width: 900px;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.video-player-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.video-info-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: white;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-player-wrapper:hover .video-info-overlay {
  opacity: 1;
}

.video-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.video-subtitle {
  font-size: 0.85rem;
  opacity: 0.7;
}

/* -----------------------------------------------------------------------------
   VIDEO EXPERIENCE HEADER & CONTROLS (ML Video Flow)
   ----------------------------------------------------------------------------- */
.video-experience-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 16px 20px;
  display: flex;
  justify-content: flex-end;
  z-index: 10;
}

.video-close-btn {
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: white;
}

.video-close-btn:hover {
  background: rgba(0, 0, 0, 0.7);
  transform: scale(1.1);
}

.video-progress-container {
  width: 100%;
  max-width: 900px;
  margin-top: 20px;
  padding: 0 20px;
  box-sizing: border-box;
}

.video-progress-bar {
  position: relative;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  overflow: visible;
  cursor: pointer;
}

.video-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  border-radius: 3px;
  transition: width 0.1s linear;
}

.video-chills-markers {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  pointer-events: none;
}

.video-chills-marker {
  position: absolute;
  top: -4px;
  width: 4px;
  height: 14px;
  background: #f59e0b;
  border-radius: 2px;
  transform: translateX(-50%);
}

.video-time-display {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.video-controls {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

.video-control-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.7);
  padding: 10px 24px;
  font-size: 0.9rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.video-control-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  color: white;
}

/* -----------------------------------------------------------------------------
   CHILLS BUTTON
   ----------------------------------------------------------------------------- */
.chills-button-container {
  margin-top: 24px;
  text-align: center;
}

.chills-button {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
  color: white;
  border: none;
  padding: 16px 40px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
  position: relative;
  overflow: hidden;
}

.chills-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.chills-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}

.chills-button:active::before {
  width: 300px;
  height: 300px;
}

.chills-button.chills-recorded {
  animation: chillsPulse 0.6s ease;
}

@keyframes chillsPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); box-shadow: 0 0 40px rgba(168, 85, 247, 0.6); }
  100% { transform: scale(1); }
}

.chills-count-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: 20px;
  margin-left: 12px;
  font-size: 0.9rem;
}

.chills-hint {
  margin-top: 12px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

/* -----------------------------------------------------------------------------
   BODY MAP
   ----------------------------------------------------------------------------- */
.body-map-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 100%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.body-map-title {
  color: white;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 8px;
  text-align: center;
}

.body-map-subtitle {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1rem;
  margin-bottom: 24px;
  text-align: center;
}

.body-map-canvas-wrapper {
  position: relative;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1 / 2;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  overflow: hidden;
  cursor: crosshair;
}

.body-map-silhouette {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.6;
  pointer-events: none;
}

.body-map-spot {
  position: absolute;
  width: 24px;
  height: 24px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.8) 0%, rgba(168, 85, 247, 0) 70%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: spotAppear 0.3s ease;
}

@keyframes spotAppear {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.body-map-spot-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: #a855f7;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.body-map-actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
}

.body-map-clear-btn {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 12px 24px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.body-map-clear-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.body-map-done-btn {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  border: none;
  padding: 12px 32px;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.body-map-done-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.body-map-skip-btn {
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  border: none;
  padding: 12px 24px;
  cursor: pointer;
  font-size: 0.9rem;
  margin-top: 16px;
}

.body-map-skip-btn:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* -----------------------------------------------------------------------------
   POST-VIDEO RESPONSE FORM
   ----------------------------------------------------------------------------- */
.post-video-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 100%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 40px 20px;
  box-sizing: border-box;
  overflow-y: auto;
}

.post-video-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 32px;
  width: 100%;
  max-width: 500px;
  margin-bottom: 20px;
}

.post-video-step-indicator {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.post-video-step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.post-video-step-dot.active {
  background: #8b5cf6;
  width: 24px;
  border-radius: 4px;
}

.post-video-question {
  color: white;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
  text-align: center;
}

.post-video-hint {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  margin-bottom: 24px;
  text-align: center;
}

.post-video-textarea {
  width: 100%;
  min-height: 120px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
  color: white;
  font-size: 1rem;
  resize: none;
  box-sizing: border-box;
}

.post-video-textarea:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.post-video-textarea::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.post-video-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.post-video-option {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  padding: 12px 20px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.post-video-option:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.post-video-option.selected {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border-color: transparent;
}

.post-video-custom-input {
  width: 100%;
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px 16px;
  color: white;
  font-size: 1rem;
  box-sizing: border-box;
}

.post-video-custom-input:focus {
  outline: none;
  border-color: #8b5cf6;
}

.post-video-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  gap: 12px;
}

.post-video-nav-btn {
  flex: 1;
  padding: 14px 24px;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.post-video-nav-btn.secondary {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
}

.post-video-nav-btn.primary {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border: none;
  color: white;
}

.post-video-nav-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

/* -----------------------------------------------------------------------------
   ML QUESTIONNAIRE STYLES - MATCHING PHQ-9 DESIGN
   Uses same pastel gradient background and card-based layout
   ----------------------------------------------------------------------------- */

/* ML Questionnaire Container - Full Screen */
/* V4 FIX: Updated z-index to 1000 for consistency with intake.js */
/* UI REDESIGN: Changed background to pastel gradient to match Demographics/PHQ-9 */
.ml-questionnaire-container,
#ml-questionnaire-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  right: 0;
  bottom: 0;
  background: linear-gradient(155deg, #f0e4e0 0%, #e8e0f0 50%, #e0e8f4 100%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ml-questionnaire-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
  background: linear-gradient(180deg, #fefefe 0%, #faf8fc 100%);
  overflow: hidden;
}

/* ML Questionnaire Header */
.ml-questionnaire-header {
  padding: 60px 28px 16px;
  text-align: center;
}

.ml-questionnaire-step-label {
  font-size: 14px;
  color: var(--green);
  font-weight: 600;
  margin-bottom: 8px;
}

.ml-questionnaire-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.ml-questionnaire-subtitle {
  font-size: 15px;
  color: var(--text-3);
}

/* ML Questionnaire Progress */
.ml-questionnaire-progress {
  padding: 0 28px;
  margin-bottom: 16px;
}

.ml-questionnaire-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.ml-questionnaire-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green) 0%, #5a9a5a 100%);
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* ML Questions Container (scrollable) */
.ml-questionnaire-questions {
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px 20px;
  scroll-behavior: smooth;
}

.ml-questionnaire-questions::-webkit-scrollbar {
  display: none;
}

/* ML Question Card - Matching PHQ-9 style */
.ml-questionnaire-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 24px 20px;
  margin-bottom: 14px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
}

.ml-questionnaire-card.answered {
  background: #f8f7f6;
}

.ml-questionnaire-question {
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 24px;
  line-height: 1.4;
  text-align: center;
}

.ml-questionnaire-scale-hint {
  color: var(--text-3);
  font-size: 13px;
  margin-bottom: 20px;
  text-align: center;
}

/* ML Scale - Dot-based (matching PHQ-9) */
.ml-questionnaire-scale {
  position: relative;
}

.ml-scale-track {
  position: relative;
  height: 48px;
  background: linear-gradient(90deg, #f5f2f0 0%, #f0eeec 50%, #eceae8 100%);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
}

.ml-scale-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, #e8f5e8 0%, #d4ecd4 50%, #c0e0c0 100%);
  border-radius: 14px;
  transition: width 0.3s ease;
}

.ml-scale-options {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.ml-scale-options.scale-5 {
  grid-template-columns: repeat(5, 1fr);
}

.ml-scale-option {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2;
}

.ml-scale-option:hover .ml-option-dot {
  transform: scale(1.2);
}

.ml-option-dot {
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.ml-scale-option.selected .ml-option-dot {
  width: 18px;
  height: 18px;
  background: var(--green);
  box-shadow: 0 2px 8px rgba(106, 170, 106, 0.4);
}

.ml-scale-option.filled .ml-option-dot {
  background: #e8f5e8;
  border: 2px solid var(--green);
}

/* ML Scale Labels */
.ml-scale-bottom-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  padding: 0 4px;
}

.ml-scale-label {
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.3;
  max-width: 80px;
  transition: all 0.2s ease;
}

.ml-scale-label.selected {
  color: var(--green);
  font-weight: 600;
}

.ml-scale-label-left {
  text-align: left;
}

.ml-scale-label-center {
  text-align: center;
}

.ml-scale-label-right {
  text-align: right;
}

/* Legacy ML Scale Buttons (for backwards compatibility) */
.ml-questionnaire-scale-btn,
.ml-scale-dot {
  width: 40px;
  height: 40px;
  background: #ffffff;
  border: 3px solid #d0d0d0;
  border-radius: 50%;
  color: #333333;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ml-questionnaire-scale-btn:hover,
.ml-scale-dot:hover {
  transform: scale(1.1);
  border-color: var(--green);
}

.ml-questionnaire-scale-btn.selected,
.ml-scale-dot.selected {
  background: var(--green);
  border-color: var(--green);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(106, 170, 106, 0.4);
}

.ml-questionnaire-scale-btn.filled,
.ml-scale-dot.filled {
  background: #e8f5e8;
  border-color: var(--green);
}

.ml-questionnaire-scale-labels,
.ml-scale-labels {
  display: flex;
  justify-content: space-between;
  color: #666;
  font-size: 13px;
  margin-top: 12px;
  padding: 0 4px;
}

/* ML Bottom Action */
.ml-questionnaire-bottom-action {
  padding: 12px 24px 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(180deg, transparent 0%, rgba(248, 228, 220, 0.3) 50%, rgba(220, 232, 248, 0.4) 100%);
}

.ml-questionnaire-nav {
  display: flex;
  gap: 12px;
  width: 100%;
}

.ml-nav-btn {
  flex: 1;
  padding: 17px 24px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ml-nav-back {
  background: #ffffff;
  border: 2px solid rgba(0, 0, 0, 0.1);
  color: var(--text);
}

.ml-nav-back:hover {
  background: #fafafa;
  border-color: rgba(0, 0, 0, 0.15);
}

.ml-nav-back:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ml-nav-next {
  flex: 2;
  background: var(--text);
  border: none;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ml-nav-next:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.ml-nav-next:disabled {
  background: #d0d0d0;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* ML Loading Screen */
.ml-loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 28px;
  text-align: center;
}

.ml-loading-spinner {
  width: 64px;
  height: 64px;
  border: 4px solid rgba(0, 0, 0, 0.06);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: ml-spin 1s linear infinite;
  margin-bottom: 24px;
}

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

.ml-loading-text {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 12px 0;
}

.ml-loading-subtext {
  font-size: 16px;
  color: var(--text-3);
  margin: 0;
}

/* -----------------------------------------------------------------------------
   VIDEO THUMBNAIL CARD (for journey page)
   ----------------------------------------------------------------------------- */
.video-thumbnail-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}

.video-thumbnail-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.video-thumbnail-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.video-thumbnail-info {
  padding: 16px;
}

.video-thumbnail-title {
  color: white;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.video-thumbnail-meta {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
}

.video-play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(139, 92, 246, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-thumbnail-card:hover .video-play-overlay {
  opacity: 1;
}

.video-play-overlay svg {
  width: 24px;
  height: 24px;
  fill: white;
  margin-left: 4px;
}

/* -----------------------------------------------------------------------------
   TODAY'S VIDEO CARD - Felix's Design
   Used in the Today screen to display the daily video recommendation
   ----------------------------------------------------------------------------- */
.today-video-section {
  margin: 0 var(--spacing) 16px;
}

.today-video-card {
  background: var(--text);
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
}

.today-video-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.today-video-preview img,
.today-video-preview iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.today-video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  z-index: 2;
}

.today-video-play-btn:hover {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.today-video-play-btn svg {
  width: 24px;
  height: 24px;
  fill: var(--text);
  margin-left: 3px;
}

.today-video-info {
  padding: 20px;
  color: white;
}

.today-video-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.6;
  margin-bottom: 8px;
}

.today-video-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.3;
  /* Fix: Prevent title from overflowing */
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.today-video-description {
  font-size: 14px;
  line-height: 1.5;
  opacity: 0.8;
  margin-bottom: 16px;
  /* Fix: Prevent description from overflowing */
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  max-height: 4.5em; /* 3 lines x 1.5 line-height */
}

.today-video-watch-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: white;
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.today-video-watch-btn:hover {
  text-decoration: underline;
}

.today-video-watch-btn svg {
  width: 14px;
  height: 14px;
  fill: white;
}

/* Alternative: Inline video card (compact) */
.video-card-inline {
  background: white;
  border-radius: var(--radius-lg);
  padding: 16px;
  margin: 0 var(--spacing) 16px;
  box-shadow: var(--shadow-soft);
  display: flex;
  gap: 16px;
  align-items: flex-start;
  overflow: hidden;
}

.video-card-inline-thumb {
  width: 100px;
  height: 60px;
  background: var(--text);
  border-radius: 10px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.video-card-inline-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-card-inline-thumb svg {
  width: 20px;
  height: 20px;
  fill: white;
  position: absolute;
}

.video-card-inline-content {
  flex: 1;
  min-width: 0; /* Important: allows text truncation to work */
  overflow: hidden;
}

.video-card-inline-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-3);
  margin-bottom: 4px;
}

.video-card-inline-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  /* Fix: Prevent title overflow */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-card-inline-desc {
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.4;
  /* Fix: Clamp to 2 lines */
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.video-card-inline-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--green);
  margin-top: 8px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.video-card-inline-action:hover {
  text-decoration: underline;
}

.video-card-inline-action svg {
  width: 12px;
  height: 12px;
  fill: var(--green);
}

/* -----------------------------------------------------------------------------
   RESPONSIVE ADJUSTMENTS FOR VIDEO/CHILLS/QUESTIONNAIRES
   ----------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .video-player-wrapper {
    border-radius: 12px;
  }

  .chills-button {
    padding: 14px 32px;
    font-size: 1rem;
  }

  .body-map-canvas-wrapper {
    max-width: 250px;
  }

  .post-video-card {
    padding: 24px;
  }

  .post-video-question {
    font-size: 1.1rem;
  }

  /* PHQ-9 Responsive */
  .phq9-header {
    padding: 50px 20px 12px;
  }

  .phq9-header-title {
    font-size: 22px;
  }

  .phq9-questions-container {
    padding: 12px 16px 16px;
  }

  .phq9-question-card {
    padding: 16px;
  }

  .phq9-question-text {
    font-size: 14px;
  }

  .phq9-scale-track {
    height: 44px;
  }

  .phq9-bottom-label {
    font-size: 9px;
  }

  .phq9-bottom-action {
    padding: 12px 20px 40px;
  }

  .phq9-continue-btn {
    padding: 15px 24px;
    font-size: 16px;
  }

  /* ML Questionnaire Responsive */
  .ml-questionnaire-header {
    padding: 50px 20px 12px;
  }

  .ml-questionnaire-title {
    font-size: 22px;
  }

  .ml-questionnaire-card {
    padding: 20px 16px;
  }

  .ml-questionnaire-question {
    font-size: 16px;
    margin-bottom: 20px;
  }

  .ml-questionnaire-scale-btn,
  .ml-scale-dot {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .ml-scale-track {
    height: 44px;
  }

  .ml-option-dot {
    width: 10px;
    height: 10px;
  }

  .ml-scale-option.selected .ml-option-dot {
    width: 16px;
    height: 16px;
  }

  /* Today Video Card Responsive */
  .today-video-title {
    font-size: 16px;
  }

  .today-video-description {
    font-size: 13px;
    -webkit-line-clamp: 2;
    max-height: 3em;
  }

  .video-card-inline {
    padding: 14px;
    gap: 12px;
  }

  .video-card-inline-thumb {
    width: 80px;
    height: 48px;
  }

  .video-card-inline-title {
    font-size: 14px;
  }

  .video-card-inline-desc {
    font-size: 12px;
    -webkit-line-clamp: 1;
  }
}

@media (max-width: 480px) {
  .video-experience-container {
    padding: 12px;
  }

  .chills-button {
    padding: 12px 24px;
    font-size: 0.95rem;
  }

  .body-map-title {
    font-size: 1.25rem;
  }

  .body-map-canvas-wrapper {
    max-width: 200px;
  }

  .post-video-options {
    flex-direction: column;
  }

  .post-video-option {
    width: 100%;
    text-align: center;
  }

  /* PHQ-9 Mobile */
  .phq9-header {
    padding: 40px 16px 10px;
  }

  .phq9-header-icon {
    font-size: 28px;
    margin-bottom: 8px;
  }

  .phq9-header-title {
    font-size: 20px;
  }

  .phq9-header-subtitle {
    font-size: 13px;
  }

  .phq9-questions-container {
    padding: 8px 12px 12px;
  }

  .phq9-question-card {
    padding: 14px;
    margin-bottom: 10px;
    border-radius: 16px;
  }

  .phq9-question-text {
    font-size: 13px;
    margin-bottom: 12px;
  }

  .phq9-scale-track {
    height: 40px;
    border-radius: 12px;
  }

  .phq9-option-dot {
    width: 10px;
    height: 10px;
  }

  .phq9-scale-option.selected .phq9-option-dot {
    width: 14px;
    height: 14px;
  }

  .phq9-bottom-label {
    font-size: 8px;
  }

  .phq9-bottom-action {
    padding: 8px 16px 32px;
  }

  .phq9-continue-btn {
    padding: 14px 20px;
    font-size: 15px;
    border-radius: 14px;
  }

  .phq9-safety-warning {
    padding: 12px;
    margin-top: 12px;
  }

  .phq9-safety-warning-title {
    font-size: 13px;
  }

  .phq9-safety-warning-text {
    font-size: 12px;
  }

  /* ML Questionnaire Mobile */
  .ml-questionnaire-container {
    padding: 0;
  }

  .ml-questionnaire-header {
    padding: 40px 16px 10px;
  }

  .ml-questionnaire-title {
    font-size: 20px;
  }

  .ml-questionnaire-subtitle {
    font-size: 13px;
  }

  .ml-questionnaire-card {
    padding: 16px 14px;
    border-radius: 16px;
  }

  .ml-questionnaire-question {
    font-size: 15px;
    margin-bottom: 16px;
  }

  .ml-questionnaire-scale-hint {
    font-size: 12px;
    margin-bottom: 16px;
  }

  .ml-questionnaire-scale {
    gap: 4px;
  }

  .ml-questionnaire-scale-btn,
  .ml-scale-dot {
    width: 32px;
    height: 32px;
    font-size: 13px;
    border-width: 2px;
  }

  .ml-scale-track {
    height: 40px;
    border-radius: 12px;
  }

  .ml-option-dot {
    width: 9px;
    height: 9px;
  }

  .ml-scale-option.selected .ml-option-dot {
    width: 14px;
    height: 14px;
  }

  .ml-scale-bottom-labels {
    margin-top: 8px;
  }

  .ml-scale-label {
    font-size: 10px;
    max-width: 60px;
  }

  .ml-questionnaire-bottom-action {
    padding: 8px 16px 32px;
  }

  .ml-nav-btn {
    padding: 14px 16px;
    font-size: 14px;
    border-radius: 14px;
  }

  /* Today Video Card Mobile */
  .today-video-info {
    padding: 16px;
  }

  .today-video-title {
    font-size: 15px;
  }

  .today-video-description {
    font-size: 12px;
    -webkit-line-clamp: 2;
    max-height: 2.8em;
    margin-bottom: 12px;
  }

  .today-video-play-btn {
    width: 52px;
    height: 52px;
  }

  .today-video-play-btn svg {
    width: 20px;
    height: 20px;
  }

  .video-card-inline {
    padding: 12px;
    gap: 10px;
  }

  .video-card-inline-thumb {
    width: 70px;
    height: 42px;
    border-radius: 8px;
  }

  .video-card-inline-title {
    font-size: 13px;
  }

  .video-card-inline-desc {
    font-size: 11px;
  }
}

/* =============================================================================
   V4 FIX: ML QUESTIONNAIRE STYLES (intake.js compatibility)
   These styles support the ML questionnaire rendered by intake.js
   Matches PHQ-9 visual design exactly
   ============================================================================= */

/* ML Questionnaire - Main wrapper (matches intake-wrapper) */
.ml-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f5f5f5;
}

/* ML Questionnaire Header - matches intake header */
.ml-header {
  padding: 24px 20px 16px;
  text-align: center;
  background: #f5f5f5;
}

/* ML Progress Dots - 3 dots matching PHQ-9 */
.ml-progress-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.ml-progress-dots .intake-progress-step {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ddd;
  transition: background 0.2s;
}

.ml-progress-dots .intake-progress-step.completed,
.ml-progress-dots .intake-progress-step.active {
  background: #4a7c59;
}

/* ML Step Label */
.ml-step-label {
  font-size: 12px;
  color: #4a7c59;
  margin: 0 0 8px 0;
  font-weight: 500;
}

/* ML Title and Subtitle */
.ml-title {
  font-size: 24px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 8px 0;
}

.ml-subtitle {
  font-size: 14px;
  color: #666;
  margin: 0;
}

/* ML Content Area - scrollable */
.ml-content {
  flex: 1;
  padding: 0 20px 120px 20px;
  overflow-y: auto;
}

/* ML Questions List */
.ml-questions-list {
  max-width: 600px;
  margin: 0 auto;
}

/* ML Question Item - matches PHQ-9 item */
.ml-question-item {
  background: white;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.ml-question-item.answered {
  background: #fafafa;
}

/* ML Question Text */
.ml-question-text {
  font-size: 16px;
  color: #1a1a1a;
  margin: 0 0 16px 0;
  line-height: 1.5;
}

/* ML Slider Row - matches PHQ-9 */
.ml-slider-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ml-slider-line {
  position: relative;
}

/* ML Slider - matches PHQ-9 slider */
.ml-slider {
  width: 100%;
  height: 8px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(to right, #e8f0e8 0%, #4a7c59 100%);
  border-radius: 4px;
  outline: none;
}

.ml-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #4a7c59;
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.ml-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #4a7c59;
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* ML Labels */
.ml-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #888;
}

/* ML Navigation - V9: Inline style matching PHQ-9 footer (no fixed position) */
.ml-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding: 0 0 32px 0;
}

.ml-nav .btn-secondary {
  flex: 1;
  padding: 14px 20px;
  border-radius: 12px;
  border: 1px solid #ddd;
  background: white;
  color: #333;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ml-nav .btn-secondary:hover {
  background: #f8f8f8;
}

.ml-nav .btn-primary {
  flex: 2;
  padding: 14px 20px;
  border-radius: 12px;
  border: none;
  background: #4a7c59;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ml-nav .btn-primary:hover {
  background: #3d6b4a;
}

.ml-nav .btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ML Loading Overlay */
#ml-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,255,255,0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1001;
}

/* PHQ-9 Label styling update for consistency */
.phq9-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #888;
  margin-top: 8px;
}

.phq9-label-left {
  text-align: left;
}

.phq9-label-right {
  text-align: right;
}

/* =============================================================================
   V4 FIX: ML QUESTIONNAIRE RESPONSIVE STYLES
   ============================================================================= */
@media (max-width: 768px) {
  .ml-header {
    padding: 20px 16px 12px;
  }

  .ml-title {
    font-size: 22px;
  }

  .ml-content {
    padding: 0 16px 110px 16px;
  }

  .ml-question-item {
    padding: 16px;
    border-radius: 14px;
  }

  .ml-question-text {
    font-size: 15px;
  }

  .ml-nav {
    padding: 14px 16px;
    gap: 10px;
  }

  .ml-nav .btn-secondary,
  .ml-nav .btn-primary {
    padding: 12px 16px;
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .ml-header {
    padding: 16px 14px 10px;
  }

  .ml-title {
    font-size: 20px;
  }

  .ml-subtitle {
    font-size: 13px;
  }

  .ml-content {
    padding: 0 14px 100px 14px;
  }

  .ml-question-item {
    padding: 14px;
    margin-bottom: 12px;
  }

  .ml-question-text {
    font-size: 14px;
    margin-bottom: 12px;
  }

  .ml-slider::-webkit-slider-thumb {
    width: 22px;
    height: 22px;
  }

  .ml-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
  }

  .ml-labels {
    font-size: 11px;
  }

  .ml-nav {
    padding: 12px 14px;
  }

  .ml-nav .btn-secondary,
  .ml-nav .btn-primary {
    padding: 12px 14px;
    font-size: 14px;
    border-radius: 10px;
  }
}
/* =============================================================================
   V9 FIX: ML Questionnaire Progress Dots Centering (Issue #1)
   ============================================================================= */

/* Fix: Ensure ML header centers progress dots horizontally */
.ml-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px 16px;
  text-align: center;
  background: transparent;
}

/* Ensure progress dots container is centered */
.intake-header.ml-header {
  justify-content: center;
}

/* Fix: Override intake-header flex styles for ML questionnaire */
.intake-progress-dots.ml-progress-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
  width: 100%;
}
/* =============================================================================
   CONSENT SCREEN STYLES
   Added for informed consent screen that appears after login, before intake
   ============================================================================= */

/* Consent Shell - Main container */
.consent-shell {
  min-height: 100vh;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
}

/* Consent Header */
.consent-header {
  padding: 24px 0 16px;
}

.consent-label {
  font-size: 12px;
  color: #666;
  margin-bottom: 8px;
}

.consent-progress-bar {
  height: 3px;
  width: 16.66%;
  background: linear-gradient(90deg, #ec4899, #60a5fa);
  border-radius: 2px;
}

/* Consent Card */
.consent-card {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(1.08) blur(8px);
  -webkit-backdrop-filter: saturate(1.08) blur(8px);
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

/* Consent Scroll Box */
.consent-scroll-box {
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 12px;
  flex: 1;
}

.consent-scroll-box::-webkit-scrollbar {
  width: 6px;
}

.consent-scroll-box::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.consent-scroll-box::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.consent-scroll-box::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

/* Consent Prose - Content styling */
.consent-prose {
  font-size: 14px;
  line-height: 1.6;
  color: #333;
}

.consent-prose h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: #1a1a1a;
}

.consent-prose h2:first-child {
  margin-top: 0;
}

.consent-prose h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
  color: #1a1a1a;
}

.consent-prose p {
  margin: 0.5rem 0;
  line-height: 1.55;
}

.consent-prose ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0.5rem 0;
}

.consent-prose ol {
  list-style: decimal;
  padding-left: 1.25rem;
  margin: 0.5rem 0;
}

.consent-prose li {
  margin: 0.25rem 0;
}

.consent-prose strong {
  font-weight: 600;
}

.consent-prose em {
  font-style: italic;
}

/* Consent Footer */
.consent-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  flex-wrap: wrap;
}

.consent-checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #444;
  cursor: pointer;
}

.consent-checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #ec4899;
}

#consent-accept-btn {
  background: linear-gradient(135deg, #ec4899, #db2777);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

#consent-accept-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(236, 72, 153, 0.3);
}

#consent-accept-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Consent Hint */
.consent-hint {
  font-size: 12px;
  color: #888;
  margin-top: 12px;
  text-align: center;
}

/* Consent Screen Background */
#screen-consent {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .consent-card {
    padding: 16px;
  }

  .consent-scroll-box {
    max-height: 55vh;
  }

  .consent-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .consent-checkbox-row {
    justify-content: center;
  }

  #consent-accept-btn {
    width: 100%;
    text-align: center;
  }

  .consent-prose {
    font-size: 13px;
  }

  .consent-prose h2 {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .consent-shell {
    padding: 0 12px;
  }

  .consent-card {
    padding: 14px;
    border-radius: 14px;
  }

  .consent-scroll-box {
    max-height: 50vh;
    padding-right: 8px;
  }

  .consent-prose {
    font-size: 12px;
  }

  .consent-checkbox-row {
    font-size: 13px;
  }

  #consent-accept-btn {
    padding: 12px 20px;
    font-size: 14px;
  }
}
