/* ============================================
   MY ONE BUTTON — Design System
   ============================================ */

:root {
  --bg: #000000;
  --surface: #111111;
  --surface-2: #1a1a1a;
  --border: #222222;
  --purple: #6c5ce7;
  --purple-light: #a394ff;
  --orange: #e17055;
  --green: #3ecf8e;
  --blue: #74b9ff;
  --gold: #f0c040;
  --text-primary: #ffffff;
  --text-mid: #cccccc;
  --text-dim: #888888;
  --text-faint: #555555;
  --text-date: #444444;
  --danger: #ff4f6d;
  --avoid-bg: #1a1210;
  --avoid-border: #3d2800;
  --avoid-text: #f0c040;
  --font-heading: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --button-size: 144px;
  --mic-icon: 48px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--purple-light); text-decoration: none; }
button { font-family: var(--font-body); border: none; background: none; cursor: pointer; color: inherit; }
input, textarea {
  font-family: var(--font-body); background: var(--surface); color: var(--text-primary);
  border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; font-size: 16px; outline: none; width: 100%;
}
input:focus, textarea:focus { border-color: var(--purple); }
textarea { resize: vertical; }

.app-name { font-family: var(--font-heading); font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: 3px; color: var(--text-faint); }
.heading { font-family: var(--font-heading); font-weight: 800; }
.btn-primary {
  width: 100%; padding: 14px 24px; background: var(--purple); color: #fff;
  font-size: 16px; font-weight: 700; border: none; border-radius: 8px; cursor: pointer; transition: opacity 0.2s;
}
.btn-primary:hover { opacity: 0.9; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-text { color: var(--text-dim); font-size: 14px; background: none; border: none; cursor: pointer; padding: 8px 16px; }
.btn-icon { background: none; border: none; cursor: pointer; padding: 8px; }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ============================================
   Screens
   ============================================ */
.screen { display: flex; justify-content: center; align-items: center; min-height: 100dvh; padding: 24px; }
.screen-app { flex-direction: column; align-items: stretch; padding: 0; justify-content: flex-start; }

/* ============================================
   Auth
   ============================================ */
.auth-container { width: 100%; max-width: 360px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.auth-brand { font-family: var(--font-heading); font-weight: 800; font-size: 28px; color: var(--purple); letter-spacing: 2px; margin-bottom: 24px; }
.auth-social-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text-dim); font-size: 15px; cursor: not-allowed; opacity: 0.5; position: relative;
}
.coming-soon-badge { font-size: 10px; background: var(--surface-2); color: var(--text-dim); padding: 2px 6px; border-radius: 4px; margin-left: auto; }
.auth-divider { width: 100%; display: flex; align-items: center; gap: 12px; margin: 4px 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-divider span { color: var(--text-dim); font-size: 13px; }
#auth-form { width: 100%; display: flex; flex-direction: column; gap: 12px; }
.auth-toggle { font-size: 14px; color: var(--text-dim); }
.auth-toggle a { color: var(--purple-light); font-weight: 500; }
.auth-error { display: none; width: 100%; padding: 10px 14px; background: rgba(255,79,109,0.1); border: 1px solid var(--danger); border-radius: 8px; color: var(--danger); font-size: 13px; text-align: center; }
.name-heading { font-family: var(--font-heading); font-weight: 800; font-size: 22px; text-align: center; }
.name-subtext { color: var(--text-dim); font-size: 14px; margin-bottom: 8px; }
#name-form { width: 100%; display: flex; flex-direction: column; gap: 12px; }
#name-form input { text-align: center; font-size: 18px; }

/* ============================================
   Onboarding
   ============================================ */
.onboarding-container { width: 100%; max-width: 360px; display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }
.onboarding-slides { position: relative; width: 100%; min-height: 220px; }
.onboarding-slide { display: none; flex-direction: column; align-items: center; gap: 16px; }
.onboarding-slide.active { display: flex; }
.onboarding-slide h2 { font-family: var(--font-heading); font-weight: 800; font-size: 22px; }
.onboarding-slide p { color: var(--text-dim); font-size: 15px; line-height: 1.5; }
.onboarding-icon { margin-bottom: 8px; }
.onboarding-dots { display: flex; gap: 8px; }
.onboarding-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); transition: background 0.2s; }
.onboarding-dot.active { background: var(--purple); }
.onboarding-actions { display: flex; gap: 16px; align-items: center; width: 100%; justify-content: space-between; }
.zone-dot { width: 24px; height: 24px; border-radius: 50%; }

