/* ============================================================
   KINTSU — Sistema visual premium
   Dark theme · Mobile-first · App-native feel
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=DM+Serif+Display:ital@0;1&display=swap');

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   TOKENS — Dark theme (default)
   ============================================================ */
:root {
  /* Backgrounds */
  --bg-base:       #0C0D11;
  --bg-surface:    #13151C;
  --bg-elevated:   #1A1D28;
  --bg-overlay:    #1F2233;
  --bg-glass:      rgba(26, 29, 40, 0.85);

  /* Brand */
  --brand:         #8B7FFF;
  --brand-dim:     #6C62E0;
  --brand-glow:    rgba(139, 127, 255, 0.18);
  --brand-subtle:  rgba(139, 127, 255, 0.08);

  /* Accents */
  --accent-teal:   #5DD8C0;
  --accent-rose:   #FF7DA0;
  --accent-amber:  #FFBC5B;
  --accent-blue:   #63B3FF;

  /* Emotional state colors */
  --state-full:      #5DD8C0;
  --state-reduced:   #FFBC5B;
  --state-survival:  #FF7DA0;
  --state-crisis:    #FF6B6B;

  /* Text */
  --text-primary:   #F0F1FF;
  --text-secondary: #9195B8;
  --text-muted:     #5A5E7A;
  --text-inverse:   #0C0D11;

  /* Borders */
  --border-subtle:  rgba(255,255,255,0.06);
  --border-default: rgba(255,255,255,0.10);
  --border-strong:  rgba(255,255,255,0.18);

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 24px var(--brand-glow);

  /* Radius */
  --radius-sm:   8px;
  --radius-md:   14px;
  --radius-lg:   20px;
  --radius-xl:   28px;
  --radius-full: 9999px;

  /* Spacing */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  32px;
  --space-2xl: 48px;

  /* Transitions */
  --transition-fast:   150ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-normal: 250ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-slow:   400ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-spring: 350ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Safe areas */
  --safe-top:    env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  /* Nav heights */
  --nav-height: 64px;
  --bottom-nav-height: calc(64px + var(--safe-bottom));
  --header-height: 56px;
}

/* ============================================================
   LAYOUT SHELL
   ============================================================ */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-width: 430px;
  margin: 0 auto;
  position: relative;
  background: var(--bg-base);
}

@media (min-width: 768px) {
  .app-shell {
    max-width: 100%;
    flex-direction: row;
  }
  .app-sidebar {
    display: flex;
    flex-direction: column;
    width: 260px;
    min-height: 100dvh;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-subtle);
    padding: var(--space-xl) 0;
    position: sticky;
    top: 0;
    flex-shrink: 0;
  }
  .app-main {
    flex: 1;
    max-width: 720px;
    padding: var(--space-xl) var(--space-2xl);
  }
  .bottom-nav { display: none !important; }
  .app-header { display: none !important; }
}

/* ============================================================
   HEADER MOBILE
   ============================================================ */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: calc(var(--safe-top) + var(--space-sm)) var(--space-md) var(--space-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  min-height: var(--header-height);
}

.app-header__logo {
  font-family: 'DM Serif Display', serif;
  font-size: 20px;
  color: var(--brand);
  letter-spacing: -0.3px;
}

.app-header__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  text-align: center;
}

.app-header__action {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}
.app-header__action:active { transform: scale(0.92); }

/* ============================================================
   BOTTOM NAVIGATION
   ============================================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: var(--bg-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-sm) var(--space-md) calc(var(--space-sm) + var(--safe-bottom));
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 200;
}

.bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  min-width: 52px;
}
.bottom-nav__item.active {
  color: var(--brand);
}
.bottom-nav__item:active { transform: scale(0.88); }
.bottom-nav__icon {
  width: 22px;
  height: 22px;
  stroke-width: 1.8;
}
.bottom-nav__label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2px;
}
.bottom-nav__item.active .bottom-nav__icon-wrapper {
  background: var(--brand-subtle);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
}

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */
.app-main {
  flex: 1;
  padding: var(--space-md);
  padding-bottom: calc(var(--bottom-nav-height) + var(--space-lg));
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.card--elevated {
  background: var(--bg-elevated);
  box-shadow: var(--shadow-md);
}
.card--interactive:active {
  transform: scale(0.98);
}
.card__header {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-subtle);
}
.card__body {
  padding: var(--space-lg);
}
.card__footer {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--border-subtle);
}

