/* ===== LIGHTER MOBILE-FIRST PWA CSS ===== */
/* Dark-only. 320px minimum. Spring animations throughout. */

:root {
  --tab-h: 56px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --green: #5bbfaa;
  --amber: #e8b86a;
  --coral: #e07a8a;
  --accent: #5bbfaa;
}

/* ===== RESET FOR APP ===== */
html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

/* ===== APP SHELL ===== */
#app {
  position: fixed;
  inset: 0;
  /* Account for iOS status bar */
  padding-top: var(--safe-top);
  padding-bottom: calc(var(--tab-h) + var(--safe-bottom));
  overflow: hidden;
}

/* ===== TAB SCREENS ===== */
.tab-screen {
  position: absolute;
  inset: 0;
  bottom: 0;
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  pointer-events: none;
  transition: opacity 280ms var(--ease-out), transform 320ms var(--spring);
  will-change: transform, opacity;
}

.tab-screen.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.screen-scroll {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 16px;
  /* Smooth scroll on iOS */
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
}

.screen-bottom-pad { height: 20px; }

/* ===== BOTTOM TAB BAR ===== */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--tab-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: flex-start;
  padding-top: 4px;
  z-index: 100;
}

.tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 0 2px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-3);
  position: relative;
  transition: transform 150ms var(--spring), color 180ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.tab-btn:active {
  transform: scale(0.92);
}

.tab-btn.active {
  color: var(--teal);
}

/* Active dot indicator */
.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--teal);
  opacity: 1;
  animation: dotPop 280ms var(--spring) forwards;
}

@keyframes dotPop {
  from { transform: translateX(-50%) scale(0); opacity: 0; }
  to { transform: translateX(-50%) scale(1); opacity: 1; }
}

.tab-icon {
  width: 24px;
  height: 24px;
  transition: stroke 180ms;
}

.tab-btn.active .tab-icon {
  stroke: var(--teal);
}

.tab-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.01em;
  font-family: 'DM Sans', sans-serif;
}

/* ===== HOME SCREEN ===== */
.home-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 0 16px;
}

.greeting {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}

.greeting-sub {
  font-size: 13px;
  color: var(--text-3);
  margin-top: 4px;
}

.icon-btn-round {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-2);
  position: relative;
  transition: transform 150ms var(--spring), background 180ms;
  flex-shrink: 0;
}

.icon-btn-round:active {
  transform: scale(0.92);
  background: var(--surface-hover);
}

.bell-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coral);
  border: 2px solid var(--bg);
}

/* Score Rings Row */
.score-rings-row {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.score-ring-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: transform 200ms var(--spring), background 180ms;
}

.score-ring-item:active {
  transform: scale(0.95);
}

.ring-wrap {
  position: relative;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ring-svg {
  width: 60px;
  height: 60px;
  transform: rotate(-90deg);
  position: absolute;
  top: 0; left: 0;
}

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

.ring-fill {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 150.8;
  stroke-dashoffset: 150.8;
  transition: stroke-dashoffset 1s var(--spring), stroke 600ms var(--ease-out);
}

.energy-ring { stroke: var(--teal); }
.stress-ring { stroke: var(--amber); }
.routine-ring { stroke: var(--teal); }

.ring-val {
  position: relative;
  z-index: 1;
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.ring-label {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Section Headers */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

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

.section-action {
  font-size: 12px;
  color: var(--teal);
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 500;
  padding: 4px 0;
  transition: opacity 150ms;
}
.section-action:active { opacity: 0.6; }

/* Insight Cards (Nudges) */
.insight-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.insight-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  position: relative;
  animation: slideInStagger 400ms var(--spring) both;
}

.insight-card.severity-gentle { border-color: rgba(91,191,170,0.2); }
.insight-card.severity-nudge { border-color: rgba(232,184,106,0.2); }
.insight-card.severity-attention { border-color: rgba(224,122,138,0.2); }

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

.insight-icon {
  font-size: 20px;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  justify-content: center;
}

.insight-body { flex: 1; min-width: 0; }

.insight-type {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 2px;
}

.insight-msg {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.45;
}

.insight-dismiss {
  background: none;
  border: none;
  color: var(--text-3);
  font-size: 18px;
  cursor: pointer;
  padding: 0 0 0 8px;
  line-height: 1;
  flex-shrink: 0;
  transition: color 150ms, transform 150ms var(--spring);
}
.insight-dismiss:active { transform: scale(0.85); color: var(--coral); }

.insight-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px;
  color: var(--text-3);
  font-size: 14px;
}
.insight-empty-icon { font-size: 24px; opacity: 0.5; }

/* Quick Actions */
.quick-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.quick-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  cursor: pointer;
  color: var(--text);
  transition: transform 180ms var(--spring), background 180ms;
}
.quick-btn:active {
  transform: scale(0.95);
  background: var(--surface-hover);
}