/* ============================================
   Home Screen
   ============================================ */
.home-top { padding: 48px 24px 0; text-align: center; }
.home-date { font-size: 12px; color: var(--text-date); margin-top: 24px; }
.home-greeting { font-size: 22px; margin-top: 32px; }
.home-subgreeting { font-size: 15px; color: var(--text-dim); margin-top: 4px; }

/* Focus strip */
.focus-strip {
  margin-top: 32px; padding: 10px 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; cursor: pointer; text-align: left; transition: border-color 0.2s;
}
.focus-strip:hover { border-color: var(--purple); }
.focus-label { display: block; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 2px; color: var(--purple); margin-bottom: 4px; }
.focus-text { font-size: 14px; }

/* The Button */
.button-area { display: flex; flex-direction: column; align-items: center; padding: 48px 0 16px; position: relative; }
.the-button {
  width: var(--button-size); height: var(--button-size); border-radius: 50%; background: var(--purple);
  display: flex; align-items: center; justify-content: center; position: relative; z-index: 2;
  transition: background 0.2s, transform 0.1s; cursor: pointer; border: none;
}
.the-button:active { transform: scale(0.95); }
.the-button.listening { background: var(--danger); }

/* Pulsing rings */
.button-rings { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 1; }
.ring {
  position: absolute; border-radius: 50%; border: 2px solid var(--purple);
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  animation: pulse 2.5s ease-out infinite; opacity: 0;
}
.ring-1 { width: 160px; height: 160px; animation-delay: 0s; }
.ring-2 { width: 190px; height: 190px; animation-delay: 0.6s; }
.ring-3 { width: 220px; height: 220px; animation-delay: 1.2s; }

@keyframes pulse {
  0% { opacity: 0.5; transform: translate(-50%, -50%) scale(0.8); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.2); }
}

.button-hint { font-size: 13px; color: var(--text-primary); margin-top: 16px; text-align: center; }

/* Transcript */
.transcript-area { padding: 0 24px; text-align: center; }
.live-transcript { font-size: 16px; color: var(--text-dim); font-style: italic; }

/* Result cards */
.result-cards { padding: 0 24px; display: flex; flex-direction: column; gap: 8px; }
.result-card {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  font-size: 14px; opacity: 0; transform: translateY(8px); transition: all 0.3s ease;
}
.result-card.show { opacity: 1; transform: translateY(0); }
.result-badge { font-size: 11px; font-weight: 700; color: #000; padding: 2px 8px; border-radius: 4px; white-space: nowrap; }

/* Home bottom */
/* Weekly feedback prompt */
.weekly-feedback-prompt {
  margin: 8px 24px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; font-size: 13px; color: var(--text-dim);
}

.home-bottom { padding: 16px 24px 32px; margin-top: auto; }
.dashboard-btn {
  width: 100%; padding: 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; color: var(--text-mid); font-size: 14px; font-weight: 500;
  display: flex; align-items: center; justify-content: center; gap: 4px; cursor: pointer;
  transition: border-color 0.2s;
}
.dashboard-btn:hover { border-color: var(--purple); }
.dash-sep { color: var(--text-faint); }

/* ============================================
   Input Modal
   ============================================ */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.6); }