/* ============================================================
   DASHBOARD — GREETING SECTION
   ============================================================ */
.greeting-section {
  margin-bottom: var(--space-lg);
  padding: var(--space-xl) var(--space-lg);
  background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-surface) 100%);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
}
.greeting-section::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  background: var(--brand-glow);
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}
.greeting-section__time {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-xs);
}
.greeting-section__title {
  font-family: 'DM Serif Display', serif;
  font-size: 26px;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}
.greeting-section__subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Day mode badge */
.day-mode-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-top: var(--space-md);
}
.day-mode-badge--full     { background: rgba(93,216,192,0.12); color: var(--state-full); }
.day-mode-badge--reduced  { background: rgba(255,188,91,0.12); color: var(--state-reduced); }
.day-mode-badge--survival { background: rgba(255,125,160,0.12); color: var(--state-survival); }
.day-mode-badge--none     { background: var(--bg-overlay); color: var(--text-muted); }

/* Progress ring */
.progress-ring-wrapper {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}
.progress-ring {
  flex-shrink: 0;
}
.progress-ring__text {
  fill: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 14px;
}
.progress-ring__subtext {
  fill: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
}
.progress-stats__label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.progress-stats__value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

/* ============================================================
   TASK CARDS
   ============================================================ */
.task-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.task-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.task-card:active { transform: scale(0.98); }
.task-card--done {
  opacity: 0.5;
}
.task-card--anchor::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--brand);
  border-radius: 0 2px 2px 0;
}

.task-card__check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border-default);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-spring);
  margin-top: 2px;
  cursor: pointer;
}
.task-card__check:active { transform: scale(0.85); }
.task-card__check.checked {
  background: var(--brand);
  border-color: var(--brand);
}
.task-card__check.checked svg { opacity: 1; }
.task-card__check svg { opacity: 0; transition: opacity var(--transition-fast); }

.task-card__content { flex: 1; min-width: 0; }
.task-card__title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 4px;
}
.task-card--done .task-card__title {
  text-decoration: line-through;
  color: var(--text-muted);
}
.task-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* Urgency dots */
.urgency-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.urgency-dot--1 { background: var(--text-muted); }
.urgency-dot--2 { background: var(--accent-blue); }
.urgency-dot--3 { background: var(--accent-amber); }
.urgency-dot--4 { background: var(--accent-rose); }
.urgency-dot--5 { background: var(--state-crisis); }

.task-version-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.3px;
}
.task-version-badge--minimal  { background: rgba(255,188,91,0.12); color: var(--accent-amber); }
.task-version-badge--good     { background: rgba(99,179,255,0.12); color: var(--accent-blue); }
.task-version-badge--ideal    { background: rgba(93,216,192,0.12); color: var(--state-full); }

.category-tag {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 3px;
}
.category-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.task-card__cant-do {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: none;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}
.task-card__cant-do:active { transform: scale(0.88); background: var(--bg-elevated); }

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
  gap: var(--space-sm);
}
.section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.section-action {
  font-size: 13px;
  font-weight: 500;
  color: var(--brand);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
  text-decoration: none;
}
.btn:active { transform: scale(0.96); }
.btn--primary {
  background: var(--brand);
  color: #fff;
}
.btn--primary:hover { background: var(--brand-dim); }
.btn--secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}
.btn--ghost {
  background: none;
  color: var(--text-secondary);
  padding: 10px 16px;
}
.btn--crisis {
  background: linear-gradient(135deg, rgba(255,107,107,0.15), rgba(255,125,160,0.10));
  color: var(--state-crisis);
  border: 1px solid rgba(255,107,107,0.20);
}
.btn--full-width { width: 100%; }
.btn--lg { padding: 16px 24px; font-size: 16px; border-radius: var(--radius-lg); }
.btn--sm { padding: 8px 14px; font-size: 13px; border-radius: var(--radius-sm); }
.btn--icon {
  padding: 10px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-group {
  margin-bottom: var(--space-lg);
}
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  letter-spacing: 0.3px;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
  -webkit-appearance: none;
}
.form-input::placeholder, .form-textarea::placeholder {
  color: var(--text-muted);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-subtle);
}
.form-textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239195B8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