.qa-icon { font-size: 20px; }
.qa-label { font-size: 11px; font-weight: 500; color: var(--text-2); }

/* Today Cards */
.today-cards {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.today-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  cursor: pointer;
  transition: transform 180ms var(--spring);
}
.today-card:active { transform: scale(0.96); }

.today-card-icon { font-size: 18px; }

.today-card-val {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.today-card-label {
  font-size: 10px;
  color: var(--text-3);
  font-weight: 500;
  text-align: center;
}

/* Today List */
.today-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.today-event-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.today-event-time {
  font-size: 12px;
  color: var(--teal);
  font-weight: 600;
  min-width: 48px;
  font-family: 'Outfit', sans-serif;
}

.today-event-title {
  flex: 1;
  font-size: 14px;
  color: var(--text);
}

/* ===== BRIEFING SCREEN ===== */
.briefing-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0 16px;
}

.briefing-title-label {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.briefing-timestamp {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
}

.briefing-stack {
  margin-bottom: 20px;
}

.briefing-loading-card {
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  min-height: 160px;
  justify-content: center;
}

.loading-pulse-row {
  display: flex;
  gap: 8px;
}

.loading-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  animation: loadBounce 1.2s ease-in-out infinite;
}
.loading-dot:nth-child(2) { animation-delay: 0.15s; }
.loading-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes loadBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

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

.briefing-content-card {
  padding: 24px;
}

.briefing-text {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-2);
  white-space: pre-wrap;
}

/* Briefing Scores Strip */
.briefing-scores {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}

.bs-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.bs-label {
  font-size: 10px;
  color: var(--text-3);
  font-weight: 500;
  text-align: center;
}

.bs-val {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--teal);
}

/* Brief section headers */
.brief-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 0 10px;
  border-top: 1px solid var(--border);
}

.brief-sec-icon { font-size: 16px; }

.brief-sec-label {
  flex: 1;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}

.brief-add-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 150ms var(--spring);
}
.brief-add-btn:active { transform: scale(0.9); }

.brief-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.brief-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.brief-item-time {
  font-size: 12px;
  color: var(--teal);
  font-weight: 600;
  min-width: 44px;
  font-family: 'Outfit', sans-serif;
}

.brief-item-title {
  flex: 1;
  font-size: 14px;
  color: var(--text);
}

.brief-item-sub {
  font-size: 11px;
  color: var(--text-3);
}

.brief-check {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  color: var(--teal);
  flex-shrink: 0;
  transition: background 150ms, transform 150ms var(--spring);
}
.brief-check.done {
  background: rgba(91,191,170,0.15);
  border-color: rgba(91,191,170,0.3);
}
.brief-check:active { transform: scale(0.88); }

.brief-priority {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.brief-priority.high { background: var(--coral); }
.brief-priority.medium { background: var(--amber); }
.brief-priority.low { background: var(--teal); }

.brief-amount {
  font-size: 14px;
  font-weight: 700;
  color: var(--amber);
  font-family: 'Outfit', sans-serif;
}

.brief-due {
  font-size: 11px;
  color: var(--text-3);
}

/* Brief Nudges */
.brief-nudges {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

/* ===== CHECK-IN SCREEN ===== */
.checkin-header {
  padding: 20px 0 16px;
}

.screen-title {
  font-family: 'Outfit', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.screen-sub {
  font-size: 14px;
  color: var(--text-3);
  line-height: 1.5;
}

/* Logged Card */
.checkin-done-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 28px 24px;
  margin-bottom: 20px;
  text-align: center;
}

.checkin-done-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(91,191,170,0.15);
  border: 1.5px solid rgba(91,191,170,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--teal);
  animation: checkPop 400ms var(--spring) forwards;
}

@keyframes checkPop {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.checkin-done-text {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.checkin-done-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.summary-pill {
  padding: 4px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-2);
}

.checkin-update-btn {
  font-size: 14px;
  color: var(--teal);
  background: none;
  border: 1px solid rgba(91,191,170,0.3);
  border-radius: 10px;
  padding: 8px 20px;
  cursor: pointer;
  transition: background 180ms;
}
.checkin-update-btn:active { background: rgba(91,191,170,0.1); }

/* Slider Blocks */
.slider-blocks {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.slider-block {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  transition: border-color 200ms;
}

.slider-block:focus-within {
  border-color: rgba(91,191,170,0.25);
}

.slider-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

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

.slider-emoji { font-size: 18px; }

.slider-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  font-family: 'Outfit', sans-serif;
}

.slider-val-badge {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--teal);
  min-width: 28px;
  text-align: right;
  transition: transform 100ms var(--spring);
}

.slider-val-badge.pop {
  transform: scale(1.25);
}

/* Custom Range Slider */
.slider-track-wrap {
  margin-bottom: 10px;
}

.ease-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.08);
  outline: none;
  cursor: pointer;
  position: relative;
}