.modal-sheet {
  position: relative; z-index: 1; width: 100%; max-width: 400px;
  background: var(--surface); border-radius: 16px 16px 0 0; padding: 24px;
  animation: slideUp 0.25s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-options { display: flex; gap: 16px; justify-content: center; }
.modal-option {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 20px 32px; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 12px; font-size: 14px; color: var(--text-mid); cursor: pointer;
  transition: border-color 0.2s;
}
.modal-option:hover { border-color: var(--purple); }
.type-input-area { display: flex; gap: 8px; align-items: center; }
.type-input-area input { flex: 1; }

/* ============================================
   Listening & Thinking Overlays
   ============================================ */
.listening-overlay, .thinking-overlay {
  position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,0.9);
  display: flex; align-items: center; justify-content: center;
}
.listening-content, .thinking-content { display: flex; flex-direction: column; align-items: center; padding: 24px; text-align: center; }
.thinking-rings { position: relative; width: 80px; height: 80px; }
.ring-think-1, .ring-think-2, .ring-think-3 {
  position: absolute; border-radius: 50%; border: 2px solid var(--purple);
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  animation: pulse 1.5s ease-out infinite; opacity: 0;
}
.ring-think-1 { width: 40px; height: 40px; animation-delay: 0s; }
.ring-think-2 { width: 60px; height: 60px; animation-delay: 0.3s; }
.ring-think-3 { width: 80px; height: 80px; animation-delay: 0.6s; }

.manual-stop-btn {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 20px);
  right: 20px;
  width: 44px; height: 44px;
  background: #fff;
  border: none;
  border-radius: 10px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4);
  z-index: 210;
  padding: 0;
}
.manual-stop-btn:active { transform: scale(0.94); }
.listening-overlay.mic-active .manual-stop-btn { display: flex; }

/* ============================================
   Brain Dump Confirmation
   ============================================ */