/* Slider customizado */
.emotion-slider-wrapper {
  position: relative;
}
.emotion-slider {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--bg-overlay);
  border-radius: var(--radius-full);
  outline: none;
  cursor: pointer;
}
.emotion-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand);
  cursor: pointer;
  box-shadow: 0 0 0 4px var(--brand-subtle);
  transition: box-shadow var(--transition-fast);
}
.emotion-slider:focus::-webkit-slider-thumb {
  box-shadow: 0 0 0 6px var(--brand-subtle);
}
.slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-xs);
  font-size: 11px;
  color: var(--text-muted);
}
.slider-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--brand);
  min-width: 28px;
  text-align: right;
}

/* ============================================================
   CHECK-IN CARDS
   ============================================================ */
.checkin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}
.checkin-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-md);
}
.checkin-item__label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-sm);
}
.checkin-item__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

/* ============================================================
   CRISIS MODE — Full overlay
   ============================================================ */
.crisis-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 12, 0.97);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-slow);
}
.crisis-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.crisis-overlay__symbol {
  font-size: 56px;
  margin-bottom: var(--space-lg);
  animation: gentlePulse 3s ease-in-out infinite;
}
.crisis-overlay__title {
  font-family: 'DM Serif Display', serif;
  font-size: 28px;
  text-align: center;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}
.crisis-overlay__message {
  font-size: 16px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.6;
  max-width: 320px;
  margin-bottom: var(--space-xl);
}
.crisis-steps {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}
.crisis-step {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}
.crisis-step__number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-subtle);
  border: 1px solid var(--brand-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
  flex-shrink: 0;
}
.crisis-step__text {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.4;
}

/* Breathing animation */
.breathing-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--brand-glow) 0%, transparent 70%);
  border: 2px solid var(--brand);
  animation: breathe 6s ease-in-out infinite;
  margin: 0 auto var(--space-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--brand);
  font-weight: 600;
}

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

/* ============================================================
   CANT-DO BOTTOM SHEET
   ============================================================ */
.bottom-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}
.bottom-sheet-backdrop.active { opacity: 1; pointer-events: all; }

.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 430px;
  background: var(--bg-surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  border-top: 1px solid var(--border-subtle);
  z-index: 400;
  transition: transform var(--transition-spring);
  padding-bottom: calc(var(--space-xl) + var(--safe-bottom));
  max-height: 90dvh;
  overflow-y: auto;
}
.bottom-sheet.active {
  transform: translateX(-50%) translateY(0);
}
.bottom-sheet__handle {
  width: 36px;
  height: 4px;
  background: var(--border-default);
  border-radius: var(--radius-full);
  margin: var(--space-sm) auto var(--space-md);
}
.bottom-sheet__header {
  padding: 0 var(--space-lg) var(--space-md);
}
.bottom-sheet__title {
  font-family: 'DM Serif Display', serif;
  font-size: 20px;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}
.bottom-sheet__subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.bottom-sheet__body {
  padding: 0 var(--space-lg);
}

/* Option cards in bottom sheet */
.option-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}
.option-card:active { transform: scale(0.98); background: var(--bg-overlay); }
.option-card__icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--brand-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.option-card__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.option-card__desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ============================================================
   ANCHOR CARDS
   ============================================================ */
.anchor-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  position: relative;
  overflow: hidden;
}
.anchor-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 60px; height: 60px;
  background: var(--brand-glow);
  border-radius: 50%;
  filter: blur(30px);
  opacity: 0.5;
}
.anchor-card__type {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--brand);
  margin-bottom: var(--space-xs);
}
.anchor-card__title {
  font-family: 'DM Serif Display', serif;
  font-size: 17px;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}