.ease-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--teal);
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(91,191,170,0.35);
  transition: transform 150ms var(--spring), box-shadow 150ms;
}

.ease-slider::-webkit-slider-thumb:active {
  transform: scale(1.2);
  box-shadow: 0 4px 20px rgba(91,191,170,0.45);
}

.ease-slider::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--teal);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 12px rgba(91,191,170,0.35);
}

.slider-hints {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-3);
}

.slider-emoji-row {
  font-size: 18px;
  transition: transform 200ms var(--spring);
}

/* Notes */
.notes-area {
  width: 100%;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  resize: none;
  height: 80px;
  margin-bottom: 16px;
  transition: border-color 200ms;
}
.notes-area:focus {
  outline: none;
  border-color: rgba(91,191,170,0.3);
}
.notes-area::placeholder { color: var(--text-3); }

/* Submit Button */
.submit-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, rgba(91,191,170,0.2), rgba(91,191,170,0.1));
  border: 1px solid rgba(91,191,170,0.35);
  border-radius: 16px;
  color: var(--teal);
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 150ms var(--spring), background 180ms, box-shadow 180ms;
  box-shadow: 0 0 20px rgba(91,191,170,0.06);
  margin-bottom: 8px;
}

.submit-btn:active {
  transform: scale(0.97);
  background: rgba(91,191,170,0.25);
  box-shadow: 0 0 28px rgba(91,191,170,0.12);
}

.submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ===== SCORES SCREEN ===== */
.scores-header {
  padding: 20px 0 16px;
}

.score-gauges {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gauge-item {
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: transform 200ms var(--spring), background 180ms;
  overflow: hidden;
}

.gauge-item:active { transform: scale(0.98); }

.gauge-item.expanded { background: var(--surface-hover); }

.gauge-top {
  display: flex;
  align-items: center;
  gap: 16px;
}

.gauge-ring-wrap {
  position: relative;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.gauge-ring-svg {
  width: 56px;
  height: 56px;
  transform: rotate(-90deg);
}

.gauge-ring-bg {
  fill: none;
  stroke: rgba(255,255,255,0.06);
  stroke-width: 5;
}

.gauge-ring-fill {
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 138;
  stroke-dashoffset: 138;
  transition: stroke-dashoffset 1.2s var(--spring), stroke 500ms;
}

.gauge-num {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.gauge-info { flex: 1; }

.gauge-name {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.gauge-context {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.4;
}

.gauge-chevron {
  color: var(--text-3);
  font-size: 16px;
  transition: transform 300ms var(--ease-out);
  flex-shrink: 0;
}

.gauge-item.expanded .gauge-chevron { transform: rotate(90deg); }

/* Progress Bar */
.gauge-bar-wrap {
  margin-top: 14px;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}

.gauge-bar {
  height: 100%;
  border-radius: 2px;
  transition: width 1.2s var(--spring);
  width: 0%;
}

/* Expanded detail */
.gauge-detail {
  display: none;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.gauge-item.expanded .gauge-detail { display: block; }

.gauge-insight {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
}

/* ===== SETTINGS SCREEN ===== */
.settings-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 0 24px;
}

.settings-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(91,191,170,0.3), rgba(232,184,106,0.2));
  border: 1.5px solid rgba(91,191,170,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--teal);
  flex-shrink: 0;
}

.settings-name {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.settings-email {
  font-size: 13px;
  color: var(--text-3);
  margin-top: 2px;
}

.settings-section {
  margin-bottom: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
}

.settings-section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 12px 16px 8px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
}

.settings-row:first-of-type { border-top: none; }

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

.settings-row-val {
  font-size: 14px;
  color: var(--text-3);
}

.settings-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  background: none;
  border-left: none;
  border-right: none;
  border-bottom: none;
  width: 100%;
  cursor: pointer;
  text-decoration: none;
  transition: background 180ms;
}
.settings-action-row:active { background: rgba(255,255,255,0.04); }

.settings-row-arrow {
  font-size: 18px;
  color: var(--text-3);
}

/* Toggle */
.toggle {
  width: 44px;
  height: 26px;
  border-radius: 13px;
  background: rgba(255,255,255,0.1);
  position: relative;
  cursor: pointer;
  transition: background 250ms var(--ease-out);
  flex-shrink: 0;
}

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

.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  transition: transform 250ms var(--spring);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.toggle.active .toggle-thumb {
  transform: translateX(18px);
}

/* ===== NOTIFICATION DRAWER ===== */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms var(--ease-out);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 80vh;
  background: var(--bg-2);
  border-radius: 24px 24px 0 0;
  border-top: 1px solid var(--border);
  z-index: 201;
  transform: translateY(100%);
  transition: transform 380ms var(--spring);
  display: flex;
  flex-direction: column;
}

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