.braindump-container { width: 100%; max-width: 400px; padding: 24px; }
.braindump-items { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow-y: auto; }
.braindump-item {
  padding: 10px 14px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; font-size: 14px; display: flex; align-items: center; gap: 10px;
}
.braindump-badge { font-size: 10px; font-weight: 700; color: #000; padding: 2px 6px; border-radius: 4px; white-space: nowrap; }

/* ============================================
   Dashboard
   ============================================ */
.dashboard-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 16px 8px; position: sticky; top: 0; background: var(--bg); z-index: 10;
}
.zones-accordion { padding: 0 16px 100px; display: flex; flex-direction: column; gap: 8px; }
.zone-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.zone-header {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  cursor: pointer; background: none; border: none; color: inherit; text-align: left;
}
.zone-info { flex: 1; display: flex; flex-direction: column; }
.zone-name { font-size: 16px; font-weight: 800; font-family: var(--font-heading); }
.zone-subtitle { font-size: 12px; color: var(--text-dim); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zone-count { font-size: 14px; color: var(--text-dim); font-weight: 500; min-width: 24px; text-align: right; }
.zone-chevron { transition: transform 0.2s; flex-shrink: 0; }
.zone-card.open .zone-chevron { transform: rotate(90deg); }
.zone-content { display: none; padding: 0 16px 16px; }
.zone-card.open .zone-content { display: block; }
.zone-empty { font-size: 13px; color: var(--text-dim); padding: 8px 0; }

/* Task items */
.task-item { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.task-item:last-child { border-bottom: none; }
.task-check { flex-shrink: 0; padding: 2px; background: none; border: none; cursor: pointer; }
.task-circle { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--purple); transition: background 0.2s; }
.task-circle.checked { background: var(--purple); }
.task-body { flex: 1; min-width: 0; }
.task-text { font-size: 14px; display: block; }
.task-meta { font-size: 11px; color: var(--text-faint); display: block; margin-top: 2px; }
.task-delete { flex-shrink: 0; color: var(--text-faint); font-size: 18px; padding: 2px 6px; background: none; border: none; cursor: pointer; opacity: 0.5; }
.task-delete:hover { opacity: 1; color: var(--danger); }
.completed-toggle { margin-top: 8px; }
.completed-toggle summary { font-size: 12px; color: var(--text-dim); cursor: pointer; padding: 4px 0; }

/* Avoidance flag */
.avoidance-flag {
  padding: 10px 14px; margin: 4px 0 8px 30px; font-size: 13px; line-height: 1.4;
  background: var(--avoid-bg); border: 1px solid var(--avoid-border); border-radius: 8px; color: var(--avoid-text);
}

/* Person smart surfacing in Today */
.person-surface {
  display: flex; align-items: center; gap: 6px; margin-top: 4px; padding: 4px 8px;
  background: rgba(116,185,255,0.08); border-radius: 6px; font-size: 11px; color: var(--blue);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.person-surface-avatar {
  width: 16px; height: 16px; border-radius: 50%; background: var(--blue); color: #000;
  display: inline-flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; flex-shrink: 0;
}

/* Note items */
.note-item { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.note-item:last-child { border-bottom: none; }
.note-body { flex: 1; min-width: 0; }

/* People */
.person-card {
  display: flex; align-items: center; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--border); cursor: pointer;
}
.person-card:last-child { border-bottom: none; }
.person-card.ghost { opacity: 0.4; cursor: default; }
.person-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--blue);
  display: flex; align-items: center; justify-content: center; font-weight: 700;
  font-size: 16px; color: #000; flex-shrink: 0;
}
.person-info { flex: 1; min-width: 0; }
.person-name { font-size: 14px; font-weight: 700; display: block; }
.person-preview { font-size: 12px; color: var(--text-dim); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Person timeline */
.person-timeline { padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.timeline-item { padding: 12px 16px; background: var(--surface); border-radius: 8px; border-left: 3px solid var(--blue); }
.timeline-date { font-size: 11px; color: var(--text-faint); display: block; margin-bottom: 4px; }
.timeline-note { font-size: 14px; line-height: 1.4; }

/* Wins & Habits */
.wins-section-title { font-size: 13px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; padding: 8px 0 4px; }
.habit-ghost { padding: 8px 0; }
.habit-suggestions { display: flex; flex-wrap: wrap; gap: 8px; }
.habit-suggest-btn {
  padding: 8px 14px; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 20px; font-size: 13px; color: var(--text-mid); cursor: pointer;
  transition: border-color 0.2s;
}
.habit-suggest-btn:hover { border-color: var(--gold); }
.habit-item { padding: 8px 0; border-bottom: 1px solid var(--border); }
.habit-item:last-child { border-bottom: none; }
.habit-header { display: flex; align-items: center; gap: 10px; }
.habit-name { font-size: 14px; font-weight: 500; flex: 1; }
.habit-streak { font-size: 12px; color: var(--gold); }
.habit-tracker { display: flex; gap: 4px; margin-top: 8px; padding-left: 30px; }
.tracker-day { width: 24px; height: 24px; border-radius: 4px; background: var(--surface-2); }
.tracker-day.done { background: var(--purple); }

.win-item { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.win-item:last-child { border-bottom: none; }
.win-icon { font-size: 16px; }

/* Feedback card */
.feedback-card {
  margin: 8px 16px 100px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; display: flex; align-items: center; gap: 10px; cursor: pointer;
  font-size: 13px; color: var(--text-dim); transition: border-color 0.2s;
}
.feedback-card:hover { border-color: var(--purple); }

/* Floating mic */
.float-mic {
  position: fixed; bottom: 24px; right: 24px; width: 48px; height: 48px;
  border-radius: 50%; background: var(--purple); display: flex; align-items: center;
  justify-content: center; z-index: 50; box-shadow: 0 4px 12px rgba(108,92,231,0.4);
  cursor: pointer; border: none; transition: transform 0.1s;
}
.float-mic:active { transform: scale(0.9); }

/* ============================================
   Settings
   ============================================ */
.settings-list { padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.settings-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: var(--surface); border-radius: 8px; font-size: 15px;
}
.settings-link { cursor: pointer; text-decoration: none; color: var(--text-primary); }
.settings-divider { height: 1px; background: var(--border); margin: 4px 0; }
.settings-danger-text { font-size: 12px; color: var(--text-faint); text-align: center; padding: 4px; }

.settings-item-stack {
  flex-direction: column; align-items: stretch; gap: 10px;
}
.persona-group { display: flex; gap: 6px; width: 100%; }
.persona-btn {
  flex: 1; padding: 10px 8px; font-size: 13px; font-weight: 500;
  background: var(--surface-2); color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 6px;
  cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s;
  min-height: 44px;
}
.persona-btn:not(.active):hover { background: var(--border); color: var(--text-primary); }
.persona-btn.active { background: var(--purple); color: #fff; border-color: var(--purple); }

/* Toggle switch */
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; background: var(--border); border-radius: 24px;
  cursor: pointer; transition: 0.2s;
}
.toggle-slider::before {
  content: ''; position: absolute; height: 18px; width: 18px; left: 3px; bottom: 3px;
  background: white; border-radius: 50%; transition: 0.2s;
}
.toggle input:checked + .toggle-slider { background: var(--purple); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ============================================
   Morning Briefing
   ============================================ */
.briefing-overlay {
  position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,0.95);
  display: flex; align-items: center; justify-content: center;
}
.briefing-content { text-align: center; padding: 24px; max-width: 360px; }
.briefing-text { font-size: 16px; line-height: 1.6; color: var(--text-mid); text-align: left; width: 100%; }
.briefing-greeting { font-family: var(--font-heading); font-weight: 800; font-size: 20px; color: var(--text-primary); margin-bottom: 16px; text-align: center; }
.briefing-section { font-size: 13px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.briefing-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.briefing-list li { padding: 10px 14px; background: var(--surface); border-radius: 8px; border-left: 3px solid var(--purple); font-size: 15px; }
.briefing-time { color: var(--purple-light); font-weight: 700; margin-right: 4px; }
.briefing-line { font-size: 14px; color: var(--text-dim); margin-top: 8px; }

/* ============================================
   Alarm
   ============================================ */
.alarm-overlay {
  position: fixed; inset: 0; z-index: 500; background: rgba(0,0,0,0.97);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.3s ease;
}
.alarm-content { text-align: center; padding: 24px; max-width: 340px; display: flex; flex-direction: column; align-items: center; }
.alarm-icon { font-size: 64px; animation: alarmPulse 0.8s ease-in-out infinite; }
.alarm-time {
  font-family: var(--font-heading); font-weight: 800; font-size: 36px;
  color: var(--purple); margin-top: 16px;
}
.alarm-nudge {
  font-size: 14px; color: var(--text-dim); font-style: italic; text-align: center;
  margin-top: 12px; padding: 0 20px; line-height: 1.4;
}
.alarm-actions {
  display: flex; flex-direction: column; gap: 10px;
  margin-top: 28px; width: 100%; max-width: 280px;
}
.alarm-actions .btn-primary,
.alarm-actions .alarm-btn-secondary {
  width: 100%; padding: 14px 20px; font-size: 15px;
  border-radius: 10px; cursor: pointer; font-weight: 600;
}
.alarm-btn-secondary {
  background: var(--surface-2); color: var(--text-primary);
  border: 1px solid var(--border); font-family: var(--font-body);
}
.alarm-btn-secondary:active { transform: scale(0.98); }
@keyframes alarmPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* ============================================
   Celebration
   ============================================ */
.celebration-overlay {
  position: fixed; inset: 0; z-index: 400; background: rgba(0,0,0,0.95);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.3s ease;
}
.celebration-content { text-align: center; padding: 24px; }
.celebration-content h2 { color: var(--gold); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ============================================
   Polish: Transitions & Micro-interactions
   ============================================ */

/* Smooth screen transitions */
.screen { animation: screenIn 0.2s ease; }
@keyframes screenIn { from { opacity: 0; } to { opacity: 1; } }

/* Task completion animation */
.task-item { transition: opacity 0.3s, transform 0.3s; }
.task-item.completing { opacity: 0.5; transform: translateX(20px); }

/* Zone card expand animation */
.zone-content { animation: expandIn 0.2s ease; }
@keyframes expandIn { from { opacity: 0; max-height: 0; } to { opacity: 1; max-height: 2000px; } }

/* Button glow on hover */
.the-button { box-shadow: 0 0 30px rgba(108, 92, 231, 0.3); }
.the-button:hover { box-shadow: 0 0 50px rgba(108, 92, 231, 0.5); }
.the-button.listening { box-shadow: 0 0 40px rgba(255, 79, 109, 0.4); }

/* Dashboard button hover lift */
.dashboard-btn { transition: border-color 0.2s, transform 0.1s; }
.dashboard-btn:active { transform: scale(0.98); }

/* Focus strip pulse when empty */
.focus-strip:not(:has(.focus-text[style*="var(--text-primary)"])) {
  animation: subtlePulse 3s ease-in-out infinite;
}
@keyframes subtlePulse {
  0%, 100% { border-color: var(--border); }
  50% { border-color: var(--purple); }
}

/* Habit tracker day transition */
.tracker-day { transition: background 0.3s ease; }

/* Person card hover */
.person-card:not(.ghost):hover { background: var(--surface-2); border-radius: 8px; }

/* Settings item hover */
.settings-item:hover { background: var(--surface-2); }
.settings-item { transition: background 0.15s; }

/* Modal smooth backdrop */
.modal-backdrop { animation: fadeIn 0.2s ease; }

/* Listening button pulse */
.the-button.listening {
  animation: listenPulse 1s ease-in-out infinite;
}
@keyframes listenPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Safe area padding for notched phones */
@supports (padding-top: env(safe-area-inset-top)) {
  .home-top { padding-top: calc(48px + env(safe-area-inset-top)); }
  .dashboard-header { padding-top: calc(16px + env(safe-area-inset-top)); }
  .home-bottom { padding-bottom: calc(32px + env(safe-area-inset-bottom)); }
  .float-mic { bottom: calc(24px + env(safe-area-inset-bottom)); }
}

/* ============================================
   Session 2.5 — Home header upgrade
   ============================================ */
.home-brand {
  font-size: 18px;
  color: var(--text-primary);
  letter-spacing: 3px;
  margin-bottom: 6px;
}
.home-date {
  color: var(--text-primary);
  font-weight: 500;
}

/* ============================================
   Session 2.5 — Dashboard bar position (moved up)
   ============================================ */
.home-bar { padding: 16px 24px 8px; }
.home-bar .dashboard-btn {
  padding: 14px 10px;
  font-size: 13px;
  gap: 4px;
  background: rgba(108, 92, 231, 0.4);
  border: 2px solid rgba(108, 92, 231, 0.8);
  color: var(--text-primary);
  font-weight: 600;
}
.dashboard-header .app-name { color: var(--text-primary); }

/* ============================================
   Session 2.5 — Compact feedback (home + dashboard)
   ============================================ */
.feedback-compact {
  margin: auto 16px 16px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dim);
}
.feedback-compact .feedback-link {
  color: var(--purple-light);
  background: none;
  border: none;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}
.feedback-compact .feedback-dismiss {
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  font-size: 16px;
  padding: 0 4px;
  margin-left: 4px;
}
/* Override the original feedback-card box model when .feedback-compact is present */
.feedback-card.feedback-compact { margin: auto 16px 16px; }

/* ============================================
   Session 2.5 — Swipe-to-archive gesture
   ============================================ */
.swipeable {
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
}
.swipe-content {
  background: var(--bg);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  z-index: 1;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: pan-y;
}
.swipe-content.revealed { transform: translateX(-80px); }
.swipe-archive-btn {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 80px;
  background: #888888;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border: none;
  z-index: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.swipe-archive-btn:active { background: #999999; }

/* ============================================
   Session 2.5 — Archived (N) collapsible section
   ============================================ */
.archived-section {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.archived-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  font-size: 13px;
  color: var(--text-dim);
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px 0;
  text-align: left;
}
.archived-toggle .chevron { transition: transform 0.2s; flex-shrink: 0; }
.archived-section.open .archived-toggle .chevron { transform: rotate(90deg); }
.archived-items { display: none; margin-top: 6px; }
.archived-section.open .archived-items { display: block; }
.archived-item {
  opacity: 0.6;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.archived-item:last-child { border-bottom: none; }
.archived-item-body { flex: 1; min-width: 0; }
.archived-item-text { font-size: 14px; display: block; }
.archived-item-meta { font-size: 11px; color: var(--text-faint); display: block; margin-top: 2px; }
.restore-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--purple-light);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
}
.restore-btn:hover { background: var(--surface-2); }