.anchor-card__content {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================================
   INSIGHTS
   ============================================================ */
.insight-bar-chart {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.insight-bar-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}
.insight-bar-label {
  font-size: 12px;
  color: var(--text-secondary);
  width: 60px;
  flex-shrink: 0;
  text-align: right;
}
.insight-bar-track {
  flex: 1;
  height: 6px;
  background: var(--bg-overlay);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.insight-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--brand), var(--accent-teal));
  transition: width 800ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.insight-bar-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  width: 28px;
}

/* ============================================================
   ONBOARDING
   ============================================================ */
.onboarding-screen {
  min-height: 100dvh;
  background: var(--bg-base);
  display: flex;
  flex-direction: column;
}
.onboarding-progress {
  display: flex;
  gap: 4px;
  padding: var(--space-md);
}
.onboarding-progress__dot {
  height: 3px;
  border-radius: var(--radius-full);
  flex: 1;
  background: var(--bg-elevated);
  transition: background var(--transition-normal);
}
.onboarding-progress__dot.active { background: var(--brand); }
.onboarding-progress__dot.done   { background: var(--brand-dim); }

.onboarding-step {
  flex: 1;
  padding: var(--space-xl) var(--space-lg);
  display: flex;
  flex-direction: column;
}
.onboarding-step__emoji {
  font-size: 48px;
  margin-bottom: var(--space-lg);
}
.onboarding-step__title {
  font-family: 'DM Serif Display', serif;
  font-size: 28px;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  line-height: 1.2;
}
.onboarding-step__desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-xl);
}

/* Chips / tags selection */
.chips-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}
.chip {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-default);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}
.chip:active { transform: scale(0.92); }
.chip.selected {
  background: var(--brand-subtle);
  border-color: var(--brand);
  color: var(--brand);
}

/* ============================================================
   IMPULSE GUARD MODAL
   ============================================================ */
.impulse-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 500;
  padding: var(--space-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}
.impulse-modal.active { opacity: 1; pointer-events: all; }
.impulse-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
}
.impulse-modal__card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--state-crisis);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  width: 100%;
  max-width: 400px;
  box-shadow: 0 0 40px rgba(255,107,107,0.15);
  transform: translateY(30px);
  transition: transform var(--transition-spring);
}
.impulse-modal.active .impulse-modal__card { transform: translateY(0); }
.impulse-modal__icon { font-size: 36px; margin-bottom: var(--space-md); }
.impulse-modal__title {
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}
.impulse-modal__text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-xl);
}
.impulse-timer {
  font-size: 48px;
  font-weight: 700;
  color: var(--brand);
  text-align: center;
  margin-bottom: var(--space-lg);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   SKELETON LOADING
   ============================================================ */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton {
  background: linear-gradient(90deg,
    var(--bg-elevated) 25%,
    var(--bg-overlay) 50%,
    var(--bg-elevated) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
.skeleton--text { height: 14px; margin-bottom: 8px; }
.skeleton--title { height: 22px; margin-bottom: 12px; width: 70%; }
.skeleton--card { height: 72px; border-radius: var(--radius-lg); }
.skeleton--circle { border-radius: 50%; }

/* ============================================================
   EMPTY STATES
   ============================================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-2xl) var(--space-lg);
  text-align: center;
}
.empty-state__icon {
  font-size: 48px;
  margin-bottom: var(--space-lg);
  opacity: 0.6;
}
.empty-state__title {
  font-family: 'DM Serif Display', serif;
  font-size: 20px;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}
.empty-state__text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 280px;
}

/* ============================================================
   AUTH SCREENS
   ============================================================ */
.auth-screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: var(--space-xl) var(--space-lg);
  padding-top: calc(var(--safe-top) + var(--space-xl));
  padding-bottom: calc(var(--safe-bottom) + var(--space-xl));
  background: var(--bg-base);
  position: relative;
  overflow: hidden;
}
.auth-screen::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--brand-glow) 0%, transparent 60%);
  pointer-events: none;
}
.auth-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 42px;
  color: var(--brand);
  text-align: center;
  margin-bottom: 4px;
}
.auth-tagline {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: var(--space-2xl);
  letter-spacing: 0.3px;
}
.auth-title {
  font-family: 'DM Serif Display', serif;
  font-size: 28px;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}