.drawer-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.15);
  margin: 12px auto 0;
  flex-shrink: 0;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}

.drawer-header h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 600;
}

.drawer-close {
  background: none;
  border: none;
  color: var(--text-3);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  transition: color 150ms, transform 150ms var(--spring);
}
.drawer-close:active { transform: scale(0.85); color: var(--text); }

.drawer-body {
  overflow-y: auto;
  padding: 16px 20px;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

.notif-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 20px;
  color: var(--text-3);
  font-size: 15px;
}

.notif-empty-icon { font-size: 32px; }

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.notif-icon {
  font-size: 18px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-body { flex: 1; }
.notif-type {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 2px;
}
.notif-msg { font-size: 14px; color: var(--text-2); line-height: 1.45; }

.notif-dismiss {
  background: none;
  border: none;
  color: var(--text-3);
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  transition: color 150ms, transform 150ms var(--spring);
}
.notif-dismiss:active { transform: scale(0.85); color: var(--coral); }

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 300;
  display: flex;
  align-items: flex-end;
  padding-bottom: calc(var(--safe-bottom) + 16px);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeInOverlay 200ms var(--ease-out);
}

@keyframes fadeInOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  width: calc(100% - 32px);
  max-width: 480px;
  margin: 0 auto;
  padding: 24px;
  border-radius: 24px;
  animation: slideUpModal 350ms var(--spring);
}

@keyframes slideUpModal {
  from { transform: translateY(40px) scale(0.96); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

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

.modal-header h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-3);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  transition: color 150ms, transform 150ms var(--spring);
}
.modal-close:active { transform: scale(0.85); }

.modal-input {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  margin-bottom: 10px;
  transition: border-color 200ms;
}
.modal-input:focus {
  outline: none;
  border-color: rgba(91,191,170,0.35);
}
.modal-input::placeholder { color: var(--text-3); }
.modal-input option { background: var(--bg-2); color: var(--text); }

.modal-row {
  display: flex;
  gap: 10px;
}

.modal-row .modal-input { flex: 1; }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: calc(var(--tab-h) + var(--safe-bottom) + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: 10px 20px;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  z-index: 400;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 250ms var(--ease-out), transform 280ms var(--spring);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== PULL-TO-REFRESH INDICATOR ===== */
.ptr-indicator {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: 12px;
  gap: 8px;
  opacity: 0;
  transition: opacity 200ms;
}

.ptr-indicator.visible { opacity: 1; }

/* ===== STAGGER ANIMATIONS ===== */
.stagger-item {
  animation: stagIn 400ms var(--spring) both;
}

.stagger-item:nth-child(1) { animation-delay: 0ms; }
.stagger-item:nth-child(2) { animation-delay: 50ms; }
.stagger-item:nth-child(3) { animation-delay: 100ms; }
.stagger-item:nth-child(4) { animation-delay: 150ms; }
.stagger-item:nth-child(5) { animation-delay: 200ms; }
.stagger-item:nth-child(6) { animation-delay: 250ms; }

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

/* ===== REFRESH SPINNING ===== */
@keyframes spin {
  to { transform: rotate(360deg); }
}
.spinning svg { animation: spin 800ms linear infinite; }

/* ===== RESPONSIVE ===== */
@media (min-width: 480px) {
  .screen-scroll { padding: 0 20px; }
}

@media (min-width: 768px) {
  .tab-bar { max-width: 480px; left: 50%; transform: translateX(-50%); border-radius: 24px 24px 0 0; }
  #app { max-width: 480px; left: 50%; transform: translateX(-50%); }
  .drawer { max-width: 480px; left: 50%; right: auto; transform: translateX(-50%) translateY(100%); border-radius: 24px 24px 0 0; }
  .drawer.open { transform: translateX(-50%) translateY(0); }
}

/* ===== EMPTY STATES ===== */
.list-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 28px;
  color: var(--text-3);
  font-size: 14px;
  text-align: center;
}
.list-empty-icon { font-size: 28px; opacity: 0.5; }