.auth-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  line-height: 1.5;
}
.auth-footer {
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: var(--space-xl);
}
.auth-footer a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
}
.auth-error {
  background: rgba(255,107,107,0.10);
  border: 1px solid rgba(255,107,107,0.25);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  font-size: 13px;
  color: var(--state-crisis);
  margin-bottom: var(--space-md);
  display: none;
}
.auth-error.visible { display: block; }

/* ============================================================
   NOTIFICATIONS / TOASTS
   ============================================================ */
.toast-container {
  position: fixed;
  top: calc(var(--safe-top) + var(--header-height) + var(--space-sm));
  left: 50%;
  transform: translateX(-50%);
  z-index: 600;
  width: 100%;
  max-width: 390px;
  padding: 0 var(--space-md);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  font-size: 14px;
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  pointer-events: all;
  animation: toastIn 0.35s var(--transition-spring) forwards;
}
.toast--success { border-color: rgba(93,216,192,0.3); }
.toast--error   { border-color: rgba(255,107,107,0.3); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-12px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============================================================
   SURVIVAL MODE SCREEN
   ============================================================ */
.survival-card {
  background: linear-gradient(135deg, rgba(255,125,160,0.08) 0%, rgba(255,188,91,0.05) 100%);
  border: 1px solid rgba(255,125,160,0.20);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  margin-bottom: var(--space-lg);
}
.survival-card__title {
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}
.survival-card__text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-lg);
}
.survival-checklist {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.survival-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.survival-item:active { transform: scale(0.98); }
.survival-item__emoji { font-size: 22px; }
.survival-item__label {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
}
.survival-item.done {
  opacity: 0.5;
  background: rgba(93,216,192,0.05);
}

/* ============================================================
   MISC UTILITIES
   ============================================================ */
.text-brand   { color: var(--brand); }
.text-muted   { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--state-full); }
.text-warning { color: var(--state-reduced); }
.text-danger  { color: var(--state-crisis); }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-gap-sm { display: flex; align-items: center; gap: var(--space-sm); }
.flex-col { display: flex; flex-direction: column; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }

.divider {
  height: 1px;
  background: var(--border-subtle);
  margin: var(--space-lg) 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes gentlePulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.05); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fadeIn 0.3s ease forwards; }
.animate-slide-up { animation: slideUp 0.35s ease forwards; }

/* Staggered list animation */
.task-card { animation: slideUp 0.3s ease both; }
.task-card:nth-child(1) { animation-delay: 0ms; }
.task-card:nth-child(2) { animation-delay: 50ms; }
.task-card:nth-child(3) { animation-delay: 100ms; }
.task-card:nth-child(4) { animation-delay: 150ms; }
.task-card:nth-child(5) { animation-delay: 200ms; }

/* ============================================================
   SIDEBAR (DESKTOP)
   ============================================================ */
.app-sidebar {
  display: none;
}
.sidebar-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 28px;
  color: var(--brand);
  padding: 0 var(--space-xl);
  margin-bottom: var(--space-sm);
}
.sidebar-tagline {
  font-size: 12px;
  color: var(--text-muted);
  padding: 0 var(--space-xl);
  margin-bottom: var(--space-xl);
  letter-spacing: 0.3px;
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 var(--space-md);
}
.sidebar-nav__item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
}
.sidebar-nav__item:hover { background: var(--bg-elevated); color: var(--text-primary); }
.sidebar-nav__item.active { background: var(--brand-subtle); color: var(--brand); }
.sidebar-nav__icon { width: 18px; height: 18px; flex-shrink: 0; }

/* ============================================================
   PWA INSTALL BANNER
   ============================================================ */
.pwa-install-banner {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + var(--space-sm));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 2 * var(--space-md));
  max-width: 390px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  box-shadow: var(--shadow-lg);
  z-index: 250;
  animation: slideUp 0.4s var(--transition-spring) forwards;
}
.pwa-install-banner__text {
  flex: 1;
  font-size: 13px;
  color: var(--text-secondary);
}
.pwa-install-banner__text strong {
  display: block;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 2px;
}