/* ===== PRIORITY BADGES ===== */
.priority-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.priority-dot.high { background: var(--coral); }
.priority-dot.medium { background: var(--amber); }
.priority-dot.low { background: var(--teal); }

/* ===== SCORE COLORS ===== */
.score-green { stroke: var(--teal); }
.score-amber { stroke: var(--amber); }
.score-coral { stroke: var(--coral); }
.score-green-bar { background: var(--teal); }
.score-amber-bar { background: var(--amber); }
.score-coral-bar { background: var(--coral); }
.score-green-text { color: var(--teal); }
.score-amber-text { color: var(--amber); }
.score-coral-text { color: var(--coral); }

/* ===== TODAY'S PATH ===== */
.path-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px 8px;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
}

.path-title-label {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

.path-date {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
}

.path-loading-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 60px 24px;
  color: var(--text-3);
}

/* 5 stacked path cards */
.path-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 16px 12px;
}

.path-card {
  padding: 20px 20px 22px;
  border-radius: var(--radius-lg);
  transition: transform 180ms var(--spring), box-shadow 180ms;
  cursor: default;
  position: relative;
  overflow: hidden;
}

.path-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  border-radius: 4px 0 0 4px;
}

/* Per-category accent left border */
.path-card-focus::before    { background: #a78bfa; }  /* indigo/violet */
.path-card-wellness::before { background: var(--teal); }
.path-card-selfcare::before { background: #86efac; }  /* mint green */
.path-card-financial::before { background: var(--amber); }
.path-card-observation::before { background: var(--coral); }

.path-card-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.path-card-icon { font-size: 18px; flex-shrink: 0; }

.path-card-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* Per-category label color */
.path-card-focus    .path-card-label { color: #a78bfa; }
.path-card-wellness .path-card-label { color: var(--teal); }
.path-card-selfcare .path-card-label { color: #86efac; }
.path-card-financial .path-card-label { color: var(--amber); }
.path-card-observation .path-card-label { color: var(--coral); }

.path-card-body {
  font-size: 17px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.55;
  letter-spacing: -0.1px;
}

/* Focus card gets slightly larger text — it's the hero item */
.path-card-focus .path-card-body {
  font-size: 20px;
  font-weight: 500;
  font-style: italic;
  letter-spacing: -0.3px;
}

.path-card:active { transform: scale(0.985); }

.path-generated-at {
  text-align: center;
  font-size: 11px;
  color: var(--text-3);
  padding: 4px 16px 16px;
}

/* Mobile swipe hint — subtle indicator for horizontal scroll on small screens */
@media (max-width: 380px) {
  .path-cards { padding: 8px 12px 12px; }
  .path-card-body { font-size: 15px; }
  .path-card-focus .path-card-body { font-size: 18px; }
}

/* ===== MEMORY TAB ===== */

.memory-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 8px;
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(to bottom, var(--bg) 80%, transparent);
}

.memory-title-label {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
}

.memory-subtitle {
  font-size: 13px;
  color: var(--text-3);
  margin-top: 2px;
}

.memory-loading-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 20px;
}

.memory-section {
  padding: 0 16px 4px;
}

.memory-daily-card,
.memory-summary-card {
  padding: 16px 18px 18px;
  border-radius: 16px;
  margin-bottom: 4px;
  background: rgba(255,255,255,0.04);
}

.memory-card-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.memory-card-icon {
  font-size: 16px;
  color: var(--teal);
  opacity: 0.8;
}

.memory-card-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-3);
}

.memory-text {
  font-size: 16px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.65;
  letter-spacing: -0.1px;
  margin: 0;
}

.memory-patterns-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 4px;
}

.memory-pattern-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  animation: slideIn 0.35s ease both;
}

.memory-pattern-icon {
  font-size: 14px;
  color: var(--teal);
  opacity: 0.7;
  flex-shrink: 0;
  margin-top: 2px;
}

.memory-pattern-text {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-2);
  line-height: 1.55;
}

.memory-empty-state {
  font-size: 14px;
  color: var(--text-3);
  font-style: italic;
  padding: 8px 0 4px;
  line-height: 1.5;
}

@media (max-width: 380px) {
  .memory-title-label { font-size: 22px; }
  .memory-text { font-size: 15px; }
}
